SADI 2007 - StoryTelling - Week38 Reproducing Sound 2
Idea
Learn about the use of sound in different expressive ways. The goal of the day will be to create a prototype telling a story out of small space. Movements and sounds can be combined in the creation of contemporary music boxes.
Sound can be modified in frequency and volume. We use PWM to produce sound directly from microprocessors. More modern devices offer the possibility of reproducing sound files using external storage devices.
Agenda for the day
time |
title |
description |
|
10.00 |
D. Cuartielles will introduce a series of projects making use of sound as a way of transmitting stories. The examples are taken from different sources from the commercial field to the more experimental. | |
|
10.30 |
Types of uses of digital sound, tools to record, edit, and perform with sound. | |
|
11.00 |
Make a 30 seconds mix of sounds representing the use of a digital product. It could be a simulated phonecall, use of a computer, etc. It should transmit the idea of use without images. | |
|
11.30 |
SoundTrack of (a)Life Products |
Official release of the collection of different sounds representing products. |
|
12.00 |
Lunch Break |
relax for a while |
|
13.00 |
Seminar discussion |
Sound products, is there life after the MP3 player? What can be done? (bring your own coffee) |
|
13.30 |
Creating interactive surfaces out of almost anything | |
|
14.15 |
Playing sounds straight from Arduino. Build a system that plays a song when touching on a touch sensitive surface | |
|
15.00 |
Coffee Break |
go out if you are a chain smoker |
|
15.15 |
Sound toys |
Sound in toys comes 99% of the times from small memory packs inside of them. The quality of the sound is usually very low, but enough for the experience. Solder your own KIT and play sound with it. Hack it and make it play from Arduino. |
|
16.00 |
Play MP3 files stored in a USB-flash disk | |
|
17.00 |
EOD |
End Of the Day, the journey stops here, from 7pm we will keep on doing NON-mandatory work in the Interaction Lab, come to play with us! |
Today's topic
We are in the exploration of the use of sound. There are different devices that can be used in the creation of interactive objects producing sound. We will study the tools needed for sound reproduction, ways for integrating sound in the prototypes and reproduction of MP3 quality sound from external devices.
On the interaction side of the work, we will learn the magic behind touch sensors and will learn how to create simple interactive touch surfaces.
Examples to come
Digital Sound & Tools
Digital sound has different connotations for the users and for the technologists. There are tools to generate sound in real time, to record sound, to reproduce sound, to stream sound life on the internet, etc.
Here we will analyze the use of a couple of basic tools for recording/reproducing and synthesis of sound. There is a strong community of producers of semi-professional tools that will enhance the work made for many projects. We are going to focus in the use of two different tools:
- Audiacity: download the right version for your operating system from here, and don't forget the Lame encoder that will allow you to store your files as MP3
- Puredata: download the software from this site
Sound Surgery
Experiment creating the soundtrack of (a)Life products, express how a digital object sounds. You can choose to express the values of the product, the sequence of use, summarize the user experience, or just make a radio ad for it. Choose your product carefully and get it a beautiful soundtrack.
The experiment threw the following results, you may hear some interferences between melodies, we had no sound studio to record these hits.
track |
(a)Life product |
description |
download |
|
1 | |||
|
2 | |||
|
3 | |||
|
4 | |||
|
5 | |||
|
6 |
Code example touch sensors
The brand QPROX manufactures different types of sensor that go from single touch to full keyboards. It is possible to hide the technology behind any type of non-conductive materials like wood, plastics, cardboard, or glass. Here we will use a QT118 single touch sensor as the activator
int inputPin = 13;
int ledPin = 8;
int val;
void setup(){
Serial.begin(9600);
pinMode(inputPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop(){
val = digitalRead(inputPin);
if(val == HIGH){
digitalWrite(ledPin, HIGH);
}else{
digitalWrite(ledPin, LOW);
}
}
|
Code example for a melody player
It is possible to make very simple melody players with fairly good sound quality directly from a microprocessor. In this example we are going to build up our own small amplifier and attack it with the sound coming out from a digital pin in the Arduino board.
This example is making use of the following techniques:
- Serial library: Serial.available(), Serial.read()
- analog output: fading control through PWM
- Software commands: analogWrite(pin, value), delayMicroseconds(time)
- Components: sound speaker
- Sound production: period = 1/frequency, generating tones
- examples: Play Melody, Keyboard Serial
Code example to play from MP3 players
There exist a whole range of MP3 players that can be controlled from the serial port in a microcontroller. In this example we will use a new type of player that can play files stored in a USB-flash disk.
//MP3 control
int skipPin = 12;
int playPausePin = 13;
int val = 1;
int isPlaying = 0;
int isBeginning = 1;
void setup(){
Serial.begin(9600);
pinMode(skipPin, INPUT);
pinMode(playPausePin, INPUT);
}
void loop(){
val = digitalRead(playPausePin);
if(val == LOW){
if(isBeginning == 1){
Serial.print("V3A"); //play all files
Serial.print(13,BYTE);
isPlaying = 1;
isBeginning = 0;
delay(500);
}else{
if(isPlaying == 1){
Serial.print("E"); //pause
isPlaying = 0;
delay(500);
}else{
Serial.print(13,BYTE); //resume
isPlaying = 1;
delay(500);
}
}
}
val = digitalRead(skipPin);
if(val == LOW){
if(isPlaying == 1){
Serial.print("VSF"); //Skip forward one track
Serial.print(13,BYTE);
isPlaying = 1;
delay(500);
}
}
}
|