Audioscan

Author(s): Dick Wagner
Publication: The Plotter
Pub Details: The Plotter v4 n11 (Volume 4, Issue 11)
Date: November 1986
Pages: 6

This program from ZX APPEAL JULY 86 issue (originally by J. Keene in Hampton Road TS User Group newsletter), is interesting. It generates a line graph, or a bar chart, or point graph of audio sounds produced from your tape recorder or a microphone and amplifier.

There are limits to the character of the input. It will accept frequencies from 60 Hz up 10,000 Hz with a constant amplitude but it seems to drop off above this. The input works best if it drops to near zero periodically otherwise an out of range error shows up. The horizontal sweep takes about 20 seconds so the resolution is not great.

For reference, a 5 volt peak to peak signal (sin wave) takes up 70% of the screen. Zero is at the top line.

Once a signal is accepted the trace jumps downward and the variations in signal level are shown. Try it with a program on cassette.

 100 REM audioscan
102 DEF FN a(l)=1+INT (.5+l/30)
103 GO SUB 410
105 GO TO 200
110 DRAW INK FN a(l/1.5);x-n,INT (-l+y)/1.5: LET x=n: LET y=l: RETURN
120 DRAW INK FN a(l/1.5);0,-l/2: RETURN
200 PAPER 0: INK 7: BRIGHT 1: CLS
210 PRINT AT 0,10;"Audioscan"
220 PRINT AT 2,2;"This program gives a graphic representation of a signal input to the 2068 ear socket.."
225 PRINT AT 7,2;"Load tape or other signal source to the ear socket and select option :"
230 PRINT AT 12,5;"1--line graph";AT 13,5;"2--bar graph";AT 14,5;"3--point graph"
240 INPUT INVERSE 1;"enter option (1 to 3)";q: IF q<1 OR q>3 THEN GO TO 240
250 CLS : PRINT #1; INVERSE 1;"space to freeze scan": LET i$="": LET x=0: LET y=0
255 FOR n=0 TO 255: LET l=USR tone: PLOT n,INT (l/1.5)
260 IF q<3 THEN GO SUB 100+(q*10)
265 LET i$=INKEY$: IF i$=" " THEN GO TO 300
270 NEXT n
275 GO TO 250
300 PRINT #1; INVERSE 1;"m=menu r=start e=end": PAUSE 0
310 LET i$=INKEY$: IF i$="m" THEN RUN
320 IF i$="r" THEN GO TO 270
330 IF i$="e" THEN STOP
340 GO TO 300
400 DATA 1,0,255,17,0,0,219,254,203,119,32,1,19,16,247,66,75,201
410 LET tone=65368
420 FOR n=tone TO tone+17: READ d: POKE n,d: NEXT n: RETURN
425 STOP
430 SAVE "audioscan": RUN

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.