Digital guitar pedal - Pitch shifting effect - Getting started

Started by redbagy, April 11, 2024, 03:06:05 PM

Previous topic - Next topic

redbagy

Hi! This request has definitely been asked here before and I tried to gather as much knowledge as possible however I prefer your input based on my experience etc.

My final goal is to recreate an expression based pitch shifter similar to the Whammy. It would also be my first time delving into DSP (so far I've programmed Nordic and PIC micro controllers).

My current 2 tasks are:

to select a suitable system where to develop dsp audio effects

select a suitable algorithm for pitch shifting

Regarding (1) I've found Phil's Lab and YetAnotherElectronicsChannel on Youtube. Both use an STM32 and personally I'm feeling that it's the more flexible and accessible option for me. Other systems that I''ve considered are the ESP32, AD Blackfin (there seem to be lack of support for this for the 'diy' community) and Electrosmith Daisy. In addition to the SoC selected I will obviously be adding a suitable ADC/DAC.

(2) The simplest approach I've found is to change the playback speed of the sampled audio like YetAnotherElectronicsChannel's approach. The other approach is to implement a phase vocoder algorithm (which I think is the proper approach?). This sounds like a steeper learning curve because it'd be my first time using FFT on a SoC and there seems to be more implemented examples using the first method. I've also found some improvements on the first approach to reduce phasing issues like this article.

Thank you for reading so far. I appreciate any feedback.

cordobes

You want to eat the pizza in one bite.
Get the board, familiarize yourself with the platform environment, compiler and programming hardware.
With stm32 you will achieve 12 bit resolution, stereo, which is fine to start with, but you will need to make sure you have properly scaled and filtered the signal to be sampled. PWM can be used to reconstruct, so you also need additional hardware and output filtering. All this in the analog domain.
You can also use an external ADC and DAC, or a CODEC. You will need to understand which protocol to use, such as I2S.
When you have the bypass mode working, try the time domain pitch method, you can start 1 octave up and 1 octave down, then try some intervals.
If you have achieved all this, you can go for more complex techniques, like going through FFT and pitch in frequency domain.
And all our yesterdays have lighted fools the way to dusty death.
Out, out, brief candle! Life's but a walking shadow.

niektb

I think the Daisy would be the most beginner-friendly as it has a wealth of accessible diy sources and an active community. Look at the PedalPCB Terrarium if you want to know how to easily integrate it into a pedal! :)

redbagy

Just ordered the Terrarium! I plan on starting out with it and eventually port some code to a discrete STM32 when I feel comfortable. I think that the Daisy uses the in built ADC of the STM right?

niektb

No the Daisy has a dedicated codec on board, the PCM3060! Much better than the built-in ADC and DAC :)

redbagy

Ah! The IC at the other end then I believe. Any idea if the schematics for the entire board are available online? I briefly tried searching yesterday but couldn't find them.

Cybercow

My first foray into DSP has been the SpinSemi FV-1 chip. It's easy to delve into and even has a GUI (Digital Larry's "SpinCAD Designer app) for programming your own patches. I found it much easier to start with compared to the Daisy or the FXCore.

Quote from: niektb on April 12, 2024, 09:47:36 AMNo the Daisy has a dedicated codec on board, the PCM3060! Much better than the built-in ADC and DAC :)
I'm curious how the PCM3060 stacks up to the FV-1. And TBH, I'd not heard of the PCM3060 as a DSP chip till now.
Cybercow (moo)
Don't let your talent take you where your character cannot keep you.

niektb

Quote from: Cybercow on April 12, 2024, 08:17:47 PMMy first foray into DSP has been the SpinSemi FV-1 chip. It's easy to delve into and even has a GUI (Digital Larry's "SpinCAD Designer app) for programming your own patches. I found it much easier to start with compared to the Daisy or the FXCore.

Quote from: niektb on April 12, 2024, 09:47:36 AMNo the Daisy has a dedicated codec on board, the PCM3060! Much better than the built-in ADC and DAC :)
I'm curious how the PCM3060 stacks up to the FV-1. And TBH, I'd not heard of the PCM3060 as a DSP chip till now.

The PCM3060 is not a DSP, it's a codec. So it only handles the AD/DA-Conversion. All the signal processing happens inside the STM32 processor!

Cybercow

Quote from: niektb on April 13, 2024, 05:04:34 AM
Quote from: Cybercow on April 12, 2024, 08:17:47 PMMy first foray into DSP has been the SpinSemi FV-1 chip. It's easy to delve into and even has a GUI (Digital Larry's "SpinCAD Designer app) for programming your own patches. I found it much easier to start with compared to the Daisy or the FXCore.

Quote from: niektb on April 12, 2024, 09:47:36 AMNo the Daisy has a dedicated codec on board, the PCM3060! Much better than the built-in ADC and DAC :)
I'm curious how the PCM3060 stacks up to the FV-1. And TBH, I'd not heard of the PCM3060 as a DSP chip till now.

The PCM3060 is not a DSP, it's a codec. So it only handles the AD/DA-Conversion. All the signal processing happens inside the STM32 processor!

Thanks for clearing that up for me. My awareness of DSPs is rather narrow and have only ever worked with the SpinSemi FV-1. It has a built-in ADC/DAC running at 32.768KHz across 24 bits and seems to be rather clean for its 15K ADC/DAC bandwidth. Not as robust as the PCM3060's, but it doesn't require another device for the DSP part.
Cybercow (moo)
Don't let your talent take you where your character cannot keep you.

Blackaddr

If you want to focus on the DSP, rather than all the complicated ADC/DAC design, I recommend the Multiverse by Aviate Audio. It has a proper high-impedance preamp, and circuit protection before the codec. It's a fully programmable stompbox with a Teensy MicroMod inside (600 MHz CPU). You can use the Multiverse tools directly, but I also support the hardware via my open-source BALibrary I wrote for my own Teensy/CODEC based boards.

If you want a traditional developer IDE interface, just use the regular Arduino IDE / Teensy stuff with the Multiverse and BALibrary. If you want a professional high-end like in

terface, you can use the Multiverse tools (very easy to port Teensy code to Multiverse). It's got a UI editor so you don't have to write any UI code yourself.
https://aviateaudio.com/products/multiverse-pedal


I release a lot of effects (look for Blackaddr) on the Multiverse platform so if you're interested in that route, DM me and I can probably get you a discount code.
Blackaddr Audio
Digital Modelling Enthusiast
www.blackaddr.com