From 42d201534b4c113db00c8404835658024f89e271 Mon Sep 17 00:00:00 2001 From: Jonathan Straub Date: Thu, 7 Dec 2023 00:45:16 +0100 Subject: Fix midi pitch output on aarch64 devices --- backends/midi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/midi.c b/backends/midi.c index 4bf846a..a5f953e 100644 --- a/backends/midi.c +++ b/backends/midi.c @@ -247,8 +247,7 @@ static int midi_set(instance* inst, size_t num, channel** c, channel_value* v){ } break; case pitchbend: - //TODO check whether this actually works that well - midi_tx(data->port, ident.fields.type, ident.fields.channel, ident.fields.control, (v[u].normalised * 16383.0) - 8192); + midi_tx(data->port, ident.fields.type, ident.fields.channel, ident.fields.control, (int16_t) (v[u].normalised * 16383.0) - 8192); break; default: midi_tx(data->port, ident.fields.type, ident.fields.channel, ident.fields.control, v[u].normalised * 127.0); -- cgit v1.2.3