More with Max/MSP, Ableton, and now Python!

It’s pretty neat that so much of what I’ve been interested in, as far as technology and music go, are all kind of congealing into one big mess.  This weekend I started exploring the capabilities of this software call Kapture.  It basically does exactly what my MIDI mapper does, only it captures all configurable parameters of the Live set instead of just the parameters I had the foresight to write code to capture.  It also saves them to the set instead of a separate xml file.  It’s pretty badass.  It basically lets me snapshot my entire setup, save those snapshots, and then recall them whenever I want.  The only part I was missing was a way to get it working with my FBV controller in a way I liked.   Bring on the python!

I wrote a python script last night for the FBV Shortboard MKII that lets me control live with my FBV.  It is based very heavily on the work of Hanz Petrov who has done so much work documenting the LiveAPI that the code is pretty trivial to write now.  My code draws a red box around the tracks I am working with exactly like the APC40 does, and basically makes the FBV a physical extension of what is going on in Ableton Live.  This basically gives me the ability to create snapshots of all of my virtual instruments, mixer settings, etc. with Kapture, and then I can stomp on a pedal to switch between them.  My hands are free to play instruments, and my feet control Ableton.  Pro tools may be the industry standard, but this flexibility and stability makes it feel like a dinosaur.  I can do almost anything I can think of with this software.  It’s incredible.  Python is kind of a glue language, and that is exactly how I used it.  I glued some hardware to a neat Max/MSP app and have something better than what I was trying to write earlier.  I learned a lot writing my old setup though so it isn’t a total wash.

This functionality has obvious live music implications, but it turns out that it is so efficient that I can probably use it when recording and mixing too.  I barely have to touch my laptop which is awesome.  I am now working on getting my Maschine integrated with everything and I should have a really flexible setup with a pretty minimal effort.

I am cleaning up the code now and I am going to try it out over the next few weeks.  I’ll post the code if anyone wants it, but for now I am going to play with it a bit first to make sure it all works as expected.

More Ableton and MAX

I sat down to write this post awhile ago and life kind of happened so I am finishing it now.  A few months ago I sat down to finally write a MIDI mapper for my line6 FBV Shortboard Mk II so that I could control Ableton Live with a foot pedal and not have to worry about using my APC40 for live performance.  I wanted to do it because I’m not a DJ and rarely have my hands free when I am performing.  I’m usually playing bass or keys, and I need both hands.  Trying to work a device with my hands while I am using them to play a different instrument is a wicked pain in the ass. Ari also pointed out that my setup was kind of byzantine and simplifying it might be a good move.  I agree.  My solution was to take the FBV and write a tool in Max For Live that would take the CC messages that the FBV sends and turn them into midi note messages.  I initially wanted the bank buttons to set banks and then based on that number send different midi notes so that instead of being limited to 13 midi buttons I would have x banks of 9 buttons.

My initial implementation worked exactly as designed, but when I tried setting up all of my band’s songs in a single live set (so I could switch between songs seamlessly), I quickly realized that midi was not going to be the solution.  I had not way to track what state the tracks were in from the song before which meant that I had to put every song in the order that I intended to perform them beforehand.  That sucks because it doesn’t allow me to change the set list on a whim.  I also ran into a limitation of live where I can only assign one midi value to a parameter.  This meant that if button a was controlling parameter a of a plugin or whatever, button b could not control that parameter at all.  This meant that instead of being able to hit a button and have it do a few things, and then hit another button and have it do a few different things and undo one of the previous things was not going to work.  The whole thing felt very fragile.  I decided it was time to use Max For Live and it’s Ableton API to set parameters and just take as much midi out of it as I could.

My second implementation used a bunch of set commands to just force set parameters.  I used the param save function to save the settings for each button press into xml.  That worked really well but I later found out that the looper built into live basically requires midi to be used.  It doesn’t expose anything I need to the live API.  I also found out that if you use the set command to set a parameter, it does it as if you clicked the button yourself and there is a 10ms delay or so.  It also has the side effect of creating an undo event for every single thing the pedal does.  That probably isn’t a big deal but I found out that it isn’t really that hard to use the remote~ function to send messages to live and anything sent over a remote is realtime and and doesn’t create an undo event.  Basically the goal at the point was to use remote~ for everything I could and use regular set commands for everything else.  Below are some examples of some of the things I’ve written that are part of the entire tool that lets me basically DJ my own music with my feet while I play.

Here is an example of setting a return track volume with remote and with a set command.

 

 

 

 

 

 

 

