Algorithmic 8-bit workshop using ATMega328

I was asked to give a workshop regarding sound art in Super Public Art School that is held at Titanik-gallery in Turku. As I have been working lately with microcontroller based sound synthesis I searched for a good topic around this area. So the idea to build pocket sized audio players came a long. So here we go:

Workshop Description

From prehistorical computer era, one of the first applications outside of the scope of actual computation has been how to generate music with a machine only capable of conducting logical operations. Nowadays computer are faster than engineers of early 20th century could hope for and interest in this low level hacking has mostly ended. But during last few years, as the usage of ultrasmall but equally slow computers – microcontrollers – has rapidly grown amongst  non-engineers: artists, hackers and makers, again larger number or people are trying to synthesize music with fairly limited tools.
The final product in this workshop is a stand alone pocket player that plays through these one line symphonys indefinetly while the power is switched on. At first attendees will search an interesting line of code. Then a pocket sized player device is built. Last step is to insert the line of code to the player.
Algorithmic 8-bit workshop using ATMega328
Naturally attendees can modify this project to suit their needs. Here is some video of my simple and minimalistic proto version.
I’m hoping that the subject of this workshop scales up nicely depending of each individual participant. It is not necessary to understand much if nothing on either the electronic or programming side of this project to be able to finish it. But if one is more advanced there are zillion of things one can expand this project to make it more meaningful for oneself.

Background

There are few projects I would like to mention here as they will form a bases of our pocket player.
2009-2010 Tristan Perich released his piece 1-Bit Symphony that gathered wide international attention. The piece is a microcontroller based electronic circuit built inside a CD-case. The microcontroller executes a program that will produce a piece qualifying as a symphony in real time.
I can’t ignore the classic pocket player hit Buddha Machine here neither. This is project created by Christiaan Virant who has been able to sell thousands of these during last couple of years. On the video is some random dude demonstrating the usage and features of one of these.

One Line Symphony

We start by searching a decent line of code producing our symphony. There is lots of detail information about the theory behind the code at VIznut’s blog, but mostly the ‘composing’ phase is about random experiments. Though it is good to know the fundamentals of bitmath. Mostly to avoid spelling errors within the code. One can find online sound generator for testing out different lines. Although the microcontroller of our pocket player is not able to generate awfully long lines, so it makes sense to keep lines rather short.

Hardware

The hardware is a circuit designed around ATMega328 microcontroller. It is basically a minimal version of Arduino board. Each board will have at least following components:

Algorithmic 8-bit workshop using ATMega328 schematic

  • ATMega328 (or ATMega168 (or ATMega8))
  • 28 pin DIP socket (optional)
  • 100n capacitor
  • 2 x 22pF capacitors
  • 16MHz crystal
  • piezo speaker
  • 2xAA battery holder
  • piece of perfboard
  • metal wire

When working with battery power, we could probably skip all caps, but then again we want to be safe here. Note that this is very minimal setup, you will not be able to reprogram the chip through this circuit and the circuit does not include any input interface (such as button etc.). One can find a schematic of this ǔber simple schematic below:
 
For more detail: Algorithmic 8-bit workshop using ATMega328


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top