updates midi in play_note to better octave
parent
aaa758f1d3
commit
897f5b2f9d
|
@ -947,10 +947,10 @@ void fallthrough_callback(MidiDevice * device,
|
||||||
if (cnt == 3) {
|
if (cnt == 3) {
|
||||||
switch (byte0 & 0xF0) {
|
switch (byte0 & 0xF0) {
|
||||||
case MIDI_NOTEON:
|
case MIDI_NOTEON:
|
||||||
play_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(byte1 & 0x7F)/12.0), (byte2 & 0x7F) / 8);
|
play_note(((double)261.6)*pow(2.0, -4.0)*pow(2.0,(byte1 & 0x7F)/12.0), (byte2 & 0x7F) / 8);
|
||||||
break;
|
break;
|
||||||
case MIDI_NOTEOFF:
|
case MIDI_NOTEOFF:
|
||||||
stop_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(byte1 & 0x7F)/12.0));
|
stop_note(((double)261.6)*pow(2.0, -4.0)*pow(2.0,(byte1 & 0x7F)/12.0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue