@L|}6CD l0C)HCC WhL/h `CmCDiD`  R@P1  Y0@R !L` D  C D     )16CS S)  C)D1 p p 0 C9DI pCDL~CiCDiD`,-=NWAIOFTYPELINHOVEMDECAVVVVLOO} --SOUND.1 (c) 1981 by Jerry White 11/1/81 J6-6}-@'6-@36-@@;@@,J A2A@4 F:A@,@R6$<:-}@327 :$F 6-B:,-H0-@(7<,07<,4 @vJMMSOUND 0,25,4},6:FOR DECAY=6 TO 0 STEP -0.5:SOUND 0,10,0,DECAY:NEXT DECAYL   $dW B56.!The SOUND command consists of theA6 }-@M6-@W @pxe-6.#word SOUND followed by 4 variables.96-@E6-@O @p[6-@`e }@PE#6.This is the format of the/6-@;6-@ E @pD6.SOUND command:$6-@06-@ }: @pD @PO-6.#SOUND VOICE,PITCH,DISTORTION,VOLUME96-@E6-@O @p B B,P }.6.$This tutorial will use the following:6-@F6-@P @p@A!6.numeric variable names:-6-@7  }@pA @PTD"6.V0=VOICE 0 V1=VOICE 1.6-@:6-@ D @ph8"6.V2=VOICE 2 V3=VOICE 3.6-@}8 @p|K)6.P=PITCH D=DISTORTION V=VOLUME56-@A6-@K @p B BY-6.#We} have 4 VOICES numbered 0 thru 3.96-@E6-@O @pY @P\06.&Our VOICE variables will never change.}<6-@H6-@R @p\ @PI6.V0=0:V1=1:V2=2:V3=3)6-@56-@ ? @pI @PV*6.} PITCH (P) can be any number from66-@B6-@L @pV @PA6. 0 thru 255.!6-@-6-@7} @pA @P B BJ(6.DISTORTION (D) can be any even46-@@6-@J @p0L 6.}number from 0 thru 14.,6-@86-@B @pL @PDH&6.VOLUME (V) can be any number26-@>6-@ }H @pXE6.from 0 thru 15.%6-@16-@; @pE @Pl B BJ(6.We will be}gin exploring sounds46-@@6-@J @p?)6.using only VOICE 0 (V0) and the56-@? @pH(6.}clear DISTORTION (D) level 10.46-@ > @pH @PZ.6.$This SOUND command creates middle C.:6-@F6}-@P @pZ @P`-@@*(SOUND 0,121,10,8L2A!@@V @P` @`}6-A  B I'6.Using the same sound, we will36-@?6-@I @p N,6."change only the v}olume at variable86-@D6-@N @p =6.speeds.6-@)6-@ 3 @p= @P4)-@}@)(SOUND 0,60,10,0HY-@)-@@C(SOUND 0,121,10, Y2A!@\6-}@  @P pb -@6@2-@@L(SOUND 0,121,10, b2A!@36}-@  @P )6-@`3 @PY-@)-@@C(SOUND 0,121,10, Y2A!}@6-@ @P b -@6@2-@@L(SOUND 0,121,10, b2A!}@36-@ @P )6-@`3 @P]-@)-@@C(SOUND 0,121,10,} Y2A!@] f -@6@2-@@L(SOUND 0,121,10, b2A!@ }f 6-@` @Pe-@@1-@@K(SOUND 0,121,10, a2A!@!}e $p -@6@2-@@L(SOUND 0,121,10, b2A!@f p @P8p "}-@6@2-@@L(SOUND 0,121,10, b2A!@f p @PLp -@#}6@2-@@L(SOUND 0,121,10, b2A!@f p @P`s -@6?P$}2-@@O(SOUND 0,121,10,P:, e2A!@i s @Pts -@6? 2-@%}@O(SOUND 0,121,10,P:, e2A!@i s @Pc-@@+(SOUND 0,121,10,10M2&}A!@@Y6-@ c @PK-@@+(SOUND 0,121,10,0 5 @`A6-@ K @P'}w-@@)-@@?(SOUND 0,121,10,10a2A!@@m6-@w @PY-@(}@+(SOUND 0,121,10,0 5 @`? @PC O6-@`Y @Pa-@@)-@@?()}SOUND 0,121,10,10a2A!@@O-@@+(SOUND 0,121,10,0 5 @`9 E6-@`O *}@P6-A  B (^&6.Leaving the VOLUME set at 8,26-@>6-@H @pT6-@`^ @P+}<G'6.and using only DISTORTION 10,36-@= @pG @PPA+6.!watch what happens when we change76-@ ,}A @pdI6.the PITCH variable.)6-@56-@? @pI @Pxb-AU)-@@-}B(SOUND 0,,10,8 ^2@@b k -AU6@2-@@K(SOUND 0,.},10,8 g2@@k j-AU@1-@@J(SOUND 0,,10,8 f2/}@@j k -AU6@2-@@K(SOUND 0,,10,8 g2@@0}k j-AP@1-@@J(SOUND 0,,10,8 f2@@j k -AP1}6@2-@@K(SOUND 0,,10,8 g2@@k J-@@*(SOUND 0,2}0,0,0 4 @`@6-AJ B H&6.Now let's combine changes of26-@>6-@H @pN,6."PIT3}CH and VOLUME to create a piano86-@D6-@N @p,W6. like SOUND.!6-@-6-@ 7 @pC6-4}@`M @PW#A@5560,53,47,45,40,35,31,29,29,31,35,40,45,47,53,60T|-@@"8-@5}6@J-@@f(SOUND 0,,10, |2@h+ 6-@ @P! +#A`|6}[[243,193,162,121,96,81,60,47,40,29,23,19,14,14,19,23,29,40,47,60,81,96,121,162,193,243|-@@&"8-@7}6@J-@@f(SOUND 0,,10, |2@! 6-@ @P! 1 8}#A6-A # B 1% D:SOUND.2 N9-@@ 'A@9AR@*N$$(9}4N$$(| Press to continue |>N$$(HNFF:B2y,@*AU@:}<AU@F B@RNAU@$R +'0@@ A0@@ [0@;}@ @mAR@@@@@9A@R(R<}(| The command |&R(0R@w$U9-@@'A@9A=}R@U$$(U$$(| Press to repeat |V$$(| Press to continue |V$$>}(V7F:B2y,"@*AU@4 B7$"VMF:B2y,"@'-AU?}@?-@@I(M ,V1AU@'AU@1 B @a$-@@!($$@} D:SOUND.1IOFTYPELINHOVEMDECAVVVVLOO%&TYPEWAIOFLINHOVEMDECANI@B} --SOUND.2 (c) 1981 by Jerry White 11/1/81 %;@@,9@P,% A2C}A@4 F:A@,@R6$<:-@327 :$F 6-B:,-D}H0-@(7<,07<,4 @vJQQSOUND 0,25,4,6:FOR DECAY=6 TO 0 STEP -0.5:SOUND 0,10,0,DECAY:NEXT DECAYEE}CAYL   $dhh14,15,16,17,18,19,21,22,23,24,26,27,29,31,33,35,37,40,42,45,47,50,53,57,60,64,68,72,76,81,85,91,96nII10F}2,108,114,121,128,136,144,153,162,173,182,193,204,217,230,243,255x2 B!-@@P%".68,-2 F$6.G}Although there are pitches06-@<6-@F @pM+6.!numbered from 0 thru 255, we need76-@C6-@H}M @pL*6. only the ones that correspond to66-@B6-@ L @p_'6.musical notes to write musiI}c.36-@?6-@I @pU6-@`_ @PH&6.I put these specific pitches26-@>6-@H @J}pI'6.into an array as shown in the36-@?6-@I @p@6.printed PITCH CHART.*6-@ 66-K}@@ @p B B, A6U-@@P4-@6@M28,@L}Q U @A(A0J^ -@P@6@=-@6@V28,@M}Z ^ O"AATI'6.We can now access these notes36-@?6-@I @p^M+6.!using a 5N}0 element array as shown76-@C6-@M @phH&6.in the FOR NEXT loops above.26-@>6-@H @O}p6-A B L*6. We also need some way of telling66-@B6-@L @pe-6.#BASIC howP} long to hold onto a note.96-@E6-@O @p[6-@`e @PQ/6.%One way is to use one of the counQ}ters;6-@G6-@ Q @pO#6.built into your computer./6-@ ;6-@E @pO @PO-6.R}#RAM location 540 contains a counter96-@E6-@O @pN,6."which counts backwards at the rate86-@S}D6-@N @p=6.of 60 per second.'6-@36-@= @p B BY-6.#1/60 ofT} a second is called a JIFFY.96-@E6-@O @pY @PM+6.!We can poke any number of jiffies76-@U}C6-@M @pT(6.(up to 255) into location 540,46-@@6-@ J @pT @PO-6.#then loV}op there until that location96-@E6-@O @p&F6.contains a zero.&6-@26-@< @pF W}@PX B BbM+6.!This is how we turn on a note for76-@C6-@M @plA6. one secoX}nd.!6-@-6-@7 @pA @PvI6.(1) Turn on a SOUND)6-@56-@ ? @pI @PEY}6.(2) POKE 540,60%6-@16-@; @pE @PY-6.#(3) IF PEEK(540)<>0 THEN PEEK AGAIN96-@E6Z}-@O @pY @PZ.6.$(4) LOCATION 540=0 SO TURN OFF SOUND:6-@F6-@P @pZ @P [}B BT(6.Since this will be done often,46-@@6-@J @pT @PH(6.we will use a W\}AIT subroutine.46-@> @pH @P>(6.For example, this program uses46-@ > @p?)6.the va]}riable WAIT as the number56-@? @p[/6.%of jiffies to POKE into location 540.;6-@G6-@Q @p^}[ @PW+6.!We set WAIT=60 to wait one second76-@C6-@M @pW @P:6.then GOSUB 50._}$6-@06-@: @p  B B*R&6.This is our wait subroutine:26-@>6-@H @p`}R @P4[@@( -@P@T?@@E( Q6-A [ @P>L*6. And here isa} a subroutine to turn66-@B6-@L @pHH6.off all SOUNDS:%6-@16-@; @p>(H@`b} B Bd,6."In order to write a song in Basic,86-@D6-@N @pZ6-@`d @Pc}I'6.we can store the NOTE numbers36-@?6-@I @pW+6.!and durations in DATA statements.76-@d}C6-@ M @pW @PJ(6.We read the data, then let our46-@@6-@J @pI'6.subroue}tines play the music as36-@?6-@I @pM+6.!demonstrated by the next program.76-@C6-@f}M @p4A@(& B4% D:SOUND.3 N9-@@ 'A@9AR@*N$$(g}4N$$(| Press to continue |>N$$(HNFF:B2y,@h}*AU@<AU@F B@RNAU@$R +'0@@ A0@@ i}[0@@ @mAR@@@@@9A@R(j}R(|àà|&R(0R@w$U9-@@'A@9ARk}@U$$(U$$(| Press to repeat |V$$(| Press to continue |V$$(l}V7F:B2y,"@*AU@4 B7$"VMF:B2y,"@'-AU@m}?-@@I(M ,V1AU@'AU@1 B @ D:SOUND.2@h=>TYPEWAIOFLINHOVEMDECANILINEPPPPVVVVCHORo}@ p}--SOUND.3 (c) 1981 by Jerry White 11/1/81 U;@@,9@P,'6-36-@?6-@K6-@U q}A&28,@@& @P(7 6-8,6-8,&6-8&@,76-8&@,*[2@@r}/2@@E2@@[2@@2A@4 F:A@,@R6"2s}"$<:-@327 :$F7 6-8,6-8,&6-8&@,76-8t}&@,H` -@6@02@@2@P2@`2@J   $dhh14,1u}5,16,17,18,19,21,22,23,24,26,27,29,31,33,35,37,40,42,45,47,50,53,57,60,64,68,72,76,81,85,91,96nII102,108,114,121,128,136,1v}44,153,162,173,182,193,204,217,230,243,255x2 B!-@@P%".68,-2 ( B@@%w}( (( "( @@K-@@"' @0+ 5 @`A6-@K @P "(x}( @@K-@@"' @0+ 5 @`A6-@0K @P "(( @@Ky}-@@"' @0+ 5 @`A6-@K @P "(( @@K-@@"z}' @0+ 5 @`A6-@0K @P" "(( @@,+-@@"' @0+ 6{}5 " @@ @`+6-@05 @P@ "(( @@J+-@@"' @0+ T|}5 " @@ @`+6-@05 @P^ "(( @@h+-@@"' @0+ }}r5 " @@ @`+6-@5 @P| "(( @@ " @0 " @@~} " @0 " @@ " @0 " @@] @`6-@# @P@-@}6?PY28@,@] 6 +@(@6(@ P-@@"}5-$@@&B(@L @pP Y -@@6@(">-$@@&K(@}U @pY >6-@ @P+-@@>(@PRESS&= -@6?P928@},@= 0>6-@ @P+-@@>(@START:= -@6?P928@,}@= X= 0F:@ ,@=F:B2y,@A[ +@'0@@A0@}@@[0@@@S(@(@7(@ PRESS optionS(@ TO RERUN}6-@` @PH(@+(@ PRESS H(@ TO CONTINUEF:B2y,"@%} F:B2y,"@A  A@% D:SOUND.4DOE A DEER A FEMALE DEER2249,37,45,35,15,33,45,37,15,33},30,37,30,33,45RAY A DROP OF GOLDEN SUN2242,35,45,33,15,32,15,32,15,33,15,35,15,32,90ME A NAME I CALL MYSELF}2249,33,45,32,15,30,45,33,15,30,30,33,30,30,45$ FA' A LONG LONG WAY TO RUN.2244,32,45,30,15,28,15,28,15,30,15,32,15},28,908!!SEW A NEEDLE PULLING THREADB5549,30,45,37,15,35,15,33,15,32,15,30,15,44,28,90LLA A NOTE TO FOLLOW SEWV5}544,28,45,35,15,33,15,31,15,30,15,28,15,42,26,90`$$TEA A DRINK WITH JAM AND BREADj5542,26,45,33,15,31,15,29,15,28,15,2}6,15,49,25,90t$$THAT WILL BRING US BACK TO DOE~49,25,15,26,1544,28,30,32,3042,26,30,30,3049,25,90} 49,37,C 47,35,D 45,33,E 44,32,F 42,30,G 40,28,A 38,26,B 37,25,C 37,25,c 38,2}6,b( 40,28,a2 42,30,g< 44,32,fF 45,33,eP 47,35,dZ 49,37,cR +'0@@ A0@}@ [0@@ @mAR@@@@@9A@R& (} &(R (|ҠĠ٠|&R (0R@w$} D:SOUND.3TYPEWAIOFLINHOVEMDECANILINEPPPPVVVVCHOR 01TYPEWAIOFLINHOVEMDECANIVVVVBASP(@1@@@P }A(3 @Q AU @ @@--SOUND.4 (c) 1981 by Jerry White 11/1/81 m };@@,9@P,'6-36-@?6-@K6-@]@@c(m A2A@4 F: }A@,@R6$<:-@327 :$F 6-B:,-H0-@ }(7<,07<,4 @vJMMSOUND 0,25,4,6:FOR DECAY=6 TO 0 STEP -0.5:SOUND 0,10,0,DECAY:NEXT DECAYL   $dhh14, }15,16,17,18,19,21,22,23,24,26,27,29,31,33,35,37,40,42,45,47,50,53,57,60,64,68,72,76,81,85,91,96nII102,108,114,121,128,136, }144,153,162,173,182,193,204,217,230,243,255x2 B!-@@P%".68,-2 K)6.Using the array method } makes it56-@A6-@K @pM+6.!possible to find the notes of any76-@C6-@M @p`( }6.CHORD with a BASIC subroutine.46-@@6-@J @pV6-@`` @PL*6. This way, we can create }a 3 or 466-@B6-@L @pK)6.note chord by entering only one56-@A6-@K @p`*6. } number or the ROOT of the chord.66-@B6-@L @pV B` B[6. MAJOR CHORDS:#6-@/ }6-@9 @pC @PF(I([AA-@@P628,@@]2@8&@ },@@2@8&@,@@2@8&@,@@ @` $ }A($A A0 -@P@6@?28,@@f2@8&@,@@ }2@8&@,@@2@8&@,@@ @` 6-A B }X6. MINOR CHORDS:#6-@/6-@9 @pC @PF(XA`Ap-@@P628 },@@]2@8&@,@@2@8&@,@@2@8&@,@ }@ @` $A`($AA" -@P@6@?28,@@ }f2@8&@,@@2@8&@,@@2@8&@,@@, @ }` 66-A` B @6-@IJM6.C MAJOR6-@)6-@3 @p= @P@(JA@M }(T6-@I.28,@@U2@8&@,@@|2@8&@,@@ }2@8&@,@@^#6-@` @P# @`hYA@6.C MINOR)6-@56-@ }? @pI @PL(VApY(r6-@I.28,@@U2@8&@,@@| }2@8&@,@@2@8&@,@@|#6-@` @P# @`6-A@ } B K)6.Let's go back to standard SOUND56-@A6-@K @pX,6."commands now to make a compar }ison.86-@D6-@N @pX @PL*6. The lowest note we can get using66-@B6-@L @p }Z.6.$DISTORTION 10 is pitch 255, a low B.:6-@F6-@P @pZ @Pw6.SOUND V0,255,10,8'6-@ }36-@= @pG @`c2AU@@m @Pw @` B BU)6.Now comp }are these two sounds...56-@A6-@K @pU @PG6.SOUND V0,255,10,8'6-@36-@= @p }G @P=2AU@@) @P3 @`= @PF6.SOUND V0,33,12,8&6-@26-@ }< @pF @P=2@3@@) @P3 @`= @P&M+6.!The tone quality is different but7 }6-@C6-@M @p0Y-6.#the actual PITCH is the same low B.96-@E6-@O @pY @P:n }-@@+(Ġְ=-@@R(SOUND V0,33,12,8n2AU@@DI @P @` }! @P3-@@I(SOUND V0,255,10,8Nd-@@*(ĠְF2@3@@ }P @PZ @`d @PX-@@+(ĠְG2AU@@Y-@@n( }Ġֱ2@3@@b- @P @`#6-Ap- B lM+6.!We can get much deeper BASS }NOTES76-@C6-@M @pvR&6.in DISTORTION 12 than in 10.26-@>6-@H @pR @PB }6. FOR EXAMPLE:"6-@.6-@8 @pB @PQQ25,27,28,30,31,33,36,37,40,42,45,48,51,52,57,60,63,67,72, }75,82,85,90,97,1028-@@%"8-@6@J-@@2( SOUND V0,,12,  }B2@F J # #A6-A# B  M+6.!Use the next program to hear many76-@C6-@ }M @p*M+6.!different sounds by using paddles76-@C6-@M @p4L*6. to change PITCH, DISTORTION, } and66-@B6-@L @p>=6.VOLUME.6-@)6-@3 @p= BH% D:SOUND.5 N9-@ }@ 'A@9AR@*N$$(4N$$(| Press to continue |>N$$ }(HNFF:B2y,@*AU@<AU@F B@RNAU@$ }R +'0@@ A0@@ [0@@ @mAR@@@ }@@9A@R(R(| The command |&R( }0R@w$U9-@@'A@9AR@U$$(U$$ }(| Press to repeat |V$$(| Press to continue |V$$(V7F:B2y,"@ }*AU@4 B7$"VMF:B2y,"@'-AU@?-@@I(M ,V1AU }@'AU@1 B @ D:SOUND.4VVBASP(@1@@@P 4G(VOLUMDISTORTIODELAPITCWAI@@A AA--SOUND.5 (c) 1981 by Jerry White 11/}1/81[ +@AR@1AAECAAEUA@[((PADDLE(0)=PITCH(}PTRIG(0)=DISTORTION(PADDLE(1)=VOLUME(PRESS ANY KEY TO ENDAdAU6-@6-@}6-A 6-Q:,*S:,"&6-%@* "@6-6-P:Q:@,}'@,!@6-@TF:Ad,AU"+4AdAUFART% D:SOUND.6"@}-@@@(@sound 0,,, ,26G0@+0@@=}@wG A0@-@A $ D:SOUND.5A--SOUND.5 (c) 1981 by Jerry White 11/H89VVVVWAIOFPVOSHOPITCLOORINLOUCHOICRETP@@@} --SOUND.6 (c) 1981 by Je}rry White 11/9/81 a6-6-@'6-@36-@E@@W@@9a A 2A@}4 F:A@,@R6:-@327 :$YZ*** MACHINE GUN ***}[d`-@@4-@6@J2@`2@`nA2A@}/2@@3 = @TA x$*** SURF/WAVES ***V -@@6?.6-'@}>2@V2%@@<2%@@<2H:,$@@U-@@}?-6-'@=2@U2%@@@2%@@<2H:,$@@}@ V -@@6?.6-'@>2@V2%@@M2%@@<2H:},$@@@ J @TM$!"*** LAZERS/PHOTONS ***#,3-@@3-A}@6[2@/2@@E2@@[2@@@   @T$}*** POLICE/FIRE SIREN *** -A@P6@62@@T2%@@@}r2%@@@2%@@@ -@PA`? 52@@S2%}@@@q2%@@@2%@@@  @T$*** AIR RAI}D SIREN ***M-@@+-@@ I2@%@@M W2@@@};2A@@W2@@@6-@0 @P  -@6?B2+@} &,$@@l2+@ &,$@%@ @2@@  @T$MN***} TELEPHONE RINGING ***OXc-@@+-@@5G2@ @@c2@@@}b-@@32@%@@O2@@S o22} lP -@6? 62@ @L2@P v*6-@ @P} ' @T*$*** WHISTLING BOMB ***A-AP=2@'@%@A }U-A@@56-@&'@ E2U2@,2%@@ ) @T,}$*** SPACE SHIP *** k2@@;-@@?Q2@%@g2@}@k *P -@6?62@%@L2@@P 4 @T$yz}*** SPACE ECHO ***{` -@6? 4-@D2@\2%@@` }F-$@6@,2@>2%@B F $*** DOOR BELL ***P -@}6?P62@)@L2@0@P P -@6?P62@5@L2@6}@P $&*** MENU OPTIONS ***N +'0@@9AR@KA}@N(((| SOUND EFFECTS |/(,A@ /(4( <1> MAC}HINE GUN>( <2> SURF WAVESH( <3> LAZER FIRER( <4> POLICE SIREN\( <5> AIR RAID SIRENf( <6> T}ELEPHONE RINGINGp( <7> WHISTLING BOMBz( <8> SPACE SHIP( <9> SPACE ECHO(<10> DOOR BELL (<}11> RUN LAST PROGRAM BB2y(*( CHOICE4 A8B B * 6-P:,* @)!@A} "@% D:SOUND.7 S +!0@$('(*(-(S$A&@$A%@ K $A}((9( PRESS ANY KEY FOR OPTIONSKAdAU F:Ad,"AUA0P AdAU A }(#% D2:SOUND.6PVOSHOPITCLOORINLOUCHOICRETP@@@ NMNGLI@%%****************************}***%%*** SOUND.7 (SOUND EDITOR) ***%%*** (c) 1981 by Jerry White ***%%*******************************d B}d-@)-@=-@%@`(@B7`%=8, d X$$(@ sele}ct location 0-@@$(@06-@}6-R:,("@*!@4-@C(@} Q6-&@]-@s(@>:@0,} A0 F:Ad,AUB n"@* @%-@}4(@ B6-%@N-@d(@>:@0,n A0 T:,"@A  6-&@}6-@6(@ release trigger  T:,"A-@(@ \6}-B7`%6.=:,.-@@<6-@:7<,,J6-%A(X67<,.>:,\ -@(@4-}@4(@ change poke ?6-R:,+"@*8, AU?68,-8,%@ F:Ad,AU}B 40"@*8,!068,-8,&@- 8,-@-(@8,  T:,"@}A ` @e A B-@@)B2y;B2y@? B$'k +@%9}@,;@,G2YAATkA A'00* LITERALS IN LINE 10100 ARE I}NVERSE VIDEOt'Q!(@ Ġ?(@ QAdAU*_-@&68,-}* 5@U@@K:_ A.C +(=(%END OF SOUND TUTORIAL BY JERRY WHITE.}@(C D2:SOUND.7I@%%**************************** D  C D     )16CS S)  C)D1 p p }0 C9DI pCDL~CiCDiD` DD˙` d J)L !}D L(( LL()  L| L( S LH 0p n  } CY?  q  L L  ` )} `A! d߰")-݆ "  $G@LLL&0") $G%}H0 3S8`G ȱG ȱG   Gȭ Gȭ GG}GHiH8(()) G$H% `(0})8` d)L ݆ & LGȘ ݆LL d  ! LL d)N>Q  HH)}  hyhyB q L> Lm JJ  Ln*` dB%'}8  H H` 1 { LL   !L     Hh SY?  q  1L}  !? S   q 1 L   Ll  Lg E`L   !L)  q 1L}) `L0AM݊L݉ ML  N݆LLLNLMLHG!@}1F GȱGLLEEȩÑEȑEEȑE Ed E7EȩE  q} L !,0,0SGɛ L 1 !L EHEh W G gLLSROTCES EERF  } G) *Gȩ GȽG GȌd q q G`  8   0G  `D }CEDC0X:Ȣ Y ȱC* ? 0.. , 0%n ?A[ 0 : L`L  `, 0`Y }`piH n0)բY? 08`0  }  0$L GGȽG L `8L`L }8`  05G)݁,G)ȱGȱGHh0})Hh` B! 8`8iiiLE`}E8FEh( l0`ɃLL L8^~jj8jHi hEEEiEȱEiE` dTE} H8EEȱEEȩEh J E8   . m  i`LI!)E1FR}1LJ舩9GIH`LJJ`HGHh l`} S gL   8 rii `дCDCG W  }C  Lq` X٨`DOS SYS IIIIIIIIIIIIIIIC`0 ߩ0}}pp}@( |||DDOS DOSDOS SYS }}}}}P}B=SOUND 1 B-ASOUND 2 B#nSOUND 3 B2SOUND 4 BSOUND 5 B#SOUND 6 BSOUND 7 CDOS } SYS 0`BDELV !B }`LVUQ   ]   TU J ]L!T  #      TU } L ? .  t`GBJ V~DEHI B V0dV}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh}DEL8HI   0 HI,0 0  9 .G VLO},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI} V0 0`B;DELV䌚 !B y` ʆ v s? F0Ξ05: [ BDEHI} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO }STILL RUN DOS B;DE J V (` 9 V⪍ ઍ  -}LLu DEHILV 9 .l 9 .l  `` s$B VBH }I|DE V BLV nB,DE J V* \*` B V BLVDEHI BLVL!}1u H232435; 1 ;  hh@2 e1i1LHҍ 00) 08 109hh@ Ҡ2e"}1i1232435ޥ<<8} 3E:}DISK OPERATING SYSTEM II VERSION 2.0SCOPYRIGHT 1980 ATARIA. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDGE J. D!$}UPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRESSF. LOCK F!%}ILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES9!&x#!7&p))'&X*./)L''-؆莟!&}R'S  vW DEHHI 1A#! @ ~0ɛ8A0.) ȅ 1 1i!'}il ! 1L NO SUCH ITEMSELECT ITEM OR FOR MENU! 0 .{z:*{}.|~ 1 0 0!(}JB 18L^%|DLl%DIRECTORY--SEARCH SPEC,LIST FILE? # 0 0 n&|D! 1L NOT A DISK FILE!)}N !B 1L " 1 !BDED:}:1BJ|DE 1DEBH!*}I 1 h0ߢ 0.  0?詛 1 ~0YЛ 1 "L<" "L !+} BL1TYPE "Y" TO DELETE...DELETE FILE SPECCOPY--FROM, TO?OPTION NOT ALLOWED089 FREE SECTORS COPYING---D2:SOUN!,}D.7# 0|D .L$A#B#C#JB|DE 1BHIDD#E 1D#0: B!-} 1L B#C#C#B# B 1N#$0SYS1}:e#D# d# D# .d#ȽD# d# 𩛙d#X# 1,A#!.}PdD#ELO- A.BJdD#E 1 1HH 0hh|DL^%1}:e# Lt% e#dD#EL%!/} 1 0 . .0% 1L WILD CARDS NOT ALLOWED IN DESTINATION 0 A.|K@C}INSERT DESTINATION DISK,TYPE RETURN`    `L,8,0( r!?}L1(`ߢ) 1* 1 ~0Y`hhL S SL1) 8`NAME OF FILE TO MOVE?- 0 0|DLt!@}% A., 1 <0 0 .@L# .BJ 1  DEHIB V L1 ,5 1 <0,L. !A} JB|,A#Pd#DE 1 HI BDEHHII 1 B 1 , 1 <0,0Lf- B V!B},A#P, 1 <0 0L#L ߢ) 1* 1 ~0Yj383}mm ݭ!C}}`8}``|* ? ɛ,`|:(|/ 1L `DESTINATION CANT !D}BE DOS.SYS0 0H{ $22Δ $28/L /) $2 Π $2 0 ξ!E}hAΞB,0 J 1 BޝDEHI,HDE 1HIHIDELSAVE-!F}GIVE FILE,START,END(,INIT,RUN)O X0 1`BDEPHI V` X0H 1 L !G}0 0 1L0`PLEASE TYPE 1 LETTER,0`hhL <0 1L0LA1 ,;ɛ7,"ɛ:ݦ1ݥ!H}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{!I}NAME TOO LONG B VL ` L1I H1EӝDL1|mDiE` V0`8d/8 i:"2!22 1!J} L ERROR- 128ɛ+,' 20*.. өw2 1``2TOO MANY DIGITSINVALID!K} HEXADECIMAL PARAMETER800 0 8 00`,0'D800H,ɛh`2L1NEED D1 THRU D4u!L} HEXADECIMAL PARAMETER800 0 8 00`,0'D800H,ɛh`2L1NEED D1 THRU D4u  1SOUND.7 If you have run the first 6 programs in this package, you should now have a good background for using th%N}e Atari Basic SOUND command. The SOUND.5 program gave you some idea of what you can do by quickly changing the values of SOU%O}ND command variables. The SOUND.6 program demonstrated sound effects and hopefully you are now thinking about creating some %P}of your own sound effect routines. This machine has truly amazing sound capabilities. Believe it or not, the SOUND com%Q}mand is not the best way to create sound effects. Using machine language speed is one way to get sounds that Basic is just t%R}oo slow to create. But you don't need machine language to get more sounds from this computer. Some truly amazing sound%S}s can be created using the POKE command. SOUND.7 lets you experiment with POKEs by using your joystick plugged into the firs%T}t port. I'll give you more information on these POKE locations later but first let me explain how to use the SOUND.7 pr%U}ogram. You can read the technical stuff later. The numbers 53760 thru 53768 are displayed on the screen. A greater th%V}an ( > ) symbol should appear next to the top number. Move that > down to the number 53768 by pulling back on the joystick. %W} This is how we select the location we wish to POKE. Once the > points to the desired location, press the trigger button. T%X}he location number should turn blue. Now push up on the joystick to make the number to be poked into location 53768,80.%Y} Push up to make the number higher and pull down to make the number lower. Once you have the number 80 next to the 53768, p%Z}ress the trigger button. This will cause the 53768 to go back to it's original yellow color and the > to return to it's orig%[}inal position next to the 53760. No sound? Not yet, be patient. Now lets change the POKE for location 53760. Since t%\}he > is already in position, just press the trigger and that top number should turn blue. Use your joystick to make the poke%]} 53760,10, then press the trigger. Still no sound? Boy are you impatient. O.K. Move the > to location 53761 and pres%^}s the trigger. Now change the poke to that location randomly. SOUND!!! It's about time. Now it's time to experiment. Tha%_}t location at the screen bottom is the key. Try changing it to 83, 85, and other numbers between 0 and 255. Then go back an%`}d change those top two locations. What about 53762 thru 53767? Go ahead, do what you want. You can't hurt anything bu%a}t you might drive some people crazy if the volume on your TV is too high. To exit this program, just press any key on t%b}he keyboard. This is also a good way to shut off the sounds and start over by giving the RUN command. Before using the%c}se POKE locations in Basic, there are two things you must know. The POKEY chip must first be initialized. This is accomplis%d}hed with a simple SOUND 0,0,0,0 command and should be done at the beginning of your program. These locations or sound r%e}egisters are write only. For sound, you can POKE into these locations but PEEKing will not reflect the value you just poked.%f} Confusing? You've got that right! The main thing is that you can create sounds using experimental POKEs without understan%g}ding what's happening or why. For a detailed more explanation of these registers and other SOUND information, I'd stron%q}b=SOUND 1 b-ASOUND 2 b#nSOUND 3 b2SOUND 4 bSOUND 5 b#SOUND 6 bSOUND 7 b'DOS SYSb*#DUP SYSb MSOUND7 TWDbvAUTORUN SYSB9xSOUND3 TWDgly suggest you read the SOUND chapter in De Re Atari. This book is scheduled to be available from APEX in January 1982.%r} LOCATION DESCRIPTION -------- ----------- 53760 Voice 0 Frequency 53761 Voi%s}ce 0 Control 53762 Voice 1 Frequency 53763 Voice 1 Control 53764 Voice 2 Frequency%t} 53765 Voice 2 Control 53766 Voice 3 Frequency 53767 Voice 3 Control 53768%u} Audio ControlIf you have run the first 6 programs in this package, you should now have a good background for using th$EiͩkΩ͙kCop7j`j {j`Hi͝Νh`)w}L"1.DNUOS:D"NUR:"1.DNUOS GNIDAOL ";6#?:6#?:6#?:6#?:81.RG7j`j {j`Hi͝Νh`(D 1SOUND.3 Documentation While many of the programs in this package display documentation, SOUND.3 may require the p-y}rinted type. This program plays a song and displays sing along words on the screen. If you understand this program, and you-z} can read sheet music, you may wish to write you own BASIC songs. If you don't know how to read sheet music, you might -{}get by if you have a good ear and use the old trial and error method. If you don't have either, and you can't sing, then jus-|}t listen. You will need some knowledge of music to write music. I will have to assume that you understand the followin-}}g musical terms: NOTE or PITCH, CHORD, SHARP, and FLAT. If you're lost already, the rest of this program documentation won't-~} help you. Let us know if you'd like a tutorial on reading music and describing the previously mentioned musical terms. -} Let's walk through the SOUND.3 program listing. We begin by DIMensioning a string called LINE$ and an array called "N" whi-}ch will store 50 pitches. These pitches will correspond to musical notes. LINE$ will store one line of words in our song. -}We then set V0=0 (Voice 0), V1=1 (VOICE 1), etc., then GOTO 100. Why the heck did he GOTO a line of DATA? I actually s-}hould have gone to line 120, but ATARI BASIC will bail me out a just fall through to line 120, which sends us off to a subrou-}tine at line 21000. That routine just clears the screen, displays the heading, POKEs location 77 with a zero, and returns. -}In case you don't know what that POKE does, it temporarily defeats ATARI's automatic color changing routine which is also kno-}wn as attract mode. RETURNing to line 120, we read data for 50 notes into the N (NOTE) array. Then I TRAPped to line 1-}9000 which makes no sense at all since there is no line 19000 in this program. If you decide to make modifications to this p-}rogram, get rid of that useless TRAP. By the way, the reason I got away with it was only because there are no other errors i-}n this program. The POKE 82,8 indents the left margin. Before we start reading more data at line 210, it is important -}to understand the use of the "N" array and the subroutines found from line 30 through line 74. Look at the DISTORTION L-}EVEL 10 PITCH CHART. The first note is quite logically numbered 1. It's corresponding PITCH is 14 and the musical note is C-}. This is a very high sound. The higher the sound, the lower the NOTE # and PITCH value. In our "N" array, N(1) contains a-} 14. The DATA in lines 100 and 110 correspond to the PITCHes on the CHART. Why use NOTE numbers in an array when ATARI-} supplies PITCH values in their BASIC REFERENCE manual? I'm glad you asked. Start reading the PITCH numbers on the PITCH ch-}art until you get to the number 21. What happened to 20? If you look further down the chart, you'll notice an increasing nu-}mber of missing numbers. Now look down the column of NOTE #'s. You will find 50 consecutive numbers. This provides us with-} a quick and easy way to let BASIC calculate chords when we supply only the base note of the desired chord. The subrout-}ine beginning at line 40 is our chord calculator. You need only supply it with the NOTE # in the variable "P". The routine -}assumes that P will be at least 8 and not greater than 50. It then sets P0 (PITCH 0) equal to N(P). Then it calculates our -}chord and stores the pitches in P1, P2, and P3. In line 42, we turn on all 4 voices. Notice that voice 0 is set at a greate-}r volume, and the three notes of our chord are played at a lower volume but equal to each other. In line 50 we get to o-}ur WAIT routine. We POKE the value stored in the variable WAIT into location 540. This location counts backwards to zero at-} the rate of 60 per second (JIFFIES). We just waste time at line 52 until the countdown is completed. Then we turn off VOIC-}E 0 ONLY and RETURN. So what did all this accomplish? In plain English, we played a melody note along with a chord, th-}en turned off the melody note. The chord continues to play. The subroutine at line 60 is used to turn off ALL voices. -} The subroutine at line 30 will change only the melody pitch, then go on to the WAIT routine. The subroutine at line 70-} turns on all four voices at equal volume, then decreases the volume gradually, until all sounds are off. Now, where we-}re we??? Ah yes, line 210 where we read LINE$,CHORD,P,WAIT:PRINT LINE$:and go off to the subroutine beginning at line 40. W-}e are reading the DATA which begins at line 1000. We read the words, "DOE A DEER A FEMALE DEER" into a string then put it on-} the screen. We also read the number 49 into the variable CHORD, 37 into the variable P, and 45 into the variable WAIT. -} Remember, we GOSUB 40 to play a melody note, calculate our chord, play the chord, and kill some time. The best way to lear-}n from examining someone elses program, is by acting as if you were the computer. Follow the instructions, and see what you,-} or the computer, will do. Let's try it. I'll be the computer this time. I have just read the data as I was instructe-}d to do in line 210, and now I'm at the subroutine at line 40. I am told to make P0=N(P). I just read DATA and set the valu-}e of P=37. I look up the value of N(37) and see that it is 121. I set P0=121. My next instruction is to make P1=N(CHO-}RD). I read the value of CHORD in line 210 and know that CHORD=49. I lookup the value of N(49) which is 243, and set P1=243-}. P2 must be set to the value stored in N(45) and P3 must be set to the value stored in N(42). P2=193 and P3=162. I t-}urn on all four voices as indicated in line 42 then POKE the number 45 into my memory location 540. At line 52 I look at the-} value stored in memory location 540 and compare it to 0. It's not 0 so I check it again. Each time I check that location, -}it's value is less than it was the last time I looked, but it's not zero so I keep checking. I'm getting bored. Finall-}y I find a zero and go on to line 54. I turn off the sound of Voice 0 then RETURN from this subroutine to line 220. No-}w it's your turn. Continue through the program doing what I just did. If you start getting confused, take a pencil and writ-}e down values as you read and change them. You should soon understand what I've put your computer through, to play this simp-}le song. The logic in this program is not suitable for all songs. You will have to make minor modifications for differ-}ent tempos, or if other than standard Major chords are required. This program demonstrates one way to play a simple song and-} an easy method of finding the notes of a chord. Don't think you can just add a few lines of DATA and create the Nutcracker -}Suite. If you just want to enter the music, then see it in sheet music form while it is played, I'd recommend ATARI's M-}USIC COMPOSER. If you'd like to see your melody as it would be played on a piano, or play your keyboard as if it were a pian-}o, consider the SANTA CRUZ SOFTWARE PLAYER PIANO package. I know the author, he used to be a piano player.may require the p,l