QuickTimeMusic.pas 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303
  1. {
  2. File: QuickTimeMusic.p
  3. Contains: QuickTime Interfaces.
  4. Version: Technology: QuickTime 6.0
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit QuickTimeMusic;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,Dialogs,Files,Components,Quickdraw,Video,MacMemory,Sound,Endian,ImageCompression,Movies;
  92. {$ALIGN MAC68K}
  93. const
  94. kaiToneDescType = $746F6E65 (* 'tone' *);
  95. kaiNoteRequestInfoType = $6E747271 (* 'ntrq' *);
  96. kaiKnobListType = $6B6E626C (* 'knbl' *);
  97. kaiKeyRangeInfoType = $73696E66 (* 'sinf' *);
  98. kaiSampleDescType = $73647363 (* 'sdsc' *);
  99. kaiSampleInfoType = $736D696E (* 'smin' *);
  100. kaiSampleDataType = $73646174 (* 'sdat' *);
  101. kaiSampleDataQUIDType = $71756964 (* 'quid' *);
  102. kaiInstInfoType = $69696E66 (* 'iinf' *);
  103. kaiPictType = $70696374 (* 'pict' *);
  104. kaiWriterType = $C2A97772 (* '©wrt' *);
  105. kaiCopyrightType = $C2A96370 (* '©cpy' *);
  106. kaiOtherStrType = $73747220 (* 'str ' *);
  107. kaiInstrumentRefType = $69726566 (* 'iref' *);
  108. kaiInstGMQualityType = $7175616C (* 'qual' *);
  109. kaiLibraryInfoType = $6C696E66 (* 'linf' *);
  110. kaiLibraryDescType = $6C647363 (* 'ldsc' *);
  111. type
  112. InstLibDescRecPtr = ^InstLibDescRec;
  113. InstLibDescRec = record
  114. libIDName: Str31;
  115. end;
  116. InstKnobRecPtr = ^InstKnobRec;
  117. InstKnobRec = record
  118. number: BigEndianLong;
  119. value: BigEndianLong;
  120. end;
  121. const
  122. kInstKnobMissingUnknown = 0;
  123. kInstKnobMissingDefault = $01;
  124. type
  125. InstKnobListPtr = ^InstKnobList;
  126. InstKnobList = record
  127. knobCount: BigEndianLong;
  128. knobFlags: BigEndianLong;
  129. knob: array [0..0] of InstKnobRec;
  130. end;
  131. const
  132. kMusicLoopTypeNormal = 0;
  133. kMusicLoopTypePalindrome = 1; { back & forth }
  134. instSamplePreProcessFlag = $01;
  135. type
  136. InstSampleDescRecPtr = ^InstSampleDescRec;
  137. InstSampleDescRec = record
  138. dataFormat: BigEndianOSType;
  139. numChannels: BigEndianShort;
  140. sampleSize: BigEndianShort;
  141. sampleRate: BigEndianUnsignedFixed;
  142. sampleDataID: BigEndianShort;
  143. offset: BigEndianLong; { offset within SampleData - this could be just for internal use }
  144. numSamples: BigEndianLong; { this could also just be for internal use, we'll see }
  145. loopType: BigEndianLong;
  146. loopStart: BigEndianLong;
  147. loopEnd: BigEndianLong;
  148. pitchNormal: BigEndianLong;
  149. pitchLow: BigEndianLong;
  150. pitchHigh: BigEndianLong;
  151. end;
  152. AtomicInstrument = Handle;
  153. AtomicInstrumentPtr = Ptr;
  154. const
  155. kQTMIDIComponentType = $6D696469 (* 'midi' *);
  156. kOMSComponentSubType = $4F4D5320 (* 'OMS ' *);
  157. kFMSComponentSubType = $464D5320 (* 'FMS ' *);
  158. kMIDIManagerComponentSubType = $6D6D6772 (* 'mmgr' *);
  159. kOSXMIDIComponentSubType = $6F73786D (* 'osxm' *);
  160. type
  161. QTMIDIComponent = ComponentInstance;
  162. const
  163. kMusicPacketPortLost = 1; { received when application loses the default input port }
  164. kMusicPacketPortFound = 2; { received when application gets it back out from under someone else's claim }
  165. kMusicPacketTimeGap = 3; { data[0] = number of milliseconds to keep the MIDI line silent }
  166. kAppleSysexID = $11; { apple sysex is followed by 2-byte command. 0001 is the command for samplesize }
  167. kAppleSysexCmdSampleSize = $0001; { 21 bit number in 3 midi bytes follows sysex ID and 2 cmd bytes }
  168. kAppleSysexCmdSampleBreak = $0002; { specifies that the sample should break right here }
  169. kAppleSysexCmdAtomicInstrument = $0010; { contents of atomic instrument handle }
  170. kAppleSysexCmdDeveloper = $7F00; { F0 11 7F 00 ww xx yy zz ... F7 is available for non-Apple developers, where wxyz is unique app signature with 8th bit cleared, unique to developer, and 00 and 7f are reserved }
  171. type
  172. MusicMIDIPacketPtr = ^MusicMIDIPacket;
  173. MusicMIDIPacket = record
  174. length: UInt16;
  175. reserved: UInt32; { if length zero, then reserved = above enum }
  176. data: packed array [0..248] of UInt8;
  177. end;
  178. {$ifc TYPED_FUNCTION_POINTERS}
  179. MusicMIDISendProcPtr = function(self: ComponentInstance; refCon: SInt32; var mmp: MusicMIDIPacket): ComponentResult;
  180. {$elsec}
  181. MusicMIDISendProcPtr = ProcPtr;
  182. {$endc}
  183. {$ifc OPAQUE_UPP_TYPES}
  184. MusicMIDISendUPP = ^SInt32; { an opaque UPP }
  185. {$elsec}
  186. MusicMIDISendUPP = UniversalProcPtr;
  187. {$endc}
  188. const
  189. kSynthesizerConnectionFMS = 1; { this connection imported from FMS }
  190. kSynthesizerConnectionMMgr = 2; { this connection imported from the MIDI Mgr }
  191. kSynthesizerConnectionOMS = 4; { this connection imported from OMS }
  192. kSynthesizerConnectionQT = 8; { this connection is a QuickTime-only port }
  193. kSynthesizerConnectionOSXMIDI = 16; { this connection is an OS X CoreMIDI port }
  194. { lowest five bits are mutually exclusive; combinations reserved for future use. }
  195. kSynthesizerConnectionUnavailable = 256; { port exists, but cannot be used just now }
  196. {
  197. The sampleBankFile field of this structure can be used to pass in a pointer to an FSSpec
  198. that represents a SoundFont 2 or DLS file (otherwise set it to NULL ).
  199. You then pass in a structure with this field set (all other fields should be zero) to
  200. NARegisterMusicDevice:
  201. - with synthType as kSoftSynthComponentSubType
  202. - with name being used to return to the application the "name" of the synth
  203. that should be used in the synthesiserName field of the ToneDescription structure
  204. and is also used to retrieve a particular MusicComponent with the
  205. NAGetRegisteredMusicDevice call
  206. This call will create a MusicComponent of kSoftSynthComponentSubType, with the specified
  207. sound bank as the sample data source.
  208. This field requires QuickTime 5.0 or later and should be set to NULL for prior versions.
  209. }
  210. type
  211. SynthesizerConnectionsPtr = ^SynthesizerConnections;
  212. SynthesizerConnections = record
  213. clientID: OSType;
  214. inputPortID: OSType; { terminology death: this port is used to SEND to the midi synth }
  215. outputPortID: OSType; { terminology death: this port receives from a keyboard or other control device }
  216. midiChannel: SInt32; { The system channel; others are configurable (or the nubus slot number) }
  217. flags: SInt32;
  218. unique: SInt32; { unique id may be used instead of index, to getinfo and unregister calls }
  219. sampleBankFile: FSSpecPtr; { see notes above }
  220. reserved2: SInt32; { should be zero }
  221. end;
  222. QTMIDIPortPtr = ^QTMIDIPort;
  223. QTMIDIPort = record
  224. portConnections: SynthesizerConnections;
  225. portName: Str63;
  226. end;
  227. QTMIDIPortListPtr = ^QTMIDIPortList;
  228. QTMIDIPortList = record
  229. portCount: SInt16;
  230. port: array [0..0] of QTMIDIPort;
  231. end;
  232. QTMIDIPortListHandle = ^QTMIDIPortListPtr;
  233. {
  234. * QTMIDIGetMIDIPorts()
  235. *
  236. * Availability:
  237. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  238. * CarbonLib: in CarbonLib 1.0 and later
  239. * Mac OS X: in version 10.0 and later
  240. * Windows: in qtmlClient.lib 3.0 and later
  241. }
  242. function QTMIDIGetMIDIPorts(ci: QTMIDIComponent; var inputPorts: QTMIDIPortListHandle; var outputPorts: QTMIDIPortListHandle): ComponentResult; external name '_QTMIDIGetMIDIPorts';
  243. {
  244. * QTMIDIUseSendPort()
  245. *
  246. * Availability:
  247. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  248. * CarbonLib: in CarbonLib 1.0 and later
  249. * Mac OS X: in version 10.0 and later
  250. * Windows: in qtmlClient.lib 3.0 and later
  251. }
  252. function QTMIDIUseSendPort(ci: QTMIDIComponent; portIndex: SInt32; inUse: SInt32): ComponentResult; external name '_QTMIDIUseSendPort';
  253. {
  254. * QTMIDISendMIDI()
  255. *
  256. * Availability:
  257. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  258. * CarbonLib: in CarbonLib 1.0 and later
  259. * Mac OS X: in version 10.0 and later
  260. * Windows: in qtmlClient.lib 3.0 and later
  261. }
  262. function QTMIDISendMIDI(ci: QTMIDIComponent; portIndex: SInt32; var mp: MusicMIDIPacket): ComponentResult; external name '_QTMIDISendMIDI';
  263. const
  264. kMusicComponentType = $6D757369 (* 'musi' *);
  265. kInstrumentComponentType = $696E7374 (* 'inst' *);
  266. kSoftSynthComponentSubType = $73732020 (* 'ss ' *);
  267. kGMSynthComponentSubType = $676D2020 (* 'gm ' *);
  268. type
  269. MusicComponent = ComponentInstance;
  270. { MusicSynthesizerFlags }
  271. const
  272. kSynthesizerDynamicVoice = $01; { can assign voices on the fly (else, polyphony is very important }
  273. kSynthesizerUsesMIDIPort = $02; { must be patched through MIDI Manager }
  274. kSynthesizerMicrotone = $04; { can play microtonal scales }
  275. kSynthesizerHasSamples = $08; { synthesizer has some use for sampled data }
  276. kSynthesizerMixedDrums = $10; { any part can play drum parts, total = instrument parts }
  277. kSynthesizerSoftware = $20; { implemented in main CPU software == uses cpu cycles }
  278. kSynthesizerHardware = $40; { is a hardware device (such as nubus, or maybe DSP?) }
  279. kSynthesizerDynamicChannel = $80; { can move any part to any channel or disable each part. (else we assume it lives on all channels in masks) }
  280. kSynthesizerHogsSystemChannel = $0100; { can be channelwise dynamic, but always responds on its system channel }
  281. kSynthesizerHasSystemChannel = $0200; { has some "system channel" notion to distinguish it from multiple instances of the same device (GM devices dont) }
  282. kSynthesizerSlowSetPart = $0400; { SetPart() and SetPartInstrumentNumber() calls do not have rapid response, may glitch notes }
  283. kSynthesizerOffline = $1000; { can enter an offline synthesis mode }
  284. kSynthesizerGM = $4000; { synth is a GM device }
  285. kSynthesizerDLS = $8000; { synth supports DLS level 1 }
  286. kSynthesizerSoundLocalization = $00010000; { synth supports extremely baroque, nonstandard, and proprietary "apple game sprockets" localization parameter set }
  287. {
  288. * Note that these controller numbers
  289. * are _not_ identical to the MIDI controller numbers.
  290. * These are _signed_ 8.8 values, and the LSB's are
  291. * always sent to a MIDI device. Controllers 32-63 are
  292. * reserved (for MIDI, they are LSB's for 0-31, but we
  293. * always send both).
  294. *
  295. * The full range, therefore, is -128.00 to 127.7f.
  296. *
  297. * _Excepting_ _volume_, all controls default to zero.
  298. *
  299. * Pitch bend is specified in fractional semitones! No
  300. * more "pitch bend range" nonsense. You can bend as far
  301. * as you want, any time you want.
  302. }
  303. type
  304. MusicController = SInt32;
  305. const
  306. kControllerModulationWheel = 1;
  307. kControllerBreath = 2;
  308. kControllerFoot = 4;
  309. kControllerPortamentoTime = 5; { time in 8.8 seconds, portamento on/off is omitted, 0 time = 'off' }
  310. kControllerVolume = 7; { main volume control }
  311. kControllerBalance = 8;
  312. kControllerPan = 10; { 0 - "default", 1 - n: positioned in output 1-n (incl fractions) }
  313. kControllerExpression = 11; { secondary volume control }
  314. kControllerLever1 = 16; { general purpose controllers }
  315. kControllerLever2 = 17; { general purpose controllers }
  316. kControllerLever3 = 18; { general purpose controllers }
  317. kControllerLever4 = 19; { general purpose controllers }
  318. kControllerLever5 = 80; { general purpose controllers }
  319. kControllerLever6 = 81; { general purpose controllers }
  320. kControllerLever7 = 82; { general purpose controllers }
  321. kControllerLever8 = 83; { general purpose controllers }
  322. kControllerPitchBend = 32; { positive & negative semitones, with 8 bits fraction, same units as transpose controllers }
  323. kControllerAfterTouch = 33; { aka channel pressure }
  324. kControllerPartTranspose = 40; { identical to pitchbend, for overall part xpose }
  325. kControllerTuneTranspose = 41; { another pitchbend, for "song global" pitch offset }
  326. kControllerPartVolume = 42; { another volume control, passed right down from note allocator part volume }
  327. kControllerTuneVolume = 43; { another volume control, used for "song global" volume - since we share one synthesizer across multiple tuneplayers }
  328. kControllerSustain = 64; { boolean - positive for on, 0 or negative off }
  329. kControllerPortamento = 65; { boolean }
  330. kControllerSostenuto = 66; { boolean }
  331. kControllerSoftPedal = 67; { boolean }
  332. kControllerReverb = 91;
  333. kControllerTremolo = 92;
  334. kControllerChorus = 93;
  335. kControllerCeleste = 94;
  336. kControllerPhaser = 95;
  337. kControllerEditPart = 113; { last 16 controllers 113-128 and above are global controllers which respond on part zero }
  338. kControllerMasterTune = 114;
  339. kControllerMasterTranspose = 114; { preferred }
  340. kControllerMasterVolume = 115;
  341. kControllerMasterCPULoad = 116;
  342. kControllerMasterPolyphony = 117;
  343. kControllerMasterFeatures = 118;
  344. { ID's of knobs supported by the QuickTime Music Synthesizer built into QuickTime }
  345. kQTMSKnobStartID = $02000000;
  346. kQTMSKnobVolumeAttackTimeID = $02000001;
  347. kQTMSKnobVolumeDecayTimeID = $02000002;
  348. kQTMSKnobVolumeSustainLevelID = $02000003;
  349. kQTMSKnobVolumeRelease1RateID = $02000004;
  350. kQTMSKnobVolumeDecayKeyScalingID = $02000005;
  351. kQTMSKnobVolumeReleaseTimeID = $02000006;
  352. kQTMSKnobVolumeLFODelayID = $02000007;
  353. kQTMSKnobVolumeLFORampTimeID = $02000008;
  354. kQTMSKnobVolumeLFOPeriodID = $02000009;
  355. kQTMSKnobVolumeLFOShapeID = $0200000A;
  356. kQTMSKnobVolumeLFODepthID = $0200000B;
  357. kQTMSKnobVolumeOverallID = $0200000C;
  358. kQTMSKnobVolumeVelocity127ID = $0200000D;
  359. kQTMSKnobVolumeVelocity96ID = $0200000E;
  360. kQTMSKnobVolumeVelocity64ID = $0200000F;
  361. kQTMSKnobVolumeVelocity32ID = $02000010;
  362. kQTMSKnobVolumeVelocity16ID = $02000011; { Pitch related knobs }
  363. kQTMSKnobPitchTransposeID = $02000012;
  364. kQTMSKnobPitchLFODelayID = $02000013;
  365. kQTMSKnobPitchLFORampTimeID = $02000014;
  366. kQTMSKnobPitchLFOPeriodID = $02000015;
  367. kQTMSKnobPitchLFOShapeID = $02000016;
  368. kQTMSKnobPitchLFODepthID = $02000017;
  369. kQTMSKnobPitchLFOQuantizeID = $02000018; { Stereo related knobs }
  370. kQTMSKnobStereoDefaultPanID = $02000019;
  371. kQTMSKnobStereoPositionKeyScalingID = $0200001A;
  372. kQTMSKnobPitchLFOOffsetID = $0200001B;
  373. kQTMSKnobExclusionGroupID = $0200001C; { Misc knobs, late additions }
  374. kQTMSKnobSustainTimeID = $0200001D;
  375. kQTMSKnobSustainInfiniteID = $0200001E;
  376. kQTMSKnobVolumeLFOStereoID = $0200001F;
  377. kQTMSKnobVelocityLowID = $02000020;
  378. kQTMSKnobVelocityHighID = $02000021;
  379. kQTMSKnobVelocitySensitivityID = $02000022;
  380. kQTMSKnobPitchSensitivityID = $02000023;
  381. kQTMSKnobVolumeLFODepthFromWheelID = $02000024;
  382. kQTMSKnobPitchLFODepthFromWheelID = $02000025; { Volume Env again }
  383. kQTMSKnobVolumeExpOptionsID = $02000026; { Env1 }
  384. kQTMSKnobEnv1AttackTimeID = $02000027;
  385. kQTMSKnobEnv1DecayTimeID = $02000028;
  386. kQTMSKnobEnv1SustainLevelID = $02000029;
  387. kQTMSKnobEnv1SustainTimeID = $0200002A;
  388. kQTMSKnobEnv1SustainInfiniteID = $0200002B;
  389. kQTMSKnobEnv1ReleaseTimeID = $0200002C;
  390. kQTMSKnobEnv1ExpOptionsID = $0200002D; { Env2 }
  391. kQTMSKnobEnv2AttackTimeID = $0200002E;
  392. kQTMSKnobEnv2DecayTimeID = $0200002F;
  393. kQTMSKnobEnv2SustainLevelID = $02000030;
  394. kQTMSKnobEnv2SustainTimeID = $02000031;
  395. kQTMSKnobEnv2SustainInfiniteID = $02000032;
  396. kQTMSKnobEnv2ReleaseTimeID = $02000033;
  397. kQTMSKnobEnv2ExpOptionsID = $02000034; { Pitch Env }
  398. kQTMSKnobPitchEnvelopeID = $02000035;
  399. kQTMSKnobPitchEnvelopeDepthID = $02000036; { Filter }
  400. kQTMSKnobFilterKeyFollowID = $02000037;
  401. kQTMSKnobFilterTransposeID = $02000038;
  402. kQTMSKnobFilterQID = $02000039;
  403. kQTMSKnobFilterFrequencyEnvelopeID = $0200003A;
  404. kQTMSKnobFilterFrequencyEnvelopeDepthID = $0200003B;
  405. kQTMSKnobFilterQEnvelopeID = $0200003C;
  406. kQTMSKnobFilterQEnvelopeDepthID = $0200003D; { Reverb Threshhold }
  407. kQTMSKnobReverbThresholdID = $0200003E;
  408. kQTMSKnobVolumeAttackVelScalingID = $0200003F;
  409. kQTMSKnobLastIDPlus1 = $02000040;
  410. kControllerMaximum = $00007FFF; { +01111111.11111111 }
  411. kControllerMinimum = $FFFF8000; { -10000000.00000000 }
  412. type
  413. SynthesizerDescriptionPtr = ^SynthesizerDescription;
  414. SynthesizerDescription = record
  415. synthesizerType: OSType; { synthesizer type (must be same as component subtype) }
  416. name: Str31; { text name of synthesizer type }
  417. flags: UInt32; { from the above enum }
  418. voiceCount: UInt32; { maximum polyphony }
  419. partCount: UInt32; { maximum multi-timbrality (and midi channels) }
  420. instrumentCount: UInt32; { non gm, built in (rom) instruments only }
  421. modifiableInstrumentCount: UInt32; { plus n-more are user modifiable }
  422. channelMask: UInt32; { (midi device only) which channels device always uses }
  423. drumPartCount: UInt32; { maximum multi-timbrality of drum parts }
  424. drumCount: UInt32; { non gm, built in (rom) drumkits only }
  425. modifiableDrumCount: UInt32; { plus n-more are user modifiable }
  426. drumChannelMask: UInt32; { (midi device only) which channels device always uses }
  427. outputCount: UInt32; { number of audio outputs (usually two) }
  428. latency: UInt32; { response time in µSec }
  429. controllers: array [0..3] of UInt32; { array of 128 bits }
  430. gmInstruments: array [0..3] of UInt32; { array of 128 bits }
  431. gmDrums: array [0..3] of UInt32; { array of 128 bits }
  432. end;
  433. const
  434. kVoiceCountDynamic = -1; { constant to use to specify dynamic voicing }
  435. type
  436. ToneDescriptionPtr = ^ToneDescription;
  437. ToneDescription = record
  438. synthesizerType: BigEndianOSType; { synthesizer type }
  439. synthesizerName: Str31; { name of instantiation of synth }
  440. instrumentName: Str31; { preferred name for human use }
  441. instrumentNumber: BigEndianLong; { inst-number used if synth-name matches }
  442. gmNumber: BigEndianLong; { Best matching general MIDI number }
  443. end;
  444. const
  445. kFirstGMInstrument = $00000001;
  446. kLastGMInstrument = $00000080;
  447. kFirstGSInstrument = $00000081;
  448. kLastGSInstrument = $00003FFF;
  449. kFirstDrumkit = $00004000; { (first value is "no drum". instrument numbers from 16384->16384+128 are drumkits, and for GM they are _defined_ drumkits! }
  450. kLastDrumkit = $00004080;
  451. kFirstROMInstrument = $00008000;
  452. kLastROMInstrument = $0000FFFF;
  453. kFirstUserInstrument = $00010000;
  454. kLastUserInstrument = $0001FFFF;
  455. { InstrumentMatch }
  456. kInstrumentMatchSynthesizerType = 1;
  457. kInstrumentMatchSynthesizerName = 2;
  458. kInstrumentMatchName = 4;
  459. kInstrumentMatchNumber = 8;
  460. kInstrumentMatchGMNumber = 16;
  461. kInstrumentMatchGSNumber = 32;
  462. { KnobFlags }
  463. kKnobBasic = 8; { knob shows up in certain simplified lists of knobs }
  464. kKnobReadOnly = 16; { knob value cannot be changed by user or with a SetKnob call }
  465. kKnobInterruptUnsafe = 32; { only alter this knob from foreground task time (may access toolbox) }
  466. kKnobKeyrangeOverride = 64; { knob can be overridden within a single keyrange (software synth only) }
  467. kKnobGroupStart = 128; { knob is first in some logical group of knobs }
  468. kKnobFixedPoint8 = 1024;
  469. kKnobFixedPoint16 = 2048; { One of these may be used at a time. }
  470. kKnobTypeNumber = $00;
  471. kKnobTypeGroupName = $1000; { "knob" is really a group name for display purposes }
  472. kKnobTypeBoolean = $2000; { if range is greater than 1, its a multi-checkbox field }
  473. kKnobTypeNote = $3000; { knob range is equivalent to MIDI keys }
  474. kKnobTypePan = $4000; { range goes left/right (lose this? ) }
  475. kKnobTypeInstrument = $5000; { knob value = reference to another instrument number }
  476. kKnobTypeSetting = $6000; { knob value is 1 of n different things (eg, fm algorithms) popup menu }
  477. kKnobTypeMilliseconds = $7000; { knob is a millisecond time range }
  478. kKnobTypePercentage = $8000; { knob range is displayed as a Percentage }
  479. kKnobTypeHertz = $9000; { knob represents frequency }
  480. kKnobTypeButton = $A000; { momentary trigger push button }
  481. kUnknownKnobValue = $7FFFFFFF; { a knob with this value means, we don't know it. }
  482. kDefaultKnobValue = $7FFFFFFE; { used to set a knob to its default value. }
  483. type
  484. KnobDescriptionPtr = ^KnobDescription;
  485. KnobDescription = record
  486. name: Str63;
  487. lowValue: SInt32;
  488. highValue: SInt32;
  489. defaultValue: SInt32; { a default instrument is made of all default values }
  490. flags: SInt32;
  491. knobID: SInt32;
  492. end;
  493. GCInstrumentDataPtr = ^GCInstrumentData;
  494. GCInstrumentData = record
  495. tone: ToneDescription;
  496. knobCount: SInt32;
  497. knob: array [0..0] of SInt32;
  498. end;
  499. GCInstrumentDataHandle = ^GCInstrumentDataPtr;
  500. InstrumentAboutInfoPtr = ^InstrumentAboutInfo;
  501. InstrumentAboutInfo = record
  502. p: PicHandle;
  503. author: Str255;
  504. copyright: Str255;
  505. other: Str255;
  506. end;
  507. const
  508. notImplementedMusicErr = $8000F7E9;
  509. cantSendToSynthesizerErr = $8000F7E8;
  510. cantReceiveFromSynthesizerErr = $8000F7E7;
  511. illegalVoiceAllocationErr = $8000F7E6;
  512. illegalPartErr = $8000F7E5;
  513. illegalChannelErr = $8000F7E4;
  514. illegalKnobErr = $8000F7E3;
  515. illegalKnobValueErr = $8000F7E2;
  516. illegalInstrumentErr = $8000F7E1;
  517. illegalControllerErr = $8000F7E0;
  518. midiManagerAbsentErr = $8000F7DF;
  519. synthesizerNotRespondingErr = $8000F7DE;
  520. synthesizerErr = $8000F7DD;
  521. illegalNoteChannelErr = $8000F7DC;
  522. noteChannelNotAllocatedErr = $8000F7DB;
  523. tunePlayerFullErr = $8000F7DA;
  524. tuneParseErr = $8000F7D9;
  525. kGetAtomicInstNoExpandedSamples = $01;
  526. kGetAtomicInstNoOriginalSamples = $02;
  527. kGetAtomicInstNoSamples = $03;
  528. kGetAtomicInstNoKnobList = $04;
  529. kGetAtomicInstNoInstrumentInfo = $08;
  530. kGetAtomicInstOriginalKnobList = $10;
  531. kGetAtomicInstAllKnobs = $20; { return even those that are set to default }
  532. {
  533. For non-gm instruments, instrument number of tone description == 0
  534. If you want to speed up while running, slam the inst num with what Get instrument number returns
  535. All missing knobs are slammed to the default value
  536. }
  537. kSetAtomicInstKeepOriginalInstrument = $01;
  538. kSetAtomicInstShareAcrossParts = $02; { inst disappears when app goes away }
  539. kSetAtomicInstCallerTosses = $04; { the caller isn't keeping a copy around (for NASetAtomicInstrument) }
  540. kSetAtomicInstCallerGuarantees = $08; { the caller guarantees a copy is around }
  541. kSetAtomicInstInterruptSafe = $10; { dont move memory at this time (but process at next task time) }
  542. kSetAtomicInstDontPreprocess = $80; { perform no further preprocessing because either 1)you know the instrument is digitally clean, or 2) you got it from a GetPartAtomic }
  543. kInstrumentNamesModifiable = 1;
  544. kInstrumentNamesBoth = 2;
  545. {
  546. * Structures specific to the GenericMusicComponent
  547. }
  548. kGenericMusicComponentSubtype = $67656E65 (* 'gene' *);
  549. type
  550. GenericKnobDescriptionPtr = ^GenericKnobDescription;
  551. GenericKnobDescription = record
  552. kd: KnobDescription;
  553. hw1: SInt32; { driver defined }
  554. hw2: SInt32; { driver defined }
  555. hw3: SInt32; { driver defined }
  556. settingsID: SInt32; { resource ID list for boolean and popup names }
  557. end;
  558. GenericKnobDescriptionListPtr = ^GenericKnobDescriptionList;
  559. GenericKnobDescriptionList = record
  560. knobCount: SInt32;
  561. knob: array [0..0] of GenericKnobDescription;
  562. end;
  563. GenericKnobDescriptionListHandle = ^GenericKnobDescriptionListPtr;
  564. { knobTypes for MusicDerivedSetKnob }
  565. const
  566. kGenericMusicKnob = 1;
  567. kGenericMusicInstrumentKnob = 2;
  568. kGenericMusicDrumKnob = 3;
  569. kGenericMusicGlobalController = 4;
  570. kGenericMusicResFirst = 0;
  571. kGenericMusicResMiscStringList = 1; { STR# 1: synth name, 2:about author,3:aboutcopyright,4:aboutother }
  572. kGenericMusicResMiscLongList = 2; { Long various params, see list below }
  573. kGenericMusicResInstrumentList = 3; { NmLs of names and shorts, categories prefixed by '¥¥' }
  574. kGenericMusicResDrumList = 4; { NmLs of names and shorts }
  575. kGenericMusicResInstrumentKnobDescriptionList = 5; { Knob }
  576. kGenericMusicResDrumKnobDescriptionList = 6; { Knob }
  577. kGenericMusicResKnobDescriptionList = 7; { Knob }
  578. kGenericMusicResBitsLongList = 8; { Long back to back bitmaps of controllers, gminstruments, and drums }
  579. kGenericMusicResModifiableInstrumentHW = 9; { Shrt same as the hw shorts trailing the instrument names, a shortlist }
  580. kGenericMusicResGMTranslation = 10; { Long 128 long entries, 1 for each gm inst, of local instrument numbers 1-n (not hw numbers) }
  581. kGenericMusicResROMInstrumentData = 11; { knob lists for ROM instruments, so the knob values may be known }
  582. kGenericMusicResAboutPICT = 12; { picture for aboutlist. must be present for GetAbout call to work }
  583. kGenericMusicResLast = 13;
  584. { elements of the misc long list }
  585. kGenericMusicMiscLongFirst = 0;
  586. kGenericMusicMiscLongVoiceCount = 1;
  587. kGenericMusicMiscLongPartCount = 2;
  588. kGenericMusicMiscLongModifiableInstrumentCount = 3;
  589. kGenericMusicMiscLongChannelMask = 4;
  590. kGenericMusicMiscLongDrumPartCount = 5;
  591. kGenericMusicMiscLongModifiableDrumCount = 6;
  592. kGenericMusicMiscLongDrumChannelMask = 7;
  593. kGenericMusicMiscLongOutputCount = 8;
  594. kGenericMusicMiscLongLatency = 9;
  595. kGenericMusicMiscLongFlags = 10;
  596. kGenericMusicMiscLongFirstGMHW = 11; { number to add to locate GM main instruments }
  597. kGenericMusicMiscLongFirstGMDrumHW = 12; { number to add to locate GM drumkits }
  598. kGenericMusicMiscLongFirstUserHW = 13; { First hw number of user instruments (presumed sequential) }
  599. kGenericMusicMiscLongLast = 14;
  600. type
  601. GCPartPtr = ^GCPart;
  602. GCPart = record
  603. hwInstrumentNumber: SInt32; { internal number of recalled instrument }
  604. controller: array [0..127] of SInt16; { current values for all controllers }
  605. volume: SInt32; { ctrl 7 is special case }
  606. polyphony: SInt32;
  607. midiChannel: SInt32; { 1-16 if in use }
  608. id: GCInstrumentData; { ToneDescription & knoblist, uncertain length }
  609. end;
  610. {
  611. * Calls specific to the GenericMusicComponent
  612. }
  613. const
  614. kMusicGenericRange = $0100;
  615. kMusicDerivedRange = $0200;
  616. {
  617. * Flags in GenericMusicConfigure call
  618. }
  619. kGenericMusicDoMIDI = $01; { implement normal MIDI messages for note, controllers, and program changes 0-127 }
  620. kGenericMusicBank0 = $02; { implement instrument bank changes on controller 0 }
  621. kGenericMusicBank32 = $04; { implement instrument bank changes on controller 32 }
  622. kGenericMusicErsatzMIDI = $08; { construct MIDI packets, but send them to the derived component }
  623. kGenericMusicCallKnobs = $10; { call the derived component with special knob format call }
  624. kGenericMusicCallParts = $20; { call the derived component with special part format call }
  625. kGenericMusicCallInstrument = $40; { call MusicDerivedSetInstrument for MusicSetInstrument calls }
  626. kGenericMusicCallNumber = $80; { call MusicDerivedSetPartInstrumentNumber for MusicSetPartInstrumentNumber calls, & don't send any C0 or bank stuff }
  627. kGenericMusicCallROMInstrument = $0100; { call MusicSetInstrument for MusicSetPartInstrumentNumber for "ROM" instruments, passing params from the ROMi resource }
  628. kGenericMusicAllDefaults = $0200; { indicates that when a new instrument is recalled, all knobs are reset to DEFAULT settings. True for GS modules }
  629. type
  630. {$ifc TYPED_FUNCTION_POINTERS}
  631. MusicOfflineDataProcPtr = function(SoundData: Ptr; numBytes: SInt32; myRefCon: SInt32): ComponentResult;
  632. {$elsec}
  633. MusicOfflineDataProcPtr = ProcPtr;
  634. {$endc}
  635. {$ifc OPAQUE_UPP_TYPES}
  636. MusicOfflineDataUPP = ^SInt32; { an opaque UPP }
  637. {$elsec}
  638. MusicOfflineDataUPP = UniversalProcPtr;
  639. {$endc}
  640. OfflineSampleTypePtr = ^OfflineSampleType;
  641. OfflineSampleType = record
  642. numChannels: UInt32; { number of channels, ie mono = 1 }
  643. sampleRate: UnsignedFixed; { sample rate in Apples Fixed point representation }
  644. sampleSize: UInt16; { number of bits in sample }
  645. end;
  646. InstrumentInfoRecordPtr = ^InstrumentInfoRecord;
  647. InstrumentInfoRecord = record
  648. instrumentNumber: SInt32; { instrument number (if 0, name is a catagory) }
  649. flags: SInt32; { show in picker, etc. }
  650. toneNameIndex: SInt32; { index in toneNames (1 based) }
  651. itxtNameAtomID: SInt32; { index in itxtNames (itxt/name by index) }
  652. end;
  653. InstrumentInfoListPtr = ^InstrumentInfoList;
  654. InstrumentInfoList = record
  655. recordCount: SInt32;
  656. toneNames: Handle; { name from tone description }
  657. itxtNames: QTAtomContainer; { itxt/name atoms for instruments }
  658. info: array [0..0] of InstrumentInfoRecord;
  659. end;
  660. InstrumentInfoListHandle = ^InstrumentInfoListPtr;
  661. {
  662. * MusicGetDescription()
  663. *
  664. * Availability:
  665. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  666. * CarbonLib: in CarbonLib 1.0 and later
  667. * Mac OS X: in version 10.0 and later
  668. * Windows: in qtmlClient.lib 3.0 and later
  669. }
  670. function MusicGetDescription(mc: MusicComponent; var sd: SynthesizerDescription): ComponentResult; external name '_MusicGetDescription';
  671. {
  672. * MusicGetPart()
  673. *
  674. * Availability:
  675. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  676. * CarbonLib: in CarbonLib 1.0 and later
  677. * Mac OS X: in version 10.0 and later
  678. * Windows: in qtmlClient.lib 3.0 and later
  679. }
  680. function MusicGetPart(mc: MusicComponent; part: SInt32; var midiChannel: SInt32; var polyphony: SInt32): ComponentResult; external name '_MusicGetPart';
  681. {
  682. * MusicSetPart()
  683. *
  684. * Availability:
  685. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  686. * CarbonLib: in CarbonLib 1.0 and later
  687. * Mac OS X: in version 10.0 and later
  688. * Windows: in qtmlClient.lib 3.0 and later
  689. }
  690. function MusicSetPart(mc: MusicComponent; part: SInt32; midiChannel: SInt32; polyphony: SInt32): ComponentResult; external name '_MusicSetPart';
  691. {
  692. * MusicSetPartInstrumentNumber()
  693. *
  694. * Availability:
  695. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  696. * CarbonLib: in CarbonLib 1.0 and later
  697. * Mac OS X: in version 10.0 and later
  698. * Windows: in qtmlClient.lib 3.0 and later
  699. }
  700. function MusicSetPartInstrumentNumber(mc: MusicComponent; part: SInt32; instrumentNumber: SInt32): ComponentResult; external name '_MusicSetPartInstrumentNumber';
  701. {
  702. * MusicGetPartInstrumentNumber()
  703. *
  704. * Availability:
  705. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  706. * CarbonLib: in CarbonLib 1.0 and later
  707. * Mac OS X: in version 10.0 and later
  708. * Windows: in qtmlClient.lib 3.0 and later
  709. }
  710. function MusicGetPartInstrumentNumber(mc: MusicComponent; part: SInt32): ComponentResult; external name '_MusicGetPartInstrumentNumber';
  711. {
  712. * MusicStorePartInstrument()
  713. *
  714. * Availability:
  715. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  716. * CarbonLib: in CarbonLib 1.0 and later
  717. * Mac OS X: in version 10.0 and later
  718. * Windows: in qtmlClient.lib 3.0 and later
  719. }
  720. function MusicStorePartInstrument(mc: MusicComponent; part: SInt32; instrumentNumber: SInt32): ComponentResult; external name '_MusicStorePartInstrument';
  721. {
  722. * MusicGetPartAtomicInstrument()
  723. *
  724. * Availability:
  725. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  726. * CarbonLib: in CarbonLib 1.0 and later
  727. * Mac OS X: in version 10.0 and later
  728. * Windows: in qtmlClient.lib 3.0 and later
  729. }
  730. function MusicGetPartAtomicInstrument(mc: MusicComponent; part: SInt32; var ai: AtomicInstrument; flags: SInt32): ComponentResult; external name '_MusicGetPartAtomicInstrument';
  731. {
  732. * MusicSetPartAtomicInstrument()
  733. *
  734. * Availability:
  735. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  736. * CarbonLib: in CarbonLib 1.0 and later
  737. * Mac OS X: in version 10.0 and later
  738. * Windows: in qtmlClient.lib 3.0 and later
  739. }
  740. function MusicSetPartAtomicInstrument(mc: MusicComponent; part: SInt32; aiP: AtomicInstrumentPtr; flags: SInt32): ComponentResult; external name '_MusicSetPartAtomicInstrument';
  741. {
  742. * MusicGetPartKnob()
  743. *
  744. * Availability:
  745. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  746. * CarbonLib: in CarbonLib 1.0 and later
  747. * Mac OS X: in version 10.0 and later
  748. * Windows: in qtmlClient.lib 3.0 and later
  749. }
  750. function MusicGetPartKnob(mc: MusicComponent; part: SInt32; knobID: SInt32): ComponentResult; external name '_MusicGetPartKnob';
  751. {
  752. * MusicSetPartKnob()
  753. *
  754. * Availability:
  755. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  756. * CarbonLib: in CarbonLib 1.0 and later
  757. * Mac OS X: in version 10.0 and later
  758. * Windows: in qtmlClient.lib 3.0 and later
  759. }
  760. function MusicSetPartKnob(mc: MusicComponent; part: SInt32; knobID: SInt32; knobValue: SInt32): ComponentResult; external name '_MusicSetPartKnob';
  761. {
  762. * MusicGetKnob()
  763. *
  764. * Availability:
  765. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  766. * CarbonLib: in CarbonLib 1.0 and later
  767. * Mac OS X: in version 10.0 and later
  768. * Windows: in qtmlClient.lib 3.0 and later
  769. }
  770. function MusicGetKnob(mc: MusicComponent; knobID: SInt32): ComponentResult; external name '_MusicGetKnob';
  771. {
  772. * MusicSetKnob()
  773. *
  774. * Availability:
  775. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  776. * CarbonLib: in CarbonLib 1.0 and later
  777. * Mac OS X: in version 10.0 and later
  778. * Windows: in qtmlClient.lib 3.0 and later
  779. }
  780. function MusicSetKnob(mc: MusicComponent; knobID: SInt32; knobValue: SInt32): ComponentResult; external name '_MusicSetKnob';
  781. {
  782. * MusicGetPartName()
  783. *
  784. * Availability:
  785. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  786. * CarbonLib: in CarbonLib 1.0 and later
  787. * Mac OS X: in version 10.0 and later
  788. * Windows: in qtmlClient.lib 3.0 and later
  789. }
  790. function MusicGetPartName(mc: MusicComponent; part: SInt32; name: StringPtr): ComponentResult; external name '_MusicGetPartName';
  791. {
  792. * MusicSetPartName()
  793. *
  794. * Availability:
  795. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  796. * CarbonLib: in CarbonLib 1.0 and later
  797. * Mac OS X: in version 10.0 and later
  798. * Windows: in qtmlClient.lib 3.0 and later
  799. }
  800. function MusicSetPartName(mc: MusicComponent; part: SInt32; name: StringPtr): ComponentResult; external name '_MusicSetPartName';
  801. {
  802. * MusicFindTone()
  803. *
  804. * Availability:
  805. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  806. * CarbonLib: in CarbonLib 1.0 and later
  807. * Mac OS X: in version 10.0 and later
  808. * Windows: in qtmlClient.lib 3.0 and later
  809. }
  810. function MusicFindTone(mc: MusicComponent; var td: ToneDescription; var libraryIndexOut: SInt32; var fit: UInt32): ComponentResult; external name '_MusicFindTone';
  811. {
  812. * MusicPlayNote()
  813. *
  814. * Availability:
  815. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  816. * CarbonLib: in CarbonLib 1.0 and later
  817. * Mac OS X: in version 10.0 and later
  818. * Windows: in qtmlClient.lib 3.0 and later
  819. }
  820. function MusicPlayNote(mc: MusicComponent; part: SInt32; pitch: SInt32; velocity: SInt32): ComponentResult; external name '_MusicPlayNote';
  821. {
  822. * MusicResetPart()
  823. *
  824. * Availability:
  825. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  826. * CarbonLib: in CarbonLib 1.0 and later
  827. * Mac OS X: in version 10.0 and later
  828. * Windows: in qtmlClient.lib 3.0 and later
  829. }
  830. function MusicResetPart(mc: MusicComponent; part: SInt32): ComponentResult; external name '_MusicResetPart';
  831. {
  832. * MusicSetPartController()
  833. *
  834. * Availability:
  835. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  836. * CarbonLib: in CarbonLib 1.0 and later
  837. * Mac OS X: in version 10.0 and later
  838. * Windows: in qtmlClient.lib 3.0 and later
  839. }
  840. function MusicSetPartController(mc: MusicComponent; part: SInt32; controllerNumber: MusicController; controllerValue: SInt32): ComponentResult; external name '_MusicSetPartController';
  841. {
  842. * MusicGetPartController()
  843. *
  844. * Availability:
  845. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  846. * CarbonLib: in CarbonLib 1.0 and later
  847. * Mac OS X: in version 10.0 and later
  848. * Windows: in qtmlClient.lib 3.0 and later
  849. }
  850. function MusicGetPartController(mc: MusicComponent; part: SInt32; controllerNumber: MusicController): ComponentResult; external name '_MusicGetPartController';
  851. {
  852. * MusicGetMIDIProc()
  853. *
  854. * Availability:
  855. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  856. * CarbonLib: in CarbonLib 1.0 and later
  857. * Mac OS X: in version 10.0 and later
  858. * Windows: in qtmlClient.lib 3.0 and later
  859. }
  860. function MusicGetMIDIProc(mc: MusicComponent; var midiSendProc: MusicMIDISendUPP; var refCon: SInt32): ComponentResult; external name '_MusicGetMIDIProc';
  861. {
  862. * MusicSetMIDIProc()
  863. *
  864. * Availability:
  865. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  866. * CarbonLib: in CarbonLib 1.0 and later
  867. * Mac OS X: in version 10.0 and later
  868. * Windows: in qtmlClient.lib 3.0 and later
  869. }
  870. function MusicSetMIDIProc(mc: MusicComponent; midiSendProc: MusicMIDISendUPP; refCon: SInt32): ComponentResult; external name '_MusicSetMIDIProc';
  871. {
  872. * MusicGetInstrumentNames()
  873. *
  874. * Availability:
  875. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  876. * CarbonLib: in CarbonLib 1.0 and later
  877. * Mac OS X: in version 10.0 and later
  878. * Windows: in qtmlClient.lib 3.0 and later
  879. }
  880. function MusicGetInstrumentNames(mc: MusicComponent; modifiableInstruments: SInt32; var instrumentNames: Handle; var instrumentCategoryLasts: Handle; var instrumentCategoryNames: Handle): ComponentResult; external name '_MusicGetInstrumentNames';
  881. {
  882. * MusicGetDrumNames()
  883. *
  884. * Availability:
  885. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  886. * CarbonLib: in CarbonLib 1.0 and later
  887. * Mac OS X: in version 10.0 and later
  888. * Windows: in qtmlClient.lib 3.0 and later
  889. }
  890. function MusicGetDrumNames(mc: MusicComponent; modifiableInstruments: SInt32; var instrumentNumbers: Handle; var instrumentNames: Handle): ComponentResult; external name '_MusicGetDrumNames';
  891. {
  892. * MusicGetMasterTune()
  893. *
  894. * Availability:
  895. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  896. * CarbonLib: in CarbonLib 1.0 and later
  897. * Mac OS X: in version 10.0 and later
  898. * Windows: in qtmlClient.lib 3.0 and later
  899. }
  900. function MusicGetMasterTune(mc: MusicComponent): ComponentResult; external name '_MusicGetMasterTune';
  901. {
  902. * MusicSetMasterTune()
  903. *
  904. * Availability:
  905. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  906. * CarbonLib: in CarbonLib 1.0 and later
  907. * Mac OS X: in version 10.0 and later
  908. * Windows: in qtmlClient.lib 3.0 and later
  909. }
  910. function MusicSetMasterTune(mc: MusicComponent; masterTune: SInt32): ComponentResult; external name '_MusicSetMasterTune';
  911. {
  912. * MusicGetInstrumentAboutInfo()
  913. *
  914. * Availability:
  915. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  916. * CarbonLib: in CarbonLib 1.0 and later
  917. * Mac OS X: in version 10.0 and later
  918. * Windows: in qtmlClient.lib 3.0 and later
  919. }
  920. function MusicGetInstrumentAboutInfo(mc: MusicComponent; part: SInt32; var iai: InstrumentAboutInfo): ComponentResult; external name '_MusicGetInstrumentAboutInfo';
  921. {
  922. * MusicGetDeviceConnection()
  923. *
  924. * Availability:
  925. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  926. * CarbonLib: in CarbonLib 1.0 and later
  927. * Mac OS X: in version 10.0 and later
  928. * Windows: in qtmlClient.lib 3.0 and later
  929. }
  930. function MusicGetDeviceConnection(mc: MusicComponent; index: SInt32; var id1: SInt32; var id2: SInt32): ComponentResult; external name '_MusicGetDeviceConnection';
  931. {
  932. * MusicUseDeviceConnection()
  933. *
  934. * Availability:
  935. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  936. * CarbonLib: in CarbonLib 1.0 and later
  937. * Mac OS X: in version 10.0 and later
  938. * Windows: in qtmlClient.lib 3.0 and later
  939. }
  940. function MusicUseDeviceConnection(mc: MusicComponent; id1: SInt32; id2: SInt32): ComponentResult; external name '_MusicUseDeviceConnection';
  941. {
  942. * MusicGetKnobSettingStrings()
  943. *
  944. * Availability:
  945. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  946. * CarbonLib: in CarbonLib 1.0 and later
  947. * Mac OS X: in version 10.0 and later
  948. * Windows: in qtmlClient.lib 3.0 and later
  949. }
  950. function MusicGetKnobSettingStrings(mc: MusicComponent; knobIndex: SInt32; isGlobal: SInt32; var settingsNames: Handle; var settingsCategoryLasts: Handle; var settingsCategoryNames: Handle): ComponentResult; external name '_MusicGetKnobSettingStrings';
  951. {
  952. * MusicGetMIDIPorts()
  953. *
  954. * Availability:
  955. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  956. * CarbonLib: in CarbonLib 1.0 and later
  957. * Mac OS X: in version 10.0 and later
  958. * Windows: in qtmlClient.lib 3.0 and later
  959. }
  960. function MusicGetMIDIPorts(mc: MusicComponent; var inputPortCount: SInt32; var outputPortCount: SInt32): ComponentResult; external name '_MusicGetMIDIPorts';
  961. {
  962. * MusicSendMIDI()
  963. *
  964. * Availability:
  965. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  966. * CarbonLib: in CarbonLib 1.0 and later
  967. * Mac OS X: in version 10.0 and later
  968. * Windows: in qtmlClient.lib 3.0 and later
  969. }
  970. function MusicSendMIDI(mc: MusicComponent; portIndex: SInt32; var mp: MusicMIDIPacket): ComponentResult; external name '_MusicSendMIDI';
  971. {
  972. * MusicStartOffline()
  973. *
  974. * Availability:
  975. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  976. * CarbonLib: in CarbonLib 1.0 and later
  977. * Mac OS X: in version 10.0 and later
  978. * Windows: in qtmlClient.lib 3.0 and later
  979. }
  980. function MusicStartOffline(mc: MusicComponent; var numChannels: UInt32; var sampleRate: UnsignedFixed; var sampleSize: UInt16; dataProc: MusicOfflineDataUPP; dataProcRefCon: SInt32): ComponentResult; external name '_MusicStartOffline';
  981. {
  982. * MusicSetOfflineTimeTo()
  983. *
  984. * Availability:
  985. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  986. * CarbonLib: in CarbonLib 1.0 and later
  987. * Mac OS X: in version 10.0 and later
  988. * Windows: in qtmlClient.lib 3.0 and later
  989. }
  990. function MusicSetOfflineTimeTo(mc: MusicComponent; newTimeStamp: SInt32): ComponentResult; external name '_MusicSetOfflineTimeTo';
  991. {
  992. * MusicGetInstrumentKnobDescription()
  993. *
  994. * Availability:
  995. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  996. * CarbonLib: in CarbonLib 1.0 and later
  997. * Mac OS X: in version 10.0 and later
  998. * Windows: in qtmlClient.lib 3.0 and later
  999. }
  1000. function MusicGetInstrumentKnobDescription(mc: MusicComponent; knobIndex: SInt32; var mkd: KnobDescription): ComponentResult; external name '_MusicGetInstrumentKnobDescription';
  1001. {
  1002. * MusicGetDrumKnobDescription()
  1003. *
  1004. * Availability:
  1005. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1006. * CarbonLib: in CarbonLib 1.0 and later
  1007. * Mac OS X: in version 10.0 and later
  1008. * Windows: in qtmlClient.lib 3.0 and later
  1009. }
  1010. function MusicGetDrumKnobDescription(mc: MusicComponent; knobIndex: SInt32; var mkd: KnobDescription): ComponentResult; external name '_MusicGetDrumKnobDescription';
  1011. {
  1012. * MusicGetKnobDescription()
  1013. *
  1014. * Availability:
  1015. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1016. * CarbonLib: in CarbonLib 1.0 and later
  1017. * Mac OS X: in version 10.0 and later
  1018. * Windows: in qtmlClient.lib 3.0 and later
  1019. }
  1020. function MusicGetKnobDescription(mc: MusicComponent; knobIndex: SInt32; var mkd: KnobDescription): ComponentResult; external name '_MusicGetKnobDescription';
  1021. {
  1022. * MusicGetInfoText()
  1023. *
  1024. * Availability:
  1025. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1026. * CarbonLib: in CarbonLib 1.0 and later
  1027. * Mac OS X: in version 10.0 and later
  1028. * Windows: in qtmlClient.lib 3.0 and later
  1029. }
  1030. function MusicGetInfoText(mc: MusicComponent; selector: SInt32; var textH: Handle; var styleH: Handle): ComponentResult; external name '_MusicGetInfoText';
  1031. const
  1032. kGetInstrumentInfoNoBuiltIn = $01;
  1033. kGetInstrumentInfoMidiUserInst = $02;
  1034. kGetInstrumentInfoNoIText = $04;
  1035. {
  1036. * MusicGetInstrumentInfo()
  1037. *
  1038. * Availability:
  1039. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1040. * CarbonLib: in CarbonLib 1.0 and later
  1041. * Mac OS X: in version 10.0 and later
  1042. * Windows: in qtmlClient.lib 3.0 and later
  1043. }
  1044. function MusicGetInstrumentInfo(mc: MusicComponent; getInstrumentInfoFlags: SInt32; var infoListH: InstrumentInfoListHandle): ComponentResult; external name '_MusicGetInstrumentInfo';
  1045. {
  1046. * MusicTask()
  1047. *
  1048. * Availability:
  1049. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1050. * CarbonLib: in CarbonLib 1.0 and later
  1051. * Mac OS X: in version 10.0 and later
  1052. * Windows: in qtmlClient.lib 3.0 and later
  1053. }
  1054. function MusicTask(mc: MusicComponent): ComponentResult; external name '_MusicTask';
  1055. {
  1056. * MusicSetPartInstrumentNumberInterruptSafe()
  1057. *
  1058. * Availability:
  1059. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1060. * CarbonLib: in CarbonLib 1.0 and later
  1061. * Mac OS X: in version 10.0 and later
  1062. * Windows: in qtmlClient.lib 3.0 and later
  1063. }
  1064. function MusicSetPartInstrumentNumberInterruptSafe(mc: MusicComponent; part: SInt32; instrumentNumber: SInt32): ComponentResult; external name '_MusicSetPartInstrumentNumberInterruptSafe';
  1065. {
  1066. * MusicSetPartSoundLocalization()
  1067. *
  1068. * Availability:
  1069. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1070. * CarbonLib: in CarbonLib 1.0 and later
  1071. * Mac OS X: in version 10.0 and later
  1072. * Windows: in qtmlClient.lib 3.0 and later
  1073. }
  1074. function MusicSetPartSoundLocalization(mc: MusicComponent; part: SInt32; data: Handle): ComponentResult; external name '_MusicSetPartSoundLocalization';
  1075. {
  1076. * MusicGenericConfigure()
  1077. *
  1078. * Availability:
  1079. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1080. * CarbonLib: in CarbonLib 1.0 and later
  1081. * Mac OS X: in version 10.0 and later
  1082. * Windows: in qtmlClient.lib 3.0 and later
  1083. }
  1084. function MusicGenericConfigure(mc: MusicComponent; mode: SInt32; flags: SInt32; baseResID: SInt32): ComponentResult; external name '_MusicGenericConfigure';
  1085. {
  1086. * MusicGenericGetPart()
  1087. *
  1088. * Availability:
  1089. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1090. * CarbonLib: in CarbonLib 1.0 and later
  1091. * Mac OS X: in version 10.0 and later
  1092. * Windows: in qtmlClient.lib 3.0 and later
  1093. }
  1094. function MusicGenericGetPart(mc: MusicComponent; partNumber: SInt32; var part: UnivPtr): ComponentResult; external name '_MusicGenericGetPart';
  1095. {
  1096. * MusicGenericGetKnobList()
  1097. *
  1098. * Availability:
  1099. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1100. * CarbonLib: in CarbonLib 1.0 and later
  1101. * Mac OS X: in version 10.0 and later
  1102. * Windows: in qtmlClient.lib 3.0 and later
  1103. }
  1104. function MusicGenericGetKnobList(mc: MusicComponent; knobType: SInt32; var gkdlH: GenericKnobDescriptionListHandle): ComponentResult; external name '_MusicGenericGetKnobList';
  1105. {
  1106. * MusicGenericSetResourceNumbers()
  1107. *
  1108. * Availability:
  1109. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  1110. * CarbonLib: in CarbonLib 1.0 and later
  1111. * Mac OS X: in version 10.0 and later
  1112. * Windows: in qtmlClient.lib 3.0 and later
  1113. }
  1114. function MusicGenericSetResourceNumbers(mc: MusicComponent; resourceIDH: Handle): ComponentResult; external name '_MusicGenericSetResourceNumbers';
  1115. {
  1116. * MusicDerivedMIDISend()
  1117. *
  1118. * Availability:
  1119. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1120. * CarbonLib: in CarbonLib 1.0 and later
  1121. * Mac OS X: in version 10.0 and later
  1122. * Windows: in qtmlClient.lib 3.0 and later
  1123. }
  1124. function MusicDerivedMIDISend(mc: MusicComponent; var packet: MusicMIDIPacket): ComponentResult; external name '_MusicDerivedMIDISend';
  1125. {
  1126. * MusicDerivedSetKnob()
  1127. *
  1128. * Availability:
  1129. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1130. * CarbonLib: in CarbonLib 1.0 and later
  1131. * Mac OS X: in version 10.0 and later
  1132. * Windows: in qtmlClient.lib 3.0 and later
  1133. }
  1134. function MusicDerivedSetKnob(mc: MusicComponent; knobType: SInt32; knobNumber: SInt32; knobValue: SInt32; partNumber: SInt32; var p: GCPart; var gkd: GenericKnobDescription): ComponentResult; external name '_MusicDerivedSetKnob';
  1135. {
  1136. * MusicDerivedSetPart()
  1137. *
  1138. * Availability:
  1139. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1140. * CarbonLib: in CarbonLib 1.0 and later
  1141. * Mac OS X: in version 10.0 and later
  1142. * Windows: in qtmlClient.lib 3.0 and later
  1143. }
  1144. function MusicDerivedSetPart(mc: MusicComponent; partNumber: SInt32; var p: GCPart): ComponentResult; external name '_MusicDerivedSetPart';
  1145. {
  1146. * MusicDerivedSetInstrument()
  1147. *
  1148. * Availability:
  1149. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1150. * CarbonLib: in CarbonLib 1.0 and later
  1151. * Mac OS X: in version 10.0 and later
  1152. * Windows: in qtmlClient.lib 3.0 and later
  1153. }
  1154. function MusicDerivedSetInstrument(mc: MusicComponent; partNumber: SInt32; var p: GCPart): ComponentResult; external name '_MusicDerivedSetInstrument';
  1155. {
  1156. * MusicDerivedSetPartInstrumentNumber()
  1157. *
  1158. * Availability:
  1159. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1160. * CarbonLib: in CarbonLib 1.0 and later
  1161. * Mac OS X: in version 10.0 and later
  1162. * Windows: in qtmlClient.lib 3.0 and later
  1163. }
  1164. function MusicDerivedSetPartInstrumentNumber(mc: MusicComponent; partNumber: SInt32; var p: GCPart): ComponentResult; external name '_MusicDerivedSetPartInstrumentNumber';
  1165. {
  1166. * MusicDerivedSetMIDI()
  1167. *
  1168. * Availability:
  1169. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1170. * CarbonLib: in CarbonLib 1.0 and later
  1171. * Mac OS X: in version 10.0 and later
  1172. * Windows: in qtmlClient.lib 3.0 and later
  1173. }
  1174. function MusicDerivedSetMIDI(mc: MusicComponent; midiProc: MusicMIDISendUPP; refcon: SInt32; midiChannel: SInt32): ComponentResult; external name '_MusicDerivedSetMIDI';
  1175. {
  1176. * MusicDerivedStorePartInstrument()
  1177. *
  1178. * Availability:
  1179. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1180. * CarbonLib: in CarbonLib 1.0 and later
  1181. * Mac OS X: in version 10.0 and later
  1182. * Windows: in qtmlClient.lib 3.0 and later
  1183. }
  1184. function MusicDerivedStorePartInstrument(mc: MusicComponent; partNumber: SInt32; var p: GCPart; instrumentNumber: SInt32): ComponentResult; external name '_MusicDerivedStorePartInstrument';
  1185. {
  1186. * MusicDerivedOpenResFile()
  1187. *
  1188. * Availability:
  1189. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  1190. * CarbonLib: in CarbonLib 1.0 and later
  1191. * Mac OS X: in version 10.0 and later
  1192. * Windows: in qtmlClient.lib 3.0 and later
  1193. }
  1194. function MusicDerivedOpenResFile(mc: MusicComponent): ComponentResult; external name '_MusicDerivedOpenResFile';
  1195. {
  1196. * MusicDerivedCloseResFile()
  1197. *
  1198. * Availability:
  1199. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  1200. * CarbonLib: in CarbonLib 1.0 and later
  1201. * Mac OS X: in version 10.0 and later
  1202. * Windows: in qtmlClient.lib 3.0 and later
  1203. }
  1204. function MusicDerivedCloseResFile(mc: MusicComponent; resRefNum: SInt16): ComponentResult; external name '_MusicDerivedCloseResFile';
  1205. {--------------------------
  1206. Types
  1207. --------------------------}
  1208. const
  1209. kNoteRequestNoGM = 1; { don't degrade to a GM synth }
  1210. kNoteRequestNoSynthType = 2; { don't degrade to another synth of same type but different name }
  1211. kNoteRequestSynthMustMatch = 4; { synthType must be a match, including kGMSynthComponentSubType }
  1212. kNoteRequestSpecifyMIDIChannel = $80;
  1213. type
  1214. NoteAllocator = ComponentInstance;
  1215. {
  1216. The midiChannelAssignment field of this structure is used to assign a MIDI channel
  1217. when a NoteChannel is created from a NoteRequest.
  1218. A value of 0 indicates a MIDI channel has *not* been assigned
  1219. A value of (kNoteRequestSpecifyMIDIChannel | 1->16) is a MIDI channel assignment
  1220. This field requires QuickTime 5.0 or later and should be set to 0 for prior versions.
  1221. }
  1222. NoteRequestMIDIChannel = UInt8;
  1223. NoteRequestInfoPtr = ^NoteRequestInfo;
  1224. NoteRequestInfo = record
  1225. flags: SInt8; { 1: dont accept GM match, 2: dont accept same-synth-type match }
  1226. midiChannelAssignment: SInt8; { (kNoteRequestSpecifyMIDIChannel | 1->16) as MIDI Channel assignement or zero - see notes above }
  1227. polyphony: BigEndianShort; { Maximum number of voices }
  1228. typicalPolyphony: BigEndianFixed; { Hint for level mixing }
  1229. end;
  1230. NoteRequestPtr = ^NoteRequest;
  1231. NoteRequest = record
  1232. info: NoteRequestInfo;
  1233. tone: ToneDescription;
  1234. end;
  1235. NoteChannel = ^SInt32; { an opaque 32-bit type }
  1236. NoteChannelPtr = ^NoteChannel; { when a var xx:NoteChannel parameter can be nil, it is changed to xx: NoteChannelPtr }
  1237. const
  1238. kPickDontMix = 1; { dont mix instruments with drum sounds }
  1239. kPickSameSynth = 2; { only allow the same device that went in, to come out }
  1240. kPickUserInsts = 4; { show user insts in addition to ROM voices }
  1241. kPickEditAllowEdit = 8; { lets user switch over to edit mode }
  1242. kPickEditAllowPick = 16; { lets the user switch over to pick mode }
  1243. kPickEditSynthGlobal = 32; { edit the global knobs of the synth }
  1244. kPickEditControllers = 64; { edit the controllers of the notechannel }
  1245. kNoteAllocatorComponentType = $6E6F7461 (* 'nota' *);
  1246. { --------------------------------
  1247. Note Allocator Prototypes
  1248. -------------------------------- }
  1249. {
  1250. * NARegisterMusicDevice()
  1251. *
  1252. * Availability:
  1253. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1254. * CarbonLib: in CarbonLib 1.0 and later
  1255. * Mac OS X: in version 10.0 and later
  1256. * Windows: in qtmlClient.lib 3.0 and later
  1257. }
  1258. function NARegisterMusicDevice(na: NoteAllocator; synthType: OSType; var name: Str31; var connections: SynthesizerConnections): ComponentResult; external name '_NARegisterMusicDevice';
  1259. {
  1260. * NAUnregisterMusicDevice()
  1261. *
  1262. * Availability:
  1263. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1264. * CarbonLib: in CarbonLib 1.0 and later
  1265. * Mac OS X: in version 10.0 and later
  1266. * Windows: in qtmlClient.lib 3.0 and later
  1267. }
  1268. function NAUnregisterMusicDevice(na: NoteAllocator; index: SInt32): ComponentResult; external name '_NAUnregisterMusicDevice';
  1269. {
  1270. * NAGetRegisteredMusicDevice()
  1271. *
  1272. * Availability:
  1273. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1274. * CarbonLib: in CarbonLib 1.0 and later
  1275. * Mac OS X: in version 10.0 and later
  1276. * Windows: in qtmlClient.lib 3.0 and later
  1277. }
  1278. function NAGetRegisteredMusicDevice(na: NoteAllocator; index: SInt32; var synthType: OSType; var name: Str31; var connections: SynthesizerConnections; var mc: MusicComponent): ComponentResult; external name '_NAGetRegisteredMusicDevice';
  1279. {
  1280. * NASaveMusicConfiguration()
  1281. *
  1282. * Availability:
  1283. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1284. * CarbonLib: in CarbonLib 1.0 and later
  1285. * Mac OS X: in version 10.0 and later
  1286. * Windows: in qtmlClient.lib 3.0 and later
  1287. }
  1288. function NASaveMusicConfiguration(na: NoteAllocator): ComponentResult; external name '_NASaveMusicConfiguration';
  1289. {
  1290. * NANewNoteChannel()
  1291. *
  1292. * Availability:
  1293. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1294. * CarbonLib: in CarbonLib 1.0 and later
  1295. * Mac OS X: in version 10.0 and later
  1296. * Windows: in qtmlClient.lib 3.0 and later
  1297. }
  1298. function NANewNoteChannel(na: NoteAllocator; var noteRequest_: NoteRequest; var outChannel: NoteChannel): ComponentResult; external name '_NANewNoteChannel';
  1299. {
  1300. * NADisposeNoteChannel()
  1301. *
  1302. * Availability:
  1303. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1304. * CarbonLib: in CarbonLib 1.0 and later
  1305. * Mac OS X: in version 10.0 and later
  1306. * Windows: in qtmlClient.lib 3.0 and later
  1307. }
  1308. function NADisposeNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NADisposeNoteChannel';
  1309. {
  1310. * NAGetNoteChannelInfo()
  1311. *
  1312. * Availability:
  1313. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1314. * CarbonLib: in CarbonLib 1.0 and later
  1315. * Mac OS X: in version 10.0 and later
  1316. * Windows: in qtmlClient.lib 3.0 and later
  1317. }
  1318. function NAGetNoteChannelInfo(na: NoteAllocator; noteChannel_: NoteChannel; var index: SInt32; var part: SInt32): ComponentResult; external name '_NAGetNoteChannelInfo';
  1319. {
  1320. * NAPrerollNoteChannel()
  1321. *
  1322. * Availability:
  1323. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1324. * CarbonLib: in CarbonLib 1.0 and later
  1325. * Mac OS X: in version 10.0 and later
  1326. * Windows: in qtmlClient.lib 3.0 and later
  1327. }
  1328. function NAPrerollNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAPrerollNoteChannel';
  1329. {
  1330. * NAUnrollNoteChannel()
  1331. *
  1332. * Availability:
  1333. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1334. * CarbonLib: in CarbonLib 1.0 and later
  1335. * Mac OS X: in version 10.0 and later
  1336. * Windows: in qtmlClient.lib 3.0 and later
  1337. }
  1338. function NAUnrollNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAUnrollNoteChannel';
  1339. {
  1340. * NASetNoteChannelVolume()
  1341. *
  1342. * Availability:
  1343. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1344. * CarbonLib: in CarbonLib 1.0 and later
  1345. * Mac OS X: in version 10.0 and later
  1346. * Windows: in qtmlClient.lib 3.0 and later
  1347. }
  1348. function NASetNoteChannelVolume(na: NoteAllocator; noteChannel_: NoteChannel; volume: Fixed): ComponentResult; external name '_NASetNoteChannelVolume';
  1349. {
  1350. * NAResetNoteChannel()
  1351. *
  1352. * Availability:
  1353. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1354. * CarbonLib: in CarbonLib 1.0 and later
  1355. * Mac OS X: in version 10.0 and later
  1356. * Windows: in qtmlClient.lib 3.0 and later
  1357. }
  1358. function NAResetNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAResetNoteChannel';
  1359. {
  1360. * NAPlayNote()
  1361. *
  1362. * Availability:
  1363. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1364. * CarbonLib: in CarbonLib 1.0 and later
  1365. * Mac OS X: in version 10.0 and later
  1366. * Windows: in qtmlClient.lib 3.0 and later
  1367. }
  1368. function NAPlayNote(na: NoteAllocator; noteChannel_: NoteChannel; pitch: SInt32; velocity: SInt32): ComponentResult; external name '_NAPlayNote';
  1369. {
  1370. * NASetController()
  1371. *
  1372. * Availability:
  1373. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1374. * CarbonLib: in CarbonLib 1.0 and later
  1375. * Mac OS X: in version 10.0 and later
  1376. * Windows: in qtmlClient.lib 3.0 and later
  1377. }
  1378. function NASetController(na: NoteAllocator; noteChannel_: NoteChannel; controllerNumber: SInt32; controllerValue: SInt32): ComponentResult; external name '_NASetController';
  1379. {
  1380. * NASetKnob()
  1381. *
  1382. * Availability:
  1383. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1384. * CarbonLib: in CarbonLib 1.0 and later
  1385. * Mac OS X: in version 10.0 and later
  1386. * Windows: in qtmlClient.lib 3.0 and later
  1387. }
  1388. function NASetKnob(na: NoteAllocator; noteChannel_: NoteChannel; knobNumber: SInt32; knobValue: SInt32): ComponentResult; external name '_NASetKnob';
  1389. {
  1390. * NAFindNoteChannelTone()
  1391. *
  1392. * Availability:
  1393. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1394. * CarbonLib: in CarbonLib 1.0 and later
  1395. * Mac OS X: in version 10.0 and later
  1396. * Windows: in qtmlClient.lib 3.0 and later
  1397. }
  1398. function NAFindNoteChannelTone(na: NoteAllocator; noteChannel_: NoteChannel; var td: ToneDescription; var instrumentNumber: SInt32): ComponentResult; external name '_NAFindNoteChannelTone';
  1399. {
  1400. * NASetInstrumentNumber()
  1401. *
  1402. * Availability:
  1403. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1404. * CarbonLib: in CarbonLib 1.0 and later
  1405. * Mac OS X: in version 10.0 and later
  1406. * Windows: in qtmlClient.lib 3.0 and later
  1407. }
  1408. function NASetInstrumentNumber(na: NoteAllocator; noteChannel_: NoteChannel; instrumentNumber: SInt32): ComponentResult; external name '_NASetInstrumentNumber';
  1409. {
  1410. * NAPickInstrument()
  1411. *
  1412. * Availability:
  1413. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1414. * CarbonLib: in CarbonLib 1.0 and later
  1415. * Mac OS X: in version 10.0 and later
  1416. * Windows: in qtmlClient.lib 3.0 and later
  1417. }
  1418. function NAPickInstrument(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; var sd: ToneDescription; flags: UInt32; refCon: SInt32; reserved1: SInt32; reserved2: SInt32): ComponentResult; external name '_NAPickInstrument';
  1419. {
  1420. * NAPickArrangement()
  1421. *
  1422. * Availability:
  1423. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1424. * CarbonLib: in CarbonLib 1.0 and later
  1425. * Mac OS X: in version 10.0 and later
  1426. * Windows: in qtmlClient.lib 3.0 and later
  1427. }
  1428. function NAPickArrangement(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; zero1: SInt32; zero2: SInt32; t: Track; songName: StringPtr): ComponentResult; external name '_NAPickArrangement';
  1429. {
  1430. * NAStuffToneDescription()
  1431. *
  1432. * Availability:
  1433. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1434. * CarbonLib: in CarbonLib 1.0 and later
  1435. * Mac OS X: in version 10.0 and later
  1436. * Windows: in qtmlClient.lib 3.0 and later
  1437. }
  1438. function NAStuffToneDescription(na: NoteAllocator; gmNumber: SInt32; var td: ToneDescription): ComponentResult; external name '_NAStuffToneDescription';
  1439. {
  1440. * NACopyrightDialog()
  1441. *
  1442. * Availability:
  1443. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1444. * CarbonLib: in CarbonLib 1.0 and later
  1445. * Mac OS X: in version 10.0 and later
  1446. * Windows: in qtmlClient.lib 3.0 and later
  1447. }
  1448. function NACopyrightDialog(na: NoteAllocator; p: PicHandle; author: StringPtr; copyright: StringPtr; other: StringPtr; title: StringPtr; filterProc: ModalFilterUPP; refCon: SInt32): ComponentResult; external name '_NACopyrightDialog';
  1449. {
  1450. kNADummyOneSelect = 29
  1451. kNADummyTwoSelect = 30
  1452. }
  1453. {
  1454. * NAGetIndNoteChannel()
  1455. *
  1456. * Availability:
  1457. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1458. * CarbonLib: in CarbonLib 1.0 and later
  1459. * Mac OS X: in version 10.0 and later
  1460. * Windows: in qtmlClient.lib 3.0 and later
  1461. }
  1462. function NAGetIndNoteChannel(na: NoteAllocator; index: SInt32; var nc: NoteChannel; var seed: SInt32): ComponentResult; external name '_NAGetIndNoteChannel';
  1463. {
  1464. * NAGetMIDIPorts()
  1465. *
  1466. * Availability:
  1467. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1468. * CarbonLib: in CarbonLib 1.0 and later
  1469. * Mac OS X: in version 10.0 and later
  1470. * Windows: in qtmlClient.lib 3.0 and later
  1471. }
  1472. function NAGetMIDIPorts(na: NoteAllocator; var inputPorts: QTMIDIPortListHandle; var outputPorts: QTMIDIPortListHandle): ComponentResult; external name '_NAGetMIDIPorts';
  1473. {
  1474. * NAGetNoteRequest()
  1475. *
  1476. * Availability:
  1477. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1478. * CarbonLib: in CarbonLib 1.0 and later
  1479. * Mac OS X: in version 10.0 and later
  1480. * Windows: in qtmlClient.lib 3.0 and later
  1481. }
  1482. function NAGetNoteRequest(na: NoteAllocator; noteChannel_: NoteChannel; var nrOut: NoteRequest): ComponentResult; external name '_NAGetNoteRequest';
  1483. {
  1484. * NASendMIDI()
  1485. *
  1486. * Availability:
  1487. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1488. * CarbonLib: in CarbonLib 1.0 and later
  1489. * Mac OS X: in version 10.0 and later
  1490. * Windows: in qtmlClient.lib 3.0 and later
  1491. }
  1492. function NASendMIDI(na: NoteAllocator; noteChannel_: NoteChannel; var mp: MusicMIDIPacket): ComponentResult; external name '_NASendMIDI';
  1493. {
  1494. * NAPickEditInstrument()
  1495. *
  1496. * Availability:
  1497. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1498. * CarbonLib: in CarbonLib 1.0 and later
  1499. * Mac OS X: in version 10.0 and later
  1500. * Windows: in qtmlClient.lib 3.0 and later
  1501. }
  1502. function NAPickEditInstrument(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; refCon: SInt32; nc: NoteChannel; ai: AtomicInstrument; flags: SInt32): ComponentResult; external name '_NAPickEditInstrument';
  1503. {
  1504. * NANewNoteChannelFromAtomicInstrument()
  1505. *
  1506. * Availability:
  1507. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1508. * CarbonLib: in CarbonLib 1.0 and later
  1509. * Mac OS X: in version 10.0 and later
  1510. * Windows: in qtmlClient.lib 3.0 and later
  1511. }
  1512. function NANewNoteChannelFromAtomicInstrument(na: NoteAllocator; instrument: AtomicInstrumentPtr; flags: SInt32; var outChannel: NoteChannel): ComponentResult; external name '_NANewNoteChannelFromAtomicInstrument';
  1513. {
  1514. * NASetAtomicInstrument()
  1515. *
  1516. * Availability:
  1517. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1518. * CarbonLib: in CarbonLib 1.0 and later
  1519. * Mac OS X: in version 10.0 and later
  1520. * Windows: in qtmlClient.lib 3.0 and later
  1521. }
  1522. function NASetAtomicInstrument(na: NoteAllocator; noteChannel_: NoteChannel; instrument: AtomicInstrumentPtr; flags: SInt32): ComponentResult; external name '_NASetAtomicInstrument';
  1523. {
  1524. * NAGetKnob()
  1525. *
  1526. * Availability:
  1527. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1528. * CarbonLib: in CarbonLib 1.0 and later
  1529. * Mac OS X: in version 10.0 and later
  1530. * Windows: in qtmlClient.lib 3.0 and later
  1531. }
  1532. function NAGetKnob(na: NoteAllocator; noteChannel_: NoteChannel; knobNumber: SInt32; var knobValue: SInt32): ComponentResult; external name '_NAGetKnob';
  1533. {
  1534. * NATask()
  1535. *
  1536. * Availability:
  1537. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1538. * CarbonLib: in CarbonLib 1.0 and later
  1539. * Mac OS X: in version 10.0 and later
  1540. * Windows: in qtmlClient.lib 3.0 and later
  1541. }
  1542. function NATask(na: NoteAllocator): ComponentResult; external name '_NATask';
  1543. {
  1544. * NASetNoteChannelBalance()
  1545. *
  1546. * Availability:
  1547. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1548. * CarbonLib: in CarbonLib 1.0 and later
  1549. * Mac OS X: in version 10.0 and later
  1550. * Windows: in qtmlClient.lib 3.0 and later
  1551. }
  1552. function NASetNoteChannelBalance(na: NoteAllocator; noteChannel_: NoteChannel; balance: SInt32): ComponentResult; external name '_NASetNoteChannelBalance';
  1553. {
  1554. * NASetInstrumentNumberInterruptSafe()
  1555. *
  1556. * Availability:
  1557. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1558. * CarbonLib: in CarbonLib 1.0 and later
  1559. * Mac OS X: in version 10.0 and later
  1560. * Windows: in qtmlClient.lib 3.0 and later
  1561. }
  1562. function NASetInstrumentNumberInterruptSafe(na: NoteAllocator; noteChannel_: NoteChannel; instrumentNumber: SInt32): ComponentResult; external name '_NASetInstrumentNumberInterruptSafe';
  1563. {
  1564. * NASetNoteChannelSoundLocalization()
  1565. *
  1566. * Availability:
  1567. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1568. * CarbonLib: in CarbonLib 1.0 and later
  1569. * Mac OS X: in version 10.0 and later
  1570. * Windows: in qtmlClient.lib 3.0 and later
  1571. }
  1572. function NASetNoteChannelSoundLocalization(na: NoteAllocator; noteChannel_: NoteChannel; data: Handle): ComponentResult; external name '_NASetNoteChannelSoundLocalization';
  1573. {
  1574. * NAGetController()
  1575. *
  1576. * Availability:
  1577. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  1578. * CarbonLib: in CarbonLib 1.0 and later
  1579. * Mac OS X: in version 10.0 and later
  1580. * Windows: in qtmlClient.lib 3.0 and later
  1581. }
  1582. function NAGetController(na: NoteAllocator; noteChannel_: NoteChannel; controllerNumber: SInt32; var controllerValue: SInt32): ComponentResult; external name '_NAGetController';
  1583. const
  1584. kTuneQueueDepth = 8; { Deepest you can queue tune segments }
  1585. type
  1586. TuneStatusPtr = ^TuneStatus;
  1587. TuneStatus = record
  1588. tune: SInt32Ptr; { currently playing tune }
  1589. tunePtr: SInt32Ptr; { position within currently playing piece }
  1590. time: TimeValue; { current tune time }
  1591. queueCount: SInt16; { how many pieces queued up? }
  1592. queueSpots: SInt16; { How many more tunepieces can be queued }
  1593. queueTime: TimeValue; { How much time is queued up? (can be very inaccurate) }
  1594. reserved: array [0..2] of SInt32;
  1595. end;
  1596. {$ifc TYPED_FUNCTION_POINTERS}
  1597. TuneCallBackProcPtr = procedure(const (*var*) status: TuneStatus; refCon: SInt32);
  1598. {$elsec}
  1599. TuneCallBackProcPtr = ProcPtr;
  1600. {$endc}
  1601. {$ifc TYPED_FUNCTION_POINTERS}
  1602. TunePlayCallBackProcPtr = procedure(var event: UInt32; seed: SInt32; refCon: SInt32);
  1603. {$elsec}
  1604. TunePlayCallBackProcPtr = ProcPtr;
  1605. {$endc}
  1606. {$ifc OPAQUE_UPP_TYPES}
  1607. TuneCallBackUPP = ^SInt32; { an opaque UPP }
  1608. {$elsec}
  1609. TuneCallBackUPP = UniversalProcPtr;
  1610. {$endc}
  1611. {$ifc OPAQUE_UPP_TYPES}
  1612. TunePlayCallBackUPP = ^SInt32; { an opaque UPP }
  1613. {$elsec}
  1614. TunePlayCallBackUPP = UniversalProcPtr;
  1615. {$endc}
  1616. TunePlayer = ComponentInstance;
  1617. const
  1618. kTunePlayerComponentType = $74756E65 (* 'tune' *);
  1619. {
  1620. * TuneSetHeader()
  1621. *
  1622. * Availability:
  1623. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1624. * CarbonLib: in CarbonLib 1.0 and later
  1625. * Mac OS X: in version 10.0 and later
  1626. * Windows: in qtmlClient.lib 3.0 and later
  1627. }
  1628. function TuneSetHeader(tp: TunePlayer; var header: UInt32): ComponentResult; external name '_TuneSetHeader';
  1629. {
  1630. * TuneGetTimeBase()
  1631. *
  1632. * Availability:
  1633. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1634. * CarbonLib: in CarbonLib 1.0 and later
  1635. * Mac OS X: in version 10.0 and later
  1636. * Windows: in qtmlClient.lib 3.0 and later
  1637. }
  1638. function TuneGetTimeBase(tp: TunePlayer; var tb: TimeBase): ComponentResult; external name '_TuneGetTimeBase';
  1639. {
  1640. * TuneSetTimeScale()
  1641. *
  1642. * Availability:
  1643. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1644. * CarbonLib: in CarbonLib 1.0 and later
  1645. * Mac OS X: in version 10.0 and later
  1646. * Windows: in qtmlClient.lib 3.0 and later
  1647. }
  1648. function TuneSetTimeScale(tp: TunePlayer; scale: TimeScale): ComponentResult; external name '_TuneSetTimeScale';
  1649. {
  1650. * TuneGetTimeScale()
  1651. *
  1652. * Availability:
  1653. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1654. * CarbonLib: in CarbonLib 1.0 and later
  1655. * Mac OS X: in version 10.0 and later
  1656. * Windows: in qtmlClient.lib 3.0 and later
  1657. }
  1658. function TuneGetTimeScale(tp: TunePlayer; var scale: TimeScale): ComponentResult; external name '_TuneGetTimeScale';
  1659. {
  1660. * TuneGetIndexedNoteChannel()
  1661. *
  1662. * Availability:
  1663. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1664. * CarbonLib: in CarbonLib 1.0 and later
  1665. * Mac OS X: in version 10.0 and later
  1666. * Windows: in qtmlClient.lib 3.0 and later
  1667. }
  1668. function TuneGetIndexedNoteChannel(tp: TunePlayer; i: SInt32; var nc: NoteChannel): ComponentResult; external name '_TuneGetIndexedNoteChannel';
  1669. { Values for when to start. }
  1670. const
  1671. kTuneStartNow = 1; { start after buffer is implied }
  1672. kTuneDontClipNotes = 2; { allow notes to finish their durations outside sample }
  1673. kTuneExcludeEdgeNotes = 4; { dont play notes that start at end of tune }
  1674. kTuneQuickStart = 8; { Leave all the controllers where they are, ignore start time }
  1675. kTuneLoopUntil = 16; { loop a queued tune if there's nothing else in the queue }
  1676. kTunePlayDifference = 32; { by default, the tune difference is skipped }
  1677. kTunePlayConcurrent = 64; { dont block the next tune sequence with this one }
  1678. kTuneStartNewMaster = 16384;
  1679. {
  1680. * TuneQueue()
  1681. *
  1682. * Availability:
  1683. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1684. * CarbonLib: in CarbonLib 1.0 and later
  1685. * Mac OS X: in version 10.0 and later
  1686. * Windows: in qtmlClient.lib 3.0 and later
  1687. }
  1688. function TuneQueue(tp: TunePlayer; var tune: UInt32; tuneRate: Fixed; tuneStartPosition: UInt32; tuneStopPosition: UInt32; queueFlags: UInt32; callBackProc: TuneCallBackUPP; refCon: SInt32): ComponentResult; external name '_TuneQueue';
  1689. {
  1690. * TuneInstant()
  1691. *
  1692. * Availability:
  1693. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1694. * CarbonLib: in CarbonLib 1.0 and later
  1695. * Mac OS X: in version 10.0 and later
  1696. * Windows: in qtmlClient.lib 3.0 and later
  1697. }
  1698. function TuneInstant(tp: TunePlayer; var tune: UInt32; tunePosition: UInt32): ComponentResult; external name '_TuneInstant';
  1699. {
  1700. * TuneGetStatus()
  1701. *
  1702. * Availability:
  1703. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1704. * CarbonLib: in CarbonLib 1.0 and later
  1705. * Mac OS X: in version 10.0 and later
  1706. * Windows: in qtmlClient.lib 3.0 and later
  1707. }
  1708. function TuneGetStatus(tp: TunePlayer; var status: TuneStatus): ComponentResult; external name '_TuneGetStatus';
  1709. { Values for stopping. }
  1710. const
  1711. kTuneStopFade = 1; { do a quick, synchronous fadeout }
  1712. kTuneStopSustain = 2; { don't silece notes }
  1713. kTuneStopInstant = 4; { silence notes fast (else, decay them) }
  1714. kTuneStopReleaseChannels = 8; { afterwards, let the channels go }
  1715. {
  1716. * TuneStop()
  1717. *
  1718. * Availability:
  1719. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1720. * CarbonLib: in CarbonLib 1.0 and later
  1721. * Mac OS X: in version 10.0 and later
  1722. * Windows: in qtmlClient.lib 3.0 and later
  1723. }
  1724. function TuneStop(tp: TunePlayer; stopFlags: SInt32): ComponentResult; external name '_TuneStop';
  1725. {
  1726. * TuneSetVolume()
  1727. *
  1728. * Availability:
  1729. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1730. * CarbonLib: in CarbonLib 1.0 and later
  1731. * Mac OS X: in version 10.0 and later
  1732. * Windows: in qtmlClient.lib 3.0 and later
  1733. }
  1734. function TuneSetVolume(tp: TunePlayer; volume: Fixed): ComponentResult; external name '_TuneSetVolume';
  1735. {
  1736. * TuneGetVolume()
  1737. *
  1738. * Availability:
  1739. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1740. * CarbonLib: in CarbonLib 1.0 and later
  1741. * Mac OS X: in version 10.0 and later
  1742. * Windows: in qtmlClient.lib 3.0 and later
  1743. }
  1744. function TuneGetVolume(tp: TunePlayer): ComponentResult; external name '_TuneGetVolume';
  1745. {
  1746. * TunePreroll()
  1747. *
  1748. * Availability:
  1749. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1750. * CarbonLib: in CarbonLib 1.0 and later
  1751. * Mac OS X: in version 10.0 and later
  1752. * Windows: in qtmlClient.lib 3.0 and later
  1753. }
  1754. function TunePreroll(tp: TunePlayer): ComponentResult; external name '_TunePreroll';
  1755. {
  1756. * TuneUnroll()
  1757. *
  1758. * Availability:
  1759. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1760. * CarbonLib: in CarbonLib 1.0 and later
  1761. * Mac OS X: in version 10.0 and later
  1762. * Windows: in qtmlClient.lib 3.0 and later
  1763. }
  1764. function TuneUnroll(tp: TunePlayer): ComponentResult; external name '_TuneUnroll';
  1765. {
  1766. * TuneSetNoteChannels()
  1767. *
  1768. * Availability:
  1769. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1770. * CarbonLib: in CarbonLib 1.0 and later
  1771. * Mac OS X: in version 10.0 and later
  1772. * Windows: in qtmlClient.lib 3.0 and later
  1773. }
  1774. function TuneSetNoteChannels(tp: TunePlayer; count: UInt32; var noteChannelList: NoteChannel; playCallBackProc: TunePlayCallBackUPP; refCon: SInt32): ComponentResult; external name '_TuneSetNoteChannels';
  1775. {
  1776. * TuneSetPartTranspose()
  1777. *
  1778. * Availability:
  1779. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1780. * CarbonLib: in CarbonLib 1.0 and later
  1781. * Mac OS X: in version 10.0 and later
  1782. * Windows: in qtmlClient.lib 3.0 and later
  1783. }
  1784. function TuneSetPartTranspose(tp: TunePlayer; part: UInt32; transpose: SInt32; velocityShift: SInt32): ComponentResult; external name '_TuneSetPartTranspose';
  1785. {
  1786. * TuneGetNoteAllocator()
  1787. *
  1788. * Availability:
  1789. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1790. * CarbonLib: in CarbonLib 1.0 and later
  1791. * Mac OS X: in version 10.0 and later
  1792. * Windows: in qtmlClient.lib 3.0 and later
  1793. }
  1794. function TuneGetNoteAllocator(tp: TunePlayer): NoteAllocator; external name '_TuneGetNoteAllocator';
  1795. {
  1796. * TuneSetSofter()
  1797. *
  1798. * Availability:
  1799. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1800. * CarbonLib: in CarbonLib 1.0 and later
  1801. * Mac OS X: in version 10.0 and later
  1802. * Windows: in qtmlClient.lib 3.0 and later
  1803. }
  1804. function TuneSetSofter(tp: TunePlayer; softer: SInt32): ComponentResult; external name '_TuneSetSofter';
  1805. {
  1806. * TuneTask()
  1807. *
  1808. * Availability:
  1809. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1810. * CarbonLib: in CarbonLib 1.0 and later
  1811. * Mac OS X: in version 10.0 and later
  1812. * Windows: in qtmlClient.lib 3.0 and later
  1813. }
  1814. function TuneTask(tp: TunePlayer): ComponentResult; external name '_TuneTask';
  1815. {
  1816. * TuneSetBalance()
  1817. *
  1818. * Availability:
  1819. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1820. * CarbonLib: in CarbonLib 1.0 and later
  1821. * Mac OS X: in version 10.0 and later
  1822. * Windows: in qtmlClient.lib 3.0 and later
  1823. }
  1824. function TuneSetBalance(tp: TunePlayer; balance: SInt32): ComponentResult; external name '_TuneSetBalance';
  1825. {
  1826. * TuneSetSoundLocalization()
  1827. *
  1828. * Availability:
  1829. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1830. * CarbonLib: in CarbonLib 1.0 and later
  1831. * Mac OS X: in version 10.0 and later
  1832. * Windows: in qtmlClient.lib 3.0 and later
  1833. }
  1834. function TuneSetSoundLocalization(tp: TunePlayer; data: Handle): ComponentResult; external name '_TuneSetSoundLocalization';
  1835. {
  1836. * TuneSetHeaderWithSize()
  1837. *
  1838. * Availability:
  1839. * Non-Carbon CFM: in QuickTimeLib 2.5 and later
  1840. * CarbonLib: in CarbonLib 1.0 and later
  1841. * Mac OS X: in version 10.0 and later
  1842. * Windows: in qtmlClient.lib 3.0 and later
  1843. }
  1844. function TuneSetHeaderWithSize(tp: TunePlayer; var header: UInt32; size: UInt32): ComponentResult; external name '_TuneSetHeaderWithSize';
  1845. { flags for part mix. }
  1846. const
  1847. kTuneMixMute = 1; { disable a part }
  1848. kTuneMixSolo = 2; { if any parts soloed, play only soloed parts }
  1849. {
  1850. * TuneSetPartMix()
  1851. *
  1852. * Availability:
  1853. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  1854. * CarbonLib: in CarbonLib 1.0 and later
  1855. * Mac OS X: in version 10.0 and later
  1856. * Windows: in qtmlClient.lib 3.0 and later
  1857. }
  1858. function TuneSetPartMix(tp: TunePlayer; partNumber: UInt32; volume: SInt32; balance: SInt32; mixFlags: SInt32): ComponentResult; external name '_TuneSetPartMix';
  1859. {
  1860. * TuneGetPartMix()
  1861. *
  1862. * Availability:
  1863. * Non-Carbon CFM: in QuickTimeLib 3.0 and later
  1864. * CarbonLib: in CarbonLib 1.0 and later
  1865. * Mac OS X: in version 10.0 and later
  1866. * Windows: in qtmlClient.lib 3.0 and later
  1867. }
  1868. function TuneGetPartMix(tp: TunePlayer; partNumber: UInt32; var volumeOut: SInt32; var balanceOut: SInt32; var mixFlagsOut: SInt32): ComponentResult; external name '_TuneGetPartMix';
  1869. type
  1870. MusicOpWord = UInt32;
  1871. MusicOpWordPtr = ^MusicOpWord;
  1872. { QuickTime Music Track Event Formats:
  1873. At this time, QuickTime music tracks support 5 different event types -- REST events,
  1874. short NOTE events, short CONTROL events, short GENERAL events, Long NOTE events,
  1875. long CONTROL events, and variable GENERAL events.
  1876. ¥ REST Event (4 bytes/event):
  1877. (0 0 0) (5-bit UNUSED) (24-bit Rest Duration)
  1878. ¥ÊShort NOTE Events (4 bytes/event):
  1879. (0 0 1) (5-bit Part) (6-bit Pitch) (7-bit Volume) (11-bit Duration)
  1880. where: Pitch is offset by 32 (Actual pitch = pitch field + 32)
  1881. ¥ÊShort CONTROL Events (4 bytes/event):
  1882. (0 1 0) (5-bit Part) (8-bit Controller) (1-bit UNUSED) (1-bit Sign) (7-bit MSB) (7-bit LSB)
  1883. ( or 15-bit Signed Value)
  1884. ¥ Short GENERAL Event (4 bytes/event):
  1885. (0 1 1) (1-bit UNUSED) (12-bit Sub-Type) (16-bit Value)
  1886. ¥ Long NOTE Events (8 bytes/event):
  1887. (1 0 0 1) (12-bit Part) (1-bit UNUSED) (7-bit Pitch) (1-bit UNUSED) (7-bit Volume)
  1888. (1 0) (8-bit UNUSED) (22-bit Duration)
  1889. ¥ÊLong CONTROL Event (8 bytes/event):
  1890. (1 0 1 0) (12-bit Part) (16-bit Value MSB)
  1891. (1 0) (14-bit Controller) (16-bit Value LSB)
  1892. ¥ÊLong KNOB Event (8 bytes/event):
  1893. (1 0 1 1) (12-bit Sub-Type) (16-bit Value MSB)
  1894. (1 0) (14-bit KNOB) (16-bit Value LSB)
  1895. ¥ÊVariable GENERAL Length Events (N bytes/event):
  1896. (1 1 1 1) (12-bit Sub-Type) (16-bit Length)
  1897. :
  1898. (32-bit Data values)
  1899. :
  1900. (1 1) (14-bit UNUSED) (16-bit Length)
  1901. where: Length field is the number of LONG words in the record.
  1902. Lengths include the first and last long words (Minimum length = 2)
  1903. The following event type values have not been used yet and are reserved for
  1904. future expansion:
  1905. ¥ (1 0 0 0) (8 bytes/event)
  1906. ¥ (1 1 0 0) (N bytes/event)
  1907. ¥ (1 1 0 1) (N bytes/event)
  1908. ¥ (1 1 1 0) (N bytes/event)
  1909. For all events, the following generalizations apply:
  1910. - All duration values are specified in Millisecond units.
  1911. - Pitch values are intended to map directly to the MIDI key numbers.
  1912. - Controllers from 0 to 127 correspond to the standard MIDI controllers.
  1913. Controllers greater than 127 correspond to other controls (i.e., Pitch Bend,
  1914. Key Pressure, and Channel Pressure).
  1915. }
  1916. { Defines for the implemented music event data fields }
  1917. const
  1918. kRestEventType = $00000000; { lower 3-bits }
  1919. kNoteEventType = $00000001; { lower 3-bits }
  1920. kControlEventType = $00000002; { lower 3-bits }
  1921. kMarkerEventType = $00000003; { lower 3-bits }
  1922. kUndefined1EventType = $00000008; { 4-bits }
  1923. kXNoteEventType = $00000009; { 4-bits }
  1924. kXControlEventType = $0000000A; { 4-bits }
  1925. kKnobEventType = $0000000B; { 4-bits }
  1926. kUndefined2EventType = $0000000C; { 4-bits }
  1927. kUndefined3EventType = $0000000D; { 4-bits }
  1928. kUndefined4EventType = $0000000E; { 4-bits }
  1929. kGeneralEventType = $0000000F; { 4-bits }
  1930. kXEventLengthBits = $00000002; { 2 bits: indicates 8-byte event record }
  1931. kGeneralEventLengthBits = $00000003; { 2 bits: indicates variable length event record }
  1932. kEventLen = 1; { length of events in long words }
  1933. kXEventLen = 2;
  1934. kRestEventLen = 1; { length of events in long words }
  1935. kNoteEventLen = 1;
  1936. kControlEventLen = 1;
  1937. kMarkerEventLen = 1;
  1938. kXNoteEventLen = 2;
  1939. kXControlEventLen = 2;
  1940. kGeneralEventLen = 2; { 2 or more, however }
  1941. { Universal Event Defines }
  1942. kEventLengthFieldPos = 30; { by looking at these two bits of the 1st or last word }
  1943. kEventLengthFieldWidth = 2; { of an event you can determine the event length }
  1944. { length field: 0 & 1 => 1 long; 2 => 2 longs; 3 => variable length }
  1945. kEventTypeFieldPos = 29; { event type field for short events }
  1946. kEventTypeFieldWidth = 3; { short type is 3 bits }
  1947. kXEventTypeFieldPos = 28; { event type field for extended events }
  1948. kXEventTypeFieldWidth = 4; { extended type is 4 bits }
  1949. kEventPartFieldPos = 24;
  1950. kEventPartFieldWidth = 5;
  1951. kXEventPartFieldPos = 16; { in the 1st long word }
  1952. kXEventPartFieldWidth = 12; { Rest Events }
  1953. kRestEventDurationFieldPos = 0;
  1954. kRestEventDurationFieldWidth = 24;
  1955. kRestEventDurationMax = $00FFFFFF; { Note Events }
  1956. kNoteEventPitchFieldPos = 18;
  1957. kNoteEventPitchFieldWidth = 6;
  1958. kNoteEventPitchOffset = 32; { add to value in pitch field to get actual pitch }
  1959. kNoteEventVolumeFieldPos = 11;
  1960. kNoteEventVolumeFieldWidth = 7;
  1961. kNoteEventVolumeOffset = 0; { add to value in volume field to get actual volume }
  1962. kNoteEventDurationFieldPos = 0;
  1963. kNoteEventDurationFieldWidth = 11;
  1964. kNoteEventDurationMax = $000007FF;
  1965. kXNoteEventPitchFieldPos = 0; { in the 1st long word }
  1966. kXNoteEventPitchFieldWidth = 16;
  1967. kXNoteEventDurationFieldPos = 0; { in the 2nd long word }
  1968. kXNoteEventDurationFieldWidth = 22;
  1969. kXNoteEventDurationMax = $003FFFFF;
  1970. kXNoteEventVolumeFieldPos = 22; { in the 2nd long word }
  1971. kXNoteEventVolumeFieldWidth = 7; { Control Events }
  1972. kControlEventControllerFieldPos = 16;
  1973. kControlEventControllerFieldWidth = 8;
  1974. kControlEventValueFieldPos = 0;
  1975. kControlEventValueFieldWidth = 16;
  1976. kXControlEventControllerFieldPos = 0; { in the 2nd long word }
  1977. kXControlEventControllerFieldWidth = 16;
  1978. kXControlEventValueFieldPos = 0; { in the 1st long word }
  1979. kXControlEventValueFieldWidth = 16; { Knob Events }
  1980. kKnobEventValueHighFieldPos = 0; { 1st long word }
  1981. kKnobEventValueHighFieldWidth = 16;
  1982. kKnobEventKnobFieldPos = 16; { 2nd long word }
  1983. kKnobEventKnobFieldWidth = 14;
  1984. kKnobEventValueLowFieldPos = 0; { 2nd long word }
  1985. kKnobEventValueLowFieldWidth = 16; { Marker Events }
  1986. kMarkerEventSubtypeFieldPos = 16;
  1987. kMarkerEventSubtypeFieldWidth = 8;
  1988. kMarkerEventValueFieldPos = 0;
  1989. kMarkerEventValueFieldWidth = 16; { General Events }
  1990. kGeneralEventSubtypeFieldPos = 16; { in the last long word }
  1991. kGeneralEventSubtypeFieldWidth = 14;
  1992. kGeneralEventLengthFieldPos = 0; { in the 1st & last long words }
  1993. kGeneralEventLengthFieldWidth = 16;
  1994. {$ifc TARGET_RT_LITTLE_ENDIAN}
  1995. kEndMarkerValue = $00000060;
  1996. {$elsec}
  1997. kEndMarkerValue = $60000000;
  1998. {$endc} {TARGET_RT_LITTLE_ENDIAN}
  1999. { macros for extracting various fields from the QuickTime event records }
  2000. { General Event Defined Types }
  2001. kGeneralEventNoteRequest = 1; { Encapsulates NoteRequest data structure }
  2002. kGeneralEventPartKey = 4;
  2003. kGeneralEventTuneDifference = 5; { Contains a standard sequence, with end marker, for the tune difference of a sequence piece (halts QuickTime 2.0 Music) }
  2004. kGeneralEventAtomicInstrument = 6; { Encapsulates AtomicInstrument record }
  2005. kGeneralEventKnob = 7; { knobID/knobValue pairs; smallest event is 4 longs }
  2006. kGeneralEventMIDIChannel = 8; { used in tune header, one longword identifies the midi channel it originally came from }
  2007. kGeneralEventPartChange = 9; { used in tune sequence, one longword identifies the tune part which can now take over this part's note channel (similar to program change) (halts QuickTime 2.0 Music) }
  2008. kGeneralEventNoOp = 10; { guaranteed to do nothing and be ignored. (halts QuickTime 2.0 Music) }
  2009. kGeneralEventUsedNotes = 11; { four longwords specifying which midi notes are actually used, 0..127 msb to lsb }
  2010. kGeneralEventPartMix = 12; { three longwords: Fixed volume, long balance, long flags }
  2011. { Marker Event Defined Types // marker is 60 ee vv vv in hex, where e = event type, and v = value }
  2012. kMarkerEventEnd = 0; { marker type 0 means: value 0 - stop, value != 0 - ignore }
  2013. kMarkerEventBeat = 1; { value 0 = single beat; anything else is 65536ths-of-a-beat (quarter note) }
  2014. kMarkerEventTempo = 2; { value same as beat marker, but indicates that a tempo event should be computed (based on where the next beat or tempo marker is) and emitted upon export }
  2015. kCurrentlyNativeEndian = 1;
  2016. kCurrentlyNotNativeEndian = 2;
  2017. { UPP call backs }
  2018. uppMusicMIDISendProcInfo = $00000FF0;
  2019. uppMusicOfflineDataProcInfo = $00000FF0;
  2020. uppTuneCallBackProcInfo = $000003C0;
  2021. uppTunePlayCallBackProcInfo = $00000FC0;
  2022. {
  2023. * NewMusicMIDISendUPP()
  2024. *
  2025. * Availability:
  2026. * Non-Carbon CFM: available as macro/inline
  2027. * CarbonLib: in CarbonLib 1.0 and later
  2028. * Mac OS X: in version 10.0 and later
  2029. }
  2030. function NewMusicMIDISendUPP(userRoutine: MusicMIDISendProcPtr): MusicMIDISendUPP; external name '_NewMusicMIDISendUPP'; { old name was NewMusicMIDISendProc }
  2031. {
  2032. * NewMusicOfflineDataUPP()
  2033. *
  2034. * Availability:
  2035. * Non-Carbon CFM: available as macro/inline
  2036. * CarbonLib: in CarbonLib 1.0 and later
  2037. * Mac OS X: in version 10.0 and later
  2038. }
  2039. function NewMusicOfflineDataUPP(userRoutine: MusicOfflineDataProcPtr): MusicOfflineDataUPP; external name '_NewMusicOfflineDataUPP'; { old name was NewMusicOfflineDataProc }
  2040. {
  2041. * NewTuneCallBackUPP()
  2042. *
  2043. * Availability:
  2044. * Non-Carbon CFM: available as macro/inline
  2045. * CarbonLib: in CarbonLib 1.0 and later
  2046. * Mac OS X: in version 10.0 and later
  2047. }
  2048. function NewTuneCallBackUPP(userRoutine: TuneCallBackProcPtr): TuneCallBackUPP; external name '_NewTuneCallBackUPP'; { old name was NewTuneCallBackProc }
  2049. {
  2050. * NewTunePlayCallBackUPP()
  2051. *
  2052. * Availability:
  2053. * Non-Carbon CFM: available as macro/inline
  2054. * CarbonLib: in CarbonLib 1.0 and later
  2055. * Mac OS X: in version 10.0 and later
  2056. }
  2057. function NewTunePlayCallBackUPP(userRoutine: TunePlayCallBackProcPtr): TunePlayCallBackUPP; external name '_NewTunePlayCallBackUPP'; { old name was NewTunePlayCallBackProc }
  2058. {
  2059. * DisposeMusicMIDISendUPP()
  2060. *
  2061. * Availability:
  2062. * Non-Carbon CFM: available as macro/inline
  2063. * CarbonLib: in CarbonLib 1.0 and later
  2064. * Mac OS X: in version 10.0 and later
  2065. }
  2066. procedure DisposeMusicMIDISendUPP(userUPP: MusicMIDISendUPP); external name '_DisposeMusicMIDISendUPP';
  2067. {
  2068. * DisposeMusicOfflineDataUPP()
  2069. *
  2070. * Availability:
  2071. * Non-Carbon CFM: available as macro/inline
  2072. * CarbonLib: in CarbonLib 1.0 and later
  2073. * Mac OS X: in version 10.0 and later
  2074. }
  2075. procedure DisposeMusicOfflineDataUPP(userUPP: MusicOfflineDataUPP); external name '_DisposeMusicOfflineDataUPP';
  2076. {
  2077. * DisposeTuneCallBackUPP()
  2078. *
  2079. * Availability:
  2080. * Non-Carbon CFM: available as macro/inline
  2081. * CarbonLib: in CarbonLib 1.0 and later
  2082. * Mac OS X: in version 10.0 and later
  2083. }
  2084. procedure DisposeTuneCallBackUPP(userUPP: TuneCallBackUPP); external name '_DisposeTuneCallBackUPP';
  2085. {
  2086. * DisposeTunePlayCallBackUPP()
  2087. *
  2088. * Availability:
  2089. * Non-Carbon CFM: available as macro/inline
  2090. * CarbonLib: in CarbonLib 1.0 and later
  2091. * Mac OS X: in version 10.0 and later
  2092. }
  2093. procedure DisposeTunePlayCallBackUPP(userUPP: TunePlayCallBackUPP); external name '_DisposeTunePlayCallBackUPP';
  2094. {
  2095. * InvokeMusicMIDISendUPP()
  2096. *
  2097. * Availability:
  2098. * Non-Carbon CFM: available as macro/inline
  2099. * CarbonLib: in CarbonLib 1.0 and later
  2100. * Mac OS X: in version 10.0 and later
  2101. }
  2102. function InvokeMusicMIDISendUPP(self: ComponentInstance; refCon: SInt32; var mmp: MusicMIDIPacket; userRoutine: MusicMIDISendUPP): ComponentResult; external name '_InvokeMusicMIDISendUPP'; { old name was CallMusicMIDISendProc }
  2103. {
  2104. * InvokeMusicOfflineDataUPP()
  2105. *
  2106. * Availability:
  2107. * Non-Carbon CFM: available as macro/inline
  2108. * CarbonLib: in CarbonLib 1.0 and later
  2109. * Mac OS X: in version 10.0 and later
  2110. }
  2111. function InvokeMusicOfflineDataUPP(SoundData: Ptr; numBytes: SInt32; myRefCon: SInt32; userRoutine: MusicOfflineDataUPP): ComponentResult; external name '_InvokeMusicOfflineDataUPP'; { old name was CallMusicOfflineDataProc }
  2112. {
  2113. * InvokeTuneCallBackUPP()
  2114. *
  2115. * Availability:
  2116. * Non-Carbon CFM: available as macro/inline
  2117. * CarbonLib: in CarbonLib 1.0 and later
  2118. * Mac OS X: in version 10.0 and later
  2119. }
  2120. procedure InvokeTuneCallBackUPP(const (*var*) status: TuneStatus; refCon: SInt32; userRoutine: TuneCallBackUPP); external name '_InvokeTuneCallBackUPP'; { old name was CallTuneCallBackProc }
  2121. {
  2122. * InvokeTunePlayCallBackUPP()
  2123. *
  2124. * Availability:
  2125. * Non-Carbon CFM: available as macro/inline
  2126. * CarbonLib: in CarbonLib 1.0 and later
  2127. * Mac OS X: in version 10.0 and later
  2128. }
  2129. procedure InvokeTunePlayCallBackUPP(var event: UInt32; seed: SInt32; refCon: SInt32; userRoutine: TunePlayCallBackUPP); external name '_InvokeTunePlayCallBackUPP'; { old name was CallTunePlayCallBackProc }
  2130. {$ALIGN MAC68K}
  2131. end.