GithubHelp home page GithubHelp logo

Weird ringing in sound about nuked-sc55 HOT 13 OPEN

nukeykt avatar nukeykt commented on August 26, 2024
Weird ringing in sound

from nuked-sc55.

Comments (13)

pachuco avatar pachuco commented on August 26, 2024

the_stink_files.zip

from nuked-sc55.

nukeykt avatar nukeykt commented on August 26, 2024

Perhaps XP has crappy audio resampling, sc-55mkII outputs non standard 66207hz audio

from nuked-sc55.

pachuco avatar pachuco commented on August 26, 2024

Oh, that makes sense then.
Maybe I should shove an inline resampler at the output. I've had positive experiences before with snes gaussian on the OPL3, but maybe sinc would be better fit.

from nuked-sc55.

datajake1999 avatar datajake1999 commented on August 26, 2024

If I ever get around to writing a VST based on Nuked SC-55, I plan on integrating the Blargg resampler library, which I forked at https://github.com/datajake1999/blargg_resampler. It is a decent resampler that uses sinc interpolation.

from nuked-sc55.

johnnovak avatar johnnovak commented on August 26, 2024

We've been using the Speex resampler (libspeex) in DOSBox Staging with very good results at quality setting 5. That setting is basically transparent on normal musical material for most normal people (except on specially prepared material when A/B-ing it in studio headphones, but even then the difference is extremely hard to spot).

It's very fast, even on low-end hardware like the Raspberry Pi 3, so my recommendation.

https://speex.org/docs/manual/speex-manual/node7.html#SECTION00760000000000000000

from nuked-sc55.

Gerwin2k avatar Gerwin2k commented on August 26, 2024

I am having similar trouble, but more so. Much more ringing/distortion in Windows 7 x64 official builds. Exactly the same with my Windows XP x86 builds (same on two entirely different systems). Only my Linux x64 build sound good, which kinda proves that the code and ROMs are not borked.
CPU usage is not even that much; Below 50% of one core.

I made .wav files with the same 66207Hz and 64000Hz sample rates, which play fine in different sound players.
Still investigating... Maybe SDL2 specific.

from nuked-sc55.

pachuco avatar pachuco commented on August 26, 2024

You are at mercy of OS/driver's interpolation.

On my X86 XP, different results from default audio driver and Virtual Audio Cable.
VAC does linear interpolation, I think, while default audio(SB Audigy LE) does nearest.

from nuked-sc55.

Gerwin2k avatar Gerwin2k commented on August 26, 2024

Both systems I mentioned use a Realtek audio chipset. I could maybe switch to the AMD graphics HDMI audio for testing.
I would like to test more systems at the office, but I don't want to install loopmidi on these for just a quick test.

Earlier I looked up details on Windows XP sound resampling, and it suggested that this OS switches to the actual sample rate when the hardware supports it, and when no other sound is playing.

from nuked-sc55.

johnnovak avatar johnnovak commented on August 26, 2024

As me and some others mentioned, the answer is a built-in resampler. SpeexDSP is great, fast, and easy to use. It is the resampler that PulseAudio uses on Linux, from memory.

Btw, my Realtek driver on Win10 deals with the unorthodox rate just fine, no issues.

from nuked-sc55.

Gerwin2k avatar Gerwin2k commented on August 26, 2024

It would be interesting to test with an embedded resampler. Though I also have some evidence it is actually something else:

  • The Realtek Chipset in my main system was their flagship ALC889 (2011).
  • Earlier I wrote "I made .wav files with the same 66207Hz and 64000Hz sample rates, which play fine in different sound players.".
  • Windows 7 x64 has it too.
  • It sounds really bad. Almost unrecognizable.

But because I am seemingly one of the very few with this problem, I suppose I have to be investigate myself or be patient.

from nuked-sc55.

pachuco avatar pachuco commented on August 26, 2024

@johnnovak

I've tried shoving in a resampler but I can't seem to not mess up the thin balance between the audio thread and the work thread.
What's the sicrit?

from nuked-sc55.

johnnovak avatar johnnovak commented on August 26, 2024

@johnnovak

I've tried shoving in a resampler but I can't seem to not mess up the thin balance between the audio thread and the work thread. What's the sicrit?

Haven't looked at the code, but most likely the way the threading is done is not great to begin with, then the extra overhead from the resampler might push it over the limit.

Make sure to use an efficient resampler. We use Speex all over the place in DOSBox Staging and there's threading involved etc. In our case, there's a render thread that gets MIDI messages and fills the buffer at whatever native rates, then the mixer and resampler is in another thread. That's what you want; don't overload the rendering thread even more.

from nuked-sc55.

Gerwin2k avatar Gerwin2k commented on August 26, 2024

I am finally listening to some reasonably good audio output. This made the difference:
//static const int audio_page_size = 512;
static const int audio_page_size = 2048;

from nuked-sc55.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.