Fix midi velocity range
This commit is contained in:
parent
92a982b2f0
commit
8d28ed8832
1 changed files with 1 additions and 0 deletions
|
@ -93,6 +93,7 @@ public class MidiConverter {
|
|||
int pitch = sm.getData1();
|
||||
int velocity = sm.getData2();
|
||||
if (velocity == 0) continue; // Just ignore notes with velocity 0
|
||||
velocity = (velocity * 100) / 127; // Midi velocity goes from 0-127
|
||||
long deltaTick = event.getTick() - prevTick;
|
||||
prevTick = event.getTick();
|
||||
microTime += (mpq/tpq) * deltaTick;
|
||||
|
|
Loading…
Reference in a new issue