Strange issues with envelopes, triggering, weird hangs?


#1

Hey guys,
Having some slightly confusing issues regarding the behavior of some envelopes, and some “hangs” I’m getting when using the “legato” gate output from the keyb lru device.

Firstly - I’m making patch for use with the OP1, mainly giving it an ADSR and some extra LFOs by sending the curves out via MIDI host. So this could be an OP1 related issue. Not sure.

The main issue is that with all of the envelopes in the community and factory libraries, there seems to be a delay before the attack stage. Almost like the envelopes are all HADSR, if that makes sense. This stops the envelopes from ever being “snappy”, which is frustrating for my purposes. The other strange behavior is that during the Release stage, if the keyb is triggered it snaps the value to the start of the attack value - in a regular synth the re-trig would pickup the value from the falling release stage.
Can anyone confirm if this is the case with them, or if it’s just a problem with my patch/setup?

I also have envelopes seem to “hang” at full value using the keyb lru device, but not the usual keyb device. Another problem using the lru device is that a single trigger input seems to “fire” the envelope through all of its 4 stages, even when the key is let go.

Any help would be greatly appreciated!


#2

yes there is always a 2.41ms attack phase, are you talking about that? can you confirm that this does not happen when you use a hd (hold decay) object? or is the delay also there with the hd object?

regular synth is a bit a bold statement. i own several hardware synths that restart the attack phase on every key pressed (because it is an option, or just by default). i think it should be possible to program a custom adsr object that picks up where release was :slight_smile: actually i might look into that...
which gate output of the lru object are you using?

never had the hanging problem.


#3

Haha didn’t mean to be over-presumptive there, but literally every synth I’ve ever played has functioned as picking up the envelope from the last stage, rather than re-trigging (including softsynths). But hey, YMMV.

Yeah, this issue with the attack seems to be much more than 2.4ms. It feels in the vicinity of 100ms? Im not quite sure how I would test a HD as a replacement (sorry, still new to the patching!), does the Hold replace Attack? I would definitely appreciate an ADSR that picks up from the stage rather than re-trigging!

With the lru object it was getting hung on the “legato” style gate (gate1 I think?) - the one that does not re-trig until all notes are off, rather than re-trig on each note


#4

ok, can you elaborate on this? how exactly do you send the adsr and some extra lfos? via midi cc that the op1 reacts to? i'm sorry i don't know the op1 so that is why i ask. if you send cc messages at 3000hz a second you could probably overwhelm the op1.

i have never experienced any of the behaviour (hanging, such a long attack delay) when i used the adsr internally with axoloti sounds. so to me it seems that the most likely cause is the communication with the op1. or the rate. it would be helpful if you could post a patch.


#5

here is a patch with two adsr. the top one is the stock adsr, the bottom one is one i changed to behave like you describe your stock one is acting like :slight_smile:

so in short:

-the stock adsr does indeed start the attack phase from the last value of the release (or attack, decay, sustain for that matter)
-my modified version starts always from zero

adsrtest.axp (3.6 KB)


#6

I just had to post an explanation of this to a Modular synth board I'm on, explaining how this was done "back in the day" with analogue Envelope generators. Back then, any of the EG's had BOTH a Gate in and a Trigger in (also called Re-Trigger on some modules). The analogue keyboards produced a Gate when a key was held down and a trigger whenever a key was pressed (even if there was a key already down). All the EG's of the time would replay the Attack and Decay sections of the waveform when the trigger happened. This of course required that the Sustain was not full up to it would mask the Decay. it would look like this:

Since MIDI does not have a standard "trigger" command, the trigger has to be derived from the Note-On command in hardware MIDI to CV converters and I could only find 2 of them in the market of many that did this. I would imagine that the same would hold true on the EG's in the Axo, unless they were coded to respond to the Note-On's in the same way, they would not act this way.


#7

That's a great illustration explaining things @Ersatzplanet. The weird thing is though - your diagram shows that with each re-trig the attack/decay stages are re-played, but they are picked up from the sustain point. What I am experiencing is with re-trigs the attack is starting again from the zero position (like what happens in your illustration when the Gate is sent again). This is what is strange about it! Your illustration explains exactly how I would expect the ADSR to work.

I'm starting to think that there may be a problem with my patch that is causing some issues - I've attached it here for anyone that wants to check it out.

