|
|
|
02-11-2015, 07:57 AM
|
#1
|
Human being with feelings
Join Date: Oct 2014
Location: Berlin
Posts: 45
|
Converting item volume to track volume
Hello all,
I have countless items on a track. I have adjusted the volume of every item seperately, but now I would like to transfer those volume changes to the track volume automation lane. Is this possible somehow?
Best,
Ludwig
|
|
|
02-11-2015, 08:22 AM
|
#2
|
Human being with feelings
Join Date: Jan 2014
Posts: 5,220
|
Don't think there is a way, someone could make a script I guess. My question is, why?
What does this enable you to do?
|
|
|
02-11-2015, 08:50 AM
|
#3
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
This is *not possible via scripting at the moment, but will be.
(I think it's already possible with the latest pre-version of Reaper/ReaScript)
*not possible = very difficult
|
|
|
02-11-2015, 09:10 AM
|
#4
|
Human being with feelings
Join Date: Feb 2009
Location: UK
Posts: 1,429
|
You could just glue all the items, then all your per item volumes are accounted for in your new glued item. But perhaps you wish to keep all your seperate items?
|
|
|
02-11-2015, 10:08 AM
|
#5
|
Human being with feelings
Join Date: Oct 2014
Location: Berlin
Posts: 45
|
A script would be wonderful. The reason: its a voice over track in a movie on which I adjusted every item via item volume. But on the track itself I have to put a certain effect which needs to be hit by every item at its original volume. However, I don't want to loose the volume levels, so a script to transfer the item gain to track volume automation would be incredibly helpful. Next time I'll use the pre-fx-volume automation, but the volume-per-item method is just so much faster :-P
Meanwhile: Is there a script or function to reset the item volume of multiple clips at once?
Edit: Hang on, found it in the SWS extensions!
Last edited by ludwigmueller; 02-11-2015 at 10:41 AM.
|
|
|
02-11-2015, 12:08 PM
|
#6
|
Human being with feelings
Join Date: May 2011
Location: Shaolin => NJ
Posts: 1,213
|
Since you found the SWS function to reset all the item volumes, I would take this course of action: - Duplicate the track
- Remove the item volumes on duplicated track
- Put FX on duplicated track
- Set FX to 100% wet
Now you have the original volumes hitting your FX and still maintain all the item volume work you did.
|
|
|
02-12-2015, 03:36 AM
|
#7
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by ludwigmueller
A script would be wonderful. The reason: its a voice over track in a movie on which I adjusted every item via item volume. But on the track itself I have to put a certain effect which needs to be hit by every item at its original volume. However, I don't want to loose the volume levels, so a script to transfer the item gain to track volume automation would be incredibly helpful. Next time I'll use the pre-fx-volume automation, but the volume-per-item method is just so much faster :-P
Meanwhile: Is there a script or function to reset the item volume of multiple clips at once?
Edit: Hang on, found it in the SWS extensions!
|
Something like this will be possible :
("Reset item volumes" would be easy to add to this script)
|
|
|
06-05-2020, 02:22 PM
|
#8
|
Human being with feelings
Join Date: Jan 2008
Posts: 147
|
Found this thread, is there a working solution now? I really need it.
|
|
|
06-06-2020, 11:36 AM
|
#9
|
Human being with feelings
Join Date: Jan 2010
Location: Kalispell
Posts: 14,759
|
Quote:
Originally Posted by timboid
Found this thread, is there a working solution now? I really need it.
|
Hi Tim, I didn't realise this was a very old thread until I saw your post.
At anyrate, I was going to tell him all he had to do was duplicate the track, remove all the take volume envelopes, then EQ that track.
Then when he's done he can tranfer the EQ to the other track that has the take volume envelopes.
|
|
|
06-06-2020, 10:52 PM
|
#10
|
Human being with feelings
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
|
The Volume envelope needs to be already ON on the tracks or this script will fail.
Code:
function Main()
sel_item_count = reaper.CountSelectedMediaItems( 0 )
for i = 0, sel_item_count - 1 do
sel_item = reaper.GetSelectedMediaItem( 0, i )
sel_item_vol = reaper.GetMediaItemInfo_Value( sel_item, "D_VOL" )--volume
sel_item_time = reaper.GetMediaItemInfo_Value( sel_item, "D_POSITION" )--time
sel_track = reaper.GetMediaItemInfo_Value( sel_item, "P_TRACK" ) -- track
env_name = reaper.GetTrackEnvelopeByName( sel_track, "Volume" )
reaper.InsertEnvelopePoint( env_name, sel_item_time, sel_item_vol, 1, 0, false )
reaper.SetMediaItemInfo_Value( sel_item, "D_VOL", 1 )
end
end
reaper.Undo_BeginBlock()
Main()
reaper.Undo_EndBlock( "Script Item Vol to Envelope", 0 )
Also I started to make scripts like this quarantine, so I may missed somethings hahaha
|
|
|
06-07-2020, 12:54 AM
|
#11
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
|
Quote:
Originally Posted by daniellumertz
The Volume envelope needs to be already ON on the tracks or this script will fail.
|
Code:
function Main()
for i = 0, reaper.CountSelectedMediaItems( 0 ) - 1 do
sel_item = reaper.GetSelectedMediaItem( 0, i )
sel_item_vol = reaper.GetMediaItemInfo_Value( sel_item, "D_VOL" )--volume
sel_item_time = reaper.GetMediaItemInfo_Value( sel_item, "D_POSITION" )--time
sel_item_len = reaper.GetMediaItemInfo_Value( sel_item, "D_LENGTH" )--time
par_track = reaper.GetMediaItemInfo_Value( sel_item, "P_TRACK" ) -- track
local envelope = reaper.GetTrackEnvelopeByName( par_track, "Volume" )
if not envelope then
reaper.SetOnlyTrackSelected( par_track )
reaper.Main_OnCommand(40406,0) -- Track: Toggle track volume envelope visible
envelope = reaper.GetTrackEnvelopeByName( par_track, "Volume" )
end
local retval, value_before, dVdS, ddVdS, dddVdS = reaper.Envelope_Evaluate( envelope, sel_item_time-(10^-15), reaper.format_timestr_pos( 1, '', 4 ), 1 )
reaper.InsertEnvelopePointEx( envelope,-1,sel_item_time-(10^-15), value_before, 1, 0, false, false )
reaper.DeleteEnvelopePointRangeEx( envelope, -1, sel_item_time, sel_item_time+sel_item_len )
sel_item_vol = reaper.ScaleToEnvelopeMode( reaper.GetEnvelopeScalingMode( envelope ), sel_item_vol )
reaper.InsertEnvelopePointEx( envelope, -1, sel_item_time, sel_item_vol, 1, 0, false, false )
reaper.Envelope_SortPoints( envelope )
reaper.SetMediaItemInfo_Value( sel_item, "D_VOL", 1 )
end
end
reaper.Undo_BeginBlock()
Main()
reaper.Undo_EndBlock( "Script Item Vol to Envelope", 0 )
|
|
|
06-08-2020, 09:00 AM
|
#12
|
Human being with feelings
Join Date: Mar 2016
Posts: 1,242
|
This looks good, thanks..
I wonder, is it possible at all to script something whereby Track Volume Automation is "moved" to the Items on the track as Take Volume Automation?
|
|
|
06-08-2020, 02:34 PM
|
#13
|
Human being with feelings
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
|
Hi MPL!! Thanks for the code! I will analyse the changes in it, always good for learning heheh! I'm a little busy in a project right know, else I would see it already. Thanks
|
|
|
06-09-2020, 03:32 PM
|
#14
|
Human being with feelings
Join Date: Jul 2013
Location: Portugal
Posts: 1,827
|
Thinking about this, is there a way we can "copy/ paste" fader volume to send volume?
This would be very handy to make cue mixes using the mixer faders rough mix to heaphones for example.
|
|
|
06-09-2020, 08:00 PM
|
#15
|
Human being with feelings
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
|
Quote:
Originally Posted by pepe44
Thinking about this, is there a way we can "copy/ paste" fader volume to send volume?
This would be very handy to make cue mixes using the mixer faders rough mix to heaphones for example.
|
It should be easy to make an script for that. I'm in the middle of a rush in a project else I would try....
|
|
|
10-29-2020, 05:04 AM
|
#16
|
Human being with feelings
Join Date: Aug 2017
Posts: 10
|
Dear all,
daniellumertz, mpl, thanks a lot for the scripts, this is very useful. Below is a suggestion that does two slight modifications:
1/ adds an envelope point after the item
2/ if not only the item volume but also the take volume has been modified, applies a track volume which is the product of both (assuming the current take for each item).
Best
Alexis
Code:
function Main()
for i = 0, reaper.CountSelectedMediaItems( 0 ) - 1 do
sel_item = reaper.GetSelectedMediaItem( 0, i )
sel_take = reaper.GetActiveTake(sel_item)
-- overall volume = item vol * take vol
sel_item_vol = reaper.GetMediaItemInfo_Value( sel_item, "D_VOL" ) * reaper.GetMediaItemTakeInfo_Value( sel_take, "D_VOL" )
sel_item_time = reaper.GetMediaItemInfo_Value( sel_item, "D_POSITION" )--time
sel_item_len = reaper.GetMediaItemInfo_Value( sel_item, "D_LENGTH" )--time
par_track = reaper.GetMediaItemInfo_Value( sel_item, "P_TRACK" ) -- track
local envelope = reaper.GetTrackEnvelopeByName( par_track, "Volume" )
if not envelope then
reaper.SetOnlyTrackSelected( par_track )
reaper.Main_OnCommand(40406,0) -- Track: Toggle track volume envelope visible
envelope = reaper.GetTrackEnvelopeByName( par_track, "Volume" )
end
-- reaper.ShowConsoleMsg(sel_item_vol)
local retval, value_before, dVdS, ddVdS, dddVdS = reaper.Envelope_Evaluate( envelope, sel_item_time-(10^-5), reaper.format_timestr_pos( 1, '', 4 ), 1 )
local retval, value_after, dVdS, ddVdS, dddVdS = reaper.Envelope_Evaluate( envelope, sel_item_time+sel_item_len+(10^-5), reaper.format_timestr_pos( 1, '', 4 ), 1 )
reaper.InsertEnvelopePointEx( envelope,-1,sel_item_time-(10^-5), value_before, 1, 0, false, false )
reaper.InsertEnvelopePointEx( envelope,-1,sel_item_time+sel_item_len+(10^-5), value_after, 1, 0, false, false )
reaper.DeleteEnvelopePointRangeEx( envelope, -1, sel_item_time, sel_item_time+sel_item_len )
sel_item_vol = reaper.ScaleToEnvelopeMode( reaper.GetEnvelopeScalingMode( envelope ), sel_item_vol )
reaper.InsertEnvelopePointEx( envelope, -1, sel_item_time, sel_item_vol, 1, 0, false, false )
reaper.Envelope_SortPoints( envelope )
-- set item and take volumes to 1
reaper.SetMediaItemInfo_Value( sel_item, "D_VOL", 1 )
reaper.SetMediaItemTakeInfo_Value( sel_take, "D_VOL", 1 )
end
end
reaper.Undo_BeginBlock()
Main()
reaper.Undo_EndBlock( "Script Item Vol to Envelope", 0 )
Last edited by Alexis Baskind; 10-30-2020 at 07:56 AM.
|
|
|
10-29-2020, 10:19 AM
|
#17
|
Human being with feelings
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
|
nice Alex ! thanks for sharing always nice to see changes
don't forget to put the code in the forum with [code] and '['/code] (don't actually put the ')
|
|
|
10-30-2020, 05:22 AM
|
#18
|
Human being with feelings
Join Date: Jan 2019
Location: Brazil
Posts: 115
|
Script Variant: VolEnv or Pre-FX Env
Thanks
daniellumertz, mpl, alexis. Script works great.
One question.
Is it possible tha instead of a VolEnv the final result be a Pre-FX envelope?
I've asked because Item Volume is Pre-FX, (or am I wrong ?) and sometimes it would be more useful.
I try to do this combining this script with other actions but I think a little
cumbersome.
Thanks again.
|
|
|
10-30-2020, 07:59 AM
|
#19
|
Human being with feelings
Join Date: Aug 2017
Posts: 10
|
Hi anomar,
I haven't tested it, but I guess that if you replace "Volume" by "Volume (Pre-FX)" in all lines containing "GetTrackEnvelopeByName", this should work.
Alexis
|
|
|
10-30-2020, 10:36 AM
|
#20
|
Human being with feelings
Join Date: Jan 2019
Location: Brazil
Posts: 115
|
I know nothing about scripting, but I think I can do that.
Thanks Alexis.
Quote:
Originally Posted by Alexis Baskind
Hi anomar,
I haven't tested it, but I guess that if you replace "Volume" by "Volume (Pre-FX)" in all lines containing "GetTrackEnvelopeByName", this should work.
Alexis
|
|
|
|
11-03-2020, 06:23 AM
|
#21
|
Human being with feelings
Join Date: Jan 2019
Location: Brazil
Posts: 115
|
Hi Alexis,
worked ! I also changed action 40406 to 40408
Thank you all.
|
|
|
04-04-2023, 03:22 AM
|
#22
|
Human being with feelings
Join Date: Nov 2017
Posts: 9
|
Quote:
Originally Posted by Alexis Baskind
Dear all,
daniellumertz, mpl, thanks a lot for the scripts, this is very useful. Below is a suggestion that does two slight modifications:
1/ adds an envelope point after the item
2/ if not only the item volume but also the take volume has been modified, applies a track volume which is the product of both (assuming the current take for each item).
Best
Alexis
|
My items are overlapping, how does it handle items that have crossfades and volume automation?
I am asking, because it results here only with points, none of which follow the item automation.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 11:25 AM.
|