<pre><code>———-begin_max5_patcher———-809.3ocwW97jZBCEG+L9WQFl83VKgeI1Y1CsS6sdpSusSGmH7TSKj3PhVa2Y6e6kj.JKhUTVrGTjGgju7488Ed9zHK647cfvF8NziHKqmFYYoCoBXUdtkcFYWbJQnGlMC9Ie92su2bIIrSpCKnK+SUvEblTP+Mnt.1crSYX1lLJKEj54AeHHeirYTZhdRKVn23EVeZYjL8zZ+9bJIs5JlYP9q0f4IQoFVwkQeqb.qIx3UT1xY4PrzLlPmBgglhCTG77Te6VDB8M0c77nQputueLIktEFmCYbIbQrwsU13zBalbd1b5Gce8iN1cxgm8x6QP1BIyJVghaYFQJyoy2HM1Dq8Hvxd1ZHWPERfEaddzw0r6RIXFHDjkvQHrP8qPJNNS.RjLmD+CA5NLJitCxmk.aow.R.rDAxo5lSoLHlugIqyxqm6s4IitBO4+zMhCz4jnI5CXiezyc.7iJh1+BUuighuy0.k6K+zA3TVqFDLD0pzEn6ntnGd.4fjq.VwYX6gv6fcd0MOl54IFJgclND7QhVfl2eeiaK9lqgGKR4Dox3LmvV1A3DgKgSz3fd.mFaS85ZLlLTap3a7GZeANZ.pavp5FrotwYbT.BREPwuFjFBvdCT8SjwhLL6uHQyQzAo94Z5ORW0TT8PUuj7rjIbpgLg8q3IlmkAEKXSz7U0a0QelyKZm.i9DiLOEd6GoB0w9SrVZaJH3pZaZh1XDZNfivG01jZ1VPp0KzEBnbRBkuLmuYckJ1Rx2KOcyOkT5KGMxKnVZcNTzwjjHobV8bcjw9WsKQ0dEGyOW+dUm45bhkntvdQwuDxpVipX6MC6IU5lp+HygYLw3hR1G+Uz1pREs1hPz0XOOQRIx6PRw276v1SJ3om1Ti9.OM4rN6xDiu+QKyQIlZXTOHcO2M9aj50QE+krUv2jGWYW12PT8bFHjT1905wC65WaPqnII.qN.ynIq4E6mUphSjp6pnTV7yqoFJenEUXGzTCgeKjD9bXZxKFzPKoFNk10j+sMyoWtNwoanlb5fl7ts4NutXw8tsbxqKaOog4sSSMrJmfS+G73mUSg8PSEm77n+huFKWB———–end_max5_patcher———–</code></pre>

Here is an example of setting tempo that takes 3 seconds (if you’re using a 44100 sample rate ) to get from where it is to where you want it (for smoother tempo transitions if you want to link songs together and have a drummer playing to the click track… which I do).

 

 

 

 

<pre><code>———-begin_max5_patcher———-548.3ocuUF0bhBCDG+Y7SQl7rmCATuZeq2Wia5vDgUM2QRXHKddWm1O6WR.rTEKZq0GHPV1jc++a2.OMJftTuCLTx8jeRBBdZTPf2jyPPy7.pjuKMma7tQUvezK+Ecb8qPXG5MijUjksVWoUnQ7Ov8FVzjvFypJoPkCneiXuZTWgsViZrJx76pMRei0cWUboeWoOTJ34suodCv+V.0JgtJWyQ5XBcIWslRdrwuBNltQnVmTBoXsqSmYSOx28ir42MY1XRT3jPxitU77nQtgweNzjK1BSJAoFgW5kPg8SnndIT3wDZ5rSiHxOz4YzgzO6NWNPlundhS+MKwv2BYI1nXWQBGwRwxJrtiIXOFBnIEPoQXPPkVqIucO+tlTzJfMD2SIF.IRtMfkIXIO82DoXm84LXqHEHFsUjHHKzs6StPAo5JE1krmSUn+9z3dpBwmYU3ntUWip+58ZTYKpqTwMsp9BVzhqaqZIWVXjZMt4EajhhCCatcI8sw8RL1wDKd9GkXFwZk83+vGraw0zNc1WObYSiK5DM6rIyrudxD5uEy9TfwqMZeZM7b0Zz7om9jwv5ndLZ+39UjpkRn97Nk1QZdG7eO3f+64Cgy9a0qQWUl1lPM+Ph7ZXx.CJTbTnUc7wU.63zFQVFn5hEoHqPKTXSNbB3eIoDafTx88oaXJ4KqCxI1MMm7HXPNM6MN8UmSGzobh1o42TNcP3dGN8QyI6jmG8ebm4y0N———–end_max5_patcher———–</code></pre>

Here’s a little event timing manager that lets me make my pedal presses take effect on the 1 via quantization:

<pre><code>———-begin_max5_patcher———-1951.3oc4b0zbaaCD8r7uBLZxsl3AeQBxNMGZu068VmLZnjfrYsDIKIThcxj+6EePJKKKIBIxEId53wlFTjhKd3sucAVH8salLcd4ixloneE82nIS91MSlXOk4DSZaOY5lrGWrNqwdYSKjeob9+L88tWRIeTYOc9Jz6xonO9QDFotWVnaQPx0MRT4VE0zp6VVUVnZx+pzbaD5s31SWrcSdwZox9TnOeR8se3YyWZejZy3Ch8eWKx1XeWm9604Yq6dE2af5oJoqaNc560+h9T6KWkoVbedwcypkKTtqfGosJDI1cHgXNPw2hQexbKe+laL+48dhW1N0zi0IwGsSRdcmL5jck7B0Y6ITrv1GX1tBc2e2cOKJ2rQV3FBmdE8tdYCjPxFH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s6HFaLJBdvgn7a+XvBbATHfrgLbfV6mwA2dv3EMF8MjgcqO0eziKDbcbj3D2WWaO25EFqtw2u4+.JDKslB———–end_max5_patcher———–</code></pre>

