lineto
Prev | Orchestra Opcodes and Operators | Next

## lineto

lineto — Generate glissandos starting from a control signal.

## Description

Generate glissandos starting from a control signal.

## Syntax

    kres lineto ksig, ktime

## Performance

kres -- Output signal.

ksig -- Input signal.

ktime -- Time length of glissando in seconds.

lineto adds glissando (i.e. straight lines) to a stepped input signal (for example, produced by randh or lpshold). It generates a straight line starting from previous step value, reaching the new step value in ktime seconds. When the new step value is reached, such value is held until a new step occurs. Be sure that ktime argument value is smaller than the time elapsed between two consecutive steps of the original signal, otherwise discontinuities will occur in output signal.

When used together with the output of lpshold it emulates the glissando effect of old analog sequencers.

| Note
No new value for ksig or ktime will have effect until the previous ktime has elapsed.

## Examples

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

Example 389. Example of the lineto 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 lineto.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

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

    giSine ftgen 0, 0, 2^10, 10, 1

    instr 1

    kfreq     randh     1000, 20, 2, 1, 2000 ;generates ten random number between 100 and 300 per second
    kpan      randh     .5, 1, 2, 1, .5   ;panning between 0 and 1
    kp        lineto    kpan, .5          ;smoothing pan transition
    aout      poscil    .4, kfreq, giSine
    aL, aR    pan2      aout, kp
              outs      aL, aR

    endin
    </CsInstruments>
    <CsScore>

    i 1 0 10
    e
    </CsScore>
    </CsoundSynthesizer>

## See Also

tlineto

## Credits

Author: Gabriel Maldonado

New in Version 4.13

Prev | Up | Next
linenr | Home | linrand