summaryrefslogtreecommitdiff
path: root/midi-sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'midi-sdl.c')
-rw-r--r--midi-sdl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/midi-sdl.c b/midi-sdl.c
index 7509859..a458528 100644
--- a/midi-sdl.c
+++ b/midi-sdl.c
@@ -9,9 +9,9 @@ int midi_init() {
9 return 0; 9 return 0;
10} 10}
11 11
12void midi_playnote( int channel, int note, int octave_offset ) { 12void 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}