With all of this working I am able to control Ableton with my feet while playing piano or bass or whatever.  I never have to touch the computer which kicks ass.  So far I’ve not found anything I can’t do with this software.  It really is a pretty brilliant piece of kit.  The sad thing is that I think I like writing software more than I like writing music.  I’m certainly better at it.  Anyway…

 

Why can’t companies build cool products.

I am a gadget freak.  I love getting new gadgets and I love what they claim to be on the packaging.  I usually really dislike the companies by the time I’ve used their product though because the products end up being 60% of what they should have been.  If you read the post I put up last night then you know I just found out about muxtape.com.  This site is cool; however, it doesn’t work on my blackberry.  I don’t know who’s fault that is; but it should work in my mind.  Here are some examples of software and gadgets that could be cool as hell but end up being average because their software designers have no vision, are too controlling, or are just incompetent:

  1. Why can’t anyone build a portable media player that is both easy to use, elegant, and not crippled by DRM or tied to crappy software in some way?  I have a tiny Samsung flash based player that is smaller than the ipod shuffle, has an lcd, lets me listen to the radio, lets me record the radio if I want, and allows me to load mp3s on it without using itunes or anything else.  I love it.  It is ridiculously complicated for what it does though.
  2. Ipods are cool for being severely limited in what apple allows you to do with them; however, you have to have itunes in order to use them (unless you want to hack it and make it more complicated).  Itunes would be cool if it didn’t require me to do a 70MB download every time I open it.  Oh yea, and itunes is packaged with Quicktime and now Safari.  If you want one of the three and not the others then you have to jump through hoops.  That’s retarded.  I have actually made a conscious effort to not use apple products anymore because of this seemingly minor complaint.  I can’t tell you how calming it has been.  I actually payed $20 for winamp and every time I open it and it doesn’t comsume all of my computers resources and tell me it needs to update I smile.
  3. Another piece of software that loves to update is Adobe Acrobat.  This one is unforgivable.  There is no reason that this ridiculously enormous program should borg my computer immediately on boot up and require as much interaction as it does.  Every time I need to open a pdf file I have to close or acknowledge 3 or 4 dialog boxes worth of crap.  I uninstalled it and am running a program called Foxit Reader.  It is everything Acrobat should be.
  4. Where is the software for Blackberries that can stream internet radio and Pandora?  I know you can show me examples of it but it won’t be easy to get running on a blackberry.  Thus far I have found nothing that actually works.  Why is everything hard to do on cel phones for that matter?  What a sea change it would be if cel phone companies got the networking in place to compete with cable companies for streaming media and providing internet.  Oh that is right, Cel phone companies want complete control over what I do with my phone that I pay for and the software and services that I pay for and are willing to cripple their product to protect that.  I pay for it jackoffs, let me do what I want with it and let developers build cool software that will do what I want to do.  That brings me to Comcast.
  5. Comcast throttles my internet that I pay $50 a month for on top of the other $150 I pay for other services.  I get 300kbps uploads for about a minute before it throttles back to 45kbps.  I hate Comcast for this.  It makes it very hard to do my job which often requires uploading of very large files.  I am leaving these bastards the instant I have another option (cel phones should be able to stream video and do internet by now and it should be easy… cables companies should be scrambling to keep customers and I look forward to the day when they have to be nice to me because their competition is putting them out of business).
  6. Logitech Squeezebox is a cool idea.  It is completely overpriced and starts chopping audio and becoming unresponsive after a few hours.  My wife’s salon had what should have been the perfect device.  Logitech support blamed the router.  It’s an internet device guys, you better have the router thing sorted out, especially when all you’re doing is streaming audio.
  7. Digidesign’s 002 is a wonderful piece of hardware if you use ProTools.  If you want to use any other ASIO software on it though you’re in for frustration.  I tried using Ableton Live 7 through it and couldn’t get the clock to stay constant.  It jumped around constantly while recording and the latency had to be up really high to even get it to behave a little bit.  I tried it with 2 different other ASIO firewire devices and could set the latency to 128 samples without so much as a hickup.  Why do companies insist of crippling their product in some way if you use it with another vendor’s product?  I will be weaning myself from ProTools over the next year.
  8. All virus software is worse than the viruses they try to stop.  They don’t actually do anything and they slow down people’s computers to where they are nearly unusable.  I run windows XP.  I have been running it on at least 3 computers in my house for almost 7 years.  I’ve never had a virus.  I’ve had some spyware but the security holes in browsers that caused that have been fixed.  People should quit buying this crap learn how to identify shady sofware and not install it.

That is all I can think of off the top of my head that has annoyed me lately.  As I think of more I will post them.  Maybe I’ll post a list of software and gadgets that kick ass too.  Feel free to post about products that don’t do what they should.