|Re: [hatari-devel] STe DMA sound|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
- To: hatari-devel <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [hatari-devel] STe DMA sound
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Fri, 13 Apr 2018 13:14:20 -0600 (MDT)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=neo; t=1523646860; bh=JnjACEcK20TGRTr1/hxJduM7QZNn4RxRUIV77yuY+Bs=; h=Date:From:To:In-Reply-To:Subject; b=JjwtKiNmjq9gO2+uJH3Ew0FOsbNbVg0/MX19y8lS6Gs/ZQRgkYpqKjWsJeF6Sq/1Q YgM8xFKktExCp4RCXYSC1w+KR6knPMKB2HLQwuqeE4w4o3BMUF3nT2ACgQHhyA9pD/ ME9DIgh0qqAjL8hLUfGYDnhIIKm/EN1cVws7TThDHH1M7H9bUNacW1ivTUDC2MAvM/ x9cJUuFODdVM+ygYNZObOfSnBML/sm9q3aNXA6waCWhRMDVvzPSidkkBaVOCjivXCW CqeoCfMjLF8udeQJC/a/Wn/2rMkuV4dAJPnFnqcwS5bQLSkL6tDyWecIXtqzINk4zj 2VYLmZOX6Bu8w==
- Thread-index: jSDqdNHyWO8XF2ksI1VT1QBudVOv8Q==
- Thread-topic: STe DMA sound
----- On Apr 13, 2018, at 1:18 AM, Nicolas Pomarède wrote:
> Le 13/04/2018 à 09:31, Vincent Rivière a écrit :
>> I'm not really satisfied of Hatari DMA sound emulation.
>> Basically, Hatari lacks a low-pass filter, which is a key signature of
>> STe DMA sound at low frequencies such as 6 or 12 KHz.
>> This can particularly be heard in Lethal Xcess. Digidrums are very
>> bass-boosted on real hardware. On the other hand, on Hatari (emulating
>> sound at 44 KHz), we can hear some bogus-treeble sound. This is typical
>> of samples upscaled with "nearest" algorithm, without filter.
>> I played Lethal Xcess with Effects only, and I recorded the sound with
>> Hatari feature. See explosion sound as attachment.
>> I looked at it with Audacity.
>> First, see audacity1.png. We can see big stairs effect, which is typical
>> of upscaling with "nearest" algorithm.
>> But if you look closely, there are big peaks at the beginning of each
>> step. This is particularly visible when zooming more, see audacity2.png.
>> That's a complete nonsense. I can't understand where such peaks come
>> from. They cause the apparition of bogus high frequencies, even more
>> than standard upscaling. On the contrary, a normal low-pass filter would
>> smooth such transitions. While currently, Hatari does the opposite,
>> degrading the sound instead of improving it.
>> Definitely, Hatari STe sound can be improved.
>> I don't hear such problem in Steem.
> Hatari has a low pass filter for STE DMA sound, see the functions
> DmaSnd_LowPassFilterLeft and DmaSnd_LowPassFilterRight in dmaSnd.c
> But the filter is enabled only if the DMA sample freq is above the
> output freq of the audio card. As most PC will default to 44.1 kHz, this
> means that low pass only applies when STE sound is at 50 kHz.
> This part was written by David Savinkoff, he might tell the reason for
> this choice. Maybe some fine tuning would be needed based on some real
> wav recording on an STE at different freq to get closer results to real HW.
> In dmaSnd.c at line 530, can you force "DmaSnd_LowPass = true" to see if
> the sound is better according to you ?
I just looked at Vincent's audacity2.png. It looks like the first sample of each
pulse is treated differently than the rest. This could be:
1) Correct samples the STe application is generating.
2) Your STe LMC1992 has the treble turned way up.
3) A new symptom of DMA or bus timing.
4) A regression in anything since the last time the sound was good.
5) Maybe an existing problem has just been heard.
Please try previous versions of Hatari on some STe DMA sound applications.
We need to find where the problem is.