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

Reply
 
Thread Tools Display Modes
Old 10-06-2023, 07:32 AM   #1
lfluccas
Human being with feelings
 
Join Date: Apr 2023
Posts: 7
Default ReaLearn dynamic VST mapping with OSC feedback - sharing my setup

Hello everyone! I’ve had an Arturia Minilab Mk II for a while and it always bothered me that I couldn’t use its knobs as I had imagined when I first bought it. In my head, I would use them all the time because I’ve always wanted to have a tactile, analog-like workflow, but in reality we all know how deep the MIDI mapping rabbit hole goes. So, I spent some time learning how to use ReaLearn and OSC controllers properly and finally achieved the workflow I imagined. Now, I want to share it with you in case anyone wants to give it a try.

Here is a GIF to illustrate how it works:


  • Each one of the 16 knobs on the Mini Lab are dynamically mappable and its mappings change according to what is in focus on the Reaper window.
  • If a plugin is focused, the respective plugin mapping will be loaded using ReaLearn autoload preset function. If there isn’t any plugin window open, it will load a predefined setting for changing the selected track settings. This mapping works as following:
    Code:
    - Knob 1: Track volume
    - Knob 9: Track pan
    - Knobs 2-7: Controls the first ReaEQ on the track chain (if there's any)
    - Knobs 10-15: Controls the first 6 plugin parameters on the TCP/MCP
    - Knobs 8 and 16: Controls the Send 1 and Send 2 volumes, respectively.
  • There are two banks of mappings (A and B) for each plugin, in a total of 32 mappable parameters per plugin. You can change between banks pushing the knob #1.
  • Also, there is a Lock function, that is activated with the knob #9 push. While the lock is active, you can select any track or plugin without changing my mappings until it is released again.
  • To map a new plugin, there is a toolbar button that activates the “Learn Mode”. In this mode, the knobs stop controlling plugin parameters. Instead, if you turn any of them clockwise, the last touched plugin parameter will be associated with it. If you turn it counter-clockwise, the parameter assigned to that knob (if any) will be removed. When you are done with the mapping, save the preset and assign it to the plugin using the ReaLearn preset menu and Global FX to preset link function. Then, click on the toolbar button to disable Learn Mode and use it normally again.
  • To have visual feedback for each mapped parameter and its value, I’m using OSC commands with the sofware OpenStageControl. It can be viewed as a floating window on the desktop screen using the app Fenêtre (Mac only) or on the phone screen accessing via web, directly on the browser.

This setup took me a while to achieve and it's kinda convoluted because it uses cycle actions, ReaLearn, OpenStageControl and Fenêtre but so far it works very well. I didn’t optimize it to be used by anyone else but me but I guess there are other people wanting to achieve something similar, so I’m sharing all my files here so anyone can give it a try.

How to try it

There are two ways of trying this setup. The easiest one is to load all my configuration into a new portable Reaper install. The alternative is to copy each file to your already in use installation and configure it manually. I don't recommend using it in your main Reaper installation because I haven't tested it enough, so I don't know how stable or reliable these settings are. Always remember to make a backup of your settings.

It's important to mention that this setup is designed specifically to use with the Arturia Minilab Mk II, that is the controller I use. Feel free to experiment and adapt it to your own, if you wish. If you are not familiar with ReaLearn and its functions, I suggest you learn and experiment with it first, because this setup uses many different (and advanced) functions, so if anything stops working, you can make your way around it.

Requirements: Arturia Minilab Mk II, Arturia MIDI Control Center, SWS Extensions, ReaPack + ReaLearn (2.1.6.0-pre.1) and OpenStageControl.

Install instructions

In a fresh installation (easiest way)
  1. Download all files
  2. Start a fresh Reaper portable installation and install SWS Extensions, ReaPack and ReaLearn v 2.16-pre1.
  3. Copy the downloaded folder “ReaLearn/Helgoboss” to your Reaper resource path.
  4. Open the Reaper settings window and Import the configuration file “ReaLearn Dynamic Mapping.ReaperConfigZip”.
  5. Import the file “Minilab mk II Settings - Reaper ReaLearn.minilabmk2” in Arturia MIDI Control Center and load it to your controller in any Memory Slot you like.
  6. In Reaper settings > MIDI Devices, set your Arturia Minilab Mk II as the MIDI Device ID #0 and enable it for control.
  7. Set your OpenStageControl IP and port (Type in settings: Send = “127.0.0.1:9000”). Run the server, open the browser and load the “OpenStageControl - Minilab.json” session file. You can also select this file in the "load" field from the Settings to make it always load by default when you launch OpenStageControl.
  8. Restart Reaper. If everything was set correctly, the led on the upper right side of the OpenStageControl interface will turn on. Load a track with ReaEQ, select the "6 Band (ReaLearn)" preset and give it a try.
  9. (Optional) If you are using a Mac, you can download Fenêtre to keep the OpenStageControl interface in a floating window that you can easily show and hide with keyboard shortcuts.

In an existing installation (make sure to backup your settings first!)
  1. Download all files.
  2. Copy the folder “ReaLearn/Helgoboss” to your Reaper resource path (WARNING: It will replace all your ReaLearn settings!)
  3. In the downloaded “Track Template” folder, copy the file “Map Plugin.RTrackTemplate” to your Reaper Resources/TrackTemplates folder.
  4. In the Reaper Resources window, select "Track template" from the dropdown, add 2 slots and load the previous file to slot 2.
  5. In Reaper settings > MIDI Devices, set your Arturia Minilab Mk II as the MIDI Device ID #0 and enable it for MIDI input and control.
  6. In the downloaded “FX chain” folder, copy the file “Input FX - Map Loader.RfxChain” to your Reaper Resources/FXChains folder. Open the monitoring FX window and load this FX chain.
  7. In the downloaded Scripts folder, copy the script “Lokasenna_Select tracks by name - Mapping.lua” to your Reaper Resources/Scripts/Cockos folder. Open the Reaper Actions list window, click on New action > Load ReaScript and select it.
  8. Open the Reaper Cycle Action Editor Window and import to the main section the “Show/hide Mapping Panel.ini” file from the downloaded Cycle Action folder. In this cycle action, replace the “Unknown” action with the action you created in step 3 and click Apply. (WARNING: These settings depend on the Dummy Toggle 6 and 7, make sure it isn't being used anywhere else)
  9. (Optional) If you like, add the cycle action you just imported to a toolbar or give it a keyboard shortcut.
  10. (Optional) If you like to test the mappings I have made, copy the files from the downloaded "ReaLearn/Data/helgoboss/realearn" folder to your Reaper Resources/Data/helogobss/relearn folder. Also, copy the "vst-reaeq.ini" file from the downloaded "presets" folder into your Reaper Resources/presets folder. (WARNING: This will overwrite all your ReaEQ presets!)
  11. Import the file “Minilab mk II Settings - Reaper ReaLearn.minilabmk2" in Arturia MIDI Control Center and load it to your controller in any Memory Slot you like. If you are using other controller, configure your knobs as following:
    Code:
    Channel 4 for all mappings
    Relative #1 mode for all knobs
    CC 102-117 for knobs 1-16, respectively
    Knob 1 Push button: CC 20 (used for switching banks)
    Knob 9 Push button: CC 21 (used to lock the mapping)
  12. Set your OpenStageControl IP and port (Type in settings: Send = “127.0.0.1:9000”). Run the server, open the browser and load the “OpenStageControl - Minilab.json” session file from the downloaded "OpenStageControl Session" folder. You can also select this file in the "load" field from the Settings to make it always load by default when you launch OpenStageControl.
  13. Restart Reaper. If everything was set correctly, the led on the upper right side of the OpenStageControl interface will turn on. Load a track with ReaEQ, select the "6 Band (ReaLearn)" preset and give it a try. If you want to use the EQ section on the default track mapping, set this preset as the default for ReaEQ and save it as the default FX chain for new tracks.
  14. (Optional) If you are using a Mac, you can download Fenêtre to keep the OpenStageControl interface in a floating window that you can easily show and hide with keyboard shortcuts.
  15. Tip: If you want to use this OpenStageControl Session on your phone, I recommend using this argument in the address bar: "https://127.0.0.1?zoom=1.6". Adjust this number to better fit your screen.

Download

[Link]

Disclaimer: I’m not working or changing anything by now to make it more friendly to other controllers and not giving any kind of support because I’m very busy with other things, but I might document (maybe in video) and organize it better in the future.

Let me know what you think and I hope it is helpful. Feel free to improve it and share if you make it better.

Cheers!

Last edited by lfluccas; 10-08-2023 at 07:52 AM.
lfluccas is offline   Reply With Quote
Old 10-06-2023, 11:28 AM   #2
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 385
Default

thanks for sharing this...
i own a arturia minilab mk2... which i havent setup...
but like you i envisioned making use of those encoders , which is the sole reason why i brought the minilab.
i will take a closer look at the OSC aspect of your mappings... to glean from it, how it all interacts with Realearn, as i havent gone down that pathway yet

thank you for sharing your mapping
7enz is offline   Reply With Quote
Old 10-07-2023, 11:29 PM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,776
Default

Sorry for maybe a dumb question:

ReaLeran can do as well USB-Midi as OSC.

I looked up Arturia Minilab Mk II and found it is a Midi controller. No OSC (that usually is handled via Ethernet).

Hence what do you mean by the thread title and "I’m using the OSC protocol through Open Stage Control. It can be viewed as a floating window on the desktop screen using the app Fenêtre (Mac only) or on the phone screen accessing via web, directly on the browser." ?

Last edited by mschnell; 04-02-2024 at 11:46 PM.
mschnell is offline   Reply With Quote
Old 10-08-2023, 07:33 AM   #4
lfluccas
Human being with feelings
 
Join Date: Apr 2023
Posts: 7
Default

Quote:
Originally Posted by mschnell View Post
Sorry for maybe a dumb question:

ReaLeran can do as well USB as OSC.

I looked up Arturia Minilab Mk II and found it is a Midi controller. No OSC (that usually is handled via Ethernet).

Hence what do you mean by the thread title and "I’m using the OSC protocol through Open Stage Control. It can be viewed as a floating window on the desktop screen using the app Fenêtre (Mac only) or on the phone screen accessing via web, directly on the browser." ?
Hello! No problem.

Yes, it's true that the Minilab it's exclusively a MIDI controller. That's why this little window you see in the GIF is controlled with a software called OpenStageControl, that is similar to TouchOSC, but open source and free and that "runs" on your browser. The way this setup works is basically using ReaLearn to recieve MIDI controls from the Minilab and send OSC feedback to a browser window using OpenStageControl. Fenêtre is another sofware, for Mac only that lets you float this browser window in your desktop. It's not necessary buts it makes the overall experience better, in my opinion.

EDIT: I imagine that what caused this confusion is the OpenStageControl name and the OSC acronym. OSC is the protocol and stands for Open Sound Control. OpenStageControl is a software that uses the OSC protocol. I updated the thread text to make it clear, sorry

Last edited by lfluccas; 10-08-2023 at 08:00 AM.
lfluccas is offline   Reply With Quote
Old 10-08-2023, 12:26 PM   #5
kdarkthought
Human being with feelings
 
Join Date: Sep 2023
Posts: 22
Default

This is cool! I don't have a MiniLab but I really dig your setup/workflow. Eager to check out your configurations.

So your Open Stage Control setup here is essentially serving the same role as Projection, but with your custom functionality, right? It's essentially just displaying the current mappings, layout, selected track, etc.?
kdarkthought is offline   Reply With Quote
Old 10-08-2023, 02:06 PM   #6
lfluccas
Human being with feelings
 
Join Date: Apr 2023
Posts: 7
Default

Quote:
Originally Posted by kdarkthought View Post
This is cool! I don't have a MiniLab but I really dig your setup/workflow. Eager to check out your configurations.

So your Open Stage Control setup here is essentially serving the same role as Projection, but with your custom functionality, right? It's essentially just displaying the current mappings, layout, selected track, etc.?
Yes, exactly! I imagine that when the native Realearn projection feature gets an update the OSC part might not be necessary anymore. But until now I couldn't achieve a similar feedback experience with any other tool, which for me was the main missing part of this "dynamic mapping" setup that I know many other scripts can do as well.

Last edited by lfluccas; 10-08-2023 at 02:12 PM.
lfluccas is offline   Reply With Quote
Old 10-09-2023, 05:11 PM   #7
kdarkthought
Human being with feelings
 
Join Date: Sep 2023
Posts: 22
Default

Quote:
Originally Posted by lfluccas View Post
Yes, exactly! I imagine that when the native Realearn projection feature gets an update the OSC part might not be necessary anymore. But until now I couldn't achieve a similar feedback experience with any other tool, which for me was the main missing part of this "dynamic mapping" setup that I know many other scripts can do as well.
Makes sense! Yeah, I know that Helgoboss mentioned he may revisit Projection in the future, but he's focused on Playtime 2 right now. In any case, your OSC tool looks awesome! Eager to give it a try sometime soon.
kdarkthought is offline   Reply With Quote
Old 10-10-2023, 05:37 AM   #8
Fergler
Human being with feelings
 
Fergler's Avatar
 
Join Date: Jan 2014
Posts: 5,220
Default

ReaLearn auto load is amazing
I once got it set up to label my channels and set fader positions on X32, but I ran into some sort of issue with X32 OSC (sending too many commands at once?) and gave up (plus it's bad for the motors).
Thank you for the detailed instructions for others!
Fergler is online now   Reply With Quote
Old 02-14-2024, 04:10 AM   #9
Cloudswim
Human being with feelings
 
Join Date: May 2017
Posts: 372
Default

Quote:
Originally Posted by lfluccas View Post
Hello! No problem.

Yes, it's true that the Minilab it's exclusively a MIDI controller. That's why this little window you see in the GIF is controlled with a software called OpenStageControl, that is similar to TouchOSC, but open source and free and that "runs" on your browser. The way this setup works is basically using ReaLearn to recieve MIDI controls from the Minilab and send OSC feedback to a browser window using OpenStageControl. Fenêtre is another sofware, for Mac only that lets you float this browser window in your desktop. It's not necessary buts it makes the overall experience better, in my opinion.

EDIT: I imagine that what caused this confusion is the OpenStageControl name and the OSC acronym. OSC is the protocol and stands for Open Sound Control. OpenStageControl is a software that uses the OSC protocol. I updated the thread text to make it clear, sorry
Hi Could you explain a little on how the "learn state" works in your mappings?

How are you referencing the OSC OUT A to the MIDI IN A knobs 1 to 16.

I'm in a situation where I need to send feedback to different OSC addresses for the same MIDI Mapping. ie FX NAME / PARAMETER NAME as string & FX Value as Int 0-1. How do I set these two feedback mapping to reference the same MIDI Mapping?

Any help would be greatly appreciated it!
Cloudswim is offline   Reply With Quote
Old 02-16-2024, 07:10 PM   #10
lfluccas
Human being with feelings
 
Join Date: Apr 2023
Posts: 7
Default

Quote:
Originally Posted by Cloudswim View Post
Hi Could you explain a little on how the "learn state" works in your mappings?

How are you referencing the OSC OUT A to the MIDI IN A knobs 1 to 16.

I'm in a situation where I need to send feedback to different OSC addresses for the same MIDI Mapping. ie FX NAME / PARAMETER NAME as string & FX Value as Int 0-1. How do I set these two feedback mapping to reference the same MIDI Mapping?

Any help would be greatly appreciated it!
Yes, that was exactly the problem I was facing when I was trying to achieve this setup.
From what I know, there is no way to send feedback from one target to more than one OSC sources.

The solution I found was to manually create 16 mappings for the numeric values, 16 mappings for the parameter names and 16 mappings for the parameter values, and repeat it once more for the second page (Bank B), all of them with dummy targets. This is the default (blank) mapping inside a ReaLearn instance that is loaded as a hidden track when you press the "Learn" button on the toolbar. Then, in this same track there is another ReaLearn instance called "Learn state". This instance has one mapping per knob that triggers the "ReaLearn Change Mapping" action to map the last touched parameter FX based on which knob you moved. So, for example, when you move the "Cutoff Frequency" in a Synth, and then turn the Knob 1, what happens is all of the targets in the manually created mappings "Label Knob 1", "Value Knob 1", "Numeric Value Knob 1", both MIDI and OSC, are reassigned to this parameter. Then, when you save it as a preset, it can be used with the ReaLearn auto load function. When you are done with the Learn State, as you press the toolbar button again, it deletes the hidden track and gives the main ReaLearn instance on the monitor track (Map loader) normal control of the knobs again. This is the instance responsible for loading all the saved mappings using the auto load function.

So, in practice it's not a fancy solution, but it works well because you can easily map any plugin and save it once, and then every time you open that same plugin all of your mappings are back with the proper feedback, and you can also easily remap them as needed repeating the same process.

I don't know if I made myself clear, I don't really remember exactly the actions and the track names because I can't access my Reaper installation at the moment, but if you take a close look at the mappings it will make more sense.
lfluccas is offline   Reply With Quote
Old 03-17-2024, 03:19 AM   #11
Cloudswim
Human being with feelings
 
Join Date: May 2017
Posts: 372
Default

Quote:
Originally Posted by lfluccas View Post
Yes, that was exactly the problem I was facing when I was trying to achieve this setup.
From what I know, there is no way to send feedback from one target to more than one OSC sources.

The solution I found was to manually create 16 mappings for the numeric values, 16 mappings for the parameter names and 16 mappings for the parameter values, and repeat it once more for the second page (Bank B), all of them with dummy targets. This is the default (blank) mapping inside a ReaLearn instance that is loaded as a hidden track when you press the "Learn" button on the toolbar. Then, in this same track there is another ReaLearn instance called "Learn state". This instance has one mapping per knob that triggers the "ReaLearn Change Mapping" action to map the last touched parameter FX based on which knob you moved. So, for example, when you move the "Cutoff Frequency" in a Synth, and then turn the Knob 1, what happens is all of the targets in the manually created mappings "Label Knob 1", "Value Knob 1", "Numeric Value Knob 1", both MIDI and OSC, are reassigned to this parameter. Then, when you save it as a preset, it can be used with the ReaLearn auto load function. When you are done with the Learn State, as you press the toolbar button again, it deletes the hidden track and gives the main ReaLearn instance on the monitor track (Map loader) normal control of the knobs again. This is the instance responsible for loading all the saved mappings using the auto load function.

So, in practice it's not a fancy solution, but it works well because you can easily map any plugin and save it once, and then every time you open that same plugin all of your mappings are back with the proper feedback, and you can also easily remap them as needed repeating the same process.

I don't know if I made myself clear, I don't really remember exactly the actions and the track names because I can't access my Reaper installation at the moment, but if you take a close look at the mappings it will make more sense.

Hey !!! Thank you so much for the explanation.. i totally missed this hence the late reply! I will look into it when I get the chance. Thanks again :-)
Cloudswim is offline   Reply With Quote
Old 03-25-2024, 06:01 PM   #12
Cloudswim
Human being with feelings
 
Join Date: May 2017
Posts: 372
Default

Quote:
Originally Posted by lfluccas View Post
If you turn it counter-clockwise, the parameter assigned to that knob (if any) will be removed.
Hi could you explain how this works? I couldnt figure it out by looking at your file
Cloudswim is offline   Reply With Quote
Old 04-02-2024, 08:51 AM   #13
lfluccas
Human being with feelings
 
Join Date: Apr 2023
Posts: 7
Default

Quote:
Originally Posted by Cloudswim View Post
Hi could you explain how this works? I couldnt figure it out by looking at your file
Sure! When you activate the "Learn mode", a hidden track called "Mapping" is created and loaded with two ReaLearn instances called "Preset" and "Learn". The first one is a default mapping with no assignments. In the second instance, all of the encoders are mapped to 5 sequential actions to change the "Present" instance.

- The 1st one is "Invoke Reaper action: Skip next action if CC parameter !=0/mid". In this specific case, this action does nothing and serves as a "dummy action". In the glue section, the step size is set to "Decrement only", so it only triggers when you turn the knob counter clockwise.

- The 2nd to 5th one are "ReaLearn: Modify mapping - Set target to last touched", targeting mappings that control the following parameters: Knob 1 MIDI, Knob 1 (OSC), Knob 1 Name (OSC) and Knob 1 Value (OSC), respectively.

It's the same for each of the 16 encoders and once again for bank B. What it does is, when you turn the knob counter clockwise, it replaces the target for each mapped parameter to a dummy action that does nothing. When you turn the knob clockwise, the first action isn't triggered, so it remaps everything to the last parameter you touched, achieving the "Learn" function.

Hope I could explain well. Feel free to ask again if you have any other question, mate
lfluccas is offline   Reply With Quote
Old 04-09-2024, 09:29 PM   #14
Cloudswim
Human being with feelings
 
Join Date: May 2017
Posts: 372
Default

Quote:
Originally Posted by lfluccas View Post
Sure! When you activate the "Learn mode", a hidden track called "Mapping" is created and loaded with two ReaLearn instances called "Preset" and "Learn". The first one is a default mapping with no assignments. In the second instance, all of the encoders are mapped to 5 sequential actions to change the "Present" instance.

- The 1st one is "Invoke Reaper action: Skip next action if CC parameter !=0/mid". In this specific case, this action does nothing and serves as a "dummy action". In the glue section, the step size is set to "Decrement only", so it only triggers when you turn the knob counter clockwise.

- The 2nd to 5th one are "ReaLearn: Modify mapping - Set target to last touched", targeting mappings that control the following parameters: Knob 1 MIDI, Knob 1 (OSC), Knob 1 Name (OSC) and Knob 1 Value (OSC), respectively.

It's the same for each of the 16 encoders and once again for bank B. What it does is, when you turn the knob counter clockwise, it replaces the target for each mapped parameter to a dummy action that does nothing. When you turn the knob clockwise, the first action isn't triggered, so it remaps everything to the last parameter you touched, achieving the "Learn" function.

Hope I could explain well. Feel free to ask again if you have any other question, mate
Ah okay thank you ! so the counter clockwise movement essentially makes the mapping(s) in question learn a dummy action - which does nothing.

I understand now... initially I thought there is a way to set a mapping to Realearn dummy action.. but apparently its not possible?

I tried this method and it works... if I want to remove the previous mapping I just set the mapping in question to - Invoke Reaper action: Skip next action if CC parameter !=0/mid"

Pls let me know if my understanding is correct.
Cloudswim is offline   Reply With Quote
Old Today, 08:17 AM   #15
lfluccas
Human being with feelings
 
Join Date: Apr 2023
Posts: 7
Default

Quote:
Originally Posted by Cloudswim View Post
Ah okay thank you ! so the counter clockwise movement essentially makes the mapping(s) in question learn a dummy action - which does nothing.

I understand now... initially I thought there is a way to set a mapping to Realearn dummy action.. but apparently its not possible?

I tried this method and it works... if I want to remove the previous mapping I just set the mapping in question to - Invoke Reaper action: Skip next action if CC parameter !=0/mid"

Pls let me know if my understanding is correct.
Yes, that's it!

My initial idea was indeed to map it to Realearn's dummy action, but from what I tried it's not possible. But using "Skip next action if CC parameter !=0/mid" seems to work fine.
lfluccas 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 02:19 PM.


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