Old 09-19-2021, 01:23 AM   #1
satellite15
Human being with feelings
 
Join Date: Aug 2017
Posts: 16
Default Send Mute envelope help needed

In a project for live & post-production usage I've got 2 guitar tracks that both send to 2 Stereo FX/Amp busses to switch between clean and dirty sounds. The "active" (only unmuted) send for each guitar is controlled via MIDI foot controller + custom actions I made to mute all sends and then toggle unmute the send I want to "activate":
Code:
Select track
"SWS: Mute all sends from selected track(s)"
"Send: Mute track send #1"




Issue:
This works, however I was wanting to capture these send switches by recording to the Send Mute envelope and I can't figure out how to record this (clicking the button works but using a custom action to mute/unmute the send does not write the automation envelope).

Attached Images
File Type: jpg track-layout.jpg (35.4 KB, 243 views)
File Type: jpg mutes.jpg (32.3 KB, 209 views)
File Type: jpg touch-automation-mutes.jpg (32.2 KB, 80 views)
File Type: gif mute.gif (54.9 KB, 232 views)
satellite15 is offline   Reply With Quote
Old 09-19-2021, 06:27 PM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Hi,
I think the issue is that the SWS action wasn't done with writing automation in mind.
You can try to replace it with the attached script in your custom action.

Let me know if it works.

PS:
I'm not fully understanding what you're doing there because the custom action you have is actually a 'one way action' and not a toggle, no?

Last edited by nofish; 09-19-2021 at 07:47 PM.
nofish is offline   Reply With Quote
Old 09-19-2021, 07:56 PM   #3
satellite15
Human being with feelings
 
Join Date: Aug 2017
Posts: 16
Default

Thank you very much. I'll have a chance to try that out tomorrow and I'll let you know how it goes.

As for the toggle confusion: "Send: Mute track send #1" would certainly sound like it just mutes but it actually behaves like a toggle. There are no corresponding "Send: Unmute track send #" actions so the behavior was welcome, but yeah, the name isn't totally clear. So in my custom action "#1" gets replaced with whichever footswitch I press. If I press the first button on my controller, the first send is unmuted. Second button, second send unmuted.
satellite15 is offline   Reply With Quote
Old 09-19-2021, 08:11 PM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

I knew that "Send: Mute track send #1" is a toggle (well I know by now as I was testing the script lol) but had a wrong thought how you plan to use it.
Got it now.
nofish is offline   Reply With Quote
Old 09-20-2021, 08:21 AM   #5
satellite15
Human being with feelings
 
Join Date: Aug 2017
Posts: 16
Default

Script works great to mute the tracks! Could you explain what "_" and "reaper.TrackList_AdjustWindows(false)" are for, out of curiosity?

Now I need to unmute a specific send. Going off your script this worked:
Code:
for i = 0, reaper.CountSelectedTracks(0)-1  do
  track = reaper.GetSelectedTrack(0, i)
  sendUImute = reaper.GetTrackSendUIMute(track, 1)
  if sendUImute == true then
    reaper.ToggleTrackSendUIMute(track, 1)
  end
  reaper.TrackList_AdjustWindows(false)
end
I'm not new to coding but I've never done reaper scripting before. I'd like a way to parameterize which send gets unmuted, but not sure how to do that. This script would unmute send #1 and I could just make another for send #2 but if there's a a better way to select which send to unmute that doesn't involve copy/pasting to change the send index I'd like to know.

So my custom actions would now be
Code:
Select track by name (via Cycle Actions / reaconsole)
Your script to mute all sends
Script from above to unmute send #1
and
Code:
Select track by name (via Cycle Actions / reaconsole)
Your script to mute all sends
Script from above to unmute send #2
Thanks for your help!
satellite15 is offline   Reply With Quote
Old 09-20-2021, 10:12 AM   #6
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Nice it's working!

Generally for scripting I'd recommend X-Raym's great ReaScript doc.

TrackList_AdjustWindows triggers a redraw of track/mixer control panel (missing description in the API doc), because we've changed it previously via ToggleTrackSendUIMute, actually not totally sure it's necessary here.
(About isMinor parameter see here).

GetTrackSendUIMute returns two values in Lua, boolean retval and boolean mute. retval just says if the call worked out correctly I think (not totally sure), but as we're interested in the boolean mute value I just used an underscore for boolean retval for simplicity.

Quote:
I'd like a way to parameterize which send gets unmuted...
Not sure about that, sorry, maybe better asked in the Scripting subforum.
nofish is offline   Reply With Quote
Old 09-20-2021, 10:34 AM   #7
satellite15
Human being with feelings
 
Join Date: Aug 2017
Posts: 16
Default

Right on. Thanks for the explanation and the resources!
satellite15 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 05:27 PM.


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