View Single Post
Old 03-27-2014, 04:27 PM   #24
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Ok, I think I have the basics of a workaround in the form of a script for OSCII-bot: MPD32-NRPN2CC.txt.

For a test, it now converts these values:

Knob 1 (NRPN 52) turned clockwise =======> CC#1, value 1
Knob 1 (NRPN 52) turned counter-clockwise ==> CC#2, value 1
Knob 2 (NRPN 53) turned clockwise =======> CC#3, value 1
Knob 2 (NRPN 53) turned counter-clockwise ==> CC#4, value 1

I tested it by learning CC#1 to the 'Transport: Fast forward a little bit' action, and CC#2 to 'Transport: Rewind a little bit' action. This all seems to work as desired (although I'm finding the steps a bit large, but I guess that's simply how things are in any case...).

To test this script for yourself, unzip and put it in the folder for OSCII-bot scripts, then run OSCII-bot. It probably takes a bit of tweaking to configure your MIDI input/output properly. To do so, have a look at these lines:
Code:
@input in1 "MPD32"
and
Code:
@output out1 MIDI "Out To MIDI Yoke:  1"
Edit the name (i.e. the "MPD32" part) if this doesn't work. You can check the names of the MIDI ports in REAPER as well. I'm assuming you'll be using MIDIYoke for a virtual MIDI port on Windows, but anything similar should work, too.

If this works as desired, and you want to extend this script (to support more knobs), look at these lines in the code:
Code:
// NB: here, the "fmt2" variable holds the (N)RPN parameter number;
// the "msg2" variable holds the CC# number.

fmt2==52 && msg2==96 ? ( // Knob that sends NRPN 52 is turned clockwise
	msg2 = 1; // Use CC#1 instead
	midisend(midi_out_port); // Send value as CC#1 event
);

fmt2==52 && msg2==97 ? ( // Knob that sends NRPN 52 is turned counter-clockwise
	msg2 = 2; // Use CC#2 instead
	midisend(midi_out_port); // Send value as CC#2 event
);

fmt2==53 && msg2==96 ? ( // Knob that sends NRPN 53 is turned clockwise
	msg2 = 3; // Use CC#3 instead
	midisend(midi_out_port); // Send value as CC#3 event
);

fmt2==53 && msg2==97 ? ( // Knob that sends NRPN 53 is turned counter-clockwise
	msg2 = 4; // Use CC#4 instead
	midisend(midi_out_port); // Send value as CC#4 event
);

// Etc. ...
Just try to follow the pattern, it shouldn't be too hard (but of course feel free to ask for help if you would get stuck). You can also change the CC# numbers (1, 2, 3, 4 etc.) to something else.

Hope this helps!
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ

Last edited by Banned; 03-27-2014 at 04:34 PM.
Banned is offline   Reply With Quote