[#16] Guitar Distortion Effect - Audio DSP On STM32 (24 Bit / 48 kHz)

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 24

  • @dsmnoisemaker101
    @dsmnoisemaker101 4 года назад +5

    Awesome video!! I'm an experienced analog guitar pedal designer, and learning dsp with a esp32 a1s. I have a stm32f4 discovery, but it does not have a codec, so...
    Anyway, as an advice to get better results, you need to:
    - bandpass the input signal
    - use 1 to 3 clipping stages (do not use crossover distortion)
    - each clipping stage needs to have a high pass before it and a low pass after
    - for a "tube power amp" effect, add an extra stage with clipping and crossover dist. the crossover distortion is dependant of the amplitude, as it sets is when the amp is pushed hard and clipping (which makes the bias to drift) it does not happen on low amplitude passages.
    After everything, an lpf to smooth the piercing highs ( like 4th-6th order at 6khz) and a bass boost at 100hz to recover all the filtered lows, and you get a nice musical distortion.
    Cheers!!!

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 года назад +3

      Thank you so much for your great comment. Are u interested to get in touch with me? I would really like to make it better and doing a follow-up video or so..

    • @dsmnoisemaker101
      @dsmnoisemaker101 4 года назад +2

      @@YetAnotherElectronicsChannel yes of course!!!

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 года назад

      @@dsmnoisemaker101 Just sent you an eMail via the contact-form on your company web-page.

    • @dsmnoisemaker
      @dsmnoisemaker 4 года назад

      @@YetAnotherElectronicsChannel replied!

    • @MrMaximew
      @MrMaximew 4 года назад +1

      Hi guys ! @YetAnotherElectronicsChannel @DSM NOISEMAKER I am also looking to create my multi-effect pedal (based on STM32F407) with some features that you described, I can write some code but I'm beginning with STM32...maybe we could work together on that topic ?

  • @demoncloud6147
    @demoncloud6147 4 года назад +4

    This dude is a legend ! While I smash the "enter button" on a terminal running python interpreter on STM32, he is doing real DSP projects, wow wow wow !

  • @alanmarshall1090
    @alanmarshall1090 4 года назад +1

    Only discovered your channel today and binge watched all the videos and then you release two new videos in one day, awesome.

  • @yedey101
    @yedey101 4 года назад +18

    Interresting project you've got there. You are using a very "naive" approach there though, which generates a lot of unwanted artefacts. First of all you should scale down your value range when processing in float, typical DSP in floating point is done in the value range -1 to 1, because there it has got the highest precission. In your waveshaping algorithm you introduce huge discontinuities due to the hard switching through the "if" statements. Imagine 2 very close samples one above the threshold and one below the threshold, due to the different gains the one above the threshold is now a lot further away. This is very bad as it creates new frequencies at or even above the nyqist frequency that you can not get rid of anymore (=aliasing). There are several solutions for this eg. having a smooth gain curve (like the FL Plugin) or just limit the rate at which the gain changes (lowpass filtering the gain). Nowadays more commonly to avoid aliasing is to use oversampling, where you simulate the processing at 2x, 4x, 8x the samplerate and then you filter out any frequency above nyquist of your original samplerate before mixing it down again. Oversampling might be too processing intensive for MCU though. Beside the DSP stuff: "callback_state" should be declared as "volatile"

  • @MrMaximew
    @MrMaximew 4 года назад

    Wow the result is amazing !

  • @napent
    @napent 4 года назад +1

    Hi! Another great video, thank you!
    One small suggestion, nonlinear effects like distortion produces lots of harmonics, that will easily bend over @ Nyquist frequency.
    This is easy to observe doing frequency sweep of distorted sine wave while looking at waterfall spectrograph.
    Maybe you could create another video about oversampling and spectral analysis and aliasing?

  • @filipwodkowski7356
    @filipwodkowski7356 Месяц назад

    Could you tell me which pins from the pmod should be connected to the label pins in stm?

  • @1over137
    @1over137 Год назад

    As a thrash metal guitar type I always get irritated when people describe "this" effect as distortion. We call it over-drive. Almost every guitar processing "peddle" or "box" these days has several types of "distortion", including overdrive style "turning a valve amp up too far". However, if you carry on through the presets or components you will find the actual distortion. It produces a much different sound. The sound is mostly "grit" but the harmonics of the guitar string are somehow amplified differently, bringing out the primary harmonic cleaner and louder, almost sounding more pure on signal notes than clean does. Through a big amp the feedback focuses that effect. Leading to effects such as the ever hanging lead note that you can just hold forever because the distortion "cleans" up the harmonics such that the feedback doesn't degrade into cacophony but instead centres in on the one frequency and gives you infinite sustain.

  • @n3r0z3r0
    @n3r0z3r0 Год назад

    The screenshot of youtube page reminds me a good time when it was possible to rate video by comparing likes vs dislikes. We lost so much freedom ....

  • @subramaniantr2091
    @subramaniantr2091 4 года назад

    You're too good. Thank you very much. I always wanted an emulator to see how I need to engineer the sound. I appreciate Signal Processing a lot being an analog designer. I do have a great inspiration to start off back with my STM32. Do you recommend FL studio as a good DAW? Which is the DAW that you use?

  • @guitarbass95
    @guitarbass95 4 года назад

    Question about the hardware you're using. What kind of signal level are you feeding and outputting from the external ADC/DAC? Would it play nice with line and instrument level signal?

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 года назад

      guitarbass95 check out the schematic of the I2S2 pmod board and the datasheets of the adc/dac.
      Full scale input for the adc at 3.3v is roughly 660mV rms. But they have a 2:1 voltage divider so it’s 1,32 V RMS at input which is which is approx 4.6 dBu where clipping starts.
      For the output it’s 0.76 VRMS which is approx 0dBu max scale output.

  • @MatiasDLevy
    @MatiasDLevy 4 года назад

    Hi! It's great finding your videos. I have a quick question, if you have time to answer. I want to do some real-time DSP on microcontrollers, but I don't know how to set up a buffer (with it's audio callback). Do you know of any resources where I can get started?

    • @YetAnotherElectronicsChannel
      @YetAnotherElectronicsChannel  4 года назад +1

      If you want to stay with STM32, just watch my first STM32-DSP video on IIR filters. I explained it there very much in detail how the I2S and DMA is working.
      However - to set it up on other microcontrollers you have to ready the documentation in there. There are various concepts out there.. STM32 with DMA... Infineon's XMC I2S hardware can be used without DMA but has big FIFO buffers in the hardware integrated, etc..

  • @danielsaulheimer_leinad_re5045
    @danielsaulheimer_leinad_re5045 4 года назад

    I'm an analog engineer from Germany focusing on Guitar effects. I would really like to pick your mind on some future projects. Any possibilities to get in contact?

  • @michaelzemah1476
    @michaelzemah1476 4 года назад +2

    The End result is not very good my friend.
    You should try using u-Law or A-Law function as the output gain applied to the input level

  • @nhatcomnhom
    @nhatcomnhom 4 года назад

    wow :)) you do it so far than me :)) nice bro :)) some how i want to be your friend :)))) you know I made one when I were in university for my grandute project :)) and it max score btw :))