Sense Disorder

20130516 15:38

This is an installation I built for artists Paola Livorsi and Hilda Kozári based on their concept. Livorsi is sound artist and Kozári is known for her smell oriented pieces and this piece, to be used in workshops for children, combines these both aspects. The installation itself is a wooden box with four doors. Each door has different color, smell and sound attached to it. In this project I was in charge of industrial and electrical design, programming and carpentry. This explains why this post will be highly technically orientated.

This is first installation I designed with 3D modeling program SketchUp. The design challenge here was to come up with design that can be put together with minimal amount of tools with minimal amount of budget while still coming up with something fairly professional. After initial design I took the measurements to woodware shop and took a pile of ready cut plywood pieces back to my shop. After two days of glueing, drilling, sawing and painting and the box itself was ready.

Each door has a small magnet embedded to them. Magnet is triggering a reed magnet switch that is read by a custom built electronic player board. Board consists an Atmega328 microcontroller that is controlling four VS1000 audio modules. Microcontroller was programmed with Arduino IDE. I could have used computer with multichannel sound card, but as the application was fairly simple, building a stand alone audio player from scratch makes more sense. Compared to a computer it is cheaper, boots immediately and is more robust.

VS1000 audio modules are quite nice alternative to Wave Shields or MP3 Player Shields commonly used with Arduino in applications such this. First thing, the price: at 16€ or cheaper they are way below the prices of neither of the alternatives. Audio wise they are able to output CD-quality stereo signal, something that Wave shield is not able to do. VS1000 module also is equipped with different outputs for headphones and amplifiers while MP3 player shield you cannot connect straight to external amplifier without additional circuitry. One thing that is really nice is that the source code of the firmware is available (although not open source). This allows you to modify the player functions, or even implement your application with VS1000 module alone as it has an array of I/O pins itself. Interfacing with ATMega328 can be done using UART serial connection. Though I needed to bring down the default baud rate from 115200 as SoftwareSerial library really is not able to read connection that fast (wonder why this has not been documented anywhere). I needed to use SoftwareSerial as I wanted to only use one microcontroller for controlling all four players. Last thing to mention is that one can update the firmware and even use the memory of VS1000 chip as a tiny harddrive to store audio files. And updating can be done easily by using the memory card, no external hardware is required. If internal memory of the chip is not enough, audio can be read from memory card instead.

The box will hide two pairs of cheap computer speakers, giving each door its own speaker. This way we are really able to bind audio to a single door. There is also two energy saving lamps installed inside the box to allow the colors of filters installed on each hole to become visible. The electronic player card can be seen behind left lamp. For the smell, essential oils are applied to tiny pieces of felt that are hidden in the space between the doors and color filters (not really visible in this shot).

Arduino code for the AVR can be found here.

EQ-1

20130219 12:17


This is a simple synthesizer designed to somewhat replicate the user interface of electric tambura (or trumpet) of legendary Finnish synthesizer Sähkökvartetti (Electric Quartet). During past few years I have had a priviledge to play and perform with this custom synth that was built and designed by Erkki Kurenniemi for Finnish folk artist M. A. Numminen. As there is only one instrument in existence, I decided to built my own pocket version of one of the many controller units Sähkökvartetti consists of. On the video below you can see the original synth being used by the band sharing the name of the synth, Sähkökvartetti.

The operation of this instrument is slightly modified from original. I have mixed the operation logic of another Kurenniemi synth, DICO in it. Similarly than on Sähkökvartetti, all parameters are digitally encoded on both synths, but the actual coding differs a bit, making DICO more suitable for tonic output. The buttons on the left are used for select the note. Each button will transpose note to a certain interval up/down. On Sähkökvartetti, these intervals would be minor and major second, major third and minor sixth. With these intervals by counting numbers from 0 upwards will give you a chromatic scale. While this is totally logical, musically it makes hard to play melodies. In DICO different intervals are selected. These are minor third, fourth, fifth and a tritonus. Musically these intervals make much more sense although playing scales would again be a bit of a struggle.

Two buttons on the left are used similarly as in DICO to select the octave to be used. On original Sähkökvartetti they would have been used for turning filters on and off.

This synth is built around ATMega168 chip, running 8Mhz without external crystal. The code is modified and cleaned version of nebulophone. That explains the potentiometer on the center (not absent in Sähkökvartetti) that is being used to select waveform (square, saw, triangle, noise) similarly than the waveform pot on nebulophone.

