setEnvelope()
Purpose
Set audio envelope
Description
Set an envelope on an audio channel
Syntax
setEnvelope( channel, speed )
Arguments
channel audio channel from 0 to 15
speed speed of the envelope
Example
envelopeSpeed = 0.01
clip = loadAudio( "David Silvera/animals_sheep_3" )
playAudio( 0, clip, 4, 0.5, 1, -1 )
loop
clear()
c = controls( 0 )
envelopeSpeed += c.ly * 0.05
envelopeSpeed = clamp( envelopeSpeed, 0, 0.3 )
printAt( 0, 0, "Move Joy-Con left control stick up or down to adjust envelope speed" )
printAt( 0, 1, "Envelope Speed: " + envelopeSpeed )
setEnvelope( 0, envelopeSpeed )
update()
repeat
Associated Commands
audioLength(), getChannelStatus(), loadAudio(), note2Freq(), playAudio(), playNote(), setClipper(), setFilter(), setPan(), setVolume(), startChannel(), stopChannel()