DIYstompboxes.com

DIY Stompboxes => Digital & DSP => Topic started by: gamenyge on December 14, 2019, 12:44:22 PM

Title: Very cheap digital FX development enviroment (Blue pill)
Post by: gamenyge on December 14, 2019, 12:44:22 PM
Hello everyone. I created a cheap and simple digital FX development environment.

Development environment
Blue Pill STM32 + ST-Link + USB Serial Module + STM32CubeIDE

top page
https://github.com/DIYFXWorld

Breadboard development environment
https://github.com/DIYFXWorld/BPFX

Delay pedal
https://github.com/DIYFXWorld/BPD

What is Blue Pill?
https://github.com/DIYFXWorld/How_do_you_write_a_program/wiki

This is not Multi FX. It is not stereo. The processor I used, STM32F103C8, does not have the power to process multiple FX in real time. However, it can be used as an environment for learning rudimentary sound FX programming. C / C ++ language is used for programming.

I wrote some test programs. If you write the firmware to the MCU, you can test it immediately.

I am Japanese. My text is written in Japanese. But if you have web translation, you can understand my article. The circuit is simple enough that anyone can prototype it. This sentence also uses the translation function.

Please give me your impressions. thank you for reading.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Digital Larry on December 24, 2019, 12:45:01 PM
My impressions are as follows:
- nice work
- it may be hard to get people to adapt this as there are a variety of pretty inexpensive, ready to go platforms that have more CPU horsepower
- other people may feel differently, but I don't like programming DSP in C/C++

Don't let it stop you!
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Blackaddr on December 24, 2019, 01:42:05 PM
Similar to why no one programs in assembly any more (the C and C++ compilers produce code just as fast if not faster) DSP-chip programming is quickly becoming something that people just don't do anymore.

Products like a Raspberry PI for pure compute (non-realtime) power, and 1 GHz Cortex-M7 for realtime no-OS applications just make DSPs seem way too difficult to program for such a small gain.

I started my career as an FPGA/ASIC digital designer and even I've moved most my DSP computing to Cortex-A and Cortex-M processors.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: quad4 on December 24, 2019, 05:34:44 PM
Ditto on general purpose computing versus DSP ... especially for the hobbyist.

FYI, here are three interesting options for dev hardware:
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Digital Larry on December 25, 2019, 12:42:14 PM
Not sure if the comments were directed at me, since people may know I've spent a lot of time on the FV-1, which doesn't support C/C++.   I hate programming that thing's DSP assembler even more than C/C++, but for what it is, especially considering it first came out almost 15 years ago, it's pretty compact and elegant and totally non-portable.

My preference is either for a graphical tool or something like Faust, where you are not so lost in the weeds of buffer pointers and UI threads etc.  Of course with those you are at the mercy of whatever functions the library supports, but I'd bet that most people getting started will find that relatively satisfactory.  By the time you get to where you want to do something really innovative, go ahead and do it in C/C++ then add it to the library of a higher level language or tool so you never have to do it again.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: gamenyge on December 26, 2019, 09:27:23 AM
Merry Christmas. Digital Larry, Balckaddr, quad4.
Since there was no reaction for a long time, I thought the world was destroyed by a biohazard.
I am very happy to talk with you. Japan is very peaceful.

I didn't know ESP32-A1S and Faust, so I ordered the ESP32-audio-kit development board today. I needed to search the Internet more carefully. I will consider whether it is beneficial for me. And I reconsider my project.

Your message was very helpful. Thank you very much.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Digital Larry on December 26, 2019, 10:41:10 AM
Quote from: gamenyge on December 26, 2019, 09:27:23 AM
Merry Christmas. Digital Larry, Balckaddr, quad4.
Since there was no reaction for a long time, I thought the world was destroyed by a biohazard.
I am very happy to talk with you. Japan is very peaceful.

I didn't know ESP32-A1S and Faust, so I ordered the ESP32-audio-kit development board today. I needed to search the Internet more carefully. I will consider whether it is beneficial for me. And I reconsider my project.

