Old 05-27-2016, 01:35 PM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default LFO tool for MIDI editor and envelopes

This thread is a continuation of the Lua and automation envelopes generation thread over at the Pre-Release Discussion forum, and is intended to focus on the LFO Tool script.

An envelope version as well as a MIDI editor version are available, and can be installed via ReaPack, as part of the ReaTeam script collection.

INSTRUCTIONS: Detailed instructions can be read by clicking the "?" button in the bottom right of the GUI.

CREDITS: Note that this LFO Tool is derived from Xenakios's "Envelope generator" script, which was unfortunately abandoned. The original script can still be found in the thread linked to above.


LFO Tool for automation envelopes:





LFO Tool for the MIDI editor:





Using the LFO Tool to insert CCs under selected notes instead of in the time selection:





EDIT 14 Jan 2017: Applying the LFO Tool to existing velocities:





----------
My other scripts: MIDI editor tools: warp, stretch, deselect etc

Donations

Last edited by juliansader; 02-10-2017 at 12:12 AM.
juliansader is offline   Reply With Quote
Old 05-27-2016, 04:18 PM   #2
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 1,342
Default

Cool stuff. Thanks!
__________________
SoundCloud | MPL Scripts | ReaPack | Donate
mpl is online now   Reply With Quote
Old 05-28-2016, 12:38 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,006
Default

Very cool ! Thanks for sharing !

Let us know if you want to join ReaTeam, or create your own repo
It would make your script even more accessible
X-Raym is offline   Reply With Quote
Old 06-11-2016, 07:59 PM   #4
kkostovas
Human being with feelings
 
Join Date: Sep 2015
Posts: 70
Default

Very nice work and a really beautiful GUI(Really dig the colours).

I was wondering if you have any plans of making the script able to quantize the rate.

