FLOsc AS3 Classes

So Adam over at DustyPixels.com, author of the Fwiidom FLOsc AS3 classes, has very kindly said  I can do what I like with them.

You can get my modified version of his classes here (Update: download here) (Update: Finally found a more permanent home)

I really didn’t do much to them, except Occam seems to expect an integer instead of a string at some point, so I poked around in the function that builds the XML packets to send to FLOsc and changed an ‘s’ to an ‘i’. I also added a little debug feature as I got a little bored with my output panel being flooded with text, and made the output traces a little more readable. I’ll talk about how to use this in the coming tutorial.

Thanks Adam…


10 Responses to FLOsc AS3 Classes

  1. OmegaSupreme says:

    Would you be so kind as to repost the source ?


  2. No exceptions found says:

    Hi.. your link isn’t working, is it possible for you to reupload somewhere? sendspace, megaupload or anything like that. Would be very interesting to take a look at. I’m thinking of making a guitar app that I want to connect to MIDI via OSC. Thanks!

  3. tim says:

    Hi, sorry about the delay. I’ve just re-uploaded. again it’s a free site, so if the link expires, leave a comment and i will update…

  4. Aymeric says:

    Hello !

    Nice work! Could you please re-upload the classes ?

    The only point that I did not get is what port sould we set for the first arg in the Gateway command : Is that the actual Occam port ?

    Thanks a lot !

    • tim says:

      Found a proper home for the classes. The first arg. is the port that Occam listens on, and the second arg. is the port you can send OSC messages to Flash on.
      Keep checking back, i’m going to write a proper how-to before too long.

  5. Aymeric says:

    Thanks a lot. I am very curious about this Flash/OSC/Midi thing. I’ll check back with interest.

    keep it hot !

  6. Aymeric says:

    I finally got it working but in a strange order :

    – java Gateway 10000 57117

    Where 57117 is the Occam listening port

    In Flash (Air -based), i use :

    conn = new OSCConnection(oscIp,oscPort);

    where oscPort is also 57117. I use also the same port for sendOSCPacket, thus the port 10000 is never referenced in my code. Is that normal ? I works however, I am sending noteOn message to an Ableton’s miditrack.

    Another question : where did you get that touchscreen ? is it multitouch ??

    Thanks a lot.

    • tim says:

      That’s normal, 57117 will be the port you use to send OSC from Flash, whereas Flash will receive OSC on port 10000. Useful for getting some sort of feedback in your flash app for example.

      The touchscreen came from eBay, it’s just single touch. I’m working on a multitouch screen at the moment. All our progress will be posted here.

      I would be interested to see what you are doing with Live and Flash!

  7. Aymeric says:

    I do not have a clear Idea yet of what I want to do with Flash + Live. I was first thinking about making a Step sequencer for drums (I hate Live’s midi editor for drums, I prefer the old fashion Beat Machine style). I was thinking about integrating semi-random drum patterns for hihats for example (I produce techno).

    But your experimentations inspired me for other stuff:
    – LCD multitouch to make my own Lemur for Live (Lemur is about $2000 so …)

    There is a lot of middleman servers in this solution. Flash -> flosc -> occam -> live. And there is no other mean to communicate in the reverse way.

    I am not a Java programmer (I have some bases), but I was thinking of implementing the flosc XMLsocket server with a fully featured Midi server in Java to operate both sides without the need of using OSC (I know that OSC rocks, but as it is not implemented in Ableton, thus I stay semi-curious about this stuff). -> we only need a single middleman in this case.
    I already done some basic stuff thanks to the mmj library (Mac OSX coreAudio wrapper for Java) and I succesfully got midi packets from Ableton -> Midi notes and also Midi Beat Clock.

    On the other way, even if XMLSocket sounds good for this kind of implementation, I found an interesting project called Merapi, which can handle the communication between Flash(Air) and Java in AMF, which I think is way faster than XMLSocket (Binary vs Text).

    In all case, this solution would allow us to get information feedback from Live and grab this MidiClock to syncronise the flash view with the ableton state. I would allow for example to grab the signal of an external midi controller and apply curved function to a pad for example -> a pad which is sending a noteOn could be converted in a smooth curve applied to a send knob.

    An interesting stuff that I found for your LCD controller project (I am pretty sure that you already know about it) : http://digitalvolvelles.wordpress.com/2008/03/14/multi-touch-applications-with-flash/

    It allows Flash to handle multitouch events.
    I’ll keep you informed on my little progress on the java side.

  8. […] In Short: A Java server that creates a bi-directional channel for communication between OSC devices and Flash. Details: I did get it working, but Oscar is much slicker. If you’re on a PC, this is a great (perhaps the only) solution for OSC to Flash communication. There’s a new flOSC by tranxete, but like Red5 0.8, it requires Java 1.6, so it’s a non-starter for me. Starter Code: From tim, based on the fwiidom classes: flOSC As3 Classes. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: