home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 3 #2 / Commodore_Disk_User_Vol.3_2_1989_-.d64 / demo1 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  485b  |  25 lines

  1. 10 (NULL)
  2. 20 print"[147]pulse width sweep demonstration"
  3. 21 print"try small step sizes for best results"
  4. 23 print"this uses three voices with a slight "
  5. 24 print"pitch difference between them"
  6. 25 print"hold space bar to restart"
  7. 26 print""
  8. 30 input"step size";sp
  9. 40 ifsp<1then:goto20
  10. 50 input"frequency";fq
  11. 60 iffq<300then:goto50
  12. 70 (NULL)15
  13. 80 fori=1to3:(NULL) i,9,240
  14. 90 (NULL) i,65
  15. 100 nexti
  16. 110 (NULL) 1,fq:(NULL) 2,fq+30:(NULL) 3,fq-30
  17. 120 rem sweep pulse wave
  18. 130 for i=1 to 4096 step sp
  19. 140 forv=1to3
  20. 150 (NULL) v,i
  21. 160 nextv
  22. 170 geta$:ifa$=chr$(32)thenrun
  23. 180 nexti
  24. 190 goto130
  25.