Your message was very helpful. Thank you very much.
Hi gamenyge, I am happy to report that at the moment, California has not yet been completely destroyed by a biohazard.

If you are interested in Faust, I really recommend this online course.

https://www.kadenze.com/courses/real-time-audio-signal-processing-in-faust/info

The instructors both have very heavy French accents, which might make it difficult.  You could contact Kadenze and ask if the transcripts of the videos (e.g. for the caption text) is available.

In this course, I developed apps and plugins for Android, Windows, and Mac.  Also for awhile I was playing around with a "Bela" since I'd bought one from their original Kickstarter.  So I developed some plugins for Bela also.  I don't recommend Bela for guitar pedal use as it is relatively noisy.  I believe it is better for developing unique instruments using sensors and switches to trigger and modify sounds.

Once you learn the Faust language you will probably be amazed.  Also it is in active development and you can interact with the developers via the mailing list.

Happy New Year to you too!  My company has an office in Tokyo near Otemachi station and I will probably be back there in a few months.  I plan to visit some guitar shops in Shibuya and Ochanomizu.

DL
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: gamenyge on December 27, 2019, 03:36:35 AM
To Digital Larry

Thanks a lot for the information. I am reading the Faust manual translated into Japanese. And I found some Faust commentary pages written in Japanese.

My immediate goal is to create a Faust execution environment with ESP32-A1S.

Faust could be a very fun playground for me.
Thank you for your precious time.

I live in a rural part of Japan. Tokyo is as far away as South Korea.

Have a good year.

gamenyge
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Digital Larry on December 27, 2019, 12:17:57 PM
I'll be interested to learn what you come up with using Faust and the ESP32.   8)
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: gamenyge on December 28, 2019, 09:22:12 AM
What I'm thinking is probably normal.

-Faust's Web Editor has a very useful GUI. I want to take advantage of it.

-I want to simplify the procedure of designing on a PC ... compiling ... downloading to the FX pedal

-ESP32-A1S costs only $ 4.

OWL had a large circuit. STM32F405ZG (LQFP144) + Audio Codec + External SRAM

ESP32-A1S includes it all.
By adding a few analog circuits, something similar to OWL will be completed.
This is very attractive.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: audioartillery on February 18, 2020, 10:02:48 AM
I agree, the ESP32 option is potentially a good hobbyist platform. I think once someone builds a pedal around it it might take off.

