tableshuffleMiscellaneoustableshuffletableshuffle
shuffles the content of a function table so that each element of the source
table is put into a different random position.
Description
This opcode can be used in order to shuffle the content of
function tables into a random order but without loosing any of
the elements. Imagine shuffling a deck of cards. Each element of
the table is copied to a different random position. If that
position was already chosen before then the next free position
is chosen. The length of the table remains the same.
Syntaxtableshuffle ktablenumtableshufflei itablenumPerformancektablenum or itablenum
-- the number of the table to shuffle.
Examples
Here is an example of the tableshuffle opcode. It uses the file tableshuffle.csd.
Example of the tableshuffle opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoRead/Write OperationsCreditsAuthor: Georg Boenn University of Glamorgan, UKNew in Csound version 5.13