fbpx
Skip to main content

MIDI Forum

Notifications
Clear all

NRPN data format

12 Posts
6 Users
0 Reactions
17.4 K Views
Max Dobroselsky
Posts: 65
Estimable Member
Topic starter
 

I have a question about NRPN (non-registered parameter number) data. Can NRPN contain more than one pair of MSB/LSB of data entry? For example, four bytes of data (MSB LSB MSB LSB).

 
Posted : 21/08/2020 11:52 am
Eddie Lotter
Posts: 295
Reputable Member
 

Given that NRPN is for proprietary use, yes, it's possible to implement a scheme as you suggest if that's what you want to do.

 
Posted : 21/08/2020 3:57 pm
Max Dobroselsky
Posts: 65
Estimable Member
Topic starter
 

But if the format of NRPN can be totally arbitrary, is it possible to read them? For example, we can easily read custom meta events since meta events have fixed format. But what if we encountered NRPN in a MIDI file? Is there reliable way to read it? Waiting for NRPN NULL (99/127 98/127)? But, for example, for RPN it's possible to omit NULL since data can be read by definition of RPN. So if we don't know NRPN, it's impossible to read it in general case?

 
Posted : 21/08/2020 11:54 pm
Eddie Lotter
Posts: 295
Reputable Member
 

You cannot make any assumptions about NRPN. You can read what's there, but you cannot interpret what you read in any general sense.

 
Posted : 22/08/2020 6:10 am
Max Dobroselsky
Posts: 65
Estimable Member
Topic starter
 

Yes, of course we can't interpret NRPN data. But if format is arbitrary, we can't even read data. For example, we see following bytes sequence: 99/xx 98/yy 6/zz 6/rr. What is 6/rr? It's a new NRPN with data of rr, or 6/zz 6/rr together create two-byte value? With RPN we can easily understand where each new RPN starts and ends, even without NULL bytes, just by knowing format of each RPN.

 
Posted : 22/08/2020 9:41 am
Eddie Lotter
Posts: 295
Reputable Member
 

Usually when both the Data MSB and the Data LSB are used, they are part of a single value, but again, with NRPN you cannot make that assumption.
Are you trying to decide how to present the data in a user interface? What is your goal?

 
Posted : 22/08/2020 10:58 am
Max Dobroselsky
Posts: 65
Estimable Member
Topic starter
 

I'm developing a library to work with MIDI. Now I want to implement parsing RPN/NRPNs. And right now it seems that I have no reliable way to parse NRPN 🙁

 
Posted : 22/08/2020 11:55 am
Clemens Ladisch
Posts: 323
Reputable Member
 

You have no choice but to expose the individual Data Entry messages. (It's probably safe to combine MSB and LSB if they are sent at the same time.)

 
Posted : 23/08/2020 12:12 am
Jonas
Posts: 207
Reputable Member
 

I tried to read out if NRPN messages can occure in a midifile, but can't see the answer?
So can they?

 
Posted : 12/07/2021 11:08 pm
Eddie Lotter
Posts: 295
Reputable Member
 

[quotePost id=9726]I tried to read out if NRPN messages can occure in a midifile, but can't see the answer?
So can they?[/quotePost]
Yes, NRPN messages can occur in MIDI files.

 
Posted : 13/07/2021 5:14 am
John
 John
Posts: 1
New Member
 

My goal is to cc automate the Filter Envelope Depth of my synth (Hypersynth Xenophone) from my sequencer (Squarp Pyramid). The hardware does not really matter here, the question is general, although there are details of the hardware, that make a difference.

From the user manual EnvD is controlled by NRPN 9, with a range of 0-1000. The synth manufacturer tells me on his website that the maximum resolution in NRPN mode is 12 bit.

Turning the EnvD knob on the synth changes the values between -50 and +50. (I want to modulate it between -30 and 0, or thereabouts). I have also used on NRPN 9.

If supported by your synth, NRPN is going beyond conventional MIDI CC modulation, allowing finer resolutions (beyond values in the range of 0-127). To this end more than one item of controller data need to be send.

 
Posted : 19/07/2021 4:29 am
Geoff
Posts: 1040
Noble Member
 

John,

Not sure what you mean by 'NRPN 9'. You need to use the TWO controllers for NRPN, and these are CC 98 and 99 (decimal). Controller 98 contains the LSB, while 99 contains the MSB. So you are correct, you need to use the two bytes of data, and this will allow you to enter a larger value.

These things have been referred to earlier in this thread.

Another problem may relate to what you're sending data to, and what data you send. Are you wanting to send data to alter the EnvD setting directly, which may require data in one format. Or do you want to alter the parameters/operation of the EnvD knob, which may need something different. You should check the manual to see which should be the best way to do it.

Geoff

 
Posted : 19/07/2021 8:36 am
Share: