soundtouch
soundtouch(
@stretching 1
@pitchshift 0
@pitchunit 0
@timeunit 2
@antialias 0
@quick 0
@speech 0
) -> llll
Generates an audio process operation for applying soundtouch pitch-shifting/time-stretching to a buffer.
Arguments
@stretching
[int/float]: Stretching amount, as a single number. (default:1
).@pitchshift
[int/float]: Pitch shifting amount, as single number. (default:0
).@pitchunit
[int]: Unit for@pitchshift
. (default:0
).0
: Cents1
: MIDI2
: Hertz3
: Frequency ratio
@timeunit
[int]: Time unit for@stretching
. (default:2
).0
: Milliseconds1
: Samples2
: Duration ratio3
: Milliseconds difference4
: Samples difference
@antialias
[int]: Anti-aliasing filter. (default:0
).0
: Off1
: On
@quick
[int]: Quick processing. (default:0
).0
: Off1
: On
@speech
[int]: Tune algorithm for speech. (default:0
).0
: Off1
: On
Output
Soundtouch operation [llll]
Usage
soundtouch
is meant to be used with the process
function:
$buffer = importaudio('singing.wav'); ## input buffer
$op = soundtouch(@stretching 0.5 @pitchshifting 700); ## processing operation
$buffer = $buffer.process($op); ## apply processing
$buffer.view('after soundtouch process')