Help on Gates, Triggers and the ADSREnvelope class

Post Reply
User avatar
AndyMac
Posts: 108
Joined: Wed Sep 05, 2018 6:16 pm
Location: Wirral UK
Contact:

Fri Jan 18, 2019 11:51 am

Wanting to develop some utilities around gates/triggers. Gates seem relatively straightforward (+5 or 0) but I can't work out how to do Triggers properly.

Whilst looking at this, I looked at the ADSREnvelope class as a way to generate a short single-shot trigger but can't find the event/attribute to properly provide the gate to it!

Help please
Andrew Macaulay
Cherry Dan
Site Admin
Posts: 120
Joined: Fri Jul 27, 2018 5:36 pm

Fri Jan 18, 2019 3:59 pm

AndyMac wrote:
Fri Jan 18, 2019 11:51 am
Wanting to develop some utilities around gates/triggers. Gates seem relatively straightforward (+5 or 0) but I can't work out how to do Triggers properly.

Whilst looking at this, I looked at the ADSREnvelope class as a way to generate a short single-shot trigger but can't find the event/attribute to properly provide the gate to it!
Hi there,

In Voltage Modular, a trigger is just a single sample, typically set to 5.0 volts. It's not necessary to fade it out, though you certain can. You can also just use a very short gate signal, if you want.

Regarding the ADSREnvelope, the function SetGate(boolean gate) is used to set the gate on the envelope.

Thanks!
Dan
User avatar
AndyMac
Posts: 108
Joined: Wed Sep 05, 2018 6:16 pm
Location: Wirral UK
Contact:

Fri Jan 18, 2019 4:43 pm

Thanks - now found an easy way for the Gate - using the PercussionTrigger with an AttackHold of 0 and decay of 0 seems to work well :-) and this is easy to use given it has the Trigger() event that can be called against it!

On the ADSREnvelope, what are the time parameters measured in? And I have been trying to use the SetGate attribute - effectively in the following simple case using a button as a manual gate (and I'm probably doing something really stupid :-) - note adsr is the ADSREnvelope object)…


case Button_Changed:
{
if( doubleValue == 1 ) { adsr.SetGate( true ); }
if( doubleValue == 0 ) { adsr.SetGate( false); }
}


I also have an LED showing the state of the button, working fine, but this does not seem to be triggering the ADSREnvelope - at least as far as I can tell (no change in output voltage from GetValue() and no change of state from GetStage().
Andrew Macaulay
Post Reply