home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / music / musicscl / musscale.doc next >
Text File  |  1987-08-02  |  2KB  |  35 lines

  1. The  MUSSCALE  program is an example of a way  to  play  musical 
  2. notes  from a Pascal program.   After playing with  several  BASIC 
  3. programs that played music on the internal synthesizer,  I thought 
  4. that  BASIC was simply doing a little bit fiddling to produce  the 
  5. notes. I quickly found out that there is more to it than that. 
  6.  
  7. Although  I  have  two books devoted to ST sound  and  the  Abacus 
  8. Internals book,  I couldn't figure out how to get a musical scale.  
  9. There  was some non-trivial conversion required.  As a  matter  of 
  10. fact,  Internals has some information that is actually  wrong.  It 
  11. says  the  period information is divided into  a  'set  frequency' 
  12. field and a 'step size' field.  Not so.    It is one single 12 bit 
  13. number. 
  14.  
  15. The  scale we use for music divides an octave up into 12 notes. Two 
  16. notes  F0 and F1 where F1 is one semitone higher than F0 have  the 
  17. relationship:  F1  :=  F0 * 2 ^ (1 / 12).   To  establish  a  base 
  18. frequency,  I  got  a  zero beat between  the  synthesizer  and  a 
  19. keyboard.   From this I established middle C as having a period of 
  20. 478  on the ST.   With this background,  the program  should  make 
  21. sense  to  you.   Note      that    the sound chip can  produce 27 
  22. frequencies *between* middle C and the adjacent B!
  23.  
  24. I  got the number 478 by beating against a Yamaha PSR-11  keyboard 
  25. which  has the pitch still at the factory setting.   Someone  with 
  26. better  ears and/or equipment could, perhaps, refine that  figure.  
  27. Please let me know of any improvements you come up with.  The
  28. program includes an easy way to tune the synthesizer channel. You
  29. can almost 'hear' a string getting tighter and looser as you tune.
  30.  
  31. The  program  has  code to turn the key clicker off  and  back  on 
  32. automatically   without  using  the   CONTROL.ACC.   The   clicker 
  33. interferes badly with sound production.
  34.  
  35.