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

Reply
 
Thread Tools Display Modes
Old 09-29-2022, 01:18 PM   #2601
Tije401
Human being with feelings
 
Join Date: Jan 2008
Posts: 16
Default

Quote:
Originally Posted by helgoboss View Post
Nice, that means you are ready for the next step.

So you need 2 instances. One that has "Auto-load" enabled and is solely responsible for taking care of the currently focused FX - you have that one already. And a second instance that you use for controlling everything else, with the same "Control input" and "Feedback output". Then you simply make the first (auto-load instance) "superior" by right-clicking ReaLearn's header panel and choosing "Make superior" in the options.
Ah thank you, I read a lot of post, and somehow I missed this one. Thanks!
Tije401 is offline   Reply With Quote
Old 09-29-2022, 05:39 PM   #2602
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by Bassman002 View Post
What I'm seeing so far that switching from a FX(Focus) to Normal Parameter (FX not in focus) as Volume does need a few seconds sometimes to work, is this normal?
This doesn't seem to be normal. Granted, it has been a while since I used "Make superior" because I use ReaLearn more as a live-performance tool than a control surface tool. Need to check again.

Quote:
Originally Posted by Bassman002 View Post

Would be very nice if we can make this work

https://youtu.be/pYDI19oqIOE
Just checked your "Moving Problem.lua" and it works here (doesn't stop working). I used the fader of the X-Touch One as source (which sends pitch-bend messages, those are 14-bit). And also tried a normal 7-bit knob. I have no idea why it should stop working suddenly.

The only thing I realized, at least with the "Move edit cursor to start of current/next measure" actions, is that you don't consistently end up at the same measure when swiping the knob/fader fast.

Oh, and by the way, you could also use the "Seek" target, which has some nice options. But it works in terms of percentages relative to e.g. project length or view width, not measures.
helgoboss is offline   Reply With Quote
Old 09-29-2022, 05:45 PM   #2603
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Released ReaLearn 2.14.0-pre.5 (ReaPack installation instructions)

Changes:
- #45 Added option to respect/ignore track grouping to supported track targets
- #45 Added option to enable/disable selection ganging to supported track targets
- #691 Added target control information to mapping panel (Very useful to understand what's going on! For real-time-MIDI-controlled mappings, this only works if target control logging is enabled.)
- #692 Improved target-based conditional activation by listening to target activation/deactivation as well
- #695 Improved usability by marking targets that support MIDI real-time control (because MIDI real-time control has a few restrictions)
- #696 Fixed bug that caused retriggerable targets to not be retriggered with relative control if they already had the desired value

Some of you were asking for some of these changes. Please give feedback if possible!

Pretty excited about the target control information thing. We had "Log target control" already but that's more verbose. Now, it should be much easier to see what actually goes on in a ReaLearn mapping because you instantly see how the message has been handled, right in the mapping panel.
helgoboss is offline   Reply With Quote
Old 09-30-2022, 02:08 AM   #2604
Bassman002
Human being with feelings
 
Join Date: Aug 2022
Posts: 79
Default

Quote:
Originally Posted by helgoboss View Post
This doesn't seem to be normal. Granted, it has been a while since I used "Make superior" because I use ReaLearn more as a live-performance tool than a control surface tool. Need to check again.

Just checked your "Moving Problem.lua" and it works here (doesn't stop working). I used the fader of the X-Touch One as source (which sends pitch-bend messages, those are 14-bit). And also tried a normal 7-bit knob. I have no idea why it should stop working suddenly.
Tested again and with just forward it doesn't stop working, with both directions works 3-4 times then stop.

Logging gives "Leave target untouched" as soon it stopps working, before it logs values.

Attached a JPG, perhaps this helps...?

Bassman.

EDIT: Uploaded a video from the logging window, it's reproducable! First it works, then it stopps working backwards, works just forward, then it stop working in both directions. You can see this in the video:

https://youtu.be/5ATCh_xTaGY
Attached Images
File Type: jpg Moving Problem.jpg (103.3 KB, 23 views)

Last edited by Bassman002; 09-30-2022 at 02:26 AM.
Bassman002 is online now   Reply With Quote
Old 09-30-2022, 03:49 AM   #2605
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by Bassman002 View Post
Tested again and with just forward it doesn't stop working, with both directions works 3-4 times then stop.

Logging gives "Leave target untouched" as soon it stopps working, before it logs values.

Attached a JPG, perhaps this helps...?

Bassman.

EDIT: Uploaded a video from the logging window, it's reproducable! First it works, then it stopps working backwards, works just forward, then it stop working in both directions. You can see this in the video:

https://youtu.be/5ATCh_xTaGY
What version of ReaLearn do you use? I think I added this in one of the 2.14.0 pre-releases. Also, your mappings have different names than the ones you sent me in the Lua Export. Anything could be different.

UPDATE: It could even be that this is the symptom of a bug that I fixed in 2.14.0-pre.5. The bug was that relative control wouldn't invoke the target if it already has a certain value EVEN for trigger-like targets. Try it with that version, too!

Last edited by helgoboss; 09-30-2022 at 04:03 AM.
helgoboss is offline   Reply With Quote
Old 09-30-2022, 04:26 AM   #2606
Bassman002
Human being with feelings
 
Join Date: Aug 2022
Posts: 79
Default

HI

Quote:
Originally Posted by helgoboss View Post
What version of ReaLearn do you use? I think I added this in one of the 2.14.0 pre-releases. Also, your mappings have different names than the ones you sent me in the Lua Export. Anything could be different.

UPDATE: It could even be that this is the symptom of a bug that I fixed in 2.14.0-pre.5. The bug was that relative control wouldn't invoke the target if it already has a certain value EVEN for trigger-like targets. Try it with that version, too!
I had Version 2.13, now activated Pre-Releases, installed 2.14 PRE 5 and:

It works now

Perfect!!

Thank you, I'll donate some Euro

Bassman.
Bassman002 is online now   Reply With Quote
Old 09-30-2022, 11:31 AM   #2607
Bassman002
Human being with feelings
 
Join Date: Aug 2022
Posts: 79
Default

Hi

Quote:
Originally Posted by 7enz View Post
heres a video i did how i use dynamic mode, everyones use case is different but there is some useful stuff in it

https://www.youtube.com/watch?v=NxHvAkIcbPU
Where can I get those scripts or custom actions to hide the tracks to control
Just the visible ones?

That is very useful!
Thank you
Bassman
Bassman002 is online now   Reply With Quote
Old 09-30-2022, 12:45 PM   #2608
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by Bassman002 View Post
Hi



Where can I get those scripts or custom actions to hide the tracks to control
Just the visible ones?

That is very useful!
Thank you
Bassman
This sounds like something that should be implemented in ReaLearn, otherwise it's going to be very clunky. I just had a look if there's a feature request covering this already and it seems there is: https://github.com/helgoboss/realearn/issues/529

Please vote for this if it is what you want, comment on it and so on.
helgoboss is offline   Reply With Quote
Old 09-30-2022, 05:01 PM   #2609
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

Quote:
Originally Posted by Bassman002 View Post
Hi



Where can I get those scripts or custom actions to hide the tracks to control
Just the visible ones?

That is very useful!
Thank you
Bassman
you need only the sws extensions.. its pretty straightforward
these custom actions rely on tracks to be muted to then hide them...and im then using Realearn's dynamic mode afterward

---This updates tracks & hides muted track
Custom: PDP: hide tracks (select the next track& then select unhide script)
SWS: Select unmuted tracks
SWS: Show selected track(s) in TCP and MCP
SWS: Hide unselected track(s)

---This updates tracks but keeps muted tracks in view (care needs to be taken when using this)
Custom: PDP update tracks
SWS: Select unmuted tracks
SWS: Show selected track(s) in TCP and MCP
Track: Select all tracks

---This reverts back to all tracks
Custom: PDP: Unhide tracks and scroll selected track into view
SWS: Show all tracks
Track: Vertical scroll selected tracks into view

Last edited by 7enz; 09-30-2022 at 05:13 PM.
7enz is offline   Reply With Quote
Old 09-30-2022, 05:53 PM   #2610
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

heres a video of the implementation of those custom actions..
in conjunction with Realearn & SWS snapshots which helps with saving&recalling volume/mute/hardware send states....

however having the SWS snapshot FX ticked would introduce the problem of FXplugins loading and unloading.. which causes delayed update issues...

So how i got around this ... was routing audio into another project where all the FXplugins reside and the states of the FX can then be changed using SWS-snapshots but only if the FEX-Project is focused!! this allows for better control, and faster updates of the custom actions
The setup of the FX-Hardware-out switches are shown in the dynamic mode video earlier in this thread
The setup of loopback audio routing is explained briefly here https://forum.cockos.com/showpost.ph...8&postcount=10

https://www.youtube.com/watch?v=otkcMh8V1p4

Last edited by 7enz; 09-30-2022 at 08:12 PM.
7enz is offline   Reply With Quote
Old 10-01-2022, 06:17 AM   #2611
Bassman002
Human being with feelings
 
Join Date: Aug 2022
Posts: 79
Default

Hi

@7enz

Quote:
Originally Posted by 7enz View Post
heres a video of the implementation of those custom actions..
in conjunction with Realearn & SWS snapshots which helps with saving&recalling volume/mute/hardware send states....

however having the SWS snapshot FX ticked would introduce the problem of FXplugins loading and unloading.. which causes delayed update issues...

So how i got around this ... was routing audio into another project where all the FXplugins reside and the states of the FX can then be changed using SWS-snapshots but only if the FEX-Project is focused!! this allows for better control, and faster updates of the custom actions
The setup of the FX-Hardware-out switches are shown in the dynamic mode video earlier in this thread
The setup of loopback audio routing is explained briefly here https://forum.cockos.com/showpost.ph...8&postcount=10

https://www.youtube.com/watch?v=otkcMh8V1p4
Thank you a lot, I'll try a few things out, but if helgoboss could implement this "control only unhidden tracks", this would be very nice.

Bassman.
Bassman002 is online now   Reply With Quote
Old 10-01-2022, 08:16 AM   #2612
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 6,900
Default

is there a preset for Launch Control XL?
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 10-01-2022, 09:22 AM   #2613
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by EpicSounds View Post
is there a preset for Launch Control XL?
One user recently contributed a controller preset for Launch Control XL mk2. I will try fo put it into the list of inofficial presets tomorrow.

Please note that controller presets are like MST files in CSI, so they just describe the controller. You still need to create some main mappings to actually make something happen. Not sure now if the Launch Control XL is something like a DAW controller that partially resembles something like a typical Mackie controller. In that case, it would be reasonable to build the controller preset in a way so its virtual control names (= widget IDs in CSI) conform to ReaLearn's DAW control domain. Then it would instantly work with the "DAW control" main preset, which implements a typical DAW control scenario.
helgoboss is offline   Reply With Quote
Old 10-01-2022, 03:31 PM   #2614
Bassman002
Human being with feelings
 
Join Date: Aug 2022
Posts: 79
Default

Hi

Quote:
Originally Posted by EpicSounds View Post
is there a preset for Launch Control XL?
Not finished yet, but I can upload it as it is....

Greetz,
>Bassman.
Bassman002 is online now   Reply With Quote
Old 10-01-2022, 04:52 PM   #2615
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 6,900
Default

Quote:
Originally Posted by helgoboss View Post
One user recently contributed a controller preset for Launch Control XL mk2. I will try fo put it into the list of inofficial presets tomorrow.
there are lots of ways to use the controller, and actually I just learned there is a HUI emulation added in a firmware. Trying that next

DrivenByMoss has a decent mapping made, with the mute, solo, and record arm buttons on the side changing the functions of the bottom row of 8 buttons. Not sure if that is something that can be done with ReaLearn.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 10-01-2022, 06:10 PM   #2616
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 1,741
Default Controlling ReaLearn programatically

Hi helgoboss!

ReaLearn is so amazing and powerful. Thank you so much.

Currently I'm setting up a workaround to enable a missing routing feature in Reaper and have a basic architecture working great with an instance of ReaLearn containing 2 basic Mappings. This routing feature is a per-track thing, so each track needs its own 2 Mappings.

I would like to create a ReaScript to allow quick creation/alteration of a new track with the desired routing built in in a single action, without the user having to create or edit any ReaLearn Mappings. Is there a way programmatically to trigger ReaLearn to duplicate Mappings (1 & 2) and change the new Mappings's source MIDI channels?

I have scoured the manual and this thread looking for whether controlling ReaLearn itself this can be done via track automation, MIDI CCs, sysex, OSC, etc... but haven't figured it out on my own.
__________________
My ReaScripts: Superglue: Reversible, nondestructive glue and nesting pooled audio for Reaper |||||| Buss Driver: Bulk add/remove track routing GUI tool |||||| Fold Source: Advanced take-source handling |||||| Various Utilities |||||| My ReaPack repo
MonkeyBars is offline   Reply With Quote
Old 10-02-2022, 01:31 AM   #2617
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

Hi Helgoboss,
im not sure if this has been requested... or if its already implemented& i havent seen it.

it would just give added navigational functionality

cursor up & cursor down and a enter key or keys that one would navigate with(Tab)
very useful
when utilising a rotary encoder with a button function on it(with navigation of presets/menus/reascripts or anything that would essentially use those keys)

i already have this option available to me, having purchased Bomes Midi Translator Pro a couple of years ago.
and while i can understand the thought(Just use a keyboard!!)
it doesnt take away the value of having them mapped on a encoder.

On another note... Regarding ReaperTrackcolor mirroring LED
the triggering of the appropriate LED's is easily achieved, however

i still havent figured out how Realearn interprets the Trackcolors in reaper, or whether your mention of it not being implemented still remains.

ill keep blindly trying things(examples) til it works LOL.. or ill venture down the reascript pathway
7enz is offline   Reply With Quote
Old 10-02-2022, 02:30 AM   #2618
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by EpicSounds View Post
there are lots of ways to use the controller, and actually I just learned there is a HUI emulation added in a firmware. Trying that next

DrivenByMoss has a decent mapping made, with the mute, solo, and record arm buttons on the side changing the functions of the bottom row of 8 buttons. Not sure if that is something that can be done with ReaLearn.
Definitely can be done and is one of its more basic features. So how do you want it to work?

a) Bank-like

Example: You press the mute button and then the bottom row of buttons mutes/unmutes tracks, you press the arm button and from this point on the bottom row arm/disarms tracks.


b) Modifier-like

