|Home · Standalone · rtcmix~ · iRTcmix · Tutorials · Reference|
an open-source digital signal processing and sound synthesis language
|about · links · contact|
getsample/GETSAMPLE/getsetnoteolder disk-based cmix instruments
Descriptiongetsample will fetch a block of samples (one for each channel) at sample number samplenum from a soundfile. If samplenum has a fractional part, the values returned will be interpolated between samples. The values are returned in the c array, channel 0 in c, channel 1 in c etc. The c array must be dimensioned properly in the calling routine. The argument filenum is the assigned number of the input file being read. getsetnote is the required initialization routine and is identical in function with setnote except that it points (*getsample)() to the appropriate floating point or integer routine, depending on the nature of the file being read, and does some additional necessary file positioning. In ugens.h GETSAMPLE is defined as (*getsample) so the routine can be called analogously with ADDOUT, LAYOUT, etc., e.g.
See Alsosetnote, GETIN, ADDOUT