envelope
envelope(
@envelope 0
@duration 1000
) -> llll
Generates an audio envelope as a buffer, given a single number or a breakpoint function.
Arguments
@envelope
[int/float/llll]: envelope, as either a single number or a breakpoint function. (default:0
).@duration
[int]: envelope duration, in milliseconds (default:1000
).
Output
envelope [llll]
Usage
$buffer = envelope([0 0 0] [1 1 0.5]);
$buffer.inspect('envelope buffer')