AudioUnitParameters.pas 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872
  1. {
  2. File: AudioUnitParameters.h
  3. Contains: Parameter constants for Apple AudioUnits
  4. Copyright: (c) 2002-2008 by Apple, Inc., all rights reserved.
  5. Bugs?: For bug reports, consult the following page on
  6. the World Wide Web:
  7. http://bugs.freepascal.org
  8. }
  9. { Pascal Translation: Gorazd Krosl <[email protected]>, October 2009 }
  10. { Pascal Translation Update: Jonas Maebe <[email protected]>, October 2012 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$calling mwpascal}
  22. unit AudioUnitParameters;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  25. {$setc GAP_INTERFACES_VERSION := $0308}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  41. {$setc __ppc64__ := 1}
  42. {$elsec}
  43. {$setc __ppc64__ := 0}
  44. {$endc}
  45. {$ifc not defined __i386__ and defined CPUI386}
  46. {$setc __i386__ := 1}
  47. {$elsec}
  48. {$setc __i386__ := 0}
  49. {$endc}
  50. {$ifc not defined __x86_64__ and defined CPUX86_64}
  51. {$setc __x86_64__ := 1}
  52. {$elsec}
  53. {$setc __x86_64__ := 0}
  54. {$endc}
  55. {$ifc not defined __arm__ and defined CPUARM}
  56. {$setc __arm__ := 1}
  57. {$elsec}
  58. {$setc __arm__ := 0}
  59. {$endc}
  60. {$ifc not defined __arm64__ and defined CPUAARCH64}
  61. {$setc __arm64__ := 1}
  62. {$elsec}
  63. {$setc __arm64__ := 0}
  64. {$endc}
  65. {$ifc defined cpu64}
  66. {$setc __LP64__ := 1}
  67. {$elsec}
  68. {$setc __LP64__ := 0}
  69. {$endc}
  70. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  71. {$error Conflicting definitions for __ppc__ and __i386__}
  72. {$endc}
  73. {$ifc defined __ppc__ and __ppc__}
  74. {$setc TARGET_CPU_PPC := TRUE}
  75. {$setc TARGET_CPU_PPC64 := FALSE}
  76. {$setc TARGET_CPU_X86 := FALSE}
  77. {$setc TARGET_CPU_X86_64 := FALSE}
  78. {$setc TARGET_CPU_ARM := FALSE}
  79. {$setc TARGET_CPU_ARM64 := FALSE}
  80. {$setc TARGET_OS_MAC := TRUE}
  81. {$setc TARGET_OS_IPHONE := FALSE}
  82. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  83. {$setc TARGET_OS_EMBEDDED := FALSE}
  84. {$elifc defined __ppc64__ and __ppc64__}
  85. {$setc TARGET_CPU_PPC := FALSE}
  86. {$setc TARGET_CPU_PPC64 := TRUE}
  87. {$setc TARGET_CPU_X86 := FALSE}
  88. {$setc TARGET_CPU_X86_64 := FALSE}
  89. {$setc TARGET_CPU_ARM := FALSE}
  90. {$setc TARGET_CPU_ARM64 := FALSE}
  91. {$setc TARGET_OS_MAC := TRUE}
  92. {$setc TARGET_OS_IPHONE := FALSE}
  93. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  94. {$setc TARGET_OS_EMBEDDED := FALSE}
  95. {$elifc defined __i386__ and __i386__}
  96. {$setc TARGET_CPU_PPC := FALSE}
  97. {$setc TARGET_CPU_PPC64 := FALSE}
  98. {$setc TARGET_CPU_X86 := TRUE}
  99. {$setc TARGET_CPU_X86_64 := FALSE}
  100. {$setc TARGET_CPU_ARM := FALSE}
  101. {$setc TARGET_CPU_ARM64 := FALSE}
  102. {$ifc defined(iphonesim)}
  103. {$setc TARGET_OS_MAC := FALSE}
  104. {$setc TARGET_OS_IPHONE := TRUE}
  105. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  106. {$elsec}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$endc}
  111. {$setc TARGET_OS_EMBEDDED := FALSE}
  112. {$elifc defined __x86_64__ and __x86_64__}
  113. {$setc TARGET_CPU_PPC := FALSE}
  114. {$setc TARGET_CPU_PPC64 := FALSE}
  115. {$setc TARGET_CPU_X86 := FALSE}
  116. {$setc TARGET_CPU_X86_64 := TRUE}
  117. {$setc TARGET_CPU_ARM := FALSE}
  118. {$setc TARGET_CPU_ARM64 := FALSE}
  119. {$ifc defined(iphonesim)}
  120. {$setc TARGET_OS_MAC := FALSE}
  121. {$setc TARGET_OS_IPHONE := TRUE}
  122. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  123. {$elsec}
  124. {$setc TARGET_OS_MAC := TRUE}
  125. {$setc TARGET_OS_IPHONE := FALSE}
  126. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  127. {$endc}
  128. {$setc TARGET_OS_EMBEDDED := FALSE}
  129. {$elifc defined __arm__ and __arm__}
  130. {$setc TARGET_CPU_PPC := FALSE}
  131. {$setc TARGET_CPU_PPC64 := FALSE}
  132. {$setc TARGET_CPU_X86 := FALSE}
  133. {$setc TARGET_CPU_X86_64 := FALSE}
  134. {$setc TARGET_CPU_ARM := TRUE}
  135. {$setc TARGET_CPU_ARM64 := FALSE}
  136. { will require compiler define when/if other Apple devices with ARM cpus ship }
  137. {$setc TARGET_OS_MAC := FALSE}
  138. {$setc TARGET_OS_IPHONE := TRUE}
  139. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  140. {$setc TARGET_OS_EMBEDDED := TRUE}
  141. {$elifc defined __arm64__ and __arm64__}
  142. {$setc TARGET_CPU_PPC := FALSE}
  143. {$setc TARGET_CPU_PPC64 := FALSE}
  144. {$setc TARGET_CPU_X86 := FALSE}
  145. {$setc TARGET_CPU_X86_64 := FALSE}
  146. {$setc TARGET_CPU_ARM := FALSE}
  147. {$setc TARGET_CPU_ARM64 := TRUE}
  148. { will require compiler define when/if other Apple devices with ARM cpus ship }
  149. {$setc TARGET_OS_MAC := FALSE}
  150. {$setc TARGET_OS_IPHONE := TRUE}
  151. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  152. {$setc TARGET_OS_EMBEDDED := TRUE}
  153. {$elsec}
  154. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  155. {$endc}
  156. {$ifc defined __LP64__ and __LP64__ }
  157. {$setc TARGET_CPU_64 := TRUE}
  158. {$elsec}
  159. {$setc TARGET_CPU_64 := FALSE}
  160. {$endc}
  161. {$ifc defined FPC_BIG_ENDIAN}
  162. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  163. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  164. {$elifc defined FPC_LITTLE_ENDIAN}
  165. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  166. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  167. {$elsec}
  168. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  169. {$endc}
  170. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  171. {$setc CALL_NOT_IN_CARBON := FALSE}
  172. {$setc OLDROUTINENAMES := FALSE}
  173. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  174. {$setc OPAQUE_UPP_TYPES := TRUE}
  175. {$setc OTCARBONAPPLICATION := TRUE}
  176. {$setc OTKERNEL := FALSE}
  177. {$setc PM_USE_SESSION_APIS := TRUE}
  178. {$setc TARGET_API_MAC_CARBON := TRUE}
  179. {$setc TARGET_API_MAC_OS8 := FALSE}
  180. {$setc TARGET_API_MAC_OSX := TRUE}
  181. {$setc TARGET_CARBON := TRUE}
  182. {$setc TARGET_CPU_68K := FALSE}
  183. {$setc TARGET_CPU_MIPS := FALSE}
  184. {$setc TARGET_CPU_SPARC := FALSE}
  185. {$setc TARGET_OS_UNIX := FALSE}
  186. {$setc TARGET_OS_WIN32 := FALSE}
  187. {$setc TARGET_RT_MAC_68881 := FALSE}
  188. {$setc TARGET_RT_MAC_CFM := FALSE}
  189. {$setc TARGET_RT_MAC_MACHO := TRUE}
  190. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  191. {$setc TYPE_BOOL := FALSE}
  192. {$setc TYPE_EXTENDED := FALSE}
  193. {$setc TYPE_LONGLONG := TRUE}
  194. uses MacTypes;
  195. {$endc} {not MACOSALLINCLUDE}
  196. {$ALIGN POWER}
  197. //#pragma mark General Declarations
  198. { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  199. The following specifies the equivalent parameterID's for the Group scope for standard
  200. MIDI Controllers. This list is not exhaustive. It represents the parameters, and their corresponding
  201. MIDI messages, that should be supported in Group scope by MIDI capable AUs.
  202. Group scope parameter IDs from 0 < 512 are reserved for mapping MIDI controllers.
  203. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }
  204. const
  205. kAUGroupParameterID_Volume = 7; // value 0 < 128
  206. kAUGroupParameterID_Sustain = 64; // value 0-63 (off), 64-127 (on)
  207. kAUGroupParameterID_Sostenuto = 66; // value 0-63 (off), 64-127 (on)
  208. kAUGroupParameterID_AllNotesOff = 123; // value ignored
  209. kAUGroupParameterID_ModWheel = 1; // value 0 < 128
  210. kAUGroupParameterID_PitchBend = $E0; // value -8192 - 8191
  211. kAUGroupParameterID_AllSoundOff = 120; // value ignored
  212. kAUGroupParameterID_ResetAllControllers = 121; // value ignored
  213. kAUGroupParameterID_Pan = 10; // value 0 < 128
  214. kAUGroupParameterID_Foot = 4; // value 0 < 128
  215. kAUGroupParameterID_ChannelPressure = $D0; // value 0 < 128
  216. kAUGroupParameterID_KeyPressure = $A0; // values 0 < 128
  217. kAUGroupParameterID_Expression = 11; // value 0 < 128
  218. kAUGroupParameterID_DataEntry = 6; // value 0 < 128
  219. kAUGroupParameterID_Volume_LSB = kAUGroupParameterID_Volume + 32; // value 0 < 128
  220. kAUGroupParameterID_ModWheel_LSB = kAUGroupParameterID_ModWheel + 32; // value 0 < 128
  221. kAUGroupParameterID_Pan_LSB = kAUGroupParameterID_Pan + 32; // value 0 < 128
  222. kAUGroupParameterID_Foot_LSB = kAUGroupParameterID_Foot + 32; // value 0 < 128
  223. kAUGroupParameterID_Expression_LSB = kAUGroupParameterID_Expression + 32; // value 0 < 128
  224. kAUGroupParameterID_DataEntry_LSB = kAUGroupParameterID_DataEntry + 32; // value 0 < 128
  225. kAUGroupParameterID_KeyPressure_FirstKey = 256; // value 0 < 128
  226. kAUGroupParameterID_KeyPressure_LastKey = 383; // value 0 < 128
  227. { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  228. Supporting the kAUGroupParameterID_KeyPressure parameter indicates to hosts that your audio unit
  229. supports polyphonic "aftertouch" key pressure.
  230. Each of the 128 MIDI key numbers can have its own value for polyphonic aftertouch. To respond to
  231. aftertouch for a particular key, your audio unit needs to support an additional parameter
  232. specifically for that key. The aftertouch parameter ID for a given MIDI key is equal to the MIDI
  233. key number plus 256. For example, the aftertouch parameter ID for MIDI key #60 (middle C) is:
  234. 60 + kAUGroupParameterID_KeyPressure_FirstKey = 316
  235. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }
  236. { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  237. The following sections specify the parameter IDs for the audio units included in Mac OS X.
  238. Host applications can use these IDs to directly address these parameters without first discovering
  239. them through the AUParameterInfo mechanism (see the AudioUnitProperties.h header file)
  240. Each parameter is preceeded by a comment that indicates scope, unit of measurement, minimum
  241. value, maximum value, and default value.
  242. See the AudioUnitProperties.h header file for additional information that a parameter may report
  243. When displaying to the user information about a parameter, a host application should always
  244. get the parameter information from the audio unit itself.
  245. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }
  246. {$ifc not TARGET_OS_IPHONE}
  247. // Parameters for all Panner AudioUnits
  248. const
  249. // Global, Linear, 0->1, 1
  250. kPannerParam_Gain = 0;
  251. // Global, Degrees, -180->180, 0
  252. kPannerParam_Azimuth = 1;
  253. // Global, Degrees, -90->90, 0
  254. kPannerParam_Elevation = 2;
  255. // Global, Linear, 0->1, 1
  256. kPannerParam_Distance = 3; // 0 .. 1
  257. // Global, Meters, 0.01->1000, 1
  258. kPannerParam_CoordScale = 4;
  259. // Global, Meters, 0.01->1000, 1
  260. kPannerParam_RefDistance = 5;
  261. {$endc} {not TARGET_OS_IPHONE}
  262. //#pragma mark Apple Specific
  263. // Parameters for the AUMixer3D unit
  264. const
  265. // Input, Degrees, -180->180, 0
  266. k3DMixerParam_Azimuth = 0;
  267. // Input, Degrees, -90->90, 0
  268. k3DMixerParam_Elevation = 1;
  269. // Input, Metres, 0->10000, 0
  270. k3DMixerParam_Distance = 2;
  271. // Input/Output, dB, -120->20, 0
  272. k3DMixerParam_Gain = 3;
  273. // Input, rate scaler 0.5 -> 2.0
  274. k3DMixerParam_PlaybackRate = 4;
  275. {$ifc not TARGET_OS_IPHONE}
  276. // Desktop specific 3D mixer parameters
  277. // Input, Dry/Wet equal-power blend, % 0.0 -> 100.0
  278. k3DMixerParam_ReverbBlend = 5;
  279. // Global, dB, -40.0 -> +40.0
  280. k3DMixerParam_GlobalReverbGain = 6;
  281. // Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB
  282. // smaller values make both direct and reverb sound more muffled; a value of 0.0 indicates no filtering
  283. // Occlusion is a filter applied to the sound prior to the reverb send
  284. k3DMixerParam_OcclusionAttenuation = 7;
  285. // Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB
  286. // smaller values make direct sound more muffled; a value of 0.0 indicates no filtering
  287. // Obstruction is a filter applied to the "direct" part of the sound (so is post reverb send)
  288. k3DMixerParam_ObstructionAttenuation = 8;
  289. // Input/Output, dB, -120->20, 0
  290. k3DMixerParam_MinGain = 9;
  291. // Input/Output, dB, -120->20, 0
  292. k3DMixerParam_MaxGain = 10;
  293. // read-only
  294. //
  295. // For each of the following, use the parameter ID plus the channel number
  296. // to get the specific parameter ID for a given channel.
  297. // For example, k3DMixerParam_PostAveragePower indicates the left channel
  298. // while k3DMixerParam_PostAveragePower + 1 indicates the right channel.
  299. k3DMixerParam_PreAveragePower = 1000;
  300. k3DMixerParam_PrePeakHoldLevel = 2000;
  301. k3DMixerParam_PostAveragePower = 3000;
  302. k3DMixerParam_PostPeakHoldLevel = 4000;
  303. {$endc} { not TARGET_OS_IPHONE }
  304. // Parameters for the AUMultiChannelMixer unit
  305. // these are available for both desktop and iphone
  306. const
  307. // Global, Linear Gain, 0->1, 1
  308. kMultiChannelMixerParam_Volume = 0;
  309. // Global, Boolean, 0->1, 1
  310. kMultiChannelMixerParam_Enable = 1;
  311. // Global, Pan
  312. kMultiChannelMixerParam_Pan = 2; // -1 - 0 - 1, only valid when output is not mono
  313. // relationship to mix matrix: last one in wins
  314. // read-only
  315. // these report level in dB, as do the other mixers
  316. kMultiChannelMixerParam_PreAveragePower = 1000;
  317. kMultiChannelMixerParam_PrePeakHoldLevel = 2000;
  318. kMultiChannelMixerParam_PostAveragePower = 3000;
  319. kMultiChannelMixerParam_PostPeakHoldLevel = 4000;
  320. // Music Device
  321. // Parameters for the AUSampler unit
  322. const
  323. // Global, dB, -90->12, 0
  324. kAUSamplerParam_Gain = 900;
  325. // Global, Semitones, -24->24, 0
  326. kAUSamplerParam_CoarseTuning = 901;
  327. // Global, Cents, -99->99, 0
  328. kAUSamplerParam_FineTuning = 902;
  329. // Global, -1.0->1.0, 0
  330. kAUSamplerParam_Pan = 903;
  331. // Output Units
  332. // Parameters for the AudioDeviceOutput, DefaultOutputUnit, and SystemOutputUnit units
  333. const
  334. // Global, LinearGain, 0->1, 1
  335. kHALOutputParam_Volume = 14;
  336. // Parameters for the AUTimePitch, AUTimePitch (offline), AUPitch units
  337. const
  338. kTimePitchParam_Rate = 0;
  339. {$ifc not TARGET_OS_IPHONE}
  340. kTimePitchParam_Pitch = 1;
  341. kTimePitchParam_EffectBlend = 2; // only for the AUPitch unit
  342. {$endif} {TARGET_OS_IPHONE}
  343. // Parameters for AUNewTimePitch
  344. const
  345. // Global, rate, 1/32 -> 32.0, 1.0
  346. kNewTimePitchParam_Rate = 0;
  347. // Global, Cents, -2400 -> 2400, 1.0
  348. kNewTimePitchParam_Pitch = 1;
  349. // Global, generic, 3.0 -> 32.0, 8.0
  350. kNewTimePitchParam_Overlap = 4;
  351. // Global, Boolean, 0->1, 1
  352. kNewTimePitchParam_EnablePeakLocking = 6;
  353. // Effect units
  354. // The values for some effect unit parameters depend on the audio unit's sample rate.
  355. // For example, maximum values are typically the Nyquist frequency (indicated here as
  356. // SampleRate/2).
  357. // Parameters for the AUBandpass unit
  358. const
  359. // Global, Hz, 20->(SampleRate/2), 5000
  360. kBandpassParam_CenterFrequency = 0;
  361. // Global, Cents, 100->12000, 600
  362. kBandpassParam_Bandwidth = 1;
  363. // Parameters for the AUHipass unit
  364. const
  365. // Global, Hz, 10->(SampleRate/2), 6900
  366. kHipassParam_CutoffFrequency = 0;
  367. // Global, dB, -20->40, 0
  368. kHipassParam_Resonance = 1;
  369. // Parameters for the AULowpass unit
  370. const
  371. // Global, Hz, 10->(SampleRate/2), 6900
  372. kLowPassParam_CutoffFrequency = 0;
  373. // Global, dB, -20->40, 0
  374. kLowPassParam_Resonance = 1;
  375. // Parameters for the AUHighShelfFilter unit
  376. const
  377. // Global, Hz, 10000->(SampleRate/2), 10000
  378. kHighShelfParam_CutOffFrequency = 0;
  379. // Global, dB, -40->40, 0
  380. kHighShelfParam_Gain = 1;
  381. // Parameters for the AULowShelfFilter unit
  382. const
  383. // Global, Hz, 10->200, 80
  384. kAULowShelfParam_CutoffFrequency = 0;
  385. // Global, dB, -40->40, 0
  386. kAULowShelfParam_Gain = 1;
  387. // Parameters for the AUParametricEQ unit
  388. const
  389. // Global, Hz, 20->(SampleRate/2), 2000
  390. kParametricEQParam_CenterFreq = 0;
  391. // Global, Hz, 0.1->20, 1.0
  392. kParametricEQParam_Q = 1;
  393. // Global, dB, -20->20, 0
  394. kParametricEQParam_Gain = 2;
  395. // Parameters for the AUPeakLimiter unit
  396. const
  397. // Global, Secs, 0.001->0.03, 0.012
  398. kLimiterParam_AttackTime = 0;
  399. // Global, Secs, 0.001->0.06, 0.024
  400. kLimiterParam_DecayTime = 1;
  401. // Global, dB, -40->40, 0
  402. kLimiterParam_PreGain = 2;
  403. // Parameters for the AUDynamicsProcessor unit
  404. const
  405. // Global, dB, -40->20, -20
  406. kDynamicsProcessorParam_Threshold = 0;
  407. // Global, dB, 0.1->40.0, 5
  408. kDynamicsProcessorParam_HeadRoom = 1;
  409. // Global, rate, 1->50.0, 2
  410. kDynamicsProcessorParam_ExpansionRatio = 2;
  411. // Global, dB
  412. kDynamicsProcessorParam_ExpansionThreshold = 3;
  413. // Global, secs, 0.0001->0.2, 0.001
  414. kDynamicsProcessorParam_AttackTime = 4;
  415. // Global, secs, 0.01->3, 0.05
  416. kDynamicsProcessorParam_ReleaseTime = 5;
  417. // Global, dB, -40->40, 0
  418. kDynamicsProcessorParam_MasterGain = 6;
  419. // Global, dB, read-only parameter
  420. kDynamicsProcessorParam_CompressionAmount = 1000;
  421. kDynamicsProcessorParam_InputAmplitude = 2000;
  422. kDynamicsProcessorParam_OutputAmplitude = 3000;
  423. // Parameters for the AUVarispeed unit
  424. const
  425. // Global, Rate, 0.25 -> 4.0, 1.0
  426. kVarispeedParam_PlaybackRate = 0;
  427. // Global, Cents, -2400 -> 2400, 0.0
  428. kVarispeedParam_PlaybackCents = 1;
  429. // Parameters for the Distortion unit
  430. const
  431. // Global, Milliseconds, 0.1 -> 500, 0.1
  432. kDistortionParam_Delay = 0;
  433. // Global, Rate, 0.1 -> 50, 1.0
  434. kDistortionParam_Decay = 1;
  435. // Global, Percent, 0 -> 100, 50
  436. kDistortionParam_DelayMix = 2;
  437. // Global, Percent, 0 -> 100
  438. kDistortionParam_Decimation = 3;
  439. // Global, Percent, 0 -> 100, 0
  440. kDistortionParam_Rounding = 4;
  441. // Global, Percent, 0 -> 100, 50
  442. kDistortionParam_DecimationMix = 5;
  443. // Global, Linear Gain, 0 -> 1, 1
  444. kDistortionParam_LinearTerm = 6;
  445. // Global, Linear Gain, 0 -> 20, 0
  446. kDistortionParam_SquaredTerm = 7;
  447. // Global, Linear Gain, 0 -> 20, 0
  448. kDistortionParam_CubicTerm = 8;
  449. // Global, Percent, 0 -> 100, 50
  450. kDistortionParam_PolynomialMix = 9;
  451. // Global, Hertz, 0.5 -> 8000, 100
  452. kDistortionParam_RingModFreq1 = 10;
  453. // Global, Hertz, 0.5 -> 8000, 100
  454. kDistortionParam_RingModFreq2 = 11;
  455. // Global, Percent, 0 -> 100, 50
  456. kDistortionParam_RingModBalance = 12;
  457. // Global, Percent, 0 -> 100, 0
  458. kDistortionParam_RingModMix = 13;
  459. // Global, dB, -80 -> 20, -6
  460. kDistortionParam_SoftClipGain = 14;
  461. // Global, Percent, 0 -> 100, 50
  462. kDistortionParam_FinalMix = 15;
  463. //#pragma mark Apple Specific - Desktop
  464. {$ifc not TARGET_OS_IPHONE}
  465. // Some parameters for the AUGraphicEQ unit
  466. const
  467. // Global, Indexed, currently either 10 or 31
  468. kGraphicEQParam_NumberOfBands = 10000;
  469. // Parameters for the AUMatrixReverb unit
  470. const
  471. // Global, EqPow CrossFade, 0->100, 100
  472. kReverbParam_DryWetMix = 0;
  473. // Global, EqPow CrossFade, 0->100, 50
  474. kReverbParam_SmallLargeMix = 1;
  475. // Global, Secs, 0.005->0.020, 0.06
  476. kReverbParam_SmallSize = 2;
  477. // Global, Secs, 0.4->10.0, 3.07
  478. kReverbParam_LargeSize = 3;
  479. // Global, Secs, 0.001->0.03, 0.025
  480. kReverbParam_PreDelay = 4;
  481. // Global, Secs, 0.001->0.1, 0.035
  482. kReverbParam_LargeDelay = 5;
  483. // Global, Genr, 0->1, 0.28
  484. kReverbParam_SmallDensity = 6;
  485. // Global, Genr, 0->1, 0.82
  486. kReverbParam_LargeDensity = 7;
  487. // Global, Genr, 0->1, 0.3
  488. kReverbParam_LargeDelayRange = 8;
  489. // Global, Genr, 0.1->1, 0.96
  490. kReverbParam_SmallBrightness = 9;
  491. // Global, Genr, 0.1->1, 0.49
  492. kReverbParam_LargeBrightness = 10;
  493. // Global, Genr, 0->1 0.5
  494. kReverbParam_SmallDelayRange = 11;
  495. // Global, Hz, 0.001->2.0, 1.0
  496. kReverbParam_ModulationRate = 12;
  497. // Global, Genr, 0.0 -> 1.0, 0.2
  498. kReverbParam_ModulationDepth = 13;
  499. // Global, Hertz, 10.0 -> 20000.0, 800.0
  500. kReverbParam_FilterFrequency = 14;
  501. // Global, Octaves, 0.05 -> 4.0, 3.0
  502. kReverbParam_FilterBandwidth = 15;
  503. // Global, Decibels, -18.0 -> +18.0, 0.0
  504. kReverbParam_FilterGain = 16;
  505. // Parameters for the AUDelay unit
  506. const
  507. // Global, EqPow Crossfade, 0->100, 50
  508. kDelayParam_WetDryMix = 0;
  509. // Global, Secs, 0->2, 1
  510. kDelayParam_DelayTime = 1;
  511. // Global, Percent, -100->100, 50
  512. kDelayParam_Feedback = 2;
  513. // Global, Hz, 10->(SampleRate/2), 15000
  514. kDelayParam_LopassCutoff = 3;
  515. // Parameters for the AUMultibandCompressor unit
  516. const
  517. // Global, dB, -40 -> 40, 0
  518. kMultibandCompressorParam_Pregain = 0;
  519. // Global, dB, -40 -> 40, 0
  520. kMultibandCompressorParam_Postgain = 1;
  521. // Global, Hertz, 20 -> (SampleRate/2), 120.0
  522. kMultibandCompressorParam_Crossover1 = 2;
  523. // Global, Hertz, 20 -> (SampleRate/2), 700.0
  524. kMultibandCompressorParam_Crossover2 = 3;
  525. // Global, Hertz, 20 -> (SampleRate/2), 3000.0
  526. kMultibandCompressorParam_Crossover3 = 4;
  527. // Global, dB, -100.0 -> 0.0, -22.0
  528. kMultibandCompressorParam_Threshold1 = 5;
  529. // Global, dB, -100.0 -> 0.0, -32.0
  530. kMultibandCompressorParam_Threshold2 = 6;
  531. // Global, dB, -100.0 -> 0.0, -33.0
  532. kMultibandCompressorParam_Threshold3 = 7;
  533. // Global, dB, -100.0 -> 0.0, -36.0
  534. kMultibandCompressorParam_Threshold4 = 8;
  535. // Global, dB, 0.1 -> 40.0, 5.0
  536. kMultibandCompressorParam_Headroom1 = 9;
  537. // Global, dB, 0.1 -> 40.0, 12.0
  538. kMultibandCompressorParam_Headroom2 = 10;
  539. // Global, dB, 0.1 -> 40.0, 5.0
  540. kMultibandCompressorParam_Headroom3 = 11;
  541. // Global, dB, 0.1 -> 40.0, 7.5
  542. kMultibandCompressorParam_Headroom4 = 12;
  543. // Global, Secs, 0.001 -> 0.200, 0.080
  544. kMultibandCompressorParam_AttackTime = 13;
  545. // Global, Secs, 0.010 -> 3.0, 0.120
  546. kMultibandCompressorParam_ReleaseTime = 14;
  547. // Global, dB, -20 -> 20, 0
  548. kMultibandCompressorParam_EQ1 = 15;
  549. // Global, dB, -20 -> 20, 0
  550. kMultibandCompressorParam_EQ2 = 16;
  551. // Global, dB, -20 -> 20, 0
  552. kMultibandCompressorParam_EQ3 = 17;
  553. // Global, dB, -20 -> 20, 0
  554. kMultibandCompressorParam_EQ4 = 18;
  555. // read-only parameters
  556. // Global, dB, 0 -> 20
  557. kMultibandCompressorParam_CompressionAmount1 = 1000;
  558. // Global, dB, 0 -> 20
  559. kMultibandCompressorParam_CompressionAmount2 = 2000;
  560. // Global, dB, 0 -> 20
  561. kMultibandCompressorParam_CompressionAmount3 = 3000;
  562. // Global, dB, 0 -> 20
  563. kMultibandCompressorParam_CompressionAmount4 = 4000;
  564. // Global, dB, -120 -> 20
  565. kMultibandCompressorParam_InputAmplitude1 = 5000;
  566. // Global, dB, -120 -> 20
  567. kMultibandCompressorParam_InputAmplitude2 = 6000;
  568. // Global, dB, -120 -> 20
  569. kMultibandCompressorParam_InputAmplitude3 = 7000;
  570. // Global, dB, -120 -> 20
  571. kMultibandCompressorParam_InputAmplitude4 = 8000;
  572. // Global, dB, -120 -> 20
  573. kMultibandCompressorParam_OutputAmplitude1 = 9000;
  574. // Global, dB, -120 -> 20
  575. kMultibandCompressorParam_OutputAmplitude2 = 10000;
  576. // Global, dB, -120 -> 20
  577. kMultibandCompressorParam_OutputAmplitude3 = 11000;
  578. // Global, dB, -120 -> 20
  579. kMultibandCompressorParam_OutputAmplitude4 = 12000;
  580. // Parameters for the AUFilter unit
  581. const
  582. // Global, indexed, 0 -> 1, 0
  583. kMultibandFilter_LowFilterType = 0;
  584. // Global, Hertz, 10 -> (SampleRate/2), 100
  585. kMultibandFilter_LowFrequency = 1;
  586. // Global, dB, -18 -> +18, 0
  587. kMultibandFilter_LowGain = 2;
  588. // Global, Hertz, 10 -> (SampleRate/2), 100
  589. kMultibandFilter_CenterFreq1 = 3;
  590. // Global, dB, -18 -> +18, 0
  591. kMultibandFilter_CenterGain1 = 4;
  592. // Global, Octaves, 0.05 -> 3.0, 2.0
  593. kMultibandFilter_Bandwidth1 = 5;
  594. // Global, Hertz, 10 -> (SampleRate/2), 100
  595. kMultibandFilter_CenterFreq2 = 6;
  596. // Global, dB, -18 -> +18, 0
  597. kMultibandFilter_CenterGain2 = 7;
  598. // Global, Octaves, 0.05 -> 3.0, 2.0
  599. kMultibandFilter_Bandwidth2 = 8;
  600. // Global, Hertz, 10 -> (SampleRate/2), 100
  601. kMultibandFilter_CenterFreq3 = 9;
  602. // Global, dB, -18 -> +18, 0
  603. kMultibandFilter_CenterGain3 = 10;
  604. // Global, Octaves, 0.05 -> 3.0, 2.0
  605. kMultibandFilter_Bandwidth3 = 11;
  606. // Global, indexed, 0 -> 1, 0
  607. kMultibandFilter_HighFilterType = 12;
  608. // Global, Hertz, 10 -> (SampleRate/2), 100
  609. kMultibandFilter_HighFrequency = 13;
  610. // Global, dB, -18 -> +18, 0
  611. kMultibandFilter_HighGain = 14;
  612. // Mixer Units
  613. // Parameters for the Stereo Mixer unit
  614. const
  615. // Input/Output, Mixer Fader Curve, 0->1, 1
  616. kStereoMixerParam_Volume = 0;
  617. // Input, Pan, 0->1, 0.5
  618. kStereoMixerParam_Pan = 1;
  619. // read-only
  620. //
  621. // For each of the following, use the parameter ID for the left channel
  622. // and the parameter ID plus one for the right channel.
  623. // For example, kStereoMixerParam_PostAveragePower indicates the left channel
  624. // while kStereiMixerParam_PostAveragePower + 1 indicates the right channel.
  625. kStereoMixerParam_PreAveragePower = 1000;
  626. kStereoMixerParam_PrePeakHoldLevel = 2000;
  627. kStereoMixerParam_PostAveragePower = 3000;
  628. kStereoMixerParam_PostPeakHoldLevel = 4000;
  629. // Parameters for the AUMatrixMixer unit
  630. const
  631. kMatrixMixerParam_Volume = 0;
  632. kMatrixMixerParam_Enable = 1;
  633. // read-only
  634. // these report level in dB, as do the other mixers
  635. kMatrixMixerParam_PreAveragePower = 1000;
  636. kMatrixMixerParam_PrePeakHoldLevel = 2000;
  637. kMatrixMixerParam_PostAveragePower = 3000;
  638. kMatrixMixerParam_PostPeakHoldLevel = 4000;
  639. // these report linear levels - for "expert" use only.
  640. kMatrixMixerParam_PreAveragePowerLinear = 5000;
  641. kMatrixMixerParam_PrePeakHoldLevelLinear = 6000;
  642. kMatrixMixerParam_PostAveragePowerLinear = 7000;
  643. kMatrixMixerParam_PostPeakHoldLevelLinear = 8000;
  644. // Parameters for the AUNetReceive unit
  645. const
  646. // Global, indexed, 0 -> 5, read only
  647. kAUNetReceiveParam_Status = 0;
  648. kAUNetReceiveParam_NumParameters = 1;
  649. // Parameters for the AUNetSend unit
  650. const
  651. // Global, indexed, 0 -> 5, read only
  652. kAUNetSendParam_Status = 0;
  653. kAUNetSendParam_NumParameters = 1;
  654. // Status values for the AUNetSend and AUNetReceive units
  655. const
  656. kAUNetStatus_NotConnected = 0;
  657. kAUNetStatus_Connected = 1;
  658. kAUNetStatus_Overflow = 2;
  659. kAUNetStatus_Underflow = 3;
  660. kAUNetStatus_Connecting = 4;
  661. kAUNetStatus_Listening = 5;
  662. // Parameters for AURogerBeep
  663. const
  664. // Global, dB, -80 -> 0, -6
  665. kRogerBeepParam_InGateThreshold = 0;
  666. // Global, Milliseconds, 0 -> 1000, 1000
  667. kRogerBeepParam_InGateThresholdTime = 1;
  668. // Global, dB, -80 -> 0, -6
  669. kRogerBeepParam_OutGateThreshold = 2;
  670. // Global, Milliseconds, 0 -> 1000, 1000
  671. kRogerBeepParam_OutGateThresholdTime = 3;
  672. // Global, indexed, 0 -> 2, 2
  673. kRogerBeepParam_Sensitivity = 4;
  674. // Global, indexed, 0 -> 2, 0
  675. kRogerBeepParam_RogerType = 5;
  676. // Global, dB, -80 -> 20, -6
  677. kRogerBeepParam_RogerGain = 6;
  678. // Music Device
  679. // Parameters for the DLSMusicDevice unit - defined and reported in the global scope
  680. const
  681. // Global, Cents, -1200, 1200, 0
  682. kMusicDeviceParam_Tuning = 0;
  683. // Global, dB, -120->40, 0
  684. kMusicDeviceParam_Volume = 1;
  685. // Global, dB, -120->40, 0
  686. kMusicDeviceParam_ReverbVolume = 2;
  687. // In Mac OS X v10.5, the DLSMusicDevice audio unit does not report parameters in the Group scope.
  688. // However, parameter values can be set in Group scope that correspond to controller values defined
  689. // by the MIDI specification. This includes the standard MIDI Controller values (such as Volume and
  690. // Mod Wheel) as well as MIDI status messages (such as Pitch Bend and Channel Pressure) and the
  691. // MIDI RPN control messages.
  692. // For MIDI status messages, use a value of 0 for the "channel part" (lower four bits) when setting
  693. // these parameters. This allows audio units to distinguish these IDs from the 0-127
  694. // values used by MIDI controllers in the first byte of status messages.
  695. //
  696. // The element ID represents the group or channel number.
  697. //
  698. // You can use the MusicDeviceMIDIEvent function to send a MIDI formatted control command to a device.
  699. //
  700. // You can use the SetParameter API calls, declared in the AUComponent.h header file, as follows:
  701. //
  702. // scope == kAudioUnitScope_Group
  703. // element == groupID -> in MIDI equivalent to channel number 0->15,
  704. // but this is not a limitation of the MusicDevice and values greater than 15 can be specified
  705. // paramID == midi controller value (0->127), (status bytes corresponding to pitch bend, channel pressure)
  706. // value == typically the range associated with the corresponding MIDI message (7 bit, 0->127)
  707. // pitch bend is specified as a 14 bit value
  708. // See the MusicDevice.h header file for more about using the extended control semantics
  709. // of this API.
  710. // Parameters for the AURoundTripAACParam unit
  711. const
  712. // Global, indexed : AAC, AAC HE, AAC HEv2, AAC ELD
  713. kRoundTripAACParam_Format = 0;
  714. // Global, indexed
  715. kRoundTripAACParam_EncodingStrategy = 1;
  716. // Global, indexed
  717. kRoundTripAACParam_RateOrQuality = 2;
  718. // These are deprecated:
  719. kRoundTripAACParam_BitRate = 1;
  720. kRoundTripAACParam_Quality = 2;
  721. kRoundTripAACParam_CompressedFormatSampleRate = 3;
  722. {$endc} {not TARGET_OS_IPHONE}
  723. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  724. end.
  725. {$endc} {not MACOSALLINCLUDE}