Algorithmic 8-bit workshop @ SPAS @ Titanik

20120928 18:37

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.

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.

2011 Finnish demoscene artist VIznut proposed a metodology with which to create a musical composition with just one line of code. This inspired people around the globe to search lines of code producing interesting musical pieces.

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:

  • 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:

We will use perfboard to build this circuit on. There are other ways to build this circuit also. One can for instance use stripboard or even solder everything straight to the DIP socket as shown in here. One possible layout for perfboard installation could be one below (note that PCB is illustrated from the top side of the PCB while your soldering will be going on at the bottom side!)

Programming The Microcontroller

This workshop is not about AVR programming but for those who are interested, I provide some information about how to program this device. For the rest of you I will simply burn the chip by using the line of code you were able to find.

The circuit presented above does not have any interface for programming so one needs to either use another board (for instance an Arduino board) to program the chip before attaching it to the socket or solder in additional headers through which connect a separate programmer device. If one wants to use FTDI cable etc. one probably wants to make sure that the ATMega chip has an Arduino bootloader burned to it. If you are using an ISP programmer, this is not required. If you are not interested in reprogramming the chip after the device is finished, forget this whole chapter.

If one is interested in tweaking the code for the ATMega chip, it can be downloaded from here. You can open this up by using Arduino IDE that you may download from here. Here is version that will iterate through a set of one liners when power is switched on and off.

The code updates audio output sample (around) 8000 times per second. We will simply update the sample when update occurs by using the one liner figured out above. In main loop we are not doing anything. So main loop would be good place to tweak parameters through different input methods.

Results

During two short sessions participants built their own pocket players. Some of the participants augmented the design with multiple algorithimic one liners, using either potentiometer or eeprom-hack to select the loop. There were also some attempts to modify the one line code parameters in real time by using potentiometer. Here is a short video of three pocket players trio concerto:

Thanks for everyone who participated and made this workshop possible!

Play with Words

20120519 12:26

Play with Words - performance @ 100 Dancers from Lauri Kainulainen on Vimeo.

In this project I together with Lauri Kainulainen, Juho Jouhtimäki and Sini Haapalinna created a interactive video projection installation. The basic idea was to make a ASCII graph video which was controlled in real time by using MIDI controllers and video tracking. Video tracking was done with Kinect depth camera. This piece of work has been presented twice. First time was at Copenhagen at the 100 Dancers Festival (where the video footage is from) in 2011. Second time at the opening of Helsinki Photography Biennale in 2012.

The Spatial Aural Exciter

20120508 13:34

The Spatial Aural Exciter is a project by Samy Kramer. It is a system consisting of tens or even hundreds of small synthesizer boards that can be controlled remotely. By this a cheap multichannel system with hundreds of individual channels can be put together. For this project I designed the basic electronic circuit and software running on individual boards. In typical setup the boards are connected in series and the control messages are routed through all the boards in this string to the board the messages was targetted. The software on the boards consists of communications and synthesis part. The communication part is implementing a MIDI like protocol I designed. Synthesis part implements a simple monophonic synthesizer with variable waveforms. In current setup the boards are controlled from a single computer using Pure Data. The software for the single board can be found at http://launchpad.net/thespatialauralexciter. The official website of the project can be found at http://exctr.net/.

This piece of work has been exhibited so far in numerous locations in Finland and Switzerland.

Nonduino

20100808 11:32

This tutorial is about building a minimal Arduino compatible microcontroller setup without using Arduino bootloader at all! What this means in practice is that you are able to use Arduino IDE and all the libraries but you will not need to upload the code using Arduino bootloader. The reasons you would want to do this are (I’ll probably add more entries to this list later):

  • Cost - use only minimal amount of components and save money.
  • The project you are working will not need to communicate with computer via serial connection.

This tutorial can be useful even if you wish to learn how to build a minimal Arduino and burn the bootloader to it.

Background

The setup described in this tutorial will consist of Arduino IDE, AVR microcontroller and ISP programmer. To understand why burning Arduino bootloader to the AVR one must first understand what the bootloader actually is. Bootloader is a tiny program that executes every time Arduino is switched on. It is then checking whether someone is trying to upload a sketch using serial connection (rx/tx pins). If not it starts the execution of sketch uploaded to Arduino.

