Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 02-22-2017, 12:25 PM   #1
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default Is there an action for toggling take volume envelope visibility?

Hello!



The title says it all! I searched but couldn't find any! Is it there? If not, is it possible with reascript?


Edit: I managed to create one with Reascript. It is on post #19
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 02-24-2017 at 06:41 AM.
amagalma is offline   Reply With Quote
Old 02-22-2017, 12:38 PM   #2
ReaperMadness
Human being with feelings
 
ReaperMadness's Avatar
 
Join Date: Aug 2011
Location: Great Lakes, N. A.
Posts: 1,872
Default

Here you go:

Attached Images
File Type: png Screenshot_1.png (11.2 KB, 210 views)
File Type: png Screenshot_2.png (27.4 KB, 775 views)
__________________


New Music: = Mourning Marrs =
ReaperMadness is offline   Reply With Quote
Old 02-22-2017, 01:34 PM   #3
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default

I don't see one in your list for a selected take or media item volume envelope.
Coachz is offline   Reply With Quote
Old 02-22-2017, 01:38 PM   #4
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

Take: toggle take volume envelope ?
schwa is offline   Reply With Quote
Old 02-22-2017, 02:05 PM   #5
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

But this action disables and hides it. I just want to hide, not disable
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 02-22-2017, 02:07 PM   #6
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

And preferably I would prefer it to apply to all takes in project, in order to avoid visual clutter
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 02-22-2017, 03:15 PM   #7
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

There's currently no way to hide take envelopes. For take envelopes, visible equals active, not visible equals not active.
schwa is offline   Reply With Quote
Old 02-22-2017, 04:29 PM   #8
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by schwa View Post
There's currently no way to hide take envelopes. For take envelopes, visible equals active, not visible equals not active.
Yeah, you have to select each take envelope individually and then use the menu to hide it, then they retain their function.

But to show them all again you can select all the items and then use "Take: Toggle take volume envelope" to bring them all back up.
Tod is offline   Reply With Quote
Old 02-23-2017, 04:34 PM   #9
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Is it doable with a script? If yes, what would be the function that I should call in order to hide (but not disable) a take's volume?
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 02-23-2017, 05:15 PM   #10
Robert Johnson III
Human being with feelings
 
Robert Johnson III's Avatar
 
Join Date: Dec 2014
Location: The Dutch Mountains
Posts: 389
Default

Quote:
Originally Posted by amagalma View Post
Is it doable with a script? If yes, what would be the function that I should call in order to hide (but not disable) a take's volume?
I do it the other way around... Just show the envelope I want to work on and hide the rest

Maybe this helps.... (absolutely not my script btw)

Code:
-- @description Hide all track envelopes except envelope under mouse cursor
-- @version 1.0
-- @author mpl
-- @website http://forum.cockos.com/member.php?u=70694
-- @changelog
--    + init release


function msg(s) reaper.ShowConsoleMsg(s..'\n') end

function main()
  reaper.BR_GetMouseCursorContext()
  env_MC = reaper.BR_GetMouseCursorContext_Envelope()
  if not env_MC then return end
  for tr = 1, reaper.CountTracks(0) do
    local track = reaper.GetTrack(0,tr-1)
    if track then 
      for i = 1,  reaper.CountTrackEnvelopes( track ) do
        local env = reaper.GetTrackEnvelope( track, i-1 )
        if env == env_MC then visible = true else visible = false end
        local br_env = reaper.BR_EnvAlloc( env, false )
        local active, _, armed, inLane, laneHeight, defaultShape, _, _, _, _, faderScaling = reaper.BR_EnvGetProperties( br_env )
        reaper.BR_EnvSetProperties( br_env, 
                                  active, 
                                  visible, 
                                  armed, 
                                  inLane, 
                                  laneHeight, 
                                  defaultShape, 
                                  faderScaling )
        reaper.BR_EnvFree( br_env, true )
      end
    end
  end  
end

main()
__________________
Hackintosh - OSX 10.13.5 - Apollo Twin

https://soundcloud.com/mytopia

Last edited by Robert Johnson III; 02-23-2017 at 08:09 PM. Reason: Code tags
Robert Johnson III is offline   Reply With Quote
Old 02-23-2017, 06:16 PM   #11
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Thanks! But I am talking about Take volume envelopes, not Track volume envelopes.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 02-23-2017, 06:19 PM   #12
Robert Johnson III
Human being with feelings
 
Robert Johnson III's Avatar
 
Join Date: Dec 2014
Location: The Dutch Mountains
Posts: 389
Default

Quote:
Originally Posted by amagalma View Post
Thanks! But I am talking about Take volume envelopes, not Track volume envelopes.
Oeps! #Dyslexic
__________________
Hackintosh - OSX 10.13.5 - Apollo Twin

https://soundcloud.com/mytopia
Robert Johnson III is offline   Reply With Quote
Old 02-23-2017, 07:10 PM   #13
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

No problem!

I managed to put together this code that is able to hide all takes' volume envelopes in project:

Code:
function Hide_All_Take_VolEnvelope()
  local(item_cnt, item_idx, item, take_idx, take_cnt, take, VolEnv, BR_Env,
        BR_Env, active,visible,armed, inLane,laneHeight, 
        defShape, minVal,maxVal,centerVal, type, faderScaling)   
(
  Undo_BeginBlock();
  Main_OnCommand(NamedCommandLookup("_SWS_SAVEALLSELITEMS1"), 0); // save current item selection
  SelectAllMediaItems(0, 1);
  item_cnt = CountSelectedMediaItems(0);
  item_idx=0;
  loop(item_cnt,
      item = GetSelectedMediaItem(0, item_idx);
      take_cnt = CountTakes(item);
      take_idx = 0;
      loop(take_cnt,
        take = GetMediaItemTake(item, take_idx);
        VolEnv = GetTakeEnvelopeByName(take,"Volume");
        BR_Env = extension_api("BR_EnvAlloc", VolEnv, 0);
        extension_api("BR_EnvGetProperties", BR_Env, active,visible,armed, inLane,laneHeight, 
                      defShape, minVal,maxVal,centerVal, type, faderScaling);
        visible = 0; // Hide VolEnv
        extension_api("BR_EnvSetProperties", BR_Env, active, visible, armed, inLane,laneHeight, 
                      defShape, faderScaling);
        extension_api("BR_EnvFree", BR_Env, 1);
      take_idx += 1;
      );
      item_idx+=1;
  );

Main_OnCommand(NamedCommandLookup("_SWS_RESTALLSELITEMS1"), 0); // restore item selection

Undo_EndBlock("Hide all take volume envelopes in project", -1);

);

Hide_All_Take_VolEnvelope();
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 02-24-2017 at 05:54 AM.
amagalma is offline   Reply With Quote
Old 02-23-2017, 08:03 PM   #14
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

What should I add so, that the arrange window updates only after the script has finished?
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 02-24-2017 at 05:56 AM.
amagalma is offline   Reply With Quote
Old 02-24-2017, 03:47 AM   #15
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Furthermore, I would like it to act like this:
-Check all takes that are visible in the arrange window
-If there is a take volume envelope visible, then hide all take volume envelopes in project (which is to say, do what my script above does)
-If there is none visible, then show all take volume envelopes in project (the opposite of what my script does)

Thanks!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 02-24-2017 at 04:59 AM.
amagalma is offline   Reply With Quote
Old 02-24-2017, 05:01 AM   #16
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

I have edited my posts above and managed to put together a working script. But I would like it to do something more difficult. Should I ask for help in the Reascript forum?
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 02-24-2017, 05:14 AM   #17
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

Quote:
Originally Posted by amagalma View Post
Should I ask for help in the Reascript forum?
Probably. In the meantime, here is a searchable documentation I use https://www.extremraym.com/cloud/reascript-doc
bFooz is online now   Reply With Quote
Old 02-24-2017, 05:56 AM   #18
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Thank you!

I already use X-Raym's excellent documentation!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 02-24-2017, 06:38 AM   #19
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

I've managed to create the toggle that I wanted in the beginning.

Show all take volume envelopes in project.eel

Hide all take volume envelopes in project.eel

Then one, simply has to create a cycle action toggling between these two
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 01-22-2020, 08:15 AM   #20
cdmstudios
Human being with feelings
 
cdmstudios's Avatar
 
Join Date: Oct 2008
Posts: 424
Default

Hi Amagalma -
I've been wanting this as well. Where do I put these .eel files to make use of them?

Nevermind - I found it and THANK YOU. This is great!!

Last edited by cdmstudios; 01-22-2020 at 08:32 AM.
cdmstudios is offline   Reply With Quote
Old 01-22-2020, 10:15 AM   #21
cdmstudios
Human being with feelings
 
cdmstudios's Avatar
 
Join Date: Oct 2008
Posts: 424
Default

Actually, when I run the Hide script, I get an error:
'BR_EnvFree' argument 1: expected BR_Envelope*

anyone know what that means?
are you supposed to select all items in the project before running this script or anything?
cdmstudios is offline   Reply With Quote
Old 05-30-2020, 10:26 AM   #22
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,134
Default

Quote:
Originally Posted by cdmstudios View Post
Actually, when I run the Hide script, I get an error:
'BR_EnvFree' argument 1: expected BR_Envelope*

anyone know what that means?
are you supposed to select all items in the project before running this script or anything?
Works here. Selection isn't necessary.
Buy One is online now   Reply With Quote
Old 05-30-2020, 11:29 AM   #23
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,202
Default

Quote:
Originally Posted by schwa View Post
There's currently no way to hide take envelopes. For take envelopes, visible equals active, not visible equals not active.
Not true. The visible checkbox does exactly that.
Easy to test.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams
Philbo King 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:20 AM.


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