Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools
Old 01-29-2017, 02:21 AM   #1
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default MPL SendFader - controlling selected track sends

SendFader is a lua script for REAPER.
It provides manipulating selected track sends data.

Installation:
  • install ReaPack extension,
  • restart REAPER
  • go to ActionList -> ReaPack: Browse packages... -> navigate and install SendFader package
  • go to ActionList -> ReaPack: Browse packages... -> navigate and install ReaImGui extension if its not installed/updated yet

Attached Images
File Type: jpg sendfad.jpg (38.8 KB, 659 views)

Last edited by mpl; 01-11-2025 at 12:47 PM.
mpl is offline   Reply With Quote
Old 01-29-2017, 03:00 AM   #2
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,352
Default

Awesome! thanks!

I'll give it a go as soon as possible.

I don't use many sends myself but do a lot of headphone mixes so could be useful for that too.
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-29-2017, 05:19 AM   #3
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,470
Default

you are amazing mpl

I wonder if there would be a way to start the script to open a specific id of send with a specific name as an additional action. it would involve another action to set the name and store it in a projstate or something, and then the new action that opens the script directly to that send. just an idea..

also
I removed a send and I got this
mpl_SendFader.lua:538: attempt to index a nil value (field '?')


awesome work as always!
heda is offline   Reply With Quote
Old 01-29-2017, 05:42 AM   #4
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

Thanks for catch Heda, should be fixed now (hope I didn`t missed other places with checking for existing send data)!

About this
Quote:
I wonder if there would be a way to start the script to open a specific id of send with a specific name as an additional action. it would involve another action to set the name and store it in a projstate or something, and then the new action that opens the script directly to that send
Can you exlplain a little bit? Something like store last opened send ID for track in current project?
mpl is offline   Reply With Quote
Old 01-29-2017, 05:47 AM   #5
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

Amazing !!

Is there any way to implement midi learn with this ?

Thanks for your brilliant work...
J Reverb is offline   Reply With Quote
Old 01-29-2017, 06:08 AM   #6
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

MIDI Learn to what?
Visible send volume?
mpl is offline   Reply With Quote
Old 01-29-2017, 06:52 AM   #7
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

That would be amazing !
Maybe a bit like your mapping panel but for send levels ?
Min/Max value setting would be great too .
J Reverb is offline   Reply With Quote
Old 01-29-2017, 06:54 AM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 10,671
Default

@mpl
very nice to have meters !

Maybe to enhance a bit the usability, it should display track colors in some ways
I am thinking about small rectangle somewhere.

Also, small bugs with GUI unable to redraw correctly if size went down too much.


As we can set our own custom size, wouldn't be possible to have the interface fully flexible while the script is running ?

A part from nice, nice GUI !! Congrats !
X-Raym is offline   Reply With Quote
Old 01-29-2017, 08:04 AM   #9
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,470
Default

Quote:
Originally Posted by mpl View Post
Can you exlplain a little bit? Something like store last opened send ID for track in current project?
I was thinking to open the script to a specific send. Maybe by id. But there is no way to launch a script with parameters. Maybe store a project variable with another script. And if that variable exists then open the script and directly switch to that send id. This way I could put some buttons on my track inspector script for example on each send to open your script for a particular send directly.
Storing last used id would also be good.
heda is offline   Reply With Quote
Old 01-29-2017, 08:29 AM   #10
Bri1
Banned
 
Join Date: Dec 2016
Location: England
Posts: 2,432
Default

Pardon me,but dam your good mpl.
Many credits to your works. just can't get this image out of my head though



1 of the *JSFX Men*
Bri1 is offline   Reply With Quote
Old 01-29-2017, 08:52 AM   #11
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,352
Default

Brilliant! lol
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-29-2017, 08:54 AM   #12
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

I did a little update for you, Hector. I guess GUID and send ID (1-based) is pretty enough for linking with your Track Inspector

Raymond, also did some improvements with indents and gfx.w/gfx.h redraw stuff. Colors come later

J Reverb, ok I thing it is possible to have external scripts for control current send volume and other one for selecting send.

Thanks, guys!
mpl is offline   Reply With Quote
Old 01-29-2017, 09:18 AM   #13
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

Awesome !
Re send control script,
Would that be reflected in the automation lanes for recording purposes ?
I'm sure this will make a lot of people very happy
J Reverb is offline   Reply With Quote
Old 01-29-2017, 11:31 AM   #14
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

External control should works now (hope I didn`t broke something).
mpl is offline   Reply With Quote
Old 01-29-2017, 01:07 PM   #15
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

mpl, this is amazing !!
vanhaze is offline   Reply With Quote
Old 01-29-2017, 01:42 PM   #16
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

