MultiProc:
Filter:
BBCut/Classes (extension) | Libraries > BBCut > Cut procedures

MultiProc
ExtensionExtension

Allows selection between multiple breakbeat cutting algorithms

Description

With this class you may select which of a number of cut procedures to use on the fly. The selection is from an array of BBCutProc derived objects (which might include a further MultiProc!). The index is chosen on a per phrase, or per block basis, by passed valid index returning functions. If a blockfunc is provided, then the selection is always per block. Otherwise it is per phrase. Note that for convoluted switches between many cut procedures at block rate it becomes very unpredictable when phrases start and end, since multiple phrases are bundled together at once.

Class Methods

.new

Arguments:

procs

An array of cut procedure objects.

phrasefunc

a function that returns a valid index into the procs array.

blockfunc

a function that returns a valid index into the procs array.

phrasefunc and blockfunc may be set to nil if unneeded. The default behaviour with all nil is a phrasefunc that randomly selects any index up to procs.size.

Instance Methods

.initMultiProc

Arguments as for new.

All other methods override the base to pass messages to the currently selected procedure, and update that procedure based on the phrase or block func.

Examples