|
|
|
01-24-2014, 11:02 PM
|
#1
|
Human being with feelings
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
|
MIDI-triggered DADSR
A reupload with some reworking. One file has now become two - the plugin itself and the import library that it uses.
Does what it says on the package - on NoteOn it triggers the envelope (Delay, Attack, Decay, Sustain) and on NoteOff it fires off the Release. Pretty straightforward stuff.
Stash link
https://stash.reaper.fm/v/19590/midi-dadsr.zip
Using the library in your own plugins is easy (hopefully). The import code goes before @init, then call the dadsr_init() function...
Code:
import st.dadsr.jsfx-inc
@init
volume.dadsr_init(delay,attack,decay,sustain,release);
Delay, Attack, Decay, and Release are all in milliseconds (ms). Sustain is a decibel value. For example,
Code:
volume.dadsr_init(20,50,200,-9,1000);
Has a 20 ms delay, takes 50 ms to reach its maximum value (either 1 or "scale" if you've set it), 200 ms to decay down to its sustain volume of -9 dB, then one second to decay away.
To update the envelope values, you can do it all at once, like this -
Code:
@slider
volume.dadsr_update(newDelay,newAttack,newDecay,newSustain,newRelease);
or singly, like this -
Code:
@slider
volume.dadsr_setdelay(newDelay);
volume.dadsr_setrelease(newRelease);
volume.dadsr_setdecay(newDecay);
etc
In the @sample block, run the process() function each time. You can then use the env variable to do your volume modification needs, like such :
Code:
@sample
volume.dadsr_process();
spl0 *= volume.env;
spl1 *= volume.env;
There are two ways to turn it on, and one way to turn it off.
Code:
volume.dadsr_trigger();
volume.dadsr_attack();
volume.dadsr_release();
The first starts the envelope from the beginning (including delay), the second ignores the delay and starts from the attack, the third tells it to start the release.
You can set the maximum value (the "scale") by doing this
Code:
volume.dadsr_scale(value);
Which is really useful if you want to do something like attach it to the velocity of a MIDI note, yes?
Okay. Yeah. Questions?
|
|
|
05-11-2014, 11:34 PM
|
#2
|
Human being with feelings
Join Date: Apr 2014
Location: NY
Posts: 175
|
Hi SaulT and thanks for your time creating this js plugin! So can I use this js to add an envelope filter to reasamplomatic?
|
|
|
05-12-2014, 04:05 AM
|
#3
|
Human being with feelings
Join Date: Jul 2007
Posts: 1,890
|
is this an amplitude envelope or a "control voltage" envelope?
|
|
|
05-12-2014, 12:24 PM
|
#4
|
Human being with feelings
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
|
Yes, you can add this as a volume envelope for another plugin, like reasamplomatic; that was the intention from the get-go.
This is not a CV plugin, it is ADSR with an added "delay" in front. It only responds to trigger events, in this case noteOn and noteOff.
timeline -
on note-on
wait "delay" number of ms before turning on the envelope
take "attack" number of ms to turn envelope on
take "decay" number of ms to drop to sustain volume
stay at "sustain" dB until note-off
on note-off
take "release" number of ms to turn envelope off
Does that help?
You can also check out the Wikipedia entry on it.
"Certain synthesizers also allow for a delay parameter before the attack. Modern synthesizers like the Dave Smith Instruments Prophet '08 have DADSR (delay, attack, decay, sustain, release) envelopes. The delay setting determines the length of silence between hitting a note and the attack."
http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope
|
|
|
05-12-2014, 11:08 PM
|
#5
|
Human being with feelings
Join Date: Apr 2014
Location: NY
Posts: 175
|
Thanks for your reply SaulT. So to make it clear: Is it possible to add a filter fx after the SamplOmatic5000 and then just control the freq parameter of the filter with your ADSR fx?
|
|
|
05-13-2014, 04:48 PM
|
#6
|
Human being with feelings
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
|
Quote:
Thanks for your reply SaulT. So to make it clear: Is it possible to add a filter fx after the SamplOmatic5000 and then just control the freq parameter of the filter with your ADSR fx?
|
Oh, I see what you're saying - for some reason I thought that we were talking about the other way round. Yes, it is possible, albeit with a bit of coding. The bundled plugin is meant as a volume envelope, but the included library could be used to that effect.
I suppose the goal would be to convert a noteOn to an ADSR envelope which modulates a MIDI CC, then tie that filter cut-off to the CC?
|
|
|
05-13-2014, 10:43 PM
|
#7
|
Human being with feelings
Join Date: Apr 2014
Location: NY
Posts: 175
|
Quote:
Originally Posted by SaulT
I suppose the goal would be to convert a noteOn to an ADSR envelope which modulates a MIDI CC, then tie that filter cut-off to the CC?
|
Exactly!!! I would appreciate if you take some time and create something like that, unfortunately i have zero skills to coding :s
|
|
|
05-13-2014, 11:37 PM
|
#8
|
Human being with feelings
Join Date: Feb 2013
Location: London, ON
Posts: 54
|
I have been looking around for solutions to this all consuming problem for a while now. The two most satisfying thing I've come upon are:
1) Midi-Shaper -- solid product Check it out. (Also Volume shaper by the same company) Only 30 bucks.
2) Using an Envelope Follower then using the ASDR on a synth to control the Envelope > to CC > to Volume device.
But there in lie's the next problem, what device to use to modulate the volume... I think the answer is a bit trickier than one might initially imagine as the quality seems to vary and have different flavors for each...
__________________
Sounds are like bubbles of silence;
The best ones have little square rainbows.
|
|
|
05-13-2014, 11:49 PM
|
#9
|
Human being with feelings
Join Date: Feb 2013
Location: London, ON
Posts: 54
|
3)Midi-Dadsr ;-)
This thing is pretty awesome, definitly gonna get some use by me!!
__________________
Sounds are like bubbles of silence;
The best ones have little square rainbows.
|
|
|
05-15-2014, 02:46 PM
|
#10
|
Human being with feelings
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
|
Okay, so I've thrown together something that I *think* works. I'm not going to have the chance to beta test it for several days, so I'm hoping that maybe one of you can. Report back whatever bugs come up and I'll do my best to fix it.
If "velocity-sensitive" is off, then max CC value is 1 (0 dB).
https://stash.reaper.fm/v/20673/midi2ccADSR.zip
|
|
|
05-17-2014, 12:29 AM
|
#11
|
Human being with feelings
Join Date: Apr 2014
Location: NY
Posts: 175
|
Quote:
Originally Posted by SaulT
Okay, so I've thrown together something that I *think* works. I'm not going to have the chance to beta test it for several days, so I'm hoping that maybe one of you can. Report back whatever bugs come up and I'll do my best to fix it.
If "velocity-sensitive" is off, then max CC value is 1 (0 dB).
https://stash.reaper.fm/v/20673/midi2ccADSR.zip
|
Thank you so much SaulT!!! So, i just tried your midi2ccADSR plugin and it seems that is not working for me (i might doing something wrong...), the plugin is communicating with the CC but the ADSR controls they are not working, it Just locks the prefered CC (filter freq in my situation) to it's minimum Value...
What i did was:
1)Adding the adsr first
2)Adding a Samplomatic and loading a synth sound on it
3)Adding A low pass filter
4)Modulate the filter freq of the filter to a CC 102 with ReacontrolMIDI. The method above works perfectly for me when use the vst plugin MIDIMod instead of your midi2ccADSR.(The bad thing for me is that MIDIMod is only for Win) So i would love to see an in build solution)
If you find some time please take a look, thank you again SaulT :-)
|
|
|
05-19-2014, 04:34 PM
|
#12
|
Human being with feelings
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
|
Try it again, please. I made what is in retrospect a glaring error in the trigger code.
|
|
|
05-19-2014, 09:58 PM
|
#13
|
Human being with feelings
Join Date: Apr 2014
Location: NY
Posts: 175
|
Quote:
Originally Posted by SaulT
Try it again, please. I made what is in retrospect a glaring error in the trigger code.
|
I did, but with the same results :s
This time I've test it simple, i just tried to control the filter Freq(CC 74) of a vsti with your adsrtocc fx
(ADSRCC first - VSTi Second)
For some reason it locks the cc to it's minimum value and the adsr dosn't response at all...
Thank you again SaulT for trying to fix it, i hope you'll find some more time accomplish the mission ;-)
|
|
|
06-06-2014, 07:03 AM
|
#14
|
Human being with feelings
Join Date: Apr 2014
Location: NY
Posts: 175
|
Any news here?
|
|
|
01-21-2015, 12:00 AM
|
#16
|
Human being with feelings
Join Date: Apr 2014
Location: NY
Posts: 175
|
Quote:
Originally Posted by dwelx
|
O.M.G, thank you so much dwelx!!!
|
|
|
03-26-2020, 01:41 AM
|
#17
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
|
Quote:
Originally Posted by _TIP_
O.M.G, thank you so much dwelx!!!
|
TIP are you useing dwelx's tool mainly for synth sounds in reasamplomatic?
|
|
|
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 02:48 AM.
|