Offline
Texas

Sort of on the heels of this post, silly me, I figured out the whole wave thing but now I've noticed that sounds from the GameBoy seem to have high pitched overtones I didn't notice before.

I didn't notice it at first until I made a simple sine wave for the WAVE channel in LSDJ. But after looking at that, I listened to the squares and they do the same thing too. So it sounds inherent to the GB - just trying to figure out where.

Is this something the Pro-Sound mod solves or am I just going to have to EQ things or run things through a slight low-pass filter?

Offline
matt's mind

if its the typical hum you are hearing, a lot of this comes from the amp inside the dmg.  the 'prosound' mod bypasses this circuitry, eliminating the hum caused by it.

so, if it is, yes.

but, since you are messing around in the wav channel and getting results you aren't too crazy about, its also worth checking to see which CPU # you've got.  2 & 3 are reported to have wav channel quality issues.  i'm not sure if anyone did any recordings or studies to verify this or not...

you can find the CPU # really easy by just taking the battery cover off, and peeking through the hole onto the circuit board.  its printed right there wink

Offline
Texas

It's not hum in this case, though I know what you are referring to there. It's more like an overtone than a hum - it can only be heard when playing a note. It's definitely more faint than the actual note itself and starts at 7-10kHz according to Ableton Live (using the EQ and spectrum analyzer). I was able to defeat most of it by setting up the 8-band EQ and using a roll-of at about 4kHz (haven't been able to setup a tight rolloff in Live...hurhmm).

I suspect you are right in that it has to do with the GB itself. I tried it on my DMG-CPU-02 and 06 units and they both produce the same high pitched results in this case. It affects the PW channels too so it's not the WAVE bug in this case. I haven't tried the noise channels but they are sort of a different animal I suspect.

I looked at the results of some of my NES recording and the high pitch rolloff is much steeper than I'm getting on my GB. I should probably post screenshots but it's a bit late over here so perhaps I will tomorrow if anyone wants to see the difference.

I assume it's just the nature of the beast but thought I would check to see if anyone else noticed it.

Offline

I'd like to see those screenshots.

Offline
San Francisco

send a raw recording and the screen shots to us so we can see what your talking about.

Offline
Texas

Here they are:

GameBoy, NES.

The NES actually goes up in to the higher frequencies than I thought, but tapers off nicely. The GB starts to taper off and then it just flattens out into the higher ranges. I think what I am hearing is probably more so those erratic spikes than the higher registers themselves perhaps.

Some of that, to me, looks like noise, so I'm hoping that perhaps the Pro-Sound mod can get rid of some of that. I suspect I will still have to EQ the GB to filter out those highs, though.

Offline
Europa surfing on the monolith

if you haven't pro-sound modded your game boys, they are going to be noisy as hell no matter what cpu you use (even after you pro-sound mod them, not all of the line noise will be gone regardless of weather you are battery powered or using an ac adapter), pro sound mod the game boys first ( I suggest internally as it only takes about 10 minutes if even that), game boy's are noisy creatures, you won't ever get a 100% clean signal out of them, its just not physically possible.

Offline
Texas

Curious as to if it has high pitch noise after the mod, but I guess only time will tell. If it does, I wonder if I can beat that with some filtering caps. I used larger than necessary input caps for my NES audio mod and I think that may be one reason why the high frequencies taper off a bit, though it's just a theory (I need to record it from the original line out and compare which I may try out tomorrow).

It's not an insurmountable problem, though one I can fix outside of my DAW's EQ would be preferable of course. That solution seems to work just fine, however, though it does cut some of the highs I actually want in the recording.

Offline
Unsubscribe

I wouldnt categorize it as noisy as hell. If you never owned a dmg, maybe buy a cheap one first to see what the hubbub is.

Offline
Brisbane, Australia

Dmgs have a bit of aliasing which may be what you're hearing, they also generate a certain amount of strange noises and artifacts simply because they use a cheap synthesizer/op amp. It's particularly noticeable on later models (pocket is one of the worst offenders imo) but there's not a lot that can be done in most cases, it's just a characteristic of the sound generator. Curious to see if pro sounding improves it at all.

