Sunday, July 15, 2007

Phone fun


After having had a nice night out last night, i decided to plug my phone synth into some cheap and nasty effects pedals and have a jam. I have made a slight update on the phone synth program - there are now octave change buttons (left and right keys). Check out this stuff in action here: http://www.youtube.com/watch?v=SzECOGeKWKo

You can download this version of the app here:
http://www.milkcrate.com.au/_other/downloads/mobile_phone_apps/live_instrument.zip

You will need a phone that is compatible with J2ME / Mobile Processing. You can find a list of some of the phones here: http://mobile.processing.org/phones/list.php

Here is the code for this app. To use the code, you will need to download Mobile Processing here (this is not required if you just want to run the app):
http://mobile.processing.org/download/index.php

You will also need a Wireless Toolkit (this is not required if you just want to run the app). For windows:
http://java.sun.com/products/sjwtoolkit/

For Mac OSX:
http://mpowerplayer.com/


/* Simple Live Instrument (for mobile phone)
by Sebastian Tomczak
14 July 2007, Adelaide, Australia

*/


import processing.sound.*;

int keyvalue = 0;
int octavevalue = 45;
int[] pitches = {
0, 2, 3, 5, 7, 8, 10, 12, 14};

void draw() {
}

void keyPressed() {
if(key >= '1' &&amp;amp;amp;amp; key <= '9') { keyvalue = key - '1'; keyvalue = pitches[keyvalue] + octavevalue; Sound.playTone(keyvalue, 100, 100);} if(keyCode == LEFT) { octavevalue = octavevalue - 12;} if(keyCode == RIGHT) { octavevalue = octavevalue + 12;} }

5 comments:

Tom Edwards said...

Hey sebastian,

sorry to trouble you again, but the link appears to be down for the .jar file. Any chance of emailing it to tommyrot at gmail.com?

Still getting my head around the mobile processing stuff, I came across a cool little drum machine midlet made using processing as well:

http://www.em411.com/blog/3679/0/Cell_phone_drum_machine.html

Sebastian Tomczak said...

No probs at all, Gwyn.

I have updated the link.

Gabriele Catalano said...

Hello sebastian,
you're great!
there are problems with the download of your application...safari can't find the link...
can you e-mail me to Gabriele.Catalano@gmail.com?
thank you

Sebastian Tomczak said...

Gabriele,
i have updated the link in the main post now.

cheers,

Rodolfo said...

hi, your app looks very nice, congrats on that.

I have a touch screen phone - LG - and I installed it but, despite the app running, nothing happens...

I'm thinking that this is due to the fact that it uses a virtual keyboard; any insight on this?

cheers