Since I bought the Philips Ambilight I was frustrated because I was not able to change the color with my Mac or the iPhone. I now bought some IR controllable LEDs and integrated them into my HAL9031 API.
The iPhone App simply uses the build in accelerometer to rotate the colorWheel selection.
Tap the screen and the LEDs change their color!
The Flash Multitouch App changes the color of the LEDs and of the animation that loops in the background.
// The sound you can hear is programmed. It was generated by Flash & Midi.
Yes I had fun.
You might remember the soundMatrix I coded back in the summer. Version 2 is ready! Touchable & with MIDI support. In the first version I used to trigger WAV samples; version 2 now sends MIDI!
There is a online version with samples available, have fun!
For all those who want to know HOW to send MIDI via Flash:
You basically send OSC packets to a XML Socket Server. The FLOSC socket server has a output port that transforms the XML/OSC messages back to MIDI. I use a app called “Occam” for the MIDI transformation.
Update: people were asking where they can find “occam”: Occam was coded 1998 by C. Ramakrishnan at the University of California. If someone needs Occan, contact me – occam is not online any more.
Update 2: Occam works with Snow Leopard! Nice.
Update 3: Occam is online again! Here is the url: www.illposed.com/software/
Here is the code:
package com.thirtyOne.core{
import flash.display.*;
import flash.events.*;
import org.fwiidom.osc.*;
import caurina.transitions.Tweener;
public class MIDIGateway {
private var oscConn:OSCConnection;
private static const STR_LOCAL_IP:String="ZION.local";
private static const STR_REMOTE_IP:String="ZION.local";
private static const NUM_PORT:Number=6666;
public function init() {
//Initialize connection to the FLOSC server
oscConn=new OSCConnection(STR_LOCAL_IP,NUM_PORT);
oscConn.addEventListener(OSCConnectionEvent.ON_CONNECT,onConnect);
oscConn.addEventListener(OSCConnectionEvent.ON_CONNECT_ERROR,onConnectError);
oscConn.addEventListener(OSCConnectionEvent.ON_CLOSE,onClose);
oscConn.connect();
}
private function onConnect(evtEvent:OSCConnectionEvent):void {
trace("MIDI MODULE CONNECTED.");
}
private function onConnectError(evtEvent:OSCConnectionEvent):void {
trace("ERROR");
}
private function onClose(evtEvent:OSCConnectionEvent):void {
trace("CONNECTION TO SERVER CLOSED.");
}
public function sendMIDI(_note:uint,_velocity:uint):void {
//Send the actual OSC packet
///osc/midi/out/noteOnchannel (int)key (int)velocity (int)
oscConn.sendOSCPacket(new OSCPacket("/osc/midi/out/noteOn",[1,_note+"",_velocity+""],STR_REMOTE_IP,57117));
Tweener.addTween(new Sprite(), {alpha:1, time:.1, onComplete:function():void
{
// KILL MIDI NOTE:
oscConn.sendOSCPacket(new OSCPacket("/osc/midi/out/noteOff",[1,_note+"",_velocity+""],STR_REMOTE_IP,57117));
}});
}
}
}
thirtyOne Media
thirtyOne Media was founded 2002 by Andreas Rothaug.
After 10 Years of Flash Developing thirtyOne Media 2008 focused on state of art interaction and interface design.