|
|
|
03-17-2015, 05:01 AM
|
#1
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
Script (LUA): Copy points envelopes in time selection and paste them at edit cursor
Hi!
Want to copy paste some envelope points of several tracks and several envelope tracks?
Easy!
Instructions:
- Make a time selection
- move the edit cursor
- Execute X-Raym_Copy visible armed envelope points of selected tracks in time selection and paste at edit cursor.lua
It will - preserve the original points in loops
- and works only and visible and armed track.
- works for all selected tracks.
- can work with time selection. It would add points at loop start and end to help you copy that precise section without modify it.
- unselect all points except the new ones
- it cleans points the destination area before pasting
Demo:
Download Link:
- In my signature. Download the script pack. Subfolder Envelopes.
Hope you will like it, let me know :P
EDIT(18/03/2015)
Since the writing of this article, I made a lot of new scripts baed on this ideas.
Here is the list:
Delete Across Tracks Points Envelope Action- X-Raym_Delete visible armed envelope points of selected tracks.lua
- X-Raym_Delete visible armed envelope points of selected tracks in time selection.lua
- X-Raym_Delete visible armed envelope points of selected tracks in time selection preserving edges.lua
Copy Across Tracks Points Envelope Action- X-Raym_Copy visible armed envelope of last touched track and paste to selected tracks.lua
- X-Raym_Copy visible armed envelope points in time selection of last touched track and insert in selected
- X-Raym_Copy visible armed envelope points in time selection of last touched track and paste to selected tracks.lua
Copy On Tracks Point Points Envelope Action- X-Raym_Copy visible armed envelope values at edit cursor and paste at time selection.lua
- X-Raym_Copy visible armed envelope values at edit cursor and insert at time selection.lua
- X-Raym_Copy visible armed envelope points of selected tracks in time selection and paste at edit cursor.lua
- X-Raym_Copy visible armed envelope points of selected tracks in time selection and insert at edit cursor.lua
Add Points on Tracks Action- X-Raym_Add point on next visible armed envelope point position from previous point value.lua
- X-Raym_Add point on previous visible armed envelope point position from next point value.lua
As we can't select multiples envelopes, the trick is always the same. It works on armed + visible envelopes of selected tracks.
If they is a source track, it is the last touched one.
This is a safe way to avoid background modification.
Last edited by X-Raym; 03-19-2015 at 04:04 AM.
|
|
|
03-17-2015, 07:31 AM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
v1.0 release! updated screenshot and behavior!
EDIT:
And I just made it's evil twin brother:
X-Raym_Delete visible armed envelope points of selected tracks in time selection.lua
What do you think about that ?
Last edited by X-Raym; 03-17-2015 at 07:39 AM.
|
|
|
03-17-2015, 07:41 AM
|
#3
|
Human being with feelings
Join Date: Jan 2012
Location: Germany
Posts: 1,133
|
Does that mean we can now finally copy several envelopes at once? (I think in v4 that wasn't possible.)
|
|
|
03-17-2015, 07:48 AM
|
#4
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
It is not about envelope it is about envelope points :P Envelope points stay on the same track.
It's not just copy, it's copy/paste. :P You can't keep envelope points datas in cache. for later copy pasting (but it the time selection didn't change, then it will be as if).
What it allows to do to the follow things, across selected tracks and visible armed envelopes :
- copy paste envelope points on same track from time selection to edit cursor
- copy cut selected envelope on same track from time selection to edit cursor
- and delete envelope point in time selection
If what you mean by copy several envelopes at once is copy envelope from a track and paste it to another track, then it is not what it does. Do you meant that ?
Edit: I think I have an idea about it!
Last edited by X-Raym; 03-17-2015 at 08:08 AM.
|
|
|
03-17-2015, 08:46 AM
|
#5
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,598
|
basically you've built single-track snapshot automation. A start towards the big list of post-production automation features so many have wanted.
This is an amazing time in REAPERLand. Where I can mention a problem to someone in the evening and it's solved when I wake up the next day.
Another thing we need:
drop the cursor on a part of the project. Capture all envelope values. Make a time selection in another part of the project. Paste to fill the selected time on the same tracks.
If that can work with both single tracks and all tracks selected I'd be very impressed and happy!
Last edited by EpicSounds; 03-17-2015 at 09:14 AM.
|
|
|
03-17-2015, 08:51 AM
|
#6
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
Quote:
Originally Posted by X-Raym
v1.0 release! updated screenshot and behavior!
What do you think about that ?
|
amazing
Making REAPER the way it should be
|
|
|
03-17-2015, 09:02 AM
|
#7
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@EpicSounds
Create content is the best way I found to thank express my gratitude :P
Quote:
drop the cursor on a part of the project. Capture all envelope values. Make a time selection in another part of the project. Paste to fill the selected time on the same tracks.
|
It is very close to what the script above is capable of except few differences.
- my version takes care about visible and armed envelope only
- my version takes take of selected track only
- my version pastes the content of the whole time selection (at cursor position), and not constrained in a new time selection.
I'm very like of the first two points as I consider that to avoid mistakes, transformation (in this case, point insertion) should be visible.
Anyway, I don't know how to store datas in the clipboard, and we cant have several time selection, I can't satisfy this request :P
Maybe with two scripts and ProjExtState but it may be a harder that it could be solution.
=====
@heda
oh, hi HeDa!
Thanks for your support
=====
I'm preparing Copy visible armed envelope of last touched track and paste to selected tracks. It can be useful :P
|
|
|
03-17-2015, 09:32 AM
|
#8
|
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Oh, yes!!! This is fantastic!!! It happens to me something regarding Reaper : even though thinks like these should have been this way from the beginning, the program´s overwhelming abilities to let itself be hacked and the extraordinary inventive of people like you, Heda, Spk and soo many others doesn´t stop me from being totally amazed...
Infinite thanks for this and the things to come!!!
|
|
|
03-17-2015, 09:45 AM
|
#9
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@ Soli Deo Gloria
Thank you a lot Soli, thankful people like you are a huge source of motivation for all scripters out there!
Have no doubt about it, every kind words is very appreciated, it is nice to you to take the time to tell us this kind of thing
=====
New Action:
Copy visible armed envelope of last touched track and paste to selected tracks
Do you like it ?
What next do you ask ?
Easy, same thing, but with time selection :P
Should take few minutes.
|
|
|
03-17-2015, 10:00 AM
|
#10
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
Here it is:
Copy visible armed envelope points in time selection of last touched track and paste to selected tracks
I guess it can be useful for some workflows!
The sure thing is that it is FAR more quicker than do it manually :P
|
|
|
03-17-2015, 10:01 AM
|
#11
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Regarding copying envelopes between various FX parameters (and in certain cases native envelopes...also don't forget that volume can have upper range set at 0 or 6db)...you should scale values between envelopes so they appear the same across lanes
For example...you have some JS on the track and you're automating something that has a range of -1 to 1...Now, if you copy something like that to another FX envelopes whose range is -1000 to 1000, it will look completely different.
Last edited by Breeder; 03-17-2015 at 10:07 AM.
|
|
|
03-17-2015, 10:07 AM
|
#12
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@breeder
I didn't made copying envelopes between various FX parameters scripts for the moment, but sure, I will remember it! It is probably my next step if I figure out how to it nicely :P
For the moment, it is just based on envelope name (aka, "same" envelopes type/scale).
Thanks for the tips!
|
|
|
03-17-2015, 10:14 AM
|
#13
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by X-Raym
@breeder
I didn't made copying envelopes between various FX parameters scripts for the moment, but sure, I will remember it! It is probably my next step if I figure out how to it nicely :P
For the moment, it is just based on envelope name (aka, "same" envelopes type/scale).
Thanks for the tips!
|
It's really not that hard - for native envelopes you already know their visual ranges (and in case of volume envelope you check that preference for 0/6 db).
For FX envelopes you check their min/max value. And then you rescale it between those ranges.
I actually wanted to do something similar for SWS a long time ago, but always something else comes up.
I'll think I'll give it a go - a lot of times I just want to copy selected points in one envelope to all visible (or visible and recorded armed) envelopes in the same or other tracks
|
|
|
03-17-2015, 10:24 AM
|
#14
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@Breeder
Yep, I remember when I worked on ReaScript: Set/Offset selected envelope points values, it had to take care of scale based on track name In fact FX was simple, cause it was just from 0 to 100% (0 to 1) no matter the track. And volume, when no convert to db, is just from 0 (from -inf) to 2. Pan and width (post and pre-FX) are from -100% to 100% and mute is 0 to 1. So yes, it is definitely possible!
You want to take care of it ? :P
I think it could be cool if the selected envelope was the source track, and all other Visible + Armed envelopes on selected tracks are the destination.
two version, with and without time selection could be good!
|
|
|
03-17-2015, 10:55 AM
|
#15
|
Human being with feelings
Join Date: Jan 2012
Location: Germany
Posts: 1,133
|
Quote:
Originally Posted by X-Raym
If what you mean by copy several envelopes at once is copy envelope from a track and paste it to another track, then it is not what it does. Do you meant that ?
|
Oh yeah sorry, of course I meant envelope points
Well this is already possible.
But your script is limited to envelope copy/paste per track then? I got it. Very nice to have!!! Thanks, man.
(If there was just a way to "group" envelopes of different tracks now)
EDIT:
Haven't seen this while writing...
Quote:
New Action:
Copy visible armed envelope of last touched track and paste to selected tracks
|
Amazing! Will go and test right now
Last edited by timothys_monster; 03-17-2015 at 11:01 AM.
|
|
|
03-17-2015, 11:33 AM
|
#16
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@timo
I'm glad you like it!
Don't forget the time selection version!
|
|
|
03-17-2015, 01:08 PM
|
#17
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,598
|
[QUOTE=X-Raym;1497925] @EpicSounds
It is very close to what the script above is capable of except few differences.
- my version takes care about visible and armed envelope only
- my version takes take of selected track only
- my version pastes the content of the whole time selection (at cursor position), and not constrained in a new time selection.
I'm very like of the first two points as I consider that to avoid mistakes, transformation (in this case, point insertion) should be visible.
Anyway, I don't know how to store datas in the clipboard, and we cant have several time selection, I can't satisfy this request :P
Maybe with two scripts and ProjExtState but it may be a harder that it could be solution.
I think what I want is a bit opposite of what you made here.
Part 1 - Wherever the cursor is it samples the values, perhaps it must insert a point on every active/armed envelope, then copy that.
If that can be it's own action, awesome. If not then continue to part 2
Part 2 - Make/go to time selection and paste the envelope points to fill the time selection. straight lines. Needs to be done in a way that doesn't create ramps up or down outside of the time selection.
|
|
|
03-17-2015, 01:29 PM
|
#18
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,598
|
in your demo in first post at 6 seconds you can see a problem.
When you paste an envelope point it can't mess with what's behind it.
|
|
|
03-17-2015, 01:38 PM
|
#19
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@EpicSounds
Do you mean that ?
Copy visible armed envelope values at edit cursor and paste at time selection
Demo:
Last edited by X-Raym; 11-17-2020 at 07:38 AM.
|
|
|
03-17-2015, 01:46 PM
|
#20
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,598
|
yes I think that's it.
|
|
|
03-17-2015, 01:49 PM
|
#21
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@EpicSounds
Quote:
When you paste an envelope point it can't mess with what's behind it.
|
I'm not sure to see what is the problem here, because all seem to work as exceped. It copies points inside the time selection and at its edges and paste it at cursor position. It also delete points between the new created points.
Don't hesitate to show me screenshots of what you are thinking. You an extract picture from my gif file and draw things on it if you want.
|
|
|
03-17-2015, 01:53 PM
|
#22
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@EpicSounds
on Copy visible armed envelope values at edit cursor and paste at time selection,
- it copy values of visibles armed envelope and selected track
- it create a point (facultative, but I add it anyway, in case of we need to go back to this value again)
- it deletes points inside time selections for the same envelopes
- it inserts points at time selection edges with envelope values stored before.
- I just add a way to prevent insertion of points at cursor pos if the cursor is inside the loop.
|
|
|
03-17-2015, 02:15 PM
|
#23
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,598
|
Quote:
Originally Posted by X-Raym
@EpicSounds
I'm not sure to see what is the problem here, because all seem to work as exceped. It copies points inside the time selection and at its edges and paste it at cursor position. It also delete points between the new created points.
Don't hesitate to show me screenshots of what you are thinking. You an extract picture from my gif file and draw things on it if you want.
|
Let's say you used it on a vocal for volume automation, I think the automation should return to zero until the pasted point.
I think the script would have to insert an extra point 1ms before and after the pasted envelope points to not disturb the automation that's already there.
Is that possible?
|
|
|
03-17-2015, 02:31 PM
|
#24
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@EpicSounds
Oh I see, and I undestand the idea! like it!
It should be possible. I will try a mod of the first script which would allow to keep value of the envelope at cursor pos, by inserting it one sample before the cursor.
|
|
|
03-17-2015, 03:39 PM
|
#26
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@breeder
Oh man!!
You have to show us what it looks like !
It is so cool!
Did you use standard envelope or br_envelope ?
|
|
|
03-17-2015, 03:50 PM
|
#27
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by X-Raym
@breeder
Oh man!!
You have to show us what it looks like !
It is so cool!
Did you use standard envelope or br_envelope ?
|
Of course I used BR_Envelope, haha... It can easily tell me a lot of things that normal API without chunks can't - it's designed to wrap it all nicely away
https://github.com/Jeff0S/sws/blob/n...lopeUtil.h#L79
If you think something else from it can be useful to ReaScripters, just point it out and I can export it.
Btw, counting fro the latest SWS pre, BR_Envelope uses standard envelope functions so it's pretty much the same thing ( there can be a small overhead due to the fact that BR_Envelope caches points) unless you also use it to change envelope properties (in that case, the chunk is used, but that same chunk clears all the points and they then get reinserted with the API - this seemed faster than giving all the points through chunk).
Last edited by Breeder; 03-17-2015 at 04:22 PM.
|
|
|
03-17-2015, 06:47 PM
|
#28
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@Breeder
Aaaah nice I will hesitated when doing this script to use Br_env, especially because they can tell if a env is visible and arm or not.
I will definitely try to make somethings with them when time will come!
======
Work in progress
Same actions as above, but with points values conservation. Look at the second envelope in the demo, and see how envelope stay the same outside the "pasted" points.
(EDIT:this screenshot is close but it is wrong)
I also try to make all the point unselected, and select only new points, so that it is easier to see.
I don't why, but it doesn't work in certain cases.
need to sleep now. that was an hard day. ^^
(dont look for it online, it is not. I need to find a good title first).
Last edited by X-Raym; 03-18-2015 at 03:21 AM.
|
|
|
03-18-2015, 05:16 AM
|
#29
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
I have almost finished all this scripts (list updated above) but before making screenshots, I would love to find a way for updating the TCP envelope value display.
Current, the value is not updated when envelope change.
I tried to add undo/redo move cursor position but I don't succeed to make it work inside the script, it only works as custom custom action (work means that the TCP envelope value at cursor position is updated).
Even pressing play doesn't update.
Any idea ?
Demo here.
Last edited by X-Raym; 03-18-2015 at 05:26 AM.
|
|
|
03-18-2015, 05:49 AM
|
#30
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
@X-Raym, you may spend a lot of time trying to find a workaround, and then one day they fix it.
try collapsing / uncollapsing the tracks to see if they update. It worked for me to redraw regions.
adjust this hack I used to work on the tracks you need:
Code:
function redrawhack()
(
// HACK to redraw. arggggghh better way?
PreventUIRefresh(1);
track=GetTrack(0,0);
trackparam=GetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT");
trackparam==0 ? (
SetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT", 1);
):(
SetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT", 0);
);
SetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT", trackparam);
PreventUIRefresh(-1);
//
);
|
|
|
03-18-2015, 06:00 AM
|
#31
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@heda
Oh man that works! How the hell did you find this hack haha
You are a life saver :P
I now have to put this hack in ten scripts!!
yeah, I know what happen to you, I saw it on a pre-release thread. They are good to announce great news but they should say what they plan to do a bit more, it would avoid to waste time on some things like that. Imagine they were preparing a Note Reader HAHA
|
|
|
03-18-2015, 06:10 AM
|
#32
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
Just converted in Lua :P
Code:
-- Update the TCP envelope value at edit cursor position
function HedaRedrawHack()
reaper.PreventUIRefresh(1)
track=reaper.GetTrack(0,0)
trackparam=reaper.GetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT")
if trackparam==0 then
reaper.SetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT", 1)
else
reaper.SetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT", 0)
end
reaper.SetMediaTrackInfo_Value(track, "I_FOLDERCOMPACT", trackparam)
reaper.PreventUIRefresh(-1)
end
HedaRedrawHack()
|
|
|
03-18-2015, 06:43 AM
|
#33
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
Quote:
Originally Posted by X-Raym
@heda
Oh man that works! How the hell did you find this hack haha
You are a life saver :P
I now have to put this hack in ten scripts!!
yeah, I know what happen to you, I saw it on a pre-release thread. They are good to announce great news but they should say what they plan to do a bit more, it would avoid to waste time on some things like that. Imagine they were preparing a Note Reader HAHA
|
I'm glad it works I found that hack by pure luck I think. Just trying everything I could imagine. There may be better hacks out there too.
Of course it is a hack and uses more CPU that it should if a proper redraw would be done. But if it is only a one time execution it is ok. It may not be ok for realtime updating.
haha maybe they do a Notes Reader or a better way to manage regions and markers, but I just can't wait for them
I can only quote master Breeder here
Quote:
Originally Posted by Breeder
Welcome to coding for reaper, where you have to find workarounds all the time I guess it's a love/hate relationship - you get mad when they fix something you spent hours to find a workaround, but you still love that you created your own way around it
|
|
|
|
03-18-2015, 09:52 AM
|
#34
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
New versions
@heda
This quote should definitely be one of those REAPER scripters podium! haha
(your note READER is perfect already :P)
===
HI everyone!
So I just updated the new scripts, with brand new screenshots!
See the first post of this thread!
Here are the main new behavior:
- scripts variations than add envelope point before pasting points, so that the envelope before and after the pasted points doesn't change.
- all scripts have now a better way to select points: it keep selected only those that were added.
Please tell me what do you think of all this
===
@EpicSounds
You may find what you need in those!
===
@Breeder
BR_EnvDeletePoint !!!
I will definitely keep an eye on br_env
Great stuff.
|
|
|
03-18-2015, 11:12 AM
|
#35
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,598
|
Thanks. will check this out today.
Thanks for the clear install instructions now too.
|
|
|
03-18-2015, 01:07 PM
|
#36
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@EpicSounds
You are welcome
=====
Just added two new scripts I needed since long time:
- X-Raym_Add point on previous visible armed envelope point position from next point value.lua
- X-Raym_Add point on next visible armed envelope point position from previous point value.lua
They work as the previous one, across selected track and visible + armed envelope!
Screenshot in fist post!
Do you like it ?
|
|
|
03-18-2015, 03:33 PM
|
#37
|
Human being with feelings
Join Date: Oct 2011
Posts: 515
|
This is awesome!
I am haviing problems to make this work..
I added it to the Script folder in Reaper Resources, ... and then try to load it in the Actions panel, ....nothing happens, ...
Thanks
Last edited by amoretam; 03-18-2015 at 03:59 PM.
|
|
|
03-18-2015, 04:03 PM
|
#38
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,598
|
Quote:
Originally Posted by amoretam
This is awesome!
I am haviing problems to make this work..
I added it to the Script folder in Reaper Resources, ... and then try to load it in the Actions panel, ....nothing happens, ...
Thanks
|
You need latest Pre I think.
|
|
|
03-18-2015, 04:56 PM
|
#39
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
@amoretam
Yes you need last ore release version for Lua script. WIll add this onfo on my website
(edit: in fact you don't need the LATEST pre-release, but with it, you will be sure it works!)
Thanks for your support!
|
|
|
03-19-2015, 05:58 AM
|
#40
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,902
|
Br envelope
@Breeder
Hi! I tried to make a script using Br envelope but I'm stuck.
I used BR_EnvAlloc which seems to work fine,
but all I get from BR_EnvGetProperties is nil value.
Could you please take a look and tell me what I missed ? I'm sure it is a small thing but I can find it...
I put the file on GitHub.
X-Raym_Delete visible armed envelope points of selected tracks at time selection.lua
If you are ok, take a look line 75.
Thanks!
|
|
|
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 04:06 PM.
|