ATmega1284 As An 8-voice 32 KHz Synthesizer

A couple of things strike us about this 8-voice 32 kHz synthesizer. First is the cleanliness of the prototype. As you can see, each part has plenty of room on its own board and all are interconnected by 10-pin IDC ribbon connectors. But you’ll have to see the video after the break to enjoy the impressive sound that this puts out. You’ll hear it play the Super Mario Bros. theme; it does it with passion!

To get audio from the digital microcontroller [Mike] built his own R2R digital to analog converter. The resistor ladder is built from sixteen resistors, which feed a rail-to-rail amplifier. The sound is mono but the playback is polyphonic thanks to the work done by the ATmega1284. It is reading MIDI commands coming in from an external controller (we assume it’s the computer on which the hardware is sitting). The chip’s 128 KB of Flash memory leave plenty of room to store samples, which are selected from a lookup table based on the MIDI data. If more than one sample is to be played the chip averages the data and sets the 8-bit output port accordingly.

10 thoughts on “ATmega1284 As An 8-voice 32 KHz Synthesizer

  1. “The sound is mono but the playback is polyphonic thanks to the work done by the ATmega1284.”

    This could be written more clearly.

    Yes, this may be a bit of a nitpick, but this sentence is probably simultaneously confusing the n00bs and annoying others because:

    1) it makes an unintended link between the two subtly different paradigms of multi-channel audio (as in stereo/monaural/surround) and polyphony (in the context of a synthesizer in this case).

    2) it makes it seem as if the job couldn’t be done with another microcontroller.

    How about: “The sound output of the ATmega1284 is mono, but as the article title implies, 8-voice polyphonic.”?

    This isn’t the first time I see these sort of sentences crop up in HaD articles. Yes, I am also very aware that anyone who takes the time to try and correct these sentences are considered grammar-nazis.

    Just hear me out. I’m about to go on a tangent, but I think it’s important.

    I think sentences like these tend make people defensive. People come to this site not only to be entertained by cool projects, but learn a thing or two.

    When a sentence in an article doesn’t seem to quite agree with the mental model a commenter might have, they might question their own knowledge. There are 3 urges one might have in response to this:

    1) Ask a question in the comments.

    2) Propose a correction be made.

    3) F*** that. Those guys are all jerks. I’d rather Google it, possibly not find an answer, and then meander aimlessly on the Internet.

    The first two options are clearly out of the question in a hostile comments section.

    Given the traffic HaD gets, why aren’t there more comments and why are so many of those comments hostile?

    The cop-out answer is that the internet has a troll problem and “society these days sucks”.

    The real answer is that the quality of the articles vary and the reader appropriately responds. Yes, sometimes subject is so interesting or hyped up that people could care less about the article, but that’s an exceptional case. For example, when the Raspberry Pi was announced, people didn’t care about the article quality. Once controversy starting brewing, people began dissecting the comments of others and the article itself. Okay, the dissecting is human nature, but my point still stands that it’s up to the author to keep the confusion and ultimate defensiveness at bay.

    I feel like anyone who attempts to propose corrections is often mistakenly labeled as a troll. I don’t think grief-intending trolls are all that common. I also think it’s rare to see anyone appropriately tackle the points these “trolls” make.

    I don’t think anyone asking a question is trolled as much as they’re just not answered. I think this stems from the troll sticker that will be slapped on their forehead once they try and undo subtle misunderstandings without the grace of a ballet dancer.

    What I’m trying to say is that people who follow the rule of “if you don’t have anything nice to say, don’t say it at all” are just as bad as the trolls themselves. It’s political correctness and it kills these comments. What’s also killing these comments is the bad writing. Guys we all need to get it together. You didn’t get this kind of pep talk from the HaD staff or Jeri Ellsworth, but you are getting it from me.

    The sentence I just attempted a correction on provoked grammatical annoyance and thoughts of HaD and AVR sleeping in the same bed, but that’s just me. Why does it sometimes have to be so difficult to express simple concerns like that? I clearly have my heart in the right place. Should anyone have to be all cute and go “say it isn’t so” in order for people to not call them a troll when they get the urge to be skeptical? Tolerance should go both ways. The dream is that we eventually self-reflect and notice how crudely we say things. Courtesy isn’t a right, and it’s even sweeter when it’s legitimate.

    I’ll get off my soapbox now.

    1. i have noticed especially [Mike Szczys] to be especially lazy with fact checking and the way he writes his posts, i.e. nearly always pointing out random facts of the build so that i ask myself wtf

    2. The article text was pretty clear to me. Your comment though about the “sound coming out of the microcontroller” (“The sound output of the ATmega1284 is mono, and as the article title implies, 8-voice polyphonic.”) is just ridiculous and confusing — consider:

      1.) There is no sound being “output” from the microcontroller, as you imply. You make it sound as thought the microcontroller has these specific limitations. However, the sound is being output from a single DAC which the microcontroller happens to be driving. However, the microcontroller could be driving as many DACs as the engineer needs it to for a given application. Thus the microcontroller is not limited to mono sound, or 8 channels, etc. as your statement implies, only this particular build.

      2.) Contrary to what you said, polyphonic sound-synthesis can be DIRECTLY tied to how many DAC channels the microcontroller can drive (this is how old midi sound cards worked) — instead he is multiplexing multiple channels of sound in software with just one DAC by averaging the samples together.

    3. From many of the readers here, and of course the writers too, English is not their native tongue.
      The same goes for me too, I’m Dutch, but I’ve seen Russian, Greek, Chinese etc. and sometimes even contributions in Googlish…
      So to grasp the finesses in English language is hard, at least for me it is.

Leave a 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.