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

Reply
 
Thread Tools Display Modes
Old 01-11-2015, 12:29 PM   #41
mete0r
Human being with feelings
 
Join Date: Jul 2013
Posts: 121
Default

Is it possible to get the audio samples in a take considering it's existing envelope data?

Envelope_Evaluate crashes reaper when called with a take envelope. Can anyone confirm?

Code:
function getSelectedTake()
	local item = reaper.GetSelectedMediaItem(0, 0)
	if item then
		return reaper.GetActiveTake(item)
	else
		return nil
	end
end

local take = getSelectedTake()
local env = reaper.GetTakeEnvelopeByName(take, "Volume")
_, envVal = reaper.Envelope_Evaluate(env, idx / sampleRate, sampleRate, 1)
mete0r is offline   Reply With Quote
Old 01-11-2015, 03:31 PM   #42
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,908
Default

Nice one Xen! Are you porting the whole of HG's envelope generation over to lua? That would be pretty awesome.
IXix is offline   Reply With Quote
Old 01-11-2015, 03:34 PM   #43
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Xenakios View Post
I will of course share mine some day. Not quite yet though because I want to make it better first...
That's my plan too

(I'll create a new thread when I get the "take envelope tool" working reliably. And as usual, I really don't know what I'm doing - so, it may take some time.)
spk77 is offline   Reply With Quote
Old 01-11-2015, 03:45 PM   #44
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by IXix View Post
Nice one Xen! Are you porting the whole of HG's envelope generation over to lua? That would be pretty awesome.
Yeah the plan would be to duplicate that functionality as far as possible. The sine function in the examples seen so far likely won't be directly in the more finished version, a sine-line shape can be approximated with Reaper's envelope tensioned curves. That allows for some flexibility with things, like in HourGlass. Of course plans can change...
__________________
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-13-2015, 05:03 AM   #45
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,235
Default

Hi Xenakios!

"loaded question" here!

Do you think that any of the reaper 5 stuff so far will eventually allow your amazing pitch processor to work on multiple items at once?

I'm dying to have a way of pitch bending multiple items at once for the kind of tape stop effects on multiple items in a project!

No worries if not.. I'm hoping reaper 5 will add one more envelope to items for dynamic rate control. (although I can appreciate it's not easy to draw that stuff!)
__________________
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-13-2015, 05:12 AM   #46
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by musicbynumbers View Post
H
Do you think that any of the reaper 5 stuff so far will eventually allow your amazing pitch processor to work on multiple items at once?
That isn't really Reaper 5 specific. I could have added that capability before to the pitch processing plugin, but it's somewhat tricky to do...(The code isn't designed ideally, even after the changes and improvements I did for the latest versions. So making the plugin do anything "extra" is a bit painful.)

edit : The question and the answer were quite unrelated to this thread. But it would actually be pretty cool to reimplement the pitch processing thing with Lua and Reascript. At the moment it however isn't possible, some pieces are missing from script accessible Reaper API.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 01-13-2015 at 06:26 AM.
Xenakios is offline   Reply With Quote
Old 01-13-2015, 08:03 AM   #47
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,235
Default

No worries then

If you don't ask you don't get etc

I'm hoping we will get "rate based pitching" on items at some point as for media work/games it would be very very useful

It's all exciting stuff though!
__________________
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-13-2015, 08:26 AM   #48
Lawrence
Human being with feelings
 
Join Date: Mar 2007
Posts: 21,551
Default

Damn X, that looks great.

My suggestion for that (the final thing) would be to to also let the user just directly choose sine, saw, etc, etc, for the shapes. Not to get rid of the stuff there though, that's great, but to also reduce it for those who'd rather not bother using sliders to make the different shapes.

Maybe buttons for each relevant envelope shape? Dunno.

That is really cool though.
Lawrence is offline   Reply With Quote
Old 01-13-2015, 08:32 AM   #49
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Lawrence View Post
Damn X, that looks great.

My suggestion for that (the final thing) would be to to also let the user just directly choose sine, saw, etc, etc, for the shapes. Not to get rid of the stuff there though, that's great, but to also reduce it for those who'd rather not bother using sliders to make the different shapes.

Maybe buttons for each relevant envelope shape? Dunno.

That is really cool though.
Yeah, might be a good idea to have simple buttons for the simple shapes and an "expert" mode where the shapes are composed of multiple parameters like in HourGlass...(Sigh, I would need to write the Lua code for the buttons first, though...)
__________________
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-13-2015, 08:54 AM   #50
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Tempo changes support and step quantization of the envelope point values added :



Still preliminary and the first public version will be different...
__________________
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-13-2015, 09:04 AM   #51
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,328
Default

Quote:
Originally Posted by Xenakios View Post
Tempo changes support and step quantization of the envelope point values added
Still preliminary and the first public version will be different...
looks great! I can see you are having a lot of fun doing this
heda is offline   Reply With Quote
Old 01-13-2015, 11:04 AM   #52
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,235
Default

This should all go hand in hand with sample accurate automation on certain plugins too for some modular fm/am madness!
__________________
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-13-2015, 02:36 PM   #53
jrp
Human being with feelings
 
Join Date: Nov 2014
Posts: 194
Default

really great!!!

you know what i have always missed about the lfo generator (maybe you wanna think about adding two more sliders):

Fade in and fade out of (generated) envelope
jrp is offline   Reply With Quote
Old 01-13-2015, 02:48 PM   #54
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by jrp View Post
really great!!!

you know what i have always missed about the lfo generator (maybe you wanna think about adding two more sliders):

Fade in and fade out of (generated) envelope
That is certainly in the plans in some form...
__________________
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-13-2015, 03:52 PM   #55
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 musicbynumbers View Post
I'm dying to have a way of pitch bending multiple items at once for the kind of tape stop effects on multiple items in a project!
Well, there's another way to do that, which is conceptually quite easy, although a bit harder to explain in words than show by example, which I'm unfortunately not able to provide atm. Also, finding the right plug-in for the job may not be as easy.

You would take a delay effect plug-in with:
(1) a clean sound,
(2) a sufficient amount of (maximum) delay time (if the buffer is too small, this won't work; you need at least a few seconds for a convincing tape stop), and
(3) most importantly, the delay time should be smoothly adjustable without audible artefacts (i.e. do not use ReaDelay for this; simulated 'tape' delay effects are often good at this, but on the other hand, often lack (1) and/or (2). When I last did this, quite long ago, I built a simply yet sufficiently working custom delay for this specific job in REAKTOR...).

Next, you would place this delay effect plug-in on the master bus, and manually adjust or (for more precise results) automate the delay time, starting at 0 for normal playback, then increase the delay time *in an upwards curve,* very slowly at first (= 'slowing down' the final output), then gradually increasing the speed at which you increase the delay time. At the point where the audio should 'stop' (momentarily), the curve ends, and becomes a straight diagonal line going further up, by exactly the same amount as absolute time passes while playing. This depends on the 'normal' tempo, obviously, so for example, at 120 BPM you would end up increasing the delay time by 0.5 second per one beat played (= 0.5 second) at the 'full stop' point and onwards.

Also, don't be afraid to overdo it! Playing a few beats *backwards* is even more fun than a tape-stop effect, especially when can you do that stuff live while staying locked in in perfect tempo sync.

Hope this description makes enough sense?

... aaand, back to the wonderworld of Luatomation, sorry for the OT interruption guys.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 01-13-2015, 04:20 PM   #56
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,235
Default

Thanks for taking the time to explain that Banned

I have a plugin I found that does tape stops and starts with a single triggered button press that I use on the whole folder with automation which have time controls (but no curve control).

These work pretty well but nothing would beat a new item envelope mode as for SFX for games this stuff is used all the time!

All good stuff. Just wishing for the item envelope way at some point.
__________________
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-30-2015, 05:24 PM   #57
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,999
Default Envelope Range and Point Value

Noob question :
How do you do if you want to set envelope point values depending on the envelope range ?
The "set point..." action is capable of knowing what is the envelope range, but we can't call it from the action window, so I tried to script an alternative. (see Set Value... - Envelope Point Action for more infos).
Here what error I get :


What is the trick ?

EDIT : my script is EEL but I guess it is the same main idea as with LUA.

Last edited by X-Raym; 01-30-2015 at 05:38 PM.
X-Raym is offline   Reply With Quote
Old 01-30-2015, 05:56 PM   #58
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by X-Raym View Post
Noob question :
How do you do if you want to set envelope point values depending on the envelope range ?
The "set point..." action is capable of knowing what is the envelope range, but we can't call it from the action window, so I tried to script an alternative. (see Set Value... - Envelope Point Action for more infos).
Here what error I get :


What is the trick ?

EDIT : my script is EEL but I guess it is the same main idea as with LUA.
I am not completely sure what your problem is...But I make a guess it's the problem where the pan, volume and fx parameter envelopes have different value ranges that must be used. My Lua script takes care of that by getting the envelope name and it then uses different ranges depending on the name of the envelope.

Lua code :
Code:
function get_envelope_range(env)
  rv, name=reaper.GetEnvelopeName(env, "")
  if rv==true then
    if name=="Volume" or name=="Volume (Pre-FX)" then return 0.0,2.0 end
    if name=="Pan" or name=="Pan (Pre-FX)" then return -1.0,1.0 end
  end
  return 0.0,1.0
end
__________________
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-30-2015, 06:05 PM   #59
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,999
Default

@Xenakios
You did understood the problem

So ok it is just filter by name...

It seems to work pretty well for you, so it must be the right solution !

Thanks for sharing this tips :P
X-Raym is offline   Reply With Quote
Old 01-30-2015, 06:05 PM   #60
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

I by the way haven't forgotten about this Lua script to generate envelope points, it will be available publicly at some point, at latest around the time when Reaper 5 is officially released. This is certainly something I want to use myself and I want to get this working 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-30-2015, 06:06 PM   #61
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,999
Default

@Xenakios
We are patiently waiting...
... with a lot of excitement !
X-Raym is offline   Reply With Quote
Old 01-30-2015, 06:13 PM   #62
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

Hmm, wonder what new fun potential this has now that we have item FX envelopes....

a de-esser would require an offline audio spectral analyzer btw.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 01-30-2015, 07:21 PM   #63
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,619
Default

Nice going Xen! I look forward to a time when you consider it ready for birth.
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 01-31-2015, 08:34 AM   #64
ovnis
Human being with feelings
 
ovnis's Avatar
 
Join Date: Oct 2011
Posts: 2,962
Default

Would it be possible to generate this kind of sin LFO (few points and slow start/end) ?


Last edited by ovnis; 01-31-2015 at 08:47 AM.
ovnis is offline   Reply With Quote
Old 02-21-2015, 05:57 PM   #65
Shan
Human being with feelings
 
Shan's Avatar
 
Join Date: Mar 2007
Location: Vancouver
Posts: 2,279
Default

Quote:
Originally Posted by Xenakios View Post
Tempo changes support and step quantization of the envelope point values added :



Still preliminary and the first public version will be different...
This is pretty badass. I'm looking forward to its initial release.

Shane
__________________
"Music should be performed by the musician not by the engineer."

Michael Wagener 25th July 2005, 02:59 PM
Shan is offline   Reply With Quote
Old 02-21-2015, 06:19 PM   #66
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

Quote:
Originally Posted by ovnis View Post
Would it be possible to generate this kind of sin LFO (few points and slow start/end) ?

yes it's possible.

btw xenakios, in quantize modes, you could get rid of excess points. just sayin'

also in quantize mode you need an option so the quantize shape doesn't change with "center", unless you want it to.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 02-21-2015, 06:27 PM   #67
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,235
Default

Quote:
Originally Posted by Shan View Post
This is pretty badass. I'm looking forward to its initial release.

Shane
hell yes!
__________________
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 02-21-2015, 08:41 PM   #68
matthewjumpsoffbuildings
Human being with feelings
 
Join Date: Mar 2013
Posts: 463
Default

this looks awesome. it reminds me a lot of FL Studios automation items, they have LFO generators like this...every step in that direction is a good thing would be even more awesome if this kind of thing was implemented as a built in feature of some kind of native automation item
__________________
[sun sprites] spotify facebook
matthewjumpsoffbuildings is offline   Reply With Quote
Old 04-01-2015, 03:51 PM   #69
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

It's a month later, any clues about release ?

I posted a FR for this type of envelope generation just yet and Heda pointed me to this thread.
Looking insane and just what i wish for !!
vanhaze is offline   Reply With Quote
Old 04-01-2015, 04:37 PM   #70
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by vanhaze View Post
It's a month later, any clues about release ?

I posted a FR for this type of envelope generation just yet and Heda pointed me to this thread.
Looking insane and just what i wish for !!
Patience! I've neglected working on this for some time, but I'll try to find the energy to maybe make a first public release "soon".
__________________
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 04-01-2015, 04:48 PM   #71
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,328
Default

This is too awesome to be neglected.
Sending you tons of energy
heda is offline   Reply With Quote
Old 04-01-2015, 06:31 PM   #72
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,235
Default

Indeed! Totally 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.
musicbynumbers is offline   Reply With Quote
Old 04-02-2015, 12:41 AM   #73
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,999
Default

@Xenakios
This would be so nice !
Do you plan to support other paterns such as sawtooth, square or other things ?
X-Raym is offline   Reply With Quote
Old 04-02-2015, 02:32 AM   #74
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,830
Default

Quote:
Originally Posted by Xenakios View Post
I am not completely sure what your problem is...But I make a guess it's the problem where the pan, volume and fx parameter envelopes have different value ranges that must be used. My Lua script takes care of that by getting the envelope name and it then uses different ranges depending on the name of the envelope.

Lua code :
Code:
function get_envelope_range(env)
  rv, name=reaper.GetEnvelopeName(env, "")
  if rv==true then
    if name=="Volume" or name=="Volume (Pre-FX)" then return 0.0,2.0 end
    if name=="Pan" or name=="Pan (Pre-FX)" then return -1.0,1.0 end
  end
  return 0.0,1.0
end
You can speed that up by storing the name as a key and the value pairs as sub-array.

Code:
envstuff =
{ "volume" = {
    0.0 , 1.0
  }
}
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 04-02-2015, 02:54 AM   #75
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by airon View Post
You can speed that up by storing the name as a key and the value pairs as sub-array.

Code:
envstuff =
{ "volume" = {
    0.0 , 1.0
  }
}
Sure. However, in recent years I've been starting to avoid solutions which involve data caching or similar. There's often a chance the data in the look up storage becomes invalid and intricate mechanisms need to be built that try to ensure the cache stays valid. I guess however that in this case that probably isn't the case and the Lua tables can be used for profit. Might be interesting to benchmark these though...
__________________
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 04-02-2015, 03:18 PM   #76
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Finally been doing some new work on it! Added the Tilt parameter for the generation :

__________________
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 04-02-2015, 03:38 PM   #77
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,328
Default

Beautiful !

more ideas:
Fade in & Fade Out of amplitude from 0 to amplitude and from amplitude to 0. And length of fade in and length of fade out parameters.
heda is offline   Reply With Quote
Old 04-02-2015, 03:59 PM   #78
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,235
Default

this is going to be so incredibly useful!
__________________
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 04-02-2015, 04:00 PM   #79
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by heda View Post
Beautiful !

more ideas:
Fade in & Fade Out of amplitude from 0 to amplitude and from amplitude to 0. And length of fade in and length of fade out parameters.
Yeah...However when adding the Tilt parameter I noticed adding new parameters into the script is a bit messy. Started getting Lua exceptions which took me some time to figure out. I will need to come up with something more robust for that.

I will also rewrite the envelope generation soon to no longer be based on the sine function and rather do something similar to what I did in HourGlass where various shapes can be formed by adding envelope points with a changing tension amount. (This will also have the benefit that the generator doesn't need to generate as many points as it now does...)
__________________
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 04-02-2015, 05:42 PM   #80
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,999
Default

This gonna be TERRIFIC !
X-Raym 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 06:05 PM.


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