Control iTunes from within Max using shell and osascript to send applescript!
This took me a while to figure out, with a lot of hard work already done for me (thanks Philippe OLLIVIER!). I realize this is not a new concept. But I thought since I spent days hunting down details, it might save someone the hassle. I added functionality like:
-Command the iTunes EQ presets (and any new ones you save)
-Command your iTunes playlists
-Refined FF(cue) and RW(cue) to toggle on/off for precise cue-ing
-Auto-play start: as soon as iTunes is launched, it will begin playing, and at a volume of 50 (out of 100). I actually set a delay of several seconds to give iTunes a chance, since it might be synching up with your ipod too… Victoria will greet you also (just change the name from "Martin" to yours, lol.
The reason I am making this patch, is because I am using Max to control functions in my car, like the TVIS system (variable intake runner butterfly valves) using a microcontroller, Maxuino, and an aircraft servo. And since there is no room to have a laptop open all the time around the dash area, I am displaying TVIS function, Air-to-water intercooler temps, and stereo controls on my iTouch, which is mounted like a multi-gauge near my console. The iTouch controls my laptop (which can be in the trunk in a case, or under my seat, etc) via an ad-hoc wifi connection. I am using TouchOSC. And since I will have my laptop with me in the car often, I may as well get rid of my old deck/10-disc changer, and put the laptop and iTouch to good use. Instead of getting the soundfeed from the iTouch, I am leaving the iTouch as wireless, and controlling my laptop to send the sound. This allows for higher-quality soundfiles to be played (Apple lossless etc instead of 128 MP3 settings), as well as I will be installing a firewire connection to my amps. I hate the degradation of sound using an ipod with a radio frequency to the stereo deck, as well as the clutter of connecting cables around the dash.
I am currently completing the stereo portion of the iTouch control page. I have set up the stereo patch with mostly toggles, so that you only need one button each for play/pause, EQ enabled/disabled, mute, shuffle on/off, and so forth. I have set up each EQ preset individually, because I won’t be able to display a variable dialogue or number box on the iTouch. Just change the names of the presets to match your own. Same deal with the playlists, just change them to match your own iTunes playlists. Before I start making all the connections to the OSC objects, I though i’d share the iTunes portion of the patch.
I actually made several youtube videos explaining what I am doing, although none of them so far deal with the stereo/iTunes portion of it:
I am impressed with the ability of the iTouch to display and control functions. The iTouch pages are reasonably programmable, including labels etc, thanks to TouchOSC… which has an acclerometer function ready to go too.
Anyways, I am rambling, so here is just the Maxpatch to control iTunes. Hope someone enjoys it! :)
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 5982.3oc68jsjabjbOS8UzAsCyWnZWUV29skRjVVdEkVRsROrZCGXvzCILw. LFG5Zi8e2YlUCftwzG3pFwAD6FgX2E3LD48Yk4+3ydxSuZ5uVL+oY+GY+srm 7j+wm8jmvGQG7jx2exSucvuNb7f47esmdaw74CdWwSed7yVT7qK3yAgPr5v6 FrX36GM4c+OyJFtH9KW5s4hmu5OTt3K4hr+d4Oynq4eMSu5+8ykgU+htY5jE SFbaA+Q+oYiFLd0mLY4silLtXA+kB1b3zkKVcprxuj4i9c9WhDv+giGG+at3 2tqH9M7oOM6uSex+7y9L5+77cDeb0xEKlNoCHGbhHvFn+.Dq9uMA4foQ3S1I 7cO.4pASd2gALSJ9E7qw8nsWWLdvu0EHB9JfnJzIHZ+Cg3dxwIyv+IJ5.mXb LmtUwnDeWnD49hRZle.1W98mmLddiPy.uteVd4evr78BKZ+tCK5+XgkESe26 F2ESoEB4AuRaBH.A4NCHr9dgJ3T.Uilr3v.p1L3X5xbSTGjTDk9fbS6VadLY roMbgtGiuAFODb8a60cNY5U5i1kzl9kcsOJs7JsLnIAY+VdUOxL7Nb5s2VfZ M1Fm7cHJY7n43Wm1wKdmN2JkFoDQNtbsKnz.pyi48ASaJ5jmDCwhlPQn2.mP A9oyGLe3rQ2sH6yKxd1hhwiyFb2ciGMbvhQSmj8S+zO8zQe+xIEyomxVLM6N Dow+GBywe9OhZjKlgbKRI85yV8uw3QSJFNc4jEU4AZBEaQaIFgwh3UsQj6rd imzyFc7AbsgjEoiOT7Pov8Df++92Wf3sr2fH6YWin14GHU.YlEBIPTATK.nB VyNPERYLVOlnBucIpjgjBD9ruYvrEilfZQamRnZmRDjRTFPnbVTQrAxkDo.o JR0ZcyMSI7WnD0oDgCSR.43CRmVh91BdUN.Jzv+NHI3tf+Y7+cyPDJg+cYut 3WNPZ.jiXco1SL7nSmn+Ix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9RhwRcrCYh8NQkmCrdPsogWX0+1Xi2vCWlf 736yhcx+Fw9VdXfATd7nGANokun65iuIeT6h1os.qjytjj5grgRCww6PsfSU G+vOXmRoj7AESBo.SV0DgKOPSzF+JCIa8dZvzI4FOyiujUyYJOMliv.dHCjx neQ2+HPcuttScBl7D9j35H9kb0rvLTsyACIuMBgj3KLq.LQBx5TydQ2q7U8t ZYHJ2+HPDsiUxrU+sjv5AonhGf0mKWMKCi6IfnE35uX02iRpOd.xkV0ezhfa sqFUdNM7k6TdO2S2nUwAwtLh9KeCc4OBEUnb5imZrK1hrOnlG2onScGwLkRT IgL0dIb7nycg2V8fhNCIv4Wsm8zMNmmhJ8p97IHWM6DSvIXvhopNXw3+HXKm 0bl3yGqmC6hcKydWBWE80yGM6TI2i9iO4P6zrMwrmndiL9EtZtP80SSZzhS0 jGJLGOvrKFOk18si0Bqus39HaeLsk0dIpYw34I9l83kH1oYriTuucrjYCcw. gMzkxWhPQI+1oBJ5s05M6+8h0rB8aTvFZQ4KwUpUISnc6LJfu7O+r+e.9+NK p -----------end_max5_patcher-----------
Looks great! Don’t be afraid to hide all those message box commands in a [coll] and access them with something like [umenu]!
Yes that occurred to me, however, since the TouchOSC and iTouch won’t display things like umenu’s (it has single toggles and multi-toggle panels, dials, sliders, led’s, buttons, labels, etc, and I have to figure out how to feed the info back correctly to the iTouch to have sliders etc be in synch on both machines) I figured I would leave them out to be edited, and since peeps would have to edit some of the EQ presets and virtually all of the playlists, etc, I thought I would throw it up as is.
When I do have the other stuff figured out, I will return here and finish off the patch for visual in a nice presentation "player" look… and update the patch. For now, its functionality to control iTunes from Max is complete.
I especially like the two playlists "iTunes DJ" and "Top 25 Most Played Songs"… acts as variable and shuffle playlists… For me, controlling iTunes with Max is paramount to the setup in my car. I have always wanted to have MaxMSP available in my car! Its like… a whole new world… lol ;)
What you really need to do is get a copy of some voice recognition software and have max grab the text you speak and then perform an itunes search on the string and start playing the tracks it returns. Definitely not impossible with max!
Wow, you guys are blowing my mind all over again. You’re actually using Max to control your car’s engine while you drive?! Do you have a test track in your backyard or something? Next time I’m on the highway I’m going to wonder if that guy swerving maybe forgot to send "set" to a message box, or confused his atoi/itoa’s or something.
& Can you help me write a patch to fix the transmission in my Ford cargo van?
No, but I could write a patch that would tell your auto tranny to downshift or upshift, using a strong actuator motor.
Cars are already doing it these days, with the software/hardware to park themselves, correct? Essentially servos (or steering assist in this case) with a preset chain of commands it just runs through… plus add proximity sensors for fine adjustment or failsafes.
I am currently going to use it only on a non-essential system like the TVIS, where if the system fails and the TVIS is locked open or closed, performance and power are affected, but no harm is done. OEM manufacturers devote a lot of time to testing ECU’s for issues like this. My iTouch also makes a great display for various temp sensors and controls (like the TVIS), and, I am nearing the completion of the Stereo page on the iTouch. It currently has 24 EQ presets and 32 playlists all of which are visibly labelled, and the basic ff/rew plus cue, volume, play/pause, and power on (iTunes launch), all on one tiny iTouch touchscreen. Wireless, and plays lossless soundfiles which will go to my amps via firewire from the computer… hard to beat that for sound quality. No MP3’s via a radio adapter here!
I will shoot a quick video soon.
But yup, lots of testing. Nothing new to anyone tuning their own car with a standalone ecu or tuning software, anyways… the arduino just provides *lots* more options.
Haha Luke, its funny you should say that… I was just playing with the voice recognition on my Macbook Pro tonight… leaves quite a bit to be desired…
I have also updated the patch on the stereo page to have a memory of what playlist, EQ setting, and volume it was at. Big deal, right?? iTunes already does this anyway right?? Well, its getting Max to remember these settings when it is launched, and getting the iTouch to accurately display the properly recalled settings, since they are different every time Max and iTunes close down (because we change them!)… so they have to be auto-saved, auto-recalled on launch, and auto-displayed on the iTouch.
lol, sounds so easy.
The patch is big, needless to say… thousands and thousands of connections, especially since the 32-button multi-toggle for the playlists has only one button on at a time, just like a large "radiogroup", except I can’t use the radiogroup object on the iTouch display, only basic dials/toggles etc… so it had to be built from scratch in Max, each "on" toggle in turn turning off the remaining 31 toggles… so thats 32×32 (over a thousand) connections right there. But, its worth it :).
Haha I bet there’s a better way to organise those thousand connections!
The built in voice recognition isn’t perfect, but you can teach it a few commands using applescript which will simulate key presses which you can grab using max. The other option is to splash out on something like MacSpeech Dictate which you need to train to recognise your voice but then works much much better.
I could have used a slider or a dial to switch the playlists, but then the layout on the iTouch is not compact… it would take up the whole screen just to display the playlists, because you need the labels (the names of the playlists) displayed around the dial… which also doesn’t look like a professional automotive display to me…. lol. Its a tradeoff between neatness/compactness/multi-usage and complexity to connect.
Using radiogroup it is possible to first send out a "zero-bang" to turn off all playlist buttons, then (just afterwards) output the chosen number (selected button) to turn only it on. That does eliminate a lot of connections. But I did not pursue this method all the way to see if it can make TouchOSC both display and relay the choices properly.
Its a curent limitation of TouchOSC. What would solve *everything* is if the TouchOSC had a message box, (at the very least) so that it could display one playlist at a time, and we could select the playlists with two buttons for up/down. Simple. But it doesnt exist yet.
Thanks for the suggestions! I will look into MacSpeech Dictate. It would be nice to be able to control some things hands free.
End result my car will be faster, with better displays, and my eyes can remain on the road where they should be!
You might also want to look into the fantastick app for iDevices. It’s not quite the same as TouchOSC in that you have to provide the drawing commands to the screen but it would allow for a lot more control and customisation.
I have not checked that out at all… will do.
I solved an annoying little addressing issue tonight… I was getting error messages in my Max window telling me that
I scoured my patch for the source of this phantom "bang"…
I finally came across this statement from Matt Wright:
"In my mind the key thing about OSC-route is that it dispatches one node of the address space with absolutely no distinction between a branch node (subcontainer) or leaf node (method). E.g., if you have [OSC-route /foo] and you send in "/foo/bar 1 2 3" then it outputs "/bar 1 2 3". If you send in "/foo /bar 1 2 3" (address "/foo", arguments the string "/bar" followed by three integers) then you get *the exact same output* of "/bar 1 2 3". If you send in "/foo 1 2 3" then it outputs "1 2 3". If you send in just "/foo" then it outputs a bang."
His last sentence was the kicker. When I would switch pages on my iTouch, just the "Stereo" page was causing the error message… I realized the name of the page and the sub-heading were matched, and one was unnecessary… in the terms above, I had the [OSC-route /Stereo] and when I would switch the iTouch to the "Stereo" page, it would send it "/Stereo"… and hence the bang. I placed the designation "Stereo" in front of every button-name instead. So when the iTouch swiched to the "Stereo" page, all was perfect.
Silly-annoying really, lol.
I have completed the iTouch multi-interface/display.
The TVIS section has multi-gauges to indicate exactly what the TVIS does in relation to RPM. I also added memory to the A2W IC display, so that both ambient and manifold temps will display current temps and the recent highest reached temps. The third display page has a wideband Air-fuel ratio gauge, and the fourth page is my stereo system complete with playlists, EQ presets, and multi-layered to include all the usual controls. It actually controls iTunes better and faster than iTunes can be controlled on the computer, lol. I also threw in voice confirmation for making TVIS selections. Check out the fourth video:
How can i get my hands on this [shell] object ?
I would really LOVE to get my hands on this patch. I’m making a voice/ iphone controlled coffeetable 2.0 living room centre robot ( ask if you want to know more ). and it would be great if i can also control itunes with it.
thanks in advance, sorry for the bad english ( and i’m not an expert with max, but i really love it )
ps. i’m running win7 i hope this is not mac only !
That sounds like a cool project! The [shell] object can be found here:
More information where I sourced mine from can be found in this thread:
and Doug’s AppleScripts for iTunes:
And, my patch is included at the bottom of my first post :). It’s just the original iTunes portion… it has ballooned considerably now, so just ask if there are particular tasks that you want to achieve and I can help you out.
Hope that helps, and good luck!
I have started a new post to detail progress with the rest of the "Max MSP in my car!" project, going beyond the scope of the title of this thread which is focussed on iTunes control.
Forums > MaxMSP