Tech Guides‎ > ‎

Google Talk in Max/Msp

For several projects, I have had the need to make a Max/Msp patcher communicate over the internet. 
The traditional ways of doing this involves net.send or other (See several examples here
But - This gives trouble if you don't know your IP address. I wanted something, that just works, regardless of where I have plugged the computer in each end in. Random WiFi-hotspot, gallery etc. All places, where it is impossible to open ports in firewalls or get a fixed ip-address.

Skip the talk - Here is the fun stuff to get you going fast

Google Talk to the rescue

Using a simple chat protocol, XMPP, to make computers talk to each other
  • Works behind firewalls
  • Low bandwith - No polling
  • Easy debugging - Just "listen" in on the chat to see what is going on
  • Talk to many nodes simultaneously
XMPP is the protocol that Google Talk and Jabber uses.  

The steps involved

Max -> Java : Using mxj objects
Java -> Google Talk : Using the Smack library

Is it fast enough? 

  • In the free Google App Engine solution, you can transmit up to 20 messages pr. second
  • If you decide to pay a few $ pr day to Google, you can get up to 500 messages pr. second 
This is fast enough for me. And, note, we are talking messages, not bytes pr. second! 


  • ? : It worked, but suddenly no messages is coming through
    • ! : Don't send to often. Watch you quota on Google App Engine. If you exceed you quota, it takes 24 hours to reset.