Simple MIDI synthesiser using an AVR ATmega328 (2-operator FM)

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

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

  • @aidanb5021
    @aidanb5021 9 месяцев назад +1

    Thank you for making the code for this open source! Made my coding a whole lot easier!

  • @user-io3yy9vp9n
    @user-io3yy9vp9n Год назад

    Cool Project! Can it emulate an acoustic piano?

  • @axs203
    @axs203 Год назад +1

    You sound like like Fred Harris!!

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

      Haha, you're not the first to point that out! :D

  • @AjinkyaMahajan
    @AjinkyaMahajan 3 года назад +2

    Good project. I will try to replicate it but with Raspberry pi and python.
    Thanks once again for the inspirational idea.
    Cheers ✨✨

    • @benryves
      @benryves  3 года назад +1

      Thank you, good luck! It's pretty terrible code to use as a reference but I was just trying to get something working as a proof of concept. I noticed one mistake with the code I uploaded when refactoring it, line 141 of main.c uses envelope_c_amplitude when it should use envelope_m_amplitude to scale the modulator's amplitude. Giving the "brass" modulator a higher amplitude makes the sound brighter, for example.

    • @user-io3yy9vp9n
      @user-io3yy9vp9n Год назад

      @@benryves Please tell us in more detail about the principles of FM synthesis. What built-in peripheral devices of the microcontroller are involved and for what. With code examples in C whenever possible. And also why only 2 channels are implemented? Many years ago I met Elm Chen's project, which synthesized an incredibly beautiful polyphonic sound on ATtiny45. The melody was, if I'm not mistaken, Beethoven's Für Elise.

    • @user-io3yy9vp9n
      @user-io3yy9vp9n Год назад

      @@benryves Personally, I tried to synthesize 4 simultaneously sounding square waves, sum their amplitudes, modulate 1 PWM channel with them and play them using a speaker. Everything was implemented on a single timer, which worked in PWM mode with a fixed frequency, and its interrupts were used to calculate the periods of four waves and their sum.