I was looking to do an octave pitch shift, and I have a couple teensy 3.0's laying around. Basically this is supposed to be a polyphonic octave effect, and I'd like to shift down 2 octaves, fixed interval. My toddler son loves music and playing with daddy. He just got his first toy acoustic guitar. But his absolute favorite instrument is the bass, which isn't real friendly to little hands, even for grade school kids. So I was thinking about picking up one of those tiny travel electric guitars, and building the octave shift into it.) This is a toy still, although I'm hoping it's an incredibly cool toy.
Basically electric guitar signal is limited to about 5khz. Itty bitty guitars are typically tuned up a fifth, but an octave is possible with the right string gauge. I was thinking about buffering the pickup output, LPF at about 1khz (highest fundamental is around 640Hz, assuming on octave above "standard" tuning), sampling at 8Khz, and pitch shifting 2 octaves down (2khz), LPF that about 700 Hz or so and mix it back in with the original signal.
So I started looking for pitch shifting techniques, and it appears most stuff is generalized and so requires more complex techniques than I think I need for a divide by 2 and 4 pitch shift. I'm not sure I have enough power to FFT in real time at 8hz (is that overly cautious?) Can I just window filter and stretch my samples, or do I need SOLA or something else to pitch shift by integer octaves in the time domain?
Alternatively, I have some individual piezo guitar saddles laying around, I could digitize them and just do the old analog flip-flop algorithm in the Teensy. Actually I could do better than the old "analog" octave pedals like the Boss OC-2, since I have a polyphonic pickup handy and I should be able to do some time domain filtering on the square waves internally to the Teensy before spitting them out. I guess I'll then just use a PWM out, and LPF the heck out of it. 2Khz LPF should be plenty for a micro "bass" guitar, particularly if I have the option of mixing in the direct signal.
Basically electric guitar signal is limited to about 5khz. Itty bitty guitars are typically tuned up a fifth, but an octave is possible with the right string gauge. I was thinking about buffering the pickup output, LPF at about 1khz (highest fundamental is around 640Hz, assuming on octave above "standard" tuning), sampling at 8Khz, and pitch shifting 2 octaves down (2khz), LPF that about 700 Hz or so and mix it back in with the original signal.
So I started looking for pitch shifting techniques, and it appears most stuff is generalized and so requires more complex techniques than I think I need for a divide by 2 and 4 pitch shift. I'm not sure I have enough power to FFT in real time at 8hz (is that overly cautious?) Can I just window filter and stretch my samples, or do I need SOLA or something else to pitch shift by integer octaves in the time domain?
Alternatively, I have some individual piezo guitar saddles laying around, I could digitize them and just do the old analog flip-flop algorithm in the Teensy. Actually I could do better than the old "analog" octave pedals like the Boss OC-2, since I have a polyphonic pickup handy and I should be able to do some time domain filtering on the square waves internally to the Teensy before spitting them out. I guess I'll then just use a PWM out, and LPF the heck out of it. 2Khz LPF should be plenty for a micro "bass" guitar, particularly if I have the option of mixing in the direct signal.