Author Topic: Microcontrollers for Audio Designs  (Read 10496 times)

0 Members and 1 Guest are viewing this topic.

Offline CarlosCcfTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Microcontrollers for Audio Designs
« on: May 04, 2023, 06:33:47 pm »
Hi guys! I'm new here!!
I'm acoustic engineer and a music lover. I ever like audio-related electronic, but I've never had the chance to learn until now (just the basics of the university). I want to learn how to design and create digital-analog audio projects. I've knowledge of analog audio electronic, but I've not digital. I know microcontroller basics and C/C++ programming .

I've been researching and I think I need to learn about DSP, embedded audio and audio programming to reach the goal I have.

And this is where you come in, can you advise me where to start, or help me design a syllabus? I am initially interested in stm32, is there any development board that is useful for me?

Thanks a lot! I will be updating the post for newbies with the same objective as me.

 ;)
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: ca
    • VE7XEN Blog
Re: Microcontrollers for Audio Designs
« Reply #1 on: May 04, 2023, 06:39:58 pm »
Phil's Lab has a 4-part series specifically on audio DSP on microcontrollers, as well as a number of other relevant videos (mixed signal design, DSP-based guitar pedal hardware overview, FIR/IIR filter tutorials etc). They're really top notch videos.



Also interesting if you just want to get started playing around is the Teensy Audio Library, which includes a GUI where you can generate a DSP pipeline graphically and export code directly. https://www.pjrc.com/teensy/td_libs_Audio.html
73 de VE7XEN
He/Him
 

Offline CarlosCcfTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Re: Microcontrollers for Audio Designs
« Reply #2 on: May 06, 2023, 08:05:22 am »
Thank you! I already watched those videos, and I found them super interesting, but for my goal, I wanted to know what theoretical content I should study or practice. I mean, design a kind of syllabus that me or anyone can use to develop a path with objectives, which includes from the most basic where to start to the most complex.

I don't know if I am explaining myself in the best way, I will try to upload an agenda that I have been developing.

In addition, I continue to make comparisons of stm32 development boards to find the ideal one for my objective (Recommendations are accepted).  ;D ;D
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 9232
  • Country: nl
  • Current job: ATEX product design
Re: Microcontrollers for Audio Designs
« Reply #3 on: May 06, 2023, 09:06:52 am »
https://www.cnx-software.com/2014/06/16/arm-introduces-dsp-lab-in-a-box-for-education-combining-stmicro-stm32f4-discovery-board-and-wolfson-audio-card/
The STM32F411 and 407 has been a platform of choice for many audio projects.
There are also a some high performance NXP microcontrollers that have good audio libraries.
The other platform worth looking at is TI's audio DSPs, like the TAS3204.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 7904
  • Country: ro
Re: Microcontrollers for Audio Designs
« Reply #4 on: May 06, 2023, 09:22:52 am »
You'll need to take some Signal Processing classes.  A devboard is not of much use at first, while learning the concepts, because any programming language can be used to learn DSP theory.

The DSP field is vast, and filled with deep rabbit holes.  This can keep one busy for a lifetime, maybe more.  ;D

Once I've watched a few playlist from this channel, happened to like that style, and bookmarked his channel:

Barry Van Veen
https://www.youtube.com/@allsignalprocessing/about

Once you get the basics, try some DSP with a PC, for example in Octave or in Python, so to keep the focus on signal processing, and not on the programming language.  Then, get a DSP board and get familiarized with the environment.  Get a board with at least an audio CODEC and an MCU with a hardware DSP inside.  Try implementing some guitar effects, or something.

Other than loading and running ready made examples, everything else will be far from trivial, but will come with lots of fun while discovering and exploring DSPs.
« Last Edit: May 06, 2023, 09:45:23 am by RoGeorge »
 
The following users thanked this post: djsb

Offline barshatriplee

  • Regular Contributor
  • *
  • !
  • Posts: 130
  • Country: bd
Re: Microcontrollers for Audio Designs
« Reply #5 on: May 07, 2023, 04:09:27 pm »
To get started, here's a syllabus that you can follow:

Introduction to Digital Signal Processing (DSP):
-Sampling and Quantization
-Aliasing and Anti-aliasing Filters

