home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Beta / Quicktime 2.0 Beta.iso / Programming Stuff / Documentation / QuickTime Music Architecture < prev    next >
MacBinary  |  1994-04-27  |  92.3 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: QuickTime Music Architecture

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Mon Apr 25 14:31:03 1994, modified Wed Apr 27 17:58:04 1994, creator 'HLX2', type 'ONLN', 91920 bytes "QuickTime Music Architecture" , at 0x16790 2279 bytes resource default (weak)
99% file data default
66% TrID SpeedScript document (C64) default (weak)
33% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 1c 51 75 69 63 6b 54 | 69 6d 65 20 4d 75 73 69 |..QuickT|ime Musi|
|00000010| 63 20 41 72 63 68 69 74 | 65 63 74 75 72 65 00 00 |c Archit|ecture..|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 01 67 10 00 | 00 08 e7 a9 e1 bc e7 a9 |.....g..|........|
|00000060| e4 90 6c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..l.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 90 e5 00 00 |........|........|
|00000080| 20 4d 61 63 69 6e 74 6f | 73 68 20 4d 75 73 69 63 | Macinto|sh Music|
|00000090| 20 41 72 63 68 69 74 65 | 63 74 75 72 65 0d 49 6e | Archite|cture.In|
|000000a0| 74 72 6f 64 75 63 74 69 | 6f 6e 0d d2 4d 75 73 69 |troducti|on..Musi|
|000000b0| 63 d3 20 68 65 72 65 20 | 72 65 66 65 72 73 20 74 |c. here |refers t|
|000000c0| 6f 20 61 6e 20 61 62 73 | 74 72 61 63 74 69 6f 6e |o an abs|traction|
|000000d0| 20 6f 66 20 63 65 72 74 | 61 69 6e 20 6b 69 6e 64 | of cert|ain kind|
|000000e0| 73 20 6f 66 20 73 6f 75 | 6e 64 73 2e 20 49 6e 20 |s of sou|nds. In |
|000000f0| 74 68 65 20 73 69 6d 70 | 6c 65 73 74 20 65 78 70 |the simp|lest exp|
|00000100| 6c 61 6e 61 74 69 6f 6e | 2c 20 6d 75 73 69 63 20 |lanation|, music |
|00000110| 69 73 20 61 6e 20 65 66 | 66 65 63 74 69 76 65 20 |is an ef|fective |
|00000120| 63 6f 6d 70 72 65 73 73 | 69 6f 6e 20 74 65 63 68 |compress|ion tech|
|00000130| 6e 69 71 75 65 20 66 6f | 72 20 63 65 72 74 61 69 |nique fo|r certai|
|00000140| 6e 20 6b 69 6e 64 73 20 | 6f 66 20 73 6f 75 6e 64 |n kinds |of sound|
|00000150| 20 74 72 61 63 6b 73 2e | 20 46 6f 72 20 65 78 61 | tracks.| For exa|
|00000160| 6d 70 6c 65 2c 20 61 20 | 51 75 69 63 6b 54 69 6d |mple, a |QuickTim|
|00000170| 65 20 6d 75 73 69 63 20 | 74 72 61 63 6b 20 6d 69 |e music |track mi|
|00000180| 67 68 74 20 73 74 6f 72 | 65 20 73 65 76 65 72 61 |ght stor|e severa|
|00000190| 6c 20 73 61 6d 70 6c 65 | 64 20 73 6f 75 6e 64 73 |l sample|d sounds|
|000001a0| 2c 20 61 6e 64 20 61 20 | 74 69 6d 65 2d 6f 72 64 |, and a |time-ord|
|000001b0| 65 72 65 64 20 70 6c 61 | 79 62 61 63 6b 20 6c 69 |ered pla|yback li|
|000001c0| 73 74 20 66 6f 72 20 74 | 68 65 73 65 20 73 6f 75 |st for t|hese sou|
|000001d0| 6e 64 73 2e 20 49 6e 20 | 74 68 69 73 20 63 61 73 |nds. In |this cas|
|000001e0| 65 2c 20 74 68 65 20 73 | 61 6d 65 20 6d 75 73 69 |e, the s|ame musi|
|000001f0| 63 61 6c 20 6f 75 74 70 | 75 74 20 69 73 20 70 72 |cal outp|ut is pr|
|00000200| 6f 64 75 63 65 64 20 65 | 76 65 72 79 20 74 69 6d |oduced e|very tim|
|00000210| 65 20 74 68 65 20 74 72 | 61 63 6b 20 69 73 20 70 |e the tr|ack is p|
|00000220| 6c 61 79 65 64 2e 20 48 | 6f 77 65 76 65 72 2c 20 |layed. H|owever, |
|00000230| 61 20 6d 75 73 69 63 20 | 74 72 61 63 6b 20 6d 69 |a music |track mi|
|00000240| 67 68 74 20 6e 6f 74 20 | 63 61 72 72 79 20 74 68 |ght not |carry th|
|00000250| 65 20 73 61 6d 70 6c 65 | 64 20 73 6f 75 6e 64 73 |e sample|d sounds|
|00000260| 20 77 69 74 68 20 69 74 | 3b 20 69 74 20 6d 69 67 | with it|; it mig|
|00000270| 68 74 20 6f 6e 6c 79 20 | 63 61 72 72 79 20 74 68 |ht only |carry th|
|00000280| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 64 65 |e name o|f the de|
|00000290| 73 69 72 65 64 20 73 6f | 75 6e 64 2c 20 73 75 63 |sired so|und, suc|
|000002a0| 68 20 61 73 20 d2 70 69 | 61 6e 6f 2e d3 20 54 68 |h as .pi|ano.. Th|
|000002b0| 65 20 6d 6f 76 69 65 20 | 77 6f 75 6c 64 20 74 68 |e movie |would th|
|000002c0| 65 6e 20 62 65 20 63 6f | 6e 73 69 64 65 72 65 64 |en be co|nsidered|
|000002d0| 20 74 6f 20 62 65 20 70 | 6c 61 79 69 6e 67 20 d2 | to be p|laying .|
|000002e0| 63 6f 72 72 65 63 74 6c | 79 d3 20 72 65 67 61 72 |correctl|y. regar|
|000002f0| 64 6c 65 73 73 20 6f 66 | 20 65 78 61 63 74 6c 79 |dless of| exactly|
|00000300| 20 77 68 69 63 68 20 70 | 69 61 6e 6f 2d 74 79 70 | which p|iano-typ|
|00000310| 65 2d 73 6f 75 6e 64 20 | 77 61 73 20 75 73 65 64 |e-sound |was used|
|00000320| 20 74 6f 20 72 65 70 72 | 6f 64 75 63 65 20 74 68 | to repr|oduce th|
|00000330| 65 20 6d 75 73 69 63 2c | 20 61 73 20 6c 6f 6e 67 |e music,| as long|
|00000340| 20 61 73 20 69 74 20 77 | 61 73 20 61 20 d2 70 69 | as it w|as a .pi|
|00000350| 61 6e 6f 2e d3 20 0d 41 | 6c 73 6f 2c 20 61 20 6d |ano.. .A|lso, a m|
|00000360| 75 73 69 63 20 74 72 61 | 63 6b 20 69 73 20 73 75 |usic tra|ck is su|
|00000370| 73 63 65 70 74 69 62 6c | 65 20 74 6f 20 74 79 70 |sceptibl|e to typ|
|00000380| 65 73 20 6f 66 20 65 64 | 69 74 69 6e 67 20 74 68 |es of ed|iting th|
|00000390| 61 74 20 61 20 73 6f 75 | 6e 64 20 74 72 61 63 6b |at a sou|nd track|
|000003a0| 20 69 73 20 6e 6f 74 2c | 20 73 75 63 68 20 61 73 | is not,| such as|
|000003b0| 20 61 6c 74 65 72 69 6e | 67 20 74 65 6d 70 6f 20 | alterin|g tempo |
|000003c0| 77 69 74 68 6f 75 74 20 | 61 6c 74 65 72 69 6e 67 |without |altering|
|000003d0| 20 70 69 74 63 68 2c 20 | 61 6c 74 65 72 69 6e 67 | pitch, |altering|
|000003e0| 20 70 69 74 63 68 20 77 | 69 74 68 6f 75 74 20 61 | pitch w|ithout a|
|000003f0| 6c 74 65 72 69 6e 67 20 | 74 65 6d 70 6f 2c 20 61 |ltering |tempo, a|
|00000400| 6e 64 20 6f 74 68 65 72 | 20 63 68 61 6e 67 65 73 |nd other| changes|
|00000410| 20 61 74 20 61 20 68 69 | 67 68 65 72 20 6c 65 76 | at a hi|gher lev|
|00000420| 65 6c 20 74 68 61 6e 20 | 74 68 65 20 73 61 6d 70 |el than |the samp|
|00000430| 6c 65 64 20 77 61 76 65 | 20 66 6f 72 6d 2e 20 54 |led wave| form. T|
|00000440| 68 65 20 69 6e 73 74 72 | 75 6d 65 6e 74 73 20 73 |he instr|uments s|
|00000450| 70 65 63 69 66 69 65 64 | 20 74 6f 20 70 6c 61 79 |pecified| to play|
|00000460| 20 70 61 72 74 69 63 75 | 6c 61 72 20 70 61 72 74 | particu|lar part|
|00000470| 73 20 6f 66 20 74 68 65 | 20 73 63 6f 72 65 20 6d |s of the| score m|
|00000480| 69 67 68 74 20 62 65 20 | 72 65 61 73 73 69 67 6e |ight be |reassign|
|00000490| 65 64 2e 0d 54 68 65 20 | 4d 61 63 69 6e 74 6f 73 |ed..The |Macintos|
|000004a0| 68 20 4d 75 73 69 63 20 | 41 72 63 68 69 74 65 63 |h Music |Architec|
|000004b0| 74 75 72 65 20 63 6f 6e | 73 69 73 74 73 20 6f 66 |ture con|sists of|
|000004c0| 20 74 68 72 65 65 20 6d | 61 69 6e 20 70 69 65 63 | three m|ain piec|
|000004d0| 65 73 3a 20 74 68 65 20 | 4e 6f 74 65 20 41 6c 6c |es: the |Note All|
|000004e0| 6f 63 61 74 6f 72 2c 20 | 74 68 65 20 54 75 6e 65 |ocator, |the Tune|
|000004f0| 20 50 6c 61 79 65 72 2c | 20 61 6e 64 20 76 61 72 | Player,| and var|
|00000500| 69 6f 75 73 20 6d 75 73 | 69 63 20 63 6f 6d 70 6f |ious mus|ic compo|
|00000510| 6e 65 6e 74 73 2e 20 4d | 75 73 69 63 20 63 6f 6d |nents. M|usic com|
|00000520| 70 6f 6e 65 6e 74 73 20 | 61 72 65 20 73 6f 75 6e |ponents |are soun|
|00000530| 64 2d 70 6c 61 79 69 6e | 67 20 64 65 76 69 63 65 |d-playin|g device|
|00000540| 73 20 61 6e 64 20 73 6f | 66 74 77 61 72 65 2e 20 |s and so|ftware. |
|00000550| 49 6e 69 74 69 61 6c 6c | 79 2c 20 51 75 69 63 6b |Initiall|y, Quick|
|00000560| 54 69 6d 65 20 32 2e 30 | 20 73 75 70 70 6f 72 74 |Time 2.0| support|
|00000570| 73 20 61 20 73 6f 66 74 | 77 61 72 65 2d 6f 6e 6c |s a soft|ware-onl|
|00000580| 79 20 6d 75 73 69 63 20 | 63 6f 6d 70 6f 6e 65 6e |y music |componen|
|00000590| 74 2c 20 61 6e 64 20 61 | 20 47 65 6e 65 72 61 6c |t, and a| General|
|000005a0| 20 4d 49 44 49 20 6d 75 | 73 69 63 20 63 6f 6d 70 | MIDI mu|sic comp|
|000005b0| 6f 6e 65 6e 74 2e 0d 54 | 68 65 20 54 75 6e 65 20 |onent..T|he Tune |
|000005c0| 50 6c 61 79 65 72 20 77 | 69 6c 6c 20 70 6c 61 79 |Player w|ill play|
|000005d0| 20 61 20 74 69 6d 65 2d | 6f 72 64 65 72 65 64 20 | a time-|ordered |
|000005e0| 6c 69 73 74 20 6f 66 20 | 65 76 65 6e 74 73 20 69 |list of |events i|
|000005f0| 6e 74 6f 20 61 20 6d 75 | 73 69 63 20 63 6f 6d 70 |nto a mu|sic comp|
|00000600| 6f 6e 65 6e 74 2e 20 54 | 68 65 20 54 75 6e 65 20 |onent. T|he Tune |
|00000610| 50 6c 61 79 65 72 20 77 | 69 6c 6c 20 68 61 6e 64 |Player w|ill hand|
|00000620| 6c 65 20 61 6c 6c 20 61 | 73 70 65 63 74 73 20 6f |le all a|spects o|
|00000630| 66 20 74 69 6d 69 6e 67 | 2e 20 54 6f 20 64 65 74 |f timing|. To det|
|00000640| 65 72 6d 69 6e 65 20 77 | 68 69 63 68 20 6d 75 73 |ermine w|hich mus|
|00000650| 69 63 20 63 6f 6d 70 6f | 6e 65 6e 74 20 74 6f 20 |ic compo|nent to |
|00000660| 75 73 65 2c 20 69 74 20 | 77 69 6c 6c 20 6e 65 67 |use, it |will neg|
|00000670| 6f 74 69 61 74 65 20 77 | 69 74 68 20 74 68 65 20 |otiate w|ith the |
|00000680| 4e 6f 74 65 20 41 6c 6c | 6f 63 61 74 6f 72 2e 20 |Note All|ocator. |
|00000690| 0d 54 68 65 20 4e 6f 74 | 65 20 41 6c 6c 6f 63 61 |.The Not|e Alloca|
|000006a0| 74 6f 72 20 6d 61 69 6e | 74 61 69 6e 73 20 61 20 |tor main|tains a |
|000006b0| 64 61 74 61 62 61 73 65 | 20 6f 66 20 77 68 61 74 |database| of what|
|000006c0| 20 6d 75 73 69 63 20 63 | 6f 6d 70 6f 6e 65 6e 74 | music c|omponent|
|000006d0| 73 20 61 72 65 20 70 72 | 65 73 65 6e 74 6c 79 20 |s are pr|esently |
|000006e0| 61 74 74 61 63 68 65 64 | 20 74 6f 20 74 68 65 20 |attached| to the |
|000006f0| 4d 61 63 69 6e 74 6f 73 | 68 2e 20 54 68 69 73 20 |Macintos|h. This |
|00000700| 64 61 74 61 62 61 73 65 | 20 69 73 20 6d 61 69 6e |database| is main|
|00000710| 74 61 69 6e 65 64 20 62 | 79 20 74 68 65 20 75 73 |tained b|y the us|
|00000720| 65 72 20 76 69 61 20 61 | 20 63 6f 6e 66 69 67 75 |er via a| configu|
|00000730| 72 61 74 69 6f 6e 20 75 | 74 69 6c 69 74 79 20 28 |ration u|tility (|
|00000740| 75 6e 66 6f 72 74 75 6e | 61 74 65 6c 79 2c 20 4d |unfortun|ately, M|
|00000750| 49 44 49 20 2d 2d 20 74 | 68 65 20 73 74 61 6e 64 |IDI -- t|he stand|
|00000760| 61 72 64 20 63 6f 6d 6d | 75 6e 69 63 61 74 69 6f |ard comm|unicatio|
|00000770| 6e 20 70 72 6f 74 6f 63 | 6f 6c 20 66 6f 72 20 6d |n protoc|ol for m|
|00000780| 75 73 69 63 61 6c 20 73 | 79 6e 74 68 65 73 69 7a |usical s|ynthesiz|
|00000790| 65 72 73 20 2d 2d 20 64 | 6f 65 73 20 6e 6f 74 20 |ers -- d|oes not |
|000007a0| 73 75 70 70 6f 72 74 20 | 73 65 6c 66 2d 63 6f 6e |support |self-con|
|000007b0| 66 69 67 75 72 61 74 69 | 6f 6e 29 2e 20 4d 6f 73 |figurati|on). Mos|
|000007c0| 74 20 75 73 65 72 73 20 | 77 69 6c 6c 20 6e 6f 74 |t users |will not|
|000007d0| 20 68 61 76 65 20 74 6f | 20 75 73 65 20 74 68 69 | have to| use thi|
|000007e0| 73 20 75 74 69 6c 69 74 | 79 2c 20 73 69 6e 63 65 |s utilit|y, since|
|000007f0| 20 74 68 65 79 20 77 69 | 6c 6c 20 68 61 76 65 20 | they wi|ll have |
|00000800| 6e 6f 20 65 78 74 65 72 | 6e 61 6c 20 6d 75 73 69 |no exter|nal musi|
|00000810| 63 20 63 6f 6d 70 6f 6e | 65 6e 74 73 2c 20 61 6e |c compon|ents, an|
|00000820| 64 20 77 69 6c 6c 20 62 | 65 20 75 73 69 6e 67 20 |d will b|e using |
|00000830| 74 68 65 20 73 6f 66 74 | 77 61 72 65 2d 6f 6e 6c |the soft|ware-onl|
|00000840| 79 20 63 6f 6d 70 6f 6e | 65 6e 74 2e 20 4d 6f 73 |y compon|ent. Mos|
|00000850| 74 20 6f 66 20 74 68 6f | 73 65 20 75 73 65 72 73 |t of tho|se users|
|00000860| 20 77 68 6f 20 64 6f 20 | 68 61 76 65 20 64 65 76 | who do |have dev|
|00000870| 69 63 65 73 20 77 69 6c | 6c 20 6e 65 65 64 20 6f |ices wil|l need o|
|00000880| 6e 6c 79 20 63 6c 69 63 | 6b 20 6f 6e 20 74 68 65 |nly clic|k on the|
|00000890| 20 d2 47 65 6e 65 72 61 | 6c 20 4d 49 44 49 20 53 | .Genera|l MIDI S|
|000008a0| 79 6e 74 68 65 73 69 7a | 65 72 20 69 6e 20 4d 6f |ynthesiz|er in Mo|
|000008b0| 64 65 6d 20 50 6f 72 74 | d3 20 6f 72 20 d2 47 65 |dem Port|. or .Ge|
|000008c0| 6e 65 72 61 6c 20 4d 49 | 44 49 20 53 79 6e 74 68 |neral MI|DI Synth|
|000008d0| 65 73 69 7a 65 72 20 69 | 6e 20 50 72 69 6e 74 65 |esizer i|n Printe|
|000008e0| 72 20 50 6f 72 74 d3 20 | 62 75 74 74 6f 6e 73 2e |r Port. |buttons.|
|000008f0| 20 54 6f 20 73 75 70 70 | 6f 72 74 20 6d 6f 72 65 | To supp|ort more|
|00000900| 20 63 6f 6d 70 6c 65 78 | 20 65 71 75 69 70 6d 65 | complex| equipme|
|00000910| 6e 74 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |nt confi|guration|
|00000920| 73 2c 20 74 68 69 73 20 | 75 74 69 6c 69 74 79 20 |s, this |utility |
|00000930| 77 69 6c 6c 20 68 61 76 | 65 20 74 6f 20 62 65 20 |will hav|e to be |
|00000940| 6d 6f 72 65 20 63 6f 6d | 70 6c 65 78 2c 20 6f 66 |more com|plex, of|
|00000950| 20 63 6f 75 72 73 65 2e | 0d 54 68 65 20 49 6c 6c | course.|.The Ill|
|00000960| 75 73 74 72 61 74 69 6f | 6e 0d 41 73 20 63 61 6e |ustratio|n.As can|
|00000970| 20 62 65 20 73 65 65 6e | 20 66 72 6f 6d 20 74 68 | be seen| from th|
|00000980| 65 20 61 62 6f 76 65 20 | 64 69 61 67 72 61 6d 2c |e above |diagram,|
|00000990| 20 61 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 | an appl|ication |
|000009a0| 70 72 6f 67 72 61 6d 20 | 63 61 6e 20 70 6c 61 79 |program |can play|
|000009b0| 20 6d 75 73 69 63 20 74 | 68 61 74 20 69 73 20 65 | music t|hat is e|
|000009c0| 6d 62 65 64 64 65 64 20 | 69 6e 20 61 20 51 75 69 |mbedded |in a Qui|
|000009d0| 63 6b 54 69 6d 65 20 6d | 6f 76 69 65 2c 20 75 73 |ckTime m|ovie, us|
|000009e0| 69 6e 67 20 74 68 65 20 | 75 73 75 61 6c 20 6d 65 |ing the |usual me|
|000009f0| 74 68 6f 64 73 20 66 6f | 72 20 70 6c 61 79 69 6e |thods fo|r playin|
|00000a00| 67 20 4d 6f 76 69 65 73 | 2e 20 41 6e 20 61 70 70 |g Movies|. An app|
|00000a10| 6c 69 63 61 74 69 6f 6e | 20 6d 61 79 20 61 6c 73 |lication| may als|
|00000a20| 6f 20 63 68 6f 6f 73 65 | 20 74 6f 20 73 65 6e 64 |o choose| to send|
|00000a30| 20 73 65 71 75 65 6e 63 | 65 64 20 74 75 6e 65 20 | sequenc|ed tune |
|00000a40| 64 61 74 61 20 64 69 72 | 65 63 74 6c 79 20 74 6f |data dir|ectly to|
|00000a50| 20 74 68 65 20 54 75 6e | 65 20 50 6c 61 79 65 72 | the Tun|e Player|
|00000a60| 20 63 6f 6d 70 6f 6e 65 | 6e 74 3b 20 64 6f 69 6e | compone|nt; doin|
|00000a70| 67 20 74 68 69 73 20 69 | 73 20 73 69 6d 69 6c 61 |g this i|s simila|
|00000a80| 72 20 74 6f 20 75 73 69 | 6e 67 20 74 68 65 20 4d |r to usi|ng the M|
|00000a90| 61 6e 61 67 65 72 2c 20 | 77 68 65 72 65 20 63 68 |anager, |where ch|
|00000aa0| 75 6e 6b 73 20 6f 66 20 | 64 61 74 61 20 6d 75 73 |unks of |data mus|
|00000ab0| 74 20 62 65 20 22 73 68 | 6f 76 65 6c 65 64 20 69 |t be "sh|oveled i|
|00000ac0| 6e 22 20 74 6f 20 74 68 | 65 20 63 6f 6d 70 6f 6e |n" to th|e compon|
|00000ad0| 65 6e 74 20 70 65 72 69 | 6f 64 69 63 61 6c 6c 79 |ent peri|odically|
|00000ae0| 2e 20 4f 72 2c 20 61 6e | 20 61 70 70 6c 69 63 61 |. Or, an| applica|
|00000af0| 74 69 6f 6e 20 6d 79 20 | 73 65 6e 64 20 69 6e 64 |tion my |send ind|
|00000b00| 69 76 69 64 75 61 6c 20 | 6e 6f 74 65 2d 6f 6e 20 |ividual |note-on |
|00000b10| 61 6e 64 20 6e 6f 74 65 | 2d 6f 66 66 20 65 76 65 |and note|-off eve|
|00000b20| 6e 74 73 20 74 6f 20 74 | 68 65 20 4e 6f 74 65 20 |nts to t|he Note |
|00000b30| 41 6c 6c 6f 63 61 74 6f | 72 2c 20 68 61 6e 64 6c |Allocato|r, handl|
|00000b40| 69 6e 67 20 74 68 65 20 | 74 69 6d 69 6e 67 20 66 |ing the |timing f|
|00000b50| 75 6e 63 74 69 6f 6e 73 | 20 77 69 74 68 69 6e 20 |unctions| within |
|00000b60| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2e |the appl|ication.|
|00000b70| 20 57 68 69 6c 65 20 61 | 6e 20 61 70 70 6c 69 63 | While a|n applic|
|00000b80| 61 74 69 6f 6e 20 63 61 | 6e 20 73 65 6e 64 20 63 |ation ca|n send c|
|00000b90| 6f 6d 6d 61 6e 64 73 20 | 64 69 72 65 63 74 6c 79 |ommands |directly|
|00000ba0| 20 74 6f 20 61 20 4d 75 | 73 69 63 20 43 6f 6d 70 | to a Mu|sic Comp|
|00000bb0| 6f 6e 65 6e 74 2c 20 74 | 68 69 73 20 69 73 20 6e |onent, t|his is n|
|00000bc0| 6f 74 20 72 65 63 6f 6d | 6d 65 6e 64 65 64 2c 20 |ot recom|mended, |
|00000bd0| 73 69 6e 63 65 20 61 75 | 74 6f 6d 61 74 69 63 20 |since au|tomatic |
|00000be0| 69 6e 73 74 72 75 6d 65 | 6e 74 20 73 75 62 73 74 |instrume|nt subst|
|00000bf0| 69 74 75 74 69 6f 6e 20 | 77 69 6c 6c 20 6e 6f 74 |itution |will not|
|00000c00| 20 68 61 70 70 65 6e 2e | 20 28 43 61 6c 6c 69 6e | happen.| (Callin|
|00000c10| 67 20 4d 75 73 69 63 20 | 43 6f 6d 70 6f 6e 65 6e |g Music |Componen|
|00000c20| 74 73 20 64 69 72 65 63 | 74 6c 79 20 69 73 20 61 |ts direc|tly is a|
|00000c30| 20 6c 6f 74 20 6c 69 6b | 65 20 64 72 61 77 69 6e | lot lik|e drawin|
|00000c40| 67 20 64 69 72 65 63 74 | 6c 79 20 74 6f 20 74 68 |g direct|ly to th|
|00000c50| 65 20 76 69 64 65 6f 20 | 73 63 72 65 65 6e 3a 20 |e video |screen: |
|00000c60| 70 72 6f 6e 65 20 74 6f | 20 69 6e 63 6f 6d 70 61 |prone to| incompa|
|00000c70| 74 69 62 69 6c 69 74 69 | 65 73 20 61 6e 64 20 72 |tibiliti|es and r|
|00000c80| 61 72 65 6c 79 20 6e 65 | 63 65 73 73 61 72 79 2e |arely ne|cessary.|
|00000c90| 29 20 0d 4d 75 73 69 63 | 20 43 6f 6d 70 6f 6e 65 |) .Music| Compone|
|00000ca0| 6e 74 20 4d 6f 64 65 6c | 20 61 6e 64 20 41 50 49 |nt Model| and API|
|00000cb0| 0d 41 20 6d 75 73 69 63 | 20 63 6f 6d 70 6f 6e 65 |.A music| compone|
|00000cc0| 6e 74 20 69 73 20 61 20 | 73 6f 66 74 77 61 72 65 |nt is a |software|
|00000cd0| 20 6f 72 20 64 65 76 69 | 63 65 2d 64 72 69 76 65 | or devi|ce-drive|
|00000ce0| 72 20 77 69 74 68 20 61 | 20 73 74 61 6e 64 61 72 |r with a| standar|
|00000cf0| 64 20 69 6e 74 65 72 66 | 61 63 65 20 74 68 61 74 |d interf|ace that|
|00000d00| 20 70 72 6f 64 75 63 65 | 73 20 6d 75 73 69 63 61 | produce|s musica|
|00000d10| 6c 20 6e 6f 74 65 73 2e | 20 54 68 65 20 63 6f 6d |l notes.| The com|
|00000d20| 70 6f 6e 65 6e 74 20 69 | 73 20 63 68 61 72 61 63 |ponent i|s charac|
|00000d30| 74 65 72 69 7a 65 64 20 | 62 79 20 74 77 6f 20 76 |terized |by two v|
|00000d40| 61 6c 75 65 73 3a 20 74 | 68 65 20 6d 61 78 69 6d |alues: t|he maxim|
|00000d50| 75 6d 20 70 6f 6c 79 70 | 68 6f 6e 79 2c 20 61 6e |um polyp|hony, an|
|00000d60| 64 20 74 68 65 20 6d 61 | 78 69 6d 75 6d 20 6e 75 |d the ma|ximum nu|
|00000d70| 6d 62 65 72 20 6f 66 20 | 64 69 66 66 65 72 65 6e |mber of |differen|
|00000d80| 74 20 20 74 69 6d 62 72 | 65 73 20 77 68 69 63 68 |t timbr|es which|
|00000d90| 20 63 61 6e 20 62 65 20 | 70 72 6f 64 75 63 65 64 | can be |produced|
|00000da0| 2e 20 55 6e 6c 69 6b 65 | 20 20 4d 49 44 49 20 64 |. Unlike| MIDI d|
|00000db0| 65 76 69 63 65 73 2c 20 | 61 20 6d 75 73 69 63 20 |evices, |a music |
|00000dc0| 63 6f 6d 70 6f 6e 65 6e | 74 20 69 73 20 6e 6f 74 |componen|t is not|
|00000dd0| 20 63 6f 6e 73 74 72 61 | 69 6e 65 64 20 74 6f 20 | constra|ined to |
|00000de0| 61 20 6d 75 6c 74 69 74 | 69 6d 62 72 61 6c 69 74 |a multit|imbralit|
|00000df0| 79 20 6f 66 20 31 36 2e | 20 54 68 65 72 65 20 69 |y of 16.| There i|
|00000e00| 73 20 6e 6f 20 41 50 49 | 20 6c 69 6d 69 74 20 74 |s no API| limit t|
|00000e10| 6f 20 74 68 65 20 6d 61 | 78 69 6d 75 6d 20 70 6f |o the ma|ximum po|
|00000e20| 6c 79 70 68 6f 6e 79 2e | 0d 49 6e 20 67 65 6e 65 |lyphony.|.In gene|
|00000e30| 72 61 6c 2c 20 69 6e 64 | 65 78 65 64 20 69 74 65 |ral, ind|exed ite|
|00000e40| 6d 73 20 61 72 65 20 72 | 65 66 65 72 72 65 64 20 |ms are r|eferred |
|00000e50| 74 6f 20 62 79 20 61 20 | 6e 75 6d 62 65 72 20 31 |to by a |number 1|
|00000e60| 20 74 6f 20 6e 2c 20 73 | 75 63 68 20 61 73 20 63 | to n, s|uch as c|
|00000e70| 68 61 6e 6e 65 6c 20 6e | 75 6d 62 65 72 73 20 61 |hannel n|umbers a|
|00000e80| 6e 64 20 69 6e 73 74 72 | 75 6d 65 6e 74 20 6e 75 |nd instr|ument nu|
|00000e90| 6d 62 65 72 73 2e 0d 41 | 6e 20 61 70 70 6c 69 63 |mbers..A|n applic|
|00000ea0| 61 74 69 6f 6e 20 77 69 | 6c 6c 20 6e 6f 74 20 75 |ation wi|ll not u|
|00000eb0| 73 75 61 6c 6c 79 20 63 | 61 6c 6c 20 6d 75 73 69 |sually c|all musi|
|00000ec0| 63 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 64 69 72 |c compon|ents dir|
|00000ed0| 65 63 74 6c 79 2c 20 69 | 74 20 77 69 6c 6c 20 61 |ectly, i|t will a|
|00000ee0| 63 63 65 73 73 20 74 68 | 65 6d 20 74 68 72 6f 75 |ccess th|em throu|
|00000ef0| 67 68 20 74 68 65 20 4e | 6f 74 65 20 41 6c 6c 6f |gh the N|ote Allo|
|00000f00| 63 61 74 6f 72 20 6f 72 | 20 54 75 6e 65 20 50 6c |cator or| Tune Pl|
|00000f10| 61 79 65 72 2e 20 41 20 | 64 65 76 65 6c 6f 70 65 |ayer. A |develope|
|00000f20| 72 20 6d 61 79 20 77 69 | 73 68 20 74 6f 20 77 72 |r may wi|sh to wr|
|00000f30| 69 74 65 20 61 20 6d 75 | 73 69 63 20 63 6f 6d 70 |ite a mu|sic comp|
|00000f40| 6f 6e 65 6e 74 20 74 6f | 20 73 75 70 70 6f 72 74 |onent to| support|
|00000f50| 20 61 20 70 61 72 74 69 | 63 75 6c 61 72 20 6e 6f | a parti|cular no|
|00000f60| 74 65 2d 70 6c 61 79 69 | 6e 67 20 68 61 72 64 77 |te-playi|ng hardw|
|00000f70| 61 72 65 20 64 65 76 69 | 63 65 20 6f 72 20 73 6f |are devi|ce or so|
|00000f80| 66 74 77 61 72 65 20 61 | 6c 67 6f 72 69 74 68 6d |ftware a|lgorithm|
|00000f90| 2e 0d 54 68 65 20 62 61 | 73 69 63 20 6d 6f 64 65 |..The ba|sic mode|
|00000fa0| 6c 20 66 6f 72 20 61 20 | 73 79 6e 74 68 65 73 69 |l for a |synthesi|
|00000fb0| 7a 65 72 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 20 |zer cons|ists of |
|00000fc0| 73 6f 6d 65 20 6e 75 6d | 62 65 72 20 6f 66 20 69 |some num|ber of i|
|00000fd0| 6e 73 74 72 75 6d 65 6e | 74 73 2c 20 73 6f 6d 65 |nstrumen|ts, some|
|00000fe0| 20 6f 66 20 77 68 69 63 | 68 20 61 72 65 20 75 73 | of whic|h are us|
|00000ff0| 65 72 2d 6d 6f 64 69 66 | 69 61 62 6c 65 2c 20 61 |er-modif|iable, a|
|00001000| 6e 64 20 73 6f 6d 65 20 | 6f 66 20 77 68 69 63 68 |nd some |of which|
|00001010| 20 61 72 65 20 62 75 69 | 6c 74 2d 69 6e 20 28 52 | are bui|lt-in (R|
|00001020| 4f 4d 6d 65 64 29 2c 20 | 73 6f 6d 65 20 6e 75 6d |OMmed), |some num|
|00001030| 62 65 72 20 6f 66 20 76 | 6f 69 63 65 73 2c 20 6f |ber of v|oices, o|
|00001040| 72 20 6f 73 63 69 6c 6c | 61 74 6f 72 73 2c 20 61 |r oscill|ators, a|
|00001050| 6e 64 20 73 6f 6d 65 20 | 6e 75 6d 62 65 72 20 6f |nd some |number o|
|00001060| 66 20 63 68 61 6e 6e 65 | 6c 73 20 75 70 6f 6e 20 |f channe|ls upon |
|00001070| 77 68 69 63 68 20 74 6f | 20 70 6c 61 79 20 74 68 |which to| play th|
|00001080| 6f 73 65 20 76 6f 69 63 | 65 73 2e 0d 54 6f 20 70 |ose voic|es..To p|
|00001090| 6c 61 79 20 61 20 70 61 | 72 74 69 63 75 6c 61 72 |lay a pa|rticular|
|000010a0| 20 69 6e 73 74 72 75 6d | 65 6e 74 20 6f 6e 20 61 | instrum|ent on a|
|000010b0| 20 70 61 72 74 69 63 75 | 6c 61 72 20 63 68 61 6e | particu|lar chan|
|000010c0| 6e 65 6c 2c 20 74 68 65 | 20 69 6e 73 74 72 75 6d |nel, the| instrum|
|000010d0| 65 6e 74 20 6d 75 73 74 | 20 62 65 20 d2 72 65 63 |ent must| be .rec|
|000010e0| 61 6c 6c 65 64 d3 20 74 | 6f 20 74 68 61 74 20 63 |alled. t|o that c|
|000010f0| 68 61 6e 6e 65 6c 20 28 | 66 72 6f 6d 20 74 68 65 |hannel (|from the|
|00001100| 20 73 79 6e 74 68 65 73 | 69 7a 65 72 73 20 69 6e | synthes|izers in|
|00001110| 73 74 72 75 6d 65 6e 74 | 20 73 74 6f 72 65 29 2e |strument| store).|
|00001120| 20 54 6f 20 73 61 76 65 | 20 61 6e 20 69 6e 73 74 | To save| an inst|
|00001130| 72 75 6d 65 6e 74 20 74 | 68 61 74 20 68 61 73 20 |rument t|hat has |
|00001140| 62 65 65 6e 20 6d 6f 64 | 69 66 69 65 64 2c 20 69 |been mod|ified, i|
|00001150| 74 20 6d 75 73 74 20 62 | 65 20 d2 73 74 6f 72 65 |t must b|e .store|
|00001160| 64 d3 20 69 6e 74 6f 20 | 6f 6e 65 20 6f 66 20 74 |d. into |one of t|
|00001170| 68 65 20 73 79 6e 74 68 | 65 73 69 7a 65 72 d5 73 |he synth|esizer.s|
|00001180| 20 75 73 65 72 2d 6d 6f | 64 69 66 69 61 62 6c 65 | user-mo|difiable|
|00001190| 20 69 6e 73 74 72 75 6d | 65 6e 74 20 6c 6f 63 61 | instrum|ent loca|
|000011a0| 74 69 6f 6e 73 2e 0d 4d | 6f 64 69 66 69 63 61 74 |tions..M|odificat|
|000011b0| 69 6f 6e 73 20 74 6f 20 | 61 6e 20 69 6e 73 74 72 |ions to |an instr|
|000011c0| 75 6d 65 6e 74 20 61 72 | 65 20 70 65 72 66 6f 72 |ument ar|e perfor|
|000011d0| 6d 65 64 20 62 79 20 63 | 68 61 6e 67 69 6e 67 20 |med by c|hanging |
|000011e0| 74 68 65 20 76 61 6c 75 | 65 73 20 6f 66 20 73 6f |the valu|es of so|
|000011f0| 6d 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 6b 6e 6f |me numbe|r of kno|
|00001200| 62 73 2e 20 41 6e 20 69 | 6e 73 74 72 75 6d 65 6e |bs. An i|nstrumen|
|00001210| 74 20 63 61 6e 20 62 65 | 20 72 65 71 75 65 73 74 |t can be| request|
|00001220| 65 64 20 66 72 6f 6d 20 | 74 68 65 20 73 79 6e 74 |ed from |the synt|
|00001230| 68 65 73 69 7a 65 72 20 | 28 61 73 73 75 6d 69 6e |hesizer |(assumin|
|00001240| 67 20 61 20 63 6f 6d 6d | 75 6e 69 63 61 74 69 6f |g a comm|unicatio|
|00001250| 6e 20 70 61 74 68 20 65 | 78 69 73 74 73 20 74 6f |n path e|xists to|
|00001260| 20 72 65 63 65 69 76 65 | 20 69 74 20 74 68 72 6f | receive| it thro|
|00001270| 75 67 68 3b 20 66 6f 72 | 20 61 20 4d 49 44 49 20 |ugh; for| a MIDI |
|00001280| 64 65 76 69 63 65 2c 20 | 74 68 69 73 20 6d 65 61 |device, |this mea|
|00001290| 6e 73 20 74 68 65 20 4d | 49 44 49 20 6f 75 74 20 |ns the M|IDI out |
|000012a0| 6d 75 73 74 20 62 65 20 | 73 65 6e 74 20 74 6f 20 |must be |sent to |
|000012b0| 74 68 65 20 4d 61 63 69 | 6e 74 6f 73 68 29 2e 20 |the Maci|ntosh). |
|000012c0| 49 6e 73 74 72 75 6d 65 | 6e 74 20 6b 6e 6f 62 73 |Instrume|nt knobs|
|000012d0| 20 6d 61 79 20 62 65 20 | 61 64 6a 75 73 74 65 64 | may be |adjusted|
|000012e0| 20 6f 6e 20 65 69 74 68 | 65 72 20 61 20 63 68 61 | on eith|er a cha|
|000012f0| 6e 6e 65 6c 20 6f 66 20 | 74 68 65 20 73 79 6e 74 |nnel of |the synt|
|00001300| 68 65 73 69 7a 65 72 2c | 20 6f 72 20 64 69 72 65 |hesizer,| or dire|
|00001310| 63 74 6c 79 20 6f 6e 20 | 61 6e 20 69 6e 73 74 72 |ctly on |an instr|
|00001320| 75 6d 65 6e 74 20 64 61 | 74 61 20 68 61 6e 64 6c |ument da|ta handl|
|00001330| 65 2e 0d 54 68 65 72 65 | 20 69 73 20 61 6e 6f 74 |e..There| is anot|
|00001340| 68 65 72 20 73 65 74 20 | 6f 66 20 6b 6e 6f 62 73 |her set |of knobs|
|00001350| 20 74 68 61 74 20 61 70 | 70 6c 79 20 74 6f 20 74 | that ap|ply to t|
|00001360| 68 65 20 65 6e 74 69 72 | 65 20 73 79 6e 74 68 65 |he entir|e synthe|
|00001370| 73 69 7a 65 72 2c 20 61 | 6e 64 20 6e 6f 74 20 61 |sizer, a|nd not a|
|00001380| 20 70 61 72 74 69 63 75 | 6c 61 72 20 63 68 61 6e | particu|lar chan|
|00001390| 6e 65 6c 20 6f 72 20 69 | 6e 73 74 72 75 6d 65 6e |nel or i|nstrumen|
|000013a0| 74 2e 20 54 68 65 73 65 | 20 6b 6e 6f 62 73 20 61 |t. These| knobs a|
|000013b0| 72 65 20 74 79 70 69 63 | 61 6c 6c 79 20 74 68 69 |re typic|ally thi|
|000013c0| 6e 67 73 20 6c 69 6b 65 | 20 61 75 64 69 6f 20 65 |ngs like| audio e|
|000013d0| 66 66 65 63 74 73 20 28 | 73 75 63 68 20 61 73 20 |ffects (|such as |
|000013e0| 72 65 76 65 72 62 29 20 | 74 68 61 74 20 6d 61 79 |reverb) |that may|
|000013f0| 20 62 65 20 62 75 69 6c | 74 20 69 6e 74 6f 20 61 | be buil|t into a|
|00001400| 20 64 65 76 69 63 65 2e | 0d 54 68 65 20 63 61 6c | device.|.The cal|
|00001410| 6c 20 73 65 74 20 69 73 | 20 61 73 20 66 6f 6c 6c |l set is| as foll|
|00001420| 6f 77 73 2e 0d 70 61 73 | 63 61 6c 20 20 43 6f 6d |ows..pas|cal Com|
|00001430| 70 6f 6e 65 6e 74 52 65 | 73 75 6c 74 20 4d 75 73 |ponentRe|sult Mus|
|00001440| 69 63 47 65 74 44 65 73 | 63 72 69 70 74 69 6f 6e |icGetDes|cription|
|00001450| 28 4d 75 73 69 63 43 6f | 6d 70 6f 6e 65 6e 74 20 |(MusicCo|mponent |
|00001460| 6d 63 2c 20 53 79 6e 74 | 68 65 73 69 7a 65 72 44 |mc, Synt|hesizerD|
|00001470| 65 73 63 72 69 70 74 69 | 6f 6e 20 2a 73 64 29 3b |escripti|on *sd);|
|00001480| 0d 46 69 6e 64 20 6f 75 | 74 20 74 68 69 6e 67 73 |.Find ou|t things|
|00001490| 20 61 62 6f 75 74 20 74 | 68 65 20 64 65 76 69 63 | about t|he devic|
|000014a0| 65 2e 20 54 68 65 20 53 | 79 6e 74 68 65 73 69 7a |e. The S|ynthesiz|
|000014b0| 65 72 44 65 73 63 72 69 | 70 74 69 6f 6e 20 72 65 |erDescri|ption re|
|000014c0| 63 6f 72 64 20 69 73 20 | 66 69 6c 6c 65 64 20 6f |cord is |filled o|
|000014d0| 75 74 20 62 79 20 74 68 | 65 20 63 6f 6d 70 6f 6e |ut by th|e compon|
|000014e0| 65 6e 74 2e 0d 74 79 70 | 65 64 65 66 20 73 74 72 |ent..typ|edef str|
|000014f0| 75 63 74 0d 09 7b 0d 09 | 4f 53 54 79 70 65 20 74 |uct..{..|OSType t|
|00001500| 79 70 65 3b 09 2f 2a 20 | 73 79 6e 74 68 65 73 69 |ype;./* |synthesi|
|00001510| 7a 65 72 20 74 79 70 65 | 20 28 75 73 65 20 73 61 |zer type| (use sa|
|00001520| 6d 65 20 61 73 20 63 6f | 6d 70 2e 20 73 75 62 74 |me as co|mp. subt|
|00001530| 79 70 65 20 2a 2f 0d 09 | 53 74 72 33 31 20 6e 61 |ype */..|Str31 na|
|00001540| 6d 65 3b 09 2f 2a 20 74 | 65 78 74 20 6e 61 6d 65 |me;./* t|ext name|
|00001550| 20 6f 66 20 73 79 6e 74 | 68 65 73 69 7a 65 72 20 | of synt|hesizer |
|00001560| 74 79 70 65 20 2a 2f 0d | 09 75 6e 73 69 67 6e 65 |type */.|.unsigne|
|00001570| 64 20 6c 6f 6e 67 20 66 | 6c 61 67 73 3b 09 2f 2a |d long f|lags;./*|
|00001580| 20 66 72 6f 6d 20 74 68 | 65 20 61 62 6f 76 65 20 | from th|e above |
|00001590| 65 6e 75 6d 20 2a 2f 0d | 09 75 6e 73 69 67 6e 65 |enum */.|.unsigne|
|000015a0| 64 20 6c 6f 6e 67 20 76 | 6f 69 63 65 43 6f 75 6e |d long v|oiceCoun|
|000015b0| 74 3b 09 2f 2a 20 6d 61 | 78 69 6d 75 6d 20 70 6f |t;./* ma|ximum po|
|000015c0| 6c 79 70 68 6f 6e 79 20 | 2a 2f 0d 09 75 6e 73 69 |lyphony |*/..unsi|
|000015d0| 67 6e 65 64 20 6c 6f 6e | 67 20 70 61 72 74 43 6f |gned lon|g partCo|
|000015e0| 75 6e 74 3b 09 2f 2a 20 | 6d 61 78 69 6d 75 6d 20 |unt;./* |maximum |
|000015f0| 6d 75 6c 74 69 2d 74 69 | 6d 62 72 61 6c 69 74 79 |multi-ti|mbrality|
|00001600| 20 28 26 20 6d 69 64 69 | 20 63 68 61 6e 6e 65 6c | (& midi| channel|
|00001610| 73 29 20 2a 2f 0d 09 75 | 6e 73 69 67 6e 65 64 20 |s) */..u|nsigned |
|00001620| 6c 6f 6e 67 20 69 6e 73 | 74 72 75 6d 65 6e 74 43 |long ins|trumentC|
|00001630| 6f 75 6e 74 3b 09 2f 2a | 20 74 68 65 20 68 69 67 |ount;./*| the hig|
|00001640| 68 65 73 74 20 6e 75 6d | 62 65 72 20 66 6f 72 20 |hest num|ber for |
|00001650| 61 6e 20 69 6e 73 74 20 | 2a 2f 0d 09 75 6e 73 69 |an inst |*/..unsi|
|00001660| 67 6e 65 64 20 6c 6f 6e | 67 20 6d 6f 64 69 66 69 |gned lon|g modifi|
|00001670| 61 62 6c 65 49 6e 73 74 | 72 75 6d 65 6e 74 43 6f |ableInst|rumentCo|
|00001680| 75 6e 74 3b 09 2f 2a 20 | 74 68 65 20 6c 61 73 74 |unt;./* |the last|
|00001690| 20 6e 20 61 72 65 20 75 | 73 65 72 20 6d 6f 64 69 | n are u|ser modi|
|000016a0| 66 69 61 62 6c 65 20 2a | 2f 0d 09 75 6e 73 69 67 |fiable *|/..unsig|
|000016b0| 6e 65 64 20 6c 6f 6e 67 | 20 63 68 61 6e 6e 65 6c |ned long| channel|
|000016c0| 4d 61 73 6b 3b 09 2f 2a | 20 28 6d 69 64 69 20 64 |Mask;./*| (midi d|
|000016d0| 65 76 20 6f 6e 6c 79 29 | 20 77 68 69 63 68 20 63 |ev only)| which c|
|000016e0| 68 61 6e 6e 65 6c 73 20 | 64 65 76 69 63 65 20 61 |hannels |device a|
|000016f0| 6c 77 61 79 73 20 75 73 | 65 73 20 2a 2f 0d 09 75 |lways us|es */..u|
|00001700| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 64 72 75 |nsigned |long dru|
|00001710| 6d 50 61 72 74 43 6f 75 | 6e 74 3b 09 2f 2a 20 6d |mPartCou|nt;./* m|
|00001720| 61 78 69 6d 75 6d 20 6d | 75 6c 74 69 2d 74 69 6d |aximum m|ulti-tim|
|00001730| 62 72 61 6c 69 74 79 20 | 6f 66 20 64 72 75 6d 20 |brality |of drum |
|00001740| 70 61 72 74 73 20 2a 2f | 0d 09 75 6e 73 69 67 6e |parts */|..unsign|
|00001750| 65 64 20 6c 6f 6e 67 20 | 64 72 75 6d 43 6f 75 6e |ed long |drumCoun|
|00001760| 74 3b 09 2f 2a 20 68 69 | 67 68 65 73 74 20 6e 75 |t;./* hi|ghest nu|
|00001770| 6d 62 65 72 20 66 6f 72 | 20 61 20 64 72 75 6d 20 |mber for| a drum |
|00001780| 69 6e 73 74 72 75 6d 65 | 6e 74 20 2a 2f 0d 09 75 |instrume|nt */..u|
|00001790| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 6d 6f 64 |nsigned |long mod|
|000017a0| 69 66 69 61 62 6c 65 44 | 72 75 6d 43 6f 75 6e 74 |ifiableD|rumCount|
|000017b0| 3b 20 2f 2a 20 74 68 65 | 20 6c 61 73 74 20 6e 20 |; /* the| last n |
|000017c0| 61 72 65 20 75 73 65 72 | 20 6d 6f 64 69 66 69 61 |are user| modifia|
|000017d0| 62 6c 65 20 2a 2f 0d 09 | 75 6e 73 69 67 6e 65 64 |ble */..|unsigned|
|000017e0| 20 6c 6f 6e 67 20 64 72 | 75 6d 43 68 61 6e 6e 65 | long dr|umChanne|
|000017f0| 6c 4d 61 73 6b 3b 09 2f | 2a 20 28 6d 69 64 69 20 |lMask;./|* (midi |
|00001800| 6f 6e 6c 79 29 20 77 68 | 69 63 68 20 63 68 61 6e |only) wh|ich chan|
|00001810| 6e 65 6c 73 20 64 65 76 | 69 63 65 20 61 6c 77 61 |nels dev|ice alwa|
|00001820| 79 73 20 6f 6e 20 2a 2f | 0d 09 75 6e 73 69 67 6e |ys on */|..unsign|
|00001830| 65 64 20 6c 6f 6e 67 20 | 6f 75 74 70 75 74 43 6f |ed long |outputCo|
|00001840| 75 6e 74 3b 09 2f 2a 20 | 6e 75 6d 62 65 72 20 6f |unt;./* |number o|
|00001850| 66 20 61 75 64 69 6f 20 | 6f 75 74 70 75 74 73 20 |f audio |outputs |
|00001860| 28 75 73 75 61 6c 6c 79 | 20 74 77 6f 29 20 2a 2f |(usually| two) */|
|00001870| 0d 09 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |..unsign|ed long |
|00001880| 6c 61 74 65 6e 63 79 3b | 09 2f 2a 20 72 65 73 70 |latency;|./* resp|
|00001890| 6f 6e 73 65 20 74 69 6d | 65 20 69 6e 20 b5 53 65 |onse tim|e in .Se|
|000018a0| 63 20 2a 2f 0d 09 75 6e | 73 69 67 6e 65 64 20 6c |c */..un|signed l|
|000018b0| 6f 6e 67 20 63 6f 6e 74 | 72 6f 6c 6c 65 72 73 5b |ong cont|rollers[|
|000018c0| 38 5d 3b 09 2f 2a 20 61 | 72 72 61 79 20 6f 66 20 |8];./* a|rray of |
|000018d0| 32 35 36 20 62 69 74 73 | 20 2a 2f 0d 09 75 6e 73 |256 bits| */..uns|
|000018e0| 69 67 6e 65 64 20 6c 6f | 6e 67 20 67 6d 49 6e 73 |igned lo|ng gmIns|
|000018f0| 74 72 75 6d 65 6e 74 73 | 5b 34 5d 3b 09 2f 2a 20 |truments|[4];./* |
|00001900| 61 72 72 61 79 20 6f 66 | 20 31 32 38 20 62 69 74 |array of| 128 bit|
|00001910| 73 20 2a 2f 0d 09 75 6e | 73 69 67 6e 65 64 20 6c |s */..un|signed l|
|00001920| 6f 6e 67 20 67 6d 44 72 | 75 6d 73 5b 34 5d 3b 09 |ong gmDr|ums[4];.|
|00001930| 2f 2a 20 61 72 72 61 79 | 20 6f 66 20 31 32 38 20 |/* array| of 128 |
|00001940| 62 69 74 73 20 2a 2f 0d | 09 7d 20 53 79 6e 74 68 |bits */.|.} Synth|
|00001950| 65 73 69 7a 65 72 44 65 | 73 63 72 69 70 74 69 6f |esizerDe|scriptio|
|00001960| 6e 3b 0d 70 61 73 63 61 | 6c 20 43 6f 6d 70 6f 6e |n;.pasca|l Compon|
|00001970| 65 6e 74 52 65 73 75 6c | 74 20 4d 75 73 69 63 53 |entResul|t MusicS|
|00001980| 65 74 49 6e 73 74 72 75 | 6d 65 6e 74 4e 75 6d 62 |etInstru|mentNumb|
|00001990| 65 72 28 4d 75 73 69 63 | 43 6f 6d 70 6f 6e 65 6e |er(Music|Componen|
|000019a0| 74 20 6d 63 2c 20 6c 6f | 6e 67 20 70 61 72 74 2c |t mc, lo|ng part,|
|000019b0| 20 6c 6f 6e 67 20 69 6e | 73 74 72 75 6d 65 6e 74 | long in|strument|
|000019c0| 4e 75 6d 62 65 72 29 3b | 0d 41 73 73 69 67 6e 73 |Number);|.Assigns|
|000019d0| 20 61 20 70 61 72 74 69 | 63 75 6c 61 72 20 69 6e | a parti|cular in|
|000019e0| 73 74 72 75 6d 65 6e 74 | 20 74 6f 20 61 20 70 61 |strument| to a pa|
|000019f0| 72 74 69 63 75 6c 61 72 | 20 70 61 72 74 2e 20 54 |rticular| part. T|
|00001a00| 68 65 20 61 70 70 72 6f | 70 72 69 61 74 65 20 69 |he appro|priate i|
|00001a10| 6e 73 74 72 75 6d 65 6e | 74 20 6e 75 6d 62 65 72 |nstrumen|t number|
|00001a20| 20 6d 61 79 20 62 65 20 | 64 65 74 65 72 6d 69 6e | may be |determin|
|00001a30| 65 64 20 77 69 74 68 20 | 4d 75 73 69 63 46 69 6e |ed with |MusicFin|
|00001a40| 64 54 6f 6e 65 28 29 2e | 0d 70 61 73 63 61 6c 20 |dTone().|.pascal |
|00001a50| 43 6f 6d 70 6f 6e 65 6e | 74 52 65 73 75 6c 74 20 |Componen|tResult |
|00001a60| 4d 75 73 69 63 47 65 74 | 49 6e 73 74 72 75 6d 65 |MusicGet|Instrume|
|00001a70| 6e 74 4e 75 6d 62 65 72 | 28 4d 75 73 69 63 43 6f |ntNumber|(MusicCo|
|00001a80| 6d 70 6f 6e 65 6e 74 20 | 6d 63 2c 20 6c 6f 6e 67 |mponent |mc, long|
|00001a90| 20 70 61 72 74 29 3b 0d | 52 65 74 75 72 6e 73 20 | part);.|Returns |
|00001aa0| 74 68 65 20 69 6e 73 74 | 72 75 6d 65 6e 74 20 6e |the inst|rument n|
|00001ab0| 75 6d 62 65 72 20 63 75 | 72 72 65 6e 74 6c 79 20 |umber cu|rrently |
|00001ac0| 61 73 73 69 67 6e 65 64 | 20 74 6f 20 74 68 61 74 |assigned| to that|
|00001ad0| 20 70 61 72 74 2e 0d 70 | 61 73 63 61 6c 20 43 6f | part..p|ascal Co|
|00001ae0| 6d 70 6f 6e 65 6e 74 52 | 65 73 75 6c 74 20 4d 75 |mponentR|esult Mu|
|00001af0| 73 69 63 53 74 6f 72 65 | 49 6e 73 74 72 75 6d 65 |sicStore|Instrume|
|00001b00| 6e 74 28 4d 75 73 69 63 | 43 6f 6d 70 6f 6e 65 6e |nt(Music|Componen|
|00001b10| 74 20 6d 63 2c 6c 6f 6e | 67 20 70 61 72 74 2c 20 |t mc,lon|g part, |
|00001b20| 6c 6f 6e 67 20 69 6e 73 | 74 72 75 6d 65 6e 74 4e |long ins|trumentN|
|00001b30| 75 6d 62 65 72 29 3b 0d | 50 75 74 73 20 77 68 61 |umber);.|Puts wha|
|00001b40| 74 65 76 65 72 20 69 6e | 73 74 72 75 6d 65 6e 74 |tever in|strument|
|00001b50| 20 69 73 20 6f 6e 20 74 | 68 61 74 20 70 61 72 74 | is on t|hat part|
|00001b60| 20 69 6e 74 6f 20 74 68 | 65 20 73 79 6e 74 68 65 | into th|e synthe|
|00001b70| 73 69 7a 65 72 d5 73 20 | 69 6e 73 74 72 75 6d 65 |sizer.s |instrume|
|00001b80| 6e 74 20 73 74 6f 72 65 | 2e 20 54 68 65 20 49 6e |nt store|. The In|
|00001b90| 73 74 72 75 6d 65 6e 74 | 20 6e 75 6d 62 65 72 20 |strument| number |
|00001ba0| 6d 75 73 74 20 62 65 20 | 62 65 74 77 65 65 6e 20 |must be |between |
|00001bb0| 31 20 61 6e 64 20 74 68 | 65 20 73 79 6e 74 68 65 |1 and th|e synthe|
|00001bc0| 73 69 7a 65 72 d5 73 20 | 6d 6f 64 69 66 69 61 62 |sizer.s |modifiab|
|00001bd0| 6c 65 49 6e 73 74 72 75 | 6d 65 6e 74 43 6f 75 6e |leInstru|mentCoun|
|00001be0| 74 2c 20 61 73 20 72 65 | 74 75 72 6e 65 64 20 69 |t, as re|turned i|
|00001bf0| 6e 20 74 68 65 20 73 79 | 6e 74 68 65 73 69 7a 65 |n the sy|nthesize|
|00001c00| 72 20 64 65 73 63 72 69 | 70 74 69 6f 6e 2e 0d 70 |r descri|ption..p|
|00001c10| 61 73 63 61 6c 20 43 6f | 6d 70 6f 6e 65 6e 74 52 |ascal Co|mponentR|
|00001c20| 65 73 75 6c 74 20 4d 75 | 73 69 63 47 65 74 49 6e |esult Mu|sicGetIn|
|00001c30| 73 74 72 75 6d 65 6e 74 | 28 4d 75 73 69 63 43 6f |strument|(MusicCo|
|00001c40| 6d 70 6f 6e 65 6e 74 20 | 6d 63 2c 6c 6f 6e 67 20 |mponent |mc,long |
|00001c50| 70 61 72 74 2c 0d 09 49 | 6e 73 74 72 75 6d 65 6e |part,..I|nstrumen|
|00001c60| 74 44 61 74 61 48 61 6e | 64 6c 65 20 2a 69 48 29 |tDataHan|dle *iH)|
|00001c70| 3b 0d 52 65 74 75 72 6e | 73 20 61 20 64 61 74 61 |;.Return|s a data|
|00001c80| 20 68 61 6e 64 6c 65 20 | 63 6f 6e 74 61 69 6e 69 | handle |containi|
|00001c90| 6e 67 20 74 68 65 20 69 | 6e 73 74 72 75 6d 65 6e |ng the i|nstrumen|
|00001ca0| 74 20 74 68 61 74 20 69 | 73 20 6f 6e 20 74 68 65 |t that i|s on the|
|00001cb0| 20 73 70 65 63 69 66 69 | 65 64 20 70 61 72 74 20 | specifi|ed part |
|00001cc0| 6f 66 20 74 68 65 20 73 | 79 6e 74 68 65 73 69 7a |of the s|ynthesiz|
|00001cd0| 65 72 2e 20 54 68 69 73 | 20 69 6e 73 74 72 75 6d |er. This| instrum|
|00001ce0| 65 6e 74 20 6d 61 79 20 | 62 65 20 73 61 76 65 64 |ent may |be saved|
|00001cf0| 20 6f 6e 20 64 69 73 6b | 2c 20 66 6f 72 20 65 78 | on disk|, for ex|
|00001d00| 61 6d 70 6c 65 2c 20 61 | 6e 64 20 70 75 74 20 69 |ample, a|nd put i|
|00001d10| 6e 74 6f 20 74 68 65 20 | 73 79 6e 74 68 65 73 69 |nto the |synthesi|
|00001d20| 7a 65 72 20 61 74 20 61 | 20 6c 61 74 65 72 20 74 |zer at a| later t|
|00001d30| 69 6d 65 2e 20 54 68 69 | 73 20 68 61 6e 64 6c 65 |ime. Thi|s handle|
|00001d40| 20 69 73 20 61 6c 6c 6f | 63 61 74 65 64 20 69 6e | is allo|cated in|
|00001d50| 20 74 68 65 20 63 61 6c | 6c 65 72 d5 73 20 68 65 | the cal|ler.s he|
|00001d60| 61 70 2c 20 61 6e 64 20 | 6d 75 73 74 20 62 65 20 |ap, and |must be |
|00001d70| 64 69 73 70 6f 73 65 64 | 20 62 79 20 74 68 65 20 |disposed| by the |
|00001d80| 63 61 6c 6c 65 72 2e 20 | 0d 70 61 73 63 61 6c 20 |caller. |.pascal |
|00001d90| 43 6f 6d 70 6f 6e 65 6e | 74 52 65 73 75 6c 74 20 |Componen|tResult |
|00001da0| 4d 75 73 69 63 53 65 74 | 49 6e 73 74 72 75 6d 65 |MusicSet|Instrume|
|00001db0| 6e 74 28 4d 75 73 69 63 | 43 6f 6d 70 6f 6e 65 6e |nt(Music|Componen|
|00001dc0| 74 20 6d 63 2c 6c 6f 6e | 67 20 63 68 61 6e 6e 65 |t mc,lon|g channe|
|00001dd0| 6c 2c 20 49 6e 73 74 72 | 75 6d 65 6e 74 44 61 74 |l, Instr|umentDat|
|00001de0| 61 48 61 6e 64 6c 65 20 | 69 48 29 3b 0d 50 75 74 |aHandle |iH);.Put|
|00001df0| 73 20 61 6e 20 69 6e 73 | 74 72 75 6d 65 6e 74 20 |s an ins|trument |
|00001e00| 69 6e 74 6f 20 74 68 65 | 20 74 68 65 20 73 70 65 |into the| the spe|
|00001e10| 63 69 66 69 65 64 20 70 | 61 72 74 20 6f 66 20 74 |cified p|art of t|
|00001e20| 68 65 20 73 79 6e 74 68 | 65 73 69 7a 65 72 2e 20 |he synth|esizer. |
|00001e30| 54 68 65 20 54 6f 6e 65 | 44 65 73 63 72 69 70 74 |The Tone|Descript|
|00001e40| 69 6f 6e 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 |ion part| of the |
|00001e50| 69 6e 73 74 72 75 6d 65 | 6e 74 20 6d 75 73 74 20 |instrume|nt must |
|00001e60| 62 65 20 6f 66 20 61 20 | 6d 61 74 63 68 69 6e 67 |be of a |matching|
|00001e70| 20 73 79 6e 74 68 65 73 | 69 7a 65 72 20 74 79 70 | synthes|izer typ|
|00001e80| 65 2c 20 65 6c 73 65 20 | 74 68 65 20 63 61 6c 6c |e, else |the call|
|00001e90| 20 66 61 69 6c 73 2e 0d | 70 61 73 63 61 6c 20 43 | fails..|pascal C|
|00001ea0| 6f 6d 70 6f 6e 65 6e 74 | 52 65 73 75 6c 74 20 4d |omponent|Result M|
|00001eb0| 75 73 69 63 47 65 74 49 | 6e 73 74 72 75 6d 65 6e |usicGetI|nstrumen|
|00001ec0| 74 73 28 4d 75 73 69 63 | 43 6f 6d 70 6f 6e 65 6e |ts(Music|Componen|
|00001ed0| 74 20 6d 63 2c 0d 09 48 | 61 6e 64 6c 65 20 2a 69 |t mc,..H|andle *i|
|00001ee0| 6e 73 74 72 75 6d 65 6e | 74 73 29 3b 0d 52 65 74 |nstrumen|ts);.Ret|
|00001ef0| 75 72 6e 73 20 61 20 64 | 61 74 61 20 68 61 6e 64 |urns a d|ata hand|
|00001f00| 6c 65 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 61 6c |le conta|ining al|
|00001f10| 6c 20 6f 66 20 74 68 65 | 20 75 73 65 72 20 6d 6f |l of the| user mo|
|00001f20| 64 69 66 69 61 62 6c 65 | 20 69 6e 73 74 72 75 6d |difiable| instrum|
|00001f30| 65 6e 74 73 2e 0d 20 0d | 70 61 73 63 61 6c 20 43 |ents.. .|pascal C|
|00001f40| 6f 6d 70 6f 6e 65 6e 74 | 52 65 73 75 6c 74 20 4d |omponent|Result M|
|00001f50| 75 73 69 63 53 65 74 49 | 6e 73 74 72 75 6d 65 6e |usicSetI|nstrumen|
|00001f60| 74 73 20 28 4d 75 73 69 | 63 43 6f 6d 70 6f 6e 65 |ts (Musi|cCompone|
|00001f70| 6e 74 20 6d 63 2c 0d 09 | 48 61 6e 64 6c 65 20 69 |nt mc,..|Handle i|
|00001f80| 6e 73 74 72 75 6d 65 6e | 74 73 29 3b 0d 53 65 6e |nstrumen|ts);.Sen|
|00001f90| 64 73 20 61 20 64 61 74 | 61 20 68 61 6e 64 6c 65 |ds a dat|a handle|
|00001fa0| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 61 6c 6c 20 | contain|ing all |
|00001fb0| 6f 66 20 74 68 65 20 75 | 73 65 72 20 6d 6f 64 69 |of the u|ser modi|
|00001fc0| 66 69 61 62 6c 65 20 69 | 6e 73 74 72 75 6d 65 6e |fiable i|nstrumen|
|00001fd0| 74 73 20 69 6e 74 6f 20 | 74 68 65 20 73 79 6e 74 |ts into |the synt|
|00001fe0| 68 65 73 69 7a 65 72 2e | 0d 20 0d 70 61 73 63 61 |hesizer.|. .pasca|
|00001ff0| 6c 20 20 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 75 |l Compo|nentResu|
|00002000| 6c 74 20 4d 75 73 69 63 | 53 65 74 43 6f 6e 74 72 |lt Music|SetContr|
|00002010| 6f 6c 6c 65 72 20 28 4d | 75 73 69 63 43 6f 6d 70 |oller (M|usicComp|
|00002020| 6f 6e 65 6e 74 20 6d 63 | 2c 20 6c 6f 6e 67 20 70 |onent mc|, long p|
|00002030| 61 72 74 2c 20 6c 6f 6e | 67 20 63 6f 6e 74 72 6f |art, lon|g contro|
|00002040| 6c 6c 65 72 2c 6c 6f 6e | 67 20 76 61 6c 75 65 29 |ller,lon|g value)|
|00002050| 3b 0d 53 65 74 73 20 61 | 20 73 74 61 6e 64 61 72 |;.Sets a| standar|
|00002060| 64 20 61 74 74 72 69 62 | 75 74 65 20 6f 6e 20 74 |d attrib|ute on t|
|00002070| 68 65 20 73 70 65 63 69 | 66 69 65 64 20 70 61 72 |he speci|fied par|
|00002080| 74 2e 20 43 6f 6e 74 72 | 6f 6c 6c 65 72 73 20 30 |t. Contr|ollers 0|
|00002090| 20 74 68 72 6f 75 67 68 | 20 31 32 37 20 63 6f 72 | through| 127 cor|
|000020a0| 72 65 73 70 6f 6e 64 20 | 72 6f 75 67 68 6c 79 20 |respond |roughly |
|000020b0| 74 6f 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |to the s|tandard |
|000020c0| 4d 49 44 49 20 63 6f 6e | 74 72 6f 6c 6c 65 72 73 |MIDI con|trollers|
|000020d0| 2e 20 54 68 65 20 76 61 | 6c 75 65 20 69 73 20 61 |. The va|lue is a|
|000020e0| 6c 77 61 79 73 20 61 20 | 73 69 67 6e 65 64 20 31 |lways a |signed 1|
|000020f0| 36 20 62 69 74 20 6e 75 | 6d 62 65 72 20 77 68 65 |6 bit nu|mber whe|
|00002100| 72 65 20 74 68 65 20 6c | 6f 77 65 72 20 38 20 62 |re the l|ower 8 b|
|00002110| 69 74 73 20 61 72 65 20 | 66 72 61 63 74 69 6f 6e |its are |fraction|
|00002120| 61 6c 2e 20 28 53 6f 20 | 4d 49 44 49 20 63 6f 6e |al. (So |MIDI con|
|00002130| 74 72 6f 6c 6c 65 72 73 | 20 33 32 20 74 68 72 6f |trollers| 32 thro|
|00002140| 75 67 68 20 36 33 20 61 | 72 65 20 61 75 74 6f 6d |ugh 63 a|re autom|
|00002150| 61 74 69 63 61 6c 6c 79 | 20 75 73 65 64 20 62 79 |atically| used by|
|00002160| 20 63 6f 6e 74 72 6f 6c | 6c 65 72 73 20 30 20 74 | control|lers 0 t|
|00002170| 68 72 6f 75 67 68 20 33 | 31 2e 29 20 54 68 65 20 |hrough 3|1.) The |
|00002180| 72 61 6e 67 65 20 69 73 | 20 2d 37 46 2e 46 46 20 |range is| -7F.FF |
|00002190| 74 68 72 6f 75 67 68 20 | 2b 37 46 2e 46 46 2c 20 |through |+7F.FF, |
|000021a0| 6f 72 20 2d 33 32 37 36 | 37 20 74 6f 20 33 32 37 |or -3276|7 to 327|
|000021b0| 36 37 2c 20 6f 72 20 30 | 78 38 30 30 31 20 74 6f |67, or 0|x8001 to|
|000021c0| 20 30 78 37 46 46 46 2e | 0d 43 6f 6e 74 72 6f 6c | 0x7FFF.|.Control|
|000021d0| 6c 65 72 20 33 32 20 69 | 73 20 70 69 74 63 68 20 |ler 32 i|s pitch |
|000021e0| 62 65 6e 64 2c 20 61 6e | 64 20 69 74 20 69 73 20 |bend, an|d it is |
|000021f0| 64 65 66 69 6e 65 64 20 | 74 6f 20 62 65 20 69 6e |defined |to be in|
|00002200| 20 73 65 6d 69 74 6f 6e | 65 73 2c 20 77 68 65 72 | semiton|es, wher|
|00002210| 65 20 74 68 65 20 6c 6f | 77 65 72 20 38 20 62 69 |e the lo|wer 8 bi|
|00002220| 74 73 20 73 70 65 63 69 | 66 79 20 32 35 36 74 68 |ts speci|fy 256th|
|00002230| 73 20 6f 66 20 61 20 73 | 65 6d 69 74 6f 6e 65 2e |s of a s|emitone.|
|00002240| 20 28 46 6f 6f 20 6f 6e | 20 d2 73 65 74 20 70 69 | (Foo on| .set pi|
|00002250| 74 63 68 20 62 65 6e 64 | 20 72 61 6e 67 65 d3 20 |tch bend| range. |
|00002260| 63 6f 6d 6d 61 6e 64 73 | 2e 29 0d 43 6f 6e 74 72 |commands|.).Contr|
|00002270| 6f 6c 6c 65 72 73 20 31 | 32 38 20 74 68 72 6f 75 |ollers 1|28 throu|
|00002280| 67 68 20 32 35 35 20 61 | 72 65 20 72 65 73 65 72 |gh 255 a|re reser|
|00002290| 76 65 64 20 66 6f 72 20 | 75 73 65 20 62 79 20 41 |ved for |use by A|
|000022a0| 70 70 6c 65 2e 20 49 6e | 20 66 61 63 74 2c 20 61 |pple. In| fact, a|
|000022b0| 6c 6c 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 6c 65 |ll the c|ontrolle|
|000022c0| 72 73 20 61 72 65 20 72 | 65 73 65 72 76 65 64 20 |rs are r|eserved |
|000022d0| 66 6f 72 20 75 73 65 20 | 62 79 20 41 70 70 6c 65 |for use |by Apple|
|000022e0| 2e 0d 70 61 73 63 61 6c | 20 20 43 6f 6d 70 6f 6e |..pascal| Compon|
|000022f0| 65 6e 74 52 65 73 75 6c | 74 20 4d 75 73 69 63 46 |entResul|t MusicF|
|00002300| 69 6e 64 54 6f 6e 65 20 | 28 4d 75 73 69 63 43 6f |indTone |(MusicCo|
|00002310| 6d 70 6f 6e 65 6e 74 20 | 6d 63 2c 20 54 6f 6e 65 |mponent |mc, Tone|
|00002320| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 2a 74 64 2c |Descript|ion *td,|
|00002330| 20 6c 6f 6e 67 20 2a 69 | 6e 73 74 72 75 6d 65 6e | long *i|nstrumen|
|00002340| 74 4e 75 6d 62 65 72 2c | 20 6c 6f 6e 67 20 2a 66 |tNumber,| long *f|
|00002350| 69 74 29 3b 0d 47 69 76 | 65 6e 20 61 20 74 6f 6e |it);.Giv|en a ton|
|00002360| 65 20 64 65 73 63 72 69 | 70 74 69 6f 6e 2c 20 72 |e descri|ption, r|
|00002370| 65 74 75 72 6e 73 20 74 | 68 65 20 62 65 73 74 2d |eturns t|he best-|
|00002380| 6d 61 74 63 68 69 6e 67 | 20 69 6e 73 74 72 75 6d |matching| instrum|
|00002390| 65 6e 74 20 6e 75 6d 62 | 65 72 20 6f 6e 20 74 68 |ent numb|er on th|
|000023a0| 69 73 20 64 65 76 69 63 | 65 2e 20 48 6f 77 20 63 |is devic|e. How c|
|000023b0| 6c 6f 73 65 20 61 20 6d | 61 74 63 68 20 77 61 73 |lose a m|atch was|
|000023c0| 20 61 74 74 61 69 6e 65 | 64 20 69 73 20 72 65 74 | attaine|d is ret|
|000023d0| 75 72 6e 65 64 20 69 6e | 20 d2 66 69 74 d3 2e 0d |urned in| .fit...|
|000023e0| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 0d 09 |typedef |struct..|
|000023f0| 7b 0d 09 4f 53 54 79 70 | 65 20 73 79 6e 74 68 65 |{..OSTyp|e synthe|
|00002400| 73 69 7a 65 72 54 79 70 | 65 3b 20 20 20 2f 2a 20 |sizerTyp|e; /* |
|00002410| 63 6f 6d 70 6f 6e 65 6e | 74 20 73 75 62 74 79 70 |componen|t subtyp|
|00002420| 65 20 2a 2f 0d 09 53 74 | 72 33 31 20 73 79 6e 74 |e */..St|r31 synt|
|00002430| 68 65 73 69 7a 65 72 4e | 61 6d 65 3b 20 20 20 20 |hesizerN|ame; |
|00002440| 2f 2a 20 6e 61 6d 65 20 | 6f 66 20 69 6e 73 74 61 |/* name |of insta|
|00002450| 6e 74 69 61 74 69 6f 6e | 20 6f 66 20 73 79 6e 74 |ntiation| of synt|
|00002460| 68 20 2a 2f 0d 09 53 74 | 72 33 31 20 69 6e 73 74 |h */..St|r31 inst|
|00002470| 72 75 6d 65 6e 74 4e 61 | 6d 65 3b 20 20 20 20 20 |rumentNa|me; |
|00002480| 2f 2a 20 70 72 65 66 65 | 72 72 65 64 20 6e 61 6d |/* prefe|rred nam|
|00002490| 65 20 66 6f 72 20 68 75 | 6d 61 6e 20 75 73 65 20 |e for hu|man use |
|000024a0| 2a 2f 0d 09 6c 6f 6e 67 | 20 69 6e 73 74 72 75 6d |*/..long| instrum|
|000024b0| 65 6e 74 4e 75 6d 62 65 | 72 3b 20 20 20 20 2f 2a |entNumbe|r; /*|
|000024c0| 20 69 6e 73 74 2d 6e 75 | 6d 62 65 72 20 69 66 20 | inst-nu|mber if |
|000024d0| 73 79 6e 74 68 2d 74 79 | 70 65 20 6d 61 74 63 68 |synth-ty|pe match|
|000024e0| 65 73 20 2a 2f 0d 09 6c | 6f 6e 67 20 67 6d 4e 75 |es */..l|ong gmNu|
|000024f0| 6d 62 65 72 3b 20 20 20 | 20 20 20 20 20 20 20 20 |mber; | |
|00002500| 20 2f 2a 20 42 65 73 74 | 20 6d 61 74 63 68 69 6e | /* Best| matchin|
|00002510| 67 20 67 65 6e 65 72 61 | 6c 20 4d 49 44 49 20 6e |g genera|l MIDI n|
|00002520| 75 6d 62 65 72 20 2a 2f | 0d 09 7d 20 54 6f 6e 65 |umber */|..} Tone|
|00002530| 44 65 73 63 72 69 70 74 | 69 6f 6e 3b 0d 74 79 70 |Descript|ion;.typ|
|00002540| 65 64 65 66 20 65 6e 75 | 6d 0d 09 7b 0d 09 6b 49 |edef enu|m..{..kI|
|00002550| 6e 73 74 72 75 6d 65 6e | 74 4d 61 74 63 68 53 79 |nstrumen|tMatchSy|
|00002560| 6e 74 68 65 73 69 7a 65 | 72 54 79 70 65 20 3d 20 |nthesize|rType = |
|00002570| 31 2c 0d 09 6b 49 6e 73 | 74 72 75 6d 65 6e 74 4d |1,..kIns|trumentM|
|00002580| 61 74 63 68 53 79 6e 74 | 68 65 73 69 7a 65 72 4e |atchSynt|hesizerN|
|00002590| 61 6d 65 20 3d 20 32 2c | 0d 09 6b 49 6e 73 74 72 |ame = 2,|..kInstr|
|000025a0| 75 6d 65 6e 74 4d 61 74 | 63 68 4e 61 6d 65 20 3d |umentMat|chName =|
|000025b0| 20 34 2c 0d 09 6b 49 6e | 73 74 72 75 6d 65 6e 74 | 4,..kIn|strument|
|000025c0| 4d 61 74 63 68 4e 75 6d | 62 65 72 20 3d 20 38 2c |MatchNum|ber = 8,|
|000025d0| 0d 09 6b 49 6e 73 74 72 | 75 6d 65 6e 74 4d 61 74 |..kInstr|umentMat|
|000025e0| 63 68 47 4d 4e 75 6d 62 | 65 72 20 3d 20 31 36 0d |chGMNumb|er = 16.|
|000025f0| 09 7d 20 49 6e 73 74 72 | 75 6d 65 6e 74 4d 61 74 |.} Instr|umentMat|
|00002600| 63 68 3b 0d 54 68 65 20 | 4d 75 73 69 63 20 63 6f |ch;.The |Music co|
|00002610| 6d 70 6f 6e 65 6e 74 20 | 73 68 6f 75 6c 64 20 73 |mponent |should s|
|00002620| 65 61 72 63 68 20 69 6e | 20 74 68 65 20 66 6f 6c |earch in| the fol|
|00002630| 6c 6f 77 69 6e 67 20 6f | 72 64 65 72 3a 0d 09 31 |lowing o|rder:..1|
|00002640| 29 20 49 66 20 74 68 65 | 20 73 79 6e 74 68 65 73 |) If the| synthes|
|00002650| 69 7a 65 72 20 69 73 20 | 61 20 47 65 6e 65 72 61 |izer is |a Genera|
|00002660| 6c 20 4d 49 44 49 20 64 | 65 76 69 63 65 2c 20 75 |l MIDI d|evice, u|
|00002670| 73 65 20 74 68 65 20 47 | 4d 4e 75 6d 62 65 72 2e |se the G|MNumber.|
|00002680| 0d 09 32 29 20 49 66 20 | 73 79 6e 74 68 65 73 69 |..2) If |synthesi|
|00002690| 7a 65 72 54 79 70 65 20 | 6d 61 74 63 68 65 73 2c |zerType |matches,|
|000026a0| 20 66 69 72 73 74 20 74 | 72 79 20 74 6f 20 6d 61 | first t|ry to ma|
|000026b0| 74 63 68 20 69 6e 73 74 | 72 75 6d 65 6e 74 4e 61 |tch inst|rumentNa|
|000026c0| 6d 65 2c 20 65 6c 73 65 | 20 74 72 79 20 69 6e 73 |me, else| try ins|
|000026d0| 74 72 75 6d 65 6e 74 4e | 75 6d 62 65 72 2e 20 46 |trumentN|umber. F|
|000026e0| 61 69 6c 69 6e 67 20 74 | 68 61 74 2c 20 74 72 79 |ailing t|hat, try|
|000026f0| 20 74 68 65 20 67 6d 4e | 75 6d 62 65 72 2e 0d 09 | the gmN|umber...|
|00002700| 33 29 20 49 66 20 73 79 | 6e 74 68 65 73 69 7a 65 |3) If sy|nthesize|
|00002710| 72 54 79 70 65 20 64 6f | 65 73 6e d5 74 20 6d 61 |rType do|esn.t ma|
|00002720| 74 63 68 2c 20 74 72 79 | 20 74 68 65 20 69 6e 73 |tch, try| the ins|
|00002730| 74 72 75 6d 65 6e 74 4e | 61 6d 65 2c 20 74 68 65 |trumentN|ame, the|
|00002740| 6e 20 74 68 65 20 69 6e | 73 74 72 75 6d 65 6e 74 |n the in|strument|
|00002750| 20 6e 75 6d 62 65 72 2e | 0d 09 49 66 20 6e 6f 6e | number.|..If non|
|00002760| 65 20 6f 66 20 74 68 65 | 73 65 20 72 75 6c 65 73 |e of the|se rules|
|00002770| 20 61 70 70 6c 79 2c 20 | 6f 72 20 74 68 65 20 66 | apply, |or the f|
|00002780| 69 65 6c 64 73 20 61 72 | 65 20 d2 62 6c 61 6e 6b |ields ar|e .blank|
|00002790| d3 20 28 7a 65 72 6f 20 | 66 6f 72 20 74 68 65 20 |. (zero |for the |
|000027a0| 74 79 70 65 20 6f 72 20 | 6e 75 6d 65 72 69 63 20 |type or |numeric |
|000027b0| 66 69 65 6c 64 73 2c 20 | 6f 72 20 7a 65 72 6f 2d |fields, |or zero-|
|000027c0| 6c 65 6e 67 74 68 20 66 | 6f 72 20 74 68 65 20 73 |length f|or the s|
|000027d0| 74 72 69 6e 67 73 29 20 | 74 68 65 6e 20 72 65 74 |trings) |then ret|
|000027e0| 75 72 6e 20 d2 31 d3 20 | 61 6e 64 20 61 20 66 69 |urn .1. |and a fi|
|000027f0| 74 20 76 61 6c 75 65 20 | 6f 66 20 7a 65 72 6f 2e |t value |of zero.|
|00002800| 20 54 68 65 20 73 79 6e | 74 68 65 73 69 7a 65 72 | The syn|thesizer|
|00002810| 4e 61 6d 65 20 66 69 65 | 6c 64 20 69 73 20 6e 6f |Name fie|ld is no|
|00002820| 74 20 75 73 65 64 20 62 | 79 20 74 68 65 20 63 6f |t used b|y the co|
|00002830| 6d 70 6f 6e 65 6e 74 3b | 20 69 74 20 69 73 20 75 |mponent;| it is u|
|00002840| 73 65 64 20 62 79 20 74 | 68 65 20 4e 6f 74 65 20 |sed by t|he Note |
|00002850| 41 6c 6c 6f 63 61 74 6f | 72 20 77 68 65 6e 20 64 |Allocato|r when d|
|00002860| 65 63 69 64 69 6e 67 20 | 77 68 69 63 68 20 6d 75 |eciding |which mu|
|00002870| 73 69 63 20 64 65 76 69 | 63 65 20 74 6f 20 75 73 |sic devi|ce to us|
|00002880| 65 2e 0d 70 61 73 63 61 | 6c 20 20 43 6f 6d 70 6f |e..pasca|l Compo|
|00002890| 6e 65 6e 74 52 65 73 75 | 6c 74 20 4d 75 73 69 63 |nentResu|lt Music|
|000028a0| 50 6c 61 79 4e 6f 74 65 | 20 28 4d 75 73 69 63 43 |PlayNote| (MusicC|
|000028b0| 6f 6d 70 6f 6e 65 6e 74 | 20 6d 63 2c 20 6c 6f 6e |omponent| mc, lon|
|000028c0| 67 20 70 61 72 74 2c 0d | 09 6c 6f 6e 67 20 70 69 |g part,.|.long pi|
|000028d0| 74 63 68 2c 20 6c 6f 6e | 67 20 76 65 6c 6f 63 69 |tch, lon|g veloci|
|000028e0| 74 79 29 3b 0d 50 6c 61 | 79 73 20 61 20 6e 6f 74 |ty);.Pla|ys a not|
|000028f0| 65 2e 20 49 66 20 74 68 | 65 20 70 69 74 63 68 20 |e. If th|e pitch |
|00002900| 69 73 20 61 20 6e 75 6d | 62 65 72 20 66 72 6f 6d |is a num|ber from|
|00002910| 20 30 20 74 6f 20 31 32 | 37 2c 20 74 68 65 6e 20 | 0 to 12|7, then |
|00002920| 69 74 20 69 73 20 74 68 | 65 20 4d 49 44 49 20 70 |it is th|e MIDI p|
|00002930| 69 74 63 68 2c 20 77 68 | 65 72 65 20 36 30 20 69 |itch, wh|ere 60 i|
|00002940| 73 20 6d 69 64 64 6c 65 | 2d 43 2e 20 49 66 20 74 |s middle|-C. If t|
|00002950| 68 65 20 70 69 74 63 68 | 20 69 73 20 61 20 70 6f |he pitch| is a po|
|00002960| 73 69 74 69 76 65 20 6e | 75 6d 62 65 72 20 61 62 |sitive n|umber ab|
|00002970| 6f 76 65 20 36 35 35 33 | 35 2c 20 74 68 65 6e 20 |ove 6553|5, then |
|00002980| 74 68 65 20 76 61 6c 75 | 65 20 69 73 20 61 20 66 |the valu|e is a f|
|00002990| 69 78 65 64 20 70 6f 69 | 6e 74 20 70 69 74 63 68 |ixed poi|nt pitch|
|000029a0| 20 76 61 6c 75 65 2e 20 | 54 68 75 73 2c 20 6d 69 | value. |Thus, mi|
|000029b0| 63 72 6f 74 6f 6e 61 6c | 20 76 61 6c 75 65 73 20 |crotonal| values |
|000029c0| 6d 61 79 20 62 65 20 73 | 70 65 63 69 66 69 65 64 |may be s|pecified|
|000029d0| 2e 20 54 68 65 20 72 61 | 6e 67 65 20 31 32 38 20 |. The ra|nge 128 |
|000029e0| 74 68 72 6f 75 67 68 20 | 36 35 35 33 35 2c 20 61 |through |65535, a|
|000029f0| 6e 64 20 61 6c 6c 20 6e | 65 67 61 74 69 76 65 20 |nd all n|egative |
|00002a00| 76 61 6c 75 65 73 2c 20 | 61 72 65 20 6e 6f 74 20 |values, |are not |
|00002a10| 64 65 66 69 6e 65 64 2c | 20 61 6e 64 20 73 68 6f |defined,| and sho|
|00002a20| 75 6c 64 20 6e 6f 74 20 | 62 65 20 75 73 65 64 2e |uld not |be used.|
|00002a30| 0d 54 68 65 20 76 65 6c | 6f 63 69 74 79 20 72 65 |.The vel|ocity re|
|00002a40| 66 65 72 73 20 74 6f 20 | 68 6f 77 20 68 61 72 64 |fers to |how hard|
|00002a50| 20 74 68 65 20 6b 65 79 | 20 77 61 73 20 73 74 72 | the key| was str|
|00002a60| 75 63 6b 20 28 69 66 20 | 70 65 72 66 6f 72 6d 65 |uck (if |performe|
|00002a70| 64 20 6f 6e 20 61 20 6b | 65 79 62 6f 61 72 64 2d |d on a k|eyboard-|
|00002a80| 69 6e 73 74 72 75 6d 65 | 6e 74 29 2c 20 74 79 70 |instrume|nt), typ|
|00002a90| 69 63 61 6c 6c 79 20 74 | 68 69 73 20 74 72 61 6e |ically t|his tran|
|00002aa0| 73 6c 61 74 65 73 20 64 | 69 72 65 63 74 6c 79 20 |slates d|irectly |
|00002ab0| 74 6f 20 76 6f 6c 75 6d | 65 2c 20 62 75 74 20 6f |to volum|e, but o|
|00002ac0| 6e 20 6d 61 6e 79 20 73 | 79 6e 74 68 65 73 69 7a |n many s|ynthesiz|
|00002ad0| 65 72 73 20 74 68 69 73 | 20 61 6c 73 6f 20 73 75 |ers this| also su|
|00002ae0| 62 74 6c 79 20 61 6c 74 | 65 72 73 20 74 68 65 20 |btly alt|ers the |
|00002af0| 74 69 6d 62 72 65 20 6f | 66 20 74 68 65 20 74 6f |timbre o|f the to|
|00002b00| 6e 65 2e 0d 41 20 76 65 | 6c 6f 63 69 74 79 20 6f |ne..A ve|locity o|
|00002b10| 66 20 30 20 74 75 72 6e | 73 20 74 68 65 20 6e 6f |f 0 turn|s the no|
|00002b20| 74 65 20 6f 66 66 2c 20 | 66 6f 72 20 74 68 65 20 |te off, |for the |
|00002b30| 73 70 65 63 69 66 69 65 | 64 20 70 69 74 63 68 2e |specifie|d pitch.|
|00002b40| 0d 70 61 73 63 61 6c 20 | 20 43 6f 6d 70 6f 6e 65 |.pascal | Compone|
|00002b50| 6e 74 52 65 73 75 6c 74 | 20 4d 75 73 69 63 52 65 |ntResult| MusicRe|
|00002b60| 73 65 74 50 61 72 74 20 | 28 4d 75 73 69 63 43 6f |setPart |(MusicCo|
|00002b70| 6d 70 6f 6e 65 6e 74 20 | 6d 63 2c 6c 6f 6e 67 20 |mponent |mc,long |
|00002b80| 70 61 72 74 29 3b 0d 53 | 69 6c 65 6e 63 65 73 20 |part);.S|ilences |
|00002b90| 61 6c 6c 20 73 6f 75 6e | 64 73 20 6f 6e 20 74 68 |all soun|ds on th|
|00002ba0| 65 20 73 70 65 63 69 66 | 69 65 64 20 70 61 72 74 |e specif|ied part|
|00002bb0| 2c 20 61 6e 64 20 72 65 | 73 65 74 73 20 61 6c 6c |, and re|sets all|
|00002bc0| 20 63 6f 6e 74 72 6f 6c | 6c 65 72 73 20 74 6f 20 | control|lers to |
|00002bd0| 74 68 65 69 72 20 64 65 | 66 61 75 6c 74 20 76 61 |their de|fault va|
|00002be0| 6c 75 65 73 2e 20 54 68 | 65 20 64 65 66 61 75 6c |lues. Th|e defaul|
|00002bf0| 74 20 76 61 6c 75 65 20 | 66 6f 72 20 61 6c 6c 20 |t value |for all |
|00002c00| 63 6f 6e 74 72 6f 6c 6c | 65 72 73 20 69 73 20 30 |controll|ers is 0|
|00002c10| 20 28 7a 65 72 6f 29 2c | 20 65 78 63 65 70 74 20 | (zero),| except |
|00002c20| 76 6f 6c 75 6d 65 2e 20 | 54 68 65 20 64 65 66 61 |volume. |The defa|
|00002c30| 75 6c 74 20 76 61 6c 75 | 65 20 66 6f 72 20 76 6f |ult valu|e for vo|
|00002c40| 6c 75 6d 65 20 69 73 20 | 31 36 33 38 33 2c 20 6f |lume is |16383, o|
|00002c50| 72 2c 20 69 6e 20 68 65 | 78 61 64 65 63 69 6d 61 |r, in he|xadecima|
|00002c60| 6c 2c 20 37 46 2e 37 46 | 20 2d 2d 20 6d 61 78 69 |l, 7F.7F| -- maxi|
|00002c70| 6d 75 6d 20 76 6f 6c 75 | 6d 65 2e 0d 70 61 73 63 |mum volu|me..pasc|
|00002c80| 61 6c 20 20 43 6f 6d 70 | 6f 6e 65 6e 74 52 65 73 |al Comp|onentRes|
|00002c90| 75 6c 74 20 4d 75 73 69 | 63 53 65 74 53 79 6e 74 |ult Musi|cSetSynt|
|00002ca0| 68 65 73 69 7a 65 72 43 | 6f 6e 6e 65 63 74 69 6f |hesizerC|onnectio|
|00002cb0| 6e 73 20 28 4d 75 73 69 | 63 43 6f 6d 70 6f 6e 65 |ns (Musi|cCompone|
|00002cc0| 6e 74 20 6d 63 2c 20 53 | 79 6e 74 68 65 73 69 7a |nt mc, S|ynthesiz|
|00002cd0| 65 72 43 6f 6e 6e 65 63 | 74 69 6f 6e 73 20 2a 73 |erConnec|tions *s|
|00002ce0| 63 29 3b 0d 54 68 69 73 | 20 63 61 6c 6c 20 69 73 |c);.This| call is|
|00002cf0| 20 6f 6e 6c 79 20 72 65 | 6c 65 76 61 6e 74 20 74 | only re|levant t|
|00002d00| 6f 20 4d 49 44 49 20 64 | 65 76 69 63 65 73 2e 20 |o MIDI d|evices. |
|00002d10| 41 20 72 65 63 6f 72 64 | 20 69 73 20 70 61 73 73 |A record| is pass|
|00002d20| 65 64 20 69 6e 20 77 68 | 69 63 68 20 73 70 65 63 |ed in wh|ich spec|
|00002d30| 69 66 69 65 73 20 77 68 | 69 63 68 20 4d 49 44 49 |ifies wh|ich MIDI|
|00002d40| 20 4d 61 6e 61 67 65 72 | 20 70 6f 72 74 20 74 68 | Manager| port th|
|00002d50| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 20 69 73 20 63 |e compon|ent is c|
|00002d60| 6f 6e 6e 65 63 74 65 64 | 20 74 6f 2e 0d 4e 6f 74 |onnected| to..Not|
|00002d70| 65 20 41 6c 6c 6f 63 61 | 74 6f 72 20 4d 6f 64 65 |e Alloca|tor Mode|
|00002d80| 6c 20 61 6e 64 20 41 50 | 49 0d 54 68 65 72 65 20 |l and AP|I.There |
|00002d90| 61 72 65 20 74 68 72 65 | 65 20 74 79 70 65 73 20 |are thre|e types |
|00002da0| 6f 66 20 63 61 6c 6c 73 | 20 68 61 6e 64 6c 65 64 |of calls| handled|
|00002db0| 20 62 79 20 74 68 65 20 | 4e 6f 74 65 20 41 6c 6c | by the |Note All|
|00002dc0| 6f 63 61 74 6f 72 2e 20 | 54 68 65 20 66 69 72 73 |ocator. |The firs|
|00002dd0| 74 20 73 65 74 20 6f 66 | 20 63 61 6c 6c 73 20 61 |t set of| calls a|
|00002de0| 72 65 20 66 6f 72 20 63 | 6f 6e 66 69 67 75 72 69 |re for c|onfiguri|
|00002df0| 6e 67 20 74 68 65 20 73 | 79 73 74 65 6d 2e 20 54 |ng the s|ystem. T|
|00002e00| 68 65 72 65 20 61 72 65 | 20 63 61 6c 6c 73 20 66 |here are| calls f|
|00002e10| 6f 72 20 72 65 67 69 73 | 74 65 72 69 6e 67 20 61 |or regis|tering a|
|00002e20| 6e 64 20 75 6e 72 65 67 | 69 73 74 65 72 69 6e 67 |nd unreg|istering|
|00002e30| 20 61 20 4d 75 73 69 63 | 20 64 65 76 69 63 65 2e | a Music| device.|
|00002e40| 20 44 75 72 69 6e 67 20 | 72 65 67 69 73 74 72 61 | During |registra|
|00002e50| 74 69 6f 6e 2c 20 74 68 | 65 20 63 6f 6e 6e 65 63 |tion, th|e connec|
|00002e60| 74 69 6f 6e 73 20 66 6f | 72 20 74 68 61 74 20 64 |tions fo|r that d|
|00002e70| 65 76 69 63 65 20 61 72 | 65 20 73 70 65 63 69 66 |evice ar|e specif|
|00002e80| 69 65 64 20 28 74 79 70 | 69 63 61 6c 6c 79 2c 20 |ied (typ|ically, |
|00002e90| 74 68 65 20 63 6f 6e 6e | 65 63 74 69 6f 6e 73 20 |the conn|ections |
|00002ea0| 61 72 65 20 74 68 65 20 | 4d 49 44 49 20 4d 61 6e |are the |MIDI Man|
|00002eb0| 61 67 65 72 20 70 6f 72 | 74 20 61 6e 64 20 63 6c |ager por|t and cl|
|00002ec0| 69 65 6e 74 20 49 44 73 | 29 2e 20 54 68 65 72 65 |ient IDs|). There|
|00002ed0| 20 69 73 20 61 6c 73 6f | 20 61 20 63 61 6c 6c 20 | is also| a call |
|00002ee0| 66 6f 72 20 71 75 65 72 | 79 69 6e 67 20 74 68 65 |for quer|ying the|
|00002ef0| 20 4e 6f 74 65 20 41 6c | 6c 6f 63 61 74 6f 72 20 | Note Al|locator |
|00002f00| 66 6f 72 20 72 65 67 69 | 73 74 65 72 65 64 20 64 |for regi|stered d|
|00002f10| 65 76 69 63 65 73 2c 20 | 73 6f 20 74 68 61 74 20 |evices, |so that |
|00002f20| 61 6e 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 63 |an appli|cation c|
|00002f30| 61 6e 20 6f 66 66 65 72 | 20 61 20 73 65 6c 65 63 |an offer| a selec|
|00002f40| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 65 78 69 73 |tion of |the exis|
|00002f50| 74 69 6e 67 20 64 65 76 | 69 63 65 73 20 74 6f 20 |ting dev|ices to |
|00002f60| 74 68 65 20 75 73 65 72 | 2e 0d 53 65 63 6f 6e 64 |the user|..Second|
|00002f70| 6c 79 2c 20 74 68 65 20 | 4e 6f 74 65 20 41 6c 6c |ly, the |Note All|
|00002f80| 6f 63 61 74 6f 72 20 70 | 72 6f 76 69 64 65 73 20 |ocator p|rovides |
|00002f90| 61 6e 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 6c |an appli|cation l|
|00002fa0| 65 76 65 6c 20 69 6e 74 | 65 72 66 61 63 65 20 66 |evel int|erface f|
|00002fb0| 6f 72 20 72 65 71 75 65 | 73 74 69 6e 67 20 d2 6e |or reque|sting .n|
|00002fc0| 6f 74 65 20 63 68 61 6e | 6e 65 6c 73 d3 20 77 69 |ote chan|nels. wi|
|00002fd0| 74 68 20 70 61 72 74 69 | 63 75 6c 61 72 20 61 74 |th parti|cular at|
|00002fe0| 74 72 69 62 75 74 65 73 | 2e 20 41 20 6e 6f 74 65 |tributes|. A note|
|00002ff0| 20 63 68 61 6e 6e 65 6c | 20 69 73 20 73 69 6d 69 | channel| is simi|
|00003000| 6c 61 72 20 69 6e 20 73 | 6f 6d 65 20 77 61 79 73 |lar in s|ome ways|
|00003010| 20 74 6f 20 61 20 53 6f | 75 6e 64 20 4d 61 6e 61 | to a So|und Mana|
|00003020| 67 65 72 20 73 6f 75 6e | 64 20 63 68 61 6e 6e 65 |ger soun|d channe|
|00003030| 6c 3b 20 69 74 20 6e 65 | 65 64 73 20 74 6f 20 62 |l; it ne|eds to b|
|00003040| 65 20 63 72 65 61 74 65 | 64 20 61 6e 64 20 64 69 |e create|d and di|
|00003050| 73 70 6f 73 65 64 2c 20 | 61 6e 64 20 63 61 6e 20 |sposed, |and can |
|00003060| 72 65 63 65 69 76 65 20 | 76 61 72 69 6f 75 73 20 |receive |various |
|00003070| 63 6f 6d 6d 61 6e 64 73 | 2e 20 54 6f 20 63 72 65 |commands|. To cre|
|00003080| 61 74 65 20 61 20 6e 6f | 74 65 20 63 68 61 6e 6e |ate a no|te chann|
|00003090| 65 6c 2c 20 74 68 65 20 | 63 6c 69 65 6e 74 20 73 |el, the |client s|
|000030a0| 70 65 63 69 66 69 65 73 | 20 74 68 65 20 64 65 73 |pecifies| the des|
|000030b0| 69 72 65 64 20 70 6f 6c | 79 70 68 6f 6e 79 2c 20 |ired pol|yphony, |
|000030c0| 61 6e 64 20 74 68 65 20 | 64 65 73 69 72 65 64 20 |and the |desired |
|000030d0| 74 6f 6e 65 2e 20 54 68 | 65 20 4e 6f 74 65 20 41 |tone. Th|e Note A|
|000030e0| 6c 6c 6f 63 61 74 6f 72 | 20 77 69 6c 6c 20 72 65 |llocator| will re|
|000030f0| 74 75 72 6e 20 61 20 6e | 6f 74 65 20 63 68 61 6e |turn a n|ote chan|
|00003100| 6e 65 6c 20 74 68 61 74 | 20 62 65 73 74 20 73 61 |nel that| best sa|
|00003110| 74 69 73 66 69 65 73 20 | 74 68 65 20 72 65 71 75 |tisfies |the requ|
|00003120| 65 73 74 2e 20 50 72 6f | 63 65 64 75 72 61 6c 20 |est. Pro|cedural |
|00003130| 69 6e 74 65 72 66 61 63 | 65 73 20 61 72 65 20 70 |interfac|es are p|
|00003140| 72 6f 76 69 64 65 64 20 | 74 6f 20 70 6c 61 79 20 |rovided |to play |
|00003150| 6e 6f 74 65 73 20 61 6e | 64 20 61 6c 74 65 72 20 |notes an|d alter |
|00003160| 63 6f 6e 74 72 6f 6c 6c | 65 72 20 73 65 74 74 69 |controll|er setti|
|00003170| 6e 67 73 20 6f 6e 20 74 | 68 65 20 6e 6f 74 65 20 |ngs on t|he note |
|00003180| 63 68 61 6e 6e 65 6c 2e | 20 54 68 65 20 63 61 6c |channel.| The cal|
|00003190| 6c 73 20 74 68 61 74 20 | 6f 70 65 72 61 74 65 20 |ls that |operate |
|000031a0| 6f 6e 20 61 20 6e 6f 74 | 65 20 63 68 61 6e 6e 65 |on a not|e channe|
|000031b0| 6c 20 61 72 65 20 71 75 | 69 74 65 20 73 69 6d 69 |l are qu|ite simi|
|000031c0| 6c 61 72 20 74 6f 20 74 | 68 65 20 63 61 6c 6c 73 |lar to t|he calls|
|000031d0| 20 74 68 61 74 20 6f 70 | 65 72 61 74 65 20 6f 6e | that op|erate on|
|000031e0| 20 6d 75 73 69 63 20 63 | 6f 6d 70 6f 6e 65 6e 74 | music c|omponent|
|000031f0| 73 2e 20 54 79 70 69 63 | 61 6c 6c 79 2c 20 61 6e |s. Typic|ally, an|
|00003200| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 77 69 6c | applica|tion wil|
|00003210| 6c 20 61 63 63 65 73 73 | 20 6d 75 73 69 63 20 63 |l access| music c|
|00003220| 6f 6d 70 6f 6e 65 6e 74 | 73 20 74 68 72 6f 75 67 |omponent|s throug|
|00003230| 68 20 74 68 65 20 4e 6f | 74 65 20 41 6c 6c 6f 63 |h the No|te Alloc|
|00003240| 61 74 6f 72 2c 20 61 6e | 64 20 6e 6f 74 20 64 69 |ator, an|d not di|
|00003250| 72 65 63 74 6c 79 2e 0d | 4c 61 73 74 6c 79 2c 20 |rectly..|Lastly, |
|00003260| 74 68 65 72 65 20 69 73 | 20 61 6e 20 d2 69 6e 73 |there is| an .ins|
|00003270| 74 72 75 6d 65 6e 74 20 | 70 69 63 6b 65 72 2c d3 |trument |picker,.|
|00003280| 20 77 68 69 63 68 20 70 | 72 6f 76 69 64 65 73 20 | which p|rovides |
|00003290| 61 20 73 74 61 6e 64 61 | 72 64 20 75 73 65 72 2d |a standa|rd user-|
|000032a0| 69 6e 74 65 72 66 61 63 | 65 20 66 6f 72 20 63 68 |interfac|e for ch|
|000032b0| 6f 6f 73 69 6e 67 20 61 | 6e 20 69 6e 73 74 72 75 |oosing a|n instru|
|000032c0| 6d 65 6e 74 20 73 6f 75 | 6e 64 2e 0d 54 68 65 20 |ment sou|nd..The |
|000032d0| 4e 6f 74 65 20 41 6c 6c | 6f 63 61 74 6f 72 20 69 |Note All|ocator i|
|000032e0| 73 20 69 6d 70 6c 65 6d | 65 6e 74 65 64 20 61 73 |s implem|ented as|
|000032f0| 20 61 20 63 6f 6d 70 6f | 6e 65 6e 74 2e 20 54 6f | a compo|nent. To|
|00003300| 20 75 73 65 20 69 74 2c | 20 74 68 65 20 61 70 70 | use it,| the app|
|00003310| 6c 69 63 61 74 69 6f 6e | 20 6d 75 73 74 20 66 69 |lication| must fi|
|00003320| 6e 64 20 74 68 65 20 63 | 6f 6d 70 6f 6e 65 6e 74 |nd the c|omponent|
|00003330| 20 61 6e 64 20 6f 70 65 | 6e 20 61 6e 20 69 6e 73 | and ope|n an ins|
|00003340| 74 61 6e 63 65 20 6f 66 | 20 69 74 2e 20 57 68 65 |tance of| it. Whe|
|00003350| 6e 20 74 68 61 74 20 69 | 6e 73 74 61 6e 63 65 20 |n that i|nstance |
|00003360| 69 73 20 63 6c 6f 73 65 | 64 2c 20 61 6e 79 20 6e |is close|d, any n|
|00003370| 6f 74 65 20 63 68 61 6e | 6e 65 6c 73 20 63 72 65 |ote chan|nels cre|
|00003380| 61 74 65 64 20 77 69 74 | 68 20 74 68 61 74 20 69 |ated wit|h that i|
|00003390| 6e 73 74 61 6e 63 65 20 | 61 72 65 20 64 69 73 70 |nstance |are disp|
|000033a0| 6f 73 65 64 2e 20 4d 75 | 73 69 63 20 64 65 76 69 |osed. Mu|sic devi|
|000033b0| 63 65 73 20 72 65 67 69 | 73 74 65 72 65 64 20 77 |ces regi|stered w|
|000033c0| 69 74 68 20 74 68 61 74 | 20 69 6e 73 74 61 6e 63 |ith that| instanc|
|000033d0| 65 20 61 72 65 20 6e 6f | 74 20 75 6e 72 65 67 69 |e are no|t unregi|
|000033e0| 73 74 65 72 65 64 2c 20 | 68 6f 77 65 76 65 72 20 |stered, |however |
|000033f0| 2d 2d 20 74 68 65 79 20 | 61 72 65 20 70 65 72 73 |-- they |are pers|
|00003400| 69 73 74 65 6e 74 2e 0d | 54 68 65 20 63 61 6c 6c |istent..|The call|
|00003410| 20 73 65 74 20 69 73 20 | 61 73 20 66 6f 6c 6c 6f | set is |as follo|
|00003420| 77 73 2e 0d 70 61 73 63 | 61 6c 20 43 6f 6d 70 6f |ws..pasc|al Compo|
|00003430| 6e 65 6e 74 52 65 73 75 | 6c 74 20 4e 41 52 65 67 |nentResu|lt NAReg|
|00003440| 69 73 74 65 72 4d 75 73 | 69 63 44 65 76 69 63 65 |isterMus|icDevice|
|00003450| 20 28 4e 6f 74 65 41 6c | 6c 6f 63 61 74 6f 72 20 | (NoteAl|locator |
|00003460| 6e 61 2c 20 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e |na, unsi|gned lon|
|00003470| 67 20 73 79 6e 74 68 54 | 79 70 65 2c 53 74 72 33 |g synthT|ype,Str3|
|00003480| 31 20 6e 61 6d 65 2c 20 | 53 79 6e 74 68 65 73 69 |1 name, |Synthesi|
|00003490| 7a 65 72 43 6f 6e 6e 65 | 63 74 69 6f 6e 73 20 2a |zerConne|ctions *|
|000034a0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 73 29 3b 0d 52 65 |connecti|ons);.Re|
|000034b0| 67 69 73 74 65 72 73 20 | 61 20 70 61 72 74 69 63 |gisters |a partic|
|000034c0| 75 6c 61 72 20 74 79 70 | 65 20 6f 66 20 6d 75 73 |ular typ|e of mus|
|000034d0| 69 63 20 63 6f 6d 70 6f | 6e 65 6e 74 20 77 69 74 |ic compo|nent wit|
|000034e0| 68 20 74 68 65 20 74 68 | 65 20 4e 6f 74 65 20 41 |h the th|e Note A|
|000034f0| 6c 6c 6f 63 61 74 6f 72 | 2e 20 54 68 65 20 73 79 |llocator|. The sy|
|00003500| 6e 74 68 54 79 70 65 20 | 69 73 20 74 68 65 20 73 |nthType |is the s|
|00003510| 61 6d 65 20 61 73 20 74 | 68 65 20 63 6f 6d 70 6f |ame as t|he compo|
|00003520| 6e 65 6e 74 20 73 75 62 | 74 79 70 65 20 6f 66 20 |nent sub|type of |
|00003530| 74 68 65 20 6d 75 73 69 | 63 20 63 6f 6d 70 6f 6e |the musi|c compon|
|00003540| 65 6e 74 2e 20 54 68 65 | 20 6e 61 6d 65 20 69 73 |ent. The| name is|
|00003550| 20 61 20 6d 65 61 6e 73 | 20 6f 66 20 64 69 73 74 | a means| of dist|
|00003560| 69 6e 67 75 69 73 68 69 | 6e 67 20 6d 75 6c 74 69 |inguishi|ng multi|
|00003570| 70 6c 65 20 69 6e 73 74 | 61 6e 63 65 73 20 6f 66 |ple inst|ances of|
|00003580| 20 74 68 65 20 73 61 6d | 65 20 74 79 70 65 20 6f | the sam|e type o|
|00003590| 66 20 64 65 76 69 63 65 | 3b 20 69 66 20 6e 6f 74 |f device|; if not|
|000035a0| 20 70 61 73 73 65 64 2c | 20 74 68 65 20 6e 61 6d | passed,| the nam|
|000035b0| 65 20 64 65 66 61 75 6c | 74 73 20 74 6f 20 74 68 |e defaul|ts to th|
|000035c0| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 6d 75 |e name o|f the mu|
|000035d0| 73 69 63 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 74 79 |sic comp|onent ty|
|000035e0| 70 65 2e 20 54 68 65 20 | 63 6f 6e 6e 65 63 74 69 |pe. The |connecti|
|000035f0| 6f 6e 73 20 73 70 65 63 | 69 66 79 20 74 68 65 20 |ons spec|ify the |
|00003600| 68 61 72 64 77 61 72 65 | 20 63 6f 6e 6e 65 63 74 |hardware| connect|
|00003610| 69 6f 6e 73 20 74 6f 20 | 74 68 65 20 64 65 76 69 |ions to |the devi|
|00003620| 63 65 2e 0d 70 61 73 63 | 61 6c 20 43 6f 6d 70 6f |ce..pasc|al Compo|
|00003630| 6e 65 6e 74 52 65 73 75 | 6c 74 20 4e 41 55 6e 72 |nentResu|lt NAUnr|
|00003640| 65 67 69 73 74 65 72 4d | 75 73 69 63 44 65 76 69 |egisterM|usicDevi|
|00003650| 63 65 20 28 4e 6f 74 65 | 41 6c 6c 6f 63 61 74 6f |ce (Note|Allocato|
|00003660| 72 20 6e 61 2c 20 75 6e | 73 69 67 6e 65 64 20 6c |r na, un|signed l|
|00003670| 6f 6e 67 20 73 79 6e 74 | 68 54 79 70 65 2c 20 53 |ong synt|hType, S|
|00003680| 79 6e 74 68 65 73 69 7a | 65 72 43 6f 6e 6e 65 63 |ynthesiz|erConnec|
|00003690| 74 69 6f 6e 73 20 2a 63 | 6f 6e 6e 65 63 74 69 6f |tions *c|onnectio|
|000036a0| 6e 73 29 3b 0d 52 65 6d | 6f 76 65 73 20 61 20 6d |ns);.Rem|oves a m|
|000036b0| 75 73 69 63 20 63 6f 6d | 70 6f 6e 65 6e 74 20 66 |usic com|ponent f|
|000036c0| 72 6f 6d 20 74 68 6f 73 | 65 20 61 76 61 69 6c 61 |rom thos|e availa|
|000036d0| 62 6c 65 20 74 6f 20 74 | 68 65 20 4e 6f 74 65 20 |ble to t|he Note |
|000036e0| 41 6c 6c 6f 63 61 74 6f | 72 2e 0d 70 61 73 63 61 |Allocato|r..pasca|
|000036f0| 6c 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 75 6c |l Compon|entResul|
|00003700| 74 20 4e 41 47 65 74 52 | 65 67 69 73 74 65 72 65 |t NAGetR|egistere|
|00003710| 64 4d 75 73 69 63 44 65 | 76 69 63 65 20 28 4e 6f |dMusicDe|vice (No|
|00003720| 74 65 41 6c 6c 6f 63 61 | 74 6f 72 20 6e 61 2c 20 |teAlloca|tor na, |
|00003730| 73 68 6f 72 74 20 69 6e | 64 65 78 2c 75 6e 73 69 |short in|dex,unsi|
|00003740| 67 6e 65 64 20 6c 6f 6e | 67 20 2a 73 79 6e 74 68 |gned lon|g *synth|
|00003750| 54 79 70 65 2c 53 74 72 | 33 31 20 6e 61 6d 65 2c |Type,Str|31 name,|
|00003760| 20 53 79 6e 74 68 65 73 | 69 7a 65 72 43 6f 6e 6e | Synthes|izerConn|
|00003770| 65 63 74 69 6f 6e 73 20 | 2a 63 6f 6e 6e 65 63 74 |ections |*connect|
|00003780| 69 6f 6e 73 2c 0d 09 4d | 75 73 69 63 43 6f 6d 70 |ions,..M|usicComp|
|00003790| 6f 6e 65 6e 74 20 2a 6d | 63 29 3b 0d 51 75 65 72 |onent *m|c);.Quer|
|000037a0| 69 65 73 20 74 68 65 20 | 4e 6f 74 65 20 41 6c 6c |ies the |Note All|
|000037b0| 6f 63 61 74 6f 72 20 61 | 62 6f 75 74 20 72 65 67 |ocator a|bout reg|
|000037c0| 69 73 74 65 72 65 64 20 | 6d 75 73 69 63 20 63 6f |istered |music co|
|000037d0| 6d 70 6f 6e 65 6e 74 73 | 2e 20 54 68 65 20 72 65 |mponents|. The re|
|000037e0| 74 75 72 6e 20 76 61 6c | 75 65 20 69 73 20 74 68 |turn val|ue is th|
|000037f0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 6d 75 73 69 |e number| of musi|
|00003800| 63 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 72 65 67 |c compon|ents reg|
|00003810| 69 73 74 65 72 65 64 20 | 77 69 74 68 20 74 68 65 |istered |with the|
|00003820| 20 4e 6f 74 65 20 41 6c | 6c 6f 63 61 74 6f 72 2e | Note Al|locator.|
|00003830| 20 54 68 65 20 69 6e 64 | 65 78 20 69 73 20 61 20 | The ind|ex is a |
|00003840| 76 61 6c 75 65 20 66 72 | 6f 6d 20 31 20 74 6f 20 |value fr|om 1 to |
|00003850| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 6d 75 |the numb|er of mu|
|00003860| 73 69 63 20 63 6f 6d 70 | 6f 6e 65 6e 74 73 2e 20 |sic comp|onents. |
|00003870| 49 66 20 69 6e 64 65 78 | 20 69 73 20 7a 65 72 6f |If index| is zero|
|00003880| 2c 20 74 68 61 6e 20 6f | 6e 6c 79 20 74 68 65 20 |, than o|nly the |
|00003890| 63 6f 6d 70 6f 6e 65 6e | 74 20 63 6f 75 6e 74 20 |componen|t count |
|000038a0| 69 73 20 72 65 74 75 72 | 6e 65 64 2e 0d 70 61 73 |is retur|ned..pas|
|000038b0| 63 61 6c 20 43 6f 6d 70 | 6f 6e 65 6e 74 52 65 73 |cal Comp|onentRes|
|000038c0| 75 6c 74 20 4e 41 53 61 | 76 65 4d 75 73 69 63 43 |ult NASa|veMusicC|
|000038d0| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 28 4e 6f |onfigura|tion (No|
|000038e0| 74 65 41 6c 6c 6f 63 61 | 74 6f 72 20 6e 61 29 3b |teAlloca|tor na);|
|000038f0| 0d 53 61 76 65 73 20 74 | 68 65 20 63 75 72 72 65 |.Saves t|he curre|
|00003900| 6e 74 20 6c 69 73 74 20 | 6f 66 20 72 65 67 69 73 |nt list |of regis|
|00003910| 74 65 72 65 64 20 64 65 | 76 69 63 65 73 20 74 6f |tered de|vices to|
|00003920| 20 61 20 66 69 6c 65 2e | 20 54 68 69 73 20 66 69 | a file.| This fi|
|00003930| 6c 65 20 69 73 20 72 65 | 61 64 20 77 68 65 6e 65 |le is re|ad whene|
|00003940| 76 65 72 20 74 68 65 20 | 4e 6f 74 65 20 41 6c 6c |ver the |Note All|
|00003950| 6f 63 61 74 6f 72 20 69 | 73 20 6f 70 65 6e 65 64 |ocator i|s opened|
|00003960| 2c 20 72 65 73 74 6f 72 | 69 6e 67 20 74 68 65 20 |, restor|ing the |
|00003970| 70 72 65 76 69 6f 75 73 | 6c 79 20 63 6f 6e 66 69 |previous|ly confi|
|00003980| 67 75 72 65 64 20 6c 69 | 73 74 20 6f 66 20 64 65 |gured li|st of de|
|00003990| 76 69 63 65 73 2e 20 54 | 68 65 20 66 69 6c 65 20 |vices. T|he file |
|000039a0| 69 73 20 63 61 6c 6c 65 | 64 20 d2 4d 75 73 69 63 |is calle|d .Music|
|000039b0| 20 50 72 65 66 65 72 65 | 6e 63 65 73 d3 20 61 6e | Prefere|nces. an|
|000039c0| 64 20 69 73 20 70 6c 61 | 63 65 64 20 69 6e 20 74 |d is pla|ced in t|
|000039d0| 68 65 20 d2 50 72 65 66 | 65 72 65 6e 63 65 73 d3 |he .Pref|erences.|
|000039e0| 20 73 75 62 66 6f 6c 64 | 65 72 20 6f 66 20 74 68 | subfold|er of th|
|000039f0| 65 20 73 79 73 74 65 6d | 20 66 6f 6c 64 65 72 2e |e system| folder.|
|00003a00| 0d 70 61 73 63 61 6c 20 | 43 6f 6d 70 6f 6e 65 6e |.pascal |Componen|
|00003a10| 74 52 65 73 75 6c 74 20 | 4e 41 4e 65 77 4e 6f 74 |tResult |NANewNot|
|00003a20| 65 43 68 61 6e 6e 65 6c | 20 28 4e 6f 74 65 41 6c |eChannel| (NoteAl|
|00003a30| 6c 6f 63 61 74 6f 72 20 | 6e 61 2c 20 4e 6f 74 65 |locator |na, Note|
|00003a40| 52 65 71 75 65 73 74 20 | 2a 6e 6f 74 65 52 65 71 |Request |*noteReq|
|00003a50| 75 65 73 74 2c 4e 6f 74 | 65 43 68 61 6e 6e 65 6c |uest,Not|eChannel|
|00003a60| 20 2a 6f 75 74 43 68 61 | 6e 6e 65 6c 29 3b 0d 52 | *outCha|nnel);.R|
|00003a70| 65 71 75 65 73 74 73 20 | 61 20 6e 6f 74 65 20 63 |equests |a note c|
|00003a80| 68 61 6e 6e 65 6c 2c 20 | 77 69 74 68 20 74 68 65 |hannel, |with the|
|00003a90| 20 71 75 61 6c 69 74 69 | 65 73 20 64 65 73 63 72 | qualiti|es descr|
|00003aa0| 69 62 65 64 20 69 6e 20 | 74 68 65 20 6e 6f 74 65 |ibed in |the note|
|00003ab0| 52 65 71 75 65 73 74 20 | 72 65 63 6f 72 64 2e 20 |Request |record. |
|00003ac0| 41 20 76 61 6c 75 65 20 | 6d 61 79 20 73 74 69 6c |A value |may stil|
|00003ad0| 6c 20 62 65 20 72 65 74 | 75 72 6e 65 64 20 69 6e |l be ret|urned in|
|00003ae0| 20 6f 75 74 43 68 61 6e | 6e 65 6c 2c 20 65 76 65 | outChan|nel, eve|
|00003af0| 6e 20 69 66 20 6e 6f 74 | 65 43 68 61 6e 6e 65 6c |n if not|eChannel|
|00003b00| 20 72 65 71 75 65 73 74 | 20 63 61 6e 6e 6f 74 20 | request| cannot |
|00003b10| 62 65 20 73 61 74 69 73 | 66 69 65 64 2e 20 54 68 |be satis|fied. Th|
|00003b20| 65 20 6e 6f 74 65 20 63 | 68 61 6e 6e 65 6c 20 6d |e note c|hannel m|
|00003b30| 61 79 20 62 65 63 6f 6d | 65 20 76 61 6c 69 64 20 |ay becom|e valid |
|00003b40| 61 74 20 61 20 6c 61 74 | 65 72 20 74 69 6d 65 2c |at a lat|er time,|
|00003b50| 20 61 73 20 6f 74 68 65 | 72 20 6e 6f 74 65 20 63 | as othe|r note c|
|00003b60| 68 61 6e 6e 65 6c 73 20 | 61 72 65 20 72 65 6c 65 |hannels |are rele|
|00003b70| 61 73 65 64 2c 20 6f 72 | 20 6f 74 68 65 72 20 6d |ased, or| other m|
|00003b80| 75 73 69 63 20 63 6f 6d | 70 6f 6e 65 6e 74 73 20 |usic com|ponents |
|00003b90| 61 72 65 20 72 65 67 69 | 73 74 65 72 65 64 2e 0d |are regi|stered..|
|00003ba0| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 0d 09 |typedef |struct..|
|00003bb0| 7b 0d 09 73 68 6f 72 74 | 20 70 6f 6c 79 70 68 6f |{..short| polypho|
|00003bc0| 6e 79 3b 09 09 2f 2a 20 | 50 72 65 66 65 72 72 65 |ny;../* |Preferre|
|00003bd0| 64 20 6e 75 6d 62 65 72 | 20 6f 66 20 76 6f 69 63 |d number| of voic|
|00003be0| 65 73 20 2a 2f 0d 09 54 | 6f 6e 65 44 65 73 63 72 |es */..T|oneDescr|
|00003bf0| 69 70 74 69 6f 6e 20 74 | 6f 6e 65 3b 0d 09 7d 20 |iption t|one;..} |
|00003c00| 4e 6f 74 65 52 65 71 75 | 65 73 74 3b 0d 70 61 73 |NoteRequ|est;.pas|
|00003c10| 63 61 6c 20 43 6f 6d 70 | 6f 6e 65 6e 74 52 65 73 |cal Comp|onentRes|
|00003c20| 75 6c 74 20 4e 41 44 69 | 73 70 6f 73 65 4e 6f 74 |ult NADi|sposeNot|
|00003c30| 65 43 68 61 6e 6e 65 6c | 20 28 4e 6f 74 65 41 6c |eChannel| (NoteAl|
|00003c40| 6c 6f 63 61 74 6f 72 20 | 6e 61 2c 20 4e 6f 74 65 |locator |na, Note|
|00003c50| 43 68 61 6e 6e 65 6c 20 | 6e 6f 74 65 43 68 61 6e |Channel |noteChan|
|00003c60| 6e 65 6c 29 3b 0d 52 65 | 6c 65 61 73 65 73 20 61 |nel);.Re|leases a|
|00003c70| 20 6e 6f 74 65 20 63 68 | 61 6e 6e 65 6c 2e 0d 70 | note ch|annel..p|
|00003c80| 61 73 63 61 6c 20 43 6f | 6d 70 6f 6e 65 6e 74 52 |ascal Co|mponentR|
|00003c90| 65 73 75 6c 74 20 4e 41 | 47 65 74 4e 6f 74 65 43 |esult NA|GetNoteC|
|00003ca0| 68 61 6e 6e 65 6c 49 6e | 66 6f 20 28 4e 6f 74 65 |hannelIn|fo (Note|
|00003cb0| 41 6c 6c 6f 63 61 74 6f | 72 20 6e 61 2c 20 4e 6f |Allocato|r na, No|
|00003cc0| 74 65 43 68 61 6e 6e 65 | 6c 20 6e 6f 74 65 43 68 |teChanne|l noteCh|
|00003cd0| 61 6e 6e 65 6c 2c 73 68 | 6f 72 74 20 2a 69 6e 64 |annel,sh|ort *ind|
|00003ce0| 65 78 2c 73 68 6f 72 74 | 20 2a 63 68 61 6e 6e 65 |ex,short| *channe|
|00003cf0| 6c 29 3b 0d 52 65 74 75 | 72 6e 73 20 74 68 65 20 |l);.Retu|rns the |
|00003d00| 69 6e 64 65 78 20 6f 66 | 20 74 68 65 20 6d 75 73 |index of| the mus|
|00003d10| 69 63 20 63 6f 6d 70 6f | 6e 65 6e 74 20 74 68 61 |ic compo|nent tha|
|00003d20| 74 20 74 68 65 20 63 68 | 61 6e 6e 65 6c 20 68 61 |t the ch|annel ha|
|00003d30| 73 20 62 65 65 6e 20 61 | 6c 6c 6f 63 61 74 65 64 |s been a|llocated|
|00003d40| 20 6f 6e 2c 20 61 6e 64 | 20 74 68 65 20 4d 49 44 | on, and| the MID|
|00003d50| 49 20 63 68 61 6e 6e 65 | 6c 20 6f 66 20 74 68 65 |I channe|l of the|
|00003d60| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 68 | corresp|onding h|
|00003d70| 61 72 64 77 61 72 65 20 | 64 65 76 69 63 65 2c 20 |ardware |device, |
|00003d80| 69 66 20 72 65 6c 65 76 | 61 6e 74 2e 20 54 68 65 |if relev|ant. The|
|00003d90| 20 69 6e 64 65 78 20 77 | 69 6c 6c 20 62 65 20 69 | index w|ill be i|
|00003da0| 6e 76 61 6c 69 64 20 69 | 66 20 6d 75 73 69 63 20 |nvalid i|f music |
|00003db0| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 61 72 65 20 73 |componen|ts are s|
|00003dc0| 75 62 73 65 71 75 65 6e | 74 6c 79 20 72 65 67 69 |ubsequen|tly regi|
|00003dd0| 73 74 65 72 65 64 20 6f | 72 20 75 6e 72 65 67 69 |stered o|r unregi|
|00003de0| 73 74 65 72 65 64 2e 0d | 70 61 73 63 61 6c 20 43 |stered..|pascal C|
|00003df0| 6f 6d 70 6f 6e 65 6e 74 | 52 65 73 75 6c 74 20 4e |omponent|Result N|
|00003e00| 41 50 72 65 72 6f 6c 6c | 4e 6f 74 65 43 68 61 6e |APreroll|NoteChan|
|00003e10| 6e 65 6c 20 28 4e 6f 74 | 65 41 6c 6c 6f 63 61 74 |nel (Not|eAllocat|
|00003e20| 6f 72 20 6e 61 2c 20 4e | 6f 74 65 43 68 61 6e 6e |or na, N|oteChann|
|00003e30| 65 6c 20 6e 6f 74 65 43 | 68 61 6e 6e 65 6c 29 3b |el noteC|hannel);|
|00003e40| 0d 41 74 74 65 6d 70 74 | 73 20 74 6f 20 72 65 61 |.Attempt|s to rea|
|00003e50| 6c 6c 6f 63 61 74 65 20 | 74 68 65 20 6e 6f 74 65 |llocate |the note|
|00003e60| 20 63 68 61 6e 6e 65 6c | 2c 20 69 66 20 69 74 20 | channel|, if it |
|00003e70| 77 61 73 20 69 6e 76 61 | 6c 69 64 20 70 72 65 76 |was inva|lid prev|
|00003e80| 69 6f 75 73 6c 79 2e 20 | 49 74 20 63 6f 75 6c 64 |iously. |It could|
|00003e90| 20 68 61 76 65 20 62 65 | 65 6e 20 69 6e 76 61 6c | have be|en inval|
|00003ea0| 69 64 20 69 66 20 74 68 | 65 72 65 20 77 65 72 65 |id if th|ere were|
|00003eb0| 20 6e 6f 20 61 76 61 69 | 6c 61 62 6c 65 20 76 6f | no avai|lable vo|
|00003ec0| 69 63 65 73 20 6f 6e 20 | 61 6e 79 20 72 65 67 69 |ices on |any regi|
|00003ed0| 73 74 65 72 65 64 20 6d | 75 73 69 63 20 63 6f 6d |stered m|usic com|
|00003ee0| 70 6f 6e 65 6e 74 73 20 | 77 68 65 6e 20 74 68 65 |ponents |when the|
|00003ef0| 20 6e 6f 74 65 20 63 68 | 61 6e 6e 65 6c 20 77 61 | note ch|annel wa|
|00003f00| 73 20 63 72 65 61 74 65 | 64 2e 0d 70 61 73 63 61 |s create|d..pasca|
|00003f10| 6c 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 75 6c |l Compon|entResul|
|00003f20| 74 20 4e 41 55 6e 72 6f | 6c 6c 4e 6f 74 65 43 68 |t NAUnro|llNoteCh|
|00003f30| 61 6e 6e 65 6c 28 4e 6f | 74 65 41 6c 6c 6f 63 61 |annel(No|teAlloca|
|00003f40| 74 6f 72 20 6e 61 2c 20 | 4e 6f 74 65 43 68 61 6e |tor na, |NoteChan|
|00003f50| 6e 65 6c 20 6e 6f 74 65 | 43 68 61 6e 6e 65 6c 29 |nel note|Channel)|
|00003f60| 3b 0d 4d 61 72 6b 73 20 | 61 20 6e 6f 74 65 20 63 |;.Marks |a note c|
|00003f70| 68 61 6e 6e 65 6c 20 61 | 73 20 61 76 61 69 6c 61 |hannel a|s availa|
|00003f80| 62 6c 65 20 74 6f 20 62 | 65 20 73 74 6f 6c 65 6e |ble to b|e stolen|
|00003f90| 2e 20 54 68 65 20 4d 49 | 44 49 20 63 68 61 6e 6e |. The MI|DI chann|
|00003fa0| 65 6c 20 69 74 20 72 65 | 73 69 64 65 73 20 6f 6e |el it re|sides on|
|00003fb0| 2c 20 61 6e 64 20 74 68 | 65 20 73 79 6e 74 68 65 |, and th|e synthe|
|00003fc0| 73 69 7a 65 72 20 75 73 | 65 64 20 74 6f 20 70 6c |sizer us|ed to pl|
|00003fd0| 61 79 20 69 74 2c 20 6d | 69 67 68 74 20 62 65 20 |ay it, m|ight be |
|00003fe0| 73 74 6f 6c 65 6e 20 62 | 79 20 61 6e 6f 74 68 65 |stolen b|y anothe|
|00003ff0| 72 20 6e 6f 74 65 20 63 | 68 61 6e 6e 65 6c 2e 20 |r note c|hannel. |
|00004000| 41 20 64 6f 63 75 6d 65 | 6e 74 20 77 68 6f 73 65 |A docume|nt whose|
|00004010| 20 77 69 6e 64 6f 77 20 | 69 73 20 6d 6f 76 65 64 | window |is moved|
|00004020| 20 74 6f 20 74 68 65 20 | 62 61 63 6b 67 72 6f 75 | to the |backgrou|
|00004030| 6e 64 20 6d 69 67 68 74 | 20 77 69 73 68 20 74 6f |nd might| wish to|
|00004040| 20 75 6e 72 6f 6c 6c 20 | 69 74 73 20 63 68 61 6e | unroll |its chan|
|00004050| 6e 65 6c 73 2e 0d 70 61 | 73 63 61 6c 20 43 6f 6d |nels..pa|scal Com|
|00004060| 70 6f 6e 65 6e 74 52 65 | 73 75 6c 74 20 4e 41 44 |ponentRe|sult NAD|
|00004070| 69 73 65 6e 67 61 67 65 | 4e 6f 74 65 43 68 61 6e |isengage|NoteChan|
|00004080| 6e 65 6c 20 28 4e 6f 74 | 65 41 6c 6c 6f 63 61 74 |nel (Not|eAllocat|
|00004090| 6f 72 20 6e 61 2c 20 4e | 6f 74 65 43 68 61 6e 6e |or na, N|oteChann|
|000040a0| 65 6c 20 6e 6f 74 65 43 | 68 61 6e 6e 65 6c 2c 20 |el noteC|hannel, |
|000040b0| 42 6f 6f 6c 65 61 6e 20 | 73 69 6c 65 6e 63 65 4e |Boolean |silenceN|
|000040c0| 6f 74 65 73 29 3b 0d 43 | 61 75 73 65 73 20 61 20 |otes);.C|auses a |
|000040d0| 6e 6f 74 65 20 63 68 61 | 6e 6e 65 6c 20 74 6f 20 |note cha|nnel to |
|000040e0| 69 67 6e 6f 72 65 20 69 | 6e 63 6f 6d 69 6e 67 20 |ignore i|ncoming |
|000040f0| 6e 6f 74 65 20 61 6e 64 | 20 63 6f 6e 74 72 6f 6c |note and| control|
|00004100| 6c 65 72 20 63 6f 6d 6d | 61 6e 64 73 2e 20 54 68 |ler comm|ands. Th|
|00004110| 69 73 20 69 73 20 75 73 | 65 66 75 6c 20 66 6f 72 |is is us|eful for|
|00004120| 20 66 61 73 74 2d 66 6f | 72 77 61 72 64 69 6e 67 | fast-fo|rwarding|
|00004130| 20 6f 72 20 72 65 77 69 | 6e 64 69 6e 67 20 74 6f | or rewi|nding to|
|00004140| 20 61 20 73 70 65 63 69 | 66 69 63 20 73 70 6f 74 | a speci|fic spot|
|00004150| 20 69 6e 20 61 20 73 63 | 6f 72 65 2e 20 49 66 20 | in a sc|ore. If |
|00004160| 73 69 6c 65 6e 63 65 4e | 6f 74 65 73 20 69 73 20 |silenceN|otes is |
|00004170| 74 72 75 65 2c 20 74 68 | 65 6e 20 61 6e 79 20 6e |true, th|en any n|
|00004180| 6f 74 65 73 20 63 75 72 | 72 65 6e 74 6c 79 20 70 |otes cur|rently p|
|00004190| 6c 61 79 69 6e 67 20 61 | 72 65 20 73 69 6c 65 6e |laying a|re silen|
|000041a0| 63 65 64 2e 0d 57 68 69 | 6c 65 20 74 68 65 20 6e |ced..Whi|le the n|
|000041b0| 6f 74 65 20 63 68 61 6e | 6e 65 6c 20 69 73 20 64 |ote chan|nel is d|
|000041c0| 69 73 65 6e 67 61 67 65 | 64 2c 20 74 68 65 20 73 |isengage|d, the s|
|000041d0| 74 61 74 65 20 6f 66 20 | 6e 6f 74 65 73 20 61 6e |tate of |notes an|
|000041e0| 64 20 63 6f 6e 74 72 6f | 6c 6c 65 72 73 20 69 73 |d contro|llers is|
|000041f0| 20 73 74 69 6c 6c 20 6d | 6f 6e 69 74 6f 72 65 64 | still m|onitored|
|00004200| 2c 20 73 6f 20 74 68 61 | 74 20 77 68 65 6e 20 74 |, so tha|t when t|
|00004210| 68 65 20 63 68 61 6e 6e | 65 6c 20 69 73 20 65 6e |he chann|el is en|
|00004220| 67 61 67 65 64 2c 20 74 | 68 65 20 6e 6f 74 65 73 |gaged, t|he notes|
|00004230| 20 61 6e 64 20 63 6f 6e | 74 72 6f 6c 6c 65 72 73 | and con|trollers|
|00004240| 20 77 69 6c 6c 20 62 65 | 20 70 6c 61 79 69 6e 67 | will be| playing|
|00004250| 20 61 73 20 69 66 20 74 | 68 65 20 6e 6f 74 65 20 | as if t|he note |
|00004260| 63 68 61 6e 6e 65 6c 20 | 68 61 64 20 62 65 65 6e |channel |had been|
|00004270| 20 63 6f 6e 74 69 6e 75 | 6f 75 73 6c 79 20 65 6e | continu|ously en|
|00004280| 67 61 67 65 64 2e 0d 70 | 61 73 63 61 6c 20 43 6f |gaged..p|ascal Co|
|00004290| 6d 70 6f 6e 65 6e 74 52 | 65 73 75 6c 74 20 4e 41 |mponentR|esult NA|
|000042a0| 45 6e 67 61 67 65 4e 6f | 74 65 43 68 61 6e 6e 65 |EngageNo|teChanne|
|000042b0| 6c 28 4e 6f 74 65 41 6c | 6c 6f 63 61 74 6f 72 20 |l(NoteAl|locator |
|000042c0| 6e 61 2c 20 4e 6f 74 65 | 43 68 61 6e 6e 65 6c 20 |na, Note|Channel |
|000042d0| 6e 6f 74 65 43 68 61 6e | 6e 65 6c 29 3b 0d 43 61 |noteChan|nel);.Ca|
|000042e0| 75 73 65 73 20 74 68 65 | 20 73 74 61 74 65 20 6f |uses the| state o|
|000042f0| 66 20 61 20 64 69 73 65 | 6e 67 61 67 65 64 20 6e |f a dise|ngaged n|
|00004300| 6f 74 65 20 63 68 61 6e | 6e 65 6c 20 74 6f 20 62 |ote chan|nel to b|
|00004310| 65 20 69 6e 73 74 61 6e | 74 69 61 74 65 64 2e 20 |e instan|tiated. |
|00004320| 41 6e 79 20 64 69 66 66 | 65 72 65 6e 63 65 20 69 |Any diff|erence i|
|00004330| 6e 20 6e 6f 74 65 73 20 | 6f 72 20 63 6f 6e 74 72 |n notes |or contr|
|00004340| 6f 6c 6c 65 72 73 20 62 | 65 74 77 65 65 6e 20 74 |ollers b|etween t|
|00004350| 68 65 20 65 6e 67 61 67 | 65 64 20 73 74 61 74 65 |he engag|ed state|
|00004360| 20 61 6e 64 20 74 68 65 | 20 64 69 73 65 6e 67 61 | and the| disenga|
|00004370| 67 65 64 20 73 74 61 74 | 65 20 61 72 65 20 73 65 |ged stat|e are se|
|00004380| 6e 74 20 74 6f 20 74 68 | 65 20 6d 75 73 69 63 20 |nt to th|e music |
|00004390| 63 6f 6d 70 6f 6e 65 6e | 74 2e 0d 70 61 73 63 61 |componen|t..pasca|
|000043a0| 6c 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 75 6c |l Compon|entResul|
|000043b0| 74 20 4e 41 50 6c 61 79 | 4e 6f 74 65 20 28 4e 6f |t NAPlay|Note (No|
|000043c0| 74 65 41 6c 6c 6f 63 61 | 74 6f 72 20 6e 61 2c 20 |teAlloca|tor na, |
|000043d0| 4e 6f 74 65 43 68 61 6e | 6e 65 6c 20 6e 6f 74 65 |NoteChan|nel note|
|000043e0| 43 68 61 6e 6e 65 6c 2c | 73 68 6f 72 74 20 70 69 |Channel,|short pi|
|000043f0| 74 63 68 2c 73 68 6f 72 | 74 20 76 65 6c 6f 63 69 |tch,shor|t veloci|
|00004400| 74 79 29 3b 0d 50 6c 61 | 79 73 20 61 20 6e 6f 74 |ty);.Pla|ys a not|
|00004410| 65 20 6f 6e 20 74 68 65 | 20 6e 6f 74 65 20 63 68 |e on the| note ch|
|00004420| 61 6e 6e 65 6c 2e 0d 70 | 61 73 63 61 6c 20 43 6f |annel..p|ascal Co|
|00004430| 6d 70 6f 6e 65 6e 74 52 | 65 73 75 6c 74 20 4e 41 |mponentR|esult NA|
|00004440| 53 65 74 43 6f 6e 74 72 | 6f 6c 6c 65 72 20 28 4e |SetContr|oller (N|
|00004450| 6f 74 65 41 6c 6c 6f 63 | 61 74 6f 72 20 6e 61 2c |oteAlloc|ator na,|
|00004460| 0d 09 4e 6f 74 65 43 68 | 61 6e 6e 65 6c 20 6e 6f |..NoteCh|annel no|
|00004470| 74 65 43 68 61 6e 6e 65 | 6c 2c 20 73 68 6f 72 74 |teChanne|l, short|
|00004480| 20 63 6f 6e 74 72 6f 6c | 6c 65 72 4e 75 6d 62 65 | control|lerNumbe|
|00004490| 72 2c 73 68 6f 72 74 20 | 63 6f 6e 74 72 6f 6c 6c |r,short |controll|
|000044a0| 65 72 56 61 6c 75 65 29 | 3b 0d 53 65 74 73 20 61 |erValue)|;.Sets a|
|000044b0| 20 73 70 65 63 69 66 69 | 65 64 20 63 6f 6e 74 72 | specifi|ed contr|
|000044c0| 6f 6c 6c 65 72 20 6f 6e | 20 74 68 65 20 6e 6f 74 |oller on| the not|
|000044d0| 65 20 63 68 61 6e 6e 65 | 6c 20 74 6f 20 61 20 70 |e channe|l to a p|
|000044e0| 61 72 74 69 63 75 6c 61 | 72 20 76 61 6c 75 65 2e |articula|r value.|
|000044f0| 0d 70 61 73 63 61 6c 20 | 43 6f 6d 70 6f 6e 65 6e |.pascal |Componen|
|00004500| 74 52 65 73 75 6c 74 20 | 4e 41 53 65 74 4b 6e 6f |tResult |NASetKno|
|00004510| 62 20 28 4e 6f 74 65 41 | 6c 6c 6f 63 61 74 6f 72 |b (NoteA|llocator|
|00004520| 20 6e 61 2c 20 4e 6f 74 | 65 43 68 61 6e 6e 65 6c | na, Not|eChannel|
|00004530| 20 6e 6f 74 65 43 68 61 | 6e 6e 65 6c 2c 20 73 68 | noteCha|nnel, sh|
|00004540| 6f 72 74 20 63 6f 6e 74 | 72 6f 6c 6c 65 72 4e 75 |ort cont|rollerNu|
|00004550| 6d 62 65 72 2c 6c 6f 6e | 67 20 6b 6e 6f 62 56 61 |mber,lon|g knobVa|
|00004560| 6c 75 65 29 3b 0d 53 65 | 74 73 20 61 20 73 70 65 |lue);.Se|ts a spe|
|00004570| 63 69 66 69 65 64 20 6b | 6e 6f 62 20 6f 6e 20 74 |cified k|nob on t|
|00004580| 68 65 20 6e 6f 74 65 20 | 63 68 61 6e 6e 65 6c 20 |he note |channel |
|00004590| 74 6f 20 61 20 70 61 72 | 74 69 63 75 6c 61 72 20 |to a par|ticular |
|000045a0| 76 61 6c 75 65 2e 0d 70 | 61 73 63 61 6c 20 43 6f |value..p|ascal Co|
|000045b0| 6d 70 6f 6e 65 6e 74 52 | 65 73 75 6c 74 20 4e 41 |mponentR|esult NA|
|000045c0| 52 65 73 65 74 4e 6f 74 | 65 43 68 61 6e 6e 65 6c |ResetNot|eChannel|
|000045d0| 20 28 4e 6f 74 65 41 6c | 6c 6f 63 61 74 6f 72 20 | (NoteAl|locator |
|000045e0| 6e 61 2c 20 4e 6f 74 65 | 43 68 61 6e 6e 65 6c 20 |na, Note|Channel |
|000045f0| 6e 6f 74 65 43 68 61 6e | 6e 65 6c 29 3b 0d 54 75 |noteChan|nel);.Tu|
|00004600| 72 6e 73 20 6f 66 66 20 | 61 6c 6c 20 63 75 72 72 |rns off |all curr|
|00004610| 65 6e 74 6c 79 20 d2 6f | 6e d3 20 6e 6f 74 65 73 |ently .o|n. notes|
|00004620| 20 6f 6e 20 74 68 65 20 | 6e 6f 74 65 20 63 68 61 | on the |note cha|
|00004630| 6e 6e 65 6c 2c 20 61 6e | 64 20 72 65 73 65 74 73 |nnel, an|d resets|
|00004640| 20 61 6c 6c 20 63 6f 6e | 74 72 6f 6c 6c 65 72 73 | all con|trollers|
|00004650| 20 74 6f 20 74 68 65 69 | 72 20 64 65 66 61 75 6c | to thei|r defaul|
|00004660| 74 20 76 61 6c 75 65 73 | 2e 0d 70 61 73 63 61 6c |t values|..pascal|
|00004670| 20 43 6f 6d 70 6f 6e 65 | 6e 74 52 65 73 75 6c 74 | Compone|ntResult|
|00004680| 20 4e 41 46 69 6e 64 4e | 6f 74 65 43 68 61 6e 6e | NAFindN|oteChann|
|00004690| 65 6c 54 6f 6e 65 20 28 | 4e 6f 74 65 41 6c 6c 6f |elTone (|NoteAllo|
|000046a0| 63 61 74 6f 72 20 6e 61 | 2c 20 4e 6f 74 65 43 68 |cator na|, NoteCh|
|000046b0| 61 6e 6e 65 6c 20 6e 6f | 74 65 43 68 61 6e 6e 65 |annel no|teChanne|
|000046c0| 6c 2c 20 54 6f 6e 65 44 | 65 73 63 72 69 70 74 69 |l, ToneD|escripti|
|000046d0| 6f 6e 20 2a 74 64 2c 73 | 68 6f 72 74 20 2a 69 6e |on *td,s|hort *in|
|000046e0| 73 74 72 75 6d 65 6e 74 | 4e 75 6d 62 65 72 29 3b |strument|Number);|
|000046f0| 0d 4c 6f 63 61 74 65 73 | 20 74 68 65 20 62 65 73 |.Locates| the bes|
|00004700| 74 20 66 69 74 74 69 6e | 67 20 69 6e 73 74 72 75 |t fittin|g instru|
|00004710| 6d 65 6e 74 20 6e 75 6d | 62 65 72 20 6f 6e 20 74 |ment num|ber on t|
|00004720| 68 65 20 6e 6f 74 65 20 | 63 68 61 6e 6e 65 6c 20 |he note |channel |
|00004730| 66 6f 72 20 74 68 65 20 | 74 6f 6e 65 44 65 73 63 |for the |toneDesc|
|00004740| 72 69 70 74 69 6f 6e 20 | 72 65 71 75 65 73 74 65 |ription |requeste|
|00004750| 64 2e 0d 70 61 73 63 61 | 6c 20 43 6f 6d 70 6f 6e |d..pasca|l Compon|
|00004760| 65 6e 74 52 65 73 75 6c | 74 20 4e 41 53 65 74 4e |entResul|t NASetN|
|00004770| 6f 74 65 43 68 61 6e 6e | 65 6c 49 6e 73 74 72 75 |oteChann|elInstru|
|00004780| 6d 65 6e 74 20 28 4e 6f | 74 65 41 6c 6c 6f 63 61 |ment (No|teAlloca|
|00004790| 74 6f 72 20 6e 61 2c 20 | 4e 6f 74 65 43 68 61 6e |tor na, |NoteChan|
|000047a0| 6e 65 6c 20 6e 6f 74 65 | 43 68 61 6e 6e 65 6c 2c |nel note|Channel,|
|000047b0| 20 73 68 6f 72 74 20 69 | 6e 73 74 72 75 6d 65 6e | short i|nstrumen|
|000047c0| 74 4e 75 6d 62 65 72 29 | 3b 0d 43 68 61 6e 67 65 |tNumber)|;.Change|
|000047d0| 73 20 74 68 65 20 69 6e | 73 74 72 75 6d 65 6e 74 |s the in|strument|
|000047e0| 20 73 65 74 74 69 6e 67 | 20 6f 6e 20 74 68 65 20 | setting| on the |
|000047f0| 6e 6f 74 65 20 63 68 61 | 6e 6e 65 6c 20 74 6f 20 |note cha|nnel to |
|00004800| 74 68 65 20 69 6e 73 74 | 72 75 6d 65 6e 74 20 72 |the inst|rument r|
|00004810| 65 71 75 65 73 74 65 64 | 2e 0d 70 61 73 63 61 6c |equested|..pascal|
|00004820| 20 43 6f 6d 70 6f 6e 65 | 6e 74 52 65 73 75 6c 74 | Compone|ntResult|
|00004830| 20 4e 41 50 69 63 6b 49 | 6e 73 74 72 75 6d 65 6e | NAPickI|nstrumen|
|00004840| 74 20 28 4e 6f 74 65 41 | 6c 6c 6f 63 61 74 6f 72 |t (NoteA|llocator|
|00004850| 20 6e 61 2c 20 4d 6f 64 | 61 6c 46 69 6c 74 65 72 | na, Mod|alFilter|
|00004860| 50 72 6f 63 50 74 72 20 | 66 69 6c 74 65 72 50 72 |ProcPtr |filterPr|
|00004870| 6f 63 2c 20 53 74 72 69 | 6e 67 50 74 72 20 70 72 |oc, Stri|ngPtr pr|
|00004880| 6f 6d 70 74 2c 54 6f 6e | 65 44 65 73 63 72 69 70 |ompt,Ton|eDescrip|
|00004890| 74 69 6f 6e 20 2a 73 64 | 29 3b 0d 50 72 65 73 65 |tion *sd|);.Prese|
|000048a0| 6e 74 73 20 61 20 75 73 | 65 72 20 69 6e 74 65 72 |nts a us|er inter|
|000048b0| 66 61 63 65 20 66 6f 72 | 20 70 69 63 6b 69 6e 67 |face for| picking|
|000048c0| 20 61 6e 20 69 6e 73 74 | 72 75 6d 65 6e 74 2e 0d | an inst|rument..|
|000048d0| 20 0d 54 75 6e 65 20 50 | 6c 61 79 65 72 20 4d 6f | .Tune P|layer Mo|
|000048e0| 64 65 6c 20 61 6e 64 20 | 41 50 49 0d 54 68 65 20 |del and |API.The |
|000048f0| 54 75 6e 65 20 50 6c 61 | 79 65 72 20 70 69 65 63 |Tune Pla|yer piec|
|00004900| 65 20 6f 66 20 74 68 65 | 20 4d 75 73 69 63 20 41 |e of the| Music A|
|00004910| 72 63 68 69 74 65 63 74 | 75 72 65 20 63 6f 6e 74 |rchitect|ure cont|
|00004920| 61 69 6e 73 20 72 6f 75 | 74 69 6e 65 73 20 66 6f |ains rou|tines fo|
|00004930| 72 20 70 6c 61 79 69 6e | 67 20 65 6e 74 69 72 65 |r playin|g entire|
|00004940| 20 73 65 71 75 65 6e 63 | 65 73 2e 20 54 68 65 20 | sequenc|es. The |
|00004950| 54 75 6e 65 20 50 6c 61 | 79 65 72 20 77 69 6c 6c |Tune Pla|yer will|
|00004960| 20 61 6c 6c 6f 63 61 74 | 65 20 74 68 65 20 6e 65 | allocat|e the ne|
|00004970| 63 65 73 73 61 72 79 20 | 6e 6f 74 65 20 63 68 61 |cessary |note cha|
|00004980| 6e 6e 65 6c 73 2e 20 41 | 6e 79 20 6e 75 6d 62 65 |nnels. A|ny numbe|
|00004990| 72 20 6f 66 20 73 65 71 | 75 65 6e 63 65 73 20 6d |r of seq|uences m|
|000049a0| 61 79 20 62 65 20 70 6c | 61 79 69 6e 67 20 73 69 |ay be pl|aying si|
|000049b0| 6d 75 6c 74 61 6e 65 6f | 75 73 6c 79 2c 20 61 73 |multaneo|usly, as|
|000049c0| 20 6c 6f 6e 67 20 61 73 | 20 74 68 65 72 65 20 61 | long as| there a|
|000049d0| 72 65 20 73 75 66 66 69 | 63 69 65 6e 74 20 76 6f |re suffi|cient vo|
|000049e0| 69 63 65 73 2e 20 53 65 | 71 75 65 6e 63 65 73 20 |ices. Se|quences |
|000049f0| 6d 61 79 20 62 65 20 70 | 6c 61 79 65 64 20 66 72 |may be p|layed fr|
|00004a00| 6f 6d 20 62 65 67 69 6e | 6e 69 6e 67 20 74 6f 20 |om begin|ning to |
|00004a10| 65 6e 64 2c 20 6f 72 20 | 61 6e 79 20 73 65 63 74 |end, or |any sect|
|00004a20| 69 6f 6e 20 77 69 74 68 | 69 6e 2c 20 61 6e 64 20 |ion with|in, and |
|00004a30| 61 6e 6f 74 68 65 72 20 | 73 65 71 75 65 6e 63 65 |another |sequence|
|00004a40| 20 6f 72 20 73 65 71 75 | 65 6e 63 65 20 73 65 63 | or sequ|ence sec|
|00004a50| 74 69 6f 6e 20 6d 61 79 | 20 62 65 20 71 75 65 75 |tion may| be queu|
|00004a60| 65 64 20 75 70 20 77 68 | 69 6c 65 20 6f 6e 65 20 |ed up wh|ile one |
|00004a70| 69 73 20 70 6c 61 79 69 | 6e 67 2c 20 74 6f 20 70 |is playi|ng, to p|
|00004a80| 72 6f 76 69 64 65 20 61 | 20 73 65 61 6d 6c 65 73 |rovide a| seamles|
|00004a90| 73 20 74 72 61 6e 73 69 | 74 69 6f 6e 20 62 65 74 |s transi|tion bet|
|00004aa0| 77 65 65 6e 20 74 77 6f | 20 73 65 63 74 69 6f 6e |ween two| section|
|00004ab0| 73 2e 0d 54 68 65 20 54 | 75 6e 65 20 50 6c 61 79 |s..The T|une Play|
|00004ac0| 65 72 20 69 73 20 69 6d | 70 6c 65 6d 65 6e 74 65 |er is im|plemente|
|00004ad0| 64 20 61 73 20 61 20 63 | 6f 6d 70 6f 6e 65 6e 74 |d as a c|omponent|
|00004ae0| 2e 20 45 61 63 68 20 69 | 6e 73 74 61 6e 63 65 20 |. Each i|nstance |
|00004af0| 6f 66 20 74 68 65 20 54 | 75 6e 65 20 50 6c 61 79 |of the T|une Play|
|00004b00| 65 72 20 63 6f 6d 70 6f | 6e 65 6e 74 20 63 61 6e |er compo|nent can|
|00004b10| 20 70 6c 61 79 20 6f 6e | 65 20 54 75 6e 65 2e 0d | play on|e Tune..|
|00004b20| 70 61 73 63 61 6c 20 43 | 6f 6d 70 6f 6e 65 6e 74 |pascal C|omponent|
|00004b30| 52 65 73 75 6c 74 20 54 | 75 6e 65 53 65 74 48 65 |Result T|uneSetHe|
|00004b40| 61 64 65 72 28 54 75 6e | 65 50 6c 61 79 65 72 20 |ader(Tun|ePlayer |
|00004b50| 74 70 2c 20 54 75 6e 65 | 48 65 61 64 65 72 20 2a |tp, Tune|Header *|
|00004b60| 68 65 61 64 65 72 29 3b | 0d 53 70 65 63 69 66 69 |header);|.Specifi|
|00004b70| 65 73 20 68 6f 77 20 6d | 61 6e 79 20 70 61 72 74 |es how m|any part|
|00004b80| 73 20 74 68 65 20 73 65 | 71 75 65 6e 63 65 20 77 |s the se|quence w|
|00004b90| 69 6c 6c 20 68 61 76 65 | 2c 20 61 6e 64 20 77 68 |ill have|, and wh|
|00004ba0| 69 63 68 20 69 6e 73 74 | 72 75 6d 65 6e 74 73 20 |ich inst|ruments |
|00004bb0| 61 72 65 20 75 73 65 64 | 20 69 6e 20 65 61 63 68 |are used| in each|
|00004bc0| 20 70 61 72 74 2e 20 0d | 74 79 70 65 64 65 66 20 | part. .|typedef |
|00004bd0| 73 74 72 75 63 74 0d 09 | 7b 0d 09 73 68 6f 72 74 |struct..|{..short|
|00004be0| 20 70 61 72 74 43 6f 75 | 6e 74 3b 09 09 2f 2a 20 | partCou|nt;../* |
|00004bf0| 48 6f 77 20 6d 61 6e 79 | 20 64 65 66 69 6e 65 64 |How many| defined|
|00004c00| 20 69 6e 73 74 72 75 6d | 65 6e 74 73 3f 20 2a 2f | instrum|ents? */|
|00004c10| 0d 09 4e 6f 74 65 52 65 | 71 75 65 73 74 20 70 61 |..NoteRe|quest pa|
|00004c20| 72 74 5b 31 5d 3b 09 2f | 2a 20 52 65 71 75 65 73 |rt[1];./|* Reques|
|00004c30| 74 20 66 6f 72 20 65 61 | 63 68 20 69 6e 73 74 72 |t for ea|ch instr|
|00004c40| 75 6d 65 6e 74 20 70 61 | 72 74 2c 20 31 20 6f 72 |ument pa|rt, 1 or|
|00004c50| 20 6d 6f 72 65 20 2a 2f | 0d 09 7d 20 54 75 6e 65 | more */|..} Tune|
|00004c60| 48 65 61 64 65 72 3b 0d | 70 61 73 63 61 6c 20 43 |Header;.|pascal C|
|00004c70| 6f 6d 70 6f 6e 65 6e 74 | 52 65 73 75 6c 74 20 54 |omponent|Result T|
|00004c80| 75 6e 65 47 65 74 54 69 | 6d 65 42 61 73 65 28 54 |uneGetTi|meBase(T|
|00004c90| 75 6e 65 50 6c 61 79 65 | 72 20 74 70 2c 20 54 69 |unePlaye|r tp, Ti|
|00004ca0| 6d 65 42 61 73 65 20 2a | 74 62 29 3b 0d 53 65 71 |meBase *|tb);.Seq|
|00004cb0| 75 65 6e 63 65 20 70 6c | 61 79 62 61 63 6b 20 74 |uence pl|ayback t|
|00004cc0| 69 6d 69 6e 67 20 69 73 | 20 63 6f 6e 74 72 6f 6c |iming is| control|
|00004cd0| 6c 65 64 20 62 79 20 61 | 20 54 69 6d 65 42 61 73 |led by a| TimeBas|
|00004ce0| 65 2e 20 54 68 65 20 73 | 65 71 75 65 6e 63 65 20 |e. The s|equence |
|00004cf0| 6d 61 79 20 62 65 20 63 | 6f 6e 74 72 6f 6c 6c 65 |may be c|ontrolle|
|00004d00| 64 20 69 6e 20 73 65 76 | 65 72 61 6c 20 77 61 79 |d in sev|eral way|
|00004d10| 73 20 74 68 72 6f 75 67 | 68 20 69 74 73 20 54 69 |s throug|h its Ti|
|00004d20| 6d 65 42 61 73 65 2e 20 | 54 68 65 20 72 61 74 65 |meBase. |The rate|
|00004d30| 20 6f 66 20 70 6c 61 79 | 62 61 63 6b 20 6d 61 79 | of play|back may|
|00004d40| 20 62 65 20 63 68 61 6e | 67 65 64 2c 20 6f 72 20 | be chan|ged, or |
|00004d50| 74 68 65 20 54 69 6d 65 | 42 61 73 65 20 6d 61 79 |the Time|Base may|
|00004d60| 20 62 65 20 73 6c 61 76 | 65 64 20 74 6f 20 61 20 | be slav|ed to a |
|00004d70| 64 69 66 66 65 72 65 6e | 74 20 63 6c 6f 63 6b 20 |differen|t clock |
|00004d80| 6f 72 20 54 69 6d 65 42 | 61 73 65 20 74 68 61 6e |or TimeB|ase than|
|00004d90| 20 74 68 65 20 64 65 66 | 61 75 6c 74 20 6f 66 20 | the def|ault of |
|00004da0| 72 65 61 6c 20 74 69 6d | 65 2e 0d 70 61 73 63 61 |real tim|e..pasca|
|00004db0| 6c 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 75 6c |l Compon|entResul|
|00004dc0| 74 20 54 75 6e 65 53 65 | 74 54 69 6d 65 53 63 61 |t TuneSe|tTimeSca|
|00004dd0| 6c 65 28 54 75 6e 65 50 | 6c 61 79 65 72 20 74 70 |le(TuneP|layer tp|
|00004de0| 2c 20 54 69 6d 65 53 63 | 61 6c 65 20 73 63 61 6c |, TimeSc|ale scal|
|00004df0| 65 29 3b 0d 54 68 65 20 | 73 65 71 75 65 6e 63 65 |e);.The |sequence|
|00004e00| 20 64 61 74 61 20 73 70 | 65 63 69 66 69 65 73 20 | data sp|ecifies |
|00004e10| 6e 6f 74 65 20 64 75 72 | 61 74 69 6f 6e 73 20 61 |note dur|ations a|
|00004e20| 6e 64 20 74 69 6d 65 73 | 20 69 6e 20 73 6f 6d 65 |nd times| in some|
|00004e30| 20 6e 75 6d 62 65 72 20 | 6f 66 20 75 6e 69 74 73 | number |of units|
|00004e40| 2d 70 65 72 2d 73 65 63 | 6f 6e 64 3b 20 74 68 69 |-per-sec|ond; thi|
|00004e50| 73 20 63 61 6c 6c 20 73 | 70 65 63 69 66 69 65 73 |s call s|pecifies|
|00004e60| 20 74 68 65 20 75 6e 69 | 74 2e 0d 70 61 73 63 61 | the uni|t..pasca|
|00004e70| 6c 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 75 6c |l Compon|entResul|
|00004e80| 74 20 54 75 6e 65 47 65 | 74 54 69 6d 65 53 63 61 |t TuneGe|tTimeSca|
|00004e90| 6c 65 28 54 75 6e 65 50 | 6c 61 79 65 72 20 74 70 |le(TuneP|layer tp|
|00004ea0| 2c 54 69 6d 65 53 63 61 | 6c 65 20 2a 73 63 61 6c |,TimeSca|le *scal|
|00004eb0| 65 29 3b 0d 52 65 74 75 | 72 6e 73 20 74 68 65 20 |e);.Retu|rns the |
|00004ec0| 63 75 72 72 65 6e 74 20 | 75 6e 69 74 73 20 66 6f |current |units fo|
|00004ed0| 72 20 74 68 65 20 73 65 | 71 75 65 6e 63 65 2e 0d |r the se|quence..|
|00004ee0| 70 61 73 63 61 6c 20 43 | 6f 6d 70 6f 6e 65 6e 74 |pascal C|omponent|
|00004ef0| 52 65 73 75 6c 74 20 54 | 75 6e 65 47 65 74 49 6e |Result T|uneGetIn|
|00004f00| 64 65 78 65 64 4e 6f 74 | 65 43 68 61 6e 6e 65 6c |dexedNot|eChannel|
|00004f10| 28 54 75 6e 65 50 6c 61 | 79 65 72 20 74 70 2c 73 |(TunePla|yer tp,s|
|00004f20| 68 6f 72 74 20 69 2c 20 | 4e 6f 74 65 43 68 61 6e |hort i, |NoteChan|
|00004f30| 6e 65 6c 20 2a 6e 63 29 | 3b 0d 54 68 65 20 54 75 |nel *nc)|;.The Tu|
|00004f40| 6e 65 20 50 6c 61 79 65 | 72 20 61 6c 6c 6f 63 61 |ne Playe|r alloca|
|00004f50| 74 65 73 20 6e 6f 74 65 | 20 63 68 61 6e 6e 65 6c |tes note| channel|
|00004f60| 73 20 74 68 61 74 20 62 | 65 73 74 20 73 61 74 69 |s that b|est sati|
|00004f70| 73 66 79 20 74 68 65 20 | 69 6e 73 74 72 75 6d 65 |sfy the |instrume|
|00004f80| 6e 74 73 20 72 65 71 75 | 65 73 74 65 64 20 69 6e |nts requ|ested in|
|00004f90| 20 74 68 65 20 74 75 6e | 65 20 68 65 61 64 65 72 | the tun|e header|
|00004fa0| 2e 20 54 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |. The ap|plicatio|
|00004fb0| 6e 20 70 72 6f 67 72 61 | 6d 20 6d 61 79 20 75 73 |n progra|m may us|
|00004fc0| 65 20 74 68 69 73 20 63 | 61 6c 6c 20 74 6f 20 64 |e this c|all to d|
|00004fd0| 65 74 65 72 6d 69 6e 65 | 20 77 68 69 63 68 20 6d |etermine| which m|
|00004fe0| 75 73 69 63 20 64 65 76 | 69 63 65 73 20 77 65 72 |usic dev|ices wer|
|00004ff0| 65 20 61 63 74 75 61 6c | 6c 79 20 75 73 65 64 20 |e actual|ly used |
|00005000| 66 6f 72 20 65 61 63 68 | 20 69 6e 73 74 72 75 6d |for each| instrum|
|00005010| 65 6e 74 20 69 6e 20 74 | 68 65 20 68 65 61 64 65 |ent in t|he heade|
|00005020| 72 2e 0d 70 61 73 63 61 | 6c 20 43 6f 6d 70 6f 6e |r..pasca|l Compon|
|00005030| 65 6e 74 52 65 73 75 6c | 74 20 54 75 6e 65 47 65 |entResul|t TuneGe|
|00005040| 74 49 6e 66 6f 28 54 75 | 6e 65 50 6c 61 79 65 72 |tInfo(Tu|nePlayer|
|00005050| 20 74 70 2c 76 6f 69 64 | 20 2a 74 75 6e 65 2c 20 | tp,void| *tune, |
|00005060| 54 75 6e 65 49 6e 66 6f | 20 2a 69 6e 66 6f 29 3b |TuneInfo| *info);|
|00005070| 0d 52 65 74 75 72 6e 73 | 20 61 20 73 74 72 75 63 |.Returns| a struc|
|00005080| 74 75 72 65 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |ture con|taining |
|00005090| 76 61 72 69 6f 75 73 20 | 69 6e 74 65 72 65 73 74 |various |interest|
|000050a0| 69 6e 67 20 74 68 69 6e | 67 73 20 61 62 6f 75 74 |ing thin|gs about|
|000050b0| 20 74 68 65 20 74 75 6e | 65 20 64 61 74 61 20 70 | the tun|e data p|
|000050c0| 61 73 73 65 64 20 69 6e | 20 d4 74 75 6e 65 d5 2e |assed in| .tune..|
|000050d0| 0d 74 79 70 65 64 65 66 | 20 73 74 72 75 63 74 0d |.typedef| struct.|
|000050e0| 09 7b 0d 09 6c 6f 6e 67 | 20 62 79 74 65 73 3b 0d |.{..long| bytes;.|
|000050f0| 09 6c 6f 6e 67 20 6e 6f | 74 65 73 3b 0d 09 6c 6f |.long no|tes;..lo|
|00005100| 6e 67 20 64 75 72 61 74 | 69 6f 6e 3b 0d 09 7d 20 |ng durat|ion;..} |
|00005110| 54 75 6e 65 49 6e 66 6f | 3b 0d 70 61 73 63 61 6c |TuneInfo|;.pascal|
|00005120| 20 43 6f 6d 70 6f 6e 65 | 6e 74 52 65 73 75 6c 74 | Compone|ntResult|
|00005130| 20 54 75 6e 65 51 75 65 | 75 65 28 54 75 6e 65 50 | TuneQue|ue(TuneP|
|00005140| 6c 61 79 65 72 20 74 70 | 2c 76 6f 69 64 20 2a 74 |layer tp|,void *t|
|00005150| 75 6e 65 44 69 66 66 65 | 72 65 6e 63 65 2c 76 6f |uneDiffe|rence,vo|
|00005160| 69 64 20 2a 74 75 6e 65 | 42 6f 64 79 2c 75 6e 73 |id *tune|Body,uns|
|00005170| 69 67 6e 65 64 20 6c 6f | 6e 67 20 74 75 6e 65 53 |igned lo|ng tuneS|
|00005180| 74 61 72 74 50 6f 73 69 | 74 69 6f 6e 2c 75 6e 73 |tartPosi|tion,uns|
|00005190| 69 67 6e 65 64 20 6c 6f | 6e 67 20 74 75 6e 65 53 |igned lo|ng tuneS|
|000051a0| 74 6f 70 50 6f 73 69 74 | 69 6f 6e 2c 6c 6f 6e 67 |topPosit|ion,long|
|000051b0| 20 73 74 61 72 74 57 68 | 65 6e 2c 54 75 6e 65 43 | startWh|en,TuneC|
|000051c0| 61 6c 6c 42 61 63 6b 50 | 72 6f 63 20 63 61 6c 6c |allBackP|roc call|
|000051d0| 42 61 63 6b 50 72 6f 63 | 2c 6c 6f 6e 67 20 72 65 |BackProc|,long re|
|000051e0| 66 43 6f 6e 29 3b 0d 54 | 68 69 73 20 63 61 6c 6c |fCon);.T|his call|
|000051f0| 20 73 74 61 72 74 73 20 | 61 20 73 65 71 75 65 6e | starts |a sequen|
|00005200| 63 65 20 70 6c 61 79 69 | 6e 67 2e 20 54 68 65 20 |ce playi|ng. The |
|00005210| 73 65 71 75 65 6e 63 65 | 20 69 73 20 73 70 65 63 |sequence| is spec|
|00005220| 69 66 69 65 64 20 62 79 | 20 74 68 65 20 d4 74 75 |ified by| the .tu|
|00005230| 6e 65 44 69 66 66 65 72 | 65 6e 63 65 d5 20 70 61 |neDiffer|ence. pa|
|00005240| 72 61 6d 65 74 65 72 20 | 61 6e 64 20 74 68 65 20 |rameter |and the |
|00005250| d4 74 75 6e 65 42 6f 64 | 79 d5 20 70 61 72 61 6d |.tuneBod|y. param|
|00005260| 65 74 65 72 2e 20 d4 74 | 75 6e 65 44 69 66 66 65 |eter. .t|uneDiffe|
|00005270| 72 65 6e 63 65 d5 20 69 | 73 20 61 6e 61 6c 6f 67 |rence. i|s analog|
|00005280| 6f 75 73 20 74 6f 20 61 | 20 6b 65 79 2d 66 72 61 |ous to a| key-fra|
|00005290| 6d 65 20 69 6e 20 76 69 | 64 65 6f 20 63 6f 6d 70 |me in vi|deo comp|
|000052a0| 72 65 73 73 69 6f 6e 3b | 20 69 74 20 63 6f 6e 74 |ression;| it cont|
|000052b0| 61 69 6e 73 20 73 74 61 | 74 65 20 69 6e 66 6f 72 |ains sta|te infor|
|000052c0| 6d 61 74 69 6f 6e 20 74 | 68 61 74 20 73 68 6f 75 |mation t|hat shou|
|000052d0| 6c 64 20 62 65 20 69 6e | 73 74 61 6e 74 69 61 74 |ld be in|stantiat|
|000052e0| 65 64 20 62 65 66 6f 72 | 65 20 74 68 65 20 62 6f |ed befor|e the bo|
|000052f0| 64 79 20 6f 66 20 74 68 | 65 20 73 65 71 75 65 6e |dy of th|e sequen|
|00005300| 63 65 20 69 73 20 70 6c | 61 79 65 64 2e 20 54 68 |ce is pl|ayed. Th|
|00005310| 69 73 20 69 6e 63 6c 75 | 64 65 73 20 73 75 63 68 |is inclu|des such|
|00005320| 20 70 61 72 61 6d 65 74 | 65 72 73 20 61 73 20 76 | paramet|ers as v|
|00005330| 6f 6c 75 6d 65 20 61 6e | 64 20 62 61 6c 61 6e 63 |olume an|d balanc|
|00005340| 65 2c 20 61 6e 64 20 77 | 68 69 63 68 20 6e 6f 74 |e, and w|hich not|
|00005350| 65 73 20 61 72 65 20 61 | 6c 72 65 61 64 79 20 6f |es are a|lready o|
|00005360| 6e 20 20 61 74 20 74 68 | 65 20 73 74 61 72 74 20 |n at th|e start |
|00005370| 6f 66 20 74 68 65 20 73 | 65 71 75 65 6e 63 65 2e |of the s|equence.|
|00005380| 20 54 68 65 20 d4 74 75 | 6e 65 44 69 66 66 65 72 | The .tu|neDiffer|
|00005390| 65 6e 63 65 d5 20 70 61 | 72 61 6d 65 74 65 72 20 |ence. pa|rameter |
|000053a0| 69 73 20 6d 61 69 6e 6c | 79 20 75 73 65 64 20 69 |is mainl|y used i|
|000053b0| 6e 20 76 65 72 79 20 6c | 6f 6e 67 20 63 6f 6d 70 |n very l|ong comp|
|000053c0| 6f 73 69 74 69 6f 6e 73 | 2c 20 63 6f 6e 73 69 73 |ositions|, consis|
|000053d0| 74 69 6e 67 20 6f 66 20 | 6d 61 6e 79 20 73 75 62 |ting of |many sub|
|000053e0| 73 65 63 74 69 6f 6e 73 | 20 6f 66 20 73 65 71 75 |sections| of sequ|
|000053f0| 65 6e 63 65 20 64 61 74 | 61 2c 20 77 68 65 72 65 |ence dat|a, where|
|00005400| 20 72 61 6e 64 6f 6d 20 | 61 63 63 65 73 73 20 69 | random |access i|
|00005410| 73 20 64 65 73 69 72 65 | 64 2e 0d d4 74 75 6e 65 |s desire|d...tune|
|00005420| 53 74 61 72 74 50 6f 73 | 69 74 69 6f 6e d5 20 61 |StartPos|ition. a|
|00005430| 6e 64 20 d4 74 75 6e 65 | 53 74 6f 70 50 6f 73 69 |nd .tune|StopPosi|
|00005440| 74 69 6f 6e d5 20 73 70 | 65 63 69 66 79 2c 20 69 |tion. sp|ecify, i|
|00005450| 6e 20 74 69 6d 65 20 75 | 6e 69 74 73 20 6e 75 6d |n time u|nits num|
|00005460| 62 65 72 65 64 20 66 72 | 6f 6d 20 7a 65 72 6f 20 |bered fr|om zero |
|00005470| 66 6f 72 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e |for the |beginnin|
|00005480| 67 20 6f 66 20 74 68 65 | 20 73 65 71 75 65 6e 63 |g of the| sequenc|
|00005490| 65 2c 20 77 68 69 63 68 | 20 70 61 72 74 20 6f 66 |e, which| part of|
|000054a0| 20 74 68 65 20 73 65 71 | 75 65 6e 63 65 20 74 6f | the seq|uence to|
|000054b0| 20 70 6c 61 79 2e 20 54 | 6f 20 70 6c 61 79 20 61 | play. T|o play a|
|000054c0| 6c 6c 20 6f 66 20 69 74 | 2c 20 70 61 73 73 20 30 |ll of it|, pass 0|
|000054d0| 20 61 6e 64 20 30 78 46 | 46 46 46 46 46 46 46 20 | and 0xF|FFFFFFF |
|000054e0| 72 65 73 70 65 63 74 69 | 76 65 6c 79 2e 0d d4 73 |respecti|vely...s|
|000054f0| 74 61 72 74 57 68 65 6e | d5 20 63 6f 6e 74 61 69 |tartWhen|. contai|
|00005500| 6e 73 20 73 65 76 65 72 | 61 6c 20 66 6c 61 67 73 |ns sever|al flags|
|00005510| 20 74 6f 20 63 6f 6e 74 | 72 6f 6c 20 77 68 65 6e | to cont|rol when|
|00005520| 20 74 68 65 20 54 75 6e | 65 20 50 6c 61 79 65 72 | the Tun|e Player|
|00005530| 20 77 69 6c 6c 20 70 6c | 61 79 20 74 68 69 73 20 | will pl|ay this |
|00005540| 73 65 71 75 65 6e 63 65 | 2e 0d 74 79 70 65 64 65 |sequence|..typede|
|00005550| 66 20 65 6e 75 6d 0d 09 | 7b 0d 09 6b 53 74 61 72 |f enum..|{..kStar|
|00005560| 74 4e 6f 77 20 3d 20 31 | 2c 09 2f 2a 20 73 74 61 |tNow = 1|,./* sta|
|00005570| 72 74 20 61 66 74 65 72 | 20 62 75 66 66 65 72 20 |rt after| buffer |
|00005580| 69 73 20 69 6d 70 6c 69 | 65 64 20 2a 2f 0d 09 6b |is impli|ed */..k|
|00005590| 53 74 61 72 74 4e 65 77 | 4d 61 73 74 65 72 20 3d |StartNew|Master =|
|000055a0| 20 31 36 33 38 34 0d 09 | 7d 3b 0d 49 66 20 6e 6f | 16384..|};.If no|
|000055b0| 20 66 6c 61 67 73 20 61 | 72 65 20 73 70 65 63 69 | flags a|re speci|
|000055c0| 66 69 65 64 20 28 d4 73 | 74 61 72 74 57 68 65 6e |fied (.s|tartWhen|
|000055d0| d5 20 3d 20 30 29 20 74 | 68 65 6e 20 74 68 65 20 |. = 0) t|hen the |
|000055e0| 73 65 71 75 65 6e 63 65 | 20 77 69 6c 6c 20 62 65 |sequence| will be|
|000055f0| 67 69 6e 20 70 6c 61 79 | 69 6e 67 20 69 6d 6d 65 |gin play|ing imme|
|00005600| 64 69 61 74 65 6c 79 2c | 20 6f 72 20 69 66 20 74 |diately,| or if t|
|00005610| 68 65 72 65 20 69 73 20 | 61 6c 72 65 61 64 79 20 |here is |already |
|00005620| 61 20 73 65 71 75 65 6e | 63 65 20 70 6c 61 79 69 |a sequen|ce playi|
|00005630| 6e 67 2c 20 61 73 20 73 | 6f 6f 6e 20 61 73 20 74 |ng, as s|oon as t|
|00005640| 68 61 74 20 73 65 71 75 | 65 6e 63 65 20 65 6e 64 |hat sequ|ence end|
|00005650| 73 2e 20 69 66 20 74 68 | 65 20 6b 53 74 61 72 74 |s. if th|e kStart|
|00005660| 4e 6f 77 20 66 6c 61 67 | 20 69 73 20 73 65 74 2c |Now flag| is set,|
|00005670| 20 74 68 65 6e 20 61 6e | 79 20 70 72 65 76 69 6f | then an|y previo|
|00005680| 75 73 6c 79 20 70 6c 61 | 79 69 6e 67 20 73 65 71 |usly pla|ying seq|
|00005690| 75 65 6e 63 65 20 69 73 | 20 68 61 6c 74 65 64 2c |uence is| halted,|
|000056a0| 20 61 6e 64 20 74 68 69 | 73 20 6f 6e 65 20 73 74 | and thi|s one st|
|000056b0| 61 72 74 65 64 2e 20 41 | 66 74 65 72 20 63 68 61 |arted. A|fter cha|
|000056c0| 6e 67 69 6e 67 20 74 68 | 65 20 6d 61 73 74 65 72 |nging th|e master|
|000056d0| 20 6f 66 20 74 68 65 20 | 54 75 6e 65 20 50 6c 61 | of the |Tune Pla|
|000056e0| 79 65 72 d5 73 20 74 69 | 6d 65 62 61 73 65 2c 20 |yer.s ti|mebase, |
|000056f0| 74 68 65 20 6b 53 74 61 | 72 74 4e 65 77 4d 61 73 |the kSta|rtNewMas|
|00005700| 74 65 72 20 66 6c 61 67 | 20 73 68 6f 75 6c 64 20 |ter flag| should |
|00005710| 62 65 20 73 65 74 2e 0d | 2a 2a d4 63 61 6c 6c 42 |be set..|**.callB|
|00005720| 61 63 6b 50 72 6f 63 d5 | 20 69 73 20 6e 6f 74 20 |ackProc.| is not |
|00005730| 79 65 74 20 64 65 66 69 | 6e 65 64 20 28 62 75 74 |yet defi|ned (but|
|00005740| 20 77 69 6c 6c 20 62 65 | 20 73 6f 6d 65 74 68 69 | will be| somethi|
|00005750| 6e 67 20 74 6f 20 68 65 | 6c 70 20 79 6f 75 20 71 |ng to he|lp you q|
|00005760| 75 65 75 65 20 75 70 20 | 74 68 65 20 6e 65 78 74 |ueue up |the next|
|00005770| 20 73 65 71 75 65 6e 63 | 65 20 63 68 75 6e 6b 20 | sequenc|e chunk |
|00005780| 61 73 20 6e 65 65 64 65 | 64 29 2e 20 d4 72 65 66 |as neede|d). .ref|
|00005790| 43 6f 6e d5 20 77 69 6c | 6c 20 62 65 20 70 61 73 |Con. wil|l be pas|
|000057a0| 73 65 64 20 74 6f 20 79 | 6f 75 72 20 72 6f 75 74 |sed to y|our rout|
|000057b0| 69 6e 65 2e 0d 70 61 73 | 63 61 6c 20 43 6f 6d 70 |ine..pas|cal Comp|
|000057c0| 6f 6e 65 6e 74 52 65 73 | 75 6c 74 20 54 75 6e 65 |onentRes|ult Tune|
|000057d0| 49 6e 73 74 61 6e 74 28 | 54 75 6e 65 50 6c 61 79 |Instant(|TunePlay|
|000057e0| 65 72 20 74 70 2c 76 6f | 69 64 20 2a 74 75 6e 65 |er tp,vo|id *tune|
|000057f0| 44 69 66 66 65 72 65 6e | 63 65 2c 76 6f 69 64 20 |Differen|ce,void |
|00005800| 2a 74 75 6e 65 42 6f 64 | 79 2c 6c 6f 6e 67 20 74 |*tuneBod|y,long t|
|00005810| 75 6e 65 50 6f 73 69 74 | 69 6f 6e 29 3b 0d 54 68 |unePosit|ion);.Th|
|00005820| 69 73 20 63 61 6c 6c 20 | 70 6c 61 79 73 20 74 68 |is call |plays th|
|00005830| 65 20 73 65 71 75 65 6e | 63 65 20 28 61 73 20 64 |e sequen|ce (as d|
|00005840| 65 73 63 72 69 62 65 64 | 20 62 79 20 d4 74 75 6e |escribed| by .tun|
|00005850| 65 44 69 66 66 65 72 65 | 6e 63 65 d5 20 61 6e 64 |eDiffere|nce. and|
|00005860| 20 d4 74 75 6e 65 42 6f | 64 79 d5 29 20 61 74 20 | .tuneBo|dy.) at |
|00005870| 20 74 68 65 20 70 6f 73 | 69 74 69 6f 6e 20 73 70 | the pos|ition sp|
|00005880| 65 63 69 66 69 65 64 2c | 20 61 73 20 69 66 20 69 |ecified,| as if i|
|00005890| 74 20 77 65 72 65 20 70 | 6c 61 79 69 6e 67 20 61 |t were p|laying a|
|000058a0| 74 20 72 61 74 65 20 7a | 65 72 6f 2e 20 54 68 75 |t rate z|ero. Thu|
|000058b0| 73 2c 20 6e 6f 74 65 73 | 20 74 68 61 74 20 61 72 |s, notes| that ar|
|000058c0| 65 20 6f 6e 20 61 74 20 | 74 68 61 74 20 70 6f 69 |e on at |that poi|
|000058d0| 6e 74 20 69 6e 20 74 68 | 65 20 73 65 71 75 65 6e |nt in th|e sequen|
|000058e0| 63 65 20 61 72 65 20 73 | 74 61 72 74 65 64 20 70 |ce are s|tarted p|
|000058f0| 6c 61 79 69 6e 67 2c 20 | 61 6e 64 20 6c 65 66 74 |laying, |and left|
|00005900| 20 70 6c 61 79 69 6e 67 | 20 75 70 6f 6e 20 72 65 | playing| upon re|
|00005910| 74 75 72 6e 2e 20 54 68 | 65 20 6e 6f 74 65 73 20 |turn. Th|e notes |
|00005920| 6d 61 79 20 62 65 20 73 | 69 6c 65 6e 63 65 64 20 |may be s|ilenced |
|00005930| 62 79 20 63 61 6c 6c 69 | 6e 67 20 54 75 6e 65 49 |by calli|ng TuneI|
|00005940| 6e 73 74 61 6e 74 20 77 | 69 74 68 20 61 20 6e 75 |nstant w|ith a nu|
|00005950| 6c 6c 20 d4 74 75 6e 65 | 42 6f 64 79 d5 20 6f 72 |ll .tune|Body. or|
|00005960| 20 62 79 20 63 61 6c 6c | 69 6e 67 20 54 75 6e 65 | by call|ing Tune|
|00005970| 53 74 6f 70 2e 20 54 68 | 69 73 20 63 61 6c 6c 20 |Stop. Th|is call |
|00005980| 69 73 20 75 73 65 66 75 | 6c 20 74 6f 20 65 6e 61 |is usefu|l to ena|
|00005990| 62 6c 65 20 75 73 65 72 | 20 d2 73 63 72 75 62 62 |ble user| .scrubb|
|000059a0| 69 6e 67 d3 20 6f 6e 20 | 61 20 73 65 71 75 65 6e |ing. on |a sequen|
|000059b0| 63 65 2e 0d 70 61 73 63 | 61 6c 20 43 6f 6d 70 6f |ce..pasc|al Compo|
|000059c0| 6e 65 6e 74 52 65 73 75 | 6c 74 20 54 75 6e 65 53 |nentResu|lt TuneS|
|000059d0| 74 6f 70 28 54 75 6e 65 | 50 6c 61 79 65 72 20 74 |top(Tune|Player t|
|000059e0| 70 2c 6c 6f 6e 67 20 73 | 74 6f 70 46 6c 61 67 73 |p,long s|topFlags|
|000059f0| 29 3b 0d 53 74 6f 70 73 | 20 74 68 65 20 54 75 6e |);.Stops| the Tun|
|00005a00| 65 20 50 6c 61 79 65 72 | 2c 20 69 66 20 69 74 20 |e Player|, if it |
|00005a10| 69 73 20 70 6c 61 79 69 | 6e 67 20 61 20 73 65 71 |is playi|ng a seq|
|00005a20| 75 65 6e 63 65 2e 0d 74 | 79 70 65 64 65 66 20 65 |uence..t|ypedef e|
|00005a30| 6e 75 6d 0d 09 7b 0d 09 | 6b 53 74 6f 70 53 75 73 |num..{..|kStopSus|
|00005a40| 74 61 69 6e 20 3d 20 31 | 2c 09 2f 2a 20 4c 65 61 |tain = 1|,./* Lea|
|00005a50| 76 65 73 20 6e 6f 74 65 | 73 20 70 6c 61 79 69 6e |ves note|s playin|
|00005a60| 67 2c 20 6e 6f 74 20 73 | 69 6c 65 6e 74 20 2a 2f |g, not s|ilent */|
|00005a70| 0d 09 6b 53 74 6f 70 46 | 61 64 65 6f 75 74 20 3d |..kStopF|adeout =|
|00005a80| 20 32 09 2f 2a 20 44 6f | 65 73 20 61 20 73 79 6e | 2./* Do|es a syn|
|00005a90| 63 68 72 6f 6e 6f 75 73 | 20 66 61 64 65 2d 6f 75 |chronous| fade-ou|
|00005aa0| 74 20 2a 2f 0d 09 7d 3b | 0d 49 66 20 74 68 65 20 |t */..};|.If the |
|00005ab0| 6b 53 74 6f 70 53 75 73 | 74 61 69 6e 20 66 6c 61 |kStopSus|tain fla|
|00005ac0| 67 20 69 73 20 73 70 65 | 63 69 66 69 65 64 2c 20 |g is spe|cified, |
|00005ad0| 74 68 65 6e 20 61 6e 79 | 20 6e 6f 74 65 73 20 63 |then any| notes c|
|00005ae0| 75 72 72 65 6e 74 6c 79 | 20 70 6c 61 79 69 6e 67 |urrently| playing|
|00005af0| 20 61 72 65 20 61 6c 6c | 6f 77 65 64 20 74 6f 20 | are all|owed to |
|00005b00| 63 6f 6e 74 69 6e 75 65 | 20 70 6c 61 79 69 6e 67 |continue| playing|
|00005b10| 2e 20 49 66 20 6e 6f 74 | 2c 20 74 68 65 6e 20 61 |. If not|, then a|
|00005b20| 6c 6c 20 76 6f 69 63 65 | 73 20 61 72 65 20 73 69 |ll voice|s are si|
|00005b30| 6c 65 6e 63 65 64 2e 20 | 54 68 65 20 6b 53 74 6f |lenced. |The kSto|
|00005b40| 70 46 61 64 65 6f 75 74 | 20 66 6c 61 67 20 73 70 |pFadeout| flag sp|
|00005b50| 65 63 69 66 69 65 64 20 | 61 20 73 68 6f 72 74 20 |ecified |a short |
|00005b60| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 66 61 64 |asynchro|nous fad|
|00005b70| 65 6f 75 74 20 6f 66 20 | 74 68 65 20 73 65 71 75 |eout of |the sequ|
|00005b80| 65 6e 63 65 2c 20 77 68 | 69 63 68 20 6d 61 79 20 |ence, wh|ich may |
|00005b90| 62 65 20 6d 6f 72 65 20 | 61 75 72 61 6c 6c 79 20 |be more |aurally |
|00005ba0| 70 6c 65 61 73 61 6e 74 | 20 74 68 61 6e 20 61 20 |pleasant| than a |
|00005bb0| 71 75 69 63 6b 20 73 74 | 6f 70 2e 0d 70 61 73 63 |quick st|op..pasc|
|00005bc0| 61 6c 20 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 75 |al Compo|nentResu|
|00005bd0| 6c 74 20 54 75 6e 65 53 | 65 74 56 6f 6c 75 6d 65 |lt TuneS|etVolume|
|00005be0| 28 54 75 6e 65 50 6c 61 | 79 65 72 20 74 70 2c 46 |(TunePla|yer tp,F|
|00005bf0| 69 78 65 64 20 76 6f 6c | 75 6d 65 29 3b 0d 53 65 |ixed vol|ume);.Se|
|00005c00| 74 73 20 74 68 65 20 76 | 6f 6c 75 6d 65 20 66 6f |ts the v|olume fo|
|00005c10| 72 20 74 68 65 20 77 68 | 6f 6c 65 20 73 65 71 75 |r the wh|ole sequ|
|00005c20| 65 6e 63 65 2c 20 66 72 | 6f 6d 20 30 2e 30 20 74 |ence, fr|om 0.0 t|
|00005c30| 6f 20 31 2e 30 2e 20 49 | 6e 64 69 76 69 64 75 61 |o 1.0. I|ndividua|
|00005c40| 6c 20 69 6e 73 74 72 75 | 6d 65 6e 74 73 20 77 69 |l instru|ments wi|
|00005c50| 74 68 69 6e 20 74 68 65 | 20 73 65 71 75 65 6e 63 |thin the| sequenc|
|00005c60| 65 20 77 69 6c 6c 20 73 | 74 69 6c 6c 20 68 61 76 |e will s|till hav|
|00005c70| 65 20 74 68 65 69 72 20 | 6f 77 6e 20 76 6f 6c 75 |e their |own volu|
|00005c80| 6d 65 20 6c 65 76 65 6c | 73 2c 20 61 73 20 77 65 |me level|s, as we|
|00005c90| 6c 6c 2e 0d 70 61 73 63 | 61 6c 20 43 6f 6d 70 6f |ll..pasc|al Compo|
|00005ca0| 6e 65 6e 74 52 65 73 75 | 6c 74 20 54 75 6e 65 50 |nentResu|lt TuneP|
|00005cb0| 72 65 72 6f 6c 6c 28 54 | 75 6e 65 50 6c 61 79 65 |reroll(T|unePlaye|
|00005cc0| 72 20 74 70 29 3b 0d 44 | 6f 65 73 20 61 6e 79 20 |r tp);.D|oes any |
|00005cd0| 70 6f 73 73 69 62 6c 65 | 20 70 72 65 70 61 72 61 |possible| prepara|
|00005ce0| 74 69 6f 6e 20 74 6f 20 | 70 6c 61 79 20 74 68 65 |tion to |play the|
|00005cf0| 20 73 65 71 75 65 6e 63 | 65 2c 20 61 6e 64 20 72 | sequenc|e, and r|
|00005d00| 65 73 65 72 76 65 73 20 | 6e 6f 74 65 20 63 68 61 |eserves |note cha|
|00005d10| 6e 6e 65 6c 73 20 66 6f | 72 20 65 61 63 68 20 69 |nnels fo|r each i|
|00005d20| 6e 73 74 72 75 6d 65 6e | 74 20 69 6e 20 74 68 65 |nstrumen|t in the|
|00005d30| 20 73 65 71 75 65 6e 63 | 65 2e 0d 70 61 73 63 61 | sequenc|e..pasca|
|00005d40| 6c 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 75 6c |l Compon|entResul|
|00005d50| 74 20 54 75 6e 65 55 6e | 72 6f 6c 6c 28 54 75 6e |t TuneUn|roll(Tun|
|00005d60| 65 50 6c 61 79 65 72 20 | 74 70 29 3b 0d 55 6e 72 |ePlayer |tp);.Unr|
|00005d70| 65 73 65 72 76 65 73 20 | 61 6e 79 20 6e 6f 74 65 |eserves |any note|
|00005d80| 20 63 68 61 6e 6e 65 6c | 73 20 74 68 61 74 20 68 | channel|s that h|
|00005d90| 61 76 65 20 62 65 65 6e | 20 6c 6f 63 6b 65 64 20 |ave been| locked |
|00005da0| 64 6f 77 6e 20 66 6f 72 | 20 74 68 69 73 20 54 75 |down for| this Tu|
|00005db0| 6e 65 20 50 6c 61 79 65 | 72 2e 0d 4d 75 73 69 63 |ne Playe|r..Music|
|00005dc0| 20 43 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 55 | Configu|ration U|
|00005dd0| 74 69 6c 69 74 79 0d 54 | 68 65 20 66 6f 6c 6c 6f |tility.T|he follo|
|00005de0| 77 69 6e 67 20 69 6c 6c | 75 73 74 72 61 74 69 6f |wing ill|ustratio|
|00005df0| 6e 20 69 73 20 6f 66 20 | 61 20 70 72 65 6c 69 6d |n is of |a prelim|
|00005e00| 69 6e 61 72 79 20 76 65 | 72 73 69 6f 6e 20 6f 66 |inary ve|rsion of|
|00005e10| 20 74 68 65 20 75 73 65 | 72 20 63 6f 6e 66 69 67 | the use|r config|
|00005e20| 75 72 61 74 69 6f 6e 20 | 75 74 69 6c 69 74 79 2e |uration |utility.|
|00005e30| 20 54 68 65 20 70 72 69 | 6e 74 65 72 20 70 6f 72 | The pri|nter por|
|00005e40| 74 20 64 6f 65 73 20 6e | 6f 74 20 61 70 70 65 61 |t does n|ot appea|
|00005e50| 72 20 62 65 63 61 75 73 | 65 20 4c 6f 63 61 6c 54 |r becaus|e LocalT|
|00005e60| 61 6c 6b 20 69 73 20 69 | 6e 20 75 73 65 20 28 6f |alk is i|n use (o|
|00005e70| 6e 20 74 68 65 20 63 6f | 6d 70 75 74 65 72 20 74 |n the co|mputer t|
|00005e80| 68 69 73 20 69 6d 61 67 | 65 20 77 61 73 20 74 61 |his imag|e was ta|
|00005e90| 6b 65 6e 20 66 72 6f 6d | 29 2e 20 54 68 65 20 74 |ken from|). The t|
|00005ea0| 79 70 69 63 61 6c 20 75 | 73 65 72 20 77 6f 75 6c |ypical u|ser woul|
|00005eb0| 64 20 73 65 65 20 6f 6e | 6c 79 20 61 20 47 65 6e |d see on|ly a Gen|
|00005ec0| 65 72 61 6c 20 4d 49 44 | 49 20 6f 70 74 69 6f 6e |eral MID|I option|
|00005ed0| 2c 20 75 6e 64 65 72 20 | 4d 49 44 49 20 73 79 6e |, under |MIDI syn|
|00005ee0| 74 68 65 73 69 7a 65 72 | 73 2c 20 61 6e 64 20 41 |thesizer|s, and A|
|00005ef0| 70 70 6c 65 20 4d 75 73 | 69 63 20 75 6e 64 65 72 |pple Mus|ic under|
|00005f00| 20 53 6f 66 74 77 61 72 | 65 20 53 79 6e 74 68 65 | Softwar|e Synthe|
|00005f10| 73 69 7a 65 72 73 2e 20 | 4f 74 68 65 72 20 63 68 |sizers. |Other ch|
|00005f20| 6f 69 63 65 73 2c 20 73 | 75 63 68 20 61 73 20 74 |oices, s|uch as t|
|00005f30| 68 65 20 6f 6e 65 73 20 | 76 69 73 69 62 6c 65 20 |he ones |visible |
|00005f40| 62 65 6c 6f 77 2c 20 77 | 6f 75 6c 64 20 61 70 70 |below, w|ould app|
|00005f50| 65 61 72 20 69 66 20 61 | 70 70 72 6f 70 72 69 61 |ear if a|ppropria|
|00005f60| 74 65 20 73 79 73 74 65 | 6d 20 65 78 74 65 6e 73 |te syste|m extens|
|00005f70| 69 6f 6e 73 20 68 61 76 | 65 20 62 65 65 6e 20 69 |ions hav|e been i|
|00005f80| 6e 73 74 61 6c 6c 65 64 | 2e 0d 41 70 70 65 6e 64 |nstalled|..Append|
|00005f90| 69 78 3a 20 57 68 79 20 | 4d 69 63 72 6f 74 6f 6e |ix: Why |Microton|
|00005fa0| 61 6c 20 4e 6f 74 65 73 | 0d 54 68 65 20 57 65 73 |al Notes|.The Wes|
|00005fb0| 74 65 72 6e 20 6d 75 73 | 69 63 61 6c 20 73 63 61 |tern mus|ical sca|
|00005fc0| 6c 65 20 69 73 20 62 61 | 73 65 64 20 6f 6e 20 6c |le is ba|sed on l|
|00005fd0| 6f 67 61 72 69 74 68 6d | 69 63 20 66 72 65 71 75 |ogarithm|ic frequ|
|00005fe0| 65 6e 63 69 65 73 2c 20 | 77 68 65 72 65 20 65 61 |encies, |where ea|
|00005ff0| 63 68 20 6d 75 73 69 63 | 61 6c 20 6e 6f 74 65 20 |ch music|al note |
|00006000| 69 73 20 20 74 69 6d 65 | 73 20 74 68 65 20 66 72 |is time|s the fr|
|00006010| 65 71 75 65 6e 63 79 20 | 6f 66 20 74 68 65 20 70 |equency |of the p|
|00006020| 72 65 76 69 6f 75 73 20 | 6e 6f 74 65 2e 20 54 68 |revious |note. Th|
|00006030| 75 73 2c 20 65 76 65 72 | 79 20 74 77 65 6c 76 65 |us, ever|y twelve|
|00006040| 20 74 6f 6e 65 73 20 72 | 65 70 72 65 73 65 6e 74 | tones r|epresent|
|00006050| 73 20 61 20 64 6f 75 62 | 6c 69 6e 67 20 6f 66 20 |s a doub|ling of |
|00006060| 66 72 65 71 75 65 6e 63 | 79 20 2d 2d 20 69 6e 20 |frequenc|y -- in |
|00006070| 6d 75 73 69 63 61 6c 20 | 74 65 72 6d 73 2c 20 6f |musical |terms, o|
|00006080| 6e 65 20 d2 6f 63 74 61 | 76 65 2e d3 20 4f 75 72 |ne .octa|ve.. Our|
|00006090| 20 65 61 72 73 20 66 69 | 6e 64 20 74 68 69 73 20 | ears fi|nd this |
|000060a0| 6d 61 74 68 65 6d 61 74 | 69 63 61 6c 20 72 65 6c |mathemat|ical rel|
|000060b0| 61 74 69 6f 6e 73 68 69 | 70 20 62 65 74 77 65 65 |ationshi|p betwee|
|000060c0| 6e 20 66 72 65 71 75 65 | 6e 63 69 65 73 20 74 6f |n freque|ncies to|
|000060d0| 20 62 65 20 63 6f 6e 73 | 6f 6e 61 6e 74 2c 20 61 | be cons|onant, a|
|000060e0| 6e 64 20 d2 70 6c 65 61 | 73 69 6e 67 2e d3 20 4f |nd .plea|sing.. O|
|000060f0| 74 68 65 72 20 72 61 74 | 69 6f 73 20 61 72 65 20 |ther rat|ios are |
|00006100| 61 6c 73 6f 20 70 6c 65 | 61 73 69 6e 67 2e 20 46 |also ple|asing. F|
|00006110| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 61 6e 20 69 |or examp|le, an i|
|00006120| 6e 74 65 72 76 61 6c 20 | 6f 66 20 73 65 76 65 6e |nterval |of seven|
|00006130| 20 74 6f 6e 65 73 20 72 | 65 70 72 65 73 65 6e 74 | tones r|epresent|
|00006140| 73 20 61 20 66 72 65 71 | 75 65 6e 63 79 20 72 61 |s a freq|uency ra|
|00006150| 74 69 6f 20 6f 66 20 2c | 20 77 68 69 63 68 20 69 |tio of ,| which i|
|00006160| 73 20 76 65 72 79 20 6e | 65 61 72 6c 79 20 2c 20 |s very n|early , |
|00006170| 6f 72 20 69 6e 20 6d 75 | 73 69 63 61 6c 20 74 65 |or in mu|sical te|
|00006180| 72 6d 73 2c 20 61 20 d2 | 70 65 72 66 65 63 74 20 |rms, a .|perfect |
|00006190| 66 69 66 74 68 2e d3 20 | 4e 6f 74 65 20 74 68 61 |fifth.. |Note tha|
|000061a0| 74 20 61 20 6d 75 73 69 | 63 61 6c 20 d2 6f 63 74 |t a musi|cal .oct|
|000061b0| 61 76 65 d3 20 68 61 73 | 20 6e 6f 74 68 69 6e 67 |ave. has| nothing|
|000061c0| 20 74 6f 20 64 6f 20 77 | 69 74 68 20 74 68 65 20 | to do w|ith the |
|000061d0| 6e 75 6d 62 65 72 20 38 | 2c 20 61 6e 64 20 61 20 |number 8|, and a |
|000061e0| d2 70 65 72 66 65 63 74 | 20 66 69 66 74 68 d3 20 |.perfect| fifth. |
|000061f0| 68 61 73 20 6e 6f 74 68 | 69 6e 67 20 74 6f 20 64 |has noth|ing to d|
|00006200| 6f 20 77 69 74 68 20 74 | 68 65 20 6e 75 6d 62 65 |o with t|he numbe|
|00006210| 72 20 35 2e 20 57 65 73 | 74 65 72 6e 20 d2 6d 75 |r 5. Wes|tern .mu|
|00006220| 73 69 63 20 74 68 65 6f | 72 79 d3 20 61 73 20 63 |sic theo|ry. as c|
|00006230| 6f 6d 6d 6f 6e 6c 79 20 | 74 61 75 67 68 74 20 69 |ommonly |taught i|
|00006240| 73 20 61 6e 20 61 6c 63 | 68 65 6d 69 63 61 6c 20 |s an alc|hemical |
|00006250| 68 6f 64 67 65 70 6f 64 | 67 65 20 77 68 65 6e 20 |hodgepod|ge when |
|00006260| 63 6f 6d 70 61 72 65 64 | 20 74 6f 20 74 68 65 20 |compared| to the |
|00006270| 75 6e 64 65 72 6c 79 69 | 6e 67 20 70 72 69 6e 63 |underlyi|ng princ|
|00006280| 69 70 6c 65 73 20 6f 66 | 20 66 72 65 71 75 65 6e |iples of| frequen|
|00006290| 63 79 20 61 6e 64 20 68 | 61 72 6d 6f 6e 69 63 73 |cy and h|armonics|
|000062a0| 2e 0d 41 20 6d 65 63 68 | 61 6e 69 63 61 6c 20 6d |..A mech|anical m|
|000062b0| 75 73 69 63 61 6c 20 69 | 6e 73 74 72 75 6d 65 6e |usical i|nstrumen|
|000062c0| 74 20 6d 61 79 20 6e 65 | 63 65 73 73 61 72 69 6c |t may ne|cessaril|
|000062d0| 79 20 62 65 20 6c 69 6d | 69 74 65 64 20 74 6f 20 |y be lim|ited to |
|000062e0| 61 20 73 6d 61 6c 6c 20 | 73 75 62 73 65 74 20 6f |a small |subset o|
|000062f0| 66 20 74 68 65 20 61 75 | 64 69 62 6c 65 20 66 72 |f the au|dible fr|
|00006300| 65 71 75 65 6e 63 79 20 | 72 61 6e 67 65 2e 20 41 |equency |range. A|
|00006310| 20 70 69 61 6e 6f 2c 20 | 66 6f 72 20 65 78 61 6d | piano, |for exam|
|00006320| 70 6c 65 2c 20 68 61 73 | 20 62 75 74 20 38 38 20 |ple, has| but 88 |
|00006330| 6b 65 79 73 2e 20 54 68 | 65 20 57 65 73 74 65 72 |keys. Th|e Wester|
|00006340| 6e 20 73 63 61 6c 65 20 | 69 73 2c 20 61 74 20 74 |n scale |is, at t|
|00006350| 68 65 20 6c 65 61 73 74 | 2c 20 74 72 61 64 69 74 |he least|, tradit|
|00006360| 69 6f 6e 61 6c 20 66 6f | 72 20 74 68 69 73 20 69 |ional fo|r this i|
|00006370| 6e 73 74 72 75 6d 65 6e | 74 2e 20 54 68 65 20 63 |nstrumen|t. The c|
|00006380| 6f 6d 70 75 74 65 72 2c | 20 68 6f 77 65 76 65 72 |omputer,| however|
|00006390| 2c 20 68 61 73 20 6e 6f | 20 73 75 63 68 20 70 61 |, has no| such pa|
|000063a0| 72 74 69 63 75 6c 61 72 | 20 6c 69 6d 69 74 61 74 |rticular| limitat|
|000063b0| 69 6f 6e 2e 20 4d 61 6e | 79 20 6f 74 68 65 72 20 |ion. Man|y other |
|000063c0| 70 6f 73 73 69 62 6c 65 | 20 73 63 61 6c 65 73 20 |possible| scales |
|000063d0| 61 72 65 20 61 76 61 69 | 6c 61 62 6c 65 20 61 6e |are avai|lable an|
|000063e0| 64 20 69 6e 74 65 72 65 | 73 74 69 6e 67 2e 20 49 |d intere|sting. I|
|000063f0| 20 65 6e 63 6f 75 72 61 | 67 65 20 6d 75 73 69 63 | encoura|ge music|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.