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

Reply
 
Thread Tools Display Modes
Old 03-27-2017, 12:07 PM   #1
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default Script: Create mix bus and reroute all top-level tracks to it

I don't know how many people will find this useful, but whatever.

Lokasenna_Create mix bus and reroute all top-level tracks to it.lua
Lokasenna_Create mix bus and reroute all selected tracks to it.lua

Nothing fancy at the moment; it just adds a new track called "Mix Bus", then disables the Master send for all tracks at the "top" level (read: folder parents) and routes them to the mix bus instead. Due to Reaper's sends/receives being a bit complicated to deal with, this only affects channels 1/2 - tracks that were outputting to the Master on 3/4 will get messed up, etc.

Reasons to use a mix bus instead going straight to the Master include:
  • Slight performance gain, since the Master can't use anticipative FX processing. Or something. I think.
  • Duplicate the mix bus a dozen times, mess with the send faders on each copy, and you can quickly have all of the variants that labels tend to ask for ready to go without having to mess up the actual mix: Vocals Up, Drums Down, Guitars Down, No Vocals, Less Reverb, etc.
  • Put your metering and analysis plugins on the Master, your actual mastering chain on the mix bus, and you can A/B the mastering chain by turning the mix bus's FX chain on/off without disabling the meters at the same time.

Enjoy.

Edit: Added an equivalent action for "selected tracks".
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate

Last edited by Lokasenna; 08-06-2017 at 03:32 PM.
Lokasenna is offline   Reply With Quote
Old 03-27-2017, 12:18 PM   #2
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
Default

Very useful!
I've been doing this by hand for so long... no more!
Thanks
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 03-27-2017, 12:31 PM   #3
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

I keep forgetting about it until halfway through a track and then I don't feel like doing it anymore. :P
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-27-2017, 03:51 PM   #4
stereolost
Human being with feelings
 
stereolost's Avatar
 
Join Date: Mar 2015
Location: Moscow, Russia
Posts: 206
Default

Thanks! Wish i had it a week ago))
stereolost is offline   Reply With Quote
Old 03-27-2017, 04:34 PM   #5
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 4,020
Default

Thanks Lokasenna,
it is very useful script

FR - what if master is multichannel? then tracks may also be multichannel and not sending only 1/2 to master... Is it easily possible to modify script to take such cases into account, please?

BTW, I tried to modify the script myself to automatically give a new "Mix Bus" created track specific color (e.g. green)
So, after line 46 I added:
reaper.SetTrackColor(bus, 0x0000FF00)
... seems to work ok, nice

once again - thanks!
akademie

Last edited by akademie; 03-27-2017 at 04:44 PM.
akademie is online now   Reply With Quote
Old 03-27-2017, 05:56 PM   #6
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

I can look at adding multichannel support, sure.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 01-01-2020, 05:06 AM   #7
SubbaseDnB
Human being with feelings
 
Join Date: May 2017
Posts: 454
Default

Quote:
Originally Posted by akademie View Post
Thanks Lokasenna,
it is very useful script

FR - what if master is multichannel? then tracks may also be multichannel and not sending only 1/2 to master... Is it easily possible to modify script to take such cases into account, please?

BTW, I tried to modify the script myself to automatically give a new "Mix Bus" created track specific color (e.g. green)
So, after line 46 I added:
reaper.SetTrackColor(bus, 0x0000FF00)
... seems to work ok, nice

once again - thanks!
akademie
was just going to post about adding a colour to busses
SubbaseDnB is offline   Reply With Quote
Old 01-09-2018, 11:51 AM   #8
DynamicK
Human being with feelings
 
Join Date: Nov 2017
Location: Gloucestershire, UK
Posts: 223
Default

Quote:
Originally Posted by Lokasenna View Post
I don't know how many people will find this useful, but whatever.
Lokasenna_Create mix bus and reroute all selected tracks to it.lua
Thanks for this...very useful for fast creation. Anyway I can modify it so the the MixBus is added at the end of the tracks instead of at the top?
DynamicK is offline   Reply With Quote
Old 07-22-2018, 06:56 AM   #9
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Small update - sends will now override the defaults to be at unity gain, post-fader.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 07-15-2019, 05:23 AM   #10
tapemelancholy
Human being with feelings
 
Join Date: Sep 2018
Posts: 92
Default Naming

Hello!
I'm absolutely love this script, it's the main routing instrument for me.
I'm creating several busses in any project every time.

It would be incredibly handy if the script added the name of the receive track after "Mix Buss (drums - for example)"

I don't understand programming, so what do I need to add to the code?

Thanks!
tapemelancholy is offline   Reply With Quote
Old 07-15-2019, 07:12 AM   #11
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

It would be a fair bit of work to modify these scripts for that, since you would need to specify a name for the mix bus first - otherwise all of your sends would just have "(Mix Bus)" after them which isn't very helpful.

However, I've just uploaded Lokasenna_Append selected track names with their first send destination to ReaPack. After creating a bus, rename it, then select the original tracks and run "Append selected track names..." to rename them.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 08-17-2019, 07:42 PM   #12
Joe90
Human being with feelings
 
Join Date: Aug 2019
Posts: 855
Default

Amazing script, thank you!
Joe90 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 10:32 AM.


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