We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Play sounds through network
Page Index Toggle Pages: 1
Play sounds through network (Read 558 times)
Play sounds through network
Nov 30th, 2008, 2:56pm
 
Hi,
I've just started learning Processing and this seems to me an advanced question, but I just want to know if it maybe possible.

Is it possible to have two Processing programs in two different computers communicating?  I mean, two computers not in the same network. Maybe through the virtual machines?

At least, in the same network?

The next step: if they can communicate, is it possible to play a sound, in real time, from one computer in the other?
Re: Play sounds through network
Reply #1 - Dec 1st, 2008, 2:50am
 
This may not be of any help, and I haven't explored it myself, but if you're using Mac OSX, there's a program called "Audio MIDI Setup" which seems to allow MIDI communication over a network. I imagine there's some equivalent for Windows as well.
Re: Play sounds through network
Reply #2 - Dec 1st, 2008, 11:30am
 
megabulk3000 wrote on Dec 1st, 2008, 2:50am:
This may not be of any help, and I haven't explored it myself, but if you're using Mac OSX, there's a program called "Audio MIDI Setup" which seems to allow MIDI communication over a network. I imagine there's some equivalent for Windows as well.


Well, I'm on Linux, but I'm searching for some cross-platform solution and not MIDI related. I meant playing samples. I thought that osc communication might help.
Re: Play sounds through network
Reply #3 - Dec 1st, 2008, 12:40pm
 
pulseaudio should do that !
Re: Play sounds through network
Reply #4 - Dec 1st, 2008, 12:46pm
 
mots wrote on Dec 1st, 2008, 12:40pm:
pulseaudio should do that !


And is there a way to use it with Processing
Re: Play sounds through network
Reply #5 - Dec 1st, 2008, 1:01pm
 
I set up a linux to windows/ windows to linux network and accessed a soundscape generator on one of the machines through tcp/ip. This solution might be an overkill for you and perhaps not what you want to do but here's the info anyway.

I used the Network library in a processing sketch to connect to the sound generator software. The sketch would then send a simple text command over Tcp/ip whenever it wanted a sound played. Just make a Client object and instantiate it and then use the write method to send the messages. See the Client example.

The soundscape generator was running in python which worked pretty smoothly in both windows and linux.

Here's the link to the soundscape tool http://www.eblong.com/zarf/boodler/

You have to make a listener agent but it is all there in the help. I do recall having to change the way the python setup the socket initially to get it to work over the network and not only for localhost. If you get there and get stuck let me know and I'll dig up the details.

Of course you could equally write a Server sketch which catches the commands from the Client sketch and then plays sounds. I haven't checked out playing sounds from a sketch in linux.
Re: Play sounds through network
Reply #6 - Dec 2nd, 2008, 12:41pm
 
maiatoday wrote on Dec 1st, 2008, 1:01pm:
Here's the link to the soundscape tool http://www.eblong.com/zarf/boodler/


This seems really interesting, but I need time to understand it right. Anyway thanks for the suggestion.
Page Index Toggle Pages: 1