Sonsivri

Electronics => Projects => Topic started by: witsanukai on September 18, 2014, 06:53:08 06:53



Title: Question :idea to do Digital Guitar effect from microcontroller?
Post by: witsanukai on September 18, 2014, 06:53:08 06:53
Any body ever DIY Digital Guitar effect from microcontroller?
I have an idea by using STM32F401 (Nuecleo) but i am not so sure, is it fast enough.
Any advice on resource or idea. :)


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: str67 on September 18, 2014, 02:25:11 14:25
Hi,

if you have a digital (I2S in -> I2S out) interface to the STM32F401, you should be fine.
~100 MIPS@32 bit including DSP instructions for the ARM processor should be sufficient, at least for Mono processing
For the A/D -> D/A chain I see more problems. The performance of the A/D converter on the uP (12bit/2.4 MHz) sounds promising on first sight, but as this is a general purpose A/D you will usually end up with distortions and sampling effects. To get rid of these, you would have to spend some work on your DSP side which you possibly do not intend to.
A D/A is (as far as I see) not available in the STM32F401, but anyway you would not be very happy using it, if there was one.

My proposal would be using a simple CODEC-Chip (just as an example: TI's TLC320AD77C, but there are a lot of others from several companies available) to do the A/D and D/A conversion properly and use the STM32F401 as your DSP in the system...

Just my litte thoughts...
str


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: Checksum8 on September 18, 2014, 03:58:31 15:58
I agree with str67, go with a codec chip

Have a look at this codec shield using a Wolfson WM8731. It is all
open source with lots of code examples and schematics. He has examples
of echo, tremelo, flanger etc. You could port it over to your micro of choice.
Also look at his MICrODEC project

http://www.openmusiclabs.com/projects/codec-shield/

http://www.openmusiclabs.com/projects/microdec/


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: CocaCola on September 18, 2014, 08:59:42 20:59
Personally I would go with the original sound of analog circuits for most traditional effects...


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: maiasj on September 18, 2014, 09:58:53 21:58
Hi,
Take a look at OWL Programmable Effects Pedal project. Itīs open source.
Regards,


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: an007_rld on September 19, 2014, 01:39:26 01:39
This is a good start: http://www.electrosmash.com/pedalshield (http://www.electrosmash.com/pedalshield)
-an


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: witsanukai on September 19, 2014, 04:45:15 04:45
Very interesting concept for Codec, but codec IC may hard to buy here (in Thailand :) )
For DAC, i still thinking to use PWM techniuqe with lowpass filter to regenerted sond, will try this weekend and update again.
Cheer. :)


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: an007_rld on September 19, 2014, 12:40:49 12:40
A very nice solution based on all winner A20 it is about to come (it's a linux commuter in a pedal).

Check here: http://www.cnx-software.com/2014/09/19/linux-based-mod-duo-multi-effects-pedal-is-powered-by-an-allwinner-a20-som-crowdfunding/ (http://www.cnx-software.com/2014/09/19/linux-based-mod-duo-multi-effects-pedal-is-powered-by-an-allwinner-a20-som-crowdfunding/)
The kickstarter campaign is here: https://www.kickstarter.com/projects/modduo/mod-duo-the-limitless-multi-effects-pedal (https://www.kickstarter.com/projects/modduo/mod-duo-the-limitless-multi-effects-pedal)

Good stuff for musicians.
-an


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: Signal on September 19, 2014, 04:14:13 16:14
<...> but codec IC may hard to buy here (in Thailand :) ) <...>
Such difficulty looks strange, but if it's true I have couple of fun thoughts. You can try
1) codec chip from old PC motherboad from trash,
2) small cheap USB Audio Adapter, that should be in your local shops.

Maybe you can buy suitable STM32 kit with audio interface like this STM32F401C-DISCO http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098.

For DAC, i still thinking to use PWM techniuqe with lowpass filter to regenerted sond, will try this weekend and update again.
Sound quality that is enough for "Uaaa-Uaaa" inside plastic doll will disappoint you.

My advice - use the way CocaCola suggested. At least for the beginning.
But if you have strong attraction to digital approach and want to make your own effects then I'd better start with PC application that captures sound from sound card, processes it and playbacks through the same sound card.

I am very interested in your report about reached quality by PWM+LPF solution.
Here is one demonstration "Arduino playing Audio with PWM DAC" http://www.youtube.com/watch?v=XLm-QY0Bmno (http://www.youtube.com/watch?v=XLm-QY0Bmno)


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: PICker on November 19, 2014, 07:51:18 19:51
I think you can play with the 16f1789 equipped with 12 bit ADCs, 8/5 bit DACs and 3 OPAmps:
http://www.microchip.com/wwwproducts/Devices.aspx?product=PIC16F1789
Cheers,
Pier Andrea.


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: Signal on December 08, 2014, 08:39:05 20:39
I think you can play with the 16f1789 equipped with 12 bit ADCs, 8/5 bit DACs and 3 OPAmps:

For guitar effects?! Weak microcontroller even without multiplier, with ADC/DACs not suitable for audio?
Being on sceptic side I'd say an advice to play with different plectrums would be more useful ;)
I will appreciate if you can share reasons of your optimism.


Title: Re: Question :idea to do Digital Guitar effect from microcontroller?
Post by: Vineyards on January 08, 2015, 01:46:46 01:46
I think you can play with the 16f1789 equipped with 12 bit ADCs, 8/5 bit DACs and 3 OPAmps:
http://www.microchip.com/wwwproducts/Devices.aspx?product=PIC16F1789
Cheers,
Pier Andrea.

Do you believe you can get a decent guitar sound from such a slow microprocessor? You need a digital signal processor (DSP). On top of that you need audio grade opamps. Imagine plugging your guitar into a ZX Spectrum (which at least has more RAM), what would you get as an output? Blip, blop, dit, dit, dit.