Real-Time Impulse Response Simulation in Software (STM32 DSP) - Phil's Lab

  Рет қаралды 13,530

Phil’s Lab

Phil’s Lab

Күн бұрын

Impulse response system modelling, simulation, and real-time implementation on an STM32 microcontroller for a guitar cabinet. PCBs by PCBWay www.pcbway.com
[SUPPORT]
Hardware design courses: phils-lab-shop.fedevel.education
Course content: www.phils-lab.net/courses
Fedevel courses: www.fedevel.com
Free trial of Altium Designer: www.altium.com/yt/philslab
Patreon: / phils94
[GIT]
www.github.com/pms67
[SOCIAL]
Instagram: / philslabyt
[LINKS]
Impulse Response Wiki: en.wikipedia.org/wiki/Impulse...
FIR Filtering Video: • FIR Filter Design and ...
STM32 + I2S + DMA Set-Up Video: • STM32 I2S ADC DMA & Do...
[TIMESTAMPS]
00:00 Intro
00:58 PCBWay
01:34 Impulse Response (IR) Basics
04:17 Getting an IR
06:03 IR Audio Sample
06:15 Time Domain
07:51 Frequency Domain
09:31 FIR Filter
11:04 Truncation
14:18 Firmware Implementation
17:18 Test Set-Up
17:43 Measurements (Frequency Domain, IR Length)
21:03 Guitar Demo (Varying IR Length)
21:46 Guitar Demo (Guitar Rig vs Custom DSP)
22:20 Outro