Offline
Texas

It's interesting you mentioned that because I was coming up with the same conclusion (about aliasing). I found this while looking up the various different dithering mods used when downsampling and it turns out that the noise when opting not to use any dithering options is similar to the results I was getting from the DMG.

I'm not sure why though - there wouldn't be any reason for the DMG to increase the bit-depth of the original source but I do find it a bit suspicious. I assume the CPU itself is generating the tones and, if so, I don't think it can be easily avoided without using a lowpass filter (and thus reducing some of the highs you do want). If the DMG uses some sort of DAC though maybe there's a chance smile

I don't know enough about the DMG's audio pipeline to really say, though the down-sampling just wouldn't make any sense to me and is not something I noticed on the NES so *shrug*

Maybe it is just an interesting coincidence smile

EDIT: Actually in thinking about this more, vgx already mentioned the GB has some aliasing so that's probably what I am hearing. I'm not sure what causes that with the GB internally yet but that seems to be the likely candidate.

Last edited by m00dawg (Jun 29, 2011 1:00 pm)

Offline
Brisbane, Australia

Well basically it's a digital synthesizer, and one of digital's unfortunate characteristics is when it reaches a certain frequency, that is, the Nyquist frequency, the system can generate weird tones related to the original, otherwise known as aliasing. This particular frequency varies depending on the device, as an example you might have a sound card that says it has a sample rate of 44khz or something, half that (22khz) is the Nyquist. The only ways to overcome this are using extremely steep filters which is extremely expensive in the analogue domain, or raising the sample rate which is somewhat cheaper. For a mass produced 80s gaming device, neither option is particularly feasible, but it was also never intended to be used as a hi-fi playback device or a professional synthesiser. Additionally there's cheap components throughout the entire unit which aren't isolated from the audio components, so you get weird noises from the cpu, screen, even just electrical currents running through the unit, which all affect the sound in different ways.

Curious, is the power save option turned on in LSDJ? That can cause extra weird noises sometimes.

Anyway some of these things can be overcome via the pro sound mod but without redesigning the synthesiser and audio circuitry you can't get rid of all of it.

Offline
Sweden

Do game boys actually have a low enough sample frequency (except for the arbitrary waveform channel) to explain this problem? I assumed that it would be very high (likely beyond your soundcards). The SID, for example, operates at the master clock frequency (~1 MHz) using 24 bit phase accumulators for tone generation, and PSG chips are usually in the several hundred kHz range, right? A high operating frequency in general has very little to do with cost, and is not only feasible, but also very practical for these simple types of chips.

It seems more likely to me that the whine is a product of bus/screen noise.

EDIT: Does it sound the same when played straight through an amplifier? If you are using playing/recording through a computer I guess it might introduce some folding noise.

Last edited by boomlinde (Jul 4, 2011 10:37 am)

Offline
Texas

I have tried with the power save on and on auto. The actual audio has the noise characteristics so it seemed largely unaffected by that setting.

I'm playing this through a mixer, which also goes out to speakers, but also has a rec-out I use to capture the audio. The mixer, I'm sure, introduces some noise but the noise I am hearing definitely sounds like aliasing now that I've looked into it more - the mixer doesn't add that (I use it to record sources that don't have aliased noise).

From what I understand about the SID, it is a digitally-controlled analog synth at its heart. The precision is probably low, but I don't think it has the aliasing problem in the conventional sense. Plus it has analog filtering caps so I bet that may be helping there, in at least the cases where you have it on low or bandpass (I don't recall hearing any aliasing from the high-pass either though).

The SID is a noisy little beat, but it's mostly fuzzy noise, and that's noise I tend to like when talking about vintage gear. I'm not 100% sure about that, but I certainly haven't heard any aliasing with my MidiBox SID synths like I hear with the GameBoy.

