We’re very sorry, but have have decided to stop development on this. Twitter is changing their API too often, and we don’t have the time to keep up.

It’s open source, so it would be fantastic if someone cares to take over and update it. If you do, please let me know and I’ll update it here πŸ™‚


UPDATE 01: Courtesy of Dennis Fischer from Ableton Live, we have a cool update to the Live device! You can automatically tweet the clip name currently playing. Great for DJs. Just Download it again if this update interests you.


Want to send a tweet directly from Max/MSP and Ableton Live? This Max To Twitter patch and Live to Twitter device will get your tweets up and away!

A while back Matthew Eddey and I developed a patch to send tweets from Max/MSP. When Twitter changed their API the patch stopped working. However, thanks to Mathias BrΓΌssel and his awesome Ruby programming skills, it’s working again! He has put in a ton of hard work on this. Thanks, Mathias!

getting it working

1. Download and install the [ajm.ruby] external by Adam Murray.

2. Download the Max + Live To Twitter patches, place the whole folder in your Max search path. You can move the Max For Live Device to where you keep your other devices.

3. Get your Twitter access codes by going to http://dev.twitter.com/apps/ and registering yourself an app.

  • Make sure your application type is set to client

  • Make sure your default access type is set to read & write

4. Now you need to copy your access codes into your patch

  • Find your consumer and secret keys on your new app’s main page
  • Find your access token and access token secret by clicking my access tokens in the right side bar

  • Copy them into your patch via the enter access codes subpatch

  • Once the codes are copied and pasted, save your patch so that it stays in memory and you don’t have to do it again.
  • For the Live To Twitter device, you will need to go into edit mode, enter the codes and save the patch.

That should be it, type your tweet and hit “Tweet”. Have fun and don’t hesitate to say if you’re having issues or want to share some cool projects you’ve done using it.

