YM2149 and MIDI

I’m still working on my YM2149 synth project.I’ve added an optocoupler and implemented the MIDI protocol in my arduino code. I added support for lo-fi 4-bit drum samples. This was a well-known hack by Atari ST coders: updating the volume of a channel (set at the max level) at a high rate, like a classic DAC.

More to come. 🙂


Schematics:

Schematics
Arduino code: http://pastebin.com/BzaMhtuj

16 thoughts on “YM2149 and MIDI

  1. Oh, I love this. A great upgrade. What is the benefit of having Midi in your case (since the audio is piped from the computer)? Also, what is this magical ‘lo-fi 4-bit drum samples’ ?
    I have many questions because this is such a cool project. Ultimately, I’d like to build this to craft music for games I make.

    1. In the previous version, I used an USB to serial adapter to send raw data to the sound chip. I had to code a C# app to read .YM files and to stream data to this serial port.
      I decided to use the Midi protocol because this is the simplest way to turn this circuit into a synth and to use it with software like Logic Studio or Cubase.

      Now the 4-bit sample thing:
      This sound chip can only generate square waves, noise and silence. But each channel comes also with a volume control (on 16 levels). By changing this level at a 11kHz rate on a silent channel (which is stuck to 5V), I use this feature like a digital to analog converter.
      Drum samples are stored in the flash memory of the Arduino.

      1. but for the midi, you need an adapter right?
        I’m going to order the parts pretty soon but I still don’t know whether I should go Midi or Serial. Hope you keep posting everything here along the way. I will probably follow in your footsteps…

      2. Yep, I use an usb/midi adapter. And if I want to play live, I can plug my midi keyboard to this circuit, too.

  2. this was a pleasure to listen to. very impressive arduino project. can’t wait to see/hear more!

  3. Pingback: Quora
    1. As long as the binary code is smaller than 16kb, it is. =)

      But this code takes 21k of program space.
      You can remove some sample data to gain some space.

      1. So I guess the atmega328 would be a good choice 😛 By the way, I have just finished developing a shield based on your schematic. Gonna test it soon 🙂

Leave a reply to Oryx Cancel reply