Merge branch 'master' into feature/esfm

This commit is contained in:
Kagamiin~ 2023-12-17 08:31:16 -03:00
commit 13e45cfce2
19 changed files with 62 additions and 9 deletions

View file

@ -1378,9 +1378,9 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
}
if (note.on) {
dispatchCmd(DivCommand(DIV_CMD_INSTRUMENT,note.channel,note.ins,1));
if (note.volume>=0) {
int mappedVol=disCont[dispatchOfChan[note.channel]].dispatch->mapVelocity(note.channel,note.volume);
logV("dispatching volume (%d -> %d)",note.volume,mappedVol);
if (note.volume>=0 && !disCont[dispatchOfChan[note.channel]].dispatch->isVolGlobal()) {
float curvedVol=pow((float)note.volume/127.0f,midiVolExp);
int mappedVol=disCont[dispatchOfChan[note.channel]].dispatch->mapVelocity(dispatchChanOfChan[note.channel],curvedVol);
dispatchCmd(DivCommand(DIV_CMD_VOLUME,note.channel,mappedVol));
}
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,note.channel,note.note));