home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 11 / 64er_Magazin_Sonderheft_11_86-11_1986_Markt__Technik_de_Side_A.d64 / modulator-test (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  144 lines

  1. 10 rem--------------------------------
  2. 11 rem rahmenprogramm zum test von
  3. 12 rem m o d u l a t o r
  4. 13 rem
  5. 14 rem thomas kraetzig   februar 1985
  6. 15 rem--------------------------------
  7. 20 rem  sid f  pw port wf  a  d  s  r
  8. 21 data   110, 50, 32, 64, 1,10, 8,10
  9. 22 data   220, 50, 48, 64, 1,10, 8,10
  10. 23 data   440, 50, 64, 32, 1,10, 8,10
  11. 24 :
  12. 25 rem  filter  f  res  filt mod laut
  13. 26 data        64,  12,    7,  1,  15
  14. 27 :
  15. 28 rem lfo f   p   a  c    f   p   a  c
  16. 29 data 5000,128,  6, 6,7000,128,  6, 6
  17. 30 data  800,128,128, 6,9000,128,  8, 6
  18. 31 data 6000,128,103,30,1000,128,196, 6
  19. 32 data   15,128,128, 0
  20. 33 :
  21. 34 rem  eg  a   d   s   r   ega   egc
  22. 35 data    20, 15, 32, 20,  128,   06
  23. 36 :
  24. 37 rem   ksv
  25. 38 data  00000001,f1,    00000010,f2
  26. 39 data  00001000,f3,    00000100,pw1
  27. 40 data  00000000,pw2,   00000000,pw3
  28. 41 data  10000000,filt,  00000000,laut
  29. 245 :
  30. 250 b=12*4096 :rem basis fuer parameter
  31. 255 si=13*4096+1024 :rem sid-basis
  32. 260 :
  33. 265 rem datas einlesen, sid- und
  34. 270 rem modulator-register besetzen
  35. 275 :
  36. 280 for ss=0 to 2 :rem 3 stimmen
  37. 285 :
  38. 290 : rem frequenz
  39. 295 : read f:f=int(f*17.0284+0.5)
  40. 300 : hi=int(f/256):lo=f-256*hi
  41. 305 : poke b+7*ss,lo:poke b+1+7*ss,hi
  42. 310 : bf(ss)=f    :rem basisfrequenz
  43. 315 :
  44. 320 : rem pulsweite
  45. 325 : read p:p=int(p*40.95+0.5)
  46. 330 : hi=int(p/256):lo=p-256*hi
  47. 335 : poke b+2+7*ss,lo
  48. 340 : poke b+3+7*ss,hi
  49. 345 :
  50. 350 : rem porta
  51. 355 : read p:poke b+4+7*ss,p
  52. 360 :
  53. 365 : rem wellenform
  54. 370 : read wf(ss):wf(ss)=wf(ss) and 254
  55. 375 :
  56. 380 : rem a d s r - huellkurve
  57. 385 : reada:readd:pokesi+7*ss+5,16*a+d
  58. 390 : reads:readr:pokesi+7*ss+6,16*s+r
  59. 395 :
  60. 400 next ss
  61. 405 :
  62. 410 rem filter, lautstaerke
  63. 415 read f:hi=int(f/8):lo=f-8*hi
  64. 420 poke b+21,lo:poke b+22,hi
  65. 425 read res:read filt
  66. 430 poke si+23,16*res+filt
  67. 435 read mod:read laut
  68. 440 poke b+23,16*mod+laut
  69. 445 :
  70. 450 rem lfo
  71. 455 for i=0 to 6
  72. 460 : read f:hi=int(f/256):lo=f-256*hi
  73. 465 : poke b+32+5*i,lo
  74. 470 : poke b+33+5*i,hi
  75. 475 : read p:poke b+34+5*i,p
  76. 480 : read a:poke b+35+5*i,a
  77. 485 : read c:poke b+36+5*i,c
  78. 490 next i
  79. 495 :
  80. 500 rem eg (a d s r)
  81. 505 for i=0 to 4:read x:poke b+67+i,x
  82. 510 next i
  83. 515 read ec      :rem steuerbyte merken
  84. 520 ec=ec and 254:rem gate=0
  85. 525 poke b+72,ec
  86. 530 :
  87. 535 rem ksv
  88. 540 for i=0 to 7
  89. 545 : read a$:a=0
  90. 550 : for j=1 to 8
  91. 555 :  a=2*a
  92. 560 :  if mid$(a$,j,1)="1"then a=a+1
  93. 565 : next j
  94. 570 : poke b+24+i,a
  95. 575 : read a$    :rem ueberlesen
  96. 580 next i
  97. 585 :
  98. 590 rem eingabezeichen fuer noten
  99. 595 n$="q2w3er5t6y7ui9o0p@-*\^"
  100. 600 :
  101. 610 rem relative tonhoehen
  102. 615 dim th(21)
  103. 620 for i=0 to 21
  104. 625 : th(i)=2^(i/12)
  105. 630 next i
  106. 635 :
  107. 640 sys b+1024+9 :rem modulator starten
  108. 642 :
  109. 645 rem zeitmessung auswerten
  110. 650 t=peek(b+113)+256*peek(b+114)
  111. 655 t1=int(t/100)/10
  112. 660 t2=int(1000*t/16421)/10
  113. 665 print"zeitbedarf:";t1;"ms";
  114. 670 print"  auslastung:";t2;"%[145][145][145]";
  115. 671 :
  116. 672 rem tasteneingaben auswerten
  117. 673 rem q-^    toene (weisse tasten)
  118. 674 rem 2-\    toene (schwarze tasten)
  119. 675 rem space  gate aus
  120. 676 rem f1,2,3 stimme 1,2,3
  121. 677 :
  122. 680 s=0
  123. 685 get a$:if a$="" then 685
  124. 690 if a$<>" " then 715
  125. 695 poke b+72,ec :rem eg gate aus
  126. 700 poke si+4+7*s,wf(s):rem gate aus
  127. 705 goto 685
  128. 710 rem n$ nach eingabe durchsuchen
  129. 715 i=0
  130. 720 i=i+1:if i>=22 then 770
  131. 725 if a$<>mid$(n$,i,1) then 720
  132. 730 f=bf(s)*th(i-1)
  133. 735 hi=int(f/256):lo=f-256*hi
  134. 740 poke si+4+7*s,wf(s):rem gate aus
  135. 745 poke b+72,ec  :rem eg gate aus
  136. 750 poke b+7*s,lo :poke b+1+7*s,hi
  137. 755 poke si+4+7*s,wf(s)+1
  138. 760 poke b+72,ec+1:rem eg gate an
  139. 765 goto 685
  140. 770 if a$="[133]" then s=0 :rem f1,stimme 1
  141. 775 if a$="[134]" then s=1 :rem f3,stimme 2
  142. 780 if a$="[135]" then s=2 :rem f5,stimme 3
  143. 785 goto 685
  144.