Or maybe add the option to fine adjust the rate to come closer to the grid manually.(at the moment it jumps a bit and can't match it to the grid).
kkostovas is offline   Reply With Quote
Old 06-12-2016, 01:10 AM   #5
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by kkostovas View Post
I was wondering if you have any plans of making the script able to quantize the rate.

Or maybe add the option to fine adjust the rate to come closer to the grid manually.(at the moment it jumps a bit and can't match it to the grid).
Good ideas. I am not sure how difficult it will be, but I will try to see what I can do.

To improve the resolution of the envelope drawing area, you can try to increase the size of the GUI.
juliansader is offline   Reply With Quote
Old 06-12-2016, 10:27 AM   #6
kkostovas
Human being with feelings
 
Join Date: Sep 2015
Posts: 70
Default

Just brainstorming here...

Since the envelope points are added in time selection we really don't care about tempo, just the start, end and length of the selection in order to generate points at equally distant positions. For instance if we want a square wave in the envelope we can set that we want 2 points for the rate in the selection so this will create a single square(we don't take into account the 2 points at start and end). If we set 3 points then we will have a square wave plus the first half and so on. And this can go to really big number but it will always be proportional to the length.

What I mean by "don't care about tempo" is if the time selection matches the grid that is fine and it will also match the tempo but if we have audio recorded without a tempo track we can specify the length of a bar by selecting it and the envelope will match that.

I hope I am making sense...

I just find myself using this a lot to create effects and strange modulations and I feel that I miss this "sync" feature.

PS I saw there was a deactivated rate option in the script which also Xenakios had it working at some point but then he also removed it. Maybe it is not possible currently.
kkostovas is offline   Reply With Quote
Old 06-12-2016, 06:50 PM   #7
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

v0.996 has been uploaded to the ReaTeam repository:
+ Mousewheel can be used for super fine adjustment of node values.
+ Rightclick in envelope area to set the LFO period to precise note lengths.

(Here are the direct download links for the Envelope version and the MIDI editor version.)

and now also v0.997:
+ Envelope value displayed above hotpoint. User can select Rate display as Frequency or Period note length.

Last edited by juliansader; 06-12-2016 at 11:36 PM.
juliansader is offline   Reply With Quote
Old 06-13-2016, 04:46 AM   #8
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,280
Default

awesome 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-13-2016, 09:25 AM   #9
lachrimae
Human being with feelings
 
lachrimae's Avatar
 
Join Date: May 2010
Location: Austin, TX
Posts: 731
Default

This is great!

Excuse the horrible mock-up, but I'd like to see fewer menus and more of everything on one screen (vertical alignment may not be the best configuration since some still use low resolution screens).

Clickable icons showing all LFO shapes.
All Envelopes showing on one screen.

lachrimae is offline   Reply With Quote
Old 06-13-2016, 04:54 PM   #10
kkostovas
Human being with feelings
 
Join Date: Sep 2015
Posts: 70
Default

Quote:
Originally Posted by juliansader View Post
v0.996 has been uploaded to the ReaTeam repository:
+ Mousewheel can be used for super fine adjustment of node values.
+ Rightclick in envelope area to set the LFO period to precise note lengths.

(Here are the direct download links for the Envelope version and the MIDI editor version.)

and now also v0.997:
+ Envelope value displayed above hotpoint. User can select Rate display as Frequency or Period note length.
That is awesome>

In longer selections though it starts to go a bit off, but it is great for normal ones.

Edit: Wait a minute, I think there is a newer version, will test tomorrow morning.

Last edited by kkostovas; 06-13-2016 at 05:02 PM.
kkostovas is offline   Reply With Quote
Old 06-13-2016, 10:36 PM   #11
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by kkostovas View Post
That is awesome>

In longer selections though it starts to go a bit off, but it is great for normal ones.

Edit: Wait a minute, I think there is a newer version, will test tomorrow morning.
The LFO is supposed to synchronize perfectly over long selections - but only if the tempo is constant. (If it doesn't, please let me know.) If the tempo varies, synchronization gets messy, unfortunately, since LFO is currently time based, not beat based.

Quote:
Originally Posted by kkostovas View Post
PS I saw there was a deactivated rate option in the script which also Xenakios had it working at some point but then he also removed it. Maybe it is not possible currently.
I will try to get the rate option working again, so that the user can choose between a timebase of "Time" or "Beats".

Last edited by juliansader; 06-13-2016 at 10:50 PM.
juliansader is offline   Reply With Quote
Old 06-13-2016, 11:50 PM   #12
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by kkostovas View Post
Just brainstorming here...

Since the envelope points are added in time selection we really don't care about tempo, just the start, end and length of the selection in order to generate points at equally distant positions. For instance if we want a square wave in the envelope we can set that we want 2 points for the rate in the selection so this will create a single square(we don't take into account the 2 points at start and end). If we set 3 points then we will have a square wave plus the first half and so on. And this can go to really big number but it will always be proportional to the length.

What I mean by "don't care about tempo" is if the time selection matches the grid that is fine and it will also match the tempo but if we have audio recorded without a tempo track we can specify the length of a bar by selecting it and the envelope will match that.

I hope I am making sense...

I just find myself using this a lot to create effects and strange modulations and I feel that I miss this "sync" feature.

PS I saw there was a deactivated rate option in the script which also Xenakios had it working at some point but then he also removed it. Maybe it is not possible currently.
I think I misunderstood you before. Do I understand correctly that you need to sync the LFO (with a constant frequency) to the *time selection*, not to measures/beats?

For example, you need a dialog box that asks something like "Total number of oscillations in time selection?", and the user can then specify any number greater than zero?

EDIT: The SWS action "Fit selected envelope points to time selection" might also come in handy.

Last edited by juliansader; 06-13-2016 at 11:56 PM.
juliansader is offline   Reply With Quote
Old 06-14-2016, 01:07 AM   #13
kkostovas
Human being with feelings
 
Join Date: Sep 2015
Posts: 70
Default

Quote:
Originally Posted by juliansader View Post
I think I misunderstood you before. Do I understand correctly that you need to sync the LFO (with a constant frequency) to the *time selection*, not to measures/beats?

No, I think you understood correctly, there is something else going on.

https://stash.reaper.fm/27884/LFO1.gif

Tempo is constant and selection matches the grid but there are some small errors at the start which add up by a lot at the end, and even one step with the mouse wheel will not change the error.

Edit: I can always quantize envelope points later.

Last edited by juliansader; 02-03-2017 at 08:28 PM.
kkostovas is offline   Reply With Quote
Old 06-14-2016, 02:53 AM   #14
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by kkostovas View Post
No, I think you understood correctly, there is something else going on.

...

Tempo is constant and selection matches the grid but there are some small errors at the start which add up by a lot at the end, and even one step with the mouse wheel will not change the error.

Edit: I can always quantize envelope points later.
In the GIF, it looks as if you are using the mousewheel to make fine adjustments to the LFO frequency, but this case probably requires quantization: Did you try to quantize the LFO by Ctrl-Rightclick in the envelope area -> Set period at ALL nodes to -> Custom -> 0.5?
juliansader is offline   Reply With Quote
Old 06-14-2016, 04:17 AM   #15
kkostovas
Human being with feelings
 
Join Date: Sep 2015
Posts: 70
Default

Man...I cannot get the Ctrl+RightClick to work...

I must be doing something completely wrong.

Could you maybe upload a gif??

Thank you
kkostovas is offline   Reply With Quote
Old 06-14-2016, 08:57 AM   #16
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by kkostovas View Post
Man...I cannot get the Ctrl+RightClick to work...

I must be doing something completely wrong.

Could you maybe upload a gif??

Thank you
I will upload a GIF a bit later today and add it to the others in the first post.

Which part of the process is giving problems?
1) Do you not see the dropdown menu when RightClicking on a node in the Rate envelope or Ctrl-RightClicking to set all nodes simultaneously, or
2) Does the quantization not work *after* you have selected the LFO period in the dropdown menu?
juliansader is offline   Reply With Quote
Old 06-14-2016, 09:31 AM   #17
kkostovas
Human being with feelings
 
