rtinput

Open a sound file or audio device for reading.


Synopsis

rtinput(“input_source” [, “memory” ])

Parameters inside the [brackets] are optional.


Description

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 print_off scorefile command has been issued).


Arguments


Examples

   rtinput("myfile.aif")

Opens “myfile.aif,’’ an AIFF file in the current directory, for reading by any instruments that follow this line in the script.

   rtinput("/home/bubba/snd/trouble.wav")

Opens “trouble.wav’’ using a full path name.

   rtinput("AUDIO")

Opens the audio device for reading.


See Also

bus_config, rtsetparams, rtoutput, set_option, DUR, PEAK, SR, filechans, filedur, filepeak, filesr