Normally code to be executed is uploaded to AVR using ISP programmer. Also if you wish to burn Arduino bootloader to AVR, you need this tool to do it. Uploading code this way will work in similar fashion but the programmer is connected to different pins. So if you own ISP programmer it is up to you to decide whether you want to upload code using it or burn the Arduino bootloader to the AVR and upload the code using it via pins rx and tx. Naturally if you don’t burn the bootloader you will save some memory and sketches will start a bit faster (depending of the actual AVR you are using).

Lets get started

For the most minimal Nonduino setup you will need following:

  • AVR microcontroller, in this tutorial we are using ATMega8
  • 100n capacitor (if you are brave, you can also do without this)
  • Wires, breadboard etc
  • Nonduino definitions, just copy nonduino folder in it to the hardware folder (create if it doesn’t exist) of your sketchbook folder.
  • Arduino 0021

AVR chip costs around 3€ and cap costs more or less nothing. In addition you will need an ISP programmer, for connecting the chip to the computer while programming it. One costs ~20€ (bought mine from Stange-Distribution) and naturally no matter how many Nonduino projects you will make, you only need one programmer.

First step is to connect power to the AVR. Just connect pins 7 and 20 to +5V and pins 8 and 22 on ground. Place a capacitor between +5v and ground, preferably physically as close to pins 7 and 8 as possible. This is actually all we need to be able to run the program inside AVR (but you are not yet able to upload the code or actually witness the running as there isn’t any output components yet (which we will be doing in a bit). Also remember to triple check that you are using regulated power supply which actually gives you 5V. Power through USB is good. You may want to check out nice Instructable about building minimal Arduino.

Next step is to connect your ISP to AVR. Smart thing to do here is probably use a 6 pin female header as your ISP probably did ship with 6-pin male header. Connect it like this:

  • ISP RESET <=> RESET (pin 1)
  • ISP GND 2 <=> GND (pin 22)
  • ISP +5V 3 <=> +5V (pin 20) (optional, if you wan’t to power AVR through ISP)
  • ISP SCK 4 <=> SCK (pin 19)
  • ISP MSIO 5 <=> MSIO (pin 18)
  • ISP MOSI 6 <=> MOSI (pin 17)

To make this tutorial a bit more interesting we could add a LED to the circuit. Arduino pins don’t match the pins of AVR so you have to use this chart for figuring out where to connect stuff. Blink sketch that comes with Arduino IDE will have its LED attached to pin 13 so if you would wish to run it you would need to connect it to the pin 19 on AVR (which happens to be the same than we are already using with our programmer but that doesn’t matter).

Next step is to setup the fuses of AVR correctly. Stock AVRs are shipped with fuse settings that usually are not usefull in Arduino applications. The most important fuse bit is the one that sets the clock source and speed of AVR. In minimal setup we are using internal RC oscillator as the clock source of the processor. The cons are that you are running AVR in half speed. Also the clock speed varies according the actual voltage on 5V pins which might cause trouble in data communication protocols (after voltage is 4V or lower). For 8Mhz function set high fuse to D9 and low to E4. You can do this by using avrdude or AVR Studio (also check this site for more info on fuse settings. This fuse calculator will also give you avrdude arguments). You only need to do this once for each chip.

Uploading the sketch

If you copied nonduino definitions to your sketchbook, when you start the IDE you should see two Nonduino boards in your board list in the menus. Pick Nonduino 8Mhz. Then plug in your ISP that is connected to the AVR. You should be able to choose right port on your serial port list. Choose it and hit upload and that should be it! If your uC is not visible on the list, go edit flie boards.txt at nonduino folder by comparing it to boards.txt file that is shipped with Arduino IDE and you should be able to figure settings for uC you are using.

LASER - BACK IN

20100806 19:41

This is first release of little noise duo I’m forming together with Niklas. It was made during a visit in Timelab few weeks ago. It is a laser cut phono record that is ‘recorded’ with a drawing program. More or less guaranteed to destroy your needle. Check more detailed description from Niklas’ blog entry. We also made a video where I’m trying to explain what this is all about. You are also able to listen the tracks on Youtube (there are interactive buttons at the end of the video).

I would also like to thank Frédéric Alstadt from ANGSTRÖM MASTERING for quality control of Back In.

At the moment Laser is buzy composing new tracks to future releases and continuing perfecting our expression to maximal satisfaction.

Audio graffiti

20100618 00:07


Audio Graffiti project was developed as part of Roland Cahen’s sound art workshop between 7 and 11 September 2009 at Computer Music and Technology department at Sibelius Academy Finland. Concept and design was developed by Matti Luhtala and myself. Workshop outcomes were published in 14 September at old railroad tunnel redefining the previously forbidden space. Idea was to make a graffitti that makes sound by itself.
The version that we came up with wasn’t actually painted, we used alumium tape in stead of real conductive paint. To connect the electronic circuit to the alumium tape we used much more expensive copper tape. Copper tape is quite awesome stuff, the magic is that the glue on the tape is also conductive which is not the case with common alumium tape. As the glue is conductive, you can just tape a circuit on a surface. So we used common alumium tape for larger surcafes and copper one to connect two alumium tape slices to each other or to circuit itself. If we would have used conductive paint, we would still have used the alumium tape to make sure the paint is well connected to the other components. This project didn’t need too many components: couple resistors and capacitors, solar panel and piezo.
The fundamental idea was to have a painting that would produce sound without any other power source than the sun. Basic idea was ripped of from Ralf Scheiber even though we didn’t use any of his concrete designs on our graffitti. Instead I designed my own circuit using some random 4 gate NAND chip that was lying around in my stach. NAND gate synths are quite easy to design. As I’m writting this half year after this project was done, I don’t anymore remember the actual diagram, but fundamental idea is to create zillion wacky feedback loops between the gates of the chip. Tuomo Tammenpaa has detailed description at his blog about NAND chips. When you understand the magic behind the chip, you can pretty much consider it as four module modular synthesizer and patch it any way you wish to. If you don’t, just follow Tuomo’s blog entry and replace power source as solar panel.

It turned out that tuning the circuit is extremely hard as everything affects anything and sun being the most important input source keeps moving in the sky! But when you get everything tuned correctly, you will have your bird chirping by almost unheardable volume under the traffic noise. Which I in a way enjoy as trying to cover noise with sound is always some kind of loudness war. Even though chirping of the graffitti is super quiet, it can be heard surprisingly far, assuming that you are quite young person. That is probably as the frequency band the chirping happens isn’t that crowded of traffic noise.

Images © 2010 Matti Luhtala / Tunnelvision

Kohtauskone

20091001 17:05

This one is a small project that I had to do twice to get right. It is a pedal used for controlling strobe light through DMX protocol. Technically it is built on top of a Pro Mini Arduino with simple DMX driver circuit. It has button to kick the action, rotating switch for choosing different presets and one switch for future expansion. You could basically control any DMX device with this hardware, but I built it for Stairville 1500DMX strobe light.

I made first version half year ago. At that time there wasn’t real DMX library available, just and example sketch that had suspicious elements in it. However it worked fine when powered through USB but for some reason quite buggy when external power supply was used.

The main difference with this second version is size. As Pro Mini is so tiny, I could build whole thing to a smaller box. I know there are lots of people who don’t understand what would be the point in using a non USB version of Arduino board, and this is a perfect example of the project where you will not want to fit Duemilanove inside. Also I wanted to minimize all external wires, so I made this one to work with 9V battery. Below is the picture of the finished product.

First step was to build a DMX driver. I used the instructions at Arduino Playground but built the circuit on tiny piece of circuit board. The circuit gets power through Arduino and outputs + and - data lines to xlr jack. Note that I used evil 3 pin XLR as my strobe light does use that one. Officially you would use 5 pin XLR jack. You can see the driver on the bottom right of the picture above.

I really like rotary switches as you can fit lots of different functions in such a small space. I basically soldered 100 ohm resistor between each pin, using the switch as stepped potentiometer. Similarly as potentiometer the values can be read to the Arduino using analogRead-function.

During the summer folks at Tinker.it did come up with this extremely simple DMX library called DmxSimple. It is basically doing all the hard stuff in background and enables you to focus completely on the actual features your device needs to have. The library comes with couple simple examples of which other one is for stand alone project like this and another to computer/DMX interaction.

DMX protocol in itself is rather simple. Each device has an address that can usually be changed somehow on that very device. For instance my strobe light has a dip switch that is used to select the address. I have selected address ‘1′. If you know the address of the device you can adjust the parameters by sending a value between 0 and 255 to that address through your DMX controller. That usually adjusts the brightness or does something more special for the light you are controlling of. In many cases you can control more than one parameter of the light. In that case addresses following the first address are used. For instance my strobe light has two parameters, speed and brightness. If I send DMX message ‘255′ to address ‘1′ and DMX message ‘100′ to address ‘2′, the strobe light blinks as fast as it can but not as bright that it could. If I would change the start address of the strobe light to 100, the channels I would need to send DMX messages to would be 100 and 101. Here is the picture of my strobo lights address selector switch.

At least my strobe light works such that if DMX flow (the library is continously sending DMX messages in the background) stops, after half second it updates it both channels to zero and stops blinking. Therefore it is possible to switch the controller of to save battery even if the strobe is on. However I am planning to install a relay to the pedal that would switch the power off of the DMX driver when it is not needed to extend battery life.

Here is the code I have used. It is fairly simple to modify to function with different lights and such:

/* Simple strobe light pedal example
** (c) Jari Suominen 2009
** This piece of software is hereby released to public
** domain.
**
** It uses DMX simple library which is available from:
** http://code.google.com/p/tinkerit/
 */

#include <DmxSimple.h>

#define button 6
#define rotary_switch 0
#define strobo_address 1

boolean button_pressed = false;

void setup() {
  DmxSimple.usePin(3);
  DmxSimple.maxChannel(2);

  pinMode(button,INPUT);
  digitalWrite(button,HIGH);
}

/*
  Main loop, checks if pedal has been pressed or released
  and works accordingly. For the sake of clarity I'm not using
  all possible presets here.
 */
void loop() {
  if (!button_pressed &amp;&amp; digitalRead(button)==LOW) {
    // Button was just pressed
    int preset = get_preset();
    if (preset==0) { // FAST
      DmxSimple.write(strobo_address, 255);
      DmxSimple.write(strobo_address+1, 255);
    } else if (preset==1) { // MEDIUM
      DmxSimple.write(strobo_address, 150);
      DmxSimple.write(strobo_address+1, 255);
    }
    button_pressed = true;
  }
  else if (button_pressed &amp;&amp; digitalRead(button)==HIGH) {
     // Button was just released, lets turn the strobo off.
    DmxSimple.write(strobo_address, 0);
    DmxSimple.write(strobo_address+1, 0);
    button_pressed = false;
  }
}

/* returns the value the rotary switch is set to */
int get_preset() {
  int val = analogRead(rotary_switch);
  if (val < 50) {
    return 0;
  }
  if (val < 110) {
    return 1;
  }
  if (val < 210) {
    return 2;
  }
  if (val < 300) {
    return 3;
  }
  if (val < 400) {
    return 4;
  }
  if (val < 500) {
    return 5;
  }
  if (val < 600) {
    return 6;
  }
  if (val < 700) {
    return 7;
  }
  if (val < 800) {
    return 8;
  }
  if (val < 900) {
    return 9;
  }
  if (val < 1000) {
    return 10;
  }
  return 11;
}

Pallo

20090811 11:29

This is a gesture controlled MIDI controller I designed and built as a commissioned work. It has a tilt sensor which affects to MIDI parameters it is sending out but also the color of the ball. I built several stereotypes to get it work the way I preffered. The pictures are from third generation. I am currently putting together fourth generation with better LEDs.

Pallo has two groups of four LEDs: red, green, blue and white LEDs. All are LEDs are superbright. I’m using red, green and blue leds to for rgb colors and white to give white color, as it seemed that creating white with colored leds was difficult. In future models I’m testing true superbright RGB LEDs that shouldn’t have this problem.

Get the Flash Player to see this content.

The heart of the controller is Arduino microcontroller. I have used Pro Mini -version of Arduino. It is fully functional Arduino without usb connection and built to a circuit board size of a stamp. The tilt sensor is Lilypad Accelerometer and the device is powered from on 9V battery. One battery should last approzimately 10 hours.

The MIDI signal the device is sending out is two different CC parameters that are tilting in X- and Y-axis. Sadly there is no footage of using the MIDI out of the device which I didn’t have time to shoot before I sent the ball(s) to my client.

If you are interested of custom MIDI controllers, please contact me and I’ll see what I can do.

Making of with more details coming soon…