showvoices.fs 358 B

1234567891011121314151617
  1. start-microcode showvoices
  2. \ continuously move sprites 0-63 to match amplitude of the
  3. \ 64 sound voices.
  4. : main
  5. d# 0
  6. begin
  7. dup d# 4 * VOICES + d# 2 + c@ \ read voice amplitude
  8. invert
  9. over d# 4 * RAM_SPR + d# 2 + c! \ write as sprite Y coord
  10. 1- h# 3f and \ next voice
  11. again
  12. ;
  13. end-microcode