Embedded Audio Systems

-Digital Audio Interface Standards (I2S, TDM, etc.)
-Interfacing Audio Codecs with Microcontrollers
-DMA (Direct Memory Access) for Audio Data Transfer
-Real-time Operating Systems (RTOS) for Audio Processing

Audio Programming
-Introduction to C/C++ programming language
-Audio processing libraries (e.g. CMSIS-DSP, JUCE, etc.)
-Digital Filter Design (FIR and IIR Filters)
-Audio Effects (Reverb, Delay, Chorus, etc.)
-Audio Synthesis (Oscillators, Envelopes, etc.)

Audio Project Design
-Choosing a Development Board (e.g. STM32)
-Designing Audio Hardware (Audio Codec, Amplifier, etc.)
-Writing Audio Software (Audio Drivers, Signal Processing, etc.)
-Testing and Debugging Audio Projects

For a development board that is useful for your needs, the STM32 Discovery series is a great choice. These boards feature powerful STM32 microcontrollers with plenty of memory and I/O capabilities, as well as integrated audio peripherals such as I2S interfaces and digital audio codecs. You can choose a board based on your specific needs, such as the STM32F407 Discovery or the STM32F769 Discovery.
 

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 837
  • Country: us
Re: Microcontrollers for Audio Designs
« Reply #6 on: May 07, 2023, 06:58:54 pm »
I recommend the Electrosmith Daisy platform as your STM32 hardware: https://www.electro-smith.com/daisy

Has proper audio codecs, plenty of community support to get started. You can roll your own DSP algorithms, either on the effect processor templates or your own. The CPU is the beefy STM32H750IB
 

Offline CarlosCcfTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Re: Microcontrollers for Audio Designs
« Reply #7 on: May 13, 2023, 11:41:08 am »
I have been thinking and organizing these days, what do you think about this syllabus?

Module 1. DSP - I am going to use the books "Tratamiento digital de seƱales - John G. Proakis and Dimitris G. Manolakis" and "the scientist and engineer's guide to digital signal processing - Steve W. Smith". Youtube channel: https://www.youtube.com/@allsignalprocessing/about. When I have the theoretical basis I will create models in Matlab and C.
Module 2. Electronics - I am going to use the books "Practical Electronics for Inventors - Paul Scherz", "Handmade Electronic Music - Nicolas Collins", "Make Analog Synthesizers - Ray Wilson" and "Small Signal Audio Design - Douglas Self". At this point I will make practical breadboard assemblies.
Module 3. Embedded Audio Systems, Audio Programming and Audio Project Design - I'm going to follow the syllabus that dobsonr741 provided me for this topic. I have not found any specific book or youtube channel, if anyone knows of one, I would love to take a look at it.

I think I'll use STM32F407 Discovery for my learning.

I will keep updating with news, modifications and progress. Any help or info is welcome!

 
The following users thanked this post: boB

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 7904
  • Country: ro
Re: Microcontrollers for Audio Designs
« Reply #8 on: May 13, 2023, 01:52:11 pm »
Proakis and Manolakis are the nowadays reference authors for DSP.  Their books are outstanding reference textbooks.  Great for lookup once you already know and understood how it all works.  However, I wouldn't recommend to start learning from there, unless you are a mathematician at heart.

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 837
  • Country: us
Re: Microcontrollers for Audio Designs
« Reply #9 on: May 13, 2023, 02:56:36 pm »
 :-+ Nice to see someone considers books these days!

One more platform recommendation: Raspberry Pi bare metal via Circle: https://github.com/rsta2/circle

A practical example is an analog modeling synth: https://github.com/rsta2/minisynth. Opens up a higher perf category than STM32, does 64bit. No GPU support yet, however books written about it: "Raspberry Pi GPU Audio Video Programming, Jan Newmarch".

Personally I did not try Circle yet, put it on my todo list.

« Last Edit: May 13, 2023, 04:27:45 pm by dobsonr741 »
 

Offline CarlosCcfTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Re: Microcontrollers for Audio Designs
« Reply #10 on: May 14, 2023, 06:00:03 pm »
I've been taking a look at it and I'm going to give it a try, I think I have a good level of mathematics, I'll keep updating.

