mirror of
https://codeberg.org/armin/monoslicer.git
synced 2026-10-11 21:11:53 +02:00
Fix GCC build (Clang-only flag), add note mapping + drag/drop overlay, UI tweaks
This commit is contained in:
parent
fd23c92a5d
commit
ca6f1ff0ee
7 changed files with 97 additions and 7 deletions
|
|
@ -470,8 +470,12 @@ void MonoslicerProcessor::processBlock(juce::AudioBuffer<float>& buffer, juce::M
|
|||
|
||||
void MonoslicerProcessor::handleNoteOn(int noteNumber, float velocity)
|
||||
{
|
||||
int offset = static_cast<int>(apvts.getRawParameterValue("octaveOffset")->load()) * 12;
|
||||
int sliceIdx = noteNumber - 60 + offset;
|
||||
int offset = 0;
|
||||
if (auto* p = dynamic_cast<juce::AudioParameterInt*>(apvts.getParameter("octaveOffset")))
|
||||
offset = p->get();
|
||||
|
||||
int note = noteNumber + offset * 12;
|
||||
int sliceIdx = sliceManager.findSliceIndexForNote(note);
|
||||
sliceIdx = juce::jlimit(0, juce::jmax(0, sliceManager.getNumSlices() - 1), sliceIdx);
|
||||
|
||||
if (apvts.getRawParameterValue("selectViaMidi")->load() > 0.5f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue