Pitch shifting question
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Pitch shifting question

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
H
Guest





Posted: Sat Dec 24, 2005 7:53 am    Post subject: Pitch shifting question Reply with quote

Hi.

I want to do some pitch shifting of some samples I have. I'm trying to
avoid the whole sample rate conversion problem. I can hack up the
hardware some.

Q: Can I just alter the clock and rate that I send data to my DAC
*WITHOUT* changing the anti-aliasing low-pass and accomplish my goal?

Thank you.
Henry.
Back to top
Jerry Avins
Guest





Posted: Sat Dec 24, 2005 9:16 am    Post subject: Re: Pitch shifting question Reply with quote

H wrote:
Quote:
Hi.

I want to do some pitch shifting of some samples I have. I'm trying to
avoid the whole sample rate conversion problem. I can hack up the
hardware some.

Q: Can I just alter the clock and rate that I send data to my DAC
*WITHOUT* changing the anti-aliasing low-pass and accomplish my goal?

A set of samples is very much like the wavy groove of a phonograph
record. Increasing the turntable speed is like increasing the sample
rate. Draw your own conclusions from that.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Back to top
H
Guest





Posted: Sun Dec 25, 2005 1:16 am    Post subject: Re: Pitch shifting question Reply with quote

Hi Jerry,

In article <q6WdnVYqN_AOXDHeRVn-oA@rcn.net>, jya@ieee.org says...
Quote:
H wrote:
Q: Can I just alter the clock and rate that I send data to my DAC
*WITHOUT* changing the anti-aliasing low-pass and accomplish my goal?

A set of samples is very much like the wavy groove of a phonograph
record. Increasing the turntable speed is like increasing the sample
rate. Draw your own conclusions from that.

Thank you for the analogy, but I'm still left scratching my head. I
know that altering the sample rate will shift the pitch, that makes
sense.

What I am unclear about is the anti-aliasing filter. The filter cut-off
is typically at fs/2, so now if the playback rate is altered, and it is
no longer at fs, won't that affect the quality of the pitch shift?

Henry.
Back to top
Jerry Avins
Guest





Posted: Sun Dec 25, 2005 8:26 am    Post subject: Re: Pitch shifting question Reply with quote

H wrote:
Quote:
Hi Jerry,

In article <q6WdnVYqN_AOXDHeRVn-oA@rcn.net>, jya@ieee.org says...

H wrote:

Q: Can I just alter the clock and rate that I send data to my DAC
*WITHOUT* changing the anti-aliasing low-pass and accomplish my goal?

A set of samples is very much like the wavy groove of a phonograph
record. Increasing the turntable speed is like increasing the sample
rate. Draw your own conclusions from that.


Thank you for the analogy, but I'm still left scratching my head. I
know that altering the sample rate will shift the pitch, that makes
sense.

What I am unclear about is the anti-aliasing filter. The filter cut-off
is typically at fs/2, so now if the playback rate is altered, and it is
no longer at fs, won't that affect the quality of the pitch shift?

fs *is* the sample frequency. When you change it, it changes. Do you
remember The Chipmunks? They made their recordings by singing slowly an
octave lower than the score, then playing back at double speed. That
restored both pitch and tempo, but doubled all the formant frequencies.
A low-pass filter of 5 KHz in the microphone would have permitted 10 KHz
in the released recording.

Clear as mud now?

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Back to top
Jerry Avins
Guest





Posted: Sun Dec 25, 2005 9:15 am    Post subject: Re: Pitch shifting question Reply with quote

H wrote:
Quote:
Hi Jerry,

In article <q6WdnVYqN_AOXDHeRVn-oA@rcn.net>, jya@ieee.org says...

H wrote:

Q: Can I just alter the clock and rate that I send data to my DAC
*WITHOUT* changing the anti-aliasing low-pass and accomplish my goal?

Changing the clock rate changes both the pitch and the signal duration.
Changing one without also changing the other is considerably more
complex. http://www.dspdimension.com/ has a tutorial and source code.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Back to top
John Herman
Guest





Posted: Sun Dec 25, 2005 9:15 am    Post subject: Re: Pitch shifting question Reply with quote