@lokki to explain a little further about the OP1 implementation: it has MIDI in/out via USB only, so I am using the Hosting ability of the Axoloti for this. With the OP1, there is a tool where it can receive 4 incoming MIDI CC messages (CC1-4) and these can be routed to different parameters/fx. In my case, I am trying to send the Ax's ADSR curve to the OP1's filter, to act as a typical filter envelope. The problem seems to be that when I trigger the OP1's keyboard - thus triggering the Ax's gate on the keyb object, and then firing the ADSR - this is when the "delay" is occurring. I'm wondering if this is something to to with the 3000Hz you mentioned - I didn't know that this was a thing. Also, is it possible that the MIDI data is too complex for the single USB port, and it's being throttled which is causing a delay?

Unfortunately I left my Ax in the studio and won't be back there until tomorrow to check the patch again!OP1 EnvelopesFx.axp (20.5 KB)


#8

Hey guys I've gotta correct myself here - it looks like this strange envelope re-trig behaviour is actually only a part of the sss/env/ADSRcrv object, and NOT the default ADSR object. Not sure if @SirSickSik is aware of this? I'm also not getting the "hangs" with the lru object when using the default ADSR, so maybe either my patch/use of Remco's object, or the object itself has a particular characteristic that is causing this. Will continue to investigate!


#9

what exactly is the problem? There might be a mistake in the object that I might be able to fix.. When does it/doesn't it retrigger?


#10

Hey @SirSickSik I just copy/pasted this from my initial post to describe what I mean. @lokki then posted an example of two ADSR objects: one which "snaps" to zero and restarts the envelope from scratch (which is the behaviour I'm experiencing with your object) and then other which "picks up" from wherever the Envelope stage currently is (like the factory ADSR)


#11

Thanks @lokki for the resetable adsr. Look forward to try it later today.

Could some one also look into making some sample rate adsr envelopes? (Dreaming) :slight_smile:


#12

you have two midi inputs in your patch (lru and sss poly midi) and you send to cc4 and cc0 respectively. maybe the combination of them both acts strange? why do you need two midi inputs? you could also connect both adsr's to the same lru object.


#13

well it is not exactly resettable, it just always starts from zero. although, one that has an additional trigger in that goes to zero could be fun!

imagine the use with an lru object. on legato notes it retriggers starting from the release part and on non legato notes it always starts from zero.. :slight_smile:


#14

Hey @lokki the two MIDI inputs was simply as a test - I was switching between to two to see if there was a "legato" behaviour (which there is, in the lru object Gate 2). I tested the patch without the extra keyb in and there was no change to behaviour.

The thing that's still really grinding my gears is the delay before the ADSR happens - I think it's actually in the vicinity of 200-300ms before the attack curve starts. Very noticeable


#15

it kinda depends on which ADSR you're using, whether you'll have this retrigger response.
I'm afraid I can't change that in the ADSRcrv module, because of how the code works (curve is hard coded and will cause other artificial clicks)
As for the delay, it's probably caused by the retrigger function that first puts the gate to zero at note-on, before going to gate-on at the next calculation round (otherwise it wouldn't retrigger)
Though, it might be an idea to give it a dual input to enable retriggered/non-retriggered function depending on the reset-input, forcing the envelope back into attack-stage with each reset trigger. This should take away the delay caused by the zero pulse (and the midi module should have a trigger output instead of the gate2).

@jaffasplaffa: about the audio-rate envelope, I've got one in my envelope folder, based on 6dB LP filters, creating a logarithmic response (this one should do legato)


#16

I think its what I mean maybe I didnt use the right vocabulary.. That has happened before, hehe :slight_smile:

I mean simply an adsr envelope tha is forced to zero on each trigger. This is the best for modulating for example pitch of a kick drum, etc. Its in my opinion best if the envelope is always retriggered for those situations :slight_smile:

I really dont play my keys that much, i automate everything and lets modulation do the works for me, so I have never really used the midi input for Axoloti that much. I mostly use it to control other midi gear, if using it with midi.


#17

hey @jaffasplaffa i uploaded the radsr, a stock adsr module with a resetgate input that always starts from zero. in addition it still has the stock gate.


#18

@SirSickSik Thanks Ill check it out :slight_smile: I actually found a couple of sample rate envelopes in the factory pulse folder. One is called pulse/ahd m.

@lokki same to you, thanks :slight_smile:


#19

haha LOL, I just uploaded a module called rADSR, which has a reset input :wink:
and a midi2cv with retrig: midi2cvRtrg


#20

whoops, sorry missed that one :slight_smile: