home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 131.dms / 131.adf / D / casio.txt < prev    next >
Text File  |  1988-07-25  |  23KB  |  623 lines

  1.  THIS IS AIMED SPECIFICALLY AT CZ101,CZ1000 and CZ5000 OWNERS.
  2.  
  3. NOTE: I beleive the data given to me by Casio to be a) correct, and b) public
  4.         domain ( since they just give it to you if you are persistent enough.
  5.         Please forgive spelling, syntactic, or grammatical errors since I am
  6.         trying to condense the manual as I go along...
  7.  
  8. -------------------------------------------------------------------------------
  9.  
  10. Right, at long last, I have been able to get a reply out of CASIO UK about the
  11. MIDI standards of the CZ series of synthesizers. For those of you who know
  12. how to play your keyboard by remote control from a computer, this will be of
  13. some interest, since it covers transmission of programming information ( both
  14. to and from the CZ ), setting of the controllers you previously couldn't access
  15. like tone mix level, and other bits besides.
  16.  
  17. First off, let's recap on the simple stuff. The MIDI is a digital interface to
  18. musical instruments, and relies on serial transmission of data. These data are
  19. usually talked of in terms of bytes, and I shall be using hexadecimal numbers
  20. in this posting.
  21.  
  22. There are basically two types of bytes sent over MIDI - control bytes and data
  23. bytes. Control bytes are distinguished by having values over 0x80 ( 80 hex, 
  24. 128 decimal ), and these have valious meanings:
  25.  
  26. 1) NOTE ON
  27. ----------
  28.  
  29. A note on message consists of sending a "NOTE ON" control byte, the note number
  30. you want to turn on, and the velocity at which you want to play the note. The
  31. note on control is 90 plus the channel number. So, for example, if you want to
  32. play note 32 ( = hex 20) at speed 64 (= hex 40), on the midi instrument receiv-
  33. ing on channel two, then you would send:
  34.  
  35.         92              20              40
  36. NOTE ON, channel 2      Note #32        Velocity 64
  37.  
  38. If you wish to turn two or more notes on at the same time, the control byte
  39. need not be retransmitted. Eg to turn note 35 on as well, you could send
  40.  
  41.         92      20      40      23      40
  42. NOTE ON, ch2    ---32 on--      ---35 on--
  43.  
  44. These codes can be transmitted both ways on all the CZ 101,1000,5000, but since
  45. they do not detect note velocity, it is always transmitted and recognized as
  46. 64 (= 40 hex).
  47.  
  48. 2) NOTE OFF
  49. -----------
  50.  
  51. Just send a note on message with velocity 0. Eg to turn note 35 off, send
  52.  
  53.         92      23      00
  54. NOTE ON,Ch 2    --35 off--
  55.  
  56.  
  57. 3) CONTROL CHANGE
  58. -----------------
  59. There are several controls that can be set from MIDI. Just send a "CONTROL CH"
  60. byte , which is B0 plus the channel number, the number of the control that you
  61. wish to change, then the value you wish to set it to. Eg for CZ101 portamento
  62. time, send
  63.  
  64.         B0      05      10
  65. CONTROL, ch 0   --ctrl 5=16--
  66.  
  67. The controls are:
  68.  
  69. CZ101/1000
  70.  
  71. 01      Vibrato on/off          Send 0 for off, 7F for ON
  72. 05      Portamento time         Send number 00..63 (0..99)
  73. 06      Master tune             Send number 00..7F
  74. 41      Portamento on/off       Send 0 for OFF, 7F for ON
  75.  
  76. CZ5000
  77.  
  78. 01      Modulation wheel        Send number 00..7F
  79. 05      Portamento time         Send number 00..63
  80. 06      Master tune             Send number 00..7F
  81. 40      Sustain pedal           Send 0 for OFF, 7F for ON
  82. 41      Portamento on/off       Send 0 for OFF, 7F for ON
  83.  
  84. 4) PROGRAM CHANGE
  85. -----------------
  86. This allows you to change between the preset sounds ( and your internal
  87. sounds and cartridges ). Just send C0 plus the channel number, then the
  88. program number. Eg to set CZ101 on channel 1 to Synth Bass:
  89.  
  90.         C1              07
  91. PROGRAM ch 1            Program 7
  92.  
  93. Note that the preset tones are given numbers :
  94.  
  95. CZ101/1000
  96.  
  97. 0..0F   Preset sounds 1..16
  98. 20..2F  Internal sounds 1..16
  99. 40..4F  Cartridge sounds 1..16
  100.  
  101. CZ5000
  102.  
  103. 00..1F  Preset sounds A1,A2,A3....D6,D7,D8
  104. 20..3F  Internal sounds A1,A2.....D6,D7,D8
  105.  
  106.  
  107. 5) PITCH BEND CHANGE
  108. --------------------
  109.  
  110. This is acheived by sending E0 plus the channel number, then two bytes 
  111. denoting the new value of pitch bend. The first byte is the most significant,
  112. and the second the least significant. Note also that the lower 6 bits of the
  113. lower byte are not used, and that the central position of the wheel corres-
  114. ponds to the byte sequence 40 00.
  115.  
  116.         HIGHEST         7F 40
  117.  
  118.         HIGHER
  119.  
  120.         CENTER          40 00
  121.  
  122.         LOWER
  123.  
  124.         LOWEST          00 00
  125.  
  126.  
  127. So, to bend the instrument on channel two UP by about half its maximum amount,
  128. send
  129.  
  130.         E2              60      00
  131. BEND channel two        ---1/2 up--
  132.  
  133.  
  134. 6) AFTER TOUCH
  135. --------------
  136. Is not supported on the CZ101/1000/5000. Sorry!
  137.  
  138. 7) MODE CHANGE
  139. --------------
  140. This is very similar to the CONTROL CHANGE message, and can be regarded as a
  141. special case. 
  142.  
  143. OMNI ON         send E0 + channel, 7D, 00
  144. OMNI OFF        send B0 + channel, 7C, 00
  145. POLY ON         send B0 + channel, 7F, 00
  146. POLY OFF        send B0 + channel, 7E, 00
  147.  
  148. OMNI mode plays any MIDI data received at the MIDI IN plug on the back of
  149. the machine, regardless of channel. POLY mode is equivalent to the SOLO button
  150. on the front panel. With the CZ101, for instance, POLY OFF ( =SOLO ) allows
  151. the synth to be used as four monophonic synthesizers under remote control.
  152.  
  153. LOCAL ON        send B0 + channel, 7A, 7F
  154. LOCAL OFF       send B0 + channel, 7A, 00
  155.  
  156. Local mode means that the keyboard is "connected" to the sound producing 
  157. part of the CZ within the machine itself. With LOCAL ON ( the default setting ),
  158. playing the keyboard both sends note messages out of the MIDI port, and also
  159. makes sounds at the same time. If you want to do wierd things like keyboard
  160. splitting, LOCAL OFF will allow you to see what the keyboard is doing without
  161. the CZ making any sound at all. You could then act on that information and send
  162. the keyboard a command depending on the keys that has nothing to do with them,
  163. eg program change or pitch bend. The possibilities are endless !
  164.  
  165.  
  166. SEQUENCER MESSAGES
  167. ------------------
  168. The CZ5000 has its own internal sequencer, which can be controlled by:
  169.  
  170. F8      Clock byte: transmitted 24 times per quarter note ( crotchet )
  171. FA      Start: same as pressing the PLAY button on the front panel
  172. FB      Continue: continue song where last stopped
  173. FC      Stop: stops song play at current position
  174. FD      Active sense: basically, a cry of "Is there anybody out there". If no
  175.         reply is received within about 1/3 second, it shuts the voice off.
  176.  
  177.  
  178. SYSTEM EXCLUSIVE MESSAGES
  179. -------------------------
  180.  
  181. At last, the really meaty stuff. :-)
  182.  
  183. These all have the basic form:
  184.  
  185.         F0      machine ID      some bytes      F7
  186. SYS EX MESSG    YES, YOU        DO THIS         END OF SYS EX
  187.  
  188. Ok, so not very specific, bu that was deliberate to allow manufacturers to use
  189. all the lovely bells and whistles they put on their machine over the MIDI !
  190.  
  191. Since these are usually controlled by computer, I have set them out as a
  192. computer/synthesizer dialogue. Note that the computer MUST wait for replies
  193. before proceding, or all will fail !
  194.  
  195. Here we go, then 
  196.  
  197. 1) SET BEND RANGE
  198. -----------------
  199.  
  200. Computer:       F0 44 00 00 70+channel 40 data F7
  201.  
  202. Eg to set bend range to 8 on channel 4, send
  203.                 F0 44 00 00 74 40 08 F7
  204.  
  205. 2) KEY TRANSPOSE
  206. ----------------
  207.  
  208. Computer:       F0 44 00 00 70+channel 41 data F7
  209.  
  210. Data is as follows:
  211. Key:    G  A  A# B  B# C  C# D  E  E# F  F#
  212. Data:   45 44 43 41 41 00 01 02 03 04 05 06
  213.  
  214. Eg to set key on channel 0 to C#, send
  215.                 F0 44 00 00 70 41 01 F7
  216.  
  217. 3) TONE MIX
  218. -----------
  219.  
  220. Computer:       F0 44 00 00 70+channel 42 data F7
  221.  
  222. The data is 00 to turn tone mix off, or 41..49 for mix level 1..9
  223.  
  224. Eg to set tone mix on channel 0 to 7, send
  225.                 F0 44 00 00 70 42 47 F7
  226.  
  227. 4) ASK ABOUT PROGRAMMER ( Send request 2 )
  228. -----------------------
  229.  
  230. Computer:       F0 44 00 00 70+channel 19 00
  231. CZ101/1000:     F0 44 00 00 70+channel 30
  232. Computer:       70+channel 31
  233. CZ101/1000:     data1 data2 F7
  234. Computer:       F7
  235.  
  236. data1 is the program selected ( see PROGRAM CHANGE )
  237. data2 returns the vibrato/portamento on/off setting:
  238.  
  239. data2   00      10      20      30
  240. Vibrato OFF     OFF     ON      ON
  241. Port'o  OFF     ON      OFF     ON
  242.  
  243. Eg an exchange such as
  244. Computer:       F0 44 00 00 70 19 00            "Want data on channel 0"
  245. CZ101:          F0 44 00 00 70 30               "Gotcha.. data ready"
  246. Computer:       70 31                           "Ok, give it to me"
  247. CZ101:          27 30 F7                        "Internal 8, v on, p on"
  248. Computer:       F7
  249.  
  250. REMOTE PROGRAMMING
  251. ------------------
  252. The send request 1 and receive request 1 messages.
  253.  
  254. These dump a lot of data across the MIDI, which is the same for both messages,
  255. except that the data go the other way. The exchanges are:
  256.  
  257. Send request
  258. Computer:       F0 44 00 00 70+channel 10 program
  259. CZ101/1000:     F0 44 00 00 70+channel 30
  260. Computer:       70+channel 31
  261. CZ101/1000:     <tone data> F7
  262. Computer:       F7
  263.  
  264. Receive request
  265. Computer:       F0 44 00 00 70+channel 20 program
  266. CZ101/1000:     F0 44 00 00 70+channel 30
  267. Computer:       <tone data> F7
  268. Cz101/1000:     F7
  269.  
  270. The program byte is the same as that set by the PROGRAM CHANGE function, with
  271. the addition that you can request the temporary sound area as well ( number is
  272. 60 ). This is the area that is used if you have altered a preset and not saved
  273. it into internal memory.
  274.  
  275. <tone data> is a sequence of 256 bytes containing a LOT of info. Now Casio have
  276. done a lot of funny things with these, like splitting bytes in half and encoding
  277. things in wierd ways so please bear with me.
  278.  
  279. To keep everything this side of infinite length, I shall adopt the same strategy
  280. as the manual, which is to write data in bytes, although they are transmitted
  281. in half- bytes. For example, me writing a byte as 5F requires you to transmit or
  282. receive as 0F 05 ( wierd, huh ? ). This will obvoiusly save a lot of space.
  283.  
  284. So, here goes again :-)
  285.  
  286. There are 25 distinct sections within <tone data>
  287.  
  288. Sec#    Length  Symbol          Contents
  289.         (bytes)
  290.  
  291. 1       1       pflag           line select data, octave range
  292. 2       1       pds             detune up or down
  293. 3       2       pdl,pdh         detune range
  294. 4       1       pvk             vibrato wave number
  295. 5       3       pvdld,pvdlv     vibrato delay time
  296. 6       3       pvsd,pvsv       vibrato rate
  297. 7       3       pvdd,pvdv       vibrato depth
  298. 8       2       mfw             dco1 waveform
  299. 9       2       mamd,mamv       dca1 key follow
  300. 10      2       mwmd,mwmv       dcw1 key follow
  301. 11      1       pmal            end step number of dca1 envelope
  302. 12      16      pma             dca1 envelope rate/level
  303. 13      1       pmwl            end step number of dcw1 envelope
  304. 14      16      pmw             dcw1 envelope rate/level
  305. 15      1       pmpl            end step number of dco1 envelope
  306. 16      16      pmp             dco1 envelope rate/level
  307. 17      2       sfw             dco2 waveform
  308. 18      2       samd,samv       dca2 key follow
  309. 19      2       swmd,swmv       dcw2 key follow
  310. 20      1       psal            end step number of dca2 envelope
  311. 21      16      psa             dca2 rate/level
  312. 22      1       pswl            end step number of dcw2 envelope
  313. 23      16      psw             dcw2 rate/level
  314. 24      1       pspl            end step number of dco2 envelope
  315. 25      16      psp             dco2 rate/level
  316.  
  317. 1) PFLAG
  318. Looking at bits,
  319.         0000  00   00
  320.  Not used^   OCTV  LS
  321.  
  322. OCTV controls octave range: 00=octave 0, 01=+1, 10=-1
  323.  
  324. LS is the line select: 00=1, 01=2, 10=1+1', 11=1+2'
  325.  
  326. So, fo Octave +1, line select 1+1', PFLAG=00000110 = 06
  327.  
  328. 2)PDS
  329. For detune +, PDS is 0, for detune - it is 01
  330.  
  331. 3)PDETL,PDETH
  332.  
  333. Two bytes controlling the depth of the detune.
  334. The first byte is the FINE data.
  335.  
  336. FINE:   0..15   16..30  31..45  46..60
  337. Byte:   00..0F  11..1F  21..2F  31..3F
  338.  
  339. The second contains both the octave and note data:
  340.  
  341. OCT:    0       1       2       3
  342. NOTE:   0..11   0..11   0..11   0..11
  343. Byte:   00..0B  0C..17  18..23  24..2F
  344.  
  345.  
  346. 4) PVK
  347.  
  348. This is the vibrato wave number, encoded as follows
  349.  
  350. WAVE NUMBER:    1       2       3       4
  351. Byte:           08      04      20      02
  352.  
  353. 5) PVDLD,PVDLV
  354.  
  355. This is the vibrato delay time, transmitted in three bytes.
  356.  
  357. Delay   Bytes           Delay   Bytes           Delay   Bytes
  358. 25      19 00 19        50      32 00 4B        75      4B 00 DF
  359. 26      1A 00 1A        51      33 00 4F        76      4C 00 E7
  360. 27      1B 00 1B        52      34 00 53        77      4D 00 EF
  361. 28      1C 00 1C        53      35 00 57        78      4E 00 F7
  362. 29      1D 00 1D        54      36 00 5B        79      4F 00 FF
  363. 30      1E 00 1E        55      37 00 5F        80      50 01 0F
  364. 31      1F 00 1F        56      38 00 63        81      51 01 1F
  365. 32      20 00 21        57      39 00 67        82      52 01 2F
  366. 33      21 00 23        58      3A 00 6B        83      53 01 3F
  367. 34      22 00 25        59      3B 00 6F        84      54 01 4F
  368. 35      23 00 27        60      3C 00 73        85      55 01 5F
  369. 36      24 00 29        61      3D 00 77        86      56 01 6F
  370. 37      25 00 2B        62      3E 00 7B        87      67 01 7F
  371. 38      26 00 2D        63      3F 00 7F        88      58 01 8F
  372. 39      27 00 2F        64      40 00 87        89      59 01 9F
  373. 40      28 00 31        65      41 00 8F        90      5A 01 AF
  374. 41      29 00 33        66      42 00 97        91      5B 01 BF
  375. 42      2A 00 35        67      43 00 9F        92      5C 01 CF
  376. 43      2B 00 37        68      44 00 A7        93      5D 01 DF
  377. 44      2C 00 39        69      45 00 AF        94      5E 01 EF
  378. 45      2D 00 3B        70      46 00 B7        95      5F 01 FF
  379. 46      2E 00 3D        71      47 00 BF        96      60 02 1F
  380. 47      2F 00 3F        72      48 00 C7        97      61 02 3F
  381. 48      30 00 43        73      49 00 CF        98      62 02 5F
  382. 49      31 00 47        74      4A 00 D7        99      63 02 7F
  383.  
  384. For delays in the range 0..31, just transmit 00..1F, 00, 00..1F eg for delay
  385. of 12, send 0C 00 0C. This is convenient since it saves me typing in another
  386. column of boring numbers ;-)
  387.  
  388. 6) PVSD,PVSV
  389.  
  390. Again, here comes another table for conversions. The first column (0..24) is
  391. omitted since the only difficult thing needed is to add 01 00 20 to each entry
  392. ( The first few go 00 00 20, 01 00 40, 02 00 60, ... 06 00 E0, 07 01 00, ..)
  393.  
  394. Rate    Bytes           Rate    Bytes           Rate    Bytes
  395. 25      19 03 40        50      32 09 E0        75      4B 1C E0
  396. 26      1A 03 60        51      33 0A 60        76      4C 1D E0
  397. 27      1B 03 80        52      34 0A E0        77      4D 1E E0
  398. 28      1C 03 A0        53      35 0B 60        78      4E 1F E0
  399. 29      1D 03 C0        54      36 0B E0        79      4F 20 E0
  400. 30      1E 03 E0        55      37 0C 60        80      50 23 E0
  401. 31      1F 04 00        56      38 0C E0        81      51 25 E0
  402. 32      20 04 60        57      39 0D 60        82      52 27 E0
  403. 33      21 04 A0        58      3A 0D E0        83      53 29 E0
  404. 34      22 04 E0        59      3B 0E 60        84      54 2B E0
  405. 35      23 05 20        60      3C 0E E0        85      55 2D E0
  406. 36      24 05 60        61      3D 0F 60        86      56 2F E0
  407. 37      25 05 A0        62      3E 0F E0        87      57 31 E0
  408. 38      26 05 E0        63      3F 10 60        88      58 33 E0
  409. 39      27 06 20        64      40 11 E0        89      59 35 E0
  410. 40      28 06 60        65      41 12 E0        90      5A 37 E0
  411. 41      29 06 A0        66      42 13 E0        91      5B 39 E0
  412. 42      2A 06 E0        67      43 14 E0        92      5C 3B E0
  413. 43      2B 07 20        68      44 15 E0        93      5D 3D E0
  414. 44      2C 07 60        69      45 16 E0        94      5E 3F E0
  415. 45      2D 07 A0        70      46 17 E0        95      5F 41 E0
  416. 46      2E 07 E0        71      47 18 E0        96      60 47 E0
  417. 47      2F 08 20        72      48 19 E0        97      61 4B E0
  418. 48      30 08 E0        73      49 1A E0        98      62 4F E0
  419. 49      31 09 60        74      4A 1B E0        99      63 53 E0
  420.  
  421. 7) PVDD,PVDV
  422.  
  423. These are again encoded as three bytes in a most obscure way. Below 32, the
  424. encoding is 00..1F, 00, 01..20 eg for depth 13, send 0D 00 0E.
  425.  
  426. Depth   Bytes           Depth   Bytes           Depth   Bytes
  427. 25      19 00 1A        50      32 00 4F        75      4B 00 E7
  428. 26      1A 00 1B        51      33 00 53        76      4C 00 EF
  429. 27      1B 00 1C        52      34 00 57        77      4D 00 F7
  430. 28      1C 00 1D        53      35 00 5B        78      4E 00 FF
  431. 29      1D 00 1E        54      36 00 5F        79      4F 01 07
  432. 30      1E 00 1F        55      37 00 63        80      50 01 1F
  433. 31      1F 00 20        56      38 00 67        81      51 01 2F
  434. 32      20 00 23        57      39 00 6B        82      52 01 3F
  435. 33      21 00 25        58      3A 00 6F        83      53 01 4F
  436. 34      22 00 27        59      3B 00 73        84      54 01 5F
  437. 35      23 00 29        60      3C 00 77        85      55 01 6F
  438. 36      24 00 2B        61      3D 00 7B        86      56 01 7F
  439. 37      25 00 2D        62      3E 00 7F        87      57 01 8F
  440. 38      26 00 2F        63      3F 00 83        88      58 01 9F
  441. 39      27 00 31        64      40 00 8F        89      59 01 AF
  442. 40      28 00 33        65      41 00 97        90      5A 01 BF
  443. 41      29 00 35        66      42 00 9F        91      5B 01 CF
  444. 42      2A 00 37        67      43 00 A7        92      5C 01 DF
  445. 43      2B 00 39        68      44 00 AF        93      5D 01 EF
  446. 44      2C 00 3B        69      45 00 B7        94      5E 01 FF
  447. 45      2D 00 3D        70      46 00 BF        95      5F 02 0F
  448. 46      2E 00 3F        71      47 00 C7        96      60 02 3F
  449. 47      2F 00 41        72      48 00 CF        97      61 02 5F
  450. 48      30 00 47        73      49 00 D7        98      62 02 7F
  451. 49      31 00 4B        74      4A 00 DF        99      63 03 00
  452.  
  453. 8) MFW
  454.  
  455. These two bytes transmit the waveform for DCO1, and also the modulation ie
  456. ring, noise or none.
  457.  
  458.                 First byte      Second byte
  459.                 000 000 0  0  00 000 000
  460.  
  461. First=1         000        0  00
  462. Fisrt=2         001        0  00
  463. First=3         010        0  00
  464. First=4         100        0  00
  465. First=5         101        0  00
  466. First=6         110        0  01
  467. First=7         110        0  10
  468. First=8         110        0  11
  469. Second=1            000 1  0  00
  470. Second=2            001 1  0  00
  471. Second=3            010 1  0  00
  472. Second=4            100 1  0  00
  473. Second=5            101 1  0  00
  474. Second=6            110 1  0  01
  475. Second=7            110 1  0  10
  476. Second=8            110 1  0  11
  477. NO MODULATION                    000
  478. RING MODULATION                  100
  479. NOISE MODULATION                 011
  480.  
  481. So, for instance, to set first = 4, second= 2, ring modulation, we have
  482.  
  483.         100 001 1 0 00 100 000 = 1000 0110 0010 0000 = 86 20
  484.  
  485. 9) MAMD,MAMV
  486.  
  487. These two bytes set the DCA1 key follow:
  488.  
  489. Key follow:     0   1   2   3   4   5   6   7   8   9
  490. 1st byte:       00  01  02  03  04  05  06  07  08  09
  491. 2nd byte:       00  08  11  1A  24  2F  3A  45  52  5F
  492.  
  493.  
  494. 10) MWMD, MWMV
  495.  
  496. These two bytes set the DCW1 key follow
  497.  
  498. Key follow:     0   1   2   3   4   5   6   7   8   9
  499. 1st byte:       00  01  02  03  04  05  06  07  08  09
  500. 2nd byte:       00  1F  2C  39  46  53  60  6E  92  FF
  501.  
  502.  
  503. 11) PMAL
  504.  
  505. This sets the position of the end step on DCA1. Step 1..8 gives bytes 00..07.
  506.  
  507. 12) PMA
  508.  
  509. This consists of 8 repetitions of Rate,Level.
  510.  
  511. Given that you wish to set rate r, the data you need to send is
  512.  
  513.         Byte= 119 x r
  514.               -------
  515.                 99
  516. Conversely, if byte=0, rate=0, if byte=7F, rate=99, otherwise
  517.  
  518.         r=99 x byte
  519.           --------- + 1
  520.              119
  521.  
  522. Add 80 hex if the level will be coming down on this step.
  523.  
  524. The level goes up linearly, with 0 being 00, up to 99 is 7F, so that
  525.  
  526.         Byte= 127 x level
  527.               -----------
  528.                  99
  529.  
  530. and     Level= 99 x byte
  531.                --------- + 1
  532.                   127
  533.  
  534. except at byte=0 where level=0, and byte=127, where level=99
  535.  
  536. In all these conversions, fractional parts are ignored, so a result of
  537. byte=24.6987 would be taken as byte=24.
  538.  
  539. 13) PMWL
  540.  
  541. End step number for DCW1. Same as PMAL
  542.  
  543.  
  544. 14) PMW
  545.  
  546. This sets the steps in DCW1, and consists of 8 repetitions of Rate,Level.
  547. The format is similar to PMA, so that you add 80 ( 128 dec ) to the rate if
  548. the level is coming down this step, and that you add 80 to the level if you
  549. wish to set a sustain point. The level data is handled the same as PMA, but 
  550. for some strange reason the rate data is encoded differently.
  551.  
  552. So      byte= 119 x level
  553.               ----------- + 8
  554.                   99
  555.  
  556. and     level= 99 x (byte-8)
  557.                ------------- +1
  558.                     119
  559.  
  560. except where byte=8, level=0, and where byte=77, level=99
  561.  
  562. 15) PMPL
  563.  
  564. Another end step setting, this time for DCO1. Same as PMAL and PMWL
  565.  
  566. 16) PMP
  567.  
  568. Another envelope setting, this time for the DCO1 rates and levels. Again uses a
  569. completely different encoding scheme.
  570.  
  571.         byte= 127 x rate
  572.               ----------
  573.                   99
  574. and
  575.         rate= 99 x byte
  576.               --------- + 1
  577.                  127
  578.  
  579. except where byte=00, rate=0, where byte=7F, rate=99
  580.  
  581. For the level, level data 0..63 translate as bytes 00..3F, and level data
  582. 64..99 translate as bytes 44..67.
  583.  
  584. 17) SFW
  585.  
  586. These two bytes set the waveform for DCO2. They use the same format as MFW
  587. does for DCO1, except that the modulation bits are ignored ( it is best to set
  588. these bits to zero , just in case ).
  589.  
  590. 18) SAMD,SAMV
  591. 19) SWMD,SWMV
  592. 20) PSAL
  593. 21) PSA
  594. 22) PSWL
  595. 23) PSW
  596. 24) PSPL
  597. 25) PSP
  598.  
  599. All the above use the same formats as their counterparts for the first set of
  600. DCO,DCW,DCA, and perform exactly the same functions on the DCA2,DCW2,and DCO2.
  601.  
  602.  
  603.  
  604. This concludes what I hope has been an informative article ( if rather a long
  605. one :-)  ). 
  606.  
  607. Thong
  608.  
  609.  
  610.  
  611.  
  612. [ The views above are my own (except any quotes !) and not anyone elses.. so   ]
  613. [ flame me personally, not them                                                ]
  614. +------------------------------------------------------------------------------+
  615. |                                                                              |
  616. |   "Thong" Ellis, Reading University Computer Science VAX "Sage", England     |
  617. |                                                                              |
  618. |     "But there aren't any REAL people here at all..." : Roosta               |
  619. |                                                                              |
  620. +------------------------------------------------------------------------------+
  621.  
  622.  
  623.