Old 05-11-2015, 09:14 AM   #1
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Script (Lua): Scripts for Layering

Hi !

Here a new script that can be very useful to everyone working in sound design !

Context
One of the trick to have "larger than life" sounds in sound design is to practice Layering. You put sounds one other the other and you have a powerful result.
For example, if you want a huge punch hit sounds, you will not only record the sounds of a punch, but you will also consider record other sounds, with more bass, or with more details, such as punching vegetables, fruits, eggs or this kind of stuff, depending on your needs.

Concept
If you need to prepare a lots of similar "larger than life" sounds for the same purpose, (for eg, explosions), you will end with groups of items (for eg, 10 groups of 3 items one of top of each other).
You can build a lot of these extra-sounds by duplicating layers of one, and put it with layers of another etc..., so no need to have 10 sounds for each layers (tracks) to produce 10 extra sounds. A bit of randomization and you can build a lot more, all uniques. Sure, some of their layer is already use somewhere, but it can be completely transparent for the casual listener, due to masking effects occuring with the other sounds. You can also add a touch of pitch/playrate randomization on all this to make sure it is even more transparent.

There is Xenakios/SWS functions to shuffle items order, which is nice, but they don't leav items on their tracks (they treat item selection as the whole) and they don't work with snap offset, but only with item position.

As I used snap offset a lot in sound design (to synchronize rises and hits), I decided to make a script for shuffling order of items with their item snap., and so, to builds a lot of layered sounds from few items

Script
  • X-Raym_Shuffle order of selected items keeping snap offset positions and parent tracks.lua

Demo


Download
See my signature.
For manual installation, look for the script in Item Editing folder.
Note that you will soon be able to follow my scripts updates with a special RSS feed !



Aknowledgement
Thanks to Rob Miracle who put the code snippet online a nice article about shuffling datas in a table in Lua !

Tutorial: How to Shuffle Table Items | Corona Lab

Going Further
It could be interesting to have a script that do the same thing but which can output all possible configuations. But it may be way harder to code :P

Thank you for your support,

Cheers!

Last edited by X-Raym; 05-27-2015 at 12:48 AM. Reason: new title
X-Raym is offline   Reply With Quote
Old 05-19-2015, 02:36 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Script (Lua): Align selected items across tracks

Here is another script dedicated to layering, and that will be veryyy useful, in both electronic music and sound design:

  • X-Raym_Align selected items across tracks.lua
aka "Align items positions vertically, using their snap offset"

Demo:




What do you think of that ?

EDIT (2015-05-20)
Two new scripts useful for layering and sound design:
  • X-Raym_Set item under mouse snap offset at mouse cursor position.lua
  • X-Raym_Toggle selected active takes reverse preserving snap offset.lua

EDIT 2015-06-10: V1.1 update : now snap at stretch markers if mouse over it.
Demo:


Demo:





EDIT: 2015-05-26

I just made a new script for layering purpose !
The idea is to group items depending on their position in selection per track !
  • X-Raym_Group selected items according to their order in selection per track.lua

Demo:



------------

EDIT: 2015-06-09

Items file cue markers points. That's powerful ! I just noticed that there soooo few action involving them. And no API at all !!
We could make so much thing this way to get infos from them !

Well, with the native actions, I succeed to make two scripts:

  • X-Raym_Move selected items snap offset to next cue.lua
  • X-Raym_Move selected items snap offset to previous cue.lua

Demo:


------

EDIT: 2015-06-09

Here is a script perfect for sound designer and people who build sample libraries: create marker from snap offset ! The idea is then to make a render with BWF bext marker so that the file is render

  • X-Raym_Create markers at selected items snap offset.lua

Demo:


------

EDIT: 2015-06-09
We have fun by suffleing items... Now let's sort them in order !
And two other scripts for sample libraries builder :

  • X-Raym_Sort selected items order by takes names alphabetically keeping snap offset positions per tracks.lua
  • X-Raym_Sort selected items order by item notes alphabetically keeping snap offset positions per tracks.lua

