Go Back   Cockos Incorporated Forums > REAPER Forums > MIDI Hardware, Control Surfaces, and OSC

Reply
 
Thread Tools Display Modes
Old 08-06-2019, 04:45 AM   #1
xmioimx
Human being with feelings
 
Join Date: Aug 2019
Posts: 2
Default Arduino MIDI footswitch, Reaper and TH-U. Newbie question

Hi guys,

Starting a project to build a footswitch pedalboard based on Arduino to control TH-U in Reaper. It's my first Arduino project so I am learning everything (Arduino/MIDI) from zero. So far I've managed to send MIDI signals to the PC, now working on Reaper and TH-U to read them.

I am still thinking on how I would like it to work, and one feature that would be amazing is to have leds that will show the status of the effects when a patch is selected, or even change when using automation. Dual-colored leds would be a killer. Off if a footswitch is not assigned, green if assigned but off, red if assigned and on

The question is: is it even possible to 'read' the status of the effects/parameters on TH-U?

Cheers
xmioimx is offline   Reply With Quote
Old 08-06-2019, 06:18 AM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Welcome to the Reaper forums !

What is TH-U ?

Regarding a Midi device, the most common way to deal with status of a switch and an assiciated LED is to send a dedicated CC # with value 0 = off and 127 = on, and have the switch set and internal state mirrored to the LED accordingly when moved. When Receiving that CC # with < 64 set the internal state and the LED to off, and with >=64 to on.

A foot switch might be done so that it toggles the state with a push.

-Michael

Last edited by mschnell; 08-06-2019 at 06:24 AM.
mschnell is offline   Reply With Quote
Old 08-06-2019, 07:20 AM   #3
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by mschnell View Post

What is TH-U ?
http://letmegooglethat.com/?q=TH-U

The OP is asking how they can get status of a VST from reaper so they can then change LED status on the device.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 08-06-2019, 08:17 AM   #4
xmioimx
Human being with feelings
 
Join Date: Aug 2019
Posts: 2
Default

Quote:
Originally Posted by mschnell View Post
Welcome to the Reaper forums !
Thank you!


Quote:
Originally Posted by mschnell View Post
What is TH-U ?
As karbomusic replied, is a VST. Sorry for not explaining better.


Quote:
Originally Posted by karbomusic View Post

The OP is asking how they can get status of a VST from reaper so they can then change LED status on the device.
Exactly!

TH-U is a Amps and Pedals VST modeler which contains presets with different pedals and amps, so when a preset is selected you can enable/disable pedals (and other settings too)

With the pedalboard I am currently able to send MIDI signals to TH-U (through Reaper) to cycle through the presets and to change the pedals status. So far so good.

However, I am asking if there is any way to get the status of the pedals (and other stuff) when a preset is selected, so I can use the leds in the pedalboard to be off if the switch is not in use (not allocated to any gear in the preset), one color if is in the preset but os currently off, another color when one.

Most presets will have by default some of the pedals on or off.

I can think on some ways to get this, however, I have no clue if they are real options or just sci-fi in my mind:

1. The status of every "thing that can be assigned to MIDI" in TH-U is being somehow broadcasted, so I just have to listen to the right thing.
2. Status can be called/requested, so I can cycle through all these "things that can be assigned to MIDI" and use the info to change the leds
3. I could store somewhere the list of items to switch on/off for each preset so when the preset is called, the pedalboard will configure the pedals in the preset. This is the option to avoid as I don't want to change the arduinos' code each time I tweak a preset in TH-U
4. Forget about this and just build the pedalboard without leds (easy but boring)
5. ...?

I have no clue about MIDI or how Reaper deals with MIDI devices, but I am happy to learn if this is something feasible. If the communication between the pedalboard and TH-U/Reaper is one way only, I will make a very basic pedalboard, no leds and play more guitar.

Thanks a lot for your help, guys!
xmioimx is offline   Reply With Quote
Old 08-06-2019, 09:04 AM   #5
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

