diff options
author | cbdev <cb@cbcdn.com> | 2021-01-02 17:15:57 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2021-01-02 17:15:57 +0100 |
commit | 26b91b849899976b455bc5d780688de6962569e1 (patch) | |
tree | 46b191b0dca80d56fc25cc499ba349bf3396bc89 /backends/midi.c | |
parent | adc132b5fc039a185be947de3309bd11f4dee823 (diff) | |
download | midimonster-26b91b849899976b455bc5d780688de6962569e1.tar.gz midimonster-26b91b849899976b455bc5d780688de6962569e1.tar.bz2 midimonster-26b91b849899976b455bc5d780688de6962569e1.zip |
Implement EPN transmission for the winmidi backend
Diffstat (limited to 'backends/midi.c')
-rw-r--r-- | backends/midi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/midi.c b/backends/midi.c index 8a8887a..d581a01 100644 --- a/backends/midi.c +++ b/backends/midi.c @@ -109,7 +109,7 @@ static int midi_configure_instance(instance* inst, char* option, char* value){ return 0; } - LOGPF("Unknown instance option %s", option); + LOGPF("Unknown instance configuration option %s on instance %s", option, inst->name); return 1; } @@ -227,10 +227,10 @@ static int midi_set(instance* inst, size_t num, channel** c, channel_value* v){ case rpn: case nrpn: //transmit parameter number - midi_tx(data->port, cc, ident.fields.channel, (ident.fields.type == rpn) ? 101 : 99, (ident.fields.control & 0x3F80) >> 7); + midi_tx(data->port, cc, ident.fields.channel, (ident.fields.type == rpn) ? 101 : 99, (ident.fields.control >> 7) & 0x7F); midi_tx(data->port, cc, ident.fields.channel, (ident.fields.type == rpn) ? 100 : 98, ident.fields.control & 0x7F); //transmit parameter value - midi_tx(data->port, cc, ident.fields.channel, 6, (((uint16_t) (v[u].normalised * 16383.0)) & 0x3F80) >> 7); + midi_tx(data->port, cc, ident.fields.channel, 6, (((uint16_t) (v[u].normalised * 16383.0)) >> 7) & 0x7F); midi_tx(data->port, cc, ident.fields.channel, 38, ((uint16_t) (v[u].normalised * 16383.0)) & 0x7F); if(!data->epn_tx_short){ |