Demo:


(thanks to heda for the Lua table trick :P)


UPDATE (2015-26-06)
A script that may be useful for people who made layering and use effects such as reverb on a send track.

X-Raym_Fade out master envelope at each selected items end.lua

This will assure you to not have any click at region export !

Want to see my workflow ?

  • X-Raym_Shuffle order of selected items columns keeping snap offset positions and parent tracks.lua
  • X-Raym_Sort selected items columns order by item names alphabetically keeping snap offset positions per track.lua
  • X-Raym_Sort selected items columns order by item notes alphabetically keeping snap offset positions per tracks.lua


  • X-Raym_Toggle selected active takes reverse arround snap offset.lua
.

Any donation is welcome Thanks for Helping me scripting more and more

Last edited by X-Raym; 12-05-2015 at 08:27 AM.
X-Raym is offline   Reply With Quote
Old 05-19-2015, 03:14 PM   #3
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,241
Default

great scripts!
I am ready to start producing larger than life sounds now
heda is offline   Reply With Quote
Old 05-19-2015, 03:56 PM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@heda
I'm waiting for your demo :P
X-Raym is offline   Reply With Quote
Old 05-20-2015, 03:48 AM   #5
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default

X-RayM,

Nice.

My way of doing that uses position of item, not it's snap offset for alignment.

Your way seems more sensible and is also only one keystroke whereas my method needs two.
__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 05-20-2015, 05:46 AM   #6
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Very good script, already use it a lot. Thanks
5 years ago I did these things in NI Reaktor, glad these really bad times are gone))
mpl is offline   Reply With Quote
Old 05-20-2015, 09:31 AM   #7
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

I just updated my first post with two new script for Editing Items with Snap Offset in mind :P

  • X-Raym_Set item under mouse snap offset at mouse cursor position.lua
  • X-Raym_Toggle selected active takes reverse preserving snap offset.lua
Screenshots in my second post !


I also updated my reaperKeyMap so that you can only load it to updates all my scripts in your config (if you placed the scripts inside the default scripts folders).


@mrlimbic
Snap offset is sooo useful, especially when setting Risers with reverb type of sounds :P

@mpl
I'm glad to hear it
Have fun with it !
X-Raym is offline   Reply With Quote
Old 05-26-2015, 07:50 AM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

One another sound design layering related new script :

  • X-Raym_Group selected items according to their order in selection per track.lua
Screenshot and explanation in second post


Note for scripters: this script has code that enable looping through selected items on selected track, for example you can say "get second item selected in first selected track". Default functions in the API allow looping through item selection, globally, not on a per track basis.
I guess nice mods of this script can be imagined :P

Last edited by X-Raym; 05-26-2015 at 08:06 AM.
X-Raym is offline   Reply With Quote
Old 05-26-2015, 08:28 AM   #9
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

And one another script, very useful for rises and hits !

  • X-Raym_Toggle selected active takes reverse arround snap offset.lua
Demo: See second post or click this link.


The idea is to reverse take, while keeping the snap offset absolute position in place, and and the same item content audio point under snap than before the reverse.


Siple, but effective
X-Raym is offline   Reply With Quote
Old 05-26-2015, 08:46 AM   #10
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,241
Default

simple.. effective and AWESOME!

If you continue making scripts at this rate we are definitively going to need More toolbars AGAIN Because for me at least it is becoming hard to remember all the ever increasing number of keyboard shortcuts.

It would be great if we could forget about toolbars and create some panels scripts with UI, dockable of course, with customizable buttons of all your scripts. You could create one panel for each category of your scripts. For example Sound Design Panel, where all the buttons to call the scripts would be there already, and then if you update and add one script, the panel would detect the file, read some metadata in it, and add the button automatically. It could support drag and drop to reorder the buttons.
heda is offline   Reply With Quote
Old 05-26-2015, 11:19 AM   #11
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Thanks for your support

