The ATtiny MIDI Plug Synth

MIDI was created over thirty years ago to connect electronic instruments, synths, sequencers, and computers together. Of course, this means MIDI was meant to be used with computers that are now thirty years old, and now even the tiniest microcontrollers have enough processing power to take a MIDI signal and create digital audio. [mitxela]’s polyphonic synth for the ATtiny 2313 does just that, using only two kilobytes of Flash and fitting inside a MIDI jack.

Putting a MIDI synth into a MIDI plug is something we’ve seen a few times before. In fact, [mitxela] did the same thing a few months ago with an ATtiny85, and [Jan Ostman]’s DSP-G1 does the same thing with a tiny ARM chip. Building one of these with an ATtiny2313 is really pushing the envelope, though. With only 2 kB of Flash memory and 128 bytes of RAM, there’s not a lot of space in this chip. Making a polyphonic synth plug is even harder.

The circuit for [mitxela]’s chip is extremely simple, with power and MIDI data provided by a MIDI keyboard, a 20 MHz crystal, and audio output provided eight digital pins summed with a bunch of resistors. Yes, this is only a square wave synth, and the polyphony is limited to eight channels. It works, as the video below spells out.

Is it a good synth? No, not really. By [mitxela]’s own assertion, it’s not a practical solution to anything, the dead bug construction takes an hour to put together, and the synth itself is limited to square waves with some ugly quantization, at that. It is a neat exercise in developing unique audio devices and especially hackey, making it a very cool build. And it doesn’t sound half bad.

18 thoughts on “The ATtiny MIDI Plug Synth

    1. I’m working on a monophonic synth that works like Trautonium, would offer four voices (probably, I don’t have parts to test the hardware) and uses only a tiny microcontroller. Firmware I wrote uses 359 program words (out of 512) and only 27 bytes of RAM (out of 64). I hope it works…

        1. Not yet, lack of parts impedes hardware implementation, even on protoboard. The controller will be assembled from piece of Kanthal D wire powered by current source, over which there will be paper tape covered with tin foil to act as wiper of this crude potentiometer. Other potentiometer and button will be used to select instrument range and voice. Currently I’m waiting for package with parts for this project. In firmware I implemented rather crude FM synth with modulator waveform table of 8 points. That guarantees that frequency rate between carrier square wave and modulator wave will be 1:8. I’m not expecting to end up with great-sounding synth, but I think it still will be an interesting experiment in noise making…

    2. Hi janostman, I do like your dsp-G1, I think it was actually your projects that inspired me to get into this (also midi vampire).

      But flash size doesn’t really have much to do with it. Source code for this is about 1K, for the tiny85 cable it was 470 bytes + 800 byte lookup table. The limits are mainly RAM and clock speed, both of which the lpc810 has more of.

      I didn’t really want to do PCM output because of the difficulty in antialiasing. My mono synth cable has perfectly alias-free square waves, in tune, for the entire octave range. There’s also no buffer at all which means zero lag. This in some ways makes it better than software synths (in my opinion), and that’s what I was trying to recreate with polyphony here, didn’t quite succeed.

  1. A bit of evil in that build: MIDI is defined as requiring opto-isolation at every connection, to prevent current leaks from shabbily-built instruments from frying components. This obviously doesn’t, but it also obviously hasn’t got much current to leak to anybody else. Still, stands a big chance of getting fried.

      1. That chip has a ‘headphone mode’ and stuff like that, which you can all not use and it might be possible to use it as a basic MIDI signal injector at lower power than those 18mA.
        And it’s a bit unclear to me what a MIDI port can deliver, I saw 22mA mentioned somewhere but I also see it’s all a bit in the open what’s implemented. So you tell me.

  2. Further up J. List has an article on coax connectors and how there are obsolete and awful designs still in use, and here we see the old DIN connector, and boy is that a bad design, it’s amazing that the germans still have a good name in terms of engineering after inventing that connector type IMHO.

    But it is the MIDI standard so what can you do? Although now most all MIDI is done emulated over USB.

Leave a Reply to joelfinkleCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.