Old 08-28-2015, 08:33 AM   #1
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default MPL QuantizeTool - align anything to anything

QuantizeTool is a Lua script for REAPER.

It is designed to do some simple operations with internal objects. There are a lot of user cases, like:
- align MIDI notes to stretch markers
- implode items into edit cursor
- align envelope points to project markers
- etc...

Basic usage is:
1) Setup preset
2) select reference stuff
3) click "Get anchor points"
4) select stuff to align
5) click "Get targets"
6) tweak the knob

Requirements:
REAPER 5.95+
ReaPack 1.2+
Download: ReaPack.com (MPL`s repository is embedded into default ReaPack configuration)

Install:
  • run ActionList > ReaPack: Browse packages...
  • navigate and install (rightclick) QuantizeTool and Various_functions packages, then click 'Apply'
  • run ActionList > ReaPack: Synchronize packages

Telegram channel for MPL scripts: http://t.me/mplscripts_chat

Attached Images
File Type: jpg Untitled.jpg (59.1 KB, 3738 views)

Last edited by mpl; 06-15-2022 at 02:59 PM.
mpl is offline   Reply With Quote
Old 08-28-2015, 09:31 AM   #2
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

And big thanks to you also Michael, you've made a nice tool here.
xpander is offline   Reply With Quote
Old 08-28-2015, 10:36 AM   #3
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

Looks really cool and an enormous amount of work.

couldn't see a download button on that page so I copied and pasted into a text file. That site gets really unresponsive when selecting text, kinda weird.



edit - quick test on OSX
script makes reaper really slow to scroll, zoom or do anything
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog

Last edited by EpicSounds; 08-28-2015 at 10:45 AM.
EpicSounds is offline   Reply With Quote
Old 08-28-2015, 11:24 AM   #4
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

looking great!
good work!

I have a small suggestion for better code. It will make your life easier to update the texts:
For example to define the help1 variable. if you use this [===[ text ]===] you don't need to concatenate all the lines and insert \n at each line. example:

Code:
help1 = [===[
---------------- EN ----------------
1. What is it?
It`s LUA script for REAPER. I suppose you to have installed 
last version of REAPER and SWS/S&M extension (minimum REAPER
5.0 + SWS 2.8.0)
... etc
]===]
heda is offline   Reply With Quote
Old 08-28-2015, 05:01 PM   #5
analogexplosions
Human being with feelings
 
analogexplosions's Avatar
 
Join Date: May 2011
Location: Nashville
Posts: 360
Default