Well, as I update a reaper keymap at every new script, I am able to share toolbars of scripts / actions and other nice thing, you only need to import the key map to put new scripts in. bad news : it does't update script actually in place if infos changed (file name).

You have great ideas about toolbars. I'm not into UI scripts, I wonder what would be possible.
Meanwhile, some small but effective updates could be made by Cockos :P
X-Raym is offline   Reply With Quote
Old 06-09-2015, 03:14 AM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Three new scripts showcase in post 2, for sound libraries builder, and samples libraries users !
  • X-Raym_Move selected items snap offset to previous cue.lua
  • X-Raym_Move selected items snap offset to next cue.lua
  • X-Raym_Create markers at selected items snap offset.lua
Anyone interested by these ?

EDIT:

Oh yes and I forget:
  • X-Raym_Sort selected items order by takes names alphabetically keeping snap offset positions per tracks.lua
  • X-Raym_Sort selected items order by item notes alphabetically keeping snap offset positions per tracks.lua


Last edited by X-Raym; 06-09-2015 at 03:31 AM.
X-Raym is offline   Reply With Quote
Old 06-10-2015, 05:17 AM   #13
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Update

  • X-Raym_Set item under mouse snap offset at mouse cursor position.lua v1.1
Now is able to snap at item stretch marker if mouse over if, which is very handy when using dynamic split (without splitting) to add stretch markers at item transient, or at zero crossing.


Screenshot updated in post 2 !
X-Raym is offline   Reply With Quote
Old 06-11-2015, 06:15 AM   #14
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Hi X-Raym,

This script looks to be very useful, thanks!

I had a quick look through your other stuff and was wondering if you have a version of this script that will swap the selected items around randomly instead?

For me it's the same area as you I'm using it for things like multiple gun shots in a game (video of the game) and wanted to have a quick way of randomising which of the lined up sounds are used.

I'm sure there's another way to do this too already in reaper perhaps but can't for the life of me recall how

Thanks.
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 06-11-2015, 06:44 AM   #15
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
Originally Posted by musicbynumbers
This script looks to be very useful, thanks!
Oh yes they are And you are welcome

Quote:
if you have a version of this script that will swap the selected items around randomly instead?
Can you develop a bit ? I don't see the difference with the original shuffle items scripts I made. Shuffling is a sort of randomization, the output value are taken from the actual items position, and then reassigned randomly for each tracks.
There is other action to shuffle/swap items in SWS, such as the FNG rotate items, but none of these works with items "parent track" preservation (items can change be assigned to another track), which is not what we need for this kind of worflow.

I am building a "column" version of the suffle items thing, that will preserve item layering though the process (but the position of this "items columns" will be suffle). Surprisingly it is way more difficult ^^
X-Raym is offline   Reply With Quote
Old 06-11-2015, 07:48 AM   #16
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

That all sounds awesome and very useful!

The main thing for me was to have all item positions kept the same but for the items themselves to be switched around and for the item lengths to adapt to be the same as the item they have now become.

Your "shuffle order.." is working and the only difference would be for it to be random rather than "shuffled".

I'll try and capture a vid of it at some point as I don't have time to explain well now or anything much at all! deadlines are drawing near!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 06-11-2015, 08:05 AM   #17
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Just finished the Shuffle column and Sort columns by names and Sort columns by notes I will make screencapture soon !

I my scripts, Items absolute snap offset is preserved, but items are suffled. All their properties (length) stay the same.
I don't use item position, as I prefer the power of Snap Offset, wich is very useful for synchronizing rises and hits. Note that if snap = 0, then absolute snap offset would be the same as position.

I'm wainting for your screencapture so that it would be more clear for me