Example: You press the mute button and as long as you have it pressed (toggle also possible), the button row of buttons mutes/unmutes tracks and so on ...


BTW, for usage with ReaLearn, it's probably best to put the device into some generic MIDI mode or MCU mode.
helgoboss is offline   Reply With Quote
Old 10-02-2022, 02:47 AM   #2619
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by MonkeyBars View Post
Hi helgoboss!

ReaLearn is so amazing and powerful. Thank you so much.

Currently I'm setting up a workaround to enable a missing routing feature in Reaper and have a basic architecture working great with an instance of ReaLearn containing 2 basic Mappings. This routing feature is a per-track thing, so each track needs its own 2 Mappings.

I would like to create a ReaScript to allow quick creation/alteration of a new track with the desired routing built in in a single action, without the user having to create or edit any ReaLearn Mappings. Is there a way programmatically to trigger ReaLearn to duplicate Mappings (1 & 2) and change the new Mappings's source MIDI channels?

I have scoured the manual and this thread looking for whether controlling ReaLearn itself this can be done via track automation, MIDI CCs, sysex, OSC, etc... but haven't figured it out on my own.
Currently, ReaLearn doesn't offer any ReaScript functions to manage it in such a fine-grained fashion (there's an FR for that: https://github.com/helgoboss/realearn/issues/655). The only thing you can do from ReaScript is to set all settings of a ReaLearn instance at once.