This could probably be achieved with the Control Surface Integration project if you want to use MIDI. As far as I know (tested this) the FX parameters are not available through the Mackie Control Universal (MCU) MIDI protocol interface, I currently use a Mac so I don't know if there're Reaper extension for windows that expose FX parameters over MIDI.
I'm working on OSC controllers ( Teensy based OSC controller for Reaper ) and it would certainly be possible to achieve what you have in mind and more with OSC.
As you already have an Arduino at hand it might be best to explore if the CSI approach can do what you want. Get a MIDI monitor program like MIDI-OX for Windows or MIDI monitor if you're on Mac so you can see what's going on.
Gerrit is offline   Reply With Quote
Old 08-06-2019, 02:28 PM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

With my "Live" patch project (see the "Live" subforum) I do something like this in that way:

I did a bunch of JSFXes that store the states of the VST(s)

I never touch the VSTs' GUI but control them via the JSFXes.
Hence the JSFXes always know the state.

The JSFXes listen to buttons (and knobs and faders) of the control surface device.
When a message comes in from the control surface, the JSFXes change the internals state and send a CC to the VST to have it change it's state.

For a full patch change, the JSFXes send CCs to the VSTs and to the control surface device to keep the Button Lights (and Motor Faders and Rotary Rings) and the VST parameters in sync.

This obviously works for VSTs that can't send out a state via Midi.

Reaper always does know the state of the VST parameters, hence the "CSI" Reaper extension can "read" VST states via the Reaper API.

-Michael

Last edited by mschnell; 08-07-2019 at 04:30 AM.
mschnell is offline   Reply With Quote
Old 08-07-2019, 12:30 AM   #7
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default

I do not have TH-U, but I guess it has features of TH3.

I do not know how to "3 state" the indication, I mean TH3 is not updating slots names nor change the number of parameters when something is added/removed. But "On/Off" LED can be controlled.

TH3 has 2 sets of automatable parameters. For your purpose more interesting are "Slots". In any preset you can assign particular parameter to one of 16 slots. That way what is controlled by particular slot will be automatically switched on preset switch.

You also need something to convert MIDI into slot and send current value for slot as MIDI. Fortunately there is ReaLearn from Helgoboss which does exactly that.

On the hardware side, just put LEDs on the same MIDI message as you send from corresponding button.
azslow3 is offline   Reply With Quote
Old 08-10-2019, 06:40 PM   #8
SoutherlyBuster
Human being with feelings
 
Join Date: Jan 2018
Posts: 23
Default

The only time midi controller values are available is when their state changes, so you need a portion of your Reaper code to sense when that happens and store what happened. Then the other part of your code that updates the LEDs can scan that “store” to update the LEDs. In the real time effects of Reaper, you can create your own, I have done this for a similar project to yours, I have an Amp simulator hardware, Line6 POD which has a midi out and midi in. There is a portion of the Reaper script, I used EEL2, which gets called every time a midi signal comes your way, another every time you wiggle a slider. You will have to learn how to decode midi, just log what is happening for when you know what you sent to reverse engineer, also the midi associaton (think they call it that) which documents all the commands. You will also have to do some bit manipulations, all part of the fun. Keep it simple at first, some web sites explaining midi go in deep too quickly and blows yout mind, KISS (keep it simple stupid ).
SoutherlyBuster is offline   Reply With Quote
Old 08-10-2019, 10:09 PM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by karbomusic View Post
The OP is asking how they can get status of a VST from reaper so they can then change LED status on the device.

Supposedly he can
  • place an instance of ReaControlMidi at the end of the FX chain that holds the plugin
  • Enable the 5 Midi link parameters in ReaControl in RAW mode
  • define a parameter Link between the appropriate parameter of the plugin and the appropriate parameter of ReaControl Midi by
    ReaControlMidi -> [Param] -> FX Parameter List / Midi Link -> one of 4th..8th Parameter -> check [x] Link from Midi or FX Parameter -> The Plugin -> appropriate parameter.
  • in ReaComntrolMidi set the CC# of the appropriate of the five parameters as appropriate for the Control Surface device.
Now ReaControlMidi will output an appropriate Midi CC with any change of the parameter of the plugin. So he can
  • route the Midi output of that track in a way that it will reach the control surface.
-Michael
mschnell 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 08:51 AM.


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