Quote:
deadlines are drawing near!
Good luck with it !!
X-Raym is offline   Reply With Quote
Old 06-25-2015, 09:00 AM   #18
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Public Release for:
  • X-Raym_Move selected items snap offset to next cue.lua
  • X-Raym_Move selected items snap offset to previous cue.lua
Please consider making a donation if you like+use my work It will definitely help me release new scripts.

Cheers !
X-Raym is offline   Reply With Quote
Old 06-25-2015, 03:35 PM   #19
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

A script that may be useful for people who made layering and use effects such as reverb on a send track.

  • X-Raym_Fade out master envelope at each selected items end.lua
This will assure you to not have any click at region export !

Want to see my workflow ?
Screenshot here.
X-Raym is offline   Reply With Quote
Old 06-25-2015, 03:50 PM   #20
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Three new scripts for shuffling/sorting column of items according to first row if items in the column (first track)
(once again, the purpose is sound design layering in context of a sound library creation)
  • X-Raym_Shuffle order of selected items columns keeping snap offset positions and parent tracks.lua
  • X-Raym_Sort selected items columns order by item names alphabetically keeping snap offset positions per track.lua
  • X-Raym_Sort selected items columns order by item notes alphabetically keeping snap offset positions per tracks.lua

Screenshot

Surprisingly, this was WAAAyyyy harder than the first version of this script.
The code is a bit ugly but.. it works

Thanks in advance for any feedback/donations.
X-Raym is offline   Reply With Quote
Old 10-03-2015, 09:48 PM   #21
whutuneed
Human being with feelings
 
Join Date: Dec 2013
Posts: 21
Default X-Raym_Align selected items across tracks.lua

X-Raym_Align selected items across tracks.lua

Auto Align Vocals in a second yes
whutuneed is offline   Reply With Quote
Old 10-04-2015, 03:23 AM   #22
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

It works based on snap offset position, there is no peak detection in it.
X-Raym is offline   Reply With Quote
Old 12-28-2015, 10:42 AM   #23
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Script Update

A script update :

Align selected items across tracks

Code:
 * Changelog:
 * v1.1 (2015-12-28)
    + Track under mouse as reference


Previous version only took track 1 as reference. it is more flexible this way
X-Raym is offline   Reply With Quote
Old 01-07-2016, 06:09 AM   #24
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

If anyone if using my shuffle items across tracks scripts, I am working a way to preserve relative distance of items in groups
I just succeeded to make it for the Align items across tracks script,
Perfect for sound design when you want to shuffle (or align) items, but preserving some "composite items" (for eg, consecutive items grouped together) relative distance.

Here is a demo of the Align version, with and without groups activated :



In simple words: I find a way to preserve groups items timing while making time adjustment on selected items with a script. This could be port to any scripts that aims to move selected items in bulk with different values. Without this new thing, all groups timing (quantizing, randomisation, alignement, shuffling, rotation...) are broken. I wonder how we didn't notice that before :P
X-Raym is offline   Reply With Quote
Old 01-08-2016, 06:07 AM   #25
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Nice work! I'll update the package as this will come in handy at some point!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-11-2016, 08:24 AM   #26
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Scripts Update

Thanks to code I write for Moving selected items preserving groups timing relative positions,

here are updated scripts so that they can preserve items in groups relative positions (item group leader is determine by first selected in the groups according to time position):
  • X-Raym_Shuffle order of selected items columns keeping snap offset positions and parent tracks.lua
  • X-Raym_Shuffle order of selected items keeping snap offset positions and parent tracks.lua
  • X-Raym_Align selected items across tracks.lua


Some Demos:




Others scripts that could benefit from it would be updated if needed.

Hope you will find them useful,
please make a donation if you liked it

Cheers !
X-Raym is offline   Reply With Quote
Old 05-01-2016, 06:25 AM   #27
TheLongArm
Human being with feelings
 
Join Date: May 2012
Posts: 19
Default

