Skip to main content
Topic: Pitch Shifter (Transposer) (Read 25936 times) previous topic - next topic

Pitch Shifter (Transposer)

Hi,

in this project, I used a PIC24FJ to sample the audio signal at a variable sample rate into a small ring-buffer worth about 20 ms of sounddata. Playback is done at a fixed rate yielding the transposed pitch.

A video of the board in action is available here:
    http://www.youtube.com/watch?v=_KwS2qCCGzs

A quick hand drawn schematic and the firmware is attached.

Re: Pitch Shifter (Transposer)

Reply #1
this is awesome, i have been thinking about using a dspic for a small effects processor, any idea how much this taxes the pic24?

Re: Pitch Shifter (Transposer)

Reply #2
Yes.  The PIC24F is clocked at 32 MHz/16 MIPS.  The output-ISR runs at 62.5 kHz (this gives nice 8 bit PWM resolution), the input-ISR depending on the selected pitch at 31.25 kHz - 125 kHz.  With this configuration the pitch-down case is more expensive and the input-ISR causes quite some jitter on the output-ISR.  Under this worst-case condition, the PIC24F has not much time left in the main loop.  However, the firmware was written in a hurry and the algorithem can probably be refined a bit.  However, for this simple task there is no need to use a dsPIC or PIC24H.

Re: Pitch Shifter (Transposer)

Reply #3
Hi Markus,
I am investigating for some time whether the 24HJ or dspic33 could be used as a I/Q SSB, AM, CW demodulator for a SDR radio (+/- 24 or 48kHz I an Q analog signals, 12bit ADC) or not. My dspic33 runs 55Mips stable and pic24HJ 50Mips stable. Any experience with that? Miro

Re: Pitch Shifter (Transposer)

Reply #4
No, never done something in this field.

Re: Pitch Shifter (Transposer)

Reply #5
[quote author="miro"]I am investigating for some time whether the 24HJ or dspic33 could be used as a I/Q SSB, AM, CW demodulator for a SDR radio (+/- 24 or 48kHz I an Q analog signals, 12bit ADC) or not. My dspic33 runs 55Mips stable and pic24HJ 50Mips stable. Any experience with that? Miro[/quote]

i am interested in sdr too, if you start a new thread on that topic i jump in too.

i have been looking into the g59 by gennisis radio http://http://www.genesisradio.com.au/ and am not convinced that this is an ideal situation for myself.

Re: Pitch Shifter (Transposer)

Reply #6
Could you describe theory of operation a bit? I still don't quite follow but I'm very interested.


Re: Pitch Shifter (Transposer)

Reply #8
The attached pictures show the backside of the board, the battery holder and the foam rubber which lies between them.  The interconnections are done using some insulated wire from an old relais, which is currently my preferred prototyping method.

Re: Pitch Shifter (Transposer)

Reply #9
@sqkybeaver: not sure the sdr topic is of general interest here at DP.. I've built few softrock radios (rx) which are very simple and good performer (http://www.wb5rvz.com/sdr/). They have an analog output (I/Q) which needs to be fed into a stereo sound card. I guess an overclocked dspic33 might have enough power to demodulate the SSB without need of a PC. M.

Re: Pitch Shifter (Transposer)

Reply #10
Hi, I'm just a newbie at this stuff. I understand the schematics of this project but I don't know how to install the firmware for the ICs. Could anyone point me how I might do this with this chip set and code? What gear I'll need and software? I've been looking all over for a project like this and I'm excited about the learning curve. Thanks for the help!

Re: Pitch Shifter (Transposer)

Reply #11
[quote author="tuffstuff"]Hi, I'm just a newbie at this stuff. I understand the schematics of this project but I don't know how to install the firmware for the ICs. Could anyone point me how I might do this with this chip set and code? What gear I'll need and software? I've been looking all over for a project like this and I'm excited about the learning curve. Thanks for the help![/quote]

at the very least you will need a pickit2, however i suggest getting a pickit3, microchip has video tutorials they should cover the basics.

this however is a very basic circuit. and can be built using veraboard or simple proto-board.

Re: Pitch Shifter (Transposer)

Reply #12
@Markus - I know this is an old thread, but how do you remove the enamel from the wire you're using for prototyping? I bought some 'enameled wire', but it is a pain to remove the coating. I tried a knife to scrape it off, and also a bit of sand paper.
Got a question? Please ask in the forum for the fastest answers.

Re: Pitch Shifter (Transposer)

Reply #13
I melt it away.  Place a small droplet of solder to the tip of the soldering iron and move the transformer wire slowly into the droplet.  Repeat this until 1 to 2 mm of the wire is tinned.  Then I solder this one end to the board, route the wire to its second connection, cut it and melt the coating away also on this side.

Melting it away really only works from the end of the wire.  Heating it up in the middle seems only to melt the coating, but it stays on the wire, so no contact with the tin is made.

You may have smelled it already a lot of times in your life, but the fumes of burning polyurethane contain small values of Toluol-di-Isocyanat, which can cause cancer.  So try to not inhale the fumes.  I blow them away and have the window open when soldering.

Re: Pitch Shifter (Transposer)

Reply #14
Thanks for the tip, I'll try that!
Got a question? Please ask in the forum for the fastest answers.