But chances are you don't need that. There are several ways to make ReaLearn work on tracks that have not existed before. Maybe one is suitable for your use case:

1. Create mappings in advance, targeting not-yet-existing tracks

Those mappings will remain inactive as long as the track doesn't exist and become active once it exists.

2. Use one ReaLearn instance per track

You could use a ReaScript or a track template to put a ReaLearn instance on every new track with its control input set to <FX input>. Then it receives whatever MIDI the track receives (if it's armed and input monitoring is on).

3. Use conditional activation

You could prepare all kinds of mappings in advance, such as in variant 1. And then let ReaLearn activate/deactivate them depending on arbitrary conditions - this could be the existence of a track, the focus of a plug-in, the volume of a send, the value of a ReaLearn parameter ... almost anything.

If you still think you need the FR, please comment on it stating what you need exactly.
helgoboss is offline   Reply With Quote
Old 10-02-2022, 03:00 AM   #2620
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by 7enz View Post
Hi Helgoboss,
im not sure if this has been requested... or if its already implemented& i havent seen it.

it would just give added navigational functionality

cursor up & cursor down and a enter key or keys that one would navigate with(Tab)
very useful
when utilising a rotary encoder with a button function on it(with navigation of presets/menus/reascripts or anything that would essentially use those keys)

i already have this option available to me, having purchased Bomes Midi Translator Pro a couple of years ago.
and while i can understand the thought(Just use a keyboard!!)
it doesnt take away the value of having them mapped on a encoder.
It's implemented already. Set mode to "Incremental button".

Quote:
Originally Posted by 7enz View Post
On another note... Regarding ReaperTrackcolor mirroring LED
the triggering of the appropriate LED's is easily achieved, however

i still havent figured out how Realearn interprets the Trackcolors in reaper, or whether your mention of it not being implemented still remains.

ill keep blindly trying things(examples) til it works LOL.. or ill venture down the reascript pathway
It's implemented, you just need to put it to use. I think this is where we left off: https://forum.cockos.com/showpost.ph...postcount=2592

What have you tried so far? If you have managed to let the "MIDI script" source Lua script trigger the appropriate LEDs (independent of the track color), then the most important step has been done. Then the next task for your script would be to convert the RGB color that ReaLearn gives you (documented in the user guide) into the correct sys-ex bytes to be sent - you probably know by now which bytes you need to send, so you just need to build a function (as part of the MIDI script, not ReaScript!) to convert the red/green/blue data to these byte(s).
helgoboss is offline   Reply With Quote
Old 10-02-2022, 08:19 AM   #2621
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 1,741
Default

Thanks HB – neither mappings in advance, ReaLearn on track itself, nor conditional activation will work for this setup, unfortunately.

Quote:
Originally Posted by helgoboss View Post
Currently, ReaLearn doesn't offer any ReaScript functions to manage it in such a fine-grained fashion (there's an FR for that: https://github.com/helgoboss/realearn/issues/655). The only thing you can do from ReaScript is to set all settings of a ReaLearn instance at once.
Setting all of the settings at once could work! I can just load a new instance of ReaLearn on the control track for every new track added to the routing setup.

However, I looked around the manual and didn't see how this could be done. What is the method of setting all the settings of a ReaLearn instance at once via ReaScript (LUA)? I tried outputting all the ReaLearn instance's params via TrackFX_GetParamNormalized() and they're all value nil.
__________________
My ReaScripts: Superglue: Reversible, nondestructive glue and nesting pooled audio for Reaper |||||| Buss Driver: Bulk add/remove track routing GUI tool |||||| Fold Source: Advanced take-source handling |||||| Various Utilities |||||| My ReaPack repo

Last edited by MonkeyBars; 10-02-2022 at 09:15 AM.
MonkeyBars is offline   Reply With Quote
Old 10-02-2022, 09:11 AM   #2622
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by MonkeyBars View Post
Thanks HB – neither mappings in advance, ReaLearn on track itself, nor conditional activation will work for this setup, unfortunately.



Setting all of the settings at once could work! I can just load a new instance of ReaLearn on the control track for every new track added to the routing setup.

However, I looked around the manual and didn't see how this could be done. What is the method of setting all the settings of a ReaLearn instance at once via ReaScript (LUA)? ReaLearn's parameters are p1-p100 for each Main and Controller . . . how does that relate to the settings in the plugin?
Look for the string "set-state" in the user guide.
helgoboss is offline   Reply With Quote
Old 10-02-2022, 09:27 AM   #2623
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 1,741
Default

Quote:
Originally Posted by helgoboss View Post
Look for the string "set-state" in the user guide.
Thanks for the tip! The User Guide says "For the programmers and script junkies out there" but the link to the Reaper VST Extension docs is about Extensions, not the ReaScript API.

@jamesd256 asked about accessing these functions via JS_ReaScriptAPI but Julian responded in the negative – so how can ReaScripters send JSON to ReaLearn?
__________________
My ReaScripts: Superglue: Reversible, nondestructive glue and nesting pooled audio for Reaper |||||| Buss Driver: Bulk add/remove track routing GUI tool |||||| Fold Source: Advanced take-source handling |||||| Various Utilities |||||| My ReaPack repo
MonkeyBars is offline   Reply With Quote
Old 10-02-2022, 09:42 AM   #2624
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by MonkeyBars View Post
Thanks for the tip! The User Guide says "For the programmers and script junkies out there" but the link to the Reaper VST Extension docs is about Extensions, not the ReaScript API.

@jamesd256 asked about accessing these functions via JS_ReaScriptAPI but Julian responded in the negative – so how can ReaScripters send JSON to ReaLearn?
Sorry, the link makes it not very obvious as it only talks about the VST plug-in side of handling things. The ReaScript function to access these named parameters is this: TrackFX_SetNamedConfigParm (https://www.reaper.fm/sdk/reascript/...amedConfigParm)

Although I use "set-state" personally only from Rust/C (for integration test purposes), it should work the same way from ReaScript. Let me know if it does. And if you need the ability to set the state using ReaLearn Script (Lua-based) instead of JSON, just comment on the FR. I think I could add that quite easily.
helgoboss is offline   Reply With Quote
Old 10-02-2022, 10:04 AM   #2625
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 1,741
Default

Quote:
Originally Posted by helgoboss View Post
Sorry, the link makes it not very obvious as it only talks about the VST plug-in side of handling things. The ReaScript function to access these named parameters is this: TrackFX_SetNamedConfigParm (https://www.reaper.fm/sdk/reascript/...amedConfigParm)

Although I use "set-state" personally only from Rust/C (for integration test purposes), it should work the same way from ReaScript. Let me know if it does. And if you need the ability to set the state using ReaLearn Script (Lua-based) instead of JSON, just comment on the FR. I think I could add that quite easily.
This is great, thanks for spelling it out a bit! I understand perfectly now. As far as I can tell, this should be possible and not too hard.

I'll vote on the FR as parsing the settings object as LUA will make editing the settings via ReaScript even simpler and more convenient. Great stuff!
__________________
My ReaScripts: Superglue: Reversible, nondestructive glue and nesting pooled audio for Reaper |||||| Buss Driver: Bulk add/remove track routing GUI tool |||||| Fold Source: Advanced take-source handling |||||| Various Utilities |||||| My ReaPack repo
MonkeyBars is offline   Reply With Quote
Old 10-03-2022, 04:51 PM   #2626
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

Quote:
Originally Posted by helgoboss View Post
It's implemented already. Set mode to "Incremental button".



It's implemented, you just need to put it to use. I think this is where we left off: https://forum.cockos.com/showpost.ph...postcount=2592

What have you tried so far? If you have managed to let the "MIDI script" source Lua script trigger the appropriate LEDs (independent of the track color), then the most important step has been done. Then the next task for your script would be to convert the RGB color that ReaLearn gives you (documented in the user guide) into the correct sys-ex bytes to be sent - you probably know by now which bytes you need to send, so you just need to build a function (as part of the MIDI script, not ReaScript!) to convert the red/green/blue data to these byte(s).
i have put this into the script
return {
address = 0x4b,
-- Whatever messages your device needs to set that color.
messages = {
{ 0xf0, 0x02, 0x4b, color.r, color.g, color.b, 0xf7 }
}
}

and replacing the values of color.r etc in an attempt to trigger the LED's
and so far i have had no success..
i honestly dont understand whats taking place from a processing standpoint... or what this small peice of code is supposed to do, as im a complete noob in this area

this aside for the moment..
i should point out what im attemping to achieve.. as a base starting point

im using Realearn's dynamic mode for my mute states they are currently setup (in my loopbased template)
White = not muted (Value 70 in source)
black = muted (Value 0 in Source)
these colours are the indexed values which are native to the Maschine controller (shown in link)

i have introduced a 3rd LED state on the existing dynamic Mute mappings which is responding to the controller as i want it to, whereby when pressing a SEPARATE button mapping(3rd state) it will trigger a 3rd LED state on the controller which is already working based on the settings shown in the picture

(ReaperTrack colours(3rd state) will help with monitoring where my loopsamples are positioned on the controller as Trackpositions change often when i dynamically mute &begin updating and changing tracks in&out of view in my particular setup(shown in a previous video), so becos of the tracks position changing(note: they also switch positions across the two maschine Jams i utilise,
a method of tracking the assigned ReaperTrackColors makes good sense, and will be very helpful
(reapertrack: red = drums loop, yellow = Arps loop, Green = bass loops etc)
these ReaperTrackcolor's(3rd state) will show up on my 16 assigned mute/unmute LED buttons on the controller as and when needed(gate button)
(once i figure out how to put the script together LOL)

This 3rd state is achieved by setting up 2 midi CC mappings, and simply disabling/enabling the (tagged 3rd state) mapping, it toggles between the last mute state & a 3rd state.
(The SEPARATE button will be the mapping toggle on/off)


the 3rd state mapping will be used as the ReaperTrackcolorState on a as needed basis hence the toggle

https://www.flickr.com/photos/195979...in/dateposted/
https://www.flickr.com/photos/195979...in/dateposted/

https://www.flickr.com/photos/195979...in/dateposted/


going back to what ive tried,
changing values within the return statement, using hex,decimal, text with the given examples you pointed to in the Manual

ive tried inputting a copied Source/target/values to lua from my existing mapping.. but honestly i have no clue what im doing, ho hum

Last edited by 7enz; 10-03-2022 at 09:35 PM.
7enz is offline   Reply With Quote
Old 10-03-2022, 09:37 PM   #2627
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by 7enz View Post
i have put this into the script
return {
address = 0x4b,
-- Whatever messages your device needs to set that color.
messages = {
{ 0xf0, 0x02, 0x4b, color.r, color.g, color.b, 0xf7 }
}
}

and replacing the values of color.r etc in an attempt to trigger the LED's
and so far i have had no success..
i honestly dont understand whats taking place from a processing standpoint... or what this small peice of code is supposed to do, as im a complete noob in this area
Okay, step by step. You wrote "the triggering of the appropriate LED's is easily achieved". So what sys-ex message did you send to the device to achieve that? And where did you do it? Can you send the exact code? We can't go on tackling this problem without this.

By the way, the problem you have to solve is 100% unrelated to ReaLearn. Even if you would take the ReaScript route, you would have to solve the same riddle there.
helgoboss is offline   Reply With Quote
Old 10-03-2022, 09:47 PM   #2628
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

Quote:
Originally Posted by helgoboss View Post
Okay, step by step. You wrote "the triggering of the appropriate LED's is easily achieved". So what sys-ex message did you send to the device to achieve that? And where did you do it? Can you send the exact code? We can't go on tackling this problem without this.

By the way, the problem you have to solve is 100% unrelated to ReaLearn. Even if you would take the ReaScript route, you would have to solve the same riddle there.
The value to change the LED is simply the midi source value slider between 0-71 (inside of realearn on the source side)
im not using any code to do that...

the slider movement changes color directly as i move it, The indexed maschine values in the previous picture provided are essentially the corresponding LED values for the controller which correspond directly to the midi source value

Last edited by 7enz; 10-03-2022 at 10:12 PM.
7enz is offline   Reply With Quote
Old 10-03-2022, 10:17 PM   #2629
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by 7enz View Post
The value to change the LED is simply the midi source value slider between 0-71 (inside of realearn on the source side)
im not using any code to do that...

the slider movement changes color directly as i move it, The indexed maschine values in the previous picture provided are essentially the corresponding LED values for the controller which correspond directly to the midi source value
Log the slider movement's outgoing MIDI (which changes the LED color) via ReaControlMIDI and paste it here. Also take note which value yields which color.
helgoboss is offline   Reply With Quote
Old 10-03-2022, 10:41 PM   #2630
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

ill put up a video i just have to sort some things first...
i initially tried the reacontrol midi and on first attempt and im not getting any CC messages or sys-ex registering even though the LED's are changing color when moving the source slider... but ill have a little play around with it Reacontrol midi and see if i can get the message to show up
7enz is offline   Reply With Quote
Old 10-03-2022, 11:28 PM   #2631
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

i managed to produce some messages which corresponded to the LED midi changes..
but i was using Reacontrol sliders which was cycling through the LED colors on the controller
as you can see im using channel 8/cc 48 which is a button giving off the LED colors
Attached Files
File Type: txt ReacontrolLOG.txt (5.7 KB, 24 views)

Last edited by 7enz; 10-03-2022 at 11:35 PM.
7enz is offline   Reply With Quote
Old 10-03-2022, 11:33 PM   #2632
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

the changes directly correlate to the Native Maschine Jam indexed values 0-71 shown in the link
https://www.flickr.com/photos/195979...in/dateposted/
7enz is offline   Reply With Quote
Old 10-04-2022, 12:23 AM   #2633
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

@Helgoboss

i did another test with Reacontrol midi.. the NON-RAW values which seem to be slightly different from the first Log
changing the LEDs on the controller as it did when doing the previous test (0 - 71)

these might be the sys-ex values needed? unsure
they are in pairs im gathering

take another look at the 2nd Log
Attached Files
File Type: txt Reacontrol(nonRAW).txt (15.1 KB, 25 views)

Last edited by 7enz; 10-04-2022 at 12:28 AM.
7enz is offline   Reply With Quote
Old 10-04-2022, 12:56 AM   #2634
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

This should make your LED red. Does it?

Code:
return {
    address = 0x4b,
    messages = {
        { 0xB7, 0x30, 0x06 }
    }
}
helgoboss is offline   Reply With Quote
Old 10-04-2022, 01:05 AM   #2635
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

Quote:
Originally Posted by helgoboss View Post
This should make your LED red. Does it?

Code:
return {
    address = 0x4b,
    messages = {
        { 0xB7, 0x30, 0x06 }
    }
}
yes that turned the LED on ch 8 cc 48 RED!!
7enz is offline   Reply With Quote
Old 10-04-2022, 01:34 AM   #2636
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by 7enz View Post
yes that turned the LED on ch 8 cc 48 RED!!
The last number determines the color, in this case 0x06 for red. The middle number probably encodes the channel, in this case 0x30 for channel 8. For simplicity, we can just work with channel 8 at the moment, so we focus on the last number only.

Your task is to convert the REAPER color (an RGB color, so it has 3 values r, g and b where each has a value within 0 to 255) to this last number. This task is unrelated to ReaLearn. Hint: The way I would approach this is to create a Lua table where you define the RGB values of each color available on the Maschine Jam, this is your color palette so to say. Then you look for a simple "find closest color" algorithm somewhere in the internet, maybe you can find one which is written even in Lua already. Then you feed this algorithm with the RGB values that ReaLearn/REAPER gives you and the output is the last number.
helgoboss is offline   Reply With Quote
Old 10-04-2022, 01:51 AM   #2637
7enz
Human being with feelings
 
Join Date: Sep 2022
Posts: 123
Default

Helgoboss,
im going to be experimenting with this... and trying to figure out the rest!!
i have a starting point now!
thank you
7enz is offline   Reply With Quote
Old 10-04-2022, 07:42 AM   #2638
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 11,495
Default

Klinke's MCU plugin has a quite nifty feature called 'follow Reaper's FX parameters' (something like that) which auto-maps a bank (of 8) parameters the last touched FX parameter is contained in.
This is often quite useful imo when the FX parameters are exposed somewhat logically.
Like in this example you touch e.g. the Wet slider and the Dry slider next to it is auto-mapped too. (Note I haven't done any predefined mappings here.)

Can this be accomplished with ReaLearn too?
(Currently trying to streamline my workflow and thinking about exclusively using ReaLearn, currently I use it in parallel with Klinke's plugin, mainly because of this feature, that's why I'm asking.)

nofish is offline   Reply With Quote
Old 10-04-2022, 08:55 AM   #2639
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,535
Default

Quote:
Originally Posted by nofish View Post
Klinke's MCU plugin has a quite nifty feature called 'follow Reaper's FX parameters' (something like that) which auto-maps a bank (of 8) parameters the last touched FX parameter is contained in.
This is often quite useful imo when the FX parameters are exposed somewhat logically.
Like in this example you touch e.g. the Wet slider and the Dry slider next to it is auto-mapped too. (Note I haven't done any predefined mappings here.)

Can this be accomplished with ReaLearn too?
(Currently trying to streamline my workflow and thinking about exclusively using ReaLearn, currently I use it in parallel with Klinke's plugin, mainly because of this feature, that's why I'm asking.)

Sounds like a perfect fit for <Dynamic>. I could easily add that (in a more flexible manner) by adding a new FX selector "<Last touched>" and a new variable "last_touched_parameter_index" for the parameter field. Then you could build this by using expressions "last_touched_parameter_index + 1", "last_touched_parameter_inded + 2" and so on.

Open an FR if this makes sense for you.
helgoboss is offline   Reply With Quote
Old 10-04-2022, 11:46 AM   #2640
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 11,495
Default

Quote:
Originally Posted by helgoboss View Post
Sounds like a perfect fit for <Dynamic>. I could easily add that (in a more flexible manner) by adding a new FX selector "<Last touched>" and a new variable "last_touched_parameter_index" for the parameter field. Then you could build this by using expressions "last_touched_parameter_index + 1", "last_touched_parameter_inded + 2" and so on.

Open an FR if this makes sense for you.
Thanks.
Sounds good but is not quite what happens with Klinke's plugin though.
If I did this with your implementation, touching the 'Wet' slider would map it to position 1 iiuc, but here it's mapped to position 4 as seen in the MCU display.
I think Klinke counts the parameters always 'absolute' from the first one in banks of eight and then maps the corresponding bank.
Actually not sure what's better though or if it even makes a big differences in practice (as I can't compare hands-on).
Any thoughts from your side?
nofish 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 03:35 AM.


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