This looks amazing. I can't wait to try this out.
__________________
www.dungeonbeach.com
analogexplosions is offline   Reply With Quote
Old 08-29-2015, 12:58 AM   #6
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Thanks, heda, really didn`t knew that.
SmajjL, thank you too, I will think about how to realize this better (maybe like timesearch on long videos on youtube).

Last edited by mpl; 08-29-2015 at 01:14 AM.
mpl is offline   Reply With Quote
Old 08-29-2015, 01:25 AM   #7
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,585
Default

Can you use other tracks stretch markers as reference for target track? like spk77 quantize tool? For aligning vocals for example.
Btw great work and awesome tool!
Sexan is offline   Reply With Quote
Old 08-29-2015, 03:07 AM   #8
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Yes, it is also designed for.
You need:
1) change mode to "Global" (so reference points will be timeline-based, and pattern will not be generated from them)
2) get reference from markers (select item - click on script reference area str.markers button)
3) get destination stretch markers (select item - click on script destination area str.markers button)
4) move "apply" slider
5) if need, move "use gravity" area slider (so only markers which are closer to references points will be stretched, not all)

Though this way is not a good idea. I think now about special script for that (using rms peak comparison, creating additional stretch markers etc).

Last edited by mpl; 12-09-2015 at 07:49 PM.
mpl is offline   Reply With Quote
Old 08-29-2015, 03:50 AM   #9
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,585
Default

Yeah it works great!
But maybe it would be good to add buttons above or something similar "Set Selected Tr. as Reference" and "Set Selected Tr. as Destination" (or get track names)
You don't know which is which if they have same number of stretch markers.
Anyway great work!
Sexan is offline   Reply With Quote
Old 08-29-2015, 03:59 AM   #10
beingmf
Human being with feelings
 
beingmf's Avatar
 
Join Date: Jul 2007
Location: Jazz City
Posts: 5,065
Default

Quote:
Originally Posted by SmajjL View Post
Holy shit! mpl that is some work! thank you so much for sharing!
Thankfully someone typed this for me +1
__________________
Windows 10x64 | AMD Ryzen 3700X | ATI FirePro 2100 | Marian Seraph AD2, 4.3.8 | Yamaha Steinberg MR816x
"If I can hear well, then everything I do is right" (Allen Sides)
beingmf is offline   Reply With Quote
Old 08-29-2015, 05:06 AM   #11
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Amazing tool! Absolutely top job and brilliant work!

can't wait to try it out and spread the word!
__________________
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 08-29-2015, 02:18 PM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

A big bravo to mpl : you totally nailed it
You now to have a swinging song on your soundcloud as a demo of this tool :P
X-Raym is offline   Reply With Quote
Old 08-29-2015, 05:05 PM   #13
Stevie
Human being with feelings
 
Stevie's Avatar
 
Join Date: Feb 2015
Location: Ukraine, Russia
Posts: 255
Default

well done body
maybe some day it's gonna be a new vocalign for a Reaperppl, atleast i hope so

Last edited by Stevie; 08-29-2015 at 05:24 PM.
Stevie is offline   Reply With Quote
Old 08-30-2015, 12:21 AM   #14
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

TESTING NOW. THANKYOU MIKHAIL!!


Edit:
Hmmm, it seems to look wrong when I load it. I tried to resize the window to make it wider, but it just enlarges the frame, but not the contents.

__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]

Last edited by daxliniere; 08-30-2015 at 12:26 AM.
daxliniere is offline   Reply With Quote
Old 08-30-2015, 12:25 AM   #15
sinkmusic
Human being with feelings
 
sinkmusic's Avatar
 
Join Date: Feb 2006
Location: decepticon mothership in a hidden place inside a mountain
Posts: 3,754
Default

Fantastic !
I will try this today, thank you !
sinkmusic is offline   Reply With Quote
Old 08-30-2015, 12:25 PM   #16
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

daxliniere, knew this bug, just forget))
Hope I`ll fix it this week.

Stevie, I saw Vocalign only on youtube. If it works via creating stretch marker and snapping them, then my script already can do this (see posts above). But if Vocalign`s algorithm is more complex (fft or something), then it needs to build something other.

Last edited by mpl; 08-30-2015 at 01:53 PM.
mpl is offline   Reply With Quote
Old 08-30-2015, 04:47 PM   #17
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

The only bug I've found so far is more a GUI thing.

If I grab the quantize slider at the bottom and drag it all the way right, my mouse cursor always triggers the second page of options as the "button" is next to the furthest right of the slider.

That's the only thing so far in this great tool!
__________________
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 08-30-2015, 05:37 PM   #18
semiquaver
Human being with feelings
 
Join Date: Jun 2008
Posts: 4,923
Default

very nice indeed!


!!
semiquaver is offline   Reply With Quote
Old 08-30-2015, 07:17 PM   #19
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

Quote:
Originally Posted by mpl View Post
Stevie, I saw Vocalign only on youtube. If it works via creating stretch marker and snapping them, then my script already can do this (see posts above). But if Vocalign`s algorithm is more complex (fft or something), then it needs to build something other.
OMFG, that would be incredible. No, Vocalign doesn't use any FFT tricks, etc, at least not for timing adjustments. The latest versions do pitch as well, but to be honest, just a tool that does automatic timing adjustments would be amazing.

Thanks for thinking about it Mikhail!
Definitely a donation coming from me if you can pull it off.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 08-31-2015, 11:38 PM   #20
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Finally I tried demo of vocalighn. Seems to be it uses only RMS power for detecting (without FFT, though I already built this).

So, can anyone post me some rough recorded main and back vocal for testing mpl Alignment/Warping Tool ?

Last edited by mpl; 09-01-2015 at 03:28 AM.
mpl is offline   Reply With Quote
Old 09-01-2015, 03:39 AM   #21
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

Quote:
Originally Posted by mpl View Post
Finally I tried demo of vocalighn. Seems to be it uses only RMS power for detecting (without FFT, though I already built this).

So, can anyone post me some rough recorded main and back vocal for testing mpl Alignment/Warping Tool ?
Yes, I'll get you some.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 09-02-2015, 03:52 AM   #22
MCCY
Human being with feelings
 
