# Reducing one frequency in song

How would I take a song input and output the same song without certain frequency ranges?

Based on my research so far, the song should be broken down into chucks, FFT it, reduce the target frequency ranges, iFFT it, and stitch the chunks back together. However, I am unsure if this is the right approach to take, and if so, how I would convert from the audio to FFT input (what seems to be a vector matrix), how to reduce the target frequency ranges, and how to convert back from the FFT output to audio, and how to restitch.

So far, I've understood the basic premise of fft (through basic 3blue1brown yt videos and the like) and that it is available through scipy/numpi, and figured out how to convert from youtube to 0.25 second chunks in a wav format. I've tried googling the problem, but while many people say it's trivial, I cannot find an explanation with psudocode or actual code.

For background, my grandpa loves music. However, recently he cannot listen to it, as he has become hypersensitive to certain frequency ranges within songs. I'm a high school student who has some background coding, and am just getting into algorithmic work and thus have very little experience using these algorithms. Please excuse me if these are basic questions; any pointers would be helpful.

• "without certain frequencies: I hope you mean frequency ranges; otherwise, the difference will be in the mathematical sense of the word be inmeasurable for non-line spectra signals like songs (which are finite and hence can't have line spectra). Feb 19, 2020 at 19:32
• Does this answer your question? Why is it a bad idea to filter by zeroing out FFT bins? Feb 19, 2020 at 19:33
• However, please read the above answer. Filtering through zeroing or directly scaling single FFT bins is never a good idea. You simply need to use a filter bank. On your good ole Hifi stereo, that thing is called an "equalizer". Feb 19, 2020 at 19:34
• @MarcusMüller Ah, yes. My bad, I meant to say frequency ranges. I have edited the post accordingly Feb 19, 2020 at 19:34
• @vvm32812: It is relevant, since you can apply the filtering in real-time either on the playback device or speaker system.
– jojeck
Feb 20, 2020 at 11:54

Zeroing out bins / attenuating them in discrete Fourier domain is universally a bad idea, due to the undesirable time-domain effects of that.

Instead, use a audio processing program to apply an adjustable equalizer to the song of choice. Let's walk you through Free software:

• Get audacity;