waveset
Prev | Orchestra Opcodes and Operators | Next

## waveset

waveset — A simple time stretch by repeating cycles.

## Description

A simple time stretch by repeating cycles.

## Syntax

    ares waveset ain, krep [, ilen]

## Initialization

ilen (optional, default=0) -- the length (in samples) of the audio signal. If ilen is set to 0, it defaults to half the given note length (p3).

## Performance

ain -- the input audio signal.

krep -- the number of times the cycle is repeated.

The input is read and each complete cycle (two zero-crossings) is repeated krep times.

There is an internal buffer as the output is clearly slower that the input. Some care is taken if the buffer is too short, but there may be strange effects.

## Examples

Here is an example of the waveset opcode. It uses the file waveset.csd.

Example 1210. Example of the waveset opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

    <CsoundSynthesizer>
    <CsOptions>
    ; Select audio/midi flags here according to platform
    -odac    ;;;realtime audio out
    ;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
    ; For Non-realtime ouput leave only the line below:
    ; -o waveset.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

    sr = 44100
    ksmps = 32
    nchnls = 2
    0dbfs   =1

    instr 1

    krep init p4
    asig soundin "flute.aiff"
    aout waveset asig, krep
         outs aout, aout

    endin
    </CsInstruments>
    <CsScore>

    i 1 0 3 1	;no repetitions
    i 1 + 10 3	;stretching 3 times
    i 1 + 14 6	;6 times

    e
    </CsScore>
    </CsoundSynthesizer>

## Credits

Author: John ffitch
February 2001

New in version 4.11

Prev | Up | Next
vwrap | Home | websocket