Re: [hatari-devel] STe DMA sound |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Le 14/04/2018 à 17:44, Vincent Rivière a écrit :
On 13/04/2018 at 11:10, Vincent Rivière a wrote:*BUT* that didn't fix the issue! I can still hear the bogus-treeble which makes my ears bleeding. Those annoying frequencies are definitely above the low-pass filter.By thinking twice, I may have been fooled by 2 different bugs:1) The bogus peak on stairs, visible on Audacity waveforms, including with simple sine wave testcase. Definitely wrong, might come from wrong upsampling combined to LMC1992 bass/treeble, as Christian suspects.2) The 7 KHz artifact in Lethal Xcess music, visible on Audacity spectrogram. This is the most annoying issue for the ears, like ultrasounds inserted in the music at some places. Listening carefully to the music and digidrums at lower rate, I'm finally not sure at all that it comes from the DMA sound. That might explain things. That bogus sound may be simply generated by the YM-2149, due to bogus input or emulation.There is no clue that 1) and 2) are related. Strange coincidence: I have reported the "restore memory snapshot" issue in other thread.When I press AltGr+l, it freezes (bug), but most of the time I hear that continuous 7 KHz high pitched sound.Coincidence?But strangely, there is no such 7 KHz issue in Lethal Xcess *ST* mode (even if display fails due to another Hatari bug). Maybe the ST digidrums resets some YM registers, avoiding the STe 7 KHz bug...Really, we must be sure to avoid confusing between different issues when investigating.
HiI don't deny that there might be some non-correct-yet sound rendering when using STE dma sound. It's quite possible in the sense that as far as I know it was never measured against a real STE to compare output wav for example.
Regarding a way to reproduce/improve this sound artefact, I also think that some small independant test prg should be needed.
For example, I rewrote the YM2149 emulation to be cycle exact for Hatari 2.1, but to check the accuracy I also wrote some test programs for my real STF to record some 44.1 kHz wav file of its output. Playing a set of specific notes / square waves / envelopes in a reproducable way is much more easier than starting a game and trying to capture the result (especially when music and fx can be mixed together).
So, to improve STE sound (eg volume amplitude compared to the YM output, effect of the low pass filter or LMC behaviour), I think it would be required to write a similar test program, maybe playing different sample at the 4 possible STE output freq, then also adding some LMC effect in a second time, then recording the complete output of all those test from a real STE.
Then we can do the same under Hatari and by comparing the wav file we can see where are some difference and modify Hatari's filter stages until we reach the real STE result.
Note that to be able to spot the difference, we could play also some kind of "square wave" sample with the STE. It would not reflect the difference you hear under Lethal Xcess, but it's much easier to see how a square wave is modified by the filtering when looking at the wav file under Audacity.
By the way, do you hear the same artefact with Hatari 2.0 ? Nicolas
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |