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

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ค. 2024
  • 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 หลายเดือนก่อน +3

    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 หลายเดือนก่อน +21

    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 หลายเดือนก่อน +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 5 หลายเดือนก่อน

      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 หลายเดือนก่อน +8

    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 หลายเดือนก่อน +2

    Thank you so much for the condensed knowledge. I'm barely scraping the surface of a rabbit hole.

  • @p_mouse8676
    @p_mouse8676 6 หลายเดือนก่อน +9

    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 หลายเดือนก่อน +1

      That's right :)

  • @mohamedyahia809
    @mohamedyahia809 6 หลายเดือนก่อน +12

    Hello Phil, can you make a future video about High Voltage PCBs ?

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน +8

      Hey Mohamed, Yes, that's a good topic for a future video!

    • @denislavdenchev2572
      @denislavdenchev2572 6 หลายเดือนก่อน +1

      That would be a great topic, thanks! ❤
      Designing PCBs for tube amps is a bit of a mystery to me

  • @EmbeddedEnigma
    @EmbeddedEnigma 6 หลายเดือนก่อน +7

    love to see your software related video, always learn something.

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน

      Thank you very much for watching!

  • @LeonTodd
    @LeonTodd 6 หลายเดือนก่อน +1

    SICK tone in the intro (once the cab kicked in :p)

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน

      Thanks a lot, Leon - glad you approve!

  • @RN-jq1oh
    @RN-jq1oh 6 หลายเดือนก่อน +2

    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 หลายเดือนก่อน +1

      Thank you very much, more of this stuff to come! Hope you get to try this out for yourself :)

  • @sandman94
    @sandman94 6 หลายเดือนก่อน +2

    Very interesting, thank you!
    Your videos help me alot in similar hobby projects I work on.

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน

      Thanks for watching!

  • @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

  • @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! 😅

  • @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 หลายเดือนก่อน +1

      Thank you, great that you're gonna try this out! Daisy is a very similar platform so should be completely fine.

  • @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! :)

  • @guruG509
    @guruG509 6 หลายเดือนก่อน

    Love your DSP videos

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน

      Thank you very much!

  • @martey-doku
    @martey-doku 6 หลายเดือนก่อน +1

    Thank you Phil. This is brilliant. Any update on the ESC Hardware Design routing and FOC algorithm?

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน +2

      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!

  • @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!

  • @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 หลายเดือนก่อน +1

      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!

  • @exprymer
    @exprymer 3 หลายเดือนก่อน +1

    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?

  • @freeelectron8261
    @freeelectron8261 หลายเดือนก่อน

    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  หลายเดือนก่อน

      Thanks a lot! I'm afraid this board isn't public, sorry.

  • @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!

  • @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?

  • @777vic7or777
    @777vic7or777 6 หลายเดือนก่อน

    Tyketto - Forever Young
    !!! 😀

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน

      Finally someone recognised the riff! :D

  • @rodolfomisao123
    @rodolfomisao123 6 หลายเดือนก่อน +1

    Amazing 😊

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน +1

      Thank you!

  • @daviherculano8768
    @daviherculano8768 6 หลายเดือนก่อน

    Hi Phil, could you please share the part number of your pedal footswitch and guitar cable receptacle?

  • @nicholassemmens7865
    @nicholassemmens7865 5 หลายเดือนก่อน

    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...

  • @exprymer
    @exprymer 6 หลายเดือนก่อน

    I would like to know more about the layout of this board. Is there any video on it?

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน +1

      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.

  • @RobertGoldansky
    @RobertGoldansky 4 หลายเดือนก่อน

    Now you have to spoof vibrato and become Spectrasonics :D

  • @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.

  • @eemhi
    @eemhi 5 หลายเดือนก่อน

    Hi, man when you're planning to make a video on LAN 8720A PoE design.

  • @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 หลายเดือนก่อน +1

      Yeah, H7s are pretty common - also in commercial guitar pedals.

  • @Thats_Mr_Random_Person_to_you
    @Thats_Mr_Random_Person_to_you 6 หลายเดือนก่อน +1

    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 หลายเดือนก่อน +1

      usually, yes!

    • @PhilsLab
      @PhilsLab  6 หลายเดือนก่อน +2

      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 .

  • @man125403
    @man125403 6 หลายเดือนก่อน +1

    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 หลายเดือนก่อน +1

      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

  • @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 หลายเดือนก่อน +2

      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

  • @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 หลายเดือนก่อน +1

      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!

  • @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 หลายเดือนก่อน +1

      ​​​@@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 :)

  • @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!

  • @shamalperera4875
    @shamalperera4875 5 หลายเดือนก่อน +1

    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 หลายเดือนก่อน +1

      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.