|
|
|
08-28-2014, 06:49 AM
|
#1
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
EEL: Quantize tool (for item positions)
Quantize tool- slider values from 0% to 100% -> quantizes selected items (positions) by X percent towards grid
- slider values from 0% to -100% -> unquantizes selected items (positions) by X percent away from grid
- ctrl + z to undo
- esc to close
Updates- 6-Sep-2015
- Now it uses BR_GetClosestGridDivision to get the closest grid
- removed unnecessary code
Download:
https://stash.reaper.fm/21649/Quantiz...%20percent.eel
Last edited by spk77; 09-06-2015 at 09:17 AM.
|
|
|
08-28-2014, 07:00 AM
|
#2
|
Human being with feelings
Join Date: May 2010
Location: Norway
Posts: 7,318
|
Cool
Stretch-markers?
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
|
|
|
08-28-2014, 07:04 AM
|
#3
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by G-Sun
Cool
Stretch-markers?
|
Thanks Hmm.. what do you mean by "stretch-markers"?
Edit: Is that "Quantize stretch markers by X percent towards grid"?
Last edited by spk77; 08-28-2014 at 07:14 AM.
|
|
|
08-28-2014, 07:06 AM
|
#4
|
Human being with feelings
Join Date: Feb 2006
Location: decepticon mothership in a hidden place inside a mountain
Posts: 3,754
|
Very nice !
|
|
|
08-28-2014, 10:02 AM
|
#5
|
Human being with feelings
Join Date: Jul 2007
Location: Jazz City
Posts: 5,065
|
unbelieveable!!!
__________________
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)
|
|
|
08-28-2014, 10:15 AM
|
#6
|
Human being with feelings
Join Date: Feb 2006
Location: decepticon mothership in a hidden place inside a mountain
Posts: 3,754
|
What is the .EEL extension ?
Where do you put it ?
How do you use it ? (where do you find it in the Reaper menu) ?
Thank you
|
|
|
08-28-2014, 10:36 AM
|
#7
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Thanks everyone
Quote:
Originally Posted by sinkmusic
What is the .EEL extension ?
Where do you put it ?
How do you use it ? (where do you find it in the Reaper menu) ?
Thank you
|
Save the ".eel" file to your computer (my EEL scripts are in C:\EEL scripts) -> Load from the action list:
|
|
|
08-28-2014, 01:33 PM
|
#8
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by spk77
[*]"Snap to grid" has to be on
|
You could use something like this:
Code:
function SnapToGridAlt (position) local (gridLine, setSnap, setGridVis)
(
setSnap = GetToggleCommandState(1157) ? (0) : (Main_OnCommand(1157, 0); 1); // Options: Toggle snapping
setGridVis = GetToggleCommandState(40145) ? (0) : (Main_OnCommand(40145, 0); 1); // Options: Toggle grid lines
gridLine = SnapToGrid(0, position);
setSnap ? Main_OnCommand(1157, 0);
setGridVis ? Main_OnCommand(40145, 0);
gridLine;
);
We use the same thing in SWS, but we're modifying the settings directly. However, that doesn't seem possible in EEL so toolbar buttons will blink...heh
|
|
|
08-28-2014, 02:23 PM
|
#9
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Updated the file:- Snap to grid and (Show) grid lines can be on or off (Thanks Breeder!)
Quote:
Originally Posted by Breeder
We use the same thing in SWS, but we're modifying the settings directly. However, that doesn't seem possible in EEL so toolbar buttons will blink...heh
|
Hmm...it blinks only when both "Snap to grid" and "(Show) grid lines" are off.
|
|
|
08-28-2014, 06:14 PM
|
#10
|
Human being with feelings
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,924
|
Nice one spk!!
-another one for my cache of useful tools by spk77
>
|
|
|
08-29-2014, 12:13 AM
|
#11
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
"Unquantize" doesn't do anything if item(s) are exactly on the grid. Maybe there should be a button which would offset items from the closest gridline by +X seconds or -X seconds. Then a slider for setting the range for "X". "X" would be a random value between 0 and the "slider value".
It could be used for "humanizing".
Quote:
Originally Posted by planetnine
Nice one spk!!
-another one for my cache of useful tools by spk77
>
|
Thanks planetnine
|
|
|
08-29-2014, 01:44 PM
|
#12
|
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
Originally Posted by spk77
It could be used for "humanizing".
|
Anything that could be used for humanizing would be extremely welcome, Spk!
Thanks as ever for this and all the wonderful goodies.
|
|
|
08-29-2014, 02:00 PM
|
#13
|
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
Originally Posted by G-Sun
Cool
Stretch-markers?
|
Regarding G-Sun comment, I´m thinking about something that leads me to these questions :
- Could you device a script to "Slice selected MIDI items at notes"?
-Do you think that this randomness that you´ve been thinking about could be applied to stretch both edges of a MIDI item? For example :
- Randomly stretch left/right borders of selected MIDI items.
- This would ideally have a percentage of randomness for each border and a "bias", as in the humanize dialog of the ME, to define a positive/negative tendency.
- There must be more subtleties, but it´s just the first mental sketch...
And yes, you surely realize that I´m trying to get close to my former humanizing request... Anyway, if it´s not possible, the slicing script would be incredibly useful!
Thanks in advance!!
|
|
|
08-29-2014, 03:04 PM
|
#14
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Soli Deo Gloria
Regarding G-Sun comment, I´m thinking about something that leads me to these questions :
- Could you device a script to "Slice selected MIDI items at notes"?
-Do you think that this randomness that you´ve been thinking about could be applied to stretch both edges of a MIDI item? For example :
- Randomly stretch left/right borders of selected MIDI items.
- This would ideally have a percentage of randomness for each border and a "bias", as in the humanize dialog of the ME, to define a positive/negative tendency.
- There must be more subtleties, but it´s just the first mental sketch...
And yes, you surely realize that I´m trying to get close to my former humanizing request... Anyway, if it´s not possible, the slicing script would be incredibly useful!
Thanks in advance!!
|
Hi Soli Deo Gloria,
It might be even easier to move items around than moving/resizing notes in the MIDI editor. Each item has its own unique ID. MIDI notes/CCs don't have - it's very difficult to keep track of which note/cc is currently being manipulated (in a loop).
Have to do some testing - first I'm trying to make a "split at MIDI notes" script.
|
|
|
08-29-2014, 03:28 PM
|
#15
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Hmmm...How should this be sliced?
|
|
|
08-29-2014, 08:45 PM
|
#16
|
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Well, I think they should be considered as a unit; I don´t think there is another option. That is, they would be sliced by the start of the first note and the end of the second.
Thanks for the interest!
|
|
|
10-10-2014, 02:38 PM
|
#17
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
Wow! This is a gem! It should definitely be sticky! Thanks a lot spk77!!!
Is it possible to make a similar tool but for stretch markers?
|
|
|
10-10-2014, 03:12 PM
|
#18
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by amagalma
Wow! This is a gem! It should definitely be sticky! Thanks a lot spk77!!!
Is it possible to make a similar tool but for stretch markers?
|
Thanks! I'm sure it's possible to make a similar tool for stretch markers, but I don't know how difficult it would be - have to do some investigating/thinking
|
|
|
10-11-2014, 05:15 AM
|
#19
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
If it can be done, I am sure you can do it! If you cannot do it, then it cannot be done!
|
|
|
10-11-2014, 03:25 PM
|
#20
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by amagalma
If it can be done, I am sure you can do it! If you cannot do it, then it cannot be done!
|
Yay, it seems to be doable
|
|
|
10-11-2014, 03:54 PM
|
#21
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
!!! Oh man! You are amazing!!!
Looking forward to using it!
|
|
|
10-11-2014, 03:57 PM
|
#22
|
Human being with feelings
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,924
|
That's got to be very useful.
Now, can "groove" (as in fingers groove tool) be applied to stretch markers in varying percentages? There's a project for you spk
>
|
|
|
10-11-2014, 04:02 PM
|
#23
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by amagalma
!!! Oh man! You are amazing!!!
Looking forward to using it!
|
I'm going to post it tomorrow - have to fix the obvious bugs first .
(Currently it doesn't work if "item position is something else than 0" etc.)
|
|
|
10-11-2014, 04:18 PM
|
#24
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by planetnine
That's got to be very useful.
Now, can "groove" (as in fingers groove tool) be applied to stretch markers in varying percentages? There's a project for you spk
>
|
Maybe, maybe
This loop is the "setting a stretch marker position" -part:
( slider_val range is -100 to 100)
Code:
i = 0;
loop(num_sm,
pos = sm_positions[i * 2];
source_pos = sm_positions[i * 2 + 1];
new_pos = pos - slider_val / 100 * (pos - SnapToGrid(0, pos));
SetTakeStretchMarker(take, i, new_pos, source_pos);
i += 1;
);
I have to include "item position" into that loop to make it work, I think.
|
|
|
10-11-2014, 04:19 PM
|
#25
|
Human being with feelings
Join Date: Feb 2006
Location: decepticon mothership in a hidden place inside a mountain
Posts: 3,754
|
Very interesting, thank you so much.
|
|
|
10-12-2014, 03:39 AM
|
#26
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Insane !
|
|
|
10-12-2014, 05:56 AM
|
#27
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Changed this:
Code:
new_pos = pos - slider_val / 100 * (pos - SnapToGrid(0, pos));
to this:
Code:
new_pos = pos - slider_val / 100 * (item_pos + pos - SnapToGrid(0, item_pos + pos));
Now it seems to work. Creating a new thread...
Edit. Here's the thread:
"EEL: Quantize tool for stretch markers" - http://forum.cockos.com/showthread.p...84#post1415584
Last edited by spk77; 10-12-2014 at 06:11 AM.
|
|
|
01-31-2015, 07:08 PM
|
#28
|
Human being with feelings
Join Date: Apr 2013
Posts: 30
|
This is awesome!
Can`t get it to work. Is this only for pc? I have mac
|
|
|
02-01-2015, 09:37 AM
|
#29
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Casperfren
This is awesome!
Can`t get it to work. Is this only for pc? I have mac
|
Thanks! It should work on pc and mac (REAPER 4.76).
|
|
|
02-06-2015, 01:24 PM
|
#30
|
Human being with feelings
Join Date: Sep 2013
Location: Salem, Oregon
Posts: 61
|
This is very impressive.
Do you think that it's possible for your code to do the same thing with envelope points?
I've been using my Launchpad to "play" Sugar Bytes' Turnado (with any given button turning an effect on/off via automation), but I've been needing to quantize my automation in order to get the final effect I'm after.
As it stands right now, the most effective method is to go through each of the points with the grid turned on and wiggle it left and right a bit while being careful not to move it up or down.
I've been looking around for any method of selecting an envelope and quantizing its points without any luck, so I understand if you're not able to come up with anything.
|
|
|
02-06-2015, 02:07 PM
|
#31
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Salem Beats
This is very impressive.
Do you think that it's possible for your code to do the same thing with envelope points?
I've been using my Launchpad to "play" Sugar Bytes' Turnado (with any given button turning an effect on/off via automation), but I've been needing to quantize my automation in order to get the final effect I'm after.
As it stands right now, the most effective method is to go through each of the points with the grid turned on and wiggle it left and right a bit while being careful not to move it up or down.
I've been looking around for any method of selecting an envelope and quantizing its points without any luck, so I understand if you're not able to come up with anything.
|
Thanks.
Envelope point manipulation is not currently possible, but will be in the future
|
|
|
02-07-2015, 01:13 AM
|
#32
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Salem Beats
This is very impressive.
Do you think that it's possible for your code to do the same thing with envelope points?
I've been using my Launchpad to "play" Sugar Bytes' Turnado (with any given button turning an effect on/off via automation), but I've been needing to quantize my automation in order to get the final effect I'm after.
As it stands right now, the most effective method is to go through each of the points with the grid turned on and wiggle it left and right a bit while being careful not to move it up or down.
I've been looking around for any method of selecting an envelope and quantizing its points without any luck, so I understand if you're not able to come up with anything.
|
Here's a quick test:
(This is possible with the latest pre-release)
Last edited by spk77; 02-07-2015 at 01:21 AM.
|
|
|
02-07-2015, 02:43 AM
|
#33
|
Human being with feelings
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
|
awesome!
__________________
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.
|
|
|
02-07-2015, 11:20 AM
|
#34
|
Human being with feelings
Join Date: Sep 2013
Location: Salem, Oregon
Posts: 61
|
Quote:
Originally Posted by spk77
Here's a quick test:
(This is possible with the latest pre-release)
|
Wow, that's great!
I have a copy of the latest pre-release on my laptop for testing.
Any chance of getting my hands on that awesome extension?
|
|
|
02-07-2015, 11:51 AM
|
#35
|
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
Originally Posted by spk77
Envelope point manipulation is not currently possible, but will be in the future
|
Huh? I already have a few scripts to quantize automation envelope points, based on something Veto created which is posted somewhere else on this forum.
This approach is based on using 'chunks', though - so I was planning to redo some of that stuff using some of the new API functions. But I'd be very happy to have you ninja me on that one, spk88.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
|
|
|
02-07-2015, 02:20 PM
|
#36
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Salem Beats
Wow, that's great!
I have a copy of the latest pre-release on my laptop for testing.
Any chance of getting my hands on that awesome extension?
|
I'm going to upload it very soon. (in the pre-release section)
Quote:
Originally Posted by Banned
Huh? I already have a few scripts to quantize automation envelope points, based on something Veto created which is posted somewhere else on this forum.
This approach is based on using 'chunks', though - so I was planning to redo some of that stuff using some of the new API functions. But I'd be very happy to have you ninja me on that one, spk88.
|
I think it's not possible to make these kind of "realtime" tools by editing values in "chunks". Manipulating envelopes by using these new functions is a much faster way.
-spk99
|
|
|
02-07-2015, 02:31 PM
|
#37
|
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
Originally Posted by spk77
I think it's not possible to make these kind of "realtime" tools by editing values in "chunks". Manipulating envelopes by using these new functions is a much faster way.
|
Indeed. But reading Salem Beats's post, I think he would already be greatly helped by an *inefficient* tool that just hard-quantizes everything to the grid with a few clicks.
Looking forward to see your script.
Btw, it seems we're still short of a solution for *actual* real-time quantization of parameter automation in REAPER (so e.g. Salem Beats could just play his LaunchPad live, and never worry about having to go back and edit stuff at all). I do this all the time in Numerology, using 'sample & hold' modules which are triggered by quantized clock pulses, and really can't live without it.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
|
|
|
02-07-2015, 02:49 PM
|
#38
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Banned
Indeed. But reading Salem Beats's post, I think he would already be greatly helped by an *inefficient* tool that just hard-quantizes everything to the grid with a few clicks.
Looking forward to see your script.
Btw, it seems we're still short of a solution for *actual* real-time quantization of parameter automation in REAPER (so e.g. Salem Beats could just play his LaunchPad live, and never worry about having to go back and edit stuff at all). I do this all the time in Numerology, using 'sample & hold' modules which are triggered by quantized clock pulses, and really can't live without it.
|
Here's the script:
http://forum.cockos.com/showpost.php...&postcount=171
I hope the "package handling" in the main script is working
("Quantize points 100% to grid" without a GUI would be a quite simple script.)
|
|
|
02-07-2015, 03:09 PM
|
#39
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by spk77
I think it's not possible to make these kind of "realtime" tools by editing values in "chunks". Manipulating envelopes by using these new functions is a much faster way.
-spk99
|
All SWS envelope stuff (a lot of S&M stuff is using chunks too, Jeffos has a dedicated parser class just for that) was working with chunks up until now (new SWS build will reuse new envelope API to make stuff much faster) and in all but most extreme testing cases things felt smooth. I know it's C++ so it pretty efficient but it's still a testament that chunks don't have to be that slow. Of course, I'm all for chunk-free coding...but don't be afraid of the chunks if you need them
There is one big plus to using chunks btw - you don't have to wait for devs to implement new API for added functionality since chunks automatically "upgrade" (my guess is because those same chunks are used to save things to .rpp files)
|
|
|
02-07-2015, 03:31 PM
|
#40
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Breeder
All SWS envelope stuff (a lot of S&M stuff is using chunks too, Jeffos has a dedicated parser class just for that) was working with chunks up until now (new SWS build will reuse new envelope API to make stuff much faster) and in all but most extreme testing cases things felt smooth. I know it's C++ so it pretty efficient but it's still a testament that chunks don't have to be that slow. Of course, I'm all for chunk-free coding...but don't be afraid of the chunks if you need them
There is one big plus to using chunks btw - you don't have to wait for devs to implement new API for added functionality since chunks automatically "upgrade" (my guess is because those same chunks are used to save things to .rpp files)
|
Thanks for the information, Breeder!
Random babbling :
(The biggest bottleneck is my computer: "hp pavilion a320.fi" - I don't actually do any serious work with Reaper (or any other DAW). We have a newer computer (Win8) in our rehearsal place where we sometimes try to record our own songs.)
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:30 PM.
|