Proakis and Manolakis are the nowadays reference authors for DSP.  Their books are outstanding reference textbooks.  Great for lookup once you already know and understood how it all works.  However, I wouldn't recommend to start learning from there, unless you are a mathematician at heart.
 

Offline CarlosCcfTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Re: Microcontrollers for Audio Designs
« Reply #11 on: May 14, 2023, 06:03:23 pm »
For me its the best form to learn, books.

I talk about STM32 because I have seen that the majority of digital equipment on the market, for example in eurorack, use it.

I'll follow yours recommendations, but I think the most complicated part will be to create a working line and unify everything in the objective I have.  |O
I don't know how to unify DSP, electronics, audio and microcontrollers. :'(

:-+ Nice to see someone considers books these days!

One more platform recommendation: Raspberry Pi bare metal via Circle: https://github.com/rsta2/circle

A practical example is an analog modeling synth: https://github.com/rsta2/minisynth. Opens up a higher perf category than STM32, does 64bit. No GPU support yet, however books written about it: "Raspberry Pi GPU Audio Video Programming, Jan Newmarch".

Personally I did not try Circle yet, put it on my todo list.
« Last Edit: May 14, 2023, 06:06:12 pm by CarlosCcf »
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 24156
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Microcontrollers for Audio Designs
« Reply #12 on: May 14, 2023, 09:24:06 pm »
I talk about STM32 because I have seen that the majority of digital equipment on the market, for example in eurorack, use it.

The XMOS xCORE devices have seen commercial acceptance in the audio market because of their unique characteristics: up to 4000MIPS/chip, and the response time is guaranteed to the clock level. That's "guaranteed by design", not by "testing and hoping we've spotted the worst case".

The IDE will examine the (optimised) binary program to tell you the exact number of clock cycles between here and there, and there will be no variation due to cache misses and interrupts for the simple reason there are no caches and no interrupts.

Yes, that is possible, and it works well due to the very well integrated hardware+language+library ecosystem, which enables hard realtime timing i/o down to a specific clock cycle.
« Last Edit: May 14, 2023, 09:28:28 pm by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline CarlosCcfTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Re: Microcontrollers for Audio Designs
« Reply #13 on: May 15, 2023, 04:06:15 pm »
Which development kit do you recommend? I want to compare more options  :-+

I talk about STM32 because I have seen that the majority of digital equipment on the market, for example in eurorack, use it.

The XMOS xCORE devices have seen commercial acceptance in the audio market because of their unique characteristics: up to 4000MIPS/chip, and the response time is guaranteed to the clock level. That's "guaranteed by design", not by "testing and hoping we've spotted the worst case".

The IDE will examine the (optimised) binary program to tell you the exact number of clock cycles between here and there, and there will be no variation due to cache misses and interrupts for the simple reason there are no caches and no interrupts.

Yes, that is possible, and it works well due to the very well integrated hardware+language+library ecosystem, which enables hard realtime timing i/o down to a specific clock cycle.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 24156
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Microcontrollers for Audio Designs
« Reply #14 on: May 15, 2023, 04:27:37 pm »
Which development kit do you recommend? I want to compare more options  :-+

I talk about STM32 because I have seen that the majority of digital equipment on the market, for example in eurorack, use it.

The XMOS xCORE devices have seen commercial acceptance in the audio market because of their unique characteristics: up to 4000MIPS/chip, and the response time is guaranteed to the clock level. That's "guaranteed by design", not by "testing and hoping we've spotted the worst case".

The IDE will examine the (optimised) binary program to tell you the exact number of clock cycles between here and there, and there will be no variation due to cache misses and interrupts for the simple reason there are no caches and no interrupts.

Yes, that is possible, and it works well due to the very well integrated hardware+language+library ecosystem, which enables hard realtime timing i/o down to a specific clock cycle.

See the XMOS website and/or DigiKey for the current hardware options.

The IDE is a free eclipse plugin.

These are notably concise, simple and information dense: https://www.xmos.com/published/xmos-programming-guide and http://www.xmos.com/published/xcore-architecture-flyer?version=latest
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf