Nrpn messages?

Discuss Lemur and share techniques.
PongFu
Newbie
Posts: 11
Joined: 13 Dec 2011 17:37

Nrpn messages?

Post by PongFu »

Is it possible to send nrpn messages to a dsi tetra and if so, how?
kraftf
Regular
Posts: 124
Joined: 14 Dec 2011 06:36

Re: Nrpn messages?

Post by kraftf »

PongFu
Newbie
Posts: 11
Joined: 13 Dec 2011 17:37

Re: Nrpn messages?

Post by PongFu »

So turning the LFO 4 Frequency knob gives this message in MIDI-OX,
lfo 4 freq.JPG
lfo 4 freq.JPG (20.47 KiB) Viewed 7692 times
now what?
kraftf
Regular
Posts: 124
Joined: 14 Dec 2011 06:36

Re: Nrpn messages?

Post by kraftf »

It depends on what kind of NRPN message you want to send. Use the 14bit as your method and change the MSB-LSB values and whatever you like to achieve your NRPN.
PongFu
Newbie
Posts: 11
Joined: 13 Dec 2011 17:37

Re: Nrpn messages?

Post by PongFu »

I just want to know how to make a fader control the LFO 4 frequency from 00 to 16,
and the make a few buttons for the specific synchronized LFO values;
17,18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20, 21, 22, 23, 24, 25 and 26
So what are the different kinds of messages I can choose from,
what's the difference between them, and do I use cc's? a script? a custom midi message?
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Nrpn messages?

Post by Macciza »

Hi
Based loosely on the other script - This one sends NRPNs - only MSB data atm . . .

Add it as a script to a Fader . . .

// NRPN script - MM

decl target=0; // MIDI Target
decl nrpn_msb = 99, nrpn_lsb = 98; // NRPN MSB - LSB
decl data_msb = 6, data_lsb = 38; // DATA MSB - LSB
decl nrpn_param = 52;
decl null=0, value; // Vars
decl chan = 1; // MIDI Chan

value= Fader.x*16; // value * range

ctlout(target,nrpn_msb,null,chan);
ctlout(target,nrpn_lsb,nrpn_param,chan);
ctlout(target,data_msb,null,chan);
ctlout(target,data_lsb,value,chan);

Only LSB data is sent as per your pic MSB=0 so you may need to check what range you want to send and adjust to suit,
usually the MSB would be used and LSB could be left off - you will need to check the synth's sysex ref . . .

Hope that help in some way - there are no doubt other ways to achieve the same thing

Cheers
MM

#PS Just wanted to add that this is just one way to do and by no means the best way particularly in a larger app . . .
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
PongFu
Newbie
Posts: 11
Joined: 13 Dec 2011 17:37

Re: Nrpn messages?

Post by PongFu »

I'm still not getting it, what number goes where and why? :shock:
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Nrpn messages?

Post by Macciza »

Hi
Try a net search on NRPN they are particular CCs sent in a particular order . .

Reading your pic - B0 means CC on channel 1
CC 99 and 98 (63 and 62 hex)are MSB and LSB for the NRPN number - 0 and 52 (thats 34 hex ib decimal) are sent
CC6 and 38 are used for the data part to send your values

Hope that helps
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
PongFu
Newbie
Posts: 11
Joined: 13 Dec 2011 17:37

Re: Nrpn messages?

Post by PongFu »

I still can't get it to work, do you happen to have a DSI tetra somewhere?
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Nrpn messages?

Post by Macciza »

Hi PongFu
No Don't have a Tetra - but I had a quick look at the manual - check the nrpn info and tables at the end . . .
We can using running status which means we don't have to retransmit some redundant info.
So you just need to send the info it details - convert the binary to hex or decimal as you wish . ..
It helps to use a calculator that can do the decimal, hex, binary conversion for you
Check you are setup to send and recieve nrpns in global parameters
Then go through the Program Parameter table . .
LFO 4 Freq is param 57 which is for layer A is nrpn 52 and takes 0 -166 as values same as LFO 1
0-166 = 0 - 150 unsynced frequencies then 151 to 166 are the synced divisions . . .
Have a look at what values are being sent when you twist the knob - you need to mimic that range . .

So it's probably better to use midiout and send the data described

ie something like - midiout(0{0xB0,99,0,98,52,6,val_msb,38,val_lsb})
So it just comes down to how you want your interface to work and how to map the values properly

Once you have selected an nrpn you can use the value increment/decrement messages as well
Also remember to use the reset message - looks like its 37 & 36 with 127 as the data

Hope that makes sense
Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Post Reply