Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Pre-Release Discussion

Reply
 
Thread Tools Display Modes
Old 01-10-2015, 01:34 PM   #1
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default Lua and automation envelopes generation

edit 3rd April 2015 : Preliminary public version now available. Details in this thread at post :

http://forum.cockos.com/showpost.php...0&postcount=87

I quickly hacked this with Lua and the new envelope APIs :



Needs a lot more work but I am quite happy how this is turning out already!
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 04-03-2015 at 08:35 AM.
Xenakios is offline   Reply With Quote
Old 01-10-2015, 01:45 PM   #2
VVV
Human being with feelings
 
VVV's Avatar
 
Join Date: Mar 2010
Location: France
Posts: 459
Default

WOW! I can see the possibilities...great feature
VVV is offline   Reply With Quote
Old 01-10-2015, 01:47 PM   #3
Gates of Horn & Ivory
Human being with feelings
 
Gates of Horn & Ivory's Avatar
 
Join Date: Apr 2014
Posts: 97
Default

!!!

That's kinda incredible.
Gates of Horn & Ivory is offline   Reply With Quote
Old 01-10-2015, 02:26 PM   #4
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

That,,,,,,

Is a classic bit of Xenakios awesomeness right there!

Even more excited about the new bits in 5 now for letting people "get what they want"
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-10-2015, 02:42 PM   #5
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Nice hack, Xen! Exactly the sort of stuff I was immediately imagining when I noticed the recent envelope API additions.

Btw, perhaps you should rename that window to 'LFO generator'?
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 01-10-2015, 02:45 PM   #6
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Banned View Post
Nice hack, Xen! Exactly the sort of stuff I was immediately imagining when I noticed the recent envelope API additions.

Btw, perhaps you should rename that window to 'LFO generator'?
Well, it's generating envelopes, so envelope generator is IMHO a better fit...But I will give it some more thought...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-10-2015, 02:51 PM   #7
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
Default

Isn't there already something similar in SWS?
EvilDragon is offline   Reply With Quote
Old 01-10-2015, 02:58 PM   #8
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by EvilDragon View Post
Isn't there already something similar in SWS?
Yes, but honestly, I don't like how it's implemented. With this I can immediately interactively see (and hear) what I am getting. The SWS extension envelope generator requires pressing a button to get the result etc...(I also already have a similar envelope generator to this new Lua thing in my HourGlass app, and I've wanted to have this in Reaper for a long time...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-10-2015, 04:22 PM   #9
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Quote:
Originally Posted by Xenakios View Post
Yes, but honestly, I don't like how it's implemented. With this I can immediately interactively see (and hear) what I am getting. The SWS extension envelope generator requires pressing a button to get the result etc...(I also already have a similar envelope generator to this new Lua thing in my HourGlass app, and I've wanted to have this in Reaper for a long time...)
...and having a script you can edit and recompile on the fly (vs an extension, where you have to quit reaper, recompile, and relaunch) is vastly more useful for things like this.
Justin is offline   Reply With Quote
Old 01-10-2015, 04:28 PM   #10
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Justin View Post
...and having a script you can edit and recompile on the fly (vs an extension, where you have to quit reaper, recompile, and relaunch) is vastly more useful for things like this.
Sure, the iteration time between code changes is, ehem, somewhat faster than with C++ plugins/apps! (Of course the end user who doesn't want to see/edit the code doesn't care, but well...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-10-2015, 04:36 PM   #11
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Cool.
Tale is offline   Reply With Quote
Old 01-10-2015, 04:36 PM   #12
swiiscompos
Human being with feelings
 
swiiscompos's Avatar
 
Join Date: Mar 2011
Location: London
Posts: 1,211
Default

OT but your image is invisible on my mac. It's probably because of the way you use tags...
I found the link in the code source of the page and it looks amazing!
swiiscompos is offline   Reply With Quote
Old 01-10-2015, 04:38 PM   #13
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Quote:
Originally Posted by swiiscompos View Post
OT but your image is invisible on my mac. It's probably because of the way you use tags...
Well, it is perfectly visible on my Mac... weird.
Tale is offline   Reply With Quote
Old 01-10-2015, 04:39 PM   #14
unique
Human being with feelings
 
unique's Avatar
 
Join Date: Dec 2013
Posts: 231
Default

IMO this is what LFO generator from SWS is missing.

If you can combine the 2 ideas SWS LFO generator and what Xenakios is showing us here then we would have something very splendid.

The interface of SWS LFO generator with this implemented somewhere in it.

That way we can have those time signature values for sync, delay offset etc, but this way we can see it and hear it, also time selection etc.
unique is offline   Reply With Quote
Old 01-10-2015, 04:42 PM   #15
swiiscompos
Human being with feelings
 
swiiscompos's Avatar
 
Join Date: Mar 2011
Location: London
Posts: 1,211
Default

Quote:
Originally Posted by Tale View Post
Well, it is perfectly visible on my Mac... weird.
Right. Actually the problem is only on Firefox.
swiiscompos is offline   Reply With Quote
Old 01-10-2015, 04:44 PM   #16
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by unique View Post

That way we can have those time signature values for sync, delay offset etc, but this way we can see it and hear it, also time selection etc.
Yeah I have to think how I could implement musical note values stuff...Drop down menus are at the moment somewhat of a big pain to implement with the Lua stuff etc...Possibly a slider that goes through whole note, half note, quarter note etc is an option. Or I will just swallow the pain of implementing a drop down menu with Lua and Lice...

I will try to make this as awesome as possible, so that maybe Cockos can include this with the Reaper 5 installer at some point...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-10-2015, 05:13 PM   #17
unique
Human being with feelings
 
unique's Avatar
 
Join Date: Dec 2013
Posts: 231
Default

Cool Xenakios im just throwing my thoughts out there for everyone.

Where are you learning how to program this LUA script stuff?

I have no idea what you and the devs are doing lol, but I give you guys my respect.

Good luck.
unique is offline   Reply With Quote
Old 01-10-2015, 05:13 PM   #18
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

That's great Xenakios
I hope it will support tempo changes, since Padre's LFO generator doesn't.
heda is offline   Reply With Quote
Old 01-10-2015, 07:59 PM   #19
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Some more work done on it...

__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-10-2015, 08:17 PM   #20
Fergler
Human being with feelings
 
Fergler's Avatar
 
Join Date: Jan 2014
Posts: 5,205
Default

This is awesome. I was just playing around with the LFO stuff in Cubase the other day and thinking I might like something like that in Reaper. This LUA with the time selection boundaries would be perfect!

It just got me thinking. Some sort of LUA database where you can directly install the scripts from some sort of popularity and alpha sorted, self-updating list directly in Reaper would be cool.

A suggestion for one more additional slider - randomness is cool but I think a randomness that only applied to the peaks/valleys of the wave would be more practical. Therefor, a slider that you moved between 0, peaks only, and 100, all created points, would allow you some finer control.

I hope that was clear. I can make a diagram if needed.
Fergler is offline   Reply With Quote
Old 01-10-2015, 10:09 PM   #21
simulated systems
Human being with feelings
 
simulated systems's Avatar
 
Join Date: Sep 2010
Location: portugal
Posts: 40
Default

a adsr would be awesome
simulated systems is offline   Reply With Quote
Old 01-10-2015, 10:19 PM   #22
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,749
Default

This looks great!

Quote:
Originally Posted by Xenakios View Post
Drop down menus
There is gfx.showmenu for text-based system menus... you could implement a dropdown box that way too. But you can't draw stuff on the menus.
schwa is offline   Reply With Quote
Old 01-10-2015, 10:33 PM   #23
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

This is exactly what I was hoping the new lua stuff would open up!

Great job xenakios!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-10-2015, 10:35 PM   #24
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Quote:
Originally Posted by simulated systems View Post
a adsr would be awesome
Indeed!

Or a window where you could draw in the shape (like a multisegment envelope) and then have it repeated and stretched/repeated within the time selection.
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-10-2015, 10:35 PM   #25
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

Awesome!!!
Breeder is offline   Reply With Quote
Old 01-11-2015, 06:00 AM   #26
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Tempo based rates support (no tempo changes stuff yet though) :



I have a mistake in the numbers in the note values table in the screencap, never mind about that... This needs much more work...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-11-2015, 06:47 AM   #27
VVV
Human being with feelings
 
VVV's Avatar
 
Join Date: Mar 2010
Location: France
Posts: 459
Default

Holy f*ck!
VVV is offline   Reply With Quote
Old 01-11-2015, 06:49 AM   #28
VVV
Human being with feelings
 
VVV's Avatar
 
Join Date: Mar 2010
Location: France
Posts: 459
Default

Are those sliders in your envlopes generator automatable?
VVV is offline   Reply With Quote
Old 01-11-2015, 06:53 AM   #29
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by VVV View Post
Are those sliders in your envlopes generator automatable?
Unfortunately not at the moment. I will probably add some breakpoint envelopes into the script window itself, but the scripts can't add new envelopes to Reaper's tracks. (At least not cleanly, of course some hacks could be done...For example, have a dummy Jesusonic plugin that has some parameters and use the envelopes of those parameters from the script code...Hmm hmm...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-11-2015, 07:36 AM   #30
deailes
Human being with feelings
 
Join Date: May 2010
Posts: 90
Default

this looks awesome.. Defo something i would use all the time.
deailes is offline   Reply With Quote
Old 01-11-2015, 07:43 AM   #31
mete0r
Human being with feelings
 
Join Date: Jul 2013
Posts: 121
Default

How harder do you think "automation clips" would be? I guess you would have an editor (with lfo in addition to other curves) and another timeline where you make clips take temporary "control" of the envelope (saving in memory the old points and overwriting them with yours) or something similar.
mete0r is offline   Reply With Quote
Old 01-11-2015, 07:57 AM   #32
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Very nice! I didn't realize that it's possible to use these new envelope functions in "real time"!

Manipulating 30000 points while playing (on Win XP32 from 2003 ):



(Analyzing the take is the slowest part...I wish there was a function to get next peak sample position in next X samples . Maybe it would be faster if such native function existed?)


Quick question:
How to set only the blue parameters and ignore the red ones?
Code:
Lua: boolean reaper.SetEnvelopePoint(TrackEnvelope envelope, integer ptidx, optional number timeInOptional, optional number valueInOptional, optional number shapeInOptional, optional number tensionInOptional, optional boolean selectedInOptional, optional boolean noSortInOptional)
spk77 is offline   Reply With Quote
Old 01-11-2015, 08:00 AM   #33
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Xenakios View Post
[...] the scripts can't add new envelopes to Reaper's tracks. (At least not cleanly, of course some hacks could be done...For example, have a dummy Jesusonic plugin that has some parameters and use the envelopes of those parameters from the script code...Hmm hmm...)
Ah, but now you're contradicting yourself a bit!
Quote:
Originally Posted by Xenakios View Post
Well, it's generating envelopes, so envelope generator is IMHO a better fit...But I will give it some more thought...
So, technically, it seems to use *existing* automation envelopes to *generate* (series of) new automation envelope points, or rather, *shapes* - and in this case, so far, those shapes strongly resemble classical sinoid LFO. I typically prefer to focus on the exposed functionality rather than the technology used. But anyway, don't worry about it, the functionality is certainly much more interesting than the name.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 01-11-2015, 08:09 AM   #34
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Banned View Post
Ah, but now you're contradicting yourself a bit!

So, technically, it seems to use *existing* automation envelopes to *generate* (series of) new automation envelope points, or rather, *shapes* - and in this case, so far, those shapes strongly resemble classical sinoid LFO. I typically prefer to focus on the exposed functionality rather than the technology used. But anyway, don't worry about it, the functionality is certainly much more interesting than the name.
I meant in the later post that the scripts can't add new envelopes like "Envelope generator amplitude" into Reaper's tracks without using some auxiliary hack like an additional dummy Jesusonic plugin.

Maybe the more correct name for the thing would be "Envelope point generator", but that seems like nitpicking...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-11-2015, 08:40 AM   #35
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Xenakios View Post
I meant in the later post that the scripts can't add new envelopes like "Envelope generator amplitude" into Reaper's tracks without using some auxiliary hack like an additional dummy Jesusonic plugin.

Maybe the more correct name for the thing would be "Envelope point generator", but that seems like nitpicking...
Gotcha. Yeah, definitely nitpicking territory - please keep focusing on the hacks instead.

May I suggest adding a setting for quantization on the value axis? For example, you might have a parameter for some VSTi's oscillator fine tuning from -12 to +12 semi-tones, where you only want to use whole semi-tones, so you'd divide the parameter value scale into 25 equal steps. Make sense? (I built some automation envelope quantization scripts in the past, I should probably luarn how to redo them myself... )

And yeah, an ADSR generator would be really cool, too - especially if you could link it to MIDI note-on/off events in the same track, so note-ons trigger the attack stage, and note-offs trigger the release stage.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 01-11-2015, 09:26 AM   #36
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Germany
Posts: 1,130
Default

Quote:
Originally Posted by spk77 View Post
Very nice! I didn't realize that it's possible to use these new envelope functions in "real time"!

Manipulating 30000 points while playing (on Win XP32 from 2003 ):



(Analyzing the take is the slowest part...I wish there was a function to get next peak sample position in next X samples . Maybe it would be faster if such native function existed?)
What is this?
timothys_monster is offline   Reply With Quote
Old 01-11-2015, 10:25 AM   #37
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,676
Default

Xenakios and spk77, thanks for showcasing what's possible with this Lua thing. These are two ideas I'd use in my projects everyday. Could you both please share these tools with us so se can contribute with more ideas?
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 01-11-2015, 10:29 AM   #38
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Mercado_Negro View Post
Xenakios and spk77, thanks for showcasing what's possible with this Lua thing. These are two ideas I'd use in my projects everyday. Could you both please share these tools with us so se can contribute with more ideas?
I will of course share mine some day. Not quite yet though because I want to make it better first...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 01-11-2015, 10:33 AM   #39
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Quote:
Originally Posted by timothys_monster View Post
What is this?
No idea... it sure looks like some kind of sorcery. Better keep the pitchforks handy.
__________________
Grey, flat and minimal theme for Reaper: Symbiosis
Seventh is offline   Reply With Quote
Old 01-11-2015, 10:56 AM   #40
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,593
Default

Quote:
Originally Posted by spk77 View Post
Very nice! I didn't realize that it's possible to use these new envelope functions in "real time"!

Manipulating 30000 points while playing (on Win XP32 from 2003 ):
Would it be possible to create de-essing tool similar like this ones noise gate ?
Sexan is online now   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 08:13 AM.


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