Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to shift entire audiofile by 24kHz (Read 860 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to shift entire audiofile by 24kHz

Hi all,

I like to shift the whole audioband by 24kHz.
e.g. 20Hz will be 24020 Hz, 1000Hz will be 25000Hz etc.

My point is to shift a whole audioband 0-24kHz to 24kHz-48kHz. (0-24kHz will be silent and the music is at 24kHz-48kHz).

How to manage this? SoX? Any other tool?

Best,
.halverhahn
.halverhahn

Re: How to shift entire audiofile by 24kHz

Reply #1
Generally, no.   A "linear" frequency shift is multiplication (re-sampling) which means if 24020Hz is doubled to 44,100Hz then 20Hz is doubled to 40Hz.

It could probably be done using FFT (actually DFT) and writing a custom program, or with MATLAB, etc.

Re: How to shift entire audiofile by 24kHz

Reply #2
Do a sample by sample multiplication with cos(2*pi*24000*t). 

The sampling rate must be at least 2x the highest frequency present after the multiplication, so be sure to resample first.  96k is a good choice for normal audio.

Re: How to shift entire audiofile by 24kHz

Reply #3
MusicScope has Frequency Translation tool but it works the other way around - it lets you shift a band of high frequencies to 0-X kHz.

Re: How to shift entire audiofile by 24kHz

Reply #4
Do a sample by sample multiplication with cos(2*pi*24000*t). 

The sampling rate must be at least 2x the highest frequency present after the multiplication, so be sure to resample first.  96k is a good choice for normal audio.
It would be good to mention that a high pass filter with a passband of 24kHz and above is necessary after this procedure. Also, this method doesn't work when the bandwidth of the shifted signal and that of the original signal have a common frequency band.

A more general way of doing this would be using the Short Time Fourier Transform with overlapping, moving the audioband frequency coefficients to the desired band, and then IDFT-ing them and adding them back together. Like DVDdoug said, it can be done by writing a program.

Re: How to shift entire audiofile by 24kHz

Reply #5
You would think this should be easy operation :)
Error 404; signature server not available.

Re: How to shift entire audiofile by 24kHz

Reply #6
Hi, back in analogue times this was done with a frequency mixer.
Maybe you can simulate a ring modulator by software?

Re: How to shift entire audiofile by 24kHz

Reply #7
Quote
You would think this should be easy operation
I think it's the nature of frequency....  cycles per second.  There's a numerator and denominator.

I was trying to think of an analogy...  Imagine you have two cars going-around a race track.   One makes 100 laps per minute and the other 200 laps per minute.    If we make the track shorter (or speed-up the film) so the 1st one makes 101 laps, now the faster one now makes 202 laps, not 201 laps.  

Re: How to shift entire audiofile by 24kHz

Reply #8
Hi, back in analogue times this was done with a frequency mixer.
Maybe you can simulate a ring modulator by software?

The term is frequency shifter - which is different from, but sometimes confused with a pitch shifter. It is related to a ring mod. A ring mod produces both sum and difference frequencies and suppresses the original signal whereas a frequency shifter breaks the sum frequencies and difference frequencies out separately.

Re: How to shift entire audiofile by 24kHz

Reply #9
It's actually quite a transformation, kinda like mapping a sphere to a part of a bigger sphere's surface... You squeeze inherently exponential frequency domain into more linear scale... If you could hear such processed audio, it would be all altered and detuned.



 
SimplePortal 1.0.0 RC1 © 2008-2021