How to get rid of mains (?) hum?
Sunday, July 9th, 2006 03:41 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I've had the intention for a while of transferring all the music I have for my Hybrid Music System to epicyclic, and then burn it to CD-ROM, before the hardware it runs on (1987-vintage BBC Master and 1986-vintage Music 500) complete packs up. A year ago I had an attempt, but ran into problems with what I thought was mains hum.
compilerbitch suggested plugging everything into the same mains socket, so, finally having got around to moving the pedestal housing my stereo, CD player and Beeb across the room (and getting and tacking down longer speaker wire so I could connect the first of these back to the speakers on the side they had come from), I tried this out... and found the situation unimproved. My father suggested cutting the earth contacts on the Music 500 output, as I'd probably got a mains hum loop, but that made no difference either.
The funny thing is that when I simply play the Music 500 through epicyclic, it plays fine (there's a small amount of background noise, about as much as a computer fan); it's only when I try and capture the sound to record it (using Audacity) that the bad noise turns up (71k MP3). I've tried various techniques on Audacity for getting rid of it, but they always result in a degradation of the sound quality (60k MP3); better would be to eliminate the noise from the input. Anybody got any idea why I only get it when I try to capture the audio?
(Also, when I tweak the Alsa volume controls, there's a master control for playback; there's also a PCM one, and increasing that increases the noise dramatically. Increasing the line-in control also increases the noise when listening to straight play-through, but I've a feeling Audacity bypasses this.)
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
The funny thing is that when I simply play the Music 500 through epicyclic, it plays fine (there's a small amount of background noise, about as much as a computer fan); it's only when I try and capture the sound to record it (using Audacity) that the bad noise turns up (71k MP3). I've tried various techniques on Audacity for getting rid of it, but they always result in a degradation of the sound quality (60k MP3); better would be to eliminate the noise from the input. Anybody got any idea why I only get it when I try to capture the audio?
(Also, when I tweak the Alsa volume controls, there's a master control for playback; there's also a PCM one, and increasing that increases the noise dramatically. Increasing the line-in control also increases the noise when listening to straight play-through, but I've a feeling Audacity bypasses this.)
no subject
Date: 2006-07-09 06:55 pm (UTC)no subject
Date: 2006-07-09 07:00 pm (UTC)Ah, I think I know what it probably is. The old Yamaha DX7 keyboard synthesizer used to have a similar problem.
Basically, the Music 500 has a very primitive DAC, which doesn't cut off at 20KHz. Most likely, it is giving you a spray of high harmonics that are aliasing against the sample rate of the ADC in your sound card (which itself probably doesn't have a very good low pass filter). Playing the same sound through your sound card won't cause the problem, because the audio is mixed in analogue form so the ADC doesn't play any part.
Try stringing one or more ferrite beads on the audio cable, or using a ferrite ring and winding the cable through it a few times. It's a bit of a crude solution, but it often works wonders in these cases.
(listens to mp3 to check)
Yes, that's definitely it. What you have there is definitely NOT hum, it's aliasing noise.
no subject
Date: 2006-07-09 07:36 pm (UTC)no subject
Date: 2006-07-09 11:07 pm (UTC)(looks)
http://www.maplin.co.uk/Module.aspx?ModuleNo=32792&criteria=ferrite&doy=10m7
Any of these might do it. Maybe get one or two of the smaller ones and a large ring as a just-in-case, last ditch alternative? Basically, if just threading the wire through the ring/bead isn't enough, you just loop it through several times (or lots of times!) until you get enough attenuation. It shouldn't take *that* much.
If this doesn't sort it, then heavier guns may be necessary (e.g. an LC filter network or some such), but I doubt you'll need that.
no subject
Date: 2006-07-24 08:51 pm (UTC)I passed the wire through the ring twice, which was as much as the ring's diameter allowed for, and, well, it's a bit better (http://www.michael-grant.me.uk/images/ljtrivia/ferrite.mp3) (compare to the previous sample (http://www.michael-grant.me.uk/images/ljtrivia/raw.mp3)), but not all that much (and that may possibly be due to my volume settings on epicyclic...?).
Reckon a larger ferrite ring would help?
One of the other adapters I asked my father for is one to allow me to output from my stereo's headphone socket (it doesn't have any line-out) into my computer. I thought if I took advantage of my stereo's amplifier, I'd have less background noise, but if the problem's aliasing, that's probably not going to help...
no subject
Date: 2006-07-24 11:07 pm (UTC)no subject
Date: 2006-07-24 11:07 pm (UTC)no subject
Date: 2006-07-24 11:06 pm (UTC)If none of the easy answers work, I could probably come up with a small circuit that you could build on a bit of Veroboard that would fix the problem.
no subject
Date: 2006-09-27 10:15 am (UTC)My father suggested checking I hadn't got an earth braid strand touching the centre pole of my phono sockets. Investigating, I was able to reduce the noise a bit twiddling the leads, but then managed to break both wires in both plugs. (I'm pretty useless with my hands, really, and am green with motor control envy at this (http://www.michael-grant.me.uk/images/ljtrivia/clapton2.mp3) (seen via
I then tried playing via the stereo, but that gave me hum (http://www.michael-grant.me.uk/images/ljtrivia/hum.mp3) when not playing from the Music 500 at all! I was also getting distortion in the sound, same as for the Music 500.
At this point, it occurred to me that the common factor was that I was still my father's phono-to-jack converter; so I unplugged that and switched to lead he sent me for going through the stereo, and, hey presto, most of the noise and distortion disappeared, though not all of it (http://www.michael-grant.me.uk/images/ljtrivia/clapton2.mp3) (sample recorded off CD via my stereo). (Part of the problem was also that the half the shielding was missing from the old DIN plug.)
There was then a pause whilst my father knocked together a DIN-to-jack converter, and another pause whilst he knocked together another one after the first one went missing in the post. *gnash*
Finally, I got to try it out today, and it's sadly still distorted (http://www.michael-grant.me.uk/images/ljtrivia/sab.mp3) (though not as bad as before). (The lead is looped twice (in opposite directions) through the ferrite ring; unfortunately with the new wire I can't at present try going through the stereo as I've only one small-to-large jack converter.)
Any suggestions leap out at you from the latest samples, from your sound engineer experience? :o)
no subject
Date: 2006-09-29 01:42 pm (UTC)So, where do I go from here? Would adding a third ferrite ring help, do you think, or is it take for that low pass filter you suggested above?
no subject
Date: 2006-09-29 03:44 pm (UTC)no subject
Date: 2006-09-29 04:11 pm (UTC)Note: the main chip is a Linear Technology 1562 (you may see it in catalogues as an LT1562) -- it seems to be possible to order them online from http://www.linear.com/ directly. The opamp on the output is any generic audio opamp you might want to use, it's not critical. Whatever Maplin has in a blister pack is probably fine.
This is the frequency response. It's typical of an elliptical filter, having a few downward spikes in the stop band, but this shouldn't worry you. It should be at -70db at the Nyquist limit, so it'll do your job I think.
no subject
Date: 2006-09-29 04:16 pm (UTC)no subject
Date: 2006-12-10 02:10 pm (UTC)I suspect there's more to it than that—I get an almost clean signal at 32 kHz, but an aliased one at 44.1 kHz—but if the hat fits*...
* As yet, only proven for ten second clips of three tracks; but hopefully it'll extend to the lot.
Thanks for all your help anyway; it was interesting learning about what they did inside the box, and if I hadn't had you to tell me I was listening to aliasing noise rather than mains hum, I might still be at square one on this.
no subject
Date: 2006-12-10 07:53 pm (UTC)The funny thing is I found a blog (http://blog.joel.co.uk/index.php?itemid=157) whose owner talks about having converted his Music 5000 tracks to MP3s, but didn't mention any problems in so doing. Sadly, he hasn't replied to my question yet. Possibly the situation with the Music 5000 isn't as bad as with the earlier Music 500.
no subject
Date: 2006-09-29 04:31 pm (UTC)You'd have thought, staring down the muzzle of the twenty-first century and with digital media already on the scene, it might have occurred to someone that people were going to want to do an ADC on the output, but evidently not... or perhaps they were argued down on grounds of adding to the cost.
I think you may need to go the heavy weapons route for this one, and use a bit of active electronics.
Thanks. I'm absolutely hopeless with my hands—it took me hours to solder the phono plugs back onto their wires after removing them to thread the wires through the ferrite ring, and even then I didn't do a good job, which is why I ended up having to meddle with it again afterwards—but I'll see if I can prevail upon my dad to do it for me, in exchange for CDs of all my AMPLE albums once the job's done. (I can run off copies for you too, if you'd like.)
Thanks once again for all your work and time on this.
all-embracing
Date: 2011-08-08 06:37 pm (UTC)