syncloop
Prev | Orchestra Opcodes and Operators | Next

## syncloop

syncloop — Synchronous granular synthesis.

## Description

syncloop is a variation on syncgrain, which implements synchronous granular synthesis. syncloop adds loop start and end points and an optional start position. Loop start and end control grain start positions, so the actual grains can go beyond the loop points (if the loop points are not at the extremes of the table), enabling seamless crossfading. For more information on the granular synthesis process, check the syncgrain manual page.

## Syntax

    asig syncloop kamp, kfreq, kpitch, kgrsize, kprate, klstart, \
          klend, ifun1, ifun2, iolaps[,istart, iskip]

## Initialization

ifun1 -- source signal function table. Deferred-allocation tables (see GEN01) are accepted, but the opcode expects a mono source.

ifun2 -- grain envelope function table.

iolaps -- maximum number of overlaps, max(kfreq)*max(kgrsize). Estimating a large value should not affect performance, but execeeding this value will probably have disastrous consequences.

istart -- starting point of synthesis in secs (defaults to 0).

iskip -- if 1, the opcode initialisation is skipped, for tied notes, performance continues from the position in the loop where the previous note stopped. The default, 0, does not skip initialisation

## Performance

kamp -- amplitude scaling

kfreq -- frequency of grain generation, or density, in grains/sec.

kpitch -- grain pitch scaling (1=normal pitch, < 1 lower, > 1 higher; negative, backwards)

kgrsize -- grain size in secs.

kprate -- readout pointer rate, in grains. The value of 1 will advance the reading pointer 1 grain ahead in the source table. Larger values will time-compress and smaller values will time-expand the source signal. Negative values will cause the pointer to run backwards and zero will freeze it.

klstart -- loop start in secs.

klend -- loop end in secs.

## Examples

Example 491. Example

    iolaps  = 2
    igrsize = 0.04
    ifreq   = iolaps/igrsize
    ips     = 1/iolaps

    istr    = .5  /* timescale  */
    ipitch  = 1   /* pitchscale */

    a1 syncloop 16000, ifreq, ipitch, igrsize, ips*istr, 1, 2, 1, 2, iolaps
       out      a1

## Credits

Author: Victor Lazzarini;
January 2005

New plugin in version 5

January 2005.

Prev | Up | Next
syncgrain | Home | syncphasor