Music Beep

Date: 198x
Type: Program
Platform(s): TS 2068

Plays tones and draws graphs, at the same time.

Appears on

Library tape of the Indiana Sinclair Timex User’s Group.

Gallery

Music Beep

Source Code

    1 INK 7: PAPER 0: BORDER 0: CLS 
    5 DIM q(255)
   10 GO SUB 1000
   20 GO SUB 3000
   90 LET a=USR tone: IF INKEY$="L" THEN GO TO 200
   95 IF a=255 OR a=0 THEN GO TO 90
  100 IF q(a)<175 THEN LET q(a)=q(a)+1: PLOT OVER 1;a,q(a): PLOT OVER 1;a,q(a)-1
  110 GO TO 90
  120 LET a=USR tone: IF INKEY$="L" THEN GO TO 200
  125 IF a=255 OR a=0 THEN GO TO 120
  130 IF q(a)<175 THEN LET q(a)=q(a)+1: PLOT a,q(a)
  140 GO TO 120
  200 CLS : PLOT 1,q(1)
  205 FOR t=2 TO 254
  210 DRAW 1,q(t)-PEEK 23678
  220 NEXT t
  230 PAUSE 200: GO TO 20
  300 PLOT 0,175-USR tone/1.5: FOR t=0 TO 255-step STEP step
  310 DRAW step,(175-(USR tone/1.5)-PEEK 23678)
  320 NEXT t
  330 CLS : GO TO 300
  500 INPUT "Step length? (1-5) :";step
  510 GO TO 300
  999 STOP 
 1000 DATA 1,0,255,17,0,0,219,254,203,119,32,1,19,16,247,66,75,201
 1010 LET tone=65368: FOR n=tone TO tone+17: READ d: POKE n,d: NEXT n: RETURN 
 3000 CLS : PRINT '''"    Press P for pixel graph"'"          B for bar graph"'"          C for continuous line             graph"
 3010 PRINT ''''''"Press L at any time for a line  graph"
 3020 IF INKEY$="P" OR INKEY$="p" THEN CLS : GO TO 90
 3030 IF INKEY$="B" OR INKEY$="b" THEN CLS : GO TO 120
 3035 IF INKEY$="c" OR INKEY$="C" THEN CLS : GO TO 500
 3040 GO TO 3020

People

No people associated with this content.

Scroll to Top