[sdiy] Frequency shifters, again

Czech Martin Martin.Czech at micronas.com
Mon Sep 29 11:54:08 CEST 2003


btw., in my vacation I finished a first version of a "digital" software
frequency shifter. (or , to be more exact: I completed a suite of little
number file (sequences) programs that can do most of the stuff
digital signal processing offers: generating waves, filtering (FIR and IIR),
convolution, creating filters, doing fft, multiplying, upsampling,
downsampling, etc. , etc).

I made some observations I'd like to discuss here and that could 
be interesting also for analog implementations.

Now I can use several of these programs to create a frequency
shifter which uses not the phase method of side band suppression,
but the older filter method. This is done with a script (UNIX)
or .bat file (DOS).

It works like this:

The soundfile (or sequence)with 44100kHz sampling rate is upsampled 3:1.
I.e. the internal sample rate is 132300 / s. This is the minimum rate
for this kind of approach.
Then it is modulated with 44100 kHz sine. Next a ~8000 coeffient FIR lp
filter will eliminate the upper sideband. The remaining lower sideband
is inaudibly high (starting at ~ 22050Hz and going up to ~44050 Hz).
I.e. input frequencies as low as 50Hz can be processed (this could
be scaled to 30Hz or 20Hz, as desired, but the FIR filter will get
longer. Speech starts with 100 Hz or so, same is true for other
input signals. Some signals will have considerable DC offset, or
low frequency rumble, it is a good idea to filter these artefacts
away, otherwise a modulator speakthrough will result (even with
perfect multipliers)).

The FIR filter was creating via a windowing approach with Dolph-Chebycheff
window. The results are not very much away from an optimum FIR filter,
and the Remez-Exchange-Optimizer software that I have will have troubles
with filters larger then 1000 or so.

Then the sideband can me mixed down with a variable frequency, this
will determine the final frequency shift.

Finally the base band is recovered via filtering and downsampling 3:1,
so we have a 44100 kHz audio file again.

Since the filters involved are linear phase FIR types and since
the unwanted sideband is suppressed with more then -100dB (before
converting the floats to integer values for the .wav file)
and since arbitrarily low frequency input signals can be processed
this software implemetation of a frequency shifter could be
called "ideal" or almost ideal. It just delivers a single sideband
signal with full audio bandwith, no carrier feedthrough, no
phase distortion, just some delay.

Now the observations:
-mixing the original signal with the shiftet signal will not give
 any interesting results. Only some amplitude modulation could be observed,
 no interesting phasing pattern.
-the results are not always clangorous or simply noises as one could think
-speech with some upshift is still understandable
-inverted speech (downshift) is sometimes understandable, in most of the
 cases not. You have the feeling that something is talking, but
 it is very strange

Music signals were not tested yet.
The absence of interesting phasing patterns makes me think
about the role of the "dome filter" in analog FS.
Does the pase shift which is created in that filter add
some effects to mixing sounds? 
If this is so (I think yes), a filter method SSB modulator
would perhaps be not so desireable for music purposes.

Next I will insert an allpass filter to create some phase shift
before downshifting.

And I will dig out all these barberpole phasing e-mails 
I couldn't read in the vacations (beeing in the moutains).


m.c.






More information about the Synth-diy mailing list