december_adventure_2023

December Adventure (2023)
git clone https://git.eamoncaddigan.net/december_adventure_2023.git
Log | Files | Refs | README

beep.tal (1342B)


      1 ( beep.tal )
      2 
      3 |30 @Audio0 &vector $2 &position $2 &output $1 &duration $2 &pad $1 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1
      4 
      5 |0000
      6 
      7 |0100
      8 	( Current test code should toggle a beep on and off every 200 ms )
      9 
     10 	;toggle-sound .Audio0/vector DEO2
     11 	#00c8 .Audio0/duration DEO2
     12 	#00f0 .Audio0/adsr DEO2
     13 	#0100 .Audio0/length DEO2
     14 	;sin-pcm .Audio0/addr DEO2
     15 	#ff .Audio0/volume DEO
     16 
     17 	#4e .Audio0/pitch DEO
     18 BRK
     19 
     20 @toggle-sound ( -> )
     21 	[ LIT2 00 &f $1 ] INCk ,&f STR
     22 	#01 AND ,&beep JCN
     23 		#0001 .Audio0/length DEO2
     24 		;silence .Audio0/addr DEO2
     25 		#4e .Audio0/pitch DEO
     26 BRK
     27 	&beep
     28 		#0100 .Audio0/length DEO2
     29 		;sin-pcm .Audio0/addr DEO2
     30 		#4e .Audio0/pitch DEO
     31 BRK
     32 
     33 @sin-pcm
     34 	8083 8689 8c8f 9295 989b 9ea1 a4a7 aaad
     35 	b0b3 b6b9 bbbe c1c3 c6c9 cbce d0d2 d5d7
     36 	d9db dee0 e2e4 e6e7 e9eb ecee f0f1 f2f4
     37 	f5f6 f7f8 f9fa fbfb fcfd fdfe fefe fefe
     38 	fffe fefe fefe fdfd fcfb fbfa f9f8 f7f6
     39 	f5f4 f2f1 f0ee eceb e9e7 e6e4 e2e0 dedb
     40 	d9d7 d5d2 d0ce cbc9 c6c3 c1be bbb9 b6b3
     41 	b0ad aaa7 a4a1 9e9b 9895 928f 8c89 8683
     42 	807d 7a77 7471 6e6b 6865 625f 5c59 5653
     43 	504d 4a47 4542 3f3d 3a37 3532 302e 2b29
     44 	2725 2220 1e1c 1a19 1715 1412 100f 0e0c
     45 	0b0a 0908 0706 0505 0403 0302 0202 0202
     46 	0102 0202 0202 0303 0405 0506 0708 090a
     47 	0b0c 0e0f 1012 1415 1719 1a1c 1e20 2225
     48 	2729 2b2e 3032 3537 3a3d 3f42 4547 4a4d
     49 	5053 5659 5c5f 6265 686b 6e71 7477 7a7d
     50 
     51 @silence
     52 	7e