Next Page > Hide TOC

QuickTime Music Architecture Reference

Framework
Frameworks/QuickTime.framework
Declared in
IOMacOSTypes.h
QuickTimeMusic.h

Overview

The QuickTime Music Architecture (QTMA) allows QuickTime movies, applications, and other software to play individual musical notes, sequences of notes, and a broad range of sounds from a variety of instruments and synthesizers. With QTMA, you can also import Standard MIDI files and convert them into a QuickTime movie for easy playback.

Functions by Task

Allocating and Using Note Channels

Calling Generic Music Component Clients

Managing Instruments and Parts

Managing Synthesizers

Managing the Generic Music Component

MIDI Component Functions

Miscellaneous Music Component Functions

Note Allocator Configuration and Utilities

Note Allocator Interface Tools

Using the Tune Player

Supporting Functions

Functions

Callbacks

MusicMIDISendProc

Undocumented

typedef ComponentResult (*MusicMIDISendProcPtr) (ComponentInstance self, long refCon, MusicMIDIPacket *mmp);

If you name your function MyMusicMIDISendProc, you would declare it this way:

ComponentResult MyMusicMIDISendProc (
   ComponentInstance    self,
   long                 refCon,
   MusicMIDIPacket      *mmp );

Parameters
self

Undocumented

refCon

A reference constant that the client code supplies to your callback. You can use this reference to point to a data structure containing any information your callback needs.

mmp

A pointer to a MusicMIDIPacket structure.

Return Value

See Error Codes. Your callback should return noErr if there is no error.

Declared In
QuickTimeMusic.h

MusicOfflineDataProc

Undocumented

typedef ComponentResult (*MusicOfflineDataProcPtr) (Ptr SoundData, long numBytes, long myRefCon);

If you name your function MyMusicOfflineDataProc, you would declare it this way:

ComponentResult MyMusicOfflineDataProc (
   Ptr     SoundData,
   long    numBytes,
   long    myRefCon );

Parameters
SoundData

Undocumented

numBytes

Undocumented

myRefCon

Undocumented

Return Value

See Error Codes. Your callback should return noErr if there is no error.

Declared In
QuickTimeMusic.h

TuneCallBackProc

Called when a sequence of music events is placed into a queue to be played.

typedef void (*TuneCallBackProcPtr) (const TuneStatus *status, long refCon);

If you name your function MyTuneCallBackProc, you would declare it this way:

void MyTuneCallBackProc (
   const TuneStatus    *status,
   long                refCon );

Parameters
status

A pointer to a TuneStatus structure.

refCon

A reference constant that the client code supplies to your callback. You can use this reference to point to a data structure containing any information your callback needs.

Declared In
QuickTimeMusic.h

TunePlayCallBackProc

Supports the TuneSetNoteChannels function.

typedef void (*TunePlayCallBackProcPtr) (unsigned long *event, long seed, long refCon);

If you name your function MyTunePlayCallBackProc, you would declare it this way:

void MyTunePlayCallBackProc (
   unsigned long    *event,
   long             seed,
   long             refCon );

Parameters
event

A pointer to a QuickTime music event structure in the sequence data.

seed

A 32-bit value that is guaranteed to be different for each call to the callback routine (unless 2^32 calls are made, after which the values repeat), with one exception: the value passed at the beginning of a note is also passed at the end of the note's duration, together with a note structure or an extended note in which the velocity bits are set to 0.

refCon

A reference constant that the client code supplies to the callback.

Declared In
QuickTimeMusic.h

Data Types

AtomicInstrument

Represents a type used by the Music Architecture API.

typedef Handle AtomicInstrument;

Availability
Declared In
QuickTimeMusic.h

AtomicInstrumentPtr

Represents a type used by the Music Architecture API.

typedef Ptr AtomicInstrumentPtr;

Availability
Declared In
QuickTimeMusic.h

GCPart

Defines a part in the QuickTime Music Architecture.

struct GCPart {
   long                hwInstrumentNumber;
   short               controller[128];
   long                volume;
   long                polyphony;
   long                midiChannel;
   GCInstrumentData    id;
};

Fields
hwInstrumentNumber
Discussion

The instrument number of the instrument for the part.

controller
Discussion

An array of 128 bits identifying the available controllers; see Music Controllers. Bits are numbered from 1 to 128, starting with the most significant bit of the long word and continuing to the least significant of the last bit.

volume
Discussion

The sound volume for this part, ranging from -1.0 to +1.0. The high-order 8 bits contain the integer part; the low-order 8 bits contain the fractional part. A value of +1.0 constitutes the maximum volume of the user's computer. Negative values are silent but retain the magnitude of the volume setting.

polyphony
Discussion

The maximum number of voices.

midiChannel
Discussion

The system MIDI channel or, for a hardware device, the slot number.

id
Discussion

A GCInstrumentData structure.

Related Functions
MusicDerivedSetInstrument
MusicDerivedSetKnob
MusicDerivedSetPart
MusicDerivedSetPartInstrumentNumber
MusicDerivedStorePartInstrument
MusicGenericGetPart
Declared In
QuickTimeMusic.h

GenericKnobDescription

Describes a knob for the generic music component.

struct GenericKnobDescription {
   KnobDescription    kd;
   long               hw1;
   long               hw2;
   long               hw3;
   long               settingsID;
};

Fields
kd
Discussion

A KnobDescription structure.

hw1
Discussion

Undocumented

hw2
Discussion

Undocumented

hw3
Discussion

Undocumented

settingsID
Discussion

Undocumented

Discussion

Undocumented

Related Functions
MusicDerivedSetKnob
Declared In
QuickTimeMusic.h

GenericKnobDescriptionListHandle

Represents a type used by the Music Architecture API.

typedef GenericKnobDescriptionListPtr * GenericKnobDescriptionListHandle;

Availability
Declared In
QuickTimeMusic.h

GenericKnobDescriptionListPtr

Represents a type used by the Music Architecture API.

typedef GenericKnobDescriptionList * GenericKnobDescriptionListPtr;

Availability
Declared In
QuickTimeMusic.h

InstrumentAboutInfo

Contains the information that appears in an instrument's About box and is returned by MusicGetInstrumentAboutInfo.

struct InstrumentAboutInfo {
   PicHandle    p;
   Str255       author;
   Str255       copyright;
   Str255       other;
};

Fields
p
Discussion

A handle to a graphic for the About box.

author
Discussion

The author's name.

copyright
Discussion

The copyright information.

other
Discussion

Any other textual information.

Related Functions
MusicGetInstrumentAboutInfo
Declared In
QuickTimeMusic.h

InstrumentInfoListHandle

Represents a type used by the Music Architecture API.

typedef InstrumentInfoListPtr * InstrumentInfoListHandle;

Availability
Declared In
QuickTimeMusic.h

InstrumentInfoListPtr

Represents a type used by the Music Architecture API.

typedef InstrumentInfoList * InstrumentInfoListPtr;

Availability
Declared In
QuickTimeMusic.h

KnobDescription

Contains sound parameter values for a single knob.

struct KnobDescription {
   Str63    name;
   long     lowValue;
   long     highValue;
   long     defaultValue;
   long     flags;
   long     knobID;
};

Fields
name
Discussion

The name of the knob.

lowValue
Discussion

The lowest number you can set the knob to.

highValue
Discussion

The highest number you can set the knob to.

defaultValue
Discussion

A value to use for the default. A default instrument is made of all default values.

flags
Discussion

Constants (see below) that provide various items of information about the knob. See these constants:

knobID
Discussion

A knob ID or index. A nonzero value in the high byte indicates that it is an ID. The knob index ranges from 1 to the number of knobs; the ID is an arbitrary number. Use the knob ID to refer to the knob in preference to the knob index, which may change.

Related Functions
MusicGetDrumKnobDescription
MusicGetInstrumentKnobDescription
MusicGetKnobDescription
Declared In
QuickTimeMusic.h

MusicComponent

Represents a type used by the Music Architecture API.

typedef ComponentInstance MusicComponent;

Availability
Declared In
QuickTimeMusic.h

MusicController

Represents a type used by the Music Architecture API.

typedef SInt32 MusicController;

Availability
Declared In
QuickTimeMusic.h

MusicMIDIPacket

Describes MIDI data passed by note allocation calls.

struct MusicMIDIPacket {
   unsigned short    length;
   unsigned long     reserved;
   UInt8             data[249];
};

Fields
length
Discussion

The length of the data in the packet.

reserved
Discussion

Contains 0, or one of the music packet status constants (see below). See these constants:

data
Discussion

MIDI data.

Related Functions
MusicDerivedMIDISend
MusicMIDIReadHookProc
MusicMIDISendProc
MusicSendMIDI
NASendMIDI
QTMIDISendMIDI
Declared In
QuickTimeMusic.h

MusicMIDISendUPP

Represents a type used by the Music Architecture API.

typedef STACK_UPP_TYPE(MusicMIDISendProcPtr) MusicMIDISendUPP;

Availability
Declared In
QuickTimeMusic.h

MusicOfflineDataUPP

Represents a type used by the Music Architecture API.

typedef STACK_UPP_TYPE(MusicOfflineDataProcPtr) MusicOfflineDataUPP;

Availability
Declared In
QuickTimeMusic.h

NoteAllocator

Represents a type used by the Music Architecture API.

typedef ComponentInstance NoteAllocator;

Availability
Declared In
QuickTimeMusic.h

NoteChannel

Represents a type used by the Music Architecture API.

typedef struct OpaqueNoteChannel * NoteChannel;

Availability
Declared In
QuickTimeMusic.h

NoteRequest

Provides complete information for allocating a note channel.

struct NoteRequest {
   NoteRequestInfo    info;
   ToneDescription    tone;
};

Fields
info
Discussion

A NoteRequestInfo structure.

tone
Discussion

A ToneDescription structure.

Related Functions
NAGetNoteRequest
NANewNoteChannel
Declared In
QuickTimeMusic.h

QTMIDIComponent

Represents a type used by the Music Architecture API.

typedef ComponentInstance QTMIDIComponent;

Availability
Declared In
QuickTimeMusic.h

QTMIDIPortListHandle

Represents a type used by the Music Architecture API.

typedef QTMIDIPortListPtr * QTMIDIPortListHandle;

Availability
Declared In
QuickTimeMusic.h

QTMIDIPortListPtr

Represents a type used by the Music Architecture API.

typedef QTMIDIPortList * QTMIDIPortListPtr;

Availability
Declared In
QuickTimeMusic.h

Str31

Represents a type used by the Music Architecture API.

typedef unsigned char Str31;

Availability
Declared In
IOMacOSTypes.h

SynthesizerConnections

Describes how a MIDI device is connected to the user's computer.

struct SynthesizerConnections {
   OSType    clientID;
   OSType    inputPortID;
   OSType    outputPortID;
   long      midiChannel;
   long      flags;
   long      unique;
   long      reserved1;
   long      reserved2;
};

Fields
clientID
Discussion

The client ID provided by the MIDI Manager, or 'OMS ' for an OMS port.

inputPortID
Discussion

The ID provided by the MIDI Manager or OMS for the port used to SEND to the MIDI synthesizer.

outputPortID
Discussion

The ID provided by the MIDI Manager or OMS for the port that RECEIVES from a keyboard or other control device.

midiChannel
Discussion

The system MIDI channel or, for a hardware device, the slot number.

flags
Discussion

Constants (see below) that provide information about the type of connection. See these constants:

unique
Discussion

A unique ID you can use instead of an index to identify the synthesizer to the note allocator.

reserved1
Discussion

Reserved. Set to 0.

reserved2
Discussion

Reserved. Set to 0.

Related Functions
NAGetRegisteredMusicDevice
NARegisterMusicDevice
Declared In
QuickTimeMusic.h

SynthesizerDescription

Contains information about a synthesizer.

struct SynthesizerDescription {
   OSType           synthesizerType;
   Str31            name;
   unsigned long    flags;
   unsigned long    voiceCount;
   unsigned long    partCount;
   unsigned long    instrumentCount;
   unsigned long    modifiableInstrumentCount;
   unsigned long    channelMask;
   unsigned long    drumPartCount;
   unsigned long    drumCount;
   unsigned long    modifiableDrumCount;
   unsigned long    drumChannelMask;
   unsigned long    outputCount;
   unsigned long    latency;
   unsigned long    controllers[4];
   unsigned long    gmInstruments[4];
   unsigned long    gmDrums[4];
};

