[music-dsp] help

martial.berthod at labtronix.biz martial.berthod at labtronix.biz
Fri Jan 30 16:17:38 EST 2004


I'm new and my English is not very good but I'll try to do my best.

First I read a lot of post and it's very interesting. But some questions
came thought my head. Are the people who post the message works only on the
PC or on other platforms (I mean by this some microprocessor like
TMS320C6XXX DSP from TI). I don't want to bother them with my questions.

Second, I'm working on a MIDI sequencer and synthesizer, based on SoundFont
technologies. Do you think somebody is interesting in that kind of thing ?

Third , when I want to post a topic or reply to a message, which form my
mail must have ?

I want to post a topic and if everything is ok, post the following text:

Subject : Pitch-shifting and efficient algorithms

Hi everybody

I am a newbie but I have read a lot of post.
Ok this is my question now; stop me if I am going wrong: 

I am working on a DSP from TI (TMS320C6711 DSK). I'll try to implement a
MIDI synthesizer in it, based on SoundFont technologies (www.soundfont.com
<http://www.soundfont.com>  for details). I know this is a big enterprise
and I am not so far in the project. 

The thing that stops me is the pitch modification when (suppose this) you
receive a "note on" message. The sampling rate of the sample reference is
16KHz and the root key is C4. Therefore, you press the key near this one
like D4 and the scale tune is 100 cents. Forgot all others parameters for

If you want that your sample play like a D4, you can modify the sampling
rate, right?
This is here the problem. Modifying a sampling rate is not quiet difficult,
you can use this formula
Pitch_modification = 1200 log2 (f2/f1) where pitch_modification is in cents,
f1 is the actual sampling rate and f2 the desired sampling rate.

Like this, the proceed works well (I try it on MatLab) but the difficulties
is to adapt this new sampling rate with the output sampling rate of the
CODEC (in my case 48000Hz). To pass from 16KHz to 48KHz it's easy with a
small interpolate filter or even a linear interpolation but from 16951Hz to
48KHz in my example, it's not easy.

This is why I need some help to find the best way to compute the new sample
at the good sampling rate.
I found some documents on a phase vocoder, from the MatLab function, I
printed the "automatic technique in frequency..." from Jordi Bonada and some
other document on pitch shifting and things related. 

An other question, hardware this one, is somebody knows how a sample rate
converter is build inside a CODEC.

Thanks for your help


Martial Berthod
martial.berthod at labtronix.biz
trainee engineer
Labtronix R&D
Drummondville, Canada

More information about the music-dsp mailing list