bbbradsmith / nsfplay

Nintendo NES sound file NSF music player
https://bbbradsmith.github.io/nsfplay/
277 stars 42 forks source link

[Question] Waveform offset? #70

Closed jadasse closed 1 year ago

jadasse commented 1 year ago

How come there is a present waveform offset when NSFPlay plays an NSF or exports a WAV file? Upon opening or recording in Audacity, the waveform out of the NSF is very off-centered why is that?

bbbradsmith commented 1 year ago

I'm not sure what settings you're using. Under default settings, there is a highpass filter which has a centering effect.

Otherwise a lot of the channel outputs are simulated as having 0 to some positive value before being filtered, which is based on the way they actually operate electrically. Without the highpass they might be all-positive. With no highpass there would be no good way to center this because silence should still be at 0.

Have you disabled the highpass filter? That should cause this effect. (Hardware would also do this if you could capture it before any highpass on the signal.)

jadasse commented 1 year ago

I'm not sure what settings you're using. Under default settings, there is a highpass filter which has a centering effect.

Otherwise a lot of the channel outputs are simulated as having 0 to some positive value before being filtered, which is based on the way they actually operate electrically. Without the highpass they might be all-positive. With no highpass there would be no good way to center this because silence should still be at 0.

Have you disabled the highpass filter? That should cause this effect. (Hardware would also do this if you could capture it before any highpass on the signal.)

I set the HPF by a single key to the right, and it worked. It seems that the HPF setting of 0 caused the offset. Thanks!