Fix GCC build (Clang-only flag), add note mapping + drag/drop overlay, UI tweaks

This commit is contained in:
Armin 2026-10-03 21:49:27 +02:00
commit ca6f1ff0ee
7 changed files with 97 additions and 7 deletions

View file

@ -282,6 +282,24 @@ int SliceManager::findSliceIndexForSample(int samplePos) const
return -1;
}
int SliceManager::findSliceIndexForNote(int midiNote) const
{
const juce::CriticalSection::ScopedLockType lock(mutex);
if (slices.empty())
return -1;
for (size_t i = 0; i < slices.size(); ++i)
if (slices[i].midiNote == midiNote)
return static_cast<int>(i);
int pitchClass = midiNote % 12;
for (size_t i = 0; i < slices.size(); ++i)
if (slices[i].midiNote % 12 == pitchClass)
return static_cast<int>(i);
return -1;
}
void SliceManager::sortSlices()
{
std::sort(slices.begin(), slices.end(),