# Function Calls

The following Audio folio calls use instruments, play attachments, and control audio timing.

## Using Instruments

The following calls are used to start, stop, and release an instrument:

- `ReleaseInstrument()` Allows an instrument to finish (Note Off).
- `StartInstrument()` Begins playing an instrument (Note On).
- `StopInstrument()` Abruptly stops an instrument.

## Playing Attachments

The following calls are used to start, stop, and release an attachment:

- `StartAttachment()` Starts an attachment.
- `StopAttachment()` Stops an attachment.
- `ReleaseAttachment()` Releases an attachment.

## Timing Audio Events

The following calls handle timing audio events:

- `GetAudioTime()` Queries current time.
- `GetCueSignal()` Returns a signal mask for a cue.
- `MonitorAttachment()` Monitors an attachment, sends a cue at a specified point.
- `SignalAtTime()` Requests a wake-up call at a given time.
- `SleepAudioTicks()` Enters wait state for a number of audio ticks.
- `SleepUntilTime()` Enters wait state until a specified audio time.
- `WhereAttachment()` Returns the byte offset of the sample currently playing.

## Audio Clock Control

The following calls control the audio clock:

- `DisownAudioClock()` Gives up ownership of the audio clock.
- `GetAudioDuration`() Asks for the current duration of an audio clock tick.
- `GetAudioRate`() Asks for current audio clock rate.
- `OwnAudioClock`() Takes ownership of clock.
- `SetAudioDuration`() Changes duration of audio clock tick.
- `SetAudioRate`() Changes the rate of the audio clock.