flooper2

flooper2 — Function-table-based crossfading looper.

Description

This opcode implements a crossfading looper with variable loop parameters and three looping modes, optionally using a table for its crossfade shape. It accepts non-power-of-two tables for its source sounds, such as deferred-allocation GEN01 tables.

Syntax

asig flooper2 kamp, kpitch, kloopstart, kloopend, kcrossfade, ifn \
      [, istart, imode, ifenv, iskip]

Initialisation

ifn -- sound source function table number, generally created using GEN01

istart -- playback start pos in seconds

imode -- loop modes: 0 forward, 1 backward, 2 back-and-forth [def: 0]

ifenv -- if non-zero, crossfade envelope shape table number. The default, 0, sets the crossfade to linear.

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

asig -- output sig

kamp -- amplitude control

kpitch -- pitch control (transposition ratio); negative values are not allowed.

kloopstart -- loop start point (secs). Note that although k-rate, loop parameters such as this are only updated once per loop cycle.

kloopend -- loop end point (secs), updated once per loop cycle.

kcrossfade -- crossfade length (secs), updated once per loop cycle and limited to loop length.

Examples

Example 143. Example


aout flooper2 16000, 1, 1, 5, 0.05, 1   ;  loop starts at 1 sec, for 4 secs 0.05 crossfade
       out aout
        


The example above shows the basic operation of flooper. Pitch can be controlled at the k-rate, as well as amplitude and loop parameters. The example assumes table 1 to contain at least 5.05 seconds of audio (4 secs loop duration, starting 1 sec into the table, using 0.05 secs after the loop end for the crossfade). Looping is in mode 0 (normal forward loop).

Credits

Author: Victor Lazzarini;
July 2006

New plugin in version 5

July 2006.