flooper2 Signal Generators:Sample Playback 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, with one or two channels. Syntax asig1[,asig2] flooper2 kamp, kpitch, kloopstart, kloopend, kcrossfade, ifn \ [, istart, imode, ifenv, iskip] Initialization 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 asig1[, asig2] -- output sig (mono or stereo). 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. Mode 1 for imode will only loop backwards from the end point to the start point. Examples 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 flooper2. 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). Here is another example of the flooper2 opcode. It uses the file flooper2.csd and fox.wav. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See also Sample Playback Credits Author: &namevictor; July 2006 New plugin in version 5 July 2006.