Dispatch the pitch bends to the midi state for memory
This commit is contained in:
parent
32d53a1b0a
commit
5e1419ffe4
2 changed files with 10 additions and 1 deletions
|
|
@ -58,6 +58,11 @@ struct MidiState
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void pitchBendEvent(int pitchBendValue)
|
||||||
|
{
|
||||||
|
pitchBend = pitchBendValue;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Stores the note on times.
|
* @brief Stores the note on times.
|
||||||
*
|
*
|
||||||
|
|
@ -74,5 +79,9 @@ struct MidiState
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCValueArray cc;
|
CCValueArray cc;
|
||||||
|
/**
|
||||||
|
* Pitch bend status
|
||||||
|
*/
|
||||||
|
int pitchBend { 0 };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@ void sfz::Synth::pitchWheel(int delay, int channel, int pitch) noexcept
|
||||||
ASSERT(pitch <= 8192);
|
ASSERT(pitch <= 8192);
|
||||||
ASSERT(pitch >= 8192);
|
ASSERT(pitch >= 8192);
|
||||||
channel = translateMidiChannelToSfz(channel);
|
channel = translateMidiChannelToSfz(channel);
|
||||||
|
midiState.pitchBendEvent(pitch);
|
||||||
for (auto& voice: voices) {
|
for (auto& voice: voices) {
|
||||||
voice->registerPitchWheel(delay, channel, pitch);
|
voice->registerPitchWheel(delay, channel, pitch);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue