swap to 44.7khz audio

This commit is contained in:
Kelvin Sherlock 2020-07-23 20:50:58 -04:00
parent 665bb39925
commit 03fcac89e8
3 changed files with 24 additions and 66 deletions

View File

@ -11,7 +11,7 @@
#define kStopID 3
resource rWindParam1 (0x1000) {
0x8020,
fTitle + fVis + fMove,
0x1000E,
0x0,
{0, 0, 0, 0},

View File

@ -735,16 +735,16 @@ init_audio
lda #$e1
sta >SoundAddr
lda #31*2
lda #17*2 ; 18 osc = 44744.3125 hz
sta >SoundData
* osc 1/2 are 256 bytes, running at the natural rate.
* osc 5/6/7 are 256 bytes, running at 1 / 3 / 6 time units
t1_freq = 5103
t3_freq = 1701
t7_freq = 729
SR = 44744
t1_freq = $01000000*8/SR ;5103
t3_freq = $01000000*8/SR/3 ; 1701
t7_freq = $01000000*8/SR/7 ; 729
* frequency low registers
lda #$00

View File

@ -1,65 +1,23 @@
* 26300 hz
* want a 256-byte B5 sine wav
* coeff = 2 * PI * 987.767 / 26300 = 0.23598186697022278
* PI/2/coeff = 6.656428084760879
* PI/2/6.4 = 0.2454369260617026
* pcm = [128 + round(127 * sin(n*xx)) for n in range(0,256)]
beep_b5
hex 809fbcd5eaf8fefef5e6d1b6997a5b3f
hex 26130601030d1e344f6d8cabc7def0fb
hex fffbf0dec7ab8c6d4f341e0d03010613
hex 263f5b7a99b6d1e6f5fefef8ead5bc9f
hex 8061442b160802020b1a2f4a6786a5c1
hex daedfafffdf3e2ccb193745539221005
hex 0105102239557493b1cce2f3fdfffaed
hex dac1a586674a2f1a0b020208162b4461
hex 809fbcd5eaf8fefef5e6d1b6997a5b3f
hex 26130601030d1e344f6d8cabc7def0fb
hex fffbf0dec7ab8c6d4f341e0d03010613
hex 263f5b7a99b6d1e6f5fefef8ead5bc9f
hex 8061442b160802020b1a2f4a6786a5c1
hex daedfafffdf3e2ccb193745539221005
hex 0105102239557493b1cce2f3fdfffaed
hex dac1a586674a2f1a0b020208162b4461
* 44744.3125 hz f5 sin wav (actual coeff 15.98 but close enough)
* [round(127 * sin(n*PI*16/512)) for n in range(0,256)]
beep_f5
hex 8096abbfd1e0edf6fdfffef9f0e4d5c4
hex b19c86705b473424160c050102060d18
hex 26374a5e74899fb3c7d8e6f1fafefffc
hex f5ebdecebca8937d67523f2d1e110803
hex 010308111e2d3f52677d93a8bccedeeb
hex f5fcfffefaf1e6d8c7b39f89745e4a37
hex 26180d060201050c162434475b70869c
hex b1c4d5e4f0f9fefffdf6ede0d1bfab96
hex 806a55412f20130a03010207101c2b3c
hex 4f647a90a5b9ccdceaf4fbfffefaf3e8
hex dac9b6a28c77614d39281a0f06020104
hex 0b15223244586d8399aec1d3e2eff8fd
hex fffdf8efe2d3c1ae99836d5844322215
hex 0b040102060f1a28394d61778ca2b6c9
hex dae8f3fafefffbf4eadcccb9a5907a64
hex 4f3c2b1c10070201030a13202f41556a
noise
hex 6c917262a488987a82a7895966a7589e
hex 646a9b8887607b85a086925c678d7395
hex 7686949c61a69a9897a7a5979d668371
hex 91a05ca65972a48b857896906a6978a4
hex a891679b826a83658c9c8d6162926b8a
hex 8a6970589e8998986c87738b927c9f60
hex 8372959289748c606ca6658e74a89471
hex 966f8477799b606ca388a66b72847d5a
hex 8b678f6983619080a17f6e775f5f787c
hex 7a845a5890927a5ba66598a267746f79
hex 985f94808a839da191a162848a7c6ea6
hex 8376837d86689f7d9b94a57b6997688b
hex 67a86b8e8869a85ca28b9e729d8c799a
hex 629b8b678189728e9a8ba686a49f6a90
hex 5879588f91797b6c5d7080587a6a6995
hex 616da595987565a2a3a159a09a829974
hex 808c99a5b1bcc7d1dae2eaf0f5fafdfe
hex fffefdfaf5f0eae2dad1c7bcb1a5998c
hex 8074675b4f44392f261e16100b060302
hex 010203060b10161e262f39444f5b6774
hex 808c99a5b1bcc7d1dae2eaf0f5fafdfe
hex fffefdfaf5f0eae2dad1c7bcb1a5998c
hex 8074675b4f44392f261e16100b060302
hex 010203060b10161e262f39444f5b6774
hex 808c99a5b1bcc7d1dae2eaf0f5fafdfe
hex fffefdfaf5f0eae2dad1c7bcb1a5998c
hex 8074675b4f44392f261e16100b060302
hex 010203060b10161e262f39444f5b6774
hex 808c99a5b1bcc7d1dae2eaf0f5fafdfe
hex fffefdfaf5f0eae2dad1c7bcb1a5998c
hex 8074675b4f44392f261e16100b060302
hex 010203060b10161e262f39444f5b6774
table
adrl %00000000000000000000000000000000