PDA

View Full Version : Frequency band-shifting via an FFT.


Shafik
08-12-2005, 09:02 PM
Hello,

What is the proper way, using an FFT, to shift a band of frequencies
up or down?


For example, supposed I have a voice signal between 300-3000Hz. I want
to shift the 1000-2000 band into the 2000-3000 region (and vice versa).
Is this doable with an FFT by any chance?

Thanks,
--Shafik

Michel Rouzic
08-12-2005, 10:08 PM
i'm only a beginner here, but i think i can reply to that. If you
perform a FFT on the input signal, and let's say you want to exchange
the 1000-2000 Hz band with the 2000-3000 Hz, what you would have to do
is move the part that matches to those bands on the FFTed signal to
their new location (just like cutting pasting another place).

But beware, if you do it as simple as that, you might observe artifacts
matching to 1000 Hz, 2000 Hz or 3000 Hz if you cut your bands sharply.
To avoid this, you should make sure the edges of the bands are kind of
sloppy, like by making the first and last few samples of each band fade
in and fade out (i hope i'm making myself clear enough). however, i
don't see what's the interest doing this, but this is your problem

Shafik wrote:
> Hello,
>
> What is the proper way, using an FFT, to shift a band of frequencies
> up or down?
>
>
> For example, supposed I have a voice signal between 300-3000Hz. I want
> to shift the 1000-2000 band into the 2000-3000 region (and vice versa).
> Is this doable with an FFT by any chance?
>
> Thanks,
> --Shafik

Jerry Avins
08-12-2005, 11:12 PM
Michel Rouzic wrote:
> i'm only a beginner here, but i think i can reply to that. If you
> perform a FFT on the input signal, and let's say you want to exchange
> the 1000-2000 Hz band with the 2000-3000 Hz, what you would have to do
> is move the part that matches to those bands on the FFTed signal to
> their new location (just like cutting pasting another place).
>
> But beware, if you do it as simple as that, you might observe artifacts
> matching to 1000 Hz, 2000 Hz or 3000 Hz if you cut your bands sharply.
> To avoid this, you should make sure the edges of the bands are kind of
> sloppy, like by making the first and last few samples of each band fade
> in and fade out (i hope i'm making myself clear enough). however, i
> don't see what's the interest doing this, but this is your problem

Analog scrambler telephones used to work that way

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Michel Rouzic
08-13-2005, 02:52 PM
Jerry Avins wrote:
> Michel Rouzic wrote:
> > i'm only a beginner here, but i think i can reply to that. If you
> > perform a FFT on the input signal, and let's say you want to exchange
> > the 1000-2000 Hz band with the 2000-3000 Hz, what you would have to do
> > is move the part that matches to those bands on the FFTed signal to
> > their new location (just like cutting pasting another place).
> >
> > But beware, if you do it as simple as that, you might observe artifacts
> > matching to 1000 Hz, 2000 Hz or 3000 Hz if you cut your bands sharply.
> > To avoid this, you should make sure the edges of the bands are kind of
> > sloppy, like by making the first and last few samples of each band fade
> > in and fade out (i hope i'm making myself clear enough). however, i
> > don't see what's the interest doing this, but this is your problem
>
> Analog scrambler telephones used to work that way
>
> Jerry
> --
> Engineering is the art of making what you want from things you can get.
> ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

so its to scramble the sound?

Jerry Avins
08-13-2005, 03:39 PM
Michel Rouzic wrote:
> Jerry Avins wrote:
>
>>Michel Rouzic wrote:
>>
>>>i'm only a beginner here, but i think i can reply to that. If you
>>>perform a FFT on the input signal, and let's say you want to exchange
>>>the 1000-2000 Hz band with the 2000-3000 Hz, what you would have to do
>>>is move the part that matches to those bands on the FFTed signal to
>>>their new location (just like cutting pasting another place).
>>>
>>>But beware, if you do it as simple as that, you might observe artifacts
>>>matching to 1000 Hz, 2000 Hz or 3000 Hz if you cut your bands sharply.
>>>To avoid this, you should make sure the edges of the bands are kind of
>>>sloppy, like by making the first and last few samples of each band fade
>>>in and fade out (i hope i'm making myself clear enough). however, i
>>>don't see what's the interest doing this, but this is your problem
>>
>>Analog scrambler telephones used to work that way
>>
>>Jerry
>>--
>>Engineering is the art of making what you want from things you can get.
>>ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
>
>
> so its to scramble the sound?

It can be. If the speech band is broken into several sub bands which are
then permuted and/or inverted, some being shifted up, others down so the
recombined signal occupies the same bandwidth as the original, that
pretty well encrypts anything said on the channel. Undoing the shifts
and inversions on the other end) restores intelligibility.

I don't know that an FFT is the way to do this, and the encryption is
not particularly robust as I described it. Using a recording of a fairly
long conversation, one can decrypt the audio if the channel isn't flat.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Himanshu
08-13-2005, 04:30 PM
Hi!

Sorry if I am wrong but isn't this like pitch shifting?

Regards
--Himanshu

Jerry Avins
08-13-2005, 04:53 PM
Himanshu wrote:
> Hi!
>
> Sorry if I am wrong but isn't this like pitch shifting?
>
> Regards
> --Himanshu

No. Pitch shifting preserves harmonic relationships. This is just
frequency shifting -- that's much easier.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Jon Harris
08-13-2005, 05:54 PM
"Michel Rouzic" <[email protected]> wrote in message
news:[email protected] oups.com...

Jerry Avins wrote:
> Michel Rouzic wrote:
> > i'm only a beginner here, but i think i can reply to that. If you
> > perform a FFT on the input signal, and let's say you want to exchange
> > the 1000-2000 Hz band with the 2000-3000 Hz, what you would have to do
> > is move the part that matches to those bands on the FFTed signal to
> > their new location (just like cutting pasting another place).
> >
> > But beware, if you do it as simple as that, you might observe artifacts
> > matching to 1000 Hz, 2000 Hz or 3000 Hz if you cut your bands sharply.
> > To avoid this, you should make sure the edges of the bands are kind of
> > sloppy, like by making the first and last few samples of each band fade
> > in and fade out (i hope i'm making myself clear enough). however, i
> > don't see what's the interest doing this, but this is your problem
>
> Analog scrambler telephones used to work that way

How did those analog phones do the FFT? :-)

I'm assuming you mean they frequency shifting, although not via FFT. Some type
of band-pass filtering + modulation?

Jerry Avins
08-13-2005, 06:36 PM
Jon Harris wrote:
> "Michel Rouzic" <[email protected]> wrote in message
> news:[email protected] oups.com...
>
> Jerry Avins wrote:
>
>>Michel Rouzic wrote:
>>
>>>i'm only a beginner here, but i think i can reply to that. If you
>>>perform a FFT on the input signal, and let's say you want to exchange
>>>the 1000-2000 Hz band with the 2000-3000 Hz, what you would have to do
>>>is move the part that matches to those bands on the FFTed signal to
>>>their new location (just like cutting pasting another place).
>>>
>>>But beware, if you do it as simple as that, you might observe artifacts
>>>matching to 1000 Hz, 2000 Hz or 3000 Hz if you cut your bands sharply.
>>>To avoid this, you should make sure the edges of the bands are kind of
>>>sloppy, like by making the first and last few samples of each band fade
>>>in and fade out (i hope i'm making myself clear enough). however, i
>>>don't see what's the interest doing this, but this is your problem
>>
>>Analog scrambler telephones used to work that way
>
>
> How did those analog phones do the FFT? :-)
>
> I'm assuming you mean they frequency shifting, although not via FFT. Some type
> of band-pass filtering + modulation?

Right all around.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Shafik
08-15-2005, 07:55 AM
Interesting...you'd think the FFT would be a nice way to shift
frequency bands. Using some "continuous" technique like overlap-save or
overlap-add.

Any thoughts?

--Shafik