Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audible clicking in resid emulation #7

Open
ghost opened this issue Dec 12, 2019 · 3 comments
Open

Audible clicking in resid emulation #7

ghost opened this issue Dec 12, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 12, 2019

Thanks again for the great work.

I've been experimenting and noticed that the resid emulation outputs a noticeable continuous clicking sound. It's most noticeable on 'best' quality. You can hear it in parts of tracks which are quiet or silent, like the start of Azmagutah_6581.sid. It doesn't seem to happen with the other emulators (FastSID, TinySID) and is slightly less noticeable on 'better' or 'good', but still present.

@jhohertz
Copy link
Owner

Hmmm. I'll try giving it a listen again. It seemed okay on my chrome desktop, but I wasn't listening w/ headphones. I know it's all terrible on the mobile browsers.

I also just want to be frank and say, if I get some time for some of the fun things again, I'll probably look at doing this instead via WebASM, and directly compiling the C sources.

I suspect if there is an issue, it is that there is a lot of places where the original code relied on certain C-isms like how a 32-bit integer rolls over if incremented, and so the javascript conversion has a ton of lame attempts to emulate such things. I have long suspected there is likely some missing (And there is one mode of reSID I have never exposed, because it clearly is doing something wrong in that regard).

It's my hope that a WebASM version of things would avoid most of those issues.

I actually have it mostly compiling, but I am unclear how one uses "libtool" in a WebASM context, and that is where the build is failing.

@ghost
Copy link
Author

ghost commented Dec 12, 2019

Thanks for the reply. I'm using a recent Chrome with headphones on my PC. I only noticed this clicking when I started using your code in my own project where there are long "silent" patches, then went back to your original demo again to see if it was there.

WebASM probably makes sense as you said, but I was impressed by your pure JS approach! It sounds very good. Looking forward to seeing your new work at any rate.

You probably know about WebSID which uses emscripten to build from C sources, but I haven't managed to build it yet!

@ghost
Copy link
Author

ghost commented Dec 13, 2019

A couple more observations in case they're useful:

  • Adjusting the buffer size (eg with pico.setup({cellsize: 256});) seems to affect the frequency of the clicking. Smaller buffer sizes produce more frequent clicking.
  • When filters are disabled, I don't hear the clicking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant