start tok64 d64-VCJ8Wa 100 te=1000 : REM taktl[ngd (helnot) 104 IF te<1000 OR te>3000 THEN 100 108 REM (c) 1989 peter karlsson 112 REM ******************************* 116 REM 1989 02 10 fredag 120 REM ******************************* 124 PRINT"{white}{clear}musik editor{gray}":POKE53280,0:POKE53281,0 128 IF aa=1 THEN 252 132 DIM hi(37),lo(37),na$(37),mu$(100),hm(100),lm(100),le(100) 136 DIM f$(5),t$(5) 140 PRINT"{down}l[ser data{.*3}" 144 RESTORE:FOR z=1 TO 37 148 READ hi(z), lo(z), na$(z) 152 NEXT:aa=1 156 DATA8 ,97 ,c-1, 16,195,c-2 160 DATA8 ,225,c#-1,17,195,c#-2 164 DATA9 ,104,d-1, 18,209,d-2 168 DATA9 ,247,d#-1,19,239,d#-2 172 DATA10,143,e-1, 21,31 ,e-2 176 DATA11,48 ,f-1, 22,96 ,f-2 180 DATA11,218,f#-1,23,181,f#-2 184 DATA12,143,g-1, 25,30 ,g-2 188 DATA13,78 ,g#-1,26,156,g#-2 192 DATA14,42 ,a-1, 28,49 ,a-2 196 DATA14,239,a#-1,29,233,a#-2 200 DATA15,210,b-1, 31,165,b-2 204 DATA33,135,c-3 208 DATA35,134,c#-3 212 DATA37,162,d-3 216 DATA39,223,d#-3 220 DATA42,62 ,e-3 224 DATA44,193,f-3 228 DATA47,107,f#-3 232 DATA50,60 ,g-3 236 DATA53,57 ,g#-3 240 DATA56,99 ,a-3 244 DATA59,190,a#-3 248 DATA63,75 ,b-3,0,0,p*-1 252 PRINT"{home}{down*2}v[lkommen till muskieditorn." 256 PRINT"{down}mata in s] h[r:" 260 PRINT"{light gray}f{pound}rst ange 'h{pound}jda'/'s[nkta' toner" 264 PRINT"syntax: c*-" 268 PRINT"(ex: c*g-f#, c*a-a#)" 272 PRINT"{gray}n[r du [r allt med det kan du b{pound}rja matain musiken." 276 PRINT"{light gray}skriv f{pound}rst m*" 280 PRINT"{gray}avslutning(basic)= b*" 284 PRINT"{light gray}klar med musik= r*" 288 PRINT"{gray}musik matas in s] h[r:" 292 PRINT"(not/kom.?)- /return/{space*3}(l[ngden?)l[ngd /return/" 296 PRINT"l[ngd = ex. 1/4,1/8. punkterad:ex: 1/4*" 300 PRINT"{gray}delete. ta bort senaste ton syntax: d*" 304 PRINT"{light gray}musik-paus: syntax: p* (eller p*-1)" 308 PRINT"{gray}[ndra f{pound}reg]ende melodi: syntax: f*" 312 PRINT"{light gray}ladda fr]n band:l*" 316 PRINT"{yellow}{down}{reverse on}tryck space.." 320 GET a$:IF a$<>" "THEN320 324 PRINT"{white}{clear}musik editor{light blue}":POKE53280,6:POKE53281,6 328 PRINT"{down}h* = hj[lp ( f{pound}rra sidan )" 332 hs=0:REM antal h{pound}jda/s[nkta 336 INPUT g$ 340 IF MID$(g$,2,1)<>"*" THEN PRINT"?syntax{space*2}error":GOTO 336 344 k$=LEFT$(g$,1) 348 IF k$="c" THEN 376 352 IF k$="h" THEN 124 356 IF k$="l" THEN 620 360 IF k$="b" THEN PRINT"{clear}hej d]":END 364 IF k$="f" THEN 412 368 IF k$="m" THEN 412 372 g$="//":GOTO340 376 a$=MID$(g$,3):v=0:hs=hs+1:IF hs>5 THEN PRINT"?too many{space*2}error":GOTO 336 380 FOR z=1 TO LEN(a$) 384 d$=MID$(a$,z,1) 388 IF d$="-" THEN v=v+1:NEXT:hs=hs-1:GOTO340 392 IF v>1 THEN hs=hs-1:GOTO 340 396 IF v=0 THEN f$(hs)=f$(hs)+d$ 400 IF v=1 THEN t$(hs)=t$(hs)+d$ 404 NEXTz:IF v=0 THEN hs=hs-1:GOTO 340 408 GOTO 336 412 no=0 416 no=no+1 : IF no>100 THEN 532 420 IF k$="f" THENPRINT"not/kom.{space*2}";mu$(no):PRINT"{up}"; 424 INPUT "not/kom.";mu$:IF mu$="r*" THEN GOTO 536 428 IF mu$="b*" THEN END 432 IF mu$<>"d*" THEN 444 436 PRINT"{up}{space*11}" 440 PRINT"{up*3}";:no=no-1:GOTO420 444 IF k$="f" AND le(no)<>0 THEN PRINT"l[ngden*{space*2}1/"STR$(te/le(no)):PRINT"{up}"; 448 INPUT "l[ngden ";lm$:pu=0 452 IF RIGHT$(lm$,1)="*" THEN pu=1:lm$=LEFT$(lm$,LEN(lm$)-1) 456 FOR j=1 TO LEN(lm$) 460 IF MID$(lm$,j,1)<>"/" THEN NEXT:PRINT"?syntax{space*2}error":GOTO 448 464 IF VAL(MID$(lm$,j+1))=0 THEN PRINT"?division by zero{space*2}error":GOTO 448 468 g=VAL(lm$)/VAL(MID$(lm$,j+1)) 472 g=g*te:IF pu=1 THEN g=g+(b/2) 476 le(no)=g 480 IF mu$="p*" THEN mu$="p*-1" 484 FOR z=1 TO LEN(mu$) 488 IF MID$(mu$,z,1)<>"-" THEN NEXT:PRINT"?syntax{space*2}error":GOTO420 492 no$=LEFT$(mu$,z-1):ok$=MID$(mu$,z+1) 496 IF ok$<"1"ORok$>"3"THEN PRINT"?syntax{space*2}error":GOTO420 500 s=2:GOSUB 504:ON s GOTO 420,416:GOTO 500 504 FOR g=1 TO hs 508 IF f$(g)=no$ THEN no$=t$(g):GOTO 516 512 NEXT 516 mu$(no)=no$+"-"+ok$ 520 FOR j=1 TO 37 524 IF mu$(no)=na$(j) THEN hm(no)=hi(j):lm(no)=lo(j):RETURN 528 NEXT:PRINT"?syntax{space*2}error":s=1:RETURN 532 PRINT"?too many{space*2}error" 536 no=no-1 540 FOR l=54272 TO 54296 544 POKE l,0:NEXTl:POKE54296,15 548 POKE 54277,0:POKE54278,240:POKE54284,255:POKE54285,255 552 FOR g=1 TO no:POKE54276,17:POKE54283,33 556 :POKE 54273,hm(g):POKE54272,lm(g) 560 :FOR z=1 TO le(g) 564 :NEXT :POKE54276,16:POKE54283,32 568 NEXT 572 PRINT"{down}spela igen (j/n)" 576 GET a$:IF a$="j"THEN 540 580 IF a$<>"n" THEN 576 584 PRINT"{down}save band:j nej:n" 588 GET a$:IF a$="n"THEN 124 592 IF a$<>"j" THEN 588 596 INPUT "namn";na$ 600 OPEN 1,1,1,na$ :REM -save- 604 PRINT#1,no:z$="," 608 FOR z=1 TO no:PRINT#1,hm(z);z$;lm(z);z$;le(z);z$;mu$(z):NEXT 612 CLOSE 1 616 GOTO 540 620 na$=MID$(a$,3) 624 OPEN 1,1,0,na$ :REM -load- 628 INPUT#1,no 632 FOR z=1 TO no:INPUT#1,hm(z),lm(z),le(z),mu$(z):NEXT 636 CLOSE1:GOTO 540 640 REM by member no 0041. 644 REM (c) 1989 peter karlsson stop tok64 (bastext 1.0)