Home » Archimedes archive » Archimedes World » AW-1991-05.adf » May91 » !AWMay91/Goodies/Coconizer/Tools/Klavier
!AWMay91/Goodies/Coconizer/Tools/Klavier
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1991-05.adf » May91 |
Filename: | !AWMay91/Goodies/Coconizer/Tools/Klavier |
Read OK: | ✔ |
File size: | 10AF bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10DIM code 1024,L%-1 20DIM sample 65536 30FOR p=%1000 TO %1010 STEP 2 40P%=code 50[Opt p 60 70;==== SYSTEM SOUND v2.0 ==== 80 90; r6 Neg. if new Handler r10 Pointer to end of DMA buffer 100; r7 Channel number r11 Increment (interleaf) to use when writing 110; r8 Sample period in us r12 Pointer to (start of DMA + interleaf Ofs) 120; r9 Pointer to SCCB These regs hold values for the fill request 130 140.VoiceBase 150 b vfill ;FillCode for Smoth Adjust 160 b vfill ;UpdateCode for Tone Continue 170 b vfill ;StartCode for New Tone 180 ldmfd r13!,{pc} ;ReleaseCode, Flush 190 ldmfd r13!,{pc} ;Instantiate, Attach VoiceGenerator 200 ldmfd r13!,{pc} ;DeInstantiate, Detach to/from a channel 210 ldmfd r13!,{pc} ; hello Arthur 220 dcd 32 ;Offset from VoiceBase to Name 230 dcb "CocoVoice"+CHR$0 240 align 250 260.vfill 270 adr r8,head ;We use an own Control_Block 280 add r8,r8,r7,lsl#5 ;point to Head+r7*32 290 ldmia r8,{r1-r6} ;Load 6 working registers 300 ldr r0,volume 310 add r5,r5,r0 ;Add Overall_Volume to Channel_Volume 320 330.vfilloop 340]:FOR i=1 TO 16:[OPT p ;Fill one byte 16 times, for 208 -> 13 runs 350 ldrB r0,[r3,r1,lsr#16] ;Load sample byte (HighWord of Pos >>16 ) 360 subS r0,r0,r5 ;Minus volume (where 0=loud & 255=quiet) 370 movMi r0,#0 380 strB r0,[r12],r11 ;And put it into VIDC-buffer 390 add r1,r1,r2 ;Add Pitch (flowing format) 400]:NEXT:[OPT p 410 420 cmp r4,r1,lsr#16 ;Len bigger than Pos >>16 ? 430 bHi vnex 440 movS r1,r6 ;RepAt is new Pos, but is it zero? 450 movEq r2,#0 ;Yes -> Mute Channel (i.e. Set Pitch to 0) 460.vnex 470 cmp r12,r10 ;VIDC-Buffer filled already? 480 bLo vfilloop ;Nooo... 490 stmia r8,{r1-r2} ;Save the two (probably) modified regs 500 510 mov r0,#%00001000 ;RET with Voice-Active-Flag | Channels are 520 ldmfd r13!,{pc} ; | always active 530 540.head 550 dcd 0 ;r1 Pos in the sample (Offset in flow format) 560 dcd 0 ;r2 Increment/Pitch (LowWord for flowing...) 570 dcd 0 ;r3 Sample Adress 580 dcd 0 ;r4 Length 590 dcd 0 ;r5 Volume (0=Loud ... 255=Quiet) 600 dcd 0 ;r6 RepAt (New flow Pos), or 0 for NO REP 610 dcd 0 620 dcd 0 630 dcb STRING$(3*32,CHR$0) ;Add 3 Heads 640 650.volume dcd 0 ;Overall_Sound_Volume 660 670]:NEXT p 680 690REM ==== Installieren ==== 700 710ON ERROR GOTO 1260 :REM Never call Voice_Install twice! 720 730us=48 740SYS "Sound_Configure",4,208,us 750SYS "Sound_InstallVoice",VoiceBase,10 760FOR i=1 TO 4:VOICE i,"CocoVoice":SOUND i,383,1,1:NEXT 770 780REM ==== Translation-Tables ==== 790 800DIM key%(255),put%(9*12) 810 820FOR i=1 TO 9*12 :REM Internat. Octave -3 till Octave 4 830n=i +4*12 :REM Korrect, so 'Steinway' +0 = Middle C 840f=440*(2^((n-46)/12)) :REM Frequence formula 850s=(f/(1000000/us))*65536 :REM OutPut-Wert mittels Dreisatz 860put%(i)=s 870NEXT i 880 890REPEAT 900READ a,a$:key%(ASC a$)=a :REM Pianokeys get notvalues (1-24) 910UNTIL a=0 920 930REM C, C#, D, D#, E, F, F#, G, G#, A, A#, H 940DATA 1,z, 2,s, 3,x, 4,d, 5,c, 6,v, 7,g, 8,b, 9,h,10,n,11,j,12,m 950DATA 13,",",14,l,15,".",16,;,17,/ 960DATA 13,q,14,2,15,w,16,3,17,e,18,r,19,5,20,t,21,6,22,y,23,7,24,u, 0,0 970 980REM ==== Load Sample & simulate Keyboard ==== 990 1000*Set File$Path ram:,ram:samples., 1010PRINT'"HIT +,- TO CHANGE OCTAVE, ENTER FOR NEW INST, OTHER KEYS TO PLAY"' 1020 1030*Ex ram:samples 1040INPUT'"Samplename: "a$ 1050h=OPENIN a$:len=EXT#h:CLOSE#h 1060PRINT "Length is: ";len' 1070OSCLI "Load "+a$+" "+STR$~sample 1080 1090*fx 202,2_10000 1100okt=4:kan=0 1110PRINT okt-4;CHR$(13); 1120a=GET:IF a=13 GOTO 1030 1130IF a=ASC"+" AND okt<7 okt+=1:GOTO 1110 1140IF a=ASC"-" AND okt>1 okt-=1:GOTO 1110 1150IF key%(a) THEN 1160 head!(kan*32+0*4)=0 1170 head!(kan*32+1*4)=put%(okt*12+key%(a)) 1180 head!(kan*32+2*4)=sample 1190 head!(kan*32+3*4)=len 1200 kan+=1:IF kan=4 kan=0 1210ENDIF 1220GOTO 1120 1230 1240REM ==== ESC ===== 1250 1260SYS "Sound_RemoveVoice",,10 1270PRINT "** ";REPORT$;" at line ";ERL;" **"
� code 1024,L%-1 � sample 65536 � p=%1000 � %1010 � 2 (P%=code 2 [Opt p < F;==== șTEM � v2.0 ==== P Z@; r6 Neg. if new Handler r10 Pointer to end of DMA buffer dM; r7 Channel number r11 Increment (interleaf) to use when writing nM; r8 Sample period in us r12 Pointer to (start of DMA + interleaf Ofs) xK; r9 Pointer to SCCB These regs hold values for the fill request � �.VoiceBase �= b vfill ;FillCode for Smoth Adjust �> b vfill ;UpdateCode for Tone Continue �9 b vfill ;StartCode for New Tone �5 ldmfd r13!,{pc} ;ReleaseCode, Flush �H ldmfd r13!,{pc} ;Instantiate, Attach VoiceGenerator �J ldmfd r13!,{pc} ;DeInstantiate, Detach to/from a channel �. ldmfd r13!,{pc} ; hello Arthur �> dcd 32 ;Offset from VoiceBase to Name � dcb "CocoVoice"+�0 � align � .vfill < adr r8,head ;We use an own Control_Block 4 add r8,r8,r7,lsl#5 ;point to Head+r7*32 "9 ldmia r8,{r1-r6} ;Load 6 working registers , ldr r0,volume 6E add r5,r5,r0 ;Add Overall_Volume to Channel_Volume @ J .vfilloop TH]:� i=1 � 16:[OPT p ;Fill one byte 16 times, for 208 -> 13 runs ^I ldrB r0,[r3,r1,lsr#16] ;Load sample byte (HighWord of Pos >>16 ) hH subS r0,r0,r5 ;Minus volume (where 0=loud & 255=quiet) r movMi r0,#0 |< strB r0,[r12],r11 ;And put it into VIDC-buffer �; add r1,r1,r2 ;Add Pitch (flowing format) �]:�:[OPT p � �; cmp r4,r1,lsr#16 ;Len bigger than Pos >>16 ? � bHi vnex �B movS r1,r6 ;RepAt is new Pos, but is it zero? �J movEq r2,#0 ;Yes -> Mute Channel (i.e. Set Pitch to 0) � .vnex �< cmp r12,r10 ;VIDC-Buffer filled already? �( bLo vfilloop ;Nooo... �F stmia r8,{r1-r2} ;Save the two (probably) modified regs � �L mov r0,#%00001000 ;RET with Voice-Active-Flag | Channels are M ldmfd r13!,{pc} ; | always active .head &M dcd 0 ;r1 Pos in the sample (Offset in flow format) 0L dcd 0 ;r2 Increment/Pitch (LowWord for flowing...) :1 dcd 0 ;r3 Sample Adress D* dcd 0 ;r4 Length NA dcd 0 ;r5 Volume (0=Loud ... 255=Quiet) XI dcd 0 ;r6 RepAt (New flow Pos), or 0 for NO REP b dcd 0 l dcd 0 v" dcb �3*32,�0) ;Add 3 Heads � �5.volume dcd 0 ;Overall_Sound_Volume � � ]:� p � �� ==== Installieren ==== � �:� � � �dlD :� Never call Voice_Install twice! � � us=48 �!ș "Sound_Configure",4,208,us �(ș "Sound_InstallVoice",VoiceBase,10 �,� i=1 � 4:ȡ i,"CocoVoice":� i,383,1,1:� "� ==== Translation-Tables ==== � key%(255),put%(9*12) * 4A� i=1 � 9*12 :� Internat. Octave -3 till Octave 4 >Gn=i +4*12 :� Korrect, so 'Steinway' +0 = Middle C H4f=440*(2^((n-46)/12)) :� Frequence formula R?s=(f/(1000000/us))*65536 :� OutPut-Wert mittels Dreisatz \ put%(i)=s f� i p z� �<� a,a$:key%(� a$)=a :� Pianokeys get notvalues (1-24) � � a=0 � �B� C, C#, D, D#, E, F, F#, G, G#, A, A#, H �A� 1,z, 2,s, 3,x, 4,d, 5,c, 6,v, 7,g, 8,b, 9,h,10,n,11,j,12,m �"� 13,",",14,l,15,".",16,;,17,/ �F� 13,q,14,2,15,w,16,3,17,e,18,r,19,5,20,t,21,6,22,y,23,7,24,u, 0,0 � �/� ==== Load Sample & simulate Keyboard ==== � �%*Set File$Path ram:,ram:samples., �I�'"HIT +,- TO CHANGE OCTAVE, ENTER FOR NEW INST, OTHER KEYS TO PLAY"' � *Ex ram:samples �'"Samplename: "a$ h=� a$:len=�#h:�#h $� "Length is: ";len' .� "Load "+a$+" "+�~sample 8 B*fx 202,2_10000 Lokt=4:kan=0 V� okt-4;�(13); `a=�:� a=13 � �TFD j"� a=�"+" � okt<7 okt+=1:� �DVD t"� a=�"-" � okt>1 okt-=1:� �DVD ~� key%(a) � � head!(kan*32+0*4)=0 �+ head!(kan*32+1*4)=put%(okt*12+key%(a)) � head!(kan*32+2*4)=sample � head!(kan*32+3*4)=len � kan+=1:� kan=4 kan=0 �� � � �D`D � �� ==== ESC ===== � �ș "Sound_RemoveVoice",,10 �"� "** ";�$;" at line ";�;" **" �
00000000 0d 00 0a 17 de 20 63 6f 64 65 20 20 20 20 31 30 |..... code 10| 00000010 32 34 2c 4c 25 2d 31 0d 00 14 12 de 20 73 61 6d |24,L%-1..... sam| 00000020 70 6c 65 20 36 35 35 33 36 0d 00 1e 19 e3 20 70 |ple 65536..... p| 00000030 3d 25 31 30 30 30 20 b8 20 25 31 30 31 30 20 88 |=%1000 . %1010 .| 00000040 20 32 0d 00 28 0b 50 25 3d 63 6f 64 65 0d 00 32 | 2..(.P%=code..2| 00000050 0a 5b 4f 70 74 20 70 0d 00 3c 04 0d 00 46 1b 3b |.[Opt p..<...F.;| 00000060 3d 3d 3d 3d 20 c8 99 54 45 4d 20 d4 20 76 32 2e |==== ..TEM . v2.| 00000070 30 20 3d 3d 3d 3d 0d 00 50 04 0d 00 5a 40 3b 20 |0 ====..P...Z@; | 00000080 72 36 20 4e 65 67 2e 20 69 66 20 6e 65 77 20 48 |r6 Neg. if new H| 00000090 61 6e 64 6c 65 72 20 20 20 20 72 31 30 20 50 6f |andler r10 Po| 000000a0 69 6e 74 65 72 20 74 6f 20 65 6e 64 20 6f 66 20 |inter to end of | 000000b0 44 4d 41 20 62 75 66 66 65 72 0d 00 64 4d 3b 20 |DMA buffer..dM; | 000000c0 72 37 20 43 68 61 6e 6e 65 6c 20 6e 75 6d 62 65 |r7 Channel numbe| 000000d0 72 20 20 20 20 20 20 20 20 20 72 31 31 20 49 6e |r r11 In| 000000e0 63 72 65 6d 65 6e 74 20 28 69 6e 74 65 72 6c 65 |crement (interle| 000000f0 61 66 29 20 74 6f 20 75 73 65 20 77 68 65 6e 20 |af) to use when | 00000100 77 72 69 74 69 6e 67 0d 00 6e 4d 3b 20 72 38 20 |writing..nM; r8 | 00000110 53 61 6d 70 6c 65 20 70 65 72 69 6f 64 20 69 6e |Sample period in| 00000120 20 75 73 20 20 20 20 72 31 32 20 50 6f 69 6e 74 | us r12 Point| 00000130 65 72 20 74 6f 20 28 73 74 61 72 74 20 6f 66 20 |er to (start of | 00000140 44 4d 41 20 2b 20 69 6e 74 65 72 6c 65 61 66 20 |DMA + interleaf | 00000150 4f 66 73 29 0d 00 78 4b 3b 20 72 39 20 50 6f 69 |Ofs)..xK; r9 Poi| 00000160 6e 74 65 72 20 74 6f 20 53 43 43 42 20 20 20 20 |nter to SCCB | 00000170 20 20 20 20 54 68 65 73 65 20 72 65 67 73 20 68 | These regs h| 00000180 6f 6c 64 20 76 61 6c 75 65 73 20 66 6f 72 20 74 |old values for t| 00000190 68 65 20 66 69 6c 6c 20 72 65 71 75 65 73 74 0d |he fill request.| 000001a0 00 82 04 0d 00 8c 0e 2e 56 6f 69 63 65 42 61 73 |........VoiceBas| 000001b0 65 0d 00 96 3d 20 62 20 20 20 20 20 76 66 69 6c |e...= b vfil| 000001c0 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |l | 000001d0 20 3b 46 69 6c 6c 43 6f 64 65 20 20 20 20 66 6f | ;FillCode fo| 000001e0 72 20 53 6d 6f 74 68 20 41 64 6a 75 73 74 0d 00 |r Smoth Adjust..| 000001f0 a0 3e 20 62 20 20 20 20 20 76 66 69 6c 6c 20 20 |.> b vfill | 00000200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 55 | ;U| 00000210 70 64 61 74 65 43 6f 64 65 20 20 66 6f 72 20 54 |pdateCode for T| 00000220 6f 6e 65 20 43 6f 6e 74 69 6e 75 65 0d 00 aa 39 |one Continue...9| 00000230 20 62 20 20 20 20 20 76 66 69 6c 6c 20 20 20 20 | b vfill | 00000240 20 20 20 20 20 20 20 20 20 20 20 20 3b 53 74 61 | ;Sta| 00000250 72 74 43 6f 64 65 20 20 20 66 6f 72 20 4e 65 77 |rtCode for New| 00000260 20 54 6f 6e 65 0d 00 b4 35 20 6c 64 6d 66 64 20 | Tone...5 ldmfd | 00000270 72 31 33 21 2c 7b 70 63 7d 20 20 20 20 20 20 20 |r13!,{pc} | 00000280 20 20 20 20 20 3b 52 65 6c 65 61 73 65 43 6f 64 | ;ReleaseCod| 00000290 65 2c 20 20 20 46 6c 75 73 68 0d 00 be 48 20 6c |e, Flush...H l| 000002a0 64 6d 66 64 20 72 31 33 21 2c 7b 70 63 7d 20 20 |dmfd r13!,{pc} | 000002b0 20 20 20 20 20 20 20 20 20 20 3b 49 6e 73 74 61 | ;Insta| 000002c0 6e 74 69 61 74 65 2c 20 20 20 41 74 74 61 63 68 |ntiate, Attach| 000002d0 20 20 20 20 56 6f 69 63 65 47 65 6e 65 72 61 74 | VoiceGenerat| 000002e0 6f 72 0d 00 c8 4a 20 6c 64 6d 66 64 20 72 31 33 |or...J ldmfd r13| 000002f0 21 2c 7b 70 63 7d 20 20 20 20 20 20 20 20 20 20 |!,{pc} | 00000300 20 20 3b 44 65 49 6e 73 74 61 6e 74 69 61 74 65 | ;DeInstantiate| 00000310 2c 20 44 65 74 61 63 68 20 20 20 74 6f 2f 66 72 |, Detach to/fr| 00000320 6f 6d 20 61 20 63 68 61 6e 6e 65 6c 0d 00 d2 2e |om a channel....| 00000330 20 6c 64 6d 66 64 20 72 31 33 21 2c 7b 70 63 7d | ldmfd r13!,{pc}| 00000340 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 68 65 | ; he| 00000350 6c 6c 6f 20 41 72 74 68 75 72 0d 00 dc 3e 20 64 |llo Arthur...> d| 00000360 63 64 20 33 32 20 20 20 20 20 20 20 20 20 20 20 |cd 32 | 00000370 20 20 20 20 20 20 20 20 20 20 3b 4f 66 66 73 65 | ;Offse| 00000380 74 20 66 72 6f 6d 20 56 6f 69 63 65 42 61 73 65 |t from VoiceBase| 00000390 20 74 6f 20 4e 61 6d 65 0d 00 e6 17 20 64 63 62 | to Name.... dcb| 000003a0 20 22 43 6f 63 6f 56 6f 69 63 65 22 2b bd 30 0d | "CocoVoice"+.0.| 000003b0 00 f0 0a 20 61 6c 69 67 6e 0d 00 fa 05 20 0d 01 |... align.... ..| 000003c0 04 0a 2e 76 66 69 6c 6c 0d 01 0e 3c 20 61 64 72 |...vfill...< adr| 000003d0 20 20 20 72 38 2c 68 65 61 64 20 20 20 20 20 20 | r8,head | 000003e0 20 20 20 20 20 20 20 20 3b 57 65 20 75 73 65 20 | ;We use | 000003f0 61 6e 20 6f 77 6e 20 43 6f 6e 74 72 6f 6c 5f 42 |an own Control_B| 00000400 6c 6f 63 6b 0d 01 18 34 20 61 64 64 20 20 20 72 |lock...4 add r| 00000410 38 2c 72 38 2c 72 37 2c 6c 73 6c 23 35 20 20 20 |8,r8,r7,lsl#5 | 00000420 20 20 20 20 3b 70 6f 69 6e 74 20 74 6f 20 48 65 | ;point to He| 00000430 61 64 2b 72 37 2a 33 32 0d 01 22 39 20 6c 64 6d |ad+r7*32.."9 ldm| 00000440 69 61 20 72 38 2c 7b 72 31 2d 72 36 7d 20 20 20 |ia r8,{r1-r6} | 00000450 20 20 20 20 20 20 20 20 3b 4c 6f 61 64 20 36 20 | ;Load 6 | 00000460 77 6f 72 6b 69 6e 67 20 72 65 67 69 73 74 65 72 |working register| 00000470 73 0d 01 2c 14 20 6c 64 72 20 20 20 72 30 2c 76 |s..,. ldr r0,v| 00000480 6f 6c 75 6d 65 0d 01 36 45 20 61 64 64 20 20 20 |olume..6E add | 00000490 72 35 2c 72 35 2c 72 30 20 20 20 20 20 20 20 20 |r5,r5,r0 | 000004a0 20 20 20 20 20 3b 41 64 64 20 4f 76 65 72 61 6c | ;Add Overal| 000004b0 6c 5f 56 6f 6c 75 6d 65 20 74 6f 20 43 68 61 6e |l_Volume to Chan| 000004c0 6e 65 6c 5f 56 6f 6c 75 6d 65 0d 01 40 04 0d 01 |nel_Volume..@...| 000004d0 4a 0d 2e 76 66 69 6c 6c 6f 6f 70 0d 01 54 48 5d |J..vfilloop..TH]| 000004e0 3a e3 20 69 3d 31 20 b8 20 31 36 3a 5b 4f 50 54 |:. i=1 . 16:[OPT| 000004f0 20 70 20 20 20 20 20 20 3b 46 69 6c 6c 20 6f 6e | p ;Fill on| 00000500 65 20 62 79 74 65 20 31 36 20 74 69 6d 65 73 2c |e byte 16 times,| 00000510 20 66 6f 72 20 32 30 38 20 2d 3e 20 31 33 20 72 | for 208 -> 13 r| 00000520 75 6e 73 0d 01 5e 49 20 6c 64 72 42 20 20 72 30 |uns..^I ldrB r0| 00000530 2c 5b 72 33 2c 72 31 2c 6c 73 72 23 31 36 5d 20 |,[r3,r1,lsr#16] | 00000540 20 20 20 3b 4c 6f 61 64 20 73 61 6d 70 6c 65 20 | ;Load sample | 00000550 62 79 74 65 20 28 48 69 67 68 57 6f 72 64 20 6f |byte (HighWord o| 00000560 66 20 50 6f 73 20 3e 3e 31 36 20 29 0d 01 68 48 |f Pos >>16 )..hH| 00000570 20 73 75 62 53 20 20 72 30 2c 72 30 2c 72 35 20 | subS r0,r0,r5 | 00000580 20 20 20 20 20 20 20 20 20 20 20 20 3b 4d 69 6e | ;Min| 00000590 75 73 20 76 6f 6c 75 6d 65 20 28 77 68 65 72 65 |us volume (where| 000005a0 20 30 3d 6c 6f 75 64 20 26 20 32 35 35 3d 71 75 | 0=loud & 255=qu| 000005b0 69 65 74 29 0d 01 72 10 20 6d 6f 76 4d 69 20 72 |iet)..r. movMi r| 000005c0 30 2c 23 30 0d 01 7c 3c 20 73 74 72 42 20 20 72 |0,#0..|< strB r| 000005d0 30 2c 5b 72 31 32 5d 2c 72 31 31 20 20 20 20 20 |0,[r12],r11 | 000005e0 20 20 20 20 3b 41 6e 64 20 70 75 74 20 69 74 20 | ;And put it | 000005f0 69 6e 74 6f 20 56 49 44 43 2d 62 75 66 66 65 72 |into VIDC-buffer| 00000600 0d 01 86 3b 20 61 64 64 20 20 20 72 31 2c 72 31 |...; add r1,r1| 00000610 2c 72 32 20 20 20 20 20 20 20 20 20 20 20 20 20 |,r2 | 00000620 3b 41 64 64 20 50 69 74 63 68 20 28 66 6c 6f 77 |;Add Pitch (flow| 00000630 69 6e 67 20 66 6f 72 6d 61 74 29 0d 01 90 0e 5d |ing format)....]| 00000640 3a ed 3a 5b 4f 50 54 20 70 0d 01 9a 04 0d 01 a4 |:.:[OPT p.......| 00000650 3b 20 63 6d 70 20 20 20 72 34 2c 72 31 2c 6c 73 |; cmp r4,r1,ls| 00000660 72 23 31 36 20 20 20 20 20 20 20 20 20 3b 4c 65 |r#16 ;Le| 00000670 6e 20 62 69 67 67 65 72 20 74 68 61 6e 20 50 6f |n bigger than Po| 00000680 73 20 3e 3e 31 36 20 3f 0d 01 ae 0f 20 62 48 69 |s >>16 ?.... bHi| 00000690 20 20 20 76 6e 65 78 0d 01 b8 42 20 6d 6f 76 53 | vnex...B movS| 000006a0 20 20 72 31 2c 72 36 20 20 20 20 20 20 20 20 20 | r1,r6 | 000006b0 20 20 20 20 20 20 20 3b 52 65 70 41 74 20 69 73 | ;RepAt is| 000006c0 20 6e 65 77 20 50 6f 73 2c 20 62 75 74 20 69 73 | new Pos, but is| 000006d0 20 69 74 20 7a 65 72 6f 3f 0d 01 c2 4a 20 6d 6f | it zero?...J mo| 000006e0 76 45 71 20 72 32 2c 23 30 20 20 20 20 20 20 20 |vEq r2,#0 | 000006f0 20 20 20 20 20 20 20 20 20 3b 59 65 73 20 2d 3e | ;Yes ->| 00000700 20 4d 75 74 65 20 43 68 61 6e 6e 65 6c 20 28 69 | Mute Channel (i| 00000710 2e 65 2e 20 53 65 74 20 50 69 74 63 68 20 74 6f |.e. Set Pitch to| 00000720 20 30 29 0d 01 cc 09 2e 76 6e 65 78 0d 01 d6 3c | 0).....vnex...<| 00000730 20 63 6d 70 20 20 20 72 31 32 2c 72 31 30 20 20 | cmp r12,r10 | 00000740 20 20 20 20 20 20 20 20 20 20 20 20 3b 56 49 44 | ;VID| 00000750 43 2d 42 75 66 66 65 72 20 66 69 6c 6c 65 64 20 |C-Buffer filled | 00000760 61 6c 72 65 61 64 79 3f 0d 01 e0 28 20 62 4c 6f |already?...( bLo| 00000770 20 20 20 76 66 69 6c 6c 6f 6f 70 20 20 20 20 20 | vfilloop | 00000780 20 20 20 20 20 20 20 20 3b 4e 6f 6f 6f 2e 2e 2e | ;Nooo...| 00000790 0d 01 ea 46 20 73 74 6d 69 61 20 72 38 2c 7b 72 |...F stmia r8,{r| 000007a0 31 2d 72 32 7d 20 20 20 20 20 20 20 20 20 20 20 |1-r2} | 000007b0 3b 53 61 76 65 20 74 68 65 20 74 77 6f 20 28 70 |;Save the two (p| 000007c0 72 6f 62 61 62 6c 79 29 20 6d 6f 64 69 66 69 65 |robably) modifie| 000007d0 64 20 72 65 67 73 0d 01 f4 05 20 0d 01 fe 4c 20 |d regs.... ...L | 000007e0 6d 6f 76 20 20 20 72 30 2c 23 25 30 30 30 30 31 |mov r0,#%00001| 000007f0 30 30 30 20 20 20 20 20 20 20 20 3b 52 45 54 20 |000 ;RET | 00000800 77 69 74 68 20 56 6f 69 63 65 2d 41 63 74 69 76 |with Voice-Activ| 00000810 65 2d 46 6c 61 67 20 20 20 7c 20 43 68 61 6e 6e |e-Flag | Chann| 00000820 65 6c 73 20 61 72 65 0d 02 08 4d 20 6c 64 6d 66 |els are...M ldmf| 00000830 64 20 72 31 33 21 2c 7b 70 63 7d 20 20 20 20 20 |d r13!,{pc} | 00000840 20 20 20 20 20 20 20 3b 20 20 20 20 20 20 20 20 | ; | 00000850 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000860 20 20 20 20 20 7c 20 61 6c 77 61 79 73 20 61 63 | | always ac| 00000870 74 69 76 65 0d 02 12 05 20 0d 02 1c 09 2e 68 65 |tive.... .....he| 00000880 61 64 0d 02 26 4d 20 64 63 64 20 30 20 20 20 20 |ad..&M dcd 0 | 00000890 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000008a0 20 20 3b 72 31 20 50 6f 73 20 69 6e 20 74 68 65 | ;r1 Pos in the| 000008b0 20 73 61 6d 70 6c 65 20 28 4f 66 66 73 65 74 20 | sample (Offset | 000008c0 69 6e 20 66 6c 6f 77 20 66 6f 72 6d 61 74 29 0d |in flow format).| 000008d0 02 30 4c 20 64 63 64 20 30 20 20 20 20 20 20 20 |.0L dcd 0 | 000008e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000008f0 72 32 20 49 6e 63 72 65 6d 65 6e 74 2f 50 69 74 |r2 Increment/Pit| 00000900 63 68 20 28 4c 6f 77 57 6f 72 64 20 66 6f 72 20 |ch (LowWord for | 00000910 66 6c 6f 77 69 6e 67 2e 2e 2e 29 0d 02 3a 31 20 |flowing...)..:1 | 00000920 64 63 64 20 30 20 20 20 20 20 20 20 20 20 20 20 |dcd 0 | 00000930 20 20 20 20 20 20 20 20 20 20 20 3b 72 33 20 53 | ;r3 S| 00000940 61 6d 70 6c 65 20 41 64 72 65 73 73 0d 02 44 2a |ample Adress..D*| 00000950 20 64 63 64 20 30 20 20 20 20 20 20 20 20 20 20 | dcd 0 | 00000960 20 20 20 20 20 20 20 20 20 20 20 20 3b 72 34 20 | ;r4 | 00000970 4c 65 6e 67 74 68 0d 02 4e 41 20 64 63 64 20 30 |Length..NA dcd 0| 00000980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000990 20 20 20 20 20 20 3b 72 35 20 56 6f 6c 75 6d 65 | ;r5 Volume| 000009a0 20 28 30 3d 4c 6f 75 64 20 2e 2e 2e 20 32 35 35 | (0=Loud ... 255| 000009b0 3d 51 75 69 65 74 29 0d 02 58 49 20 64 63 64 20 |=Quiet)..XI dcd | 000009c0 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 000009d0 20 20 20 20 20 20 20 3b 72 36 20 52 65 70 41 74 | ;r6 RepAt| 000009e0 20 28 4e 65 77 20 66 6c 6f 77 20 50 6f 73 29 2c | (New flow Pos),| 000009f0 20 6f 72 20 30 20 66 6f 72 20 4e 4f 20 52 45 50 | or 0 for NO REP| 00000a00 0d 02 62 0a 20 64 63 64 20 30 0d 02 6c 0a 20 64 |..b. dcd 0..l. d| 00000a10 63 64 20 30 0d 02 76 22 20 64 63 62 20 c4 33 2a |cd 0..v" dcb .3*| 00000a20 33 32 2c bd 30 29 20 20 20 20 3b 41 64 64 20 33 |32,.0) ;Add 3| 00000a30 20 48 65 61 64 73 0d 02 80 04 0d 02 8a 35 2e 76 | Heads.......5.v| 00000a40 6f 6c 75 6d 65 20 20 20 20 20 20 20 64 63 64 20 |olume dcd | 00000a50 30 20 20 20 20 20 20 20 20 20 3b 4f 76 65 72 61 |0 ;Overa| 00000a60 6c 6c 5f 53 6f 75 6e 64 5f 56 6f 6c 75 6d 65 0d |ll_Sound_Volume.| 00000a70 02 94 04 0d 02 9e 09 5d 3a ed 20 70 0d 02 a8 04 |.......]:. p....| 00000a80 0d 02 b2 1c f4 20 3d 3d 3d 3d 20 49 6e 73 74 61 |..... ==== Insta| 00000a90 6c 6c 69 65 72 65 6e 20 3d 3d 3d 3d 0d 02 bc 04 |llieren ====....| 00000aa0 0d 02 c6 3a ee 20 85 20 e5 20 8d 64 6c 44 20 20 |...:. . . .dlD | 00000ab0 20 20 20 20 20 20 20 20 3a f4 20 4e 65 76 65 72 | :. Never| 00000ac0 20 63 61 6c 6c 20 56 6f 69 63 65 5f 49 6e 73 74 | call Voice_Inst| 00000ad0 61 6c 6c 20 74 77 69 63 65 21 0d 02 d0 04 0d 02 |all twice!......| 00000ae0 da 09 75 73 3d 34 38 0d 02 e4 21 c8 99 20 22 53 |..us=48...!.. "S| 00000af0 6f 75 6e 64 5f 43 6f 6e 66 69 67 75 72 65 22 2c |ound_Configure",| 00000b00 34 2c 32 30 38 2c 75 73 0d 02 ee 28 c8 99 20 22 |4,208,us...(.. "| 00000b10 53 6f 75 6e 64 5f 49 6e 73 74 61 6c 6c 56 6f 69 |Sound_InstallVoi| 00000b20 63 65 22 2c 56 6f 69 63 65 42 61 73 65 2c 31 30 |ce",VoiceBase,10| 00000b30 0d 02 f8 2c e3 20 69 3d 31 20 b8 20 34 3a c8 a1 |...,. i=1 . 4:..| 00000b40 20 69 2c 22 43 6f 63 6f 56 6f 69 63 65 22 3a d4 | i,"CocoVoice":.| 00000b50 20 69 2c 33 38 33 2c 31 2c 31 3a ed 0d 03 02 04 | i,383,1,1:.....| 00000b60 0d 03 0c 22 f4 20 3d 3d 3d 3d 20 54 72 61 6e 73 |...". ==== Trans| 00000b70 6c 61 74 69 6f 6e 2d 54 61 62 6c 65 73 20 3d 3d |lation-Tables ==| 00000b80 3d 3d 0d 03 16 04 0d 03 20 1a de 20 6b 65 79 25 |==...... .. key%| 00000b90 28 32 35 35 29 2c 70 75 74 25 28 39 2a 31 32 29 |(255),put%(9*12)| 00000ba0 0d 03 2a 04 0d 03 34 41 e3 20 69 3d 31 20 b8 20 |..*...4A. i=1 . | 00000bb0 39 2a 31 32 20 20 20 20 20 20 20 20 20 20 20 20 |9*12 | 00000bc0 20 3a f4 20 49 6e 74 65 72 6e 61 74 2e 20 4f 63 | :. Internat. Oc| 00000bd0 74 61 76 65 20 2d 33 20 74 69 6c 6c 20 4f 63 74 |tave -3 till Oct| 00000be0 61 76 65 20 34 0d 03 3e 47 6e 3d 69 20 2b 34 2a |ave 4..>Gn=i +4*| 00000bf0 31 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |12 | 00000c00 20 20 20 20 20 3a f4 20 4b 6f 72 72 65 63 74 2c | :. Korrect,| 00000c10 20 73 6f 20 27 53 74 65 69 6e 77 61 79 27 20 2b | so 'Steinway' +| 00000c20 30 20 3d 20 4d 69 64 64 6c 65 20 43 0d 03 48 34 |0 = Middle C..H4| 00000c30 66 3d 34 34 30 2a 28 32 5e 28 28 6e 2d 34 36 29 |f=440*(2^((n-46)| 00000c40 2f 31 32 29 29 20 20 20 20 20 20 20 3a f4 20 46 |/12)) :. F| 00000c50 72 65 71 75 65 6e 63 65 20 66 6f 72 6d 75 6c 61 |requence formula| 00000c60 0d 03 52 3f 73 3d 28 66 2f 28 31 30 30 30 30 30 |..R?s=(f/(100000| 00000c70 30 2f 75 73 29 29 2a 36 35 35 33 36 20 20 20 20 |0/us))*65536 | 00000c80 3a f4 20 4f 75 74 50 75 74 2d 57 65 72 74 20 6d |:. OutPut-Wert m| 00000c90 69 74 74 65 6c 73 20 44 72 65 69 73 61 74 7a 0d |ittels Dreisatz.| 00000ca0 03 5c 0d 70 75 74 25 28 69 29 3d 73 0d 03 66 07 |.\.put%(i)=s..f.| 00000cb0 ed 20 69 0d 03 70 04 0d 03 7a 05 f5 0d 03 84 3c |. i..p...z.....<| 00000cc0 f3 20 61 2c 61 24 3a 6b 65 79 25 28 97 20 61 24 |. a,a$:key%(. a$| 00000cd0 29 3d 61 20 20 20 20 3a f4 20 50 69 61 6e 6f 6b |)=a :. Pianok| 00000ce0 65 79 73 20 67 65 74 20 6e 6f 74 76 61 6c 75 65 |eys get notvalue| 00000cf0 73 20 28 31 2d 32 34 29 0d 03 8e 09 fd 20 61 3d |s (1-24)..... a=| 00000d00 30 0d 03 98 04 0d 03 a2 42 f4 20 20 20 20 20 43 |0.......B. C| 00000d10 2c 20 20 20 43 23 2c 20 20 44 2c 20 20 20 44 23 |, C#, D, D#| 00000d20 2c 20 20 45 2c 20 20 20 46 2c 20 20 20 46 23 2c |, E, F, F#,| 00000d30 20 20 47 2c 20 20 20 47 23 2c 20 20 41 2c 20 20 | G, G#, A, | 00000d40 20 41 23 2c 20 20 48 0d 03 ac 41 dc 20 20 31 2c | A#, H...A. 1,| 00000d50 7a 2c 20 32 2c 73 2c 20 33 2c 78 2c 20 34 2c 64 |z, 2,s, 3,x, 4,d| 00000d60 2c 20 35 2c 63 2c 20 36 2c 76 2c 20 37 2c 67 2c |, 5,c, 6,v, 7,g,| 00000d70 20 38 2c 62 2c 20 39 2c 68 2c 31 30 2c 6e 2c 31 | 8,b, 9,h,10,n,1| 00000d80 31 2c 6a 2c 31 32 2c 6d 0d 03 b6 22 dc 20 31 33 |1,j,12,m...". 13| 00000d90 2c 22 2c 22 2c 31 34 2c 6c 2c 31 35 2c 22 2e 22 |,",",14,l,15,"."| 00000da0 2c 31 36 2c 3b 2c 31 37 2c 2f 0d 03 c0 46 dc 20 |,16,;,17,/...F. | 00000db0 31 33 2c 71 2c 31 34 2c 32 2c 31 35 2c 77 2c 31 |13,q,14,2,15,w,1| 00000dc0 36 2c 33 2c 31 37 2c 65 2c 31 38 2c 72 2c 31 39 |6,3,17,e,18,r,19| 00000dd0 2c 35 2c 32 30 2c 74 2c 32 31 2c 36 2c 32 32 2c |,5,20,t,21,6,22,| 00000de0 79 2c 32 33 2c 37 2c 32 34 2c 75 2c 20 30 2c 30 |y,23,7,24,u, 0,0| 00000df0 0d 03 ca 04 0d 03 d4 2f f4 20 3d 3d 3d 3d 20 4c |......./. ==== L| 00000e00 6f 61 64 20 53 61 6d 70 6c 65 20 26 20 73 69 6d |oad Sample & sim| 00000e10 75 6c 61 74 65 20 4b 65 79 62 6f 61 72 64 20 3d |ulate Keyboard =| 00000e20 3d 3d 3d 0d 03 de 04 0d 03 e8 25 2a 53 65 74 20 |===.......%*Set | 00000e30 46 69 6c 65 24 50 61 74 68 20 72 61 6d 3a 2c 72 |File$Path ram:,r| 00000e40 61 6d 3a 73 61 6d 70 6c 65 73 2e 2c 0d 03 f2 49 |am:samples.,...I| 00000e50 f1 27 22 48 49 54 20 2b 2c 2d 20 54 4f 20 43 48 |.'"HIT +,- TO CH| 00000e60 41 4e 47 45 20 4f 43 54 41 56 45 2c 20 45 4e 54 |ANGE OCTAVE, ENT| 00000e70 45 52 20 46 4f 52 20 4e 45 57 20 49 4e 53 54 2c |ER FOR NEW INST,| 00000e80 20 4f 54 48 45 52 20 4b 45 59 53 20 54 4f 20 50 | OTHER KEYS TO P| 00000e90 4c 41 59 22 27 0d 03 fc 04 0d 04 06 13 2a 45 78 |LAY"'........*Ex| 00000ea0 20 72 61 6d 3a 73 61 6d 70 6c 65 73 0d 04 10 16 | ram:samples....| 00000eb0 e8 27 22 53 61 6d 70 6c 65 6e 61 6d 65 3a 20 22 |.'"Samplename: "| 00000ec0 61 24 0d 04 1a 16 68 3d 8e 20 61 24 3a 6c 65 6e |a$....h=. a$:len| 00000ed0 3d a2 23 68 3a d9 23 68 0d 04 24 19 f1 20 22 4c |=.#h:.#h..$.. "L| 00000ee0 65 6e 67 74 68 20 69 73 3a 20 20 22 3b 6c 65 6e |ength is: ";len| 00000ef0 27 0d 04 2e 1d ff 20 22 4c 6f 61 64 20 22 2b 61 |'..... "Load "+a| 00000f00 24 2b 22 20 22 2b c3 7e 73 61 6d 70 6c 65 0d 04 |$+" "+.~sample..| 00000f10 38 04 0d 04 42 13 2a 66 78 20 32 30 32 2c 32 5f |8...B.*fx 202,2_| 00000f20 31 30 30 30 30 0d 04 4c 0f 6f 6b 74 3d 34 3a 6b |10000..L.okt=4:k| 00000f30 61 6e 3d 30 0d 04 56 12 f1 20 6f 6b 74 2d 34 3b |an=0..V.. okt-4;| 00000f40 bd 28 31 33 29 3b 0d 04 60 15 61 3d a5 3a e7 20 |.(13);..`.a=.:. | 00000f50 61 3d 31 33 20 e5 20 8d 54 46 44 0d 04 6a 22 e7 |a=13 . .TFD..j".| 00000f60 20 61 3d 97 22 2b 22 20 80 20 6f 6b 74 3c 37 20 | a=."+" . okt<7 | 00000f70 6f 6b 74 2b 3d 31 3a e5 20 8d 44 56 44 0d 04 74 |okt+=1:. .DVD..t| 00000f80 22 e7 20 61 3d 97 22 2d 22 20 80 20 6f 6b 74 3e |". a=."-" . okt>| 00000f90 31 20 6f 6b 74 2d 3d 31 3a e5 20 8d 44 56 44 0d |1 okt-=1:. .DVD.| 00000fa0 04 7e 0f e7 20 6b 65 79 25 28 61 29 20 8c 0d 04 |.~.. key%(a) ...| 00000fb0 88 18 20 68 65 61 64 21 28 6b 61 6e 2a 33 32 2b |.. head!(kan*32+| 00000fc0 30 2a 34 29 3d 30 0d 04 92 2b 20 68 65 61 64 21 |0*4)=0...+ head!| 00000fd0 28 6b 61 6e 2a 33 32 2b 31 2a 34 29 3d 70 75 74 |(kan*32+1*4)=put| 00000fe0 25 28 6f 6b 74 2a 31 32 2b 6b 65 79 25 28 61 29 |%(okt*12+key%(a)| 00000ff0 29 0d 04 9c 1d 20 68 65 61 64 21 28 6b 61 6e 2a |).... head!(kan*| 00001000 33 32 2b 32 2a 34 29 3d 73 61 6d 70 6c 65 0d 04 |32+2*4)=sample..| 00001010 a6 1a 20 68 65 61 64 21 28 6b 61 6e 2a 33 32 2b |.. head!(kan*32+| 00001020 33 2a 34 29 3d 6c 65 6e 0d 04 b0 19 20 6b 61 6e |3*4)=len.... kan| 00001030 2b 3d 31 3a e7 20 6b 61 6e 3d 34 20 6b 61 6e 3d |+=1:. kan=4 kan=| 00001040 30 0d 04 ba 05 cd 0d 04 c4 0a e5 20 8d 44 60 44 |0.......... .D`D| 00001050 0d 04 ce 04 0d 04 d8 15 f4 20 3d 3d 3d 3d 20 45 |......... ==== E| 00001060 53 43 20 20 3d 3d 3d 3d 3d 0d 04 e2 04 0d 04 ec |SC =====.......| 00001070 1e c8 99 20 22 53 6f 75 6e 64 5f 52 65 6d 6f 76 |... "Sound_Remov| 00001080 65 56 6f 69 63 65 22 2c 2c 31 30 0d 04 f6 22 f1 |eVoice",,10...".| 00001090 20 22 2a 2a 20 22 3b f6 24 3b 22 20 61 74 20 6c | "** ";.$;" at l| 000010a0 69 6e 65 20 22 3b 9e 3b 22 20 2a 2a 22 0d ff |ine ";.;" **"..| 000010af