Join Date: Apr 2009
Posts: 316
Default

Is it possible to get older versions? I missed some and somehow the newest makes problems for me I can't really define right now...
MCCY is offline   Reply With Quote
Old 09-02-2015, 04:08 AM   #23
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Quote:
Originally Posted by mpl View Post
Finally I tried demo of vocalighn. Seems to be it uses only RMS power for detecting (without FFT, though I already built this).

So, can anyone post me some rough recorded main and back vocal for testing mpl Alignment/Warping Tool ?
Very anxious to hear your findings !
Would be loud out amazing if your tool can do vocaligning !
vanhaze is offline   Reply With Quote
Old 09-02-2015, 04:26 AM   #24
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

https://github.com/MichaelPilyavskiy...ntize_Tool.lua

MCCY, what problems do you have with last version?
mpl is offline   Reply With Quote
Old 09-02-2015, 07:16 AM   #25
MCCY
Human being with feelings
 
Join Date: Apr 2009
Posts: 316
Default

ah, seems to work anyway. It did really strange things before, don't know why. Could you again explain the "Global timeline" vs "Local Pattern" thing ? Don't get it... Is it just the visuals?
MCCY is offline   Reply With Quote
Old 09-02-2015, 07:53 AM   #26
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

I can't get it to work.
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 09-02-2015, 03:53 PM   #27
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

G-Sun,
for some reasons it doesn`t work with snap more than 1. So I put error message, 1.04 should show it properly (same link).

MCCY, the visuals I see still have wrong behaviour in pattern mode, I`ll try to "fix" it later.
Here is behaviour for Snap Direction: to closest point, Snap Area: Snap everything



Check also this


Last edited by mpl; 09-03-2015 at 12:16 AM.
mpl is offline   Reply With Quote
Old 09-03-2015, 04:19 AM   #28
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Quote:
Originally Posted by mpl View Post
G-Sun,
for some reasons it doesn`t work with snap more than 1. So I put error message, 1.04 should show it properly (same link).
Thanks! Got it.
Awesome work!

Sort of bug: Select stretch-markers for Q,
then manually adjusting one point.
It then gets forced back to previous position.
An update-button?
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 09-03-2015, 06:03 AM   #29
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

G-Sun, select stretch-markers for Q once again.
I did it to prevent sort of quantize feedback, because script is persistent. Wrote that in "Help".
If I left it as is (always updated destination objects), it could quantize your stretch markers, then quantize they once again, etc. until you don`t release apply slider or any other slider.

Last edited by mpl; 09-03-2015 at 06:18 AM.
mpl is offline   Reply With Quote
Old 09-03-2015, 02:09 PM   #30
David Else
Human being with feelings
 
Join Date: Mar 2012
Posts: 610
Default

THANKS!!! Look forward to trying this out.
__________________
----------> Debian Linux Distribution = Computing Joy & Freedom <----------
David Else is offline   Reply With Quote
Old 09-04-2015, 04:40 AM   #31
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Quote:
Originally Posted by mpl View Post
G-Sun, select stretch-markers for Q once again.
I did it to prevent sort of quantize feedback, because script is persistent. Wrote that in "Help".
If I left it as is (always updated destination objects), it could quantize your stretch markers, then quantize they once again, etc. until you don`t release apply slider or any other slider.
Ok, so I should close the script.
Make changes/delete, then open it again?

And is there an option for "Select stretch markers in time selection" or "Manually selected stretch markers"?
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 09-04-2015, 12:49 PM   #32
Javi_Metal
Human being with feelings
 
Join Date: Sep 2014
Posts: 18
Default

Hi, and thanks for your work!

However, an error message pops up everytime I try to run it.



Does it happen to anyone else?

Thank you in advance!
Javi_Metal is offline   Reply With Quote
Old 09-04-2015, 05:27 PM   #33
David Perry
Human being with feelings
 
Join Date: Oct 2010
Posts: 272
Default

Thanks very much, this is incredible!

Someone should tell Kenny Gioia about this.
David Perry is offline   Reply With Quote
Old 09-04-2015, 06:50 PM   #34
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

G-Sun, no, you shouldn`t:



Quote:
And is there an option for "Select stretch markers in time selection" or "Manually selected stretch markers"?
Version 1.05:
added get reference str.marker from selected item / time selection of selected item,
added quantize str.marker from selected item / time selection of selected item
Javi_Metal, you didn`t copypaste script right.
I see a lot of times people ask this question, but don`t understand where and how they copy the code to get this error. There is no "<" symbol in the fourth line ever, as you can see clicking on link in the first post. What I using - open link in first post, then rightclick in browser under text and press Save As or something like this and save it directly as mpl_Quantize_Tool.lua (of course without .txt extension)

Last edited by mpl; 09-04-2015 at 09:12 PM.
mpl is offline   Reply With Quote
Old 09-06-2015, 10:24 AM   #35
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Thanks for the explanation Michael!

Your work seems very valuable to me. In fact, I guess I wouldn't have bought a Studio One license last year if this script was around. So, kudos!
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 09-06-2015, 12:13 PM   #36
David Else
Human being with feelings
 
Join Date: Mar 2012
Posts: 610
Default

This script is amazing, really hope it can expand and become the groove tool that Reaper has always been desperate for! Nearly there too

Really looking forward to these from your official TODO:

-- when groove - point groove name in menu, right click for type name
-- click on usergroove display list of all grooves in /reaper/grooves
-- save pattern as rgr (rgt?)

Anything that makes saving/loading/previewing user grooves easier.

I have my own requests:

-- make double click reset swing grid to 0%
-- import .mid as groove
-- a/b comparison button to compare subtle groove changes

MASSIVE THANKS for making this! If i get the chance to make a video tutorial at some point would that be ok?
__________________
----------> Debian Linux Distribution = Computing Joy & Freedom <----------
David Else is offline   Reply With Quote
Old 09-06-2015, 03:03 PM   #37
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

David Else, sure, tutorial will be a really big thanks for me.

Ok, about grooves for Groove Tool - with the help of spk77 i found a bug, so I can do a list of grooves in directory only in Reaper x64. That is not ok. Waiting for bugfix from Cockos. Save as rgt - later

Quote:
-- make double click reset swing grid to 0%
You can RightClick on swing -> "Enter". DoubleClicking is not so easy to realize here.
Quote:
-- import .mid as groove
Sorry, I can`t read any binary with lua directly. So you can import .mid into a project -> get refererence from notes
Quote:
-- a/b comparison button to compare subtle groove changes
You can rightclick/leftclick on Apply Slider at the same place to apply/restore changes, this is "bypass" implementation here.

Last edited by mpl; 09-06-2015 at 03:15 PM.
mpl is offline   Reply With Quote
Old 09-06-2015, 03:33 PM   #38
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,924
Default

You would need to read in the .mid file and "parse" the tempo/timing info. Ambitious, but possible I guess. I've read-in wav files in EEL, for the headers and metadata REAPER can't give me

This script looks very good, very impressive.


I need to knuckle down and get writing in Lua...




>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine is offline   Reply With Quote
Old 09-06-2015, 03:51 PM   #39
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

planetnine, no problem to turn something like this
Quote:
MFile 0 1 960
MTrk
600 On ch=1 n=56 v=96
1200 Off ch=1 n=56 v=0
5760 On ch=1 n=51 v=96
6480 Off ch=1 n=51 v=0
9600 Par ch=1 c=123 v=0
9600 Meta TrkEnd
TrkEn
into reference points. Problem is how to get it directly from .mid
If you know something about how to do that at least in EEL, please tell
mpl is offline   Reply With Quote
Old 09-06-2015, 04:27 PM   #40
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,924
Default

Quote:
Originally Posted by mpl View Post
planetnine, no problem to turn something like this
...
into reference points. Problem is how to get it directly from .mid
If you know something about how to do that at least in EEL, please tell

Do you know much about the format and structure of .mid files? -I'm afraid that's something I'm not familliar with at this time.

Reading them in as data and deconstructing them is probably something I can help with if you know something of their structure. It should be easy enough to read the source .mid file name and path from the item and open it.

Let me read up on .mid and I'll get back to you.


Edit: it seems to be straightforward header and track data in simple binary format. Can you post me a couple of example .mid files please, and I'll pull the wav file reading functions out of one of my scripts and modify them to give you ASCII lines?





>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.

Last edited by planetnine; 09-06-2015 at 04:33 PM.
planetnine 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 03:20 AM.


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