just started with sound on my emu. i tested with zelda intro and it doesnt sound too bad ( i dont have to quickly turn it off :P)
square1, square2, triangle, noise range from 0 to 15, is the zero axis 7.5 ?
dmc ranges from 0 to 127, is the zero axis 63.5 ?
i am using the normalized audio equation from the wiki and apu_ref.txt that normalizes from 0.0 to 1.0, is the zero axis 0.5 ?
for testing i grabbed the wave_writer code from blip to dump to a wav so i could see before playing. after opening with audacity, my wav dump ranges from -0.45 to -0.90 ( audacity scale is 1.0 to -1.0) and says 32 bit float, i guess thats audacities internal format ? file reports the file as zelda-first-test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 96000 Hz. the waveform looks ok, and sounds ok, but is not centered about the 0 axis virtically.
after normalizing the nes data in my sound code, i multiply by USHRT_MAX (65535) and add SHRT_MIN (-32768) to convert to the range of short (-32768 to 32767) then pass that to wave_write that i grabbed from blip.
could anyone suggest why my audio is not centered ?
matt
square1, square2, triangle, noise range from 0 to 15, is the zero axis 7.5 ?
dmc ranges from 0 to 127, is the zero axis 63.5 ?
i am using the normalized audio equation from the wiki and apu_ref.txt that normalizes from 0.0 to 1.0, is the zero axis 0.5 ?
for testing i grabbed the wave_writer code from blip to dump to a wav so i could see before playing. after opening with audacity, my wav dump ranges from -0.45 to -0.90 ( audacity scale is 1.0 to -1.0) and says 32 bit float, i guess thats audacities internal format ? file reports the file as zelda-first-test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 96000 Hz. the waveform looks ok, and sounds ok, but is not centered about the 0 axis virtically.
after normalizing the nes data in my sound code, i multiply by USHRT_MAX (65535) and add SHRT_MIN (-32768) to convert to the range of short (-32768 to 32767) then pass that to wave_write that i grabbed from blip.
could anyone suggest why my audio is not centered ?
matt