Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 12-24-2014, 08:27 AM   #1
dwelx
Human being with feelings
 
dwelx's Avatar
 
Join Date: Dec 2014
Location: Karelia, Russia
Posts: 8
Default MIDI-triggered velocity-sensitive audio/CC flexible DADSR envelope

Dear REAPER friends!
Let me present some little Christmas present to you.

The story began one winter december evening, when I was making some breakdown noises for my EDM track and feeled that some ADSR enveloping on constantly-generating signal was needed. And some synth filter CC-control with it would be great too. I like to trigger things by piano roll notes, so MIDI-triggering with velocity-dependant controls was essential too. Unfortunately, REAPER doesn't come with that type of plugin bundled. Internet searching wasn't fruitfull too - I've found Sault's plugs, but their features were not enough for me. So I've decided to write it by myself!

My work is inspired by both Sault's DADSR plugin (https://stash.reaper.fm/v/19590/midi-dadsr.zip) and midi2ccADSR (https://stash.reaper.fm/v/20673/midi2ccADSR.zip). Latter unfortunately didn't work for me. Also I used as the reference this beautiful article by Nigel Redmon about math aspects of the envelope (http://www.earlevel.com/main/2013/06...pe-generators/). Slightly tuned equations from this article are used too.

And here it is - Zenvelope.
https://stash.reaper.fm/v/22740/zenvelope.zip
If you interested, download it and unpack both library file and plugin file to your REAPER's JS plugs folder. You need REAPER v4.60+ for plugin to work properly.

Features:
- Flexible Delay-Attack-Decay-Sustain-Release (DADSR) envelope
- Process audio data or/and map envelope to MIDI CC or simply use Parameter Modulation slider for REAPER's standart functionality
- MIDI note triggered, with selectable MIDI channels for trigger and CC data
- Attack, Decay and Release shape controls (concave, linear, convex)
- Clamp and intensity controls for some creative tricks (i.e. gate)
- Make any envelope parameter velocity-sensitive (straight or inverted)
- Additionally map velocity to CC
- Some graphics here!

I hope you will enjoy it the very same way as I writed it!
Feel free to critisize and contact me through this great forum.

And Merry Christmas!
Attached Images
File Type: jpg zen_screen.jpg (42.4 KB, 2086 views)

Last edited by dwelx; 12-28-2014 at 08:09 AM. Reason: updated plugin download link
dwelx is offline   Reply With Quote
Old 12-27-2014, 04:54 AM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

... no audio output or travelling orb here (the env variable stays at 0). pressing a MIDI key does not cause any output either.

What am I missing? It must be something basic
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 12-27-2014 at 04:43 PM.
DarkStar is offline   Reply With Quote
Old 12-27-2014, 12:13 PM   #3
dwelx
Human being with feelings
 
dwelx's Avatar
 
Join Date: Dec 2014
Location: Karelia, Russia
Posts: 8
Default

DarkStar, do you have REAPER v4.60+?
Is the plugin's "Trigger MIDI channel" on "any" position or coincides with your MIDI keyboard channel number?
Check track's MIDI input device.
Also check the track's "Record Arm" amd "Record Monitoring" buttons, they need to be switched on.
It definitly should work, I've tested it hard)

Last edited by dwelx; 12-27-2014 at 12:21 PM.
dwelx is offline   Reply With Quote
Old 12-27-2014, 04:43 PM   #4
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Yes to all the above.

I tried it again just now and it works here. Must have been me.

One thing - it outputs redundant CC messages (with the same value as the previous one). Perhaps suppress them? I've just removed the redundant CCs here- the number dropped from 1060 to 210.

Also, try this - add the FX to a track, Bypass it then click Play. Here the envelope curve disappears, and the Play cursor stutters and things become sluggish.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 12-28-2014, 08:12 AM   #5
dwelx
Human being with feelings
 
dwelx's Avatar
 
Join Date: Dec 2014
Location: Karelia, Russia
Posts: 8
Default

DarkStar and all, thanx for testing!
Updated to v1.1, fixed found problems to date.
https://stash.reaper.fm/v/22740/zenvelope.zip
dwelx is offline   Reply With Quote
Old 12-28-2014, 03:42 PM   #6
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

I'm not clear about what all the controls are doing. Can you please shed some light on them? Including:
-- the 6 switches (-/+/inv),
-- the 2 clamp %,
-- in "Map velocity to CC", what velocity is that?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 12-29-2014, 03:29 AM   #7
dwelx
Human being with feelings
 
dwelx's Avatar
 
Join Date: Dec 2014
Location: Karelia, Russia
Posts: 8
Default

Sorry, I should be more specific in descriptions. Here we go:
The six "velocity-sensitive" switches make any of the corresponding states of the envelope (which tuned by approriate sliders above) dependant on trigger's note-on velocity. "-" means disabled, "+" means enabled, "inv" means enabled and inverted. This symbolic abbreviations are used for clear view which one is turned on or off.
For example, lets set "Attack" slider to 1000 ms, then "Velocity-sensitive attack" to:
1) "-" - no velocity dependance, thus attack will take exactly as set (1000 ms)
2) "+" - if trigger note-on velocity is 1 (minimum), attack will take longer, in our case 1000 ms;
if trigger note-on velocity is 127 (maximum), attack will take less time (up to 1 ms);
So, less velocity - more time it takes for envelope to travel.
3) "inv" same as (2), but logic is inverted: less velocity - less time to travel.

Same with other parameters, except "Sustain" and "Intensity" (more velocity - more gain in normal "+" mode)

Now about clamp and intensity:
"Bottom clamp" controls the lower treshold of the envelope, i.e. how much envelope is open preliminary.
"Top clamp" controls the upper treshold of the envelope, i.e. how high the envelope can be at it's peak.
"Intensity" controls the amplitude of the envelope between bottom and top clamp.
For example, set "Bottom clamp" to 20%, "Top clamp" to 90% and this envelope will never rise up more than 90% of the original audio signal (or 90% of the CC maximum value 127*0.9~114), and will never fall lower than 20% of the signal (in idle state CC will be 127*0.2~25). So CC envelope range would be 25-114, instead of default 0-127.
Now to mess things up, if we set "Intensity" within this range to 75%, our range would end at 114*0.75~85.
So, to sum it up, with bottom clamp 20%, top clamp 90% and intensity 75% the standard 0-127 CC range becomes 25-85.
The difference between "Top clamp" and "Intensity" is that first sets brickwall upper treshold and latter can be velocity-sensitive (not constant).
Combining these three controls can lead to some creative effects, for example some gate-like envelope behavior, when "Bottom clamp" is at 100% and "Top clamp" is at 0%.

"Map velocity to CC"
Simply translate trigger's note-on velocity to user-selected CC.
If "Mapped velocity follows intensity and clamp" is set, then translated velocity follows rules, described in previous paragraph, using very same controls.

All this gimmicks are mainly intended for controlling the envelope from piano roll, using note-on event as trigger and it's velocity as some variable to diversify things up.

Last edited by dwelx; 12-29-2014 at 03:45 AM.
dwelx is offline   Reply With Quote
Old 12-29-2014, 04:18 AM   #8
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Got it, thank you. Time to experiment.

Maybe the slider definitions could be changed from
slider20:0<0,2,1{-,+,inv}>-Velocity-sensitive: delay
to
slider20:0<0,2,1{Off,On,Inverted}>-Velocity-sensitive: delay
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 12-29-2014, 04:57 AM   #9
dwelx
Human being with feelings
 
dwelx's Avatar
 
Join Date: Dec 2014
Location: Karelia, Russia
Posts: 8
Default

Yeah, I should definitly think how to improve "user-friendlyness" for the next version!
dwelx is offline   Reply With Quote
Old 05-18-2015, 06:08 AM   #10
kamalmanzkie
Human being with feelings
 
kamalmanzkie's Avatar
 
Join Date: Jul 2012
Location: inside a man
Posts: 84
Default

Quote:
Originally Posted by dwelx View Post
Yeah, I should definitly think how to improve "user-friendlyness" for the next version!
yeah, user friendliness was not great. it broke my brain. i got frustrated, broke a thing.

that being said, instruments of great control are usually frustrating to use until sufficient effort is put in place to understand and wield them correctly. this was definitely worth the time to get used to. it let me do the slooowwww white noise attack fading in with my regular synth that i've been imaging in my head for a while. it makes my synth sound haunted!
kamalmanzkie is offline   Reply With Quote
Old 02-01-2016, 06:57 PM   #11
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 3,432
Default

Any updates coming?
__________________
47.8% of statistics are made up.
lowellben is offline   Reply With Quote
Old 12-20-2016, 03:47 AM   #12
occultron
Human being with feelings
 
occultron's Avatar
 
Join Date: Oct 2016
Posts: 45
Default

Does anyone know of something exactly like this but with (drawable) multi-point envelopes?

I'm using this one all the time for through parameter modulation to modulate any instrument/fx plugin parameter. It's awesome but you're not really able to do more complex stuff like rhythmic things etc.
occultron is offline   Reply With Quote
Old 03-26-2020, 01:28 AM   #13
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Thanks for sharing, what a hidden goldmine. Just tested quickly you can use midi notes for gating audio, but with adsr on top. Now I need to test for which million other things this could be used as well. Nice it delivers already its output as a slider ready to be used with parameter modulation to control any other fx parameter.

In effect making those controllable via midi notes with adsr as well. Replacing fx parameter control from "automation control" to midi note control.

You could say, e.g. each time some drum fill notes are playing, because they are on a specific midi channel, e.g. midi channel 16, then do additionally also this, adding something or removing something.

Wow, now imagine, using even probabilistic triggered notes, before that jsfx, then you get quite some power and variety over fx parameters.

Above only gradual noise addition to any (synth) sound was mentioned, many more example use cases could be mentioned here, with youtube if possible. I guess, most people just did not know about this magic jsfx, like me, thanks to Fergler's hint in another thread I found it. Thanks to all who try to help each other in a positive way.
TonE is offline   Reply With Quote
Old 03-26-2020, 01:31 AM   #14
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Dear dwelx, you came to this forum, left a magical tool, then also left this forum, interesting. Thanks and come back, if not already done under a different name!
TonE is offline   Reply With Quote
Old 03-29-2020, 11:30 PM   #15
Fergler
Human being with feelings
 
Fergler's Avatar
 
Join Date: Jan 2014
Posts: 5,207
Default

Yeah. This thing always get use for me with kick drums...
Fergler is offline   Reply With Quote
Old 04-21-2022, 06:03 AM   #16
ReaGu
Human being with feelings
 
Join Date: Jun 2021
Posts: 1
Default Attack time for plucky sounds

Thanks a lot for this plugs it’s a workflow changer !

However I noticed if I use it with short attack (1ms) for plucky sounds (for instance modulating Reasynth out or Lowpass filter cutoff) I dont get a sharp transient but a smooth one … is it a common issue? can we fix it ?

Last edited by ReaGu; 04-21-2022 at 06:10 AM. Reason: Language
ReaGu is offline   Reply With Quote
Old 10-02-2022, 01:49 PM   #17
/AND/
Human being with feelings
 
Join Date: Aug 2022
Posts: 717
Default

Hi good folks,

Can anyone explain what exactly does this plugin do? Does it do per-note ADSR envelopes for MIDI, or... ?

If it does, this is something I'm searching for in Reaper. If not, I'd appreciate if you can point me out to another resource that can do it.

Thanks.
A
/AND/ is offline   Reply With Quote
Old 10-04-2022, 04:23 AM   #18
SNJUK2
Human being with feelings
 
SNJUK2's Avatar
 
Join Date: Feb 2017
Location: Zhytomyr,Ukraine
Posts: 449
Default

Quote:
Originally Posted by /AND/ View Post
Hi good folks,

Can anyone explain what exactly does this plugin do? Does it do per-note ADSR envelopes for MIDI, or... ?

If it does, this is something I'm searching for in Reaper. If not, I'd appreciate if you can point me out to another resource that can do it.

Thanks.
A
Hallo. This little video help you
https://www.youtube.com/watch?v=ciH0...BD%D1%8E%D0%BA
SNJUK2 is offline   Reply With Quote
Old 10-15-2022, 04:48 AM   #19
robotron
Human being with feelings
 
Join Date: May 2020
Posts: 337
Default

This is a superb plugin, thanks! Is there any way to get it to move to the release portion of the envelope immediately after the attack? I.e. triggering the release without needing a MIDI note off?
robotron is offline   Reply With Quote
Old 11-28-2023, 04:08 PM   #20
boolin
Human being with feelings
 
Join Date: Oct 2018
Posts: 237
Default

for anyone checking this thread

development appears to have been picked up by snjuk2 - see https://forum.cockos.com/showthread.php?t=276121
boolin 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 02:21 AM.


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