home *** CD-ROM | disk | FTP | other *** search
/ Da Capo / da_capo_vol1.bin / programs / amiga / misc / fmsynth / sf2.fmsy < prev    next >
Text File  |  1993-12-28  |  1KB  |  82 lines

  1. /* Play demo of all voices in voicedir */
  2.  
  3. listname = "ram:voicelist"
  4. voicedir = "voices/"
  5.  
  6. cmdline = 'c:list' voicedir || '#? nohead quick to' listname
  7. shell command cmdline
  8.  
  9. address fmsynth
  10.  
  11. succ = open(file,listname,"r")
  12.  
  13. if succ=0 then exit 
  14.  
  15. do until eof(file)
  16.  
  17.   line = readln(file)
  18.   voicename = voicedir || line
  19.  
  20.   'openvoice' voicename
  21.  
  22.   if rc=0 then do
  23.     'calcsound'
  24.  
  25.     'pause' 1/4
  26.  
  27.     call play 5, 1/8
  28.     call play 7, 1/8
  29.     call play 5, 1/8
  30.     call play 0, 1/2
  31.     call play 5, 1/16
  32.     call play 7, 1/16
  33.  
  34.     call play 5, 1/8
  35.     call play 7, 1/8
  36.     call play 5, 1/8
  37.     call play 12,5/8
  38.  
  39.     call play 9, 1/8
  40.     call play 10,1/8
  41.     call play 9, 1/8
  42.     call play 7, 1/4
  43.     call play 9, 1/8
  44.     call play 7, 1/4
  45.  
  46.     call play 5, 1/8
  47.     call play 2, 1/16
  48.     call play 4, 1/16
  49.     call play 5, 1/8
  50.     call play 5, 1/16
  51.     call play 7, 1/16
  52.     call play 9, 1/2
  53.  
  54.     call play 14, 1/4
  55.     call play 17, 1/4
  56.     call play 16, 1/4
  57.     call play 13, 1/4
  58.  
  59.     call play 14, 3/8
  60.     call play 14, 1/16
  61.     call play 16, 1/16
  62.     call play 14, 1/2
  63.  
  64.   end
  65. end
  66.  
  67. close(file)
  68.  
  69. exit
  70.  
  71. play:
  72.  
  73. arg n,m
  74.  
  75. 'noteon'  n+16
  76. 'pause'   m*1.9-0.04
  77. 'noteoff' n+16
  78. 'pause'   0.02
  79.  
  80. return
  81.  
  82.