First time here? Check out the FAQ!
x

What's the best way of filtering out mains / power line hum in kyma?

0 votes
1,105 views

To be clear I'm not trying to eleminate mains hum from my shoddy equipment. I'm deliberately using large coils of wire to pick up RF which by their very nature are going to pick up mains hum too. I'm interested in the frequencies near mains hum, but the hum itself is a bit tedious, so I want to filter it out.

(electricitree ->)



I tried creating a notch filter using a LowPass and HighPass filter in parallel and then scripted creating a set of these in series at odd harmonics of mains hum (here in the UK that's 50Hz, 150Hz, 250Hz, 350Hz). It kind of works but to get a reasonable notch I've used filters of order 20.

 

the script in case you're interested:

"Assemble a set of notch filters"
| input |

input := mic.

(1 to: 9 by: 2) do: [:i |
    input := notchFilter notchFrequency: (50 * i) Q: (!Q * 50 * (i sqrt)) filterOrder: 20 notchInput: input.
].

notchFilter start: 0 s.

 

I was imagining people would have come across this problem before and might have much better ideas?

 

Above is an image of normal mains hum (me sitting in a chair wired up to the sound card).

And above is the spectrum analysis taken at the same time. (The first peak is about 50Hz, the other big peak is around 250Hz).

...and here is the hum when hugging the tree. The tree acts as a big hum antenna. The signal looks a bit different from the pure hum inside the house.

 

 

asked Aug 2, 2018 in Using Kyma by alan-jackson (Virtuoso) (15,840 points)
edited Aug 6, 2018 by alan-jackson
Hi Alan,

Does the level of the hum change while you are interacting with the tree? If you record the input, in the recording, can you see the hum as a sine wave added to your signal?

You may want to make the 50 a variable in your Script since the mains frequency is not the same around the world (the USA is 60 hertz, for example).
... I've added a couple of oscilloscope traces to the original question. Yes the hum does change. If I'm not touching the tree the hum is quiet. As I hold the tree more firmly the hum gets louder.
for non realtime procssing i would use abdx. i use it on a daily basis for all kind of dehumming and it works great. its cheap and you can also batch prossess a whole folder… ace.  (they also offer a demo. )

1 Answer

0 votes
You may have luck using an FFT based noise reduction method, like the one implemented (albeit in Max) here: https://youtu.be/9gQAHf0Sf9I
answered Aug 11, 2018 by ghood (Master) (3,060 points)
Thanks for the suggestion.
...