From: Jerry Avins on
On 8/8/2010 2:56 AM, Erik de Castro Lopo wrote:
> jungledmnc wrote:
>
>> I want to create a frequency shifter for audio.
>
> Are you sure you want a frequency shifter and not a pitch shifter?
> Pitch shifers are much more commonly used for audio than frequency
> shifters.
>
> Pitch shifters do:
>
> for all Fin : Fout = Fin * a
>
> which preserves the relationship between harmonics of a single note.
>
> Frequency shifters do:
>
> for all Fin : Fout = Fin + a
>
> which might be useful when used subtly for an audio effect, but will
> not give you what you want if what you want is a pitch shifter.

In the 1950s, pitch shifting seemed out of the question. Frequency
shifting by less than 5 Hz doesn't mess up voice much. Try bringing in a
SSB signal using the BFO. There's a wide range that sounds "natural" if
you're not familiar with the speaker's true voice.

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
From: jungledmnc on
>On Aug 7, 8:24=A0pm, "jungledmnc" <jungledmnc(a)n_o_s_p_a_m.gmail.com>
>wrote:
>> I take it there is no simple way to compute the
>> allpass coefficients, except for brute-force search. So I did it.
>
>exactly what? how did you search for your optimal coefs and what did
>you get?
>
>> I wrote a
>> simple app, which searches for requested number of allpass sections
>> evaluating results like this:
>>
>> H1 =3D Hallpass_A1(z) * Hallpass_A2(z) * ..
>> H2 =3D Hallpass_B1(z) * Hallpass_B2(z) * ..
>> where everything is complex. |H1| =3D |H2| =3D 1 as expected.
>>
>> Finally phase1 =3D atan2(H1.R, H1.I) + PI/2, phase2 =3D atan2(H2.R,
H2.I)
>> Difference =3D phase1 - phase2, and some wrapping.
>> Difference should be as close to 0 as possible.
>
>difference should be close to 0 or close to pi/2?

The PI/2 was added to phase 1 (above).
I did it simply by random walk :) - random parameters repeately until it
finds some "a little good" solution, then moving the parameters randomly a
little searching for better solution.

The question is more like, if I multiply the H(z) of each stage and take
it's phase, should it represent the resulting phase shift? Or could there
be a problem with the measurement by taking an impulse and FFTing the
output?
From: jungledmnc on
Damn it, sorry for my last post, it was a bug, I accidentally added a 1
sample delay to one channel... Such a stupid mistake...
From: Vladimir Vassilevsky on


jungledmnc wrote:
> Damn it, sorry for my last post, it was a bug, I accidentally added a 1
> sample delay to one channel... Such a stupid mistake...

Jungledmnc,

It is pleasure to see a person who is able to understand the problem and
solve this problem, although not in a very elegant way, but quickly,
efficiently and entirely by himself. Good luck with your audio work.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
From: Angelito Hamm on
On Aug 6, 5:33 pm, "jungledmnc" <jungledmnc(a)n_o_s_p_a_m.gmail.com>
wrote:
> Hi,
> I want to create a frequency shifter for audio. First I need to get an
> analytical signal via a hilbert transformer. I started by checking out how
> long the Hilbert FIR would be. Unfortunately I ended with 20ms, which seems
> to be related to -3dB at 50Hz (1/0.02). Isn't there another way to do that?
> I mean 20ms is a relatively long delay for realtime processing and also 800
> taps would need relatively lots of CPU power.
>
> Thanks.

A detailed description of the pole-zero rotation approach to analytic
signal generation using IIR described by Dr. Brackett in this thread

http://groups.google.com/group/comp.dsp/msg/08d2545fde320d54?dmode=source

is published in

Vanbeylen, L. Schoukens, J.
"Comparison of Filter Design Methods to generate Analytic Signals"
Instrumentation and Measurement Technology Conference, 2006. IMTC
2006. Proceedings of the IEEE
24-27 April 2006
pp. 883 - 887