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 a single number, envelope, or 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.view('after waveshape process')