|
|
|
07-06-2019, 10:36 AM
|
#1
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
Sending an NRPN message from a midi item
Hi,
I need to send an NRPN message to an external synth to automate a parameter periodically. It doesn't need to be continuous, just needs to fire every now and again.
Is there a way I can do this?
|
|
|
07-06-2019, 12:58 PM
|
#2
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
I suppose it should be rather easy to write a JSFX plugin that sends out NRPN messages when requested to do so by a Midi message, a move of a slider or some timing definition.
-Michael
|
|
|
07-06-2019, 01:48 PM
|
#3
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
You can send NRPN from the MIDI editor, but it's quite convoluted, because they are spread out across 3 CC lanes.
You need to create
- CC99 (NRPN MSB)
- CC98 (NRPN LSB)
and either
- CC6 (Data entry LSB)
or, if you need 14 bit data entry
- CC6/38 (Data entry 14bit)
and create an event on each lane with the appropriate value and make sure they get sent in the above order.
Probably, as it's such a pita to create them in Reaper, you should consider to create a MIDI item for each of the NRPNs you regularly need and save them as a project bay (or as MIDI files), so you can grab them from there.
|
|
|
07-09-2019, 03:51 PM
|
#4
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
Thanks guys, I saw those ccs in the midi editor, but wasn't sure how to use them, I'll try that.
Saying that though, it would also be useful to have an nrpn translator jsfx. How difficult would that be? Do you have any pointers?
|
|
|
07-09-2019, 09:36 PM
|
#5
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
Quote:
Originally Posted by Travesty
it would also be useful to have an nrpn translator jsfx. How difficult would that be? Do you have any pointers?
|
I can do one for you. What event should trigger the output of what NRPN message ?
-Michael
|
|
|
07-10-2019, 05:06 AM
|
#6
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
I was thinking more of a general purpose translator, if that were possible
|
|
|
07-10-2019, 05:57 AM
|
#7
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
Quote:
Originally Posted by Travesty
I was thinking more of a general purpose translator, if that were possible
|
What exactly is "general Purpose" and what do you want to "translate" ?
If you simply want to translate a normal CC message to a dedicated NRPM message, that would be an easy starting point (but not very "general purpose".
-Michael
|
|
|
07-10-2019, 08:12 AM
|
#8
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
For my purposes, which is controlling external synths from reaper, a plugin which had sliders assignable to nrpns which you could then automate or map to a control would be very useful
|
|
|
07-10-2019, 02:31 PM
|
#9
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
I'll do a draft for you tomorrow...
-Michael
|
|
|
07-11-2019, 05:59 AM
|
#10
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
Here you are:
Code:
desc:Slider to Midi NRPM
author: Michael Schnell (mschnell@bschnell.de)
version: 1.0
changelog: initial release
donation: United Nations Foundation http://www.unfoundation.org/
about:
## Description
Sends an RPM message according to the channel and Parameter No setting whenever the Value value slider is modified manually or by automation
Compress: don't send messages for partial values that did not change
Reset Parameter No: After sending a message seqence set parameter No to 0 to free CC # 6 and #38 for normal use
// reference: http://www.philrees.co.uk/nrpnq.htm
slider1:0<0,16,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>Channel
slider2:0<0,16383,1>Parameter No
slider3:0<0,16383,1>Parameter Value
slider4:1<0,127,1{No,only CC 6 & 38,All}>Compress
slider5:1<0,127,1{No,Yes}>Reset parameter No
@init
cc = 0xB0;
mes12 = 99; // NRPM MSB
mes22 = 98; // NRPM LSB
mes12x= 101; // RPM MSB
mes22x= 100; // RPM LSB
mes3xx= 127; // Parameter NULL
mes32 = 6; // Data Entry MSB
mes42 = 38; // Data Entry LSB
old = -1;
mes13old = -1;
mes23old = -1;
mes33old = -1;
mes43old = -1;
ch = -1;
@slider
ch != slider1 ? (
ch = slider1;
old = -1;
mes13old = -1;
mes23old = -1;
mes33old = -1;
mes43old = -1;
);
mesx1 = cc + slider1;
mes13 = (slider2 >> 7) & 0x7F;
mes23 = slider2 & 0x7F;
mes33 = (slider3 >> 7) & 0x7F;
mes43 = slider3 & 0x7F;
new = slider3;
@block
old != new ? (
slider4 ? (
mes13old != mes13 ? midisend(0,mesx1,mes12,mes13);
mes23old != mes23 ? midisend(0,mesx1,mes22,mes23);
mes33old != mes33 ? midisend(0,mesx1,mes32,mes33);
mes43old != mes43 ? midisend(0,mesx1,mes42,mes43);
slider4 > 1 ? (
mes13old = mes13;
mes23old = mes23;
);
mes33old = mes33;
mes43old = mes43;
) : (
midisend(0,mesx1,mes12,mes13);
midisend(0,mesx1,mes22,mes23);
midisend(0,mesx1,mes32,mes33);
midisend(0,mesx1,mes42,mes43);
);
slider5 ? (
midisend(0,mesx1,mes12x,mes3xx);
midisend(0,mesx1,mes22x,mes3xx);
);
old = new;
);
-Michael
|
|
|
07-11-2019, 02:29 PM
|
#11
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Have you checked Ctrlr? Making panels from scratch there requires some time, but may be someone has done that for your synth already.
|
|
|
07-11-2019, 09:34 PM
|
#12
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
Quote:
Originally Posted by azslow3
Have you checked Ctrlr? Making panels from scratch there requires some time, but may be someone has done that for your synth already.
|
In what way is this related to the NRPM issue ?
-Michael
Last edited by mschnell; 07-11-2019 at 11:34 PM.
|
|
|
07-11-2019, 10:59 PM
|
#13
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Quote:
Originally Posted by mschnell
In what way is thi related to the NRPM issue ?
-Michael
|
Just another view angle on the problem. If hardware synth is represented by Ctrlr panel (which internally can send/receive corresponding messages), automating something can be done the same way as with a soft synth parameters.
|
|
|
07-12-2019, 07:54 AM
|
#14
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
I was using the official plugin controller for the synth and automating via that, but not all functions are present, plus it's overkill for what I'm actually trying to do, which is to set the synth to the scale of whatever tune is currently playing in a live situation. Plus it gets a bit funny when you have multiple instances open. This is the Dave Smith / Pioneer Toraiz AS1 btw.
I'll give the JS a try, thanks!
|
|
|
07-12-2019, 11:53 PM
|
#15
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
Let me know if you need further assistance...
If you confirm it works, I'll upload the code to ReaPack.
-Michael
|
|
|
07-15-2019, 06:30 AM
|
#16
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
Will try it out tonight, cheers
|
|
|
07-15-2019, 01:42 PM
|
#17
|
Human being with feelings
Join Date: Nov 2014
Posts: 798
|
Works great, thanks.
I edited the value slider range to 21 because that's the range of the control I'm interested in.
It might be worth having a way to set the range of the slider without going into the code, if that is possible. The max any of the controls on this synth is 256, so if anyone wanted to automate something like that and didn't know you could easily change the code, might be a bit fiddly.
Good stuff though, it has solved the problem
|
|
|
07-15-2019, 02:02 PM
|
#18
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
|
Uploaded it to ReaPack...
-Michael
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:17 AM.
|