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

Reply
 
Thread Tools Display Modes
Old 08-11-2022, 08:05 AM   #1
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default Split item at mouse cursor position ( use defined crossfade and selection settings)

Hello to all! Been away for some time...

There are many actions to split an item that differ on which item should be selected after the split (left, right or no change). If auto-crossfades are enabled then Reaper always places the auto-crossfade after the split (on the right side).

This script simplifies and unifies all available split actions to just one, adding the ability to define if the auto-crossfade will be on the left side, on the right side, or centered at the split point. So, with just one shortcut key, you can have any of these possibilities depending on the settings defined by the additional script.

The additional script has a dependency on js_ReaScript_API

You can find both scripts in ReaPack.

__________________
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 08-22-2023, 11:07 AM   #2
SergeiSobchenko
Human being with feelings
 
Join Date: Feb 2018
Location: Ukraine
Posts: 196
Default

Wow! Great script, amagalma! Thanks for this!

Is it hard to make a version of this script that will split items on grid? I mean with snapping to grid.
Coz now "Options: Toggle snapping" action does not help.
SergeiSobchenko is offline   Reply With Quote
Old 08-24-2023, 03:01 PM   #3
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Done in v1.02
Just choose "snap to grid respected":



And here is a function that returns the expected crossfade length.

If you find it useful, consider a donation. Thanks!
__________________
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 08-24-2023, 10:38 PM   #4
SergeiSobchenko
Human being with feelings
 
Join Date: Feb 2018
Location: Ukraine
Posts: 196
Default

Quote:
Originally Posted by amagalma View Post
Done in v1.02
Just choose "snap to grid respected":
Thank you! The donation has been sent

Works well!
One more thing. I usually use F for split with snap to grid and SHIFT+F to split without snapping(just two different shortcuts). Can it be two versions of this script (with and without snapping)? Or maybe there are some other solutions possible?
SergeiSobchenko is offline   Reply With Quote
Old 08-26-2023, 04:49 AM   #5
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Let the script to always respect snapping and then make two SWS cycle actions"

This is to always cut without respecting the snapping setting:


Make the other one accordingly
__________________
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 08-26-2023, 11:24 AM   #6
SergeiSobchenko
Human being with feelings
 
Join Date: Feb 2018
Location: Ukraine
Posts: 196
Default

Quote:
Originally Posted by amagalma View Post
Let the script to always respect snapping and then make two SWS cycle actions"
Thanks a lot, amagalma! A simple, but effective solution)
SergeiSobchenko is offline   Reply With Quote
Old 08-27-2023, 04:25 AM   #7
SergeiSobchenko
Human being with feelings
 
Join Date: Feb 2018
Location: Ukraine
Posts: 196
Default

I don't quite understand what is it for?
SergeiSobchenko is offline   Reply With Quote
Old 08-27-2023, 06:39 AM   #8
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

It may be useful only to other scripters..
__________________
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
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 12:29 PM.


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