Tone dialing from BASIC
On comp.sys.acorn tgladding@arcade.demon.co.uk (Tim Gladding) gave a
code fragment to tone dial. Tom Stuart tidied it up, and fixed the
bugs. The final version is included below.
REM > Phone tones
REM Original by tgladding@arcade.demon.co.uk (Tim Gladding)
REM Made to work by thom@cyberspace.org / stuartm@campus.bt.com (Tom Stuart)
ONERROR PRINTREPORT$" at line ";ERL:END
MODE 3:DIM tone%(9,1)
FOR I%=0 TO 9:FOR J%=0 TO 1:READ tone%(I%,J%):NEXT:NEXT
VOICES 2
VOICE 1,"WaveSynth-Beep"
VOICE 2,"WaveSynth-Beep"
REPEAT:key%=GET:VDU key%
IF key%>47 AND key%<58 THEN
SOUND 1,-15,tone%(VAL(CHR$(key%)),0),5:SOUND 2,-15,tone%(VAL(CHR$(key%)),1),5
ELSE
SOUND 1,0,0,0:SOUND 2,0,0,0
ENDIF
UNTIL FALSE
DATA &5DFF, &6621, &5710, &63DC, &5710
DATA &6621, &5710, &6866, &59C3, &63DC
DATA &59C3, &6621, &59C3, &6866, &5BBA
DATA &63DC, &5BBA, &6621, &5BBA, &6866
Enter this into BASIC, run and just type in the number you want to dial!
Robin.Watts@prg.ox.ac.uk