SID "crackling" audio bug in v3.1
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
There is a bug of some kind in VICE 3.1 which was not in 3.0, that of crackling in the SID audio.
I am using the same configuration from 3.0 to 3.1, which is default settings except for Sound Buffer Size of 150msec with DirectX output, using ReSID (8580) with SID Filters selected. I am on Windows 7 Ultimate 64-bit.
The cause seems to be the SID Filters, but I would still like to use them.
Any information on this?
how to reproduce this?
This is the configuration I use:
but what exactly do i need to do to get the supposedly broken behaviour? does it also happen when using default config?
Yes, I get it with default config, on this demo: Disco Apocalypso At 4:16 minutes in, the music has an annoying crackle on the beat of the music, and it is NOT the demo at fault, as it works fine with the above config in 3.0.
Last edit: Aaron MJ Fisher 2017-05-29
What else can I do to provide proof?
could you tell which tune it is? -> http://csdb.dk/release/?id=133935
It's called "Klogge". In 3.1, that tune is the one with the crackle in the beat that shouldn't be there.
ok, i can confirm that at least :)
hopefully leandro will look at this...
Thank you.
I can confirm that I experience the same "crackling" of the sound (with version 3.1) when I've played most games after a minutes or so.
I use a Mac with OSX 10.12.5 and a very stripped down .vicecr (that I am not even sure gets read):
[C64]
HTMLBrowserCommand="open -a /Applications/Google\ Chrome.app %s"
SaveResourcesOnExit=1
FileSystemDevice8=1
FSDevice8ConvertP00=1
FSDevice8Dir="/Volumes/andersj/C64"
FSDevice8SaveP00=1
FSDevice8HideCBMFiles=1
DriveSoundEmulation=1
I see "Sound: Warning - Buffer drained" when I run it from the terminal, and have tried increasing the sound buffer.
It could easily be my rookie Vice mojo, as I just started playing with it recently.
Last edit: Anders Søndergaard Jensen 2017-06-08
This "crackling" is from version 2.4 up to version 3.1 and is fixed, when you change 50 hz to 60 hz.
Got it somewhat better by tweaking the uCox value. Still need a thorough comparison with a real chip, and I'm not sure if it's the right parameter to change, but at least it doesn't produce annoying noises with the tunes tested.
As a side note the current implementation of the filter cutoff transistor is based on the assumption of always being in triode mode, which might not be true, so more work may be needed.
By the way here is a quick patch, if you want to have a play and let me know which value works better or if there are any tune that still play badly it would be great.
btw, perhaps related - some ppl reported that 8580 would sound even more broken when the "digifix" is NOT enabled. ie enabling it fixes part of the problem. or something. perhaps worth a look :)
busy with some other things atm... will come back to this patch asap
Ok, thanks. I've been reported that the digifix doesn't event work with the latest changes... I'll have a look.
An additional patch that correctly emulates filter cutoff transistor both in triode and saturation mode.
applied both patches....
however shouldnt this:
unsigned int Vgdt = Vgdt = (vi < kVgt) ? kVgt - vi : 0; // triode/saturation mode
be
unsigned int Vgdt = (vi < kVgt) ? kVgt - vi : 0; // triode/saturation mode
?
Ah yes, just a bad copy'n'paste, sorry
it sounds good now, atleast no terrible overflows (or whatever it was) anymore in "klogge"...
now one thing that would be really nice to have: proper values (preferably based on calculations ...) for passband/gain/bias so the filter sounds as close as possible to how they were before all your tweaks. once we have that we can make another set of these resources and just toggle between them when changing SID type
Ok, I'll try to do some fine tuning
i applied patch
resid-8580.patch
but now the intro from "Antipop by Samar" really sounds bad, a lot worse than before... :(
i didn't really dare to listen to the rest.
http://www.pouet.net/prod.php?which=74385
default settings plus an extra SID.
it sounds fine to me - what are your settings? you did enable a second sid and selected it accordingly, did you? (i used second SID at $de00, 8580, reSID for testing)
Last edit: gpz 2018-08-26
honestly, under windows VICE never had proper output for this intro, i checked this today.
as said, up to r35367 they all sound about the same (not really good) to my ears, no matter if i use SDL or WinVICE.
but after that (see r35372) it's even a lot worse. if i revert above patch, it does sound again as in previous builds.
i also attached a file produced by sidplayfp, which sounds MUCH better. pretty much how it is supposed to be.
the settings also were second SID at $de00, 8550 ReSID Resampling, SID filters ON
Last edit: Querino 2018-08-26
and no, GTK3VICE-3.2-win32 is no way better...
with filter bias tuned down it sounds much better... however there are still some pops which could maybe originate from this "samples" bug - leandro? :)
ok, but it does not sound the way it should if we take the FLAC at pouet.net as a reference, which we should i guess.
and after about 12 seconds it starts to crackle like mad.
and still it sounds worse with above patch applied.
and why the heck does sidplayfp sound sooooooo much better? the source in "resid" there is exactly the same as in VICE.
just "sidplayfp Intro_2SID.sid" and there is no noise, no crackling, no distortions or whatsoever.