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.
I’m sure I’ve seen this here before…
You might be remembering this [0] same guy but a different project and is linked in the article.
[0] http://hackaday.com/2016/01/08/the-smallest-midi-synthesizer/
I think that you can do better on the ATtiny2313. My dsp-G1 only has 4K flash and works.
The synths I run on the ATtiny85 (http://janostman.wordpress.com) only use about 1.5K flash and have a PCM output.
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…
That’s interesting, I was always into not-that-common musical instruments. I’d love to see how it works once it will be finished. Do you have already any particular results?
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…
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.
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.
ATSAM2695 (http://www.dream.fr/devices.html#S2) looks like it could fit into a MIDI plug. It has 64-voice wavetable poly and polyphonic lowpass filter envelope. I have the SAM2195 and it’s not bad.
18mA current draw.
Good luck getting that to run of the MIDI port.
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.
Polyphonic square wave midi tone generator. Not a synth.
I remember you said that the last time as well?
Well it acually synthesises something.
Square Waves :)
And I say it again!! :-) tone generator
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.
Surely DIN plugs are much nicer than USB connectors?
Wow, that is very impressive.
Like!!