an open-source digital signal processing and sound synthesis language
about · links · contact


older disk-based cmix instruments

superceded by rtaddout.

Here is the original documentation:


    #include "ugens.h"

    float outbox[4],chlist[4]; /* 4 is max # chans */
    int fno;


These 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 Also

setnote, open, peakoff.