Skip to main content

repeat

repeat(
@duration 2
@timeunit 2
) -> llll

Generates an audio process operation for repeating a buffer.


Arguments

  • @duration [int/float]: target duration, based on @timeunit. (default: 2).
  • @timeunit [int]: time unit for @duration. (default: 2).
    • 0: milliseconds
    • 1: samples
    • 2: duration ratio
    • 3: milliseconds difference
    • 4: samples difference

Output

repeat operation [llll]


Usage

repeat is meant to be used with the process function:

$buffer = importaudio('drums.wav').setkey('duration', 50); ## input buffer
$op = repeat(25); ## processing operation
$buffer = $buffer.process($op); ## apply processing
$buffer.inspect('after repeat process')