Fields
synthesizerType
Discussion

The synthesizer type. This is the same as the music component subtype.

name
Discussion

Text name of the synthesizer type.

flags
Discussion

Constants (see below) that provide information about how the synthesizer works. See these constants:

voiceCount
Discussion

Maximum polyphony.

partCount
Discussion

Maximum multi-timbrality (and MIDI channels).

instrumentCount
Discussion

The number of built-in ROM instruments. This does not include General MIDI instruments.

modifiableInstrumentCount
Discussion

The number of slots available for saving user-modified instruments.

channelMask
Discussion

Which channels a MIDI device always uses for instruments. Set to 0xFFFF for all channels.

drumPartCount
Discussion

The maximum multi-timbrality of drum parts. For synthesizers where drum kits are separated from instruments.

drumCount
Discussion

The number of built-in ROM drum kits. This does not include General MIDI drum kits. For synthesizers where drum kits are separated from instruments.

modifiableDrumCount
Discussion

The number of slots available for saving user-modified drum kits. For MIDI synthesizers where drum kits are separated from instruments.

drumChannelMask
Discussion

Which channels a MIDI device always uses for drum kits. Set to FFFF for all channels.

outputCount
Discussion

The number of audio outputs. This is usually 2.

latency
Discussion

The response time in microseconds.

controllers
Discussion

An array of 128 bits identifying the available controllers; see Music Controllers. Bits are numbered from 1 to 128, starting with the most significant bit of the long word and continuing to the least significant of the last bit.

gmInstruments
Discussion

An array of 128 bits giving the available General MIDI instruments.

gmDrums
Discussion

An array of 128 bits giving the available General MIDI drum kits.

Related Functions
MusicGetDescription
Declared In
QuickTimeMusic.h

TuneCallBackUPP

Represents a type used by the Music Architecture API.

typedef STACK_UPP_TYPE(TuneCallBackProcPtr) TuneCallBackUPP;

Availability
Declared In
QuickTimeMusic.h

TunePlayCallBackUPP

Represents a type used by the Music Architecture API.

typedef STACK_UPP_TYPE(TunePlayCallBackProcPtr) TunePlayCallBackUPP;

Availability
Declared In
QuickTimeMusic.h

TunePlayer

Represents a type used by the Music Architecture API.

typedef ComponentInstance TunePlayer;

Availability
Declared In
QuickTimeMusic.h

TuneStatus

Provides information on the currently playing tune.

struct TuneStatus {
   unsigned long *   tune;
   unsigned long *   tunePtr;
   TimeValue         time;
   short             queueCount;
   short             queueSpots;
   TimeValue         queueTime;
   long              reserved[3];
};

Fields
tune
Discussion

The currently playing tune.

tunePtr
Discussion

Current position within the playing tune.

time
Discussion

Current tune time.

queueCount
Discussion

Number of tunes queued up.

queueSpots
Discussion

Number of tunes that can be added to the queue.

queueTime
Discussion

Total amount of playing time represented by tunes in the queue. This value can be very inaccurate.

reserved
Discussion

Reserved; set to 0.

Related Functions
TuneGetStatus
Declared In
QuickTimeMusic.h

Constants

Generic Music Constants

Constants that represent generic music types.

