Pitch Shifter (Transposer)

A place to document your own projects.

Pitch Shifter (Transposer)

Postby Markus Gritsch » Thu Mar 17, 2011 6:52 am

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.
Attachments
compiled_firmware.zip
(1.83 KiB) Downloaded 219 times
schematic.jpg
pitch_shifter.zip
(4.68 KiB) Downloaded 1048 times
Last edited by Markus Gritsch on Sat Jul 20, 2013 1:58 pm, edited 3 times in total.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Pitch Shifter (Transposer)

Postby sqkybeaver » Thu Mar 17, 2011 9:03 am

this is awesome, i have been thinking about using a dspic for a small effects processor, any idea how much this taxes the pic24?
User avatar
sqkybeaver
Hero Member
Hero Member
 
Posts: 1095
Joined: Tue Dec 07, 2010 8:50 am
Location: New Hampshire, USA

Re: Pitch Shifter (Transposer)

Postby Markus Gritsch » Thu Mar 17, 2011 9:27 am

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.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Pitch Shifter (Transposer)

Postby miro » Thu Mar 17, 2011 10:07 am

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
miro
Full Member
Full Member
 
Posts: 113
Joined: Mon Feb 07, 2011 7:30 am

Re: Pitch Shifter (Transposer)

Postby Markus Gritsch » Thu Mar 17, 2011 10:14 am

No, never done something in this field.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Pitch Shifter (Transposer)

Postby sqkybeaver » Thu Mar 17, 2011 10:21 am

miro wrote: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


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://www.genesisradio.com.au/ and am not convinced that this is an ideal situation for myself.
User avatar
sqkybeaver
Hero Member
Hero Member
 
Posts: 1095
Joined: Tue Dec 07, 2010 8:50 am
Location: New Hampshire, USA

Re: Pitch Shifter (Transposer)

Postby alexwhittemore » Thu Mar 17, 2011 10:58 pm

Could you describe theory of operation a bit? I still don't quite follow but I'm very interested.
alexwhittemore
Newbie
Newbie
 
Posts: 49
Joined: Sun Feb 06, 2011 4:57 pm
Location: Boston, MA

Re: Pitch Shifter (Transposer)

Postby Markus Gritsch » Fri Mar 18, 2011 3:33 am

Take a look at the section 'Pitch Conversion' on this site: http://elm-chan.org/works/vp/report.html
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Pitch Shifter (Transposer)

Postby Markus Gritsch » Fri Mar 18, 2011 3:42 am

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.
Attachments
IMG_0673.JPG
IMG_0672.JPG
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Pitch Shifter (Transposer)

Postby miro » Fri Mar 18, 2011 4:27 am

@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.
miro
Full Member
Full Member
 
Posts: 113
Joined: Mon Feb 07, 2011 7:30 am

Re: Pitch Shifter (Transposer)

Postby tuffstuff » Sun Jun 19, 2011 3:47 pm

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!
tuffstuff
Newbie
Newbie
 
Posts: 1
Joined: Sun Jun 19, 2011 3:40 pm

Re: Pitch Shifter (Transposer)

Postby sqkybeaver » Sun Jun 19, 2011 4:00 pm

tuffstuff wrote: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!


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.
User avatar
sqkybeaver
Hero Member
Hero Member
 
Posts: 1095
Joined: Tue Dec 07, 2010 8:50 am
Location: New Hampshire, USA

Re: Pitch Shifter (Transposer)

Postby ian » Mon Jun 20, 2011 2:09 am

@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.
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: Pitch Shifter (Transposer)

Postby Markus Gritsch » Mon Jun 20, 2011 2:27 am

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.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Pitch Shifter (Transposer)

Postby ian » Mon Jun 20, 2011 2:31 am

Thanks for the tip, I'll try that!
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Next

Return to Project logs