Flash and PD


I never thought the day would come but here it is. I agree with Steve Jobs. Flash must die. It is evil. It has sucked hours of my life away and given very little in return and even when it does decide to play nice it invariably comes with the message: “Please upgrade your flash player now” However I am not here to rant about Flash I am here to explain the difficulties in getting it to communicate with PD… So here it goes.. As part of our workshop class this semester we studies Flash, PD and Arduino, and for assessments we need to demonstrate that we have a solid understanding of these projects as well as create a prototype of our FYP. Now you would think that this would be pretty straight forward as Pure Data and Arduino are both open source and aimed for artists so how difficult can it be?

So first things first I open up pd and get some really nice stuff going, a toner, random sounds being generated and converting sound through my mic to midi/ audio. They still visually look crap though so I thought I would create a nice flash interface for them so first things first I went to good old google and typed in flash interface pure data.

Ok so then it is possible to do PHP to PD without using OSC. Sweet. Only its not really because I have no idea how to program in PHP and as the kind person mentions in there post this is not exactly fool proof either unless it updates every half second or so.

So after a couple more hours of trawling the net I came across flashserver developed by Olaf Matthes which is a pd extension. Sweet I though, an extension is exactly what I need. Only it is no longer available to download and while it is available at Local Disk (C)>Program Files>pd>extra>flashserver  there is no support or documentation as the library is no longer supported by PD.

So that leaves me with FLOSC which is a mix between Flash and OSC. It is available to download here. It is techie and geeky and not very easy to follow but It does work. You need to define your ports based on the below taken from benchun.net

"java Gateway oscPort flashPort

where oscPort is the port where flosc will receive OSC packets (the UDP port for it to listen on), and where flashPort is the port to which Flash clients will connect (the TCP port you’re using in Flash).”

It is not easy and you do need a good grasp of networking to get a hold of the general gist but it does work. Further info can be found here on the OSC site.

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