APPENDIX SIX ______________________________________________________________ Sound And Music Sound on the Atari can be quite sophisticated or quite simple, depending on your needs and programming abilities. Simple sounds may be input using the SOUND command; you enter the voice (zero to three), the pitch (zero to 255), the distortion (even numbers from zero to fourteen) and the volume (one to fifteen) in this manner: SOUND 0,121,10,8 This will give you a pure tone middle C, moderate volume. The SOUND command is only one way to adjust your music or sound in the Atari. You can also POKE directly into the POKEY registers to effect changes. For example, you can increase the normal five octave range to nine by setting the proper bits in location 53768. This method reduces the number of voices to two or three, but does give you quite a range. You can use all sorts of tricks with filters, clock channels, and poly counters, as described in the POKEY locations. For the best description of sound control technique, see De Re Atari. Here are the pitch values for the major notes when used with a pure tone in the sound command: Note Octave 1 2 3 4 5 C 14 29 60 121* 243 B 15 31 64 128 255 A# or Bb 16 33 68 136 A 17 35 72 144 G# or Ab 18 37 76 153 G 19 40 81 162 F# or Gb 21 42 85 173 F 22 45 91 182 E 23 47 96 193 D# or Eb 24 50 102 204 D 26 53 108 217 C# or Db 27 57 114 230 You can see that the intervals between notes increase as the pitch decreases (the larger the number, the lower the pitch). Middle C is marked with "*". Here's a simple routine to test pitch and distortion with one voice: 5 PRINT CHR$(125): POKE 752,2 10 A = 0: B = O: C = 0 20 SOUND 0,A,B,C: POSITION 0,0 30 PRINT "PITCH", "DISTORTION", "VO LUME" 35 POSITION 0,2: PRINT A, B;" ",, C;" "