Old 01-17-2021, 03:35 PM   #1
woodnut
Human being with feelings
 
Join Date: Feb 2018
Posts: 11
Default Midi Controller button as Selector Switch

Hello folks, is there any way in reaper that I can get a button on a midi controller to act as a fader for the purposes of scrolling through values on a menu of vst plugin.

The application I have in mind is with uhe diva, mapping one of my midi controllers buttons to one of divas menus but using a plugin or script so that each press will take it to the next item on the menu and back around again. Many thanks.

Last edited by woodnut; 01-17-2021 at 03:38 PM. Reason: Typos
woodnut is offline   Reply With Quote
Old 01-17-2021, 08:46 PM   #2
6xes
Human being with feelings
 
Join Date: Oct 2020
Posts: 62
Default

i asked the same question months back, unfortunately no reply..

i had diffuculty in assigning midi-controller buttons to arrow-keys&enter or tab key, which i think is what you are trying to achieve..thereby moving up&down and selecting on the menu list

i know its possible to do, i havent figured it out..

third party programs like Bomes midi translator does it... not sure if the older version achieves this.. but the trial version does it, but only works for Xamount of minutes.. The paid version is a little steep, and if you have a long term plan for use with midi controllers its worth considering..

otherwise your keyboard&mouse is the go..
good luck with finding a solution for ya

Last edited by 6xes; 01-17-2021 at 11:09 PM.
6xes is offline   Reply With Quote
Old 01-18-2021, 02:30 AM   #3
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,937
Default

We probably missed the request, since some folks There are two methods you can pull that off right now. None of them are without a learning curve.

First is to use CSI for your midi controller. That of course locks it off from other methods of using it, i.e. as a source for control input (Prefs / Midi Devices) and as a control surface (Prefs / Control/OSC/Web).

For example, I do this exact thing with one of my buttons, but only for a specific parameter on a compressor I use. I step between different values.

CSI uses two parts. A text file to describe what the unit sends and expects back in terms of feedback("WhateverItsName.mst" for example), and a text file to describe what to do with these resources(a directory with any number of *.zon files).

In this case here are the two relavant lines from my example setup.

The .mst file contains these lines for this particular function.
Code:
Widget EncBtnA1
Press 91 00 7F
WidgetEnd
The Zone file contains this
Code:
EncBtnA1   FXParam 0  [ 0.0 0.14285715 0.2857143 0.42857143 0.5714286 0.71428573 0.85714287 1.0 ]
Widget describes the start of every new entry for a control resource in the .mst file. WidgetEnd is the end of every such entry.

Press describes a single midi message coming in. You can find out what that message is for your controller by using either the CSI actions for making these visible (type CSI in the action list to find them and get a console window that displays these messages), or you use a midi monitoring application like MidiOX (free). Be aware that only one application can use a midi port at one time in Windows, so only use either Reaper or a midi monitor.

The numbers in the square bracket are the various values you will step through with every press of your button.

You can find out what values you'd like to step through by creating a Reaper session and creating an envelope for that parameter with all the values you'd like it to have. Then load that Reaper session in to a text editor, find the section for the envelope and copy down those values.


The second method I can come up with is using a Lua script (or EEL if you wish). You'll get plenty of help for that in the forum section for scripting.
__________________
(Video)Using Latch Preview - Faderport16 CSI config
Airon Audio Dia/FX Edit&Mix
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 01-18-2021, 08:06 AM   #4
woodnut
Human being with feelings
 
Join Date: Feb 2018
Posts: 11
Default

Thanks for the replies. I've got a copy of the demo of midi translator and will see how that goes.

Thanks for detailing the CSI option, I think this is a bit too far over my head at this moment.

I might try reposting on the script side of the Forum. I'm hoping that there might be a script already for this, it seems like something that would be useful. Maybe there is a script already that is similar that can be easily modified.
woodnut is offline   Reply With Quote
Old Yesterday, 03:47 AM   #5
woodnut
Human being with feelings
 
Join Date: Feb 2018
Posts: 11
Default

I decided it was time to have a look at Reascript so I had a read through a few of the tutorials and looked at some of the existing scripts that take midi data and manipulate it.

I actually got further than expected considering it was my first attempt and of course quite confusing for someone creating script for the first time.

Here is what I have so far : -
woodnut is offline   Reply With Quote
Old Yesterday, 03:48 AM   #6
woodnut
Human being with feelings
 
Join Date: Feb 2018
Posts: 11
Default

desc:Midi controller button input manipulated to allow For menu cycling through a number of user defined menu options

slider1:1<1,128,1>Number of Menu Choices
slider2:1<0,127,1{0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61, 62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113, 114,115,116,117,118,119,120,121,122,123,124,125,12 6,127}>Controller Source

in_pin:left input
in_pin:right input
out_pin:left output
out_pin:right output

@init

@slider
Choices = slider1;
CCSource = slider2;
Jumps=128/choices;
Position = Jumps * 1;
Stop = 128 - Jumps;

@block
while (
midirecv(mpos, msg1, msg2, msg3) ? (
InSource = (msg2);
(InSource == CCSource) ? (
msg1 = 0xB0;
msg2 = CCSource;
msg3 = Position;
midisend(0, msg1, msg2, msg3);

while (
Position >= Stop ?(
Position = 0 - 1 * Jumps;
);
Position = Position + Jumps;
end;
);


);
midisend(mpos, msg1, msg2, msg3);
);

);



@sample
woodnut is offline   Reply With Quote
Old Yesterday, 03:55 AM   #7
woodnut
Human being with feelings
 
Join Date: Feb 2018
Posts: 11
Default

I am under no illusion as to the fact that there will be a much more elegant way of doing this and there are probably some glaring errors in there, but so far it does seem to do what I want with some brief testing. I choose the number of menu items I want my button to scroll through and it divides the 0 to 127 range over that number of steps with each trigger from the midi button stepping through and back to the start of the calculated jumps between steps.

It is sending a duplicate midi message when triggered by the CC that it is set to respond to which I couldn't seem to correct. I need to test it further to check that it is passing other midi messages correctly without filtering or modifying these. It seemed to be passing them OK but I need to test further.
woodnut is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.