DSPRelated.com
Forums

Frequency band-shifting via an FFT.

Started by Shafik August 12, 2005
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

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
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. �����������������������������������������������������������������������
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. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF so its to scramble the sound?
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. �����������������������������������������������������������������������
Hi!

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

Regards
--Himanshu

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. �����������������������������������������������������������������������
"Michel Rouzic" <Michel0528@yahoo.fr> wrote in message 
news:1123941173.953024.262550@o13g2000cwo.googlegroups.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?
Jon Harris wrote:
> "Michel Rouzic" <Michel0528@yahoo.fr> wrote in message > news:1123941173.953024.262550@o13g2000cwo.googlegroups.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. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
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