waveshape
waveshape(
@phase -1 1
@duration 1000
) -> llll
Generates an audio process operation for waveshaping a buffer.
Arguments
@phase
[int/float]: buffer phase envelope between -1 and 1, either as an envelope or a buffer. (default:-1 1
).@duration
[int]: envelope duration in milliseconds. Ignored if@phase
is a buffer. (default:1000
).
Output
waveshape operation [llll]
Usage
waveshape
is meant to be used with the process
function:
$buffer = importaudio('singing.wav'); ## input buffer
$op = waveshape(@phase for $x in 0...90 collect [$x xrand(-1, 1) xrand(-0.25, 0.25)] @duration 3000); ## processing operation
$buffer = $buffer.process($op); ## apply processing
$buffer.inspect('after waveshape process')