enum {
   kGenericMusicComponentSubtype = 'gene'
};
enum {
   kGenericMusicDoMIDI           = 1 << 0, /* implement normal MIDI messages for note,
   controllers,
   and program changes 0-127 */
   kGenericMusicBank0            = 1 << 1, /* implement instrument bank changes on controller 0 */
   kGenericMusicBank32           = 1 << 2, /* implement instrument bank changes on controller 32 */
   kGenericMusicErsatzMIDI       = 1 << 3, /* construct MIDI packets,
   but send them to the derived component */
   kGenericMusicCallKnobs        = 1 << 4, /* call the derived component with special knob format call */
   kGenericMusicCallParts        = 1 << 5, /* call the derived component with special part format call */
   kGenericMusicCallInstrument   = 1 << 6, /* call MusicDerivedSetInstrument for MusicSetInstrument calls */
   kGenericMusicCallNumber       = 1 << 7, /* call MusicDerivedSetPartInstrumentNumber for MusicSetPartInstrumentNumber calls,
   & don't send any C0 or bank stuff */
   kGenericMusicCallROMInstrument = 1 << 8, /* call MusicSetInstrument for MusicSetPartInstrumentNumber for "ROM" instruments,
   passing params from the ROMi resource */
   kGenericMusicAllDefaults      = 1 << 9 /* indicates that when a new instrument is recalled,
   all knobs are reset to DEFAULT settings. True for GS modules */
};
enum {
   kGenericMusicKnob             = 1,
   kGenericMusicInstrumentKnob   = 2,
   kGenericMusicDrumKnob         = 3,
   kGenericMusicGlobalController = 4
};
enum {
   kGenericMusicMiscLongFirst    = 0,
   kGenericMusicMiscLongVoiceCount = 1,
   kGenericMusicMiscLongPartCount = 2,
   kGenericMusicMiscLongModifiableInstrumentCount = 3,
   kGenericMusicMiscLongChannelMask = 4,
   kGenericMusicMiscLongDrumPartCount = 5,
   kGenericMusicMiscLongModifiableDrumCount = 6,
   kGenericMusicMiscLongDrumChannelMask = 7,
   kGenericMusicMiscLongOutputCount = 8,
   kGenericMusicMiscLongLatency  = 9,
   kGenericMusicMiscLongFlags    = 10,
   kGenericMusicMiscLongFirstGMHW = 11,  /* number to add to locate GM main instruments */
   kGenericMusicMiscLongFirstGMDrumHW = 12, /* number to add to locate GM drumkits */
   kGenericMusicMiscLongFirstUserHW = 13, /* First hw number of user instruments (presumed sequential) */
   kGenericMusicMiscLongLast     = 14
};
enum {
   kGenericMusicResFirst         = 0,
   kGenericMusicResMiscStringList = 1,   /* STR# 1: synth name,
   2:about author,
3:aboutcopyright,
4:aboutother */
   kGenericMusicResMiscLongList  = 2,    /* Long various params,
   see list below */
   kGenericMusicResInstrumentList = 3,   /* NmLs of names and shorts,
   categories prefixed by two bullet characters */
   kGenericMusicResDrumList      = 4,    /* NmLs of names and shorts */
   kGenericMusicResInstrumentKnobDescriptionList = 5, /* Knob */
   kGenericMusicResDrumKnobDescriptionList = 6, /* Knob */
   kGenericMusicResKnobDescriptionList = 7, /* Knob */
   kGenericMusicResBitsLongList  = 8,    /* Long back to back bitmaps of controllers,
   gminstruments,
   and drums */
   kGenericMusicResModifiableInstrumentHW = 9, /* Shrt same as the hw shorts trailing the instrument names,
   a shortlist */
   kGenericMusicResGMTranslation = 10,   /* Long 128 long entries,
   1 for each gm inst,
   of local instrument numbers 1-n (not hw numbers) */
   kGenericMusicResROMInstrumentData = 11, /* knob lists for ROM instruments,
   so the knob values may be known */
   kGenericMusicResAboutPICT     = 12,   /* picture for aboutlist. must be present for GetAbout call to work */
   kGenericMusicResLast          = 13
};
enum {
   kMusicGenericRange            = 0x0100,
   kMusicDerivedRange            = 0x0200
};

Constants
kGenericMusicAllDefaults

Indicates that when a new instrument is recalled, all knobs are reset to DEFAULT settings. True for GS modules.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicDrumKnob

Value is 3.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicMiscLongFirstGMHW

Number to add to locate GM main instruments.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicMiscLongFirstGMDrumHW

Number to add to locate GM drumkits.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicMiscLongFirstUserHW

First HW number of user instruments (presumed sequential).

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResMiscStringList

STR# 1: synth name, 2:about author,3:aboutcopyright,4:aboutother.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResMiscLongList

Long various params, see list below.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResInstrumentList

NmLs of names and shorts, categories prefixed by two bullet characters.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResDrumList

NmLs of names and shorts.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResInstrumentKnobDescriptionList

Knob.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResDrumKnobDescriptionList

Knob.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResKnobDescriptionList

Knob.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResBitsLongList

Long back to back bitmaps of controllers, gminstruments, and drums.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResModifiableInstrumentHW

Short same as the HW shorts trailing the instrument names, a short list.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResGMTranslation

Long 128 long entries, 1 for each gm instrument, of local instrument numbers 1-n (not HW numbers).

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResROMInstrumentData

Knob lists for ROM instruments, so the knob values may be known.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kGenericMusicResAboutPICT

Picture for about list. Must be present for GetAbout call to work.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

Declared In
QuickTimeMusic.h

MusicSetPartAtomicInstrument Values

Constants passed to MusicSetPartAtomicInstrument.

enum {
   kGetAtomicInstNoExpandedSamples = 1 << 0,
   kGetAtomicInstNoOriginalSamples = 1 << 1,
   kGetAtomicInstNoSamples       = kGetAtomicInstNoExpandedSamples | kGetAtomicInstNoOriginalSamples,
   kGetAtomicInstNoKnobList      = 1 << 2,
   kGetAtomicInstNoInstrumentInfo = 1 << 3,
   kGetAtomicInstOriginalKnobList = 1 << 4,
   kGetAtomicInstAllKnobs        = 1 << 5 /* return even those that are set to default*/
};

Declared In
QuickTimeMusic.h

MusicGetInstrumentInfo Values

Constants passed to MusicGetInstrumentInfo.

enum {
   kGetInstrumentInfoNoBuiltIn   = 1 << 0,
   kGetInstrumentInfoMidiUserInst = 1 << 1,
   kGetInstrumentInfoNoIText     = 1 << 2
};

Declared In
QuickTimeMusic.h

kInstrumentMatchGMNumber

Constants grouped with kInstrumentMatchGMNumber.

enum {
   kInstrumentMatchSynthesizerType = 1,
   kInstrumentMatchSynthesizerName = 2,
   kInstrumentMatchName          = 4,
   kInstrumentMatchNumber        = 8,
   kInstrumentMatchGMNumber      = 16,
   kInstrumentMatchGSNumber      = 32
};

Declared In
QuickTimeMusic.h

kKnobBasic

Constants grouped with kKnobBasic.

enum {
   kKnobBasic                    = 8,    /* knob shows up in certain simplified lists of knobs */
   kKnobReadOnly                 = 16,   /* knob value cannot be changed by user or with a SetKnob call */
   kKnobInterruptUnsafe          = 32,   /* only alter this knob from foreground task time (may access toolbox) */
   kKnobKeyrangeOverride         = 64,   /* knob can be overridden within a single keyrange (software synth only) */
   kKnobGroupStart               = 128,  /* knob is first in some logical group of knobs */
   kKnobFixedPoint8              = 1024,
   kKnobFixedPoint16             = 2048, /* One of these may be used at a time. */
   kKnobTypeNumber               = 0 << 12,
   kKnobTypeGroupName            = 1 << 12, /* "knob" is really a group name for display purposes */
   kKnobTypeBoolean              = 2 << 12, /* if range is greater than 1,
   its a multi-checkbox field */
   kKnobTypeNote                 = 3 << 12, /* knob range is equivalent to MIDI keys */
   kKnobTypePan                  = 4 << 12, /* range goes left/right (lose this? ) */
   kKnobTypeInstrument           = 5 << 12, /* knob value = reference to another instrument number */
   kKnobTypeSetting              = 6 << 12, /* knob value is 1 of n different things (eg,
   fm algorithms) popup menu */
   kKnobTypeMilliseconds         = 7 << 12, /* knob is a millisecond time range */
   kKnobTypePercentage           = 8 << 12, /* knob range is displayed as a Percentage */
   kKnobTypeHertz                = 9 << 12, /* knob represents frequency */
   kKnobTypeButton               = 10 << 12 /* momentary trigger push button */
};

Constants
kKnobReadOnly

The knob value cannot be changed by the user or with a set knob call.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobInterruptUnsafe

Alter this knob only from foreground task time.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobKeyrangeOverride

The knob can be overridden within a single key range (software synthesizer only).

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobGroupStart

The knob is first in some logical group of knobs.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobFixedPoint8

Interpret knob numbers as fixed-point 8-bit.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobFixedPoint16

Interpret knob numbers as fixed-point 16-bit.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypeNumber

The knob value is a numerical value.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypeGroupName

The name of the knob is really a group name for display purposes.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypeBoolean

The knob is an on/off knob. If the range of the knob (as specified by the low value and high value in the knob description structure) is greater than one, the knob is a multi-checkbox field.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypeNote

The knob value range is equivalent to MIDI keys.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypePan

The knob value is the pan setting and is within a range (as specified by the low value and high value in the knob description structure) that goes from left to right.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypeInstrument

The knob value is a reference to another instrument number.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypeSetting

The knob value is one of several different discrete settings; for example, items on a pop-up menu.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypeMilliseconds

The knob value is in milliseconds.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypePercentage

The knob value is a percentage of the range.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kKnobTypeHertz

The knob value represents frequency.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

Declared In
QuickTimeMusic.h

MusicMIDIPacket Values

Constants passed to MusicMIDIPacket.

enum {
   kMusicPacketPortLost          = 1,    /* received when application loses the default input port */
   kMusicPacketPortFound         = 2,    /* received when application gets it back out from under someone else's claim */
   kMusicPacketTimeGap           = 3     /* data[0] = number of milliseconds to keep the MIDI line silent */
};

Constants
kMusicPacketPortLost

The application has lost the default input port.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kMusicPacketPortFound

The application has retrieved the input port from the previous owner.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

Declared In
QuickTimeMusic.h

kPickDontMix

Constants grouped with kPickDontMix.

enum {
   kPickDontMix                  = 1,    /* dont mix instruments with drum sounds */
   kPickSameSynth                = 2,    /* only allow the same device that went in,
   to come out */
   kPickUserInsts                = 4,    /* show user insts in addition to ROM voices */
   kPickEditAllowEdit            = 8,    /* lets user switch over to edit mode */
   kPickEditAllowPick            = 16,   /* lets the user switch over to pick mode */
   kPickEditSynthGlobal          = 32,   /* edit the global knobs of the synth */
   kPickEditControllers          = 64    /* edit the controllers of the notechannel */
};

Declared In
QuickTimeMusic.h

kSetAtomicInstCallerGuarantees

Constants grouped with kSetAtomicInstCallerGuarantees.

enum {
   kSetAtomicInstKeepOriginalInstrument = 1 << 0,
   kSetAtomicInstShareAcrossParts = 1 << 1, /* inst disappears when app goes away*/
   kSetAtomicInstCallerTosses    = 1 << 2, /* the caller isn't keeping a copy around (for NASetAtomicInstrument)*/
   kSetAtomicInstCallerGuarantees = 1 << 3, /* the caller guarantees a copy is around*/
   kSetAtomicInstInterruptSafe   = 1 << 4, /* dont move memory at this time (but process at next task time)*/
   kSetAtomicInstDontPreprocess  = 1 << 7 /* perform no further preprocessing because either 1)you know the instrument is digitally clean,
   or 2) you got it from a GetPartAtomic*/
};

Declared In
QuickTimeMusic.h

kSynthesizerConnectionFMS

Constants grouped with kSynthesizerConnectionFMS.

enum {
   kSynthesizerConnectionFMS     = 1,    /* this connection imported from FMS */
   kSynthesizerConnectionMMgr    = 2,    /* this connection imported from the MIDI Mgr */
   kSynthesizerConnectionOMS     = 4,    /* this connection imported from OMS */
   kSynthesizerConnectionQT      = 8,    /* this connection is a QuickTime-only port */
   kSynthesizerConnectionOSXMIDI = 16,   /* this connection is an OS X CoreMIDI port */
   /* lowest five bits are mutually exclusive; combinations reserved for future use.*/
   kSynthesizerConnectionUnavailable = 256 /* port exists,
   but cannot be used just now */
};

Constants
kSynthesizerConnectionFMS

This connection is imported from the FreeMIDI system.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerConnectionMMgr

This connection is imported from the MIDI Manager.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerConnectionOMS

This connection is imported from the Open Music System (OMS).

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerConnectionQT

This connection is a QuickTime-only port.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

Declared In
QuickTimeMusic.h

kSynthesizerDLS

Constants grouped with kSynthesizerDLS.

enum {
   kSynthesizerDynamicVoice      = 1 << 0, /* can assign voices on the fly (else,
   polyphony is very important */
   kSynthesizerUsesMIDIPort      = 1 << 1, /* must be patched through MIDI Manager */
   kSynthesizerMicrotone         = 1 << 2, /* can play microtonal scales */
   kSynthesizerHasSamples        = 1 << 3, /* synthesizer has some use for sampled data */
   kSynthesizerMixedDrums        = 1 << 4, /* any part can play drum parts,
   total = instrument parts */
   kSynthesizerSoftware          = 1 << 5, /* implemented in main CPU software == uses cpu cycles */
   kSynthesizerHardware          = 1 << 6, /* is a hardware device (such as nubus,
   or maybe DSP?) */
   kSynthesizerDynamicChannel    = 1 << 7, /* can move any part to any channel or disable each part. (else we assume it lives on all channels in masks) */
   kSynthesizerHogsSystemChannel = 1 << 8, /* can be channelwise dynamic,
   but always responds on its system channel */
   kSynthesizerHasSystemChannel  = 1 << 9, /* has some "system channel" notion to distinguish it from multiple instances of the same device (GM devices dont) */
   kSynthesizerSlowSetPart       = 1 << 10, /* SetPart() and SetPartInstrumentNumber() calls do not have rapid response,
   may glitch notes */
   kSynthesizerOffline           = 1 << 12, /* can enter an offline synthesis mode */
   kSynthesizerGM                = 1 << 14, /* synth is a GM device */
   kSynthesizerDLS               = 1 << 15, /* synth supports DLS level 1 */
   kSynthesizerSoundLocalization = 1 << 16 /* synth supports extremely baroque,
   nonstandard,
   and proprietary "apple game sprockets" localization parameter set */
};

Constants
kSynthesizerDynamicVoice

Voices can be assigned to parts on the fly with this synthesizer (otherwise, polyphony is very important).

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerUsesMIDIPort

This synthesizer must be patched through a MIDI system, such as the MIDI Manager or OMS.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerMicrotone

This synthesizer can play microtonal scales.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerHasSamples

This synthesizer has some use for sampled audio data.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerMixedDrums

Any part of this synthesizer can play drum parts.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerSoftware

This synthesizer is implemented in main CPU software and uses CPU cycles.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerHardware

This synthesizer is a hardware device, not a software synthesizer or MIDI device.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerDynamicChannel

This synthesizer can move any part to any channel or disable each part. For devices only.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerHogsSystemChannel

Even if the kSynthesizerDynamicChannel bit is set, this synthesizer always responds on its system channel. For MIDI devices only.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerSlowSetPart

This synthesizer does not respond rapidly to the various set part and set part instrument calls.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerOffline

This synthesizer can enter an offline synthesis mode.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

kSynthesizerGM

This synthesizer is a General MIDI device.

Available in Mac OS X v10.0 and later.

Declared in QuickTimeMusic.h.

Declared In
QuickTimeMusic.h

TuneSetPartMix Values

Constants passed to TuneSetPartMix.

enum {
   kTuneMixMute                  = 1,    /* disable a part */
   kTuneMixSolo                  = 2     /* if any parts soloed,
   play only soloed parts */
};

Declared In
QuickTimeMusic.h

kTuneDontClipNotes

Constants grouped with kTuneDontClipNotes.

enum {
   kTuneStartNow                 = 1,    /* start after buffer is implied */
   kTuneDontClipNotes            = 2,    /* allow notes to finish their durations outside sample */
   kTuneExcludeEdgeNotes         = 4,    /* dont play notes that start at end of tune */
   kTuneQuickStart               = 8,    /* Leave all the controllers where they are,
   ignore start time */
   kTuneLoopUntil                = 16,   /* loop a queued tune if there's nothing else in the queue*/
   kTunePlayDifference           = 32,   /* by default,
   the tune difference is skipped*/
   kTunePlayConcurrent           = 64,   /* dont block the next tune sequence with this one*/
   kTuneStartNewMaster           = 16384
};

Declared In
QuickTimeMusic.h

Next Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.