Пікірлер: 86
@OrTB
@OrTB 4 ай бұрын
You're one of the only content creators that actually explain the real life meaning behind all this DSP theory. Lots of people love to scram about the maths, and imaginary numbers. However, I was looking for an actual, practical explanation, and you good sir delivered. Keep up the incredible content, cheers!
@Sanchees3
@Sanchees3 6 ай бұрын
Currently an EE student that got burnt-out this session and have been playing guitar to distract myself so this video came at the perfect time! Watching this video is giving me the motivation to slowly recover and get back to it next year (: Awesome video as always !
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you! Very glad to hear that this is giving you motivation to continue when you are ready - hope you recover soon from burn-out, I know the feeling!
@isaacclark9825
@isaacclark9825 6 ай бұрын
How far along are you in school? If you want to talk about burnout and other school stuff, I'd be happy to lend an ear.
@lukegary4482
@lukegary4482 6 ай бұрын
burn out can creep up on you during you're career too dude, try to keep up guitar, other constructive hobbies and things with friends to help stave it off! Personal time is important!
@Papproni99
@Papproni99 5 ай бұрын
when i was in your shoes i choose my project to create a multifx unit, you will learn a lot about filters, mixed signal pcb design, and embedded limitations... and you HAVE to play the guitar to test it
@Ziferten
@Ziferten 6 ай бұрын
Awesome overview of a super common real-world application of DSP! Universities love to cram your head full of dry theory, but it's stuff like this that will really spark a passion for embedded systems in some young EE. Keep up the great content, Phil!
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you very much! Agreed, uni DSP courses unfortunately show next to no practical applications :(
@mohitrahaman
@mohitrahaman 6 ай бұрын
Thank you so much for the condensed knowledge. I'm barely scraping the surface of a rabbit hole.
@p_mouse8676
@p_mouse8676 6 ай бұрын
Btw, at 3:20 , an impulse reponse doesn't have to come from "a click" but is often done with either some (pink/white) noise, a frequency sweep or multi-tone signal. From there the impulse response can be calculated. Especially a frequency sweep will give a far better signal-noise ratio.
@PhilsLab
@PhilsLab 6 ай бұрын
That's right :)
@EmbeddedEnigma
@EmbeddedEnigma 6 ай бұрын
love to see your software related video, always learn something.
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you very much for watching!
@RN-jq1oh
@RN-jq1oh 6 ай бұрын
Whoa...I was literally just thinking about building my own IR using an STM32 a few days ago...this came out so perfectly. Phil your videos are always amazing! Keep doing what you're doing.
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you very much, more of this stuff to come! Hope you get to try this out for yourself :)
@mohamedyahia809
@mohamedyahia809 6 ай бұрын
Hello Phil, can you make a future video about High Voltage PCBs ?
@PhilsLab
@PhilsLab 6 ай бұрын
Hey Mohamed, Yes, that's a good topic for a future video!
@denislavdenchev2572
@denislavdenchev2572 6 ай бұрын
That would be a great topic, thanks! ❤ Designing PCBs for tube amps is a bit of a mystery to me
@LeonTodd
@LeonTodd 6 ай бұрын
SICK tone in the intro (once the cab kicked in :p)
@PhilsLab
@PhilsLab 6 ай бұрын
Thanks a lot, Leon - glad you approve!
@sandman94
@sandman94 6 ай бұрын
Very interesting, thank you! Your videos help me alot in similar hobby projects I work on.
@PhilsLab
@PhilsLab 6 ай бұрын
Thanks for watching!
@asmi06
@asmi06 6 ай бұрын
I see you took to heart my advice about placing guitar part to the beginning of the video! 😄
@PhilsLab
@PhilsLab 6 ай бұрын
Indeed! 😅
@Raonybarreto
@Raonybarreto 6 ай бұрын
Amazing video. I sent this week a email just talking about that for you. Thanks so much for this video
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you! Sorry for the delay, I'm away travelling at the moment, but will get back to you in the coming week
@guruG509
@guruG509 6 ай бұрын
Love your DSP videos
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you very much!
@CEric-xd2rt
@CEric-xd2rt 6 ай бұрын
2 weeks ago, i looking your youtube channel to find exactly this topic ! nice ;)
@PhilsLab
@PhilsLab 6 ай бұрын
Awesome, hope the video is useful! :)
@MeeBilt
@MeeBilt 6 ай бұрын
Thank you for this video, very informative. I'm really eager to try this out, but I'm thinking about using a DaisySeed from Electrosmith for this.
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you, great that you're gonna try this out! Daisy is a very similar platform so should be completely fine.
@baranelitez8016
@baranelitez8016 4 ай бұрын
Hi. Great video as always! I'm a fullstack webdev. I've been recently building analog guitar pedals as a hobby, and I began feeling confident enough to step into the digital domain. I can't thank you enough for putting these out for public! I do have a question. Asking this so I can learn what to look for while choosing an MCU for a project like this: I know there's huge differences between MCUs. But why do we use an H7 for this? Why not an F1 or F4? More importantly, what was your way of eliminating/comparing MCUs when beginning this specific project (leaving aside the GPIO pin count)? Is it the memory/HW FPU capability/clockspeed etc.. My gut tells me that if I were to begin a project like this, I should try many chips and fail/learn along the way, but if there's some obvious capabilities you knew that was imperative to this project, I'd love to learn about them too (and preferably save some money haha)! Thanks again for all your time. These videos are of great value and they help me a lot!
@martey-doku
@martey-doku 6 ай бұрын
Thank you Phil. This is brilliant. Any update on the ESC Hardware Design routing and FOC algorithm?
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you! I'd love to get back to working on the ESC - there are so many projects and videos in the pipeline. Need to get the boards ordered soon!
@exprymer
@exprymer 3 ай бұрын
Phill, could you make a video showing the Roundtrip latencies of I2s Codecs when coupled with the processing? time to execute or anything like this?
@ricarenado
@ricarenado 6 ай бұрын
Your videos and courses are amazing! Thanks for sharing your knowledge! Would you consider creating a Vitis HLS course?
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you very much! I'm afraid I'm too unfamiliar with HLS to be able to make content on that. Been thinking about what course to do next though - possibly a Nvidia single-board carrier board design, full DSP course, or iMX board design!
@user-jy5no4rt2g
@user-jy5no4rt2g 6 ай бұрын
Hey Phil, great video! Maybe you could make a video on using the filter mathematical accelerator that some stm32 microcontrollers include, that would be interesting especialy for the more demanding projects.
@PhilsLab
@PhilsLab 6 ай бұрын
Hey, Great idea - I was actually playing around with the FMAC recently!
@nicholassemmens7865
@nicholassemmens7865 6 ай бұрын
I have been scrolling through the video but i can't tell if you have any gain stages before the dsp? If so, what voltage ranges are you working with? Are you staying within that +-4.5V range? Can the codec handle that? Very interested in putting together my own system...
@rodolfomisao123
@rodolfomisao123 6 ай бұрын
Amazing 😊
@PhilsLab
@PhilsLab 6 ай бұрын
Thank you!
@mathmaker6946
@mathmaker6946 2 ай бұрын
you are a legend Phil, really good job! Do you think it´s possible to run something like it in a12 bit ESP32?
@freeelectron8261
@freeelectron8261 2 ай бұрын
Nice work Phil. Really interesting to see how a guitar cab IR is implemented. Just subscribed to your channel, can't wait to see all your videos. Do you have files for your ST32 audio DSP board or is that private?
@PhilsLab
@PhilsLab 2 ай бұрын
Thanks a lot! I'm afraid this board isn't public, sorry.
@777vic7or777
@777vic7or777 6 ай бұрын
Tyketto - Forever Young !!! 😀
@PhilsLab
@PhilsLab 6 ай бұрын
Finally someone recognised the riff! :D
@daviherculano8768
@daviherculano8768 6 ай бұрын
Hi Phil, could you please share the part number of your pedal footswitch and guitar cable receptacle?
@markocvejic6416
@markocvejic6416 4 ай бұрын
Hi Phil, what model of stm32 would make it to commercial product, like guitar pedals, H7 maybe? Is it possible, to make something of quality as big names in industry that uses sharck dsp's?
@PhilsLab
@PhilsLab 4 ай бұрын
Yeah, H7s are pretty common - also in commercial guitar pedals.
@eemhi
@eemhi 5 ай бұрын
Hi, man when you're planning to make a video on LAN 8720A PoE design.
@RobertGoldansky
@RobertGoldansky 4 ай бұрын
Now you have to spoof vibrato and become Spectrasonics :D
@exprymer
@exprymer 6 ай бұрын
I would like to know more about the layout of this board. Is there any video on it?
@PhilsLab
@PhilsLab 6 ай бұрын
I have videos going over aspects of mixed-signal board design, e.g. #78 and #88. Haven't made a video on this particular board yet however.
@Thats_Mr_Random_Person_to_you
@Thats_Mr_Random_Person_to_you 6 ай бұрын
Would an MCU that is tailored more towards DSP have extra perhiperals/instuction set additions that make things like realtime convolutions more efficient?
@quintenluyten6382
@quintenluyten6382 6 ай бұрын
usually, yes!
@PhilsLab
@PhilsLab 6 ай бұрын
Yep! However, I've also yet to try out the CMSIS convolution implementation to see if there is any speed gain there. Also, with an FFT-based convolution (future video), there should be some speed gain as well.
@Thats_Mr_Random_Person_to_you
@Thats_Mr_Random_Person_to_you 6 ай бұрын
Can't wait!!! All of these filter vids have been amazing at showing what is normally considered 'advanced' electronics theory but in a 100% practical way to make the knowledge useful! Often, stuff like this is taught purely theoretically and its dry and tedious. However, your content is able to cut through that, drop unnecessary tedium, and show practical examples that people can actually get their heads around .
@coderebel3568
@coderebel3568 6 ай бұрын
Hi Phil, I was wondering why the length of the sample would be a problem for an impulse response guitar pedal. You're only doing the FFT once in order to get the values for setting up the filter, right? In any production impulse response guitar pedal you'd just store the various values for setting up the filter as a hardcoded array of values, not process the actual impulse response sample while playing. Even if you want to keep the system so flexible that you could upload a new impulse response sample to the STM32, it would only need to be processed once.. And realistically, if it were my product, I'd make a piece of software to run on a computer which would do the FFT and then send the values for setting up the filter to the pedal in stead of the whole sample. Great content though. I never expected it to be just an FIR filter.
@PhilsLab
@PhilsLab 6 ай бұрын
The problem isn't getting the IR/filter coefficients, the issue is the time it takes to convolve the coefficients with new, constantly-changing input samples. The FFT was just to demonstrate the frequency response of the filter.
@coderebel3568
@coderebel3568 6 ай бұрын
@@PhilsLab Riight.. I guess I need to look in to it a bit closer. I didn't have a lot of time this morning. Thanks!
@mr.shredder5430
@mr.shredder5430 6 ай бұрын
this topic is what i was looking for thanks for sharing it means to me and everyone, the custom dsp sounds awesome, does some company like Roland and zoom use STM32 or do they use custom microprocessor
@PhilsLab
@PhilsLab 6 ай бұрын
Thanks for watching, glad you liked it! Companies use different processors, but often SHARC DSPs or even STM32s
@ligius3
@ligius3 6 ай бұрын
At least in some of my older multi-processors, Zoom uses their own custom chip which does analog stuff in addition to DSP.
@chikaBurton
@chikaBurton 6 ай бұрын
Great stuff. I'd guess that with 256 samples, latency is around 5.3ms? 1/48k times 256, if we ignore the time it takes for the multiplication operation, which is a microsecond or two?
@PhilsLab
@PhilsLab 6 ай бұрын
Thanks! Yes, that's right. For me personally, playing guitar, any latency better than approx. 20ms is okay.
@chikaBurton
@chikaBurton 6 ай бұрын
@@PhilsLab I agree that anything over 20ms becomes very noticeable. But I can kind of "feel" the latency over 12ms if I'm close to the speaker, and it's noticeable on headphones. The 5ms latency is equivalent of being approx. 1.7m away from the speaker when playing "full analog". So, there is some room for using more samples from an IR. One more question: can the samples be of arbitrary size or do they have to be powers of 2 (64, 128, 256), because judging from the code, there's no reason we can't pick any size (except for latency, of course)?
@PhilsLab
@PhilsLab 6 ай бұрын
Yeah, sample number can be an arbitrary size - doesn't have to be a multiple/power of anything. Unless you're doing FFT convolution.
@crosswick
@crosswick 4 ай бұрын
@@PhilsLab isn't the latency purely related to the chosen buffer size & samplerate, not the FIR impulse length? Also I'd like to get a sense of what you found the limits of the STM32H7 to be in regard to those three parameters
@man125403
@man125403 6 ай бұрын
isn't it better to replace impulse with a sine sweep? as i understand, this will improves the resulted IR quality even more.
@PhilsLab
@PhilsLab 6 ай бұрын
Yes, you can reconstruct the IR from a sweep. The files I downloaded happened to be in the format shown in the video.
@Tarnith
@Tarnith 6 ай бұрын
and likely were done with a sweep that was then de-convolved to recover the impulse =)
@crosswick
@crosswick 4 ай бұрын
Room EQ Wizard allows you to do this: play/record a sweep and transform it into an impulse
@wodddj
@wodddj 6 ай бұрын
May I shamelessly ask you if you can open source the hardware or make it purchasable?
@PhilsLab
@PhilsLab 6 ай бұрын
No plans on open-sourcing I'm afraid. However, if you're interested in purchasing a board or two, please send me an email to phil@phils-lab.net - thanks!
@mightyman111
@mightyman111 6 ай бұрын
Hey Phil, can you make a playlist for hobbiest to learn electronics and then learn PCB design starting from basic till advanced. As someone from non electronics engineering background I find it hard to learn hardware design, specially when my university has more software focused curriculam. But I want to learn electronics and make real world projects, just getting bored with learning only software.
@PhilsLab
@PhilsLab 6 ай бұрын
Hey, Thanks for your comment! I'd strongly suggest working through 'The Art of Electronics' book and creating the circuits in parallel, if you want to gain basic hands-on experience. What topics specifically would you want to see?
@mightyman111
@mightyman111 6 ай бұрын
​​​@@PhilsLabThanks for your response. It's my dream to be able to design an advanced flight controller for Quadcopter and Hexcopter which is able to record and transmit 4k quality videos and is extremely smooth in flight. Can you make a playlist for the same? I came to know that you work on these kind of projects. It would be great to learn from you
@PhilsLab
@PhilsLab 6 ай бұрын
The hardware-side for flight controllers (without video) is fairly straightforward, at least in comparison to the software aspects. The STM32 videos on the channel + videos on hooking up sensors + power supply vids are a good starting point. Then it's about chosing sensors, IOs, etc.. I'd suggesting aiming to make hardware that's compatible with already-available flight control software.
@mightyman111
@mightyman111 6 ай бұрын
@@PhilsLab can I expect some detailed videos from you on this? Would be helpful.
@PhilsLab
@PhilsLab 6 ай бұрын
Yes :)
@shamalperera4875
@shamalperera4875 6 ай бұрын
Sir..i am srilanka . I want ..THD 0.0006 transistors mono power amplifier circuit , +22v 0 _ 22v dual supply . 40w ❤❤
@lamngoc9896
@lamngoc9896 6 ай бұрын
can you make esp32 with ma12070p pcb? 😆😆plz
@PhilsLab
@PhilsLab 6 ай бұрын
The MA12070P looks pretty cool, haven't seen that before :) I'm not much of a user of ESP32 stuff, so it'd probably be with an STM32.
@ligius3
@ligius3 6 ай бұрын
The infineon part looks very interesing as it's plug and play, but the TI SmartAmp series is a completely new level. It can calibrate itself to the speaker and overdrive it for short periods without inducing harm. Not to mention built-in EQ. Unfortunately, apart from TI themselves, I've never seen anyone demo them.
DSP Overdrive Algorithm in Software (STM32) - Phil's Lab #117
32:52
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 5 МЛН
1❤️
00:20
すしらーめん《りく》
Рет қаралды 33 МЛН
FIR Filter Design and Software Implementation - Phil's Lab #17
30:35
PCB Traces 101 - Phil's Lab #112
30:19
Phil’s Lab
Рет қаралды 40 М.
Digital Filter for a Gauge with Arduino - easy Implementation for Makers (EP49)
7:53
Class D Audio Amplifier Hardware Design - Phil's Lab #125
27:21
Phil’s Lab
Рет қаралды 24 М.
Parallel Termination Basics - Phil's Lab #119
22:15
Phil’s Lab
Рет қаралды 21 М.
PCB Silkscreen & Solder Mask 101 - Phil's Lab #133
28:33
Phil’s Lab
Рет қаралды 11 М.
COPPER PIPE MADE INTO A STUDIO DELAY THAT RUNS AT THE SPEED OF SOUND
11:50
LOOK MUM NO COMPUTER
Рет қаралды 122 М.
PCB Design Final Touches (Tips & Checklist) - Phil's Lab #131
38:17
SPI Hardware & PCB Design - Phil's Lab #134
33:22
Phil’s Lab
Рет қаралды 23 М.
What percentage of charge is on your phone now? #entertainment
0:14
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 3 МЛН
Power up all cell phones.
0:17
JL FUNNY SHORTS
Рет қаралды 49 МЛН
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 981 М.
Samsung or iPhone
0:19
rishton vines😇
Рет қаралды 9 МЛН
wyłącznik
0:50
Panele Fotowoltaiczne
Рет қаралды 23 МЛН
Nokia 3310 versus Red Hot Ball
0:37
PressTube
Рет қаралды 3,8 МЛН