In article <MPG.1e177525e14c8af79897b7@news-server.san.rr.com>, H <user@user.user> wrote:
Quote:
Hi Jerry,

What I am unclear about is the anti-aliasing filter. The filter cut-off
is typically at fs/2, so now if the playback rate is altered, and it is
no longer at fs, won't that affect the quality of the pitch shift?

Henry.

The analog anti-aliasing filter cutoff is typically less than fs/2. The
system designer normally designates a frequency and below where the signal
aliased by the sampling must be attentuated by some amount that depends on the
requirements of the system. This determines the requirements for the
antialiasing filter. Typically, the range is fs/4 to fs/3 but higher
frequencies are possible. With brickwall filters, frequencies to 0.95 * fs/2
are available.
Back to top
NS
Guest





Posted: Mon Dec 26, 2005 9:15 am    Post subject: Re: Pitch shifting question Reply with quote

If you want to shift just the pitch of speech signals, while maintaining
all the rest unchanged (i.e. time, speed, formants etc.), then you need
to decompose speech into LPC & excitation, apply speech shifting to the
excitation, and synthesize back to generate the new speech.

For example if you wish to double the pitch, then you "squeeze" the
pitch periods (by downsampling for example) and double their number, on
the other hand if you want to halve the pitch then you "stretch" each
period twice as much (by upsampling for example) and halve the number of
periods.

These subjects are known as "time scaling" or "frequency scaling".

For more please refer to the excellent text:
"Speech coding and synthesis"
by W B Kleijn; K K Paliwal
Publisher: Amsterdam ; New York : Elsevier, 1995.
ISBN: 0444821694



H wrote:
Quote:
Hi.

I want to do some pitch shifting of some samples I have. I'm trying to
avoid the whole sample rate conversion problem. I can hack up the
hardware some.

Q: Can I just alter the clock and rate that I send data to my DAC
*WITHOUT* changing the anti-aliasing low-pass and accomplish my goal?

Thank you.
Henry.
Back to top
Vladimir Vassilevsky
Guest





Posted: Mon Dec 26, 2005 11:30 pm    Post subject: Re: Pitch shifting question Reply with quote

NS wrote:

Quote:
If you want to shift just the pitch of speech signals, while maintaining
all the rest unchanged (i.e. time, speed, formants etc.), then you need
to decompose speech into LPC & excitation, apply speech shifting to the
excitation, and synthesize back to generate the new speech.


This applies to the speech only. The more general method to make the
pitch or the speed change is by the use of a filterbank. The signal is
extrapolated by repetition or truncated separately in the each subband.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

http://www.abvolt.com
Back to top
NS
Guest





Posted: Tue Dec 27, 2005 12:12 am    Post subject: Re: Pitch shifting question Reply with quote

Quote:
NS wrote:

If you want to shift just the pitch of speech signals, while
maintaining all the rest unchanged (i.e. time, speed, formants etc.),
then you need to decompose speech into LPC & excitation, apply speech
shifting to the excitation, and synthesize back to generate the new
speech.


This applies to the speech only.

Not really, it applies to any signal that exhibits periodicity (and
spectral envelope), and provides the capability of time-varying tracking
of the signal's characteristics.

Quote:
The more general method to make the
pitch or the speed change is by the use of a filterbank. The signal is
extrapolated by repetition or truncated separately in the each subband.

That method is not "more general", rather than the versa. Unlike the
proposed method of LPC+excitation decomposition, the suggested
filter-bank method "discretizes" the spectrum into fixed bands and is
not optimized to the time-varying characteristics of the input signal.

Please refer to the suggested text to better understand the subject.

Thanks,
NS
Back to top
Vladimir Vassilevsky
Guest





Posted: Tue Dec 27, 2005 12:43 am    Post subject: Re: Pitch shifting question Reply with quote

Quote:
If you want to shift just the pitch of speech signals, while
maintaining all the rest unchanged (i.e. time, speed, formants etc.),
then you need to decompose speech into LPC & excitation, apply speech
shifting to the excitation, and synthesize back to generate the new
speech.

This applies to the speech only.


Not really, it applies to any signal that exhibits periodicity (and
spectral envelope), and provides the capability of time-varying tracking
of the signal's characteristics.

