A utility class that abstracts the boiler plate code involved with batch slicing a buffer containing distinct chunks of audio (a 'corpus' for these purposes).
Whilst this class is designed to be used most easily in conjunction with FluidLoadFolder, it doesn't have to be. However, it does expect to be passed an IdentityDictionary of a particular format (see description below).
The actual mechanism for doing the slicing is provided by the user, in the form of a function that will form part of a larger Synth (see below).
Create a new instance with the specified slicing and labelling behaviour.
sliceFunc |
A function that does the slicing, returning a UGen. This function is passed the following arguments:
This configuration assumes that you are using one of the FluidCorpusManipulation buffer-based slicing objects, or at least following their conventions, notably:
WARNING: This function must return a UGen that sets a
done flag (see Done), in order for the iteration and housekeeping to work. All FluidBuf* objects do this.A concrete example of a |
idFunc |
WARNING: Not yet implemented
Override the default labelling behaviour for slices. The default is to append the original identifier with |
Retreive the slicing function used by this instance.
Run the slicing function over each entry in the supplied index dictionary
server |
The Server on which to execute |
sourceBuffer |
The Buffer containing the audio to slice |
bufIdx |
An IdentityDictionary that details identifiers and start-end positions for each chunk in the source buffer. See FluidLoadFolder: index |
action |
A function that runs on complettion, will be passed the IdentityDictionary from index as an argument. |
tasks |
The number of parallel processing tasks to run on the server. Default 4. This should probably never be greater than the number of available CPU cores. |
A IdentityDictionary containing information about the position of each discovered slice, using identifiers based on those passed into play (see labelling). This dictionary copies all other entries from the source dictionary on a per-key basis (so you can store arbitary stuff in there should you wish, and it will remain assciated with its original source chunk).