aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2024-06-24 17:37:50 +0200
committerGitHub <noreply@github.com>2024-06-24 17:37:50 +0200
commitc247b034e6e06850af8e58a6ba4adf85c0a18071 (patch)
treec95563334bdc464135f25057e1ed8afd50a43b9a
parent18fb7032ad7ce5c4c6734c47255c66925078a273 (diff)
parent42d201534b4c113db00c8404835658024f89e271 (diff)
downloadmidimonster-master.tar.gz
midimonster-master.tar.bz2
midimonster-master.zip
Merge pull request #137 from JonFStr/masterHEADmaster
Fix midi pitch output on aarch64 devices
-rw-r--r--backends/midi.c3
1 files changed, 1 insertions, 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);