36 Responses to “Max + Live To Twitter {+ software}”  

  1. 1 jkant

    Very nice! Thanks

  2. 2 Kim

    Wow – I’ll definitely use this when i play my 3-hour sets – kind of a live-streaming situation then πŸ™‚

  3. 3 Tam

    Hello Andrew Soitz

    I am having difficulty getting the Tweet a sound app to work. I have draged it to my applications folder on my mac but when I click it nothing opens. I am running Mac OSX 10.6.7

    I also tried to download Max and Live to twitter. After following the instructions and moving the lib files to cycling/java/lib.
    I get a message in the max window saying:
    ‘ajm.ruby did not initialised’

    I may have missed something silly but wondered if there were any known issues with Tweet A Sound on OSX 10.6.7 or any suggestions

    Very excited about getting it working

    Cheers Tam

  4. 4 Andrew Spitz

    Hey Tam, sorry you’re having issues. It’s definitely not a OS issue cause I’m also on 10.6.7. You saying Tweet A Sound isn’t opening at all? I’m not sure why TAS wouldn’t open. It often takes a while, have you waited long enough?

    You sure sure sure you followed all the instructions for the M2T patch?

    If you don’t come right, send me an email at andrew [at] soundplusdesign [dot] com and we can try figure this out.

  5. 5 Tam

    Hey Andrew

    Its working great now thanks. Just uninstalled it and re installed it……….. Must have been them gremlins!!


  6. 6 Andrew Spitz


  7. 7 ceazarj

    For some reason I cant get the keys to save, I went into max edit mode saved it, even created a device rack and saved that but everytime I fire it up it says authorisation failed and it has no keys in the text field, but it works when I do have them there, its just not saving them….

  8. 8 Andrew Spitz

    Strange, not sure why. Maybe you can just put message boxes above and just [loadbang] them into the [textedit]s. Just a workaround.

  9. 9 Mathias Bruessel

    @ceazarj – Guess you are mainly using the Twitter for Live version, right?

    So you are opening the sub-patcher (enter access codes) to put in the keys and then saving the Max-Live-patch, which sadly by design is not enough here. (It acually is done like this to hide the keys once you have put them in)

    So here is what you may try to solve the problem:

    1) Open the patch in edit-mode
    2) Open the sub-patcher (enter access codes), put in the keys
    3) Open up the [EnterAccesCodesHere]-subpatcher for edit (i.e. press the unlock icon on buttom)
    4) and save this subpatcher via file->save or

    Number 4) being the important bit πŸ˜‰

    Hoping this helps and you keep on having fun with MaxToTwitter,

  10. 10 Peter

    Would it be possible to read tweets with a certain hashtag from twitter and manipulate them in Max MSP?

  11. 11 Andrew Spitz

    Totally! Mathias and I are working on a BIG update, which will involve all the “receiving” stuff. Aiming for around November πŸ™‚

  12. 12 John

    Hi Andrew, thank you for the reply. I have one more question – the patch works just fine for me, and I am tweeting with no problem. However, I am trying to build it as a standalone for testing purposes, and I get this error:

    (mxj) Unable to find max.jar! mxj is rendered powerless in its absence.

    I then made sure to copy the java folder and jitter externals into the contents folder of my standalone, but now it is telling me it “cannot load class ajm.ruby”. However, I was under the impression this patch was using jruby and that ajm.ruby is no longer necessary. Is there something with the standalone version that might be messing me up? Any help is appreciated. Thanks!

  13. 13 Andrew Spitz

    Hey John, make sure you have in your lib folder:
    – jruby.jar

    and make sure to include: ‘ajm_ruby_initialize.rb’ somewhere.

    Hope this sorts it out. Let me know if it doesn’t.

  14. 14 Mitsu

    Hi i’m Mitsu.
    I’m japanese.

    I posted in japanese.
    But Status displayed it as “Invalid Unicode value in one or more parameters.”
    And it was not able to tweet.

    I think that a cause is because Japanese is a multibyte character.
    I desire solution of this problem at the next update.


  15. 15 Andrew Spitz

    I will check on it for sure! Can’t promise yet, but will definitely look into it. Update should be soon…

  16. 16 Andrew Spitz

    Hi Mitsu, I looked into it, and it’s stuff to do with Max. I don’t understand how the whole Japanese Unicode stuff works, so you’ll have to integrate it yourself. Check out the example patch in Extras > ExamplesOverview > Unicode Tips For Japanese to see how to do it. Good luck!

  17. 17 Mitsu

    It seems that ajm.ruby object is not does not correspond multibyte character.

    i changed souse code.
    When doing so, the error came out a lot.
    it’s so strange, ruby is made in japan.

    ///changed souse code///
    twitter = TwitterMessage.new( self, @oauth_keys )
    twitter.update( msg[0..139] ) # tweet 140 characters

    twitter = TwitterMessage.new( self, @oauth_keys )
    twitter.update( “γƒ†γ‚Ήγƒˆ” ) # tweet 140 characters
    note: “γƒ†γ‚Ήγƒˆ” is test in japanese

  18. 18 Adam Murray

    Hey Mitsu,
    I’m the author of ajm.ruby. Unfortunately I am not maintaining that object anymore, but you should check out my newer jruby object (http://cycling74.com/toolbox/jruby-for-max/)

    This object uses Ruby 1.9 by default, which has better support for character encodings. Perhaps if you set the correct “# encoding…” comment at the top of your Ruby file, it will help. In addition to that you might want to look into Java’s JVM character encoding settings (see for example http://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding). You might be able to add a setting to Max’s mxj.properties file to enforce a certain encoding or you could try to set the Java system property from inside the Ruby script.

    Unfortunately, with these objects, where you have Ruby embedded in Java embedded in Max (which is C), a lot of things can go wrong between these different layers and it can be difficult to diagnose. I am pretty busy right now so I can’t offer more help than that, but let us know if you make any progress and I can try to help debug this later if you are still stuck.

  19. 19 Jack

    Hey man,

    I’ve been having difficulty getting this to work. I was wondering if this could be a Max 6 or OS X Lion issue? The problem seems to lie with the ajm externals. If you guys have tested for this and found no issue then I’ll go back to blaming my own ineptitude.


  20. 20 Andrew Spitz

    Hey Jack,

    Sorry you’re having issues. Try this: http://cycling74.com/toolbox/jruby-for-max/ It’s the update to ajm.ruby. We will be releasing a proper update on the Max side of things soon (time time time!), but hopefully this at least gets it working.

  21. 21 Pieter Coussement

    I’m trying to get it to work in max6, running osx 10.8.1 but I get some errorcodes in the max window.
    Any clue on how to get it working?

    ajm.ruby: could not evaluate: $app.secret(“text”,”zXpJL7iB0hNDzC7EZ24wv9vtdrd2FmuqOpULG1Vi8″)
    :1: undefined method `secret’ for nil:NilClass (NoMethodError)
    ajm.ruby: could not evaluate: $app.token(“text”,”134411867-suR7bWq29zg08wuEOjpAFFn04D5fWybu9pPUvYEl”,”206741627-zjOAm799YtFiw977It7uKVZl2bEfT4yZlcHVXrr6″,”206741627-zjOAm799YtFiw977It7uKVZl2bEfT4yZlcHVXrr6″)
    :1: undefined method `token’ for nil:NilClass (NoMethodError)
    ajm.ruby: could not evaluate: $app.consumer_secret(“text”,”lZ3qOrdebWeuIG8dWy56DdH8HmieqEAZh2ssCe3g”)
    :1: undefined method `consumer_secret’ for nil:NilClass (NoMethodError)
    ajm.ruby: could not evaluate: $app.consumer_key(“text”,”4GtqKEyY5zmLEzjVFpMlbA”)
    :1: undefined method `consumer_key’ for nil:NilClass (NoMethodError)
    ajm.ruby: could not evaluate: $app.tweet(“text”,”checking automatic tweets”)
    :1: undefined method `tweet’ for nil:NilClass (NoMethodError)

  22. 22 Andrew Spitz

    Hi Pieter,

    I’m so so sorry for the late response! I totally missed this one.

    This is all old stuff and I don’t have time to check it all myself. We were in the process of having a big update, but then things got very busy again. So try the recommendations below, but if this doesn’t help then I’m sorry but it will have to wait for us to release the update.

    For some reason the max2twitter source files seem to be unavailable. So the esiest solution could be, that max2twitter-ruby-file “max_twitter.rb” should be in the same directory as the max-patch MaxToTwitter.maxpat.

    If that doesn’t solve it, try this:
    a) Fill in the keys (in edit mode)
    b) close Max-window
    c) close Live/Max
    d) open up Live again, and try again without opening the window for Max-edit mode

    If still nothing, try re-installing the Jruby environment, but that’s probably not the issue as it’s being called correctly.

    Also, make sure you have the update: http://compusition.com/web/software/maxmsp/jruby_for_max and not the old ajm.ruby.

    Hope this helps. And I’m sorry I don’t have more time to make sure you’re up and running…

  23. 23 David Bowen

    Hi Andrew,

    Thanks for sharing! I began using the patcher in May of 2011 and it has worked perfectly up until about a week ago. Now when I attempt to tweet from Max I receive an error “Authorization failed” in the Max window. I have double and triple checked the Consumer Key, Consumer Secret, Access Token and Access Token Secret and they all match. These have not changed since I started using the app. Do you have any ideas on what could be going on?


  24. 24 Andrew Spitz

    Hey David, just to let you know that I responded to your email…

  25. 25 Al

    Hey there, great work! I’m having the same issue as David trying to setup this in Max. “Authorisation Failed”! Any clue in what’s going on?

    From my Max window:

    /Applications/Max6/Cycling ’74/java/lib/ajm.jar
    /Applications/Max6/Cycling ’74/java/lib/jitter.jar
    /Applications/Max6/Cycling ’74/java/lib/jode-1.1.2-pre-embedded.jar
    /Applications/Max6/Cycling ’74/java/lib/jruby.jar
    /Applications/Max6/Cycling ’74/java/lib/jruby4max.jar
    /Applications/Max6/Cycling ’74/java/lib/max.jar
    MXJClassloader CLASSPATH:
    /Applications/Max6/Cycling ’74/java/classes/
    Jitter is in demo mode
    Jitter initialized
    Jitter Java support installed
    ajm.ruby: loading script ‘/Users/alexbabich/Downloads/Max+LiveToTwitter/TwitterOAuth/twitter_for_mfl.rb’ on Sat Oct 27 22:17:19 MST 2012
    Preparing send…
    Authorisation failed


  26. 26 Andrew Spitz

    Hey, sorry that you too are having issues. It’s definitely a change from the Twitter API that’s causing all these issues. Unfortunately, Mathias and I don’t have any spare time to look into it properly. The one thing I can suggest is to re-create your keys. It seemed to have worked for me.

    Let me know if that works! Good luck, and sorry I can’t help more.

  27. 27 Jay

    Hello, thanks for a great patch! Im having a little trouble… I have entered all the access codes in correctly but I’m getting ‘Authorisation failed’ when I try to send a tweet. Any ideas…?

    Thanks for your help!

  28. 28 Andrew Spitz

    Hey Jay,

    Sorry you’re having issues. I’m not sure what could be wrong, have you tried the suggestions from the previous comments? I haven’t looked at this patch in long, and I don’t have time at the moment to try pin point what the issue can be. Try to at least recreate the access codes and see if that helps.

    Please let me know how you come along. Hope you can get it working!

  29. 29 Enzo_B


    I wan’t to try this Max4live app to tweet, and there is what happened in the max windows:

    /Applications/Max 6.1/Cycling ’74/java/lib/ajm.jar
    /Applications/Max 6.1/Cycling ’74/java/lib/jitter.jar
    /Applications/Max 6.1/Cycling ’74/java/lib/jode-1.1.2-pre-embedded.jar
    /Applications/Max 6.1/Cycling ’74/java/lib/jruby.jar
    /Applications/Max 6.1/Cycling ’74/java/lib/jruby4max.jar
    /Applications/Max 6.1/Cycling ’74/java/lib/max.jar
    MXJClassloader CLASSPATH:
    /Applications/Max 6.1/Cycling ’74/java/classes/
    Jitter initialized
    Jitter Java support installed
    ajm.ruby: File not found: twitter_for_mfl.rb
    File not found: ajm_ruby_initialize.rb
    ajm.ruby: could not evaluate: $app.remaining_char(“text”,”Please tweet me :-)”)
    NameError: undefined local variable or method `null’ for main:Object
    (root) at :1
    live.object: get: no valid object set
    ajm.ruby: could not evaluate: $app.remaining_char(“text”,”bravo”)
    NoMethodError: undefined method `remaining_char’ for nil:NilClass
    (root) at :1

    I also notify that the way to create an app in tweeter is different than in the tutorial, i can’t find where you set “client” or “browser”.

    Thanks for help

    Have a good day

  30. 30 Andrew Spitz

    Hi Enzo,

    Have you tried all the suggestions from the comments? People have found solutions so it should work πŸ™‚ Have you tried re-creating your keys? I’m not supporting this at the moment as I don’t have any spare time but keep me posted on how you come along as it will be good for others with the same issue to know if there’s an easy fix.

    Good luck!

  31. 31 Antoine

    Hi Andrew.

    Thank for this great patch !

    The thing is it doesn’t work… The Max Window says :”Authorisation failed”.

    I tryed to reset my keys et my secret access token, twice, but nothing change.

    Moreover, in https://dev.twitter.com/apps, things have changed, this is not possible to put “Client ” or “Browser” in the “application type”. Now we can just choose “read only”, “read and write” or “read, write and access direct messages”.
    Maybe we don’t care, I don’t know, I need your help !

    What about the tag “@Anywhere domains” ?

    Do we have to put something into it ? I tried with “@username” but it doesn’t work.

    Finally, in the “OAuth tool” tag we can choose between five “request type” : GET, POST, DELETE, PUT and HEAD.
    The thing is the request type, even if you change it, comes back to GET, every time.

    This is a bit weird and I think the problem is into the twitterdevelopper application.

    Thank you for your time, and if you have any solutions, that could be great !

    See you,


  32. 32 Andrew Spitz

    Hey Antoine,

    I haven’t got the time to keep up with Twitter’s changes. This is an old patch, which I’m sad to say I think has become obsolete πŸ™ I’m so busy at the moment that I really can’t afford the time to figure it all out. I’m so sorry! If you know your way around Ruby, maybe you (or anyone reading this) can take over and update it? I will get in touch with Mathias who did the Ruby, but I know he has a lot on his plate as well

    Again, I’m sorry I can’t be of more help!

  33. 33 Antoine

    Thank you Andrew for this quick answer !

    I’m not able to work with Ruby, I don’t know nothing about it…

    Don’t be sorry, I really understand that you’re busy.

    Keep us in touch if you find the time to work on it !



  1. 1 Tweets that mention Max + Live To Twitter {+ software} at { sound + design } -- Topsy.com
  2. 2 Tanithblog » NAMM Zwischenstand II
  3. 3 Voila! Max to Twitter | TATYANA'S COOKBOOK

Leave a Reply