diff options
Diffstat (limited to 'midi-sdl.c')
-rw-r--r-- | midi-sdl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -9,9 +9,9 @@ int midi_init() { | |||
9 | return 0; | 9 | return 0; |
10 | } | 10 | } |
11 | 11 | ||
12 | void midi_playnote( int channel, int note, int octave_offset ) { | 12 | void midi_playnote( int channel, int note, int octave_offset, int velocity ) { |
13 | char out[32]; | 13 | char out[32]; |
14 | int b = sprintf(out,"M%02X0020\nM%02X%02X%02X\n", 0xe0 | channel, 0x90 | channel, note + 12 * octave_offset, 0x7f); | 14 | int b = sprintf(out,"M%02X0020\nM%02X%02X%02X\n", 0xe0 | channel, 0x90 | channel, note + 12 * octave_offset, velocity&127); |
15 | if (g_harfe_connected && (g_harfe_fd != -1)) | 15 | if (g_harfe_connected && (g_harfe_fd != -1)) |
16 | write(g_harfe_fd, out, b); | 16 | write(g_harfe_fd, out, b); |
17 | } | 17 | } |