What if there is more then one source of the periodicity with the
different periods? What if no clear periodicity can be derived?
LPC + pitch assumes the human speech structure.

Quote:

The more general method to make the pitch or the speed change is by
the use of a filterbank. The signal is extrapolated by repetition or
truncated separately in the each subband.


That method is not "more general", rather than the versa. Unlike the
proposed method of LPC+excitation decomposition, the suggested
filter-bank method "discretizes" the spectrum into fixed bands and is
not optimized to the time-varying characteristics of the input signal.

Once there is no clear periodicity, then the only way to make the signal
"longer" or "shorter" is to extrapolate it by continuation of the
subframe (in the each band) or truncate it. The subband processing
moderates the edge effects and prevents the spillage of the
interpolation artifacts into the different subbands.


VLV
Back to top
Ron N.
Guest





Posted: Tue Dec 27, 2005 1:16 am    Post subject: Re: Pitch shifting question Reply with quote

Vladimir Vassilevsky wrote:
Quote:
If you want to shift just the pitch of speech signals, while
maintaining all the rest unchanged (i.e. time, speed, formants etc.),
then you need to decompose speech into LPC & excitation, apply speech
shifting to the excitation, and synthesize back to generate the new
speech.

This applies to the speech only.

Not really, it applies to any signal that exhibits periodicity (and
spectral envelope), and provides the capability of time-varying tracking
of the signal's characteristics.

What if there is more then one source of the periodicity with the
different periods? What if no clear periodicity can be derived?
LPC + pitch assumes the human speech structure.

The more general method to make the pitch or the speed change is by
the use of a filterbank. The signal is extrapolated by repetition or
truncated separately in the each subband.


That method is not "more general", rather than the versa. Unlike the
proposed method of LPC+excitation decomposition, the suggested
filter-bank method "discretizes" the spectrum into fixed bands and is
not optimized to the time-varying characteristics of the input signal.

Once there is no clear periodicity, then the only way to make the signal
"longer" or "shorter" is to extrapolate it by continuation of the
subframe (in the each band) or truncate it. The subband processing
moderates the edge effects and prevents the spillage of the
interpolation artifacts into the different subbands.

However, if there were multiple exciter sources with differing
periods and envelopes, would not mixing together those overtones,
which just happen to be contained in the same subband but result
from different exciters, result in some time domain spillage and
artifacts instead?


IMHO. YMMV.
--
rhn A.T nicholson d.O.t C-o-M
Back to top
NS
Guest





Posted: Tue Dec 27, 2005 1:16 am    Post subject: Re: Pitch shifting question Reply with quote

Quote:
If you want to shift just the pitch of speech signals, while
maintaining all the rest unchanged (i.e. time, speed, formants
etc.), then you need to decompose speech into LPC & excitation,
apply speech shifting to the excitation, and synthesize back to
generate the new speech.

This applies to the speech only.



Not really, it applies to any signal that exhibits periodicity (and
spectral envelope), and provides the capability of time-varying
tracking of the signal's characteristics.


What if there is more then one source of the periodicity with the
different periods? What if no clear periodicity can be derived?
LPC + pitch assumes the human speech structure.


The more general method to make the pitch or the speed change is by
the use of a filterbank. The signal is extrapolated by repetition or
truncated separately in the each subband.



That method is not "more general", rather than the versa. Unlike the
proposed method of LPC+excitation decomposition, the suggested
filter-bank method "discretizes" the spectrum into fixed bands and is
not optimized to the time-varying characteristics of the input signal.


Once there is no clear periodicity,

If there's no periodicity or at least pseudo periodicity, then there's
no "pitch" right? and the question was about pitch shifting wasn't it?

Quote:
then the only way to make the signal

Don't be so sure as "the only way", as there are several ways of doing
that, that may be very well the only way you happened to know...

Quote:
"longer" or "shorter" is to extrapolate it by continuation of the
subframe (in the each band) or truncate it. The subband processing
moderates the edge effects and prevents the spillage of the
interpolation artifacts into the different subbands.

Not really, one may take advantages of the temporal signal
characteristic, and the the corresponding perception properties of the
auditory system to such.

Subband is just one way, and certainly not the best way, of doing that.

NS
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB