# Real time digital audio frequency changing device

I want to make a device, which takes an AC audio signal like a guitar pickup signal, or piano or what have you as input, and changes the pitch using this function:

newFrequency = oldFrequency * 2 ^ ( ( interval - 1 ) / 12 )


oldFrequency is the frequency of current note. Interval is just the number of half-steps from that music note, including that note. For example: A note at 110Hz with interval = 13 would be A at 220Hz. A note at 110Hz with interval = 1 would be A at 110Hz. A note at 110Hz with interval = 7 would be E at 164.814Hz.

That's the case for any music note. Not only A. By the way, interval CAN take negative number for a lower pitch.

The problem is that we have an audio signal at input. One can play multiple notes or a chord at once. Is that going to be a problem?

I'm new to digital electronics, or electronics at all. I would appreciate if you could just give me keywords and leads, so that I could search, study and do more research. I don't know where to begin at all.

Thanks in advance.

• "pitch shifter circuit" Commented Mar 17, 2015 at 15:11
• I think a pitch detection technique should be researched first (I remember doing this in MATLAB a while ago, there was different approaches to this.. The best one was autocorrelation based. But it was really long time..). Commented Mar 17, 2015 at 15:21
• @ignacio-vazquez-abrams Tried that already. I wanna learn how stuff work, and not just build something. Learning is really important to me. Commented Mar 17, 2015 at 15:23
• "I don't know where to begin at all" ..... "Tried that already" .... not sure I understand. You asked for keywords and leads and @Ignacio gave you some. What is it you're asking? Commented Mar 17, 2015 at 15:50
• "learn how stuff work, and not just build something" - designing and building your own thing (rather than following a guide) is the best way to learn things! Commented Mar 17, 2015 at 16:25

## 2 Answers

http://www.guitarpitchshifter.com/pitchshifting.html actually explains it all quite well, but with a big emphasis on the maths. You would first need to understand the Fast Fourier Transform. From there you could implement it in software, and then start thinking about building a DSP-based device to be the actual pedal. It's within the reach of an ambitious final year project for an EE undergraduate.

• Actually, I found it myself yesterday, but yeah, that's what I'm looking for. Thanks. Commented Mar 18, 2015 at 18:52

I think the best you could hope for is a vocoder: -

Input (modulation) is voice or guitar or generally any audio. The vocoder works by filtering the input into various frequency bands, converting those band-limited signals to amplitudes and using those amplitudes to control several voltage controlled amplifiers.

The input to each VCA comes from a band-limited filter that is fed from another analogue input source called the "carrier". The carrier is usually another musical instrument such as a keyboard synthesizer.

The output is the sum of all the band limited filters that have been individually modulated by band-limited versions of the modulation signal. Vocals can be made to sound robotic or very choral/chordal and incrementing up and down in semitones is child's play.

Used em and love em!

I'm sure there are projects in google-land that are available for this to be built.