Wednesday 17 February 2010

Sound-Art



For this weeks experiments I used Processing together with the Ess library to make some art generated dynamically using sound. All of the pieces displayed use FFT to break up the sound into different frequencies and volume level to determine various aspects of the composition. The images presented are snapshots from the applet, which generates fluctuating and shifting imagery depending on the current sound being played.



All of the experiments were variations along the same theme and utilising the same data, however the compositions were altered by changing parameters such as shape primitive, colour, and position of the shapes, allowing them to be controlled by different aspects of the sound input for different effects. A certain degree of randomness was also involved in order to make the images a little more aesthetically interesting. These all take live input sound from the microphone so they are interactive pieces which can be played with and manipulated.



Complete Code-

import processing.video.*;
import krister.Ess.*;
FFT myFFT;
AudioInput myInput;
int bands = 64;

void setup(){

Ess.start(this);
myInput = new AudioInput(bands);
myFFT = new FFT(bands*2);
myFFT.equalizer(true);

myInput.start();
size(700, 500);
background(0);
rectMode(CORNER);
frameRate(4);

}

void draw(){

for(int i = 1; i < x =" myFFT.spectrum[i];">



Monday 15 February 2010

Analog-Mobile-Music


For one of this weeks experiment I decided to try something out from Nic Collin' book Homemade Electronic Music. Basically I bought a telephone coil from Maplins (£4.99 - looks a bit like a stethescope) which can be used to pick up electro-magnetic radiation given off from circuits and the like, and plugged it into a mini battery powered amplifier in order to sonify the electronic noises and bleeps given off by my mobile phone. I then recorded these into renoise and exported them as a wav.

This experiment interested me as it allowed me to make sounds using my mobile phone in a non-conventional way. Picking up the hidden sounds that the mobile phone gives off, and creating sonic output from usually inaudible sources. The noises made by the mobile phone are always in some sense there, giving off signals which our senses cannot perceive. In this experiment the inaudible, hidden elements of a device, utilised primarily for its audibility, are foregrounded, giving us a new perspective on mobile technology.

Monday 8 February 2010

Using Mobile Processing (Part 2)

My following experiments with mobile processing involved extending it to involve simple interactions with the user. I experimented with many things, touchscreen, sound, video and camera.

My first attempts with touch screen were quite successful, I basically made a very simple app that acted as a kind of "random bright triangles brush stroke" It was based on a simple sketch I saw for Processing by Vault Dweller. This midlet (at they are known) utilised the touchscreen on my phone as a method for drawing the images. The stroke comrpised of generating randomly sized and positioned triangles around the pointer, all with high brightness and saturation.

The following experiments were not so succesful. After wrestling for many hours with my phone, trawling message boards for help I came to the conclusion that my phone was unable to run apps that used either video or cameras. With regards to sound it was inconclusive - so if I desire to try again it might be worth playing around with making simple synthesizers for mobile phones. Although without a way to test or run apps (the emulator also wont allow video or camera input) it was impossible to extend out into these areas.

Here is the code for the Triangle's App (sorry, it has hacky and useless bits left in from other experiments which are unnecessary to run the app, but at least it works!) -

int x;
int y;
int lastX;
int lastY;
boolean screenTouch;

void setup() {
softkey("Shake");

x = width / 2;
y = height / 2;

framerate(15);
background(0);
stroke(255);
fill(0);
stroke(0);
strokeWeight(3);
colorMode(HSB);
}

void draw() {
if(screenTouch){

lastX = x;
lastY = y;
fill(random(0,255), 255, 255);
triangle(x + random(-20, +20), y + random(-20, +20),
x + random(-20, +20), y + random(-20, +20),
x + random(-20, +20), y + random(-20, +20));

}
}

void pointerDragged(){

x=pointerX;
y=pointerY;
redraw();
}

void pointerPressed(){
x = pointerX;
y = pointerY;
lastX = x;
lastY = y;
screenTouch = true;
}

void pointerReleased(){
screenTouch = false;
}

void softkeyPressed(String label) {
if (label.equals("Shake")) {
background(0);
}
}

Saturday 6 February 2010

Using Mobile Processing (Part 1)



My recent experiments have been trying to utilise the Mobile Processing language to create applets for mobile phones. Having used Processing before quite extensively these experiments were concerning how easy it was to write applications for mobile phones, in particular my own, the LG KP500.

The majority of my work was creating an environment to write these applets, which involved downloading mobile processing from http://mobile.processing.org/ and also a wireless toolkit for testing and running prototypes of my code before uploading them to my mobile phone, which for the mac, mpower player (http://mpowerplayer.com/sdk) is the only option.

Once these are set up it was simply a matter of writing the code and exporting it as a midlet for my mobile phone to run.

My first experiment features no interaction, it is instead a simple animation of a house with snow falling, this allowed me to experiment with movement, arrays, colours and shape primitives.

My results were successful on this first experiment with mobile prcoessing, allowing me to play the rather simple animation, as can be seen in the following photo, however the real test will be to explore the power of mobile processing for allowing interaction to take place, using touch screens and buttons which will be my next experiment.



Here is the complete code-

int snow[][] = new int[100][2];
int x = height;
int y = width;

void setup()
{
for(int i = 0; i < 100; i++)
{
snow[i][0] = random(0, height);
snow[i][1] = random(0, width);
}
background(0);
rectMode(CORNER);
}

void draw()
{

fill(245);
ellipse(20, 20, 30, 30);
fill(100);
rect(80, 20, 70, height - 20);
fill(140);
rect(60, 60, 50, height - 60);
fill(144, 31, 46);
rect(40, height - 40, 75, 40);
fill(200);
triangle(40, height - 40, 115, height - 40, 77, height - 65);
fill(0, 2, 40);
rect(60, height - 15, 15, 15);
fill(255, 243, 0);
rect(90, height - 35, 15, 15);
fill(255);
for(int i = 0; i < 100; i++)
{
int total = snow[i][0];
snow[i][0] = total + 1;
if(snow[i][0] > height){
snow[i][0] = 0;
}
ellipse(snow[i][1], snow[i][0], 5, 5);
}
}