vgx is probably on the money in regards to the aliasing going on. The characteristics of the spectrum graphs I have produced look strikingly similar to some of the ones I have seen when looking at discussions over downsampling (which causes aliasing).

I might build my own analog filter just for the GB at some point. In fact there's some neat work on the MidiBox side using SSM filters, though that's more than I need. I really just need a low-pass noise filter. I would imagine that isn't going to be terribly complex to build. For now, though, I'll likely do it in post since I have plenty of other things I still need to build (like an ArduinoBoy).

It's an interesting conversation for sure. Funny how I never noticed the aliasing when I was younger. Or maybe I did and just didn't know what it was wink

Offline
Sweden
m00dawg wrote:

I'm playing this through a mixer, which also goes out to speakers, but also has a rec-out I use to capture the audio. The mixer, I'm sure, introduces some noise but the noise I am hearing definitely sounds like aliasing now that I've looked into it more - the mixer doesn't add that (I use it to record sources that don't have aliased noise).

Ah, that rules that out then.

m00dawg wrote:

From what I understand about the SID, it is a digitally-controlled analog synth at its heart. The precision is probably low, but I don't think it has the aliasing problem in the conventional sense. Plus it has analog filtering caps so I bet that may be helping there, in at least the cases where you have it on low or bandpass (I don't recall hearing any aliasing from the high-pass either though).

Well, you're both right and wrong. The SID has three waveform generators and three envelope generators, all digital with each their own corresponding D/A (the waveform generators have D/As with 12 bit resolution, and the envelopes with 8-bit resolution). The envelopes amplify the waveform in the analog domain using a simple DCA circuit, and the filter circuitry is also analog.

The waveform generators, as I said, are essentially just 24 bit phase accumulators. Waveforms are not generated in the analog domain, nor do they use wavetables. They are simply derived digitally from the topmost 12 bits of the accumulator using some serious why-didn't-I-think-of-that digital circuitry. This also means that you get very high precision frequency control and bit depth, especially compared to other sound chips of the time. It's by the nature of the design that audible folding and other artifacts inherent to sampled sound simply won't happen. It will always output the waveforms with phase length at even divisors of the sample frequency, and the highest tone frequency is 1/256 of the "sample" frequency -- well below the nyquist frequency and then some, for the harmonics. smile

m00dawg wrote:

vgx is probably on the money in regards to the aliasing going on. The characteristics of the spectrum graphs I have produced look strikingly similar to some of the ones I have seen when looking at discussions over downsampling (which causes aliasing).

I still very much doubt it, and I brought out my Game Boy to try it just now. I can tell you right off the bat that my listening conditions aren't the best, but I can't hear _any_ folding or post-nyquist frequency mumbo-jumbo. The harmonics of the square wave, although harsh, are very clear and seem undistorted. The oscillator also sweeps up well into the ultrasound range without any of the folding noise I'd typically identify as an effect of aliasing.

What I can hear, though, is some constant high pitched bus whine, and also some lower frequency zipping noise when using an envelope. The latter noise has some high frequency content, too, which is very obvious and quite annoying. Maybe this is what you are hearing?

Last edited by boomlinde (Jul 4, 2011 6:35 pm)

Offline
Europa surfing on the monolith

I think you're just going to have to face it man, you are never going to get a 100% no artifact, clean signal from a game boy, this is just going in circles at this point, ask anybody on here or 8bc about it that has been using one for a while now to make music, you can build your filters and I encourage you too, but honestly, if you are recording into a daw with a game boy, just put a noise gate on it and adjust the threshold accordingly to the more quiet parts of your tune, this is probably the only way you are going to achieve what you are after (and likewise in a live setting as well), there is a certain amount of noise you are just going to have to live with tracking on a game boy (if the game boy is stopped for example, there will be some noise coming from it from the internal circuitry alone, pro-sound knocks this down a little bit, but its still present regardless) , I've been an audio engineer for 16 years now, I just don't see an analog filter solving what you are describing, but by all means, Feel free to reverse engineer the game boy however you see fit.