Old 07-22-2016, 05:06 PM   #1
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,525
Default MPL Align takes

Align takes is a Lua script for REAPER. Algorithm is based on matching RMS envelopes of dub takes and some reference take using stretch markers.

How to use it?
  • select items/takes
  • press 'Get'
  • move slider



Here is very nice video review by Antonio Petrole:
https://www.youtube.com/watch?v=-JJRpqR6DR0


You need to have at least 2 items placed on different tracks one under another. The reference item/take is upper take. You can also simultaneously work with any count of takes. The upper take will be also reference item/take for them. "Can I give to this script any audio?" No. You need to prepare item/takes manually OR just click "Get" button and see what special "prepare" function will do.
Perfect situation:
  • ref. and dub takes with takerate = 1
  • ref. and dub takes without stretch markers
  • ref. and dub takes without snap offset
  • ref. and dub takes are not loop sourced
  • reference take edges over dub takes edges (so every point of dub take is beetween ref.take position and ref.take end)
After you pressed "Get" button, you should see ugly waveforms in script window. If you see vertical lines on syllables/transients, then congratulations - your takes ready to match each other. Move slider and see what happen. If you didn`t see then - try to play with settings, which are explained further. Press "+" button to extend window and change preferences.

Green knobs are parameters for detection syllables and transients start/end positions (I call them 'points' further, they represented as vertical lines on the waveform graph). RMS envelope ('envelope' further) of course have some window, so aligning non-macro stuff like drums is not a good example for this tool. Basically points added when envelope rise/fall (envelope always rising/falling so green knobs let you define when exactly to add points, i.e. define conditions for adding).
  • Scaling. Let you define how much do you wanna compress signal for detection. It does NOT compress actual take audio. More compression = rise/fall settings more sensitive. No compression = better for transient-like detection.
  • Threshold is linear "noise floor" for detected points, so it leave only points if the signal at this moment upper than threshold. It is represented on the graph. Lower threshold = more points.
  • Rise area. If signal rise/fall by value defined with Rise/Fall and Rise/Fall2 in this area, point will be added. Short time = more points. Long time = better for smooth vocal stuff.
  • Rise/Fall - linear gain/attenuation factor when checking Rise area for scaled envelope. Lower value = more points.
  • Rise/Fall2 - linear gain/attenuation factor when checking Rise area for original envelope. Lower value = more points.
  • Filter area - minimal space beetween detected points. Long time = less points.

Red knob is a parameter for main algorithm.
  • Search area means how far possible stretch markers can be moved from the detected points. Short time = tiny alignment.

Blue knobs are parameters for building envelope
  • First selector allow to change type envelope beetween RMS envelope and FFT (sum of spectrum bins values) envelope.
  • Second selector allow to change algorithm. First algo get every block beetween 3 closest points and find best fit by moving center point. Second algo use same technique, but get blocks one-by one and calculate best fit potential stretch markers position relative to previously stretched blocks (sorry cant explain better even on my native Russian).
  • RMS window is how much samples taken to calculate average for every envelope point. Lower window = better point detection. Higher window = better for long phrases and non-transient-look stuff.
  • FFT size is number of FFT bins.
  • HP and LP control FFT edges.
  • Smooth knob control smoothing final envelope for detection rise/fall points. More smooth = slightly better performance.

With version 1.110+ you can also save your presets and share them to others (configuration is stored within script path).



Source. Script accessible via ReaPack extension also.
Version without GUI acts like an single action (using defaults setting it get/prepare takes on start > calculate points > calculate best fit > add points as stretch markers)

Requirements: Reaper 5.20+ / SWS 2.7.3+
Donate is you like it. Thanks.

Michael.

__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 12-14-2018 at 01:38 PM.
mpl is offline   Reply With Quote
Old 07-22-2016, 06:15 PM   #2
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,744
Default

WOW! will look at this properly in the morning but just wanted to say well done on another amazing script!
__________________
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 07-22-2016, 06:51 PM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,031
Default

Very cool ! It seems pretty advanced ! Can't wait to test it :P

Thanks for sharing
X-Raym is offline   Reply With Quote
Old 07-22-2016, 10:08 PM   #4
semiquaver
Human being with feelings
 
Join Date: Jun 2008
Posts: 4,913
Default

looks incredible - excited to test...
semiquaver is offline   Reply With Quote
Old 07-23-2016, 12:23 AM   #5
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,772
Default

Amazing stuff mpl, thanks a million for your effort !
vanhaze is offline   Reply With Quote
Old 07-23-2016, 01:26 AM   #6
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,247
Default

Looking awesome
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is online now   Reply With Quote
Old 08-04-2016, 10:08 PM   #7
DANunconcious
Human being with feelings
 
Join Date: Apr 2016
Posts: 4
Default

Quote:
Originally Posted by mpl View Post
Align takes is a Lua script for REAPER. Its algorithm based on matching RMS envelopes of dub takes and some reference take using stretch markers.

since I stopped developing Warping Tool (which "Align takes" was part of) I decided to create dedicated thread for this part

So how to use it?
  • select takes
  • press 'Get'
  • move slider



You need to have at least 2 items placed on different tracks one under another. The reference item/take is upper take. You can also simultaneously work with any count of takes. The upper take will be also reference item/take for them. "Can I give to this script any audio?" No. You need to prepare item/takes manually OR just click "Get" button and see what special "prepare" function will do.
Perfect situation:
  • ref. and dub takes with takerate = 1
  • ref. and dub takes without stretch markers
  • ref. and dub takes without snap offset
  • ref. and dub takes are not loop sourced
  • reference take edges over dub takes edges (so every point of dub take is beetween ref.take position and ref.take end)
After you pressed "Get" button, you should see ugly waveforms in script window. If you see vertical lines on syllables/transients, then congratulations - your takes ready to match each other. Move slider and see what happen. If you didn`t see then - try to play with settings, which are explained further. Press "+" button to extend window and change preferences.

