rtinput - open a sound file or audio device for reading
Call rtinput to open a sound file, or an audio device,
for subsequent reading by real-time instruments.
("Audio device'' just refers to the hardware that handles sound I/O,
such as a sound card on a PC or the built-in hardware on a Mac.
Different device types may be specified using the
set_option scorefile command.)
After rtinput opens a sound file, it
prints information about
the file, such as the header type and sampling rate (unless the
scorefile command has been issued).
A text string with
the name of a sound file, in double-quotes, having a header format
that RTcmix understands. (These include, but are not limited to,
AIFF, AIFC, WAVE, NeXT, and IRCAM.) Only files with data formats
of 32-bit floating point or 16-bit or 24-bit integer are readable.
NOTE: mp3 and other compressed formats are not supported at present.
If input_source is "AUDIO", then input comes from the audio
device. This lets you send input to RTcmix from a microphone
or line-level source. The mic/line audio device is selected
set_option scorefile command.
For linux users, there is a utility program called "alsaprobe"
in RTcmix/test/alsa that can list the available devices. A
similar program exists for OSX users ("coreaudioprobe") in
RTcmix/test/coreaudioprobe. For 'full duplex' (i.e. input and
output simultaneously) use of RTcmix, OSX users need to create
an "aggregate device" using the AudioMIDISetup.app (in /Applications/Utilities)
with both in and out capabilities. As an example, this "aggregate
device" is selected using
set_option("record = on", "device = Aggregate Device:0,0")
Note that the
command has to precede the
command in the scorefile.
Opens "myfile.aif,'' an AIFF file in the current directory, for reading
by any instruments that follow this line in the script.
Opens "trouble.wav'' using a full path name.
Opens the audio device for reading.