Hi Raymond, apologies if this is the wrong place to post this, but I was thinking about the idea of a script that would do something like 'shuffle take FX chain' (and perhaps related take envelopes) across takes/items.
I can see it being an interesting and nice way to generate variations for sound design while maintaining some sonic consistency.
Especially when used in conjunction with dozens of your other great scripts
Thanks.
TheLongArm is offline   Reply With Quote
Old 07-30-2017, 10:45 AM   #28
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Thanks for this one:
Quote:
Group selected items according to their order in selection per track.lua
A life-saver for multitrack recording and grouping afterwards.

Could you please make a variant that leaves colors as is?
(So I can see what take is active)
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp

Last edited by G-Sun; 07-31-2017 at 12:19 AM.
G-Sun is offline   Reply With Quote
Old 07-30-2017, 01:59 PM   #29
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,813
Default

very nice ones!
deeb is online now   Reply With Quote
Old 07-31-2017, 09:28 AM   #30
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@G-Sun
Thanks

You can prevent colorization of items by deleting the line REAPER-ReaScripts/X-Raym_Group selected items according to their order in selection per track.lua at master · X-Raym/REAPER-ReaScripts · GitHub (or maybe it is the line above, I messed up with the commentsn but one of this action has to be deleted to prevent colorization --').

Let me know if it works for you.

@deeb
Thanks !
X-Raym is offline   Reply With Quote
Old 08-01-2017, 07:48 AM   #31
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

WoW!!!
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 08-01-2017, 01:52 PM   #32
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Quote:
Originally Posted by X-Raym View Post
@G-Sun
Thanks

You can prevent colorization of items by deleting the line REAPER-ReaScripts/X-Raym_Group selected items according to their order in selection per track.lua at master · X-Raym/REAPER-ReaScripts · GitHub (or maybe it is the line above, I messed up with the commentsn but one of this action has to be deleted to prevent colorization --').

Let me know if it works for you.
Thanks! I'll try it out
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 01-25-2018, 10:37 AM   #33
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

Quote:
Originally Posted by heda View Post
If you continue making scripts at this rate we are definitively going to need More toolbars AGAIN
No SH!T... my 16 are already full to the brim and most people could not even see them cuz I have big hi rez monitors....

OMG 32 TB's...????
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 01-25-2018, 02:51 PM   #34
foxAsteria
Human being with feelings
 
foxAsteria's Avatar
 
Join Date: Dec 2009
Location: Oblivion
Posts: 10,255
Default

Quote:
Originally Posted by hopi View Post
No SH!T... my 16 are already full to the brim and most people could not even see them cuz I have big hi rez monitors....

OMG 32 TB's...????
Checked out Lokasenna's Radial Menu? It's actually replacing a lot of my context toolbars and I don't think there's a limit to how many you can have. Pretty slick.
__________________
foxyyymusic
foxAsteria is offline   Reply With Quote
Old 12-06-2021, 02:37 AM   #35
Rodilab
Human being with feelings
 
Rodilab's Avatar
 
Join Date: Jan 2021
Location: Paris
Posts: 255
Default

Sharing with you two scripts that work well with X-Raym's layering editing scripts :
  • rodilab_Set items snap offset to max peak
  • rodilab_Implode items on same track into takes (align with snap offset)

This way I have one item with many takes. Then I can then use :
  • "Take: Switch items to next/previous take"
  • Or "SWS: Select takes in selected items, shuffled random"
  • And finish with "Item: Set item start/end to source media start/end" to fit





Rodilab is offline   Reply With Quote
Old 12-06-2021, 04:54 AM   #36
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@rodilab
Hi ! Thanks for your contribution on this thread !


I in fact already made X-Raym_Set selected items snap offset to max peak position.lua as part of my premium pack https://www.extremraym.com/en/downlo...-items-volume/ for this shuffle items/align items workflow,

but that is ok, it is not the most complex script of all, I'll surely have to free my version then.


The implode on same track though is good idea, and randomizing takes is quite nice too !
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 04:24 AM.


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