6 ANGRY MEN - Header TECHNICAL DESIGN COMMUNICATION INTERACTION 6ANGRYMEN WHO ARE WE BLOG
Audio controller

Earlier I talked about this project that I made with Patrick Brouwer. After all the positive response we got, we decided to make it available for everyone.

We wanted to make (multiplayer) flash games which could be controlled by your own voice. We first thought this would be very simple, since flash CS3 allows1 you to do a fft2 analysis on audio sources. However, this computeSpectrum3 function does not work on the microphone input (what a shame!).

We have created an alternative approach for this (worldwide4) known problem. We made a MaxMSP patch that does the FFT analysis and sends a OSC package5 to flash (with the help of a small java application). MAX/MSP6 sends the Amplitude and the pitch of a stereo signal (left and right). So, now we could use the input of the microphone to make a two-player game. If you only have one input they will both send the same data. In fact you will only get four paramaters in flash, you can do whatever you want with it (be creative)!

How to get this running.


First you have to download the package thats available here.

If you’ve got the package, unzip it and use your console to
start the FLOSC server;

java Gateway 7000 3000


When this java server is running you can launch the MAX/MSP file that is located in the “maxmsp/Applications/” folder. It’s available for both windows and mac. We also included the MAX/MSP source code so you can change the patch like James Howard Young did.

When you launch the MAX/MSP patch it should look like this:

Also make sure that in your Flash Settings you can always access your microphone. You can do this by editing your global security settings and ‘add a location’. Fill in a slash (/) here.

Then it’s all set to run the pong game! You can find it in the swfs folder!



Please let me know if you have any trouble running it, or if you have created something with it.

The steps summarized:
* Run the FLOSC server
* Run the application file (in “maxmsp/Applications/”)
* Run the SWF
* Give permission to access your microphone
* Play!

We released this project under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License, so please Share alike!




Flash Sound Controler by www.base42.nl is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.




1 Grant Skinner: Music Visualization Demos with computeSpectrum

2 Fast Fourier Transform

3 ComputeSpectrum reference

4 joshbuhler.com

5 FLOSC is the flash implimentation for OSC

6 Site to download MAX/MSP (not for free)

04.18.08
Jankees van Woezik
Comments

Timo 2 years ago

How do I get the FLOSC server running? I’m typing java Gateway 7000 3000 in my terminal and I’m getting the following error:

“Exception in thread “main” java.lang.NoClassDefFoundError: Gateway”

Jankees 2 years ago

Are you in the right folder (flosc)?

Timo 2 years ago

Thanks! I launched the max/msp patch, and it looks allright. But the pong game doesn’t react to any sound..

James Young 2 years ago

Try manually mousing numbers up and down in the number boxes (the four lowest in the max patch) and see if you get a result in the game.

Craig 2 years ago

This is fantastic! I’m curious if you think this could ever be utilized to receive audio input from a users cell-phone and then control display in flash?

Any insights on this question would be very helpful. Thanks much!

James Young 2 years ago

For routing cell phone, you could probably just run a minijack from phone to computer and do it like that, provided the phone had such an option. I’m not sure how else you would get the phone to interface with the computer. If you wanted to have people play the game “long distance” then you could “just” have them send the parameters over network instead. Failing that, you could use Skype and then route your system audio through a bus (like Soundflower) into the Max patch.

xi 2 years ago

is there a way to see the flash source code,i want to make a flash like this

Jason 2 years ago

Thanks for any help you might have. I thought I had it – terminal setup worked, runtime app behaving like it should, I followed the instructions to change the flash setting (this has worked for me in the past for other applications) but I still get an error: Error #2044: Unhandled IOErrorEvent:. text=Error #2031: Socket Error.
at org.fwiidom.osc::OSCConnection/connect()
at voicetrainer::MainController/initUI()
at voicetrainer::MainController/createUI()
at voicetrainer::MainController()

jankees 2 years ago

Hi Jason,

If you send me a mail I’ll try to help you…

Best,
Jankees

Jung Kim 8 months ago

Hi, This jung Kim.
I am having crazy time with Flosc stuff recently. I really appreciate your great work and your sharing.

I am studying things to communicate btw/ flash and max, just like you did.

anyway, I tried to test your sample, but I kept getting a error and I am thinking it’s because one of .as file directory is different.
It will be really appreciated if you might be able to help on this.
Thanks again for your great work and sharing.

Best,
Jung

Jankees 8 months ago

Hi Jung,

I just sent you a mail with some details, if you reply I will try to help you as best as i can.

Good luck,
Jankees

Post a comment

Name
E-mail
Website
Comment