musikinformatik/SuperDirt

Should we send RPN Null after NRPN?

Zalastax opened this issue · 4 comments

Also at MIDI NRPN Null Needed? How? @ Tidal club.

My synth manual and many other manuals contain a statement like this "Once an NRPN parameters
has been specified, all Data Entry messages received on that channel will modify the value of that parameter. To prevent accidents, it is recomended that you set RPN Null (RPN Number = 7FH/7FH) when you have finished setting the value of the desired parameter."

Jwaldmann didn't face issues when not following this approach, so it might not be needed. But I feel it might anyway be best to follow the recommendation.

Should we do as recommended and follow the approach explained here http://www.philrees.co.uk/nrpnq.htm? It would be simple to add here:

if(~nrpn.notNil) {
~val = ~val ? 0;
nrpnLSB = ~nrpn % 128;
nrpnMSB = (~nrpn - nrpnLSB) / 128;
valLSB = ~val % 128;
valMSB = (~val - valLSB) / 128;
schedmidi.value({
midiout.control(chan, 99, nrpnMSB);
midiout.control(chan, 98, nrpnLSB);
midiout.control(chan, 6, valMSB);
midiout.control(chan, 38, valLSB);
});
};

yaxu commented

I don't know too much about NRPN, and haven't used it much, but yes it sounds like that's worth doing.

yes, sounds reasonable. @Zalastax do you want to make a pull request?

Yes, I will make a pull request @telephon. I expect to be able to do it in a few weeks time.

thank you!