|Home · Standalone · rtcmix~ · iRTcmix · Tutorials · Reference|
an open-source digital signal processing and sound synthesis language
|about · links · contact|
ADDOUT/WIPEOUT/LAYOUTolder disk-based cmix instruments
float outbox,chlist; /* 4 is max # chans */
DescriptionThese three routines provide for three different flavors of disk i/o. ADDOUT will add the contents of the outbox array to whatever is currently on the disk. WIPEOUT will destructively write the contents of the outbox array. LAYOUT will destructively write only those channels marked with a non- zero value in the chlist array while leaving other channels untouched. These routines are actually pointers defined in ugens.h to allow direct movement to a routine that will appropriately write to the type of soundfile pointed to by fno (float or short). ADDOUT(outbox,fno) is actually (*addoutpointer[fno](outbox,fno)) and is thus a little easier to code. In every case the number of channels written will be equal to the number of channels on the output soundfile. It would be dangerous, therefore, to declare float outval; and say ADDOUT(&outval,fno) since if this instrument were to then be used on a multi-channel file unknown havoc could be wreaked upon channels 1-3. It is safest to always use an array and pass the address of the array as the first argument. These return no values. They automatically increment the internal pointers on each call.
See Alsosetnote, open, peakoff.