Green knobs are parameters for detection syllables and transients start/end positions (I call them 'points' further, they represented as vertical lines on the waveform graph). RMS envelope ('envelope' further) of course have some window, so aligning non-macro stuff like drums is not a good example for this tool. Basically points added when envelope rise/fall (envelope always rising/falling so green knobs let you define WHEN exactly to add points, i.e. define conditions for adding).
  • Scaling. Let you define how much do you wanna compress signal for detection. It is NOT compress actual take audio. More compression = rise/fall settings more sensitive. No compression = better for transients detection.
  • Threshold is linear "noise floor" for detected points. It is represented on the graph. Lower threshold = more points.
  • Rise area. If signal rise/fall by value defined with Rise/Fall and Rise/Fall2 in this area, point will be added. Short time = more points.
  • Rise/Fall - linear gain/attenuation factor when checking Rise area for scaled envelope. Lower value = more points.
  • Rise/Fall2 - linear gain/attenuation factor when checking Rise area for original envelope. Lower value = more points.
  • Filter area - minimal space beetween detected points. Long time = less points.

Red knob is a parameter for main algorithm.
  • Search area means how far possible stretch markers can be moved. Short time = tiny alignment.

Blue knobs are parameters for building envelope
  • First selector allow to change type envelope beetween RMS envelope and FFT (sum of spectrum bins values) envelope.
  • Second selector allow to change algorithm. First algo get every block beetween 3 closest points and find best fit by moving center point. Second algo use same technique, but get blocks one-by one and calculate best fit potential stretch markers position relative to previously stretched blocks.
  • RMS window is how much samples taken to calculate average for every envelope point.
  • FFT size is number of FFT bins.
  • HP and LP control FFT edges.
  • Smooth knob control smoothing final envelope.

With version 1.110+ you can also save your presets and share them to others (configuration is stored within script path).