The Bluepill project you originally posted has the common downfall of most such efforts: no audio codec. I actually started designing a board around the Bluepill (they're so cheap!) and eventually found BlackAddr's Teensy based board. Which is working quite well for me. Aside from cost (too pricey to build production pedals around) and being a bit bulky it's a great platform.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Digital Larry on February 18, 2020, 01:00:07 PM
I've ordered an ESP32 audio board from Elecrow however what with the virus situation I have no idea when it's going to show up.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: potul on February 19, 2020, 03:34:14 AM
this ESP32-A1S development board looks interesting....

Is it supported by faust already? I might get one to experiment a little.

Mat
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Digital Larry on February 19, 2020, 08:14:26 AM
Quote from: potul on February 19, 2020, 03:34:14 AM
this ESP32-A1S development board looks interesting....

Is it supported by faust already? I might get one to experiment a little.

Mat
https://faust.grame.fr/doc/tutorials/#dsp-on-the-esp32-with-faust
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: potul on February 19, 2020, 10:09:37 AM
great.... I pulled the trigger on one of them. I might have it in one month or so.

Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: audioartillery on February 19, 2020, 11:41:07 AM
Anyone have any tips for interfacing what I assume are line level input and output on the ESP32 audio boards for use with guitar?  Do I need to do something to match impedance on these if I wanted to build a pedal around it?
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: potul on February 20, 2020, 12:17:23 PM
Bummer..!

I just read Faust cannot compute FFT nor Convolution.....
So only time domain transformations.

what a pitty...
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Digital Larry on February 20, 2020, 01:44:52 PM
Can't win 'em all.  Synthesis toolkit does offer a FIR filter.

https://ccrma.stanford.edu/software/stk/classstk_1_1Fir.html#aa3f72042fb8b13e9dcc31acbff4e1672
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: micromegas on February 20, 2020, 04:41:33 PM
Quote from: potul on February 20, 2020, 12:17:23 PM
Bummer..!

I just read Faust cannot compute FFT nor Convolution.....
So only time domain transformations.

what a pitty...

I think you can, it is just not efficient: https://faust.grame.fr/doc/libraries/#fast-fourier-transform-fft-and-its-inverse-ifft

https://faust.grame.fr/tools/editor/?code=https://faust.grame.fr/doc/examples/img/src/exfaust3/exfaust3.dsp
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Blackaddr on February 20, 2020, 08:44:19 PM
Quote from: audioartillery on February 19, 2020, 11:41:07 AM
Anyone have any tips for interfacing what I assume are line level input and output on the ESP32 audio boards for use with guitar?  Do I need to do something to match impedance on these if I wanted to build a pedal around it?

You need to do a couple things in order to do it safe and noise free. Technically you can skip some but you will sacrifice something, either signal quality, sound level, or voltage protection.
- you need high input impedance (Preferably 1M ohm) and a preamp buffer
- you need potentially boost (for passive pickups) or attentuation (active pickups or another pedal in front of it) or both if you want both use cases
- you probably want voltage protection to make sure you don't fry the line level inputs. Keep in mind guitar levels when boosted theoretically go up to 9V (7Vpp more typically)
- you need to generate a filtered analog supply to avoid digital noise

I had the exact same requirements for my TGA Pro design because the codec is also line-level input. I know you are already familiar with the board so feel free to look at the schematic in the documentation for how to do all of that.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: potul on February 21, 2020, 09:35:26 AM
Quote from: micromegas on February 20, 2020, 04:41:33 PM
I think you can, it is just not efficient: https://faust.grame.fr/doc/libraries/#fast-fourier-transform-fft-and-its-inverse-ifft

https://faust.grame.fr/tools/editor/?code=https://faust.grame.fr/doc/examples/img/src/exfaust3/exfaust3.dsp
I was hoping I could do FFT /IFFT in realtime, to implement frequency domain transformations like phase vocoding. I don't think this can be done in faust, from what I see. I have done it in PD, so I was assuming faust could handle it... probably wrong. I will have to play with it when I have my ESP32 board
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: EBK on February 21, 2020, 10:19:41 AM
Quote from: potul on February 21, 2020, 09:35:26 AM
...to implement frequency domain transformations like phase vocoding.
Is there an approachable way to do phase vocoding in a small embedded form?  I would love to implement a delay with rate shifted repeats or something else fun like that. 
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Blackaddr on February 21, 2020, 04:12:13 PM
Quote from: EBK on February 21, 2020, 10:19:41 AM
Quote from: potul on February 21, 2020, 09:35:26 AM
...to implement frequency domain transformations like phase vocoding.
Is there an approachable way to do phase vocoding in a small embedded form?  I would love to implement a delay with rate shifted repeats or something else fun like that.

Have you looked at the Teensy 4 yet? Using the FFT acceleration in the Keil library you should be able to do decent real time vocoding. You're not going to find anything more powerful than Teensy unless you go for something with full blown Cortex-A processors like a Pi 4 or difficult to program DSPs like Sharc.
Title: Re: Very cheap digital FX development enviroment (Blue pill)
Post by: Digital Larry on February 26, 2020, 04:17:04 PM
Quote from: Digital Larry on February 18, 2020, 01:00:07 PM
I've ordered an ESP32 audio board from Elecrow however what with the virus situation I have no idea when it's going to show up.
Just got an e-mail from Elecrow saying the board shipped and I should get it in 7 to 25 days.  For a moment I was tempted by the "MOD Dwarf" Kickstarter, but there are enough gaps in the details of that where I didn't really feel comfortable going in on it.