-
Notifications
You must be signed in to change notification settings - Fork 78
Support NRPN? #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've had a go, but just can't fathom supercollider out at all. Despite a lot of moving things around, I just get lots of |
Maybe some of the variables are nil? The |
Are you sure your |
Yes midicmd is nil. I think maybe the |
Yes that was it. Will test next time I'm with the synth |
I redid my changes, seems to work well now. |
This isn't working with negative values. |
Any ideas what this should be, to support sending negative numbers?
|
The standard doesn't seem to permit negative numbers. http://www.somascape.org/midi/tech/spec.html#rpns My synth demands them though. Hmm! |
I think it's up to the MIDI device to interpret the 14 bits, usually they use 2's complement. So I think something along these lines will work for both positive and negative values:
i.e. you don't need to change your LSB, and just take |
That worked, thanks a lot @bgold-cosmos ! |
support negative numbers (thanks @bgold-cosmos), fixes #154
Seems Tidal won't send value 0 for CC 38. The midi monitor shows that the following resends the last occurrence of CC 6 instead of CC 38 with value 0.
This means that NRPN codes that require CC 38 = 0 won't work. I came across this trying to control the Elektron A4. For example, this goes wrong, with
while values that don't imply value 0 for CC 38 are fine;
(but note that CC 6 is sent twice). |
NRPN is a way to send high resolution data over MIDI CC messages
https://www.elektronauts.com/t/nrpn-tutorial-how-to/46669
For example to change the x parameter on this alesis micron You send first send a two-byte controller identifier for it using CCs 99 and 98
99:0 98:44
(these being cc number, cc value pairs). You then send a two-byte value over CCs 44 (msb) and 38 (lsb), e.g. `44:6 38:4 = 128 * 6 + 4 = a value of 772.The id and value is always sent over those four cc numbers. You might send the id once followed by a series of values in quick succession.
Here's an example of someone sending a value using supercollider:
https://sccode.org/1-57O
I tried this in tidal:
once $ cc "[99:0,98:44,6:0,38:9]" # s "midi"
Unfortunately the list comes through in a random order, so the sequence isn't set properly. This works:
once $ cc "[99:0 98:44 6:7 38:0] ~@10000" # s "midi"
But it would be great if it could be sent as a name:value pair with supercollider doing the work to break it into bytes for sending as CC:s. e.g.:
The text was updated successfully, but these errors were encountered: