110 TEXT : HOME : PRINT " TWO-VOICE SOUND, BY DOUG JEFFERYS": PRINT "** COPYRIGHT 1985 BY MICROSPARC, INC **"
120 POKE 34,2
130 PRINT
140 PRINT "WELCOME TO THE WORLD OF TWO-VOICE SOUND.REMEMBER WHEN THIS ";: POKE 768,255: POKE 769,2: POKE 770,200: CALL 771: PRINT "USED TO BE IMPOSSIBLE": PRINT
150 PRINT "NOT ANY MORE. YOU, TOO, CAN NOW DO IT, FROM ANY PROGRAM YOU WRITE.": PRINT
160 VP = PEEK(37): GOSUB 1090: VTAB VP +1
170 PRINT "AFTER BLOADING IN THE ROUTINE, ONLY THREE POKES ARE NEEDED."
180 PRINT
190 PRINT "]POKE 768,DEPTH OF WAVE"
200 PRINT "]POKE 769,LENGTH OF TONE"
210 PRINT "]POKE 770,OVERALL PITCH"
220 PRINT "]CALL 771"
240 PRINT
250 PRINT "WILL EXECUTE THE ROUTINE."
260 GOSUB 1080
270 HOME
280 PRINT "FOR EXAMPLE, THE TONE YOU HEARD AT THE START OF THIS PROGRAM WAS DONE LIKE THIS"
340 PRINT : PRINT "THE HIGHER THE PITCH, THE SHORTER THE SOUND. THIS WAS DONE CHANGING ONLY THE PITCH.": POKE 770,100: CALL 771: FOR I = 1 TO 3000: NEXT I
350 PRINT : PRINT "ALSO NOTE THAT INCREASING THE PITCH NUMBER LOWERS THE PITCH.": PRINT "FOR EXAMPLE: PITCH=255": POKE 770,255: CALL 771: PRINT
390 PRINT "(THE DEPTH WAS '2', AS COMPARED TO THE '255' YOU HAVE BEEN USED TO, AND JUST TOMAKE IT AUDIBLE, THE LENGTH WAS INCREASED TO '50', RATHER THAN THE USUAL'2'."
400 GOSUB 1080
410 HOME
420 PRINT "CHANGING THE PITCH IN A FOR-NEXT LOOP CAN BE INTERESTING. FOR EXAMPLE:": PRINT
430 PRINT "]POKE 768,100: POKE 769,1"
440 PRINT "]FOR I = 100 TO 10 STEP -1: POKE 770,I: CALL 771: NEXT I"
450 PRINT : PRINT "YIELDS THIS"
460 VP = PEEK(37): GOSUB 1090: VTAB VP +1
470 POKE 768,100: POKE 769,1
480 FOR I = 100 TO 10 STEP -1: POKE 770,I: CALL 771: NEXT
490 PRINT : PRINT "OF COURSE, IT CAN GO THE OTHER WAY..."
500 FOR I = 10 TO 100: POKE 770,I: CALL 771: NEXT I
510 GOSUB 1080
520 HOME
530 PRINT "EVER THOUGHT THAT THE OLD BEEP OF A CONTROL-G WAS DULL?"
540 PRINT CHR$(7): REM DULL CONTROL-G
550 FOR I = 1 TO 20
560 X = INT( RND(1) *2)
570 IF X = 1 THEN PRINT CHR$(7);
580 NEXT I
590 PRINT "JUST THINK HOW MUCH MORE LIVELY THIS SOUNDS!": PRINT
600 POKE 768,25: POKE 769,1: POKE 770,175
610 FOR I = 1 TO 20
620 X = INT( RND(1) *2)
630 IF X = 1 THEN CALL 771
640 NEXT I
650 VP = PEEK(37): GOSUB 1090: VTAB VP +1
660 PRINT "HOW ABOUT A SHORT, SWEET ROCKET LAUNCH FOR OUR NEXT VIDEO GAME?"
670 GOSUB 1080
680 VTAB 12
690 PRINT "]POKE 768,5: POKE 769,5"
700 PRINT "]FOR I = 50 TO 2 STEP -1: POKE 770,I: CALL 771: NEXT I"
710 POKE 768,5: POKE 769,5
720 FOR I = 50 TO 2 STEP -1: POKE 770,I: CALL 771: NEXT I
730 GOSUB 1080
740 HOME
750 PRINT "THE SYNTHESIZER CAN ALSO BE USED FOR MUSICAL NOTES."