Quote:
Originally Posted by mpl View Post
External control should works now (hope I didn`t broke something).
How does one get this to function ? I must be missing something obvious..
J Reverb is offline   Reply With Quote
Old 01-29-2017, 08:45 PM   #17
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

In the main script click 'Remote'. And link you midi/osc control to the script 'SendFader - set volume'.
mpl is offline   Reply With Quote
Old 01-30-2017, 01:06 AM   #18
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Holy Moses. This looks soo good
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 01-30-2017, 03:39 AM   #19
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

Brilliant !

Is it fairly straight forward to implement soft takeover on external control? And finally is there a way of linking that to send automation lane for recording?

That would be the icing on the cake ...

Really great stuff mpl !!
J Reverb is offline   Reply With Quote
Old 01-30-2017, 03:58 AM   #20
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

Track automation - Latch mode
mpl is offline   Reply With Quote
Old 01-30-2017, 05:31 AM   #21
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

Been playing around with Latch mode, it works from the native send fader as expected but not with external control, Not sure if I am missing something here?
Also I have noticed there is an update lag which I think may be to do with the undo queue stacking up, not sure..
J Reverb is offline   Reply With Quote
Old 01-30-2017, 11:28 AM   #22
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

Sorry, J Reverb! Just tested it and yes, for some reason it doesn`t work for Latch mode (WTF, why?). So I guess the only way is to set envelope points directly which is pretty CPU hungry (get/set envelope every defer cycle).

Gurus from here, let me know if I`m wrong and it is just something wrong in the code.
mpl is offline   Reply With Quote
Old 01-30-2017, 05:12 PM   #23
Paul99
Human being with feelings
 
Join Date: Aug 2014
Location: Netherlands
Posts: 882
Default

Sorry for off topic question: mpl how do you get the I/O window open? When I click something else, it always immediately closes.
Paul99 is offline   Reply With Quote
Old 01-30-2017, 08:40 PM   #24
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

Preferences/General/Advanced UI tweaks/Prevent closing routing
mpl is offline   Reply With Quote
Old 01-31-2017, 06:34 AM   #25
Paul99
Human being with feelings
 
Join Date: Aug 2014
Location: Netherlands
Posts: 882
Default

Thank you MPL, but ahhmmm...I feel a bit like a blind old man because I cannot find that option? It's not in that UI tweak window. I also searched for "Prevent closing" and also for "Routing" but no option found in my Reaper v5.32 x64? What am I doing wrong?
Paul99 is offline   Reply With Quote
Old 01-31-2017, 06:58 AM   #26
SoulOne82
Human being with feelings
 
SoulOne82's Avatar
 
Join Date: Sep 2008
Location: Illville - Germany
Posts: 972
Default

Here you go, Paul:

SoulOne82 is offline   Reply With Quote
Old 01-31-2017, 09:52 AM   #27
Paul99
Human being with feelings
 
Join Date: Aug 2014
Location: Netherlands
Posts: 882
Default

Quote:
Originally Posted by SoulOne82 View Post
Here you go, Paul:
OMG.....I really feel old now because I just looked at "prevent closing" in stead of something that would mean the same thing....
Thank you SoulOne82!
Paul99 is offline   Reply With Quote
Old 01-31-2017, 04:06 PM   #28
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

Quote:
Originally Posted by mpl View Post
Sorry, J Reverb! Just tested it and yes, for some reason it doesn`t work for Latch mode (WTF, why?). So I guess the only way is to set envelope points directly which is pretty CPU hungry (get/set envelope every defer cycle).

Gurus from here, let me know if I`m wrong and it is just something wrong in the code.
Gurus ?? This is a big thing here help mpl out he's pushed the boat out on this one Maybe this is one for Justin.....
J Reverb is offline   Reply With Quote
Old 02-01-2017, 12:55 AM   #29
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

Thanks to heda, it should works now.
mpl is offline   Reply With Quote
Old 02-01-2017, 03:47 AM   #30
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

Genius !
I think now that external script for midi control is getting run every time midi cc is received causing a lag, is it possible to bind a specific controller to send level and pan into the script itself, something like ch16 cc7 maybe..
This is a game changer for me, thanks
J Reverb is offline   Reply With Quote
Old 02-02-2017, 01:44 AM   #31
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 810
Default

Great work!

Post Fader, Pre Fader, Pre FX button doesn't work here (doesn't actually changes anything)..

thanks!!
Gianfini is offline   Reply With Quote
Old 02-02-2017, 02:04 AM   #32
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

It works as expected for me (just not make changes dynamically in routing window).

mpl is offline   Reply With Quote
Old 02-02-2017, 06:27 AM   #33
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 810
Default

Quote:
Originally Posted by mpl View Post
It works as expected for me (just not make changes dynamically in routing window).
Yes you're right... fine then since I'll not keep both windows open.

REQUEST: COULD YOU MAKE SIMILAR SCRIPT TO KEEP A TRACK MIXER FLOATING? IT WOULD BE ENOUGH TO KEEP ONE TRACK STRIPE WITH JUST VOLUME, SOLO, MUTE, PAN, WIDTH, MAYBE PHASE for one selected track.

So if I scroll right to track 156 I can keep ONE track at hand (I often use it for reference material to compare sound, etc.). It would be wonderful, even simple design (I don't know if you can use the graphics items of the theme in LUA...)

just as an additional challenge or maybe is more for a FR to Reaper Devs

g
Gianfini is offline   Reply With Quote
Old 02-02-2017, 12:24 PM   #34
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,732
Default

I just tried this script and it's an incredible time saver. I use tons of sends on my mixes so having something like this is definitely a major boost in my workflow. Thank you very much, Michael.

I have an idea... What if we could create send tracks from it? Let's say I select one or more tracks (with or without sends) and then it creates one track for each selected track with a given preffix and/or suffix (and ideally with their send track colors). For example, let's say I have:

Track 20: Lead synth
Track 21: Gtr ac rhythm
Track 22: Piano

and I select them all, right-click on the SendFader panel (or click on a button, dunno) and "create send tracks from selected tracks". This would ideally prompt for suffix and/or preffix and color. So I write: "RVB" as preffix and "main" as suffix and leave it as is for default color (or maybe there's a way so they can inherit the sending track color?) and it creates these tracks at the end of the tracklist:

Track 50: RVB Lead synth main
Track 51: RVB Gtr ac rhythm main
Track 52: RVB Piano main

Good? Bad? Too much work? Not interested?
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 02-02-2017, 07:04 PM   #35
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

Quote:
Originally Posted by Mercado_Negro View Post
What if we could create send tracks from it? Let's say I select one or more tracks (with or without sends) and then it creates one track for each selected track with a given preffix and/or suffix (and ideally with their send track colors).
I don`t think it should be implemented here.
But this code should works:

Code:
  -- Add sends to selected tracks
  
  function main()
    local retval, pref = reaper.GetUserInputs( 'Set send prefix', 1, '' ,'')
    local retval1, suff = reaper.GetUserInputs( 'Set send suffix', 1, '' ,'')
    if retval or retval1 then 
      for i = 1, reaper.CountSelectedTracks(0) do
        local tr = reaper.GetSelectedTrack(0,i-1)
        if tr then 
          track_col =  reaper.GetTrackColor( tr )
          _, src_name = reaper.GetSetMediaTrackInfo_String( tr, 'P_NAME', '',false )
          reaper.InsertTrackAtIndex( reaper.GetNumTracks(0), true )
          new_dest_tr =  reaper.CSurf_TrackFromID( reaper.GetNumTracks(0), false )
          reaper.SetTrackColor( new_dest_tr, track_col )
          new_send_id = reaper.CreateTrackSend( tr, new_dest_tr)
          if new_send_id >= 0 then
            new_name = pref..' '..src_name..' '..suff
            if new_dest_tr then
              reaper.GetSetMediaTrackInfo_String( new_dest_tr, 'P_NAME', new_name ,true)
            end
          end
        end
      end
      reaper.TrackList_AdjustWindows( false )
    end
  end
  
  main()

Last edited by mpl; 02-02-2017 at 07:09 PM.
mpl is offline   Reply With Quote
Old 02-03-2017, 05:17 AM   #36
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,732
Default

That's very kind of you, Michael. Thanks!

Why do you think this won't fit in your SendFader script? Having a button to run that script would hurt the design?
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 02-03-2017, 06:16 AM   #37
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 810
Default

Hi Michael, when I click on MIXER I see little track stripes below for all sends. Could you make them clickable so that when I click on a track the Floating Send changes for that send?

thanks
Gianfini is offline   Reply With Quote
Old 02-03-2017, 06:24 AM   #38
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,350
Default

Gianfini, you can use mouse scroll in this window. Or select send from send name button context list.

Mercado_Negro, this is too specific. Instead I added this action to my reapack repo.

Last edited by mpl; 02-03-2017 at 06:33 AM.
mpl is offline   Reply With Quote
Old 02-05-2017, 06:38 PM   #39
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,732
Default

Quote:
Originally Posted by mpl View Post
Gianfini, you can use mouse scroll in this window. Or select send from send name button context list.

Mercado_Negro, this is too specific. Instead I added this action to my reapack repo.
Fair enough. Thanks, Michael!
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 02-08-2017, 04:08 AM   #40
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,145
Default

Hi Mpl,

On further testing the write envelope works great from the GUI !!
If I map a cc to the external Script: mpl_SendFader - set volume (MIDI OSC only).lua, there is a noticeable lag. Is this something that's easily fixed ?

Also soft takeover would be really nice to prevent value jumps when switching sends.

Really appreciate your amazing work on this one.

Cheers.
J Reverb is offline   Reply With Quote
Reply

Thread Tools

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 05:35 PM.


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