Join Date: Sep 2015
Posts: 70
Default

Quote:
Originally Posted by juliansader View Post
I will upload a GIF a bit later today and add it to the others in the first post.

Which part of the process is giving problems?
1) Do you not see the dropdown menu when RightClicking on a node in the Rate envelope or Ctrl-RightClicking to set all nodes simultaneously, or
2) Does the quantization not work *after* you have selected the LFO period in the dropdown menu?
Ok now now we are getting somewhere, so....

The Ctrl+Rightclick just doesn't work for me.

And the RightClick on a node is very tricky to get. When I RightClick on a node I mostly get the Save Curve or Display Rate menus.

But I managed to set the period for each of the two initial nodes individual and it works great.

Thank you.

Edit 1: I just realized that I get the other menus because the nodes are on top of the edges so the mouse pointer was on top of the node but actually outside the envelope area.
Ctrl+RightClick still does not work.

Edit 2: Sorry if I am being a pain.. :-P

Edit 3: What a fool(Speaking to myself).....it works, it just works..... Thanks for this amazing script...

Last edited by kkostovas; 06-14-2016 at 10:49 AM.
kkostovas is offline   Reply With Quote
Old 06-15-2016, 04:42 PM   #18
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

v0.9999 is now available with an option to switch between Timebase: Beats and Timebase: Time. In Timebase: Beats, the LFO is synced to beats and tempo.

I think the LFO Tool is almost ready to be released as a fully-fledged, full-featured v1.0, so please let me know if there are any bugs that need to be sorted out.

(I would have liked to include a Bézier curve option in v1.0 of the MIDI editor version, but I guess that can wait till a later release.)
juliansader is offline   Reply With Quote
Old 06-16-2016, 06:23 AM   #19
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,074
Default

Nice script, thank you!

I have a question, how can we preserve pre and post automation outside a time selection?

Example:



I can't seem to find a reliable way to avoid this. Pre/post automation always changes.
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 06-16-2016, 07:13 AM   #20
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,006
Default

  • A simple keyboard shortcut of dropdown menu for reseting the graph could be nice
  • Hiding Bezier curve is points are not set to bezier
  • Area and multiple selection of points could be nice.
  • and as mercado said, a checkbox for "preserving value at time selection edges". You can checked how I did it in my scripts if needed, it was not as straightforward :P
  • Having more precise indications about timing in
  • and maybe a grid in the visualisation, based on arrangement view grid ^^
Also, congrats for what you have done with it it has incredibly evolved since the last time I checked ! It is really the most advanced LFO envelope tool we have for REAPER. Thanks for sharing
X-Raym is offline   Reply With Quote
Old 06-16-2016, 11:09 AM   #21
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

v0.99991 now available:
+ Points at edges of time selection will be preserved, to avoid affecting envelope outside time selection.
+ Regression in the script's handling of take envelopes is fixed.
[EDIT: ReaPack didn't like my weird version numbers, so this latest version has transcended into v1.01.]


Quote:
Originally Posted by Mercado_Negro View Post
I have a question, how can we preserve pre and post automation outside a time selection?
...
I can't seem to find a reliable way to avoid this. Pre/post automation always changes.
Thanks for pointing it out! I completely overlooked this feature.

Quote:
Originally Posted by X-Raym View Post
[LIST][*]and as mercado said, a checkbox for "preserving value at time selection edges". You can checked how I did it in my scripts if needed, it was not as straightforward :P
Thanks! It helped me to quickly add the feature.

Quote:
Originally Posted by X-Raym View Post
[LIST][*]A simple keyboard shortcut of dropdown menu for reseting the graph could be nice
Being able to quickly reset a curve is indeed handy - but I am not sure how an additional 'Reset curve' option would differ from Rightclick -> Load curve?

Quote:
Originally Posted by X-Raym View Post
[LIST][*]Having more precise indications about timing in
Would it be helpful if the x value (or time value, or nothing, depending on user selection) is also displayed above the hotpoint?

Quote:
Originally Posted by X-Raym View Post
[LIST][*]and maybe a grid in the visualisation, based on arrangement view grid ^^
Could you explain a bit more? Do you mean horizontal and vertical lines?

Last edited by juliansader; 06-16-2016 at 01:06 PM.
juliansader is offline   Reply With Quote
Old 06-16-2016, 12:03 PM   #22
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,006
Default

nice for the preserve time selection edges !

1. I meant this curve, not the track envelope

sure, we can simply quit and re run the script, but it can be nice anyway to have it as a simple right click option.

2. Yes, any indications would be useful, according to time format :P

2. Grid from arrange view would be vertical.


Thanks for considering these :P
X-Raym is offline   Reply With Quote
Old 06-16-2016, 12:33 PM   #23
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by X-Raym View Post
nice for the preserve time selection edges !
1. I meant this curve, not the track envelope
...
sure, we can simply quit and re run the script, but it can be nice anyway to have it as a simple right click option.
This feature already exists! (If I understand you correctly.) You don't need to quit: Simply Rightclick outside the envelope area to load one of your saved curves.

Last edited by juliansader; 06-16-2016 at 12:40 PM.
juliansader is offline   Reply With Quote
Old 06-16-2016, 12:50 PM   #24
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 4,006
Default

Ok, I will create a reset curve,

Other thing:
I think you could make the point under mouse detection area a it more wide :P
Sometimes, points are tricky to select. (see begining and end of the gif. In midle , I do succeed to select some points ^^)


In the middle of the script, you can see that click + drag create a tons of points, instead of create + dragging one only points.
As we may not need to have that much points, maybe the click + drag one point only solution would be more user friendly ^^
X-Raym is offline   Reply With Quote
Old 06-16-2016, 12:57 PM   #25
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,074
Default

Quote:
Originally Posted by juliansader View Post
v0.99991 now available:
+ Points at edges of time selection will be preserved, to avoid affecting envelope outside time selection.
+ Regression in the script's handling of take envelopes is fixed.
[EDIT: ReaPack didn't like my weird version numbers, so this latest version has transcended into v1.0.]



Thanks for pointing it out! I completely overlooked this feature.


Thanks! It helped me to quickly add the feature.


Being able to quickly reset a curve is indeed handy - but I am not sure how an additional 'Reset curve' option would differ from Rightclick -> Load curve?


Would it be helpful if the x value (or time value, or nothing, depending on user selection) is also displayed above the hotpoint?


Could you explain a bit more? Do you mean horizontal and vertical lines?
Thanks a lot, that was quick! I just updated it via ReaPack (it said v1.0) but it's doing the same, i.e., it's modifying the envelope outside of time selection. I think it should add points at time selection edges before doing any processing.
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 06-16-2016, 01:39 PM   #26
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by Mercado_Negro View Post
Thanks a lot, that was quick! I just updated it via ReaPack (it said v1.0)
The regression-fixing version will also be available as soon as ReaPack has been indexed again.

Quote:
Originally Posted by Mercado_Negro View Post
but it's doing the same, i.e., it's modifying the envelope outside of time selection. I think it should add points at time selection edges before doing any processing.
To signal to the LFO Tool that the existing envelope should be preserved, the user can add envelope points at one or both of the edges of the time selection before running the LFO Tool. The script will detect such points, and will not delete them. My reasoning is that without such points, the LFO Tool would not know what properties the user would like to preserve (for example, shape? continuity? or value? Especially shape would be difficult or impossible to preserve if, for example, the new LFO is inserted within a long, extended Bézier curve.)
juliansader is offline   Reply With Quote
Old 06-16-2016, 03:14 PM   #27
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,074
Default

Quote:
Originally Posted by juliansader View Post
The regression-fixing version will also be available as soon as ReaPack has been indexed again.


To signal to the LFO Tool that the existing envelope should be preserved, the user can add envelope points at one or both of the edges of the time selection before running the LFO Tool. The script will detect such points, and will not delete them. My reasoning is that without such points, the LFO Tool would not know what properties the user would like to preserve (for example, shape? continuity? or value? Especially shape would be difficult or impossible to preserve if, for example, the new LFO is inserted within a long, extended Bézier curve.)
I understand but adding points at time selection edges is actually the most accurate way to keep your envelope tweaks intact. I can't imagine a situation where you would want to change what happens before and after a time selection.

An extra step to add 2 points at time selection edges before running the LFO tool isn't intuitive, in my opinion. The user wants to preservate everything and just needs to create something within a time selection. Users have a default envelope shape in preferences so that's not a problem. The value is already there for both points at edges.

I can't really imagine a situation where I wouldn't add 2 points at time selection edges before running the LFO tool.
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 06-16-2016, 06:09 PM   #28
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

v1.02 now available:
+ Envelope outside time selection will be preserved by default, even if there are no points at the edges of the time selection.
+ Leftclick only adds a single node point; Shift + Left-drag to add multiple points.
juliansader is offline   Reply With Quote
Old 06-17-2016, 04:32 AM   #29
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,074
Default

Quote:
Originally Posted by juliansader View Post
v1.02 now available:
+ Envelope outside time selection will be preserved by default, even if there are no points at the edges of the time selection.
+ Leftclick only adds a single node point; Shift + Left-drag to add multiple points.
Thanks a lot for considering and implementing it, truly appreciated.

Could you please check the fade out duration parameter? It's not working in 1.02 here.
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 06-19-2016, 09:18 AM   #30
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by Mercado_Negro View Post
Could you please check the fade out duration parameter? It's not working in 1.02 here.
Fixed in v1.03:
+ Fixed regression in fade out.
+ Added "Reset curve" option in Save/Load menu.
+ Added optional display of hotpoint time position (in any of REAPER's time formats).
+ Improved sensitivity of nodes at edges of envelope drawing area.
juliansader is offline   Reply With Quote
Old 06-20-2016, 11:22 AM   #31
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 855
Default

Thank you for this excellent tool!

A question and two suggestions...

What does the "quant steps" do? I cannot understand from its behaviour...

I suggest that you put the Rate/Amplitude/Center buttons just above the Draw area, since they relate to it. It will be clearer like this.



And a final suggestion: could you make the phase step not to be quantized like 0/4, 1/4 etc but to have a finer resolution in degrees? And offer the possibility to have it quantized if someone wishes, in however many steps one wishes (4 like now, 8, 15, 157, whatever)

Thanks!
amagalma is offline   Reply With Quote
Old 06-20-2016, 11:27 AM   #32
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 855
Default

Oh, and the possibility for one to draw his/her custom curve would be an excellent addition!
amagalma is offline   Reply With Quote
Old 06-22-2016, 11:30 PM   #33
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by amagalma View Post
What does the "quant steps" do? I cannot understand from its behaviour...
The 'quant steps' slider quantized the *values* of the envelope, but the effect is not obviously noticeable unless you bring it down a lot. In the envelope version of the script, only the values of the nodes are quantized, while in the MIDI editor version, all the CC values in-between the nodes are also quantized.

Quote:
Originally Posted by amagalma View Post
Oh, and the possibility for one to draw his/her custom curve would be an excellent addition!
This is already possible! Well, not exactly "draw" shape, but the user can easily define custom LFO shapes in terms of node values and the shape of the curves between the nodes. (The instructions are given in the script itself.)

Quote:
Originally Posted by lachrimae View Post
Excuse the horrible mock-up, but I'd like to see fewer menus and more of everything on one screen (vertical alignment may not be the best configuration since some still use low resolution screens).

Clickable icons showing all LFO shapes.
Thanks for the proposal and mock-up - I welcome any advice to make the LFO Tool's interface more professional and the appearance more 'native' to REAPER. Clickable icons will unfortunately be difficult to code (although, if I write some kind of bitmap converter, it may have wider usefulness for other scripts too.) One of the advantages of this script is that the user can easily add custom shapes. It is easy to incorporate new shapes into a dropdown menu, but not into a button toolbar.

Last edited by juliansader; 06-23-2016 at 03:25 AM.
juliansader is offline   Reply With Quote
Old 06-23-2016, 03:26 AM   #34
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by amagalma View Post
And a final suggestion: could you make the phase step not to be quantized like 0/4, 1/4 etc but to have a finer resolution in degrees? And offer the possibility to have it quantized if someone wishes, in however many steps one wishes (4 like now, 8, 15, 157, whatever)
The number of phase steps is based on the number of nodes in the definition of the LFO shape. The MwMwMw shape, for example, has 8 steps. I reckoned (or hoped) that users would typically prefer to start the LFO on a major node, not in-between.

I have uploaded a new v1.04, in which the user can specify the number of phase steps in the standard LFO shapes. Using a high number such as 100 should be as good as having a continuous phase.
juliansader is offline   Reply With Quote
Old 06-23-2016, 04:48 AM   #35
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 855
Default

Thanks julian for the update! Nice to be able to specify the number of the phase steps!

Quote:
Originally Posted by juliansader View Post
Quote:
Originally Posted by amagalma
Oh, and the possibility for one to draw his/her custom curve would be an excellent addition!
This is already possible! Well, not exactly "draw" shape, but the user can easily define custom LFO shapes in terms of node values and the shape of the curves between the nodes. (The instructions are given in the script itself.)
It is a little geeky like this.. It would be really cool if there was another envelope (called "LFO shape") besides "Rate", "Amplitude" and "Center", where one could draw easily a custom shape. Of course, I know this is a lot to ask, and the script is super cool already!

Last edited by amagalma; 06-23-2016 at 11:21 PM.
amagalma is offline   Reply With Quote
Old 06-23-2016, 06:41 PM   #36
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,074
Default

Quote:
Originally Posted by juliansader View Post
Fixed in v1.03:
+ Fixed regression in fade out.
+ Added "Reset curve" option in Save/Load menu.
+ Added optional display of hotpoint time position (in any of REAPER's time formats).
+ Improved sensitivity of nodes at edges of envelope drawing area.
Thank you!
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 07-19-2016, 08:46 AM   #37
V'ger
Human being with feelings
 
V'ger's Avatar
 
Join Date: May 2010
Posts: 1,712
Default

Very nice work, thanks.
V'ger is offline   Reply With Quote
Old 11-29-2016, 10:59 AM   #38
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

Quote:
Originally Posted by TonE View Post
Wonderful, thanks.

It would be great, if custom actions could be created with preselected parameter values. So you could generate for often used parameter combinations custom actions, for easy reusability in other custom actions.
Good news! This has already been implemented: Just save the script under a new name such as "LFO tool preset N.lua", then go into the User Area of the script (near the top, directly below the changelog), and change the "defaultCurveName" variable to the name of the curve that should be loaded for this new preset.

Code:
    -- Name of curve to load as default.
    --    By changing this name and saving as new script, different default curves can be 
    --    linked to different shortcut keys.
    defaultCurveName = "default"
juliansader is offline   Reply With Quote
Old 11-29-2016, 12:37 PM   #39
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

I am not sure why you would need to find all the parameter values in the code - did I perhaps misunderstand your original post? (Re-reading your post, it seems that you may have had in mind separate saved presets for amplitude, rate and center?)

It is possible to exchange presets (and to list all the parameter values), although it will require a bit of Lua programming knowledge:

The LFO Tool's saved curves are saved as an ExtState with section = "LFO generator" and key = "savedCurves". To see what's inside your curves, you can run the following Lua code:
Code:
reaper.ShowConsoleMsg(reaper.GetExtState("LFO generator", "savedCurves"))
which will display something like:
Quote:
default,LFO shape?,6,Rate,2,0.0,0.5,1.0,0.5,Amplitude,2,0.0,0. 068421052631579,1.0,0.068421052631579,Center,2,0.0 ,0.37894736842105,1.0,0.37894736842105,Phase step,0.0,Randomness,0.0,Quant steps,1.0,Bezier shape,0.7,Fade in duration,0.0,Fade out duration,0.0,Timebase?,0.0|Bezier,LFO shape?,1.0,Rate,4,0.0,0,0.22872340425532,0.4438775 5102041,0.58510638297872,0.53061224489796,1.0,0,Am plitude,2,0.0,0.5,1.0,0.5,Center,2,0.0,0.5,1.0,0.5 ,Phase step,0.0,Randomness,0.0,Quant steps,1.0,Bezier shape,0.7,Fade in duration,0.0,Fade out duration,0.0,Timebase?,1|
This example string contains two saved curves: default and Bezier, separated by a "|".

If you copy/paste a saved curve's ExtState string onto the end of your own ExtState string, and then run
Code:
reaper.SetExtState("LFO generator", "savedCurves", stringName, true)
it will be added to your saved curves.

(BTW, REAPER v5.30 will provide new API functions to make scripts such as mine much faster, especially when dealing with large takes with hundreds of thousands of events, so my scripts will soon be updated to take advantage of these new functions.)

Last edited by juliansader; 11-29-2016 at 01:14 PM.
juliansader is offline   Reply With Quote
Old 01-13-2017, 10:10 PM   #40
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,061
Default

A major update v2.00 for the MIDI editor version of the LFO Tool is available:

+ Much faster execution in large takes with hundreds of thousands of events.

+ Keyboard shortcuts "a", "c" and "r" to switch GUI views. (Nice for faster editing of shapes.)

+ LFO can be applied to existing events - including velocities - instead of inserting new CCs.

+ Requires REAPER v5.32 or later.

I have added a new screenshot (in the first post) that demonstrates how the LFO Tool can be applied to velocities.

Last edited by juliansader; 01-22-2017 at 08:58 PM.
juliansader 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 01:46 AM.


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