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

Reply
 
Thread Tools Display Modes
Old 11-14-2017, 09:57 AM   #1
andyp24
Human being with feelings
 
andyp24's Avatar
 
Join Date: Mar 2016
Posts: 1,239
Default Script Request for moving an item to end of previous - WITH RIPPLE (X-Raym?)

Hi all you clever coders:

Is it possible to achieve this?

Say I've got two items on the same track "next to each other" (ie nothing in between them on that track). They may butt up to each other with no space, they may overlap, or there may be a gap between them.

I'd like an action or macro that can reliably move the second item (ie the one whose start time is later) so that it butts up to the end of the first. In other words, if they overlap it would be moved later ; if there is a gap between them, it would move earlier; if they were already butted up it would not move.

When moving the item, all other items on the playlist should Ripple according to the current setting.

Ideally, after moving to butt up, the left edge of the second item would then be extended to the left by a specified amount so as to overlap/crossfade the two items.



I can't see a way to do this "automatically" with existing actions. I don't mind whether both items have to be selected or just one for this to work.

Any genius ideas please?

Thanks
Andy

Last edited by andyp24; 11-15-2017 at 11:15 AM.
andyp24 is offline   Reply With Quote
Old 11-14-2017, 02:14 PM   #2
andyp24
Human being with feelings
 
andyp24's Avatar
 
Join Date: Mar 2016
Posts: 1,239
Default

It looks like X-Raym's scripts for moving an Item to next/previous Item on track may be useful here, but what I can't figure out is how to get it to know which direction the script should move the second clip (to the right if there's an overlap, to the left if there's a gap)

Hope someone can give me an idea.

Thanks
Andy
andyp24 is offline   Reply With Quote
Old 11-14-2017, 04:21 PM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,093
Default

This any good (post #2) ? Maybe I misunderstand...

https://forum.cockos.com/showthread.php?t=194547
nofish is offline   Reply With Quote
Old 11-15-2017, 09:15 AM   #4
andyp24
Human being with feelings
 
andyp24's Avatar
 
Join Date: Mar 2016
Posts: 1,239
Default

Hi Nofish.

Thanks for the response. That seems to do nearly what I need EXCEPT I would like it not to bring up the dialogue box, but ALWAYS to use the "End/ 0.0s" option.

Is there any way to hack it to do this as a separate action?

EDIT - Also, Ripple settings for subsequent Items are not obeyed.... so it's not much use to me.

Cheers
Andy

Last edited by andyp24; 11-15-2017 at 11:12 AM.
andyp24 is offline   Reply With Quote
Old 11-15-2017, 11:10 AM   #5
andyp24
Human being with feelings
 
andyp24's Avatar
 
Join Date: Mar 2016
Posts: 1,239
Default

Further investigation:

I've found X-Raym's script - "X-Raym_Snap selected items to the previous item end on their track"

This works in all respects except subseqent Items don't Ripple, whatever the Ripple setting is.....

Andy
andyp24 is offline   Reply With Quote
Old 11-17-2017, 05:13 AM   #6
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,866
Default

Work in Progress :

X-Raym is offline   Reply With Quote
Old 11-22-2017, 03:32 PM   #7
andyp24
Human being with feelings
 
andyp24's Avatar
 
Join Date: Mar 2016
Posts: 1,239
Default

Great stuff from X-Raym there.

I sponsored the development of a couple of Custom Scripts from him for this purpose and am currently testing how best to integrate them into my workflow.

Happy days :-)

Andy
andyp24 is offline   Reply With Quote
Old 11-23-2017, 01:05 AM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,866
Default

Many thanks for your sponsoring andy! Have fun with the scripts

I also made a X-Raym_Set selected items snap offset to their fade-in position.lua, simple but very handy with custom actions, I'll surely publicly release it in a pack later.
X-Raym 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 08:58 PM.


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