Don`t forget it is totally FREE "native" alternative to SyncroArts ( Vocalign / RevoicePro ) $150+ software. So please donate if you use it and like it. Donate button open www.paypal.me/donate2mpl in your default browser.

Source. Script accessible via ReaPack extension also.

Michael.

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

HEllo! I'm new to Reaper, I just downloaded and install Reapack but can't figure out how to use this script or plugin like the video? Where is it located? how can I access it? Can someone please help me with this.... Thx!
DANunconcious is offline   Reply With Quote
Old 08-05-2016, 12:28 AM   #8
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,247
Default

Quote:
Originally Posted by DANunconcious View Post
-----------------------------

HEllo! I'm new to Reaper, I just downloaded and install Reapack but can't figure out how to use this script or plugin like the video? Where is it located? how can I access it? Can someone please help me with this.... Thx!
Please have a look here:
http://www.reaper.fm/videos.php#tzg9fifza0s
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is online now   Reply With Quote
Old 08-05-2016, 08:52 AM   #9
DANunconcious
Human being with feelings
 
Join Date: Apr 2016
Posts: 4
Default

Quote:
Originally Posted by G-Sun View Post
Thx for replaying but my question is: where do I open this plugin (or at least that's what it looks like in the video)? I know how to setup custom actions and run them, and I see the script align takes.lua in the action list but when I select 2 items, one on top of each other and hit run it gives me and error and I can't see the GUI like in the video with the knobs, Get button, etc.
DANunconcious is offline   Reply With Quote
Old 08-05-2016, 12:13 PM   #10
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,247
Default

Quote:
Originally Posted by DANunconcious View Post
Thx for replaying but my question is: where do I open this plugin (or at least that's what it looks like in the video)? I know how to setup custom actions and run them, and I see the script align takes.lua in the action list but when I select 2 items, one on top of each other and hit run it gives me and error and I can't see the GUI like in the video with the knobs, Get button, etc.
Ok, sorry. Then it's some sort of installation-error.
Do you have SWS installed?
Maybe reinstall the mpl-script(s) from ReaPack.
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is online now   Reply With Quote
Old 08-06-2016, 05:15 AM   #11
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,525
Default

DANunconcious, I guess you don`t have SWS extension installed.
You need at least Reaper 5.20+ and SWS 2.7.3+
I added this req to first post.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 02-19-2018, 04:11 AM   #12
Joystick
Human being with feelings
 
Joystick's Avatar
 
Join Date: Jul 2008
Location: Athens / Greece
Posts: 443
Default

Thank you so much for making this! Very cool!
__________________
Animating the air with sound. Using science, art, design, engineering and intuition.
www.soundfellas.com
Joystick is offline   Reply With Quote
Old 04-30-2018, 05:34 AM   #13
xinky
Human being with feelings
 
Join Date: Apr 2016
Posts: 31
Default

Is it possible to make script align items?
I mean.. I sometimes have to mix voice overs, and I have like 100 mastered orginal clips on 1st track, and 154 recorded on secound track. The problem is this 154 clips, are always 100 sentences, like in orginal, but sometimes it's cutted (without breaths) or serval clips are not in time (mismatched), or something. Now i spend a lot of time to only align this to orginal. Maybe I can do this automatically? waveforms are quite simmilar
xinky is offline   Reply With Quote
Old 05-01-2018, 12:04 AM   #14
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,525
Default

Quote:
Originally Posted by xinky View Post
Is it possible to make script align items?
I mean.. I sometimes have to mix voice overs, and I have like 100 mastered orginal clips on 1st track, and 154 recorded on secound track. The problem is this 154 clips, are always 100 sentences, like in orginal, but sometimes it's cutted (without breaths) or serval clips are not in time (mismatched), or something. Now i spend a lot of time to only align this to orginal. Maybe I can do this automatically? waveforms are quite simmilar
No, it is not possible for now.
As a woraround you can put each of editing tracks into subproject (one by one):
Select track > Action List > Track: Move tracks to subproject
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 05-02-2018, 05:41 AM   #15
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,031
Default

@Xinky
I wonder if a tool like PluralEyes could work for you. It is designed for video but maybe it can simply process audio ? It aims to sync various files based on audio and can work with long files and different audio quality (different mic etc)
X-Raym is offline   Reply With Quote
Old 05-15-2018, 09:46 PM   #16
barbaroja
Human being with feelings
 
barbaroja's Avatar
 
Join Date: Jul 2009
Posts: 271
Default

In vocal aligning the most important thing for me comes in respecting sibilants and plosives. If the algorithm had a way to detect, align and preserve such in a non destructive manner, would be awesome.

Thanks for a very useful item.
barbaroja 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:32 AM.


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