Connects sample to instrument's FIFO.
Item AttachSample( Item Instrument, Item Sample, char *FIFOName )
This function connects a sample to a named input FIFO for an instrument. This sample will be played when the instrument is started. See the instrument's documentation for the names of its FIFOs. If the function is successful, it returns an attachment item number.
When you finish with the attachment between sample and instrument, you should call DetachSample()
to detach and free the attachment's resources.
Multisamples: If more than one sample is attached to a FIFO and the instrument is started with a specified pitch, then the list of samples is searched for the first sample whose range of notes and velocities matches the desired note index (pitch). The LowNote and HighNote, and LowVelocity and HighVelocity are read from the AIFF file. The values from the file can be overwritten using SetAudioItemInfo()
.
The function returns the item number of the attachment or an error code (a negative value) if an error occurs.
Folio call implemented in Audio folio V20.
audio.h
DetachSample
(), SetAudioItemInfo(), LoadSample(), UnloadSample(), DebugSample(), CreateSample(), ScanSample(), GetAudioItemInfo()