Unfortunately I haven't seen an official Ableton Live python scripting support. I have tried to find it with no success.
Yes, the controllers are configured using precompiled python scripts and 3rd party users have been decompiling them and building their own bindings based on that. But liveapi.org / http://code.google.com/p/liveapi/ has been down for a while and was built for version 6.0.7 (current is version 8).
Currently official way to access Ableton API seems to be MAX [1] but I have no experience with that. At first sight it didn't seem to have any python reference. I could be wrong.
Manipulating Ableton Live directly using python is tricky as you need to impersonate a proprietary device. However, there's a fairly there's a fairly straightforward Open Sound Control API here: http://livecontrol.q3f.org/ableton-liveapi/liveosc/
Oh nice, thanks. I just wrote OSCPad for Android which I hope becomes the standard OSC controller for Android, I will look at some default templates supporting Ableton Live.
Out of curiosity, are the examples intended for python 3? I noticed in the sample you're passing around 1/4, 1/2, etc. which doesn't do a whole lot in 2.x. :)
I was working with some programmatic sound generation and csound built-in python interpreter seemed to be one of the most advanced free solutions to get some python-based music generated. Csound is free for academic and research. Commercial license requires contacting MIT. But yes, csound itself is not python...
I even didn't find anything close to csound in terms of features, instruments available and community.
The codebase only uses Pyknon.
Csound is used to generate the examples in chapter "A Look Inside the Primitives", that's why it's included on the resources page.
I could, but I want to make sure the resulting quality is good (I need to have high resolution images, make B&W images, etc.). Unfortunately it takes weeks until they send you the printed review and I don't feel comfortable selling something without seeing it first.
This could be perfect for me. I studied guitar in high school and played trombone for 8 years, but I've all but abandoned both and haven't looked at sheet music for years. I'll admit that I never got the structures of chords and why they sounded like what they sounded like and what types of sounds should logically proceed another.
Is there some mailing list we can sign up for, to get volume 2 news? I just bought volume 1, browsed it, and it seems like an excellent fit for my way of thinking.
I'd love to see some more advanced topics covered in much the same way!
I purchased this with a credit card and got an error that starts off: "The request signature we calculated does not match the signature you provided. Check your key and signing method."
I waited a couple minutes and clicked the download link again and it worked. Wanted to let someone know, since the site doesn't appear to have any contact information.
Maybe not. If you are a programmer the book may help you to understand music better and if you understand music better you may be able to play better. But to be a good performer you need to work on many other skills.
I love this as a pedagogical tool. Composers and hackers have a lot more in common than many folks realize, so to teach the basics of composing in a familiar language makes a lot of sense.
That said, where do we go from here? Many of the challenges in writing contemporary music are in fact notational challenges. We have a system of music notation that developed largely alongside the musical styles of the baroque and early classical eras, which tends to emphasize discrete pitches and a "divisional" model of time. (That is, the only allowable note lengths are those that can be expressed roughly as multiples of powers of 2.)
This book seems like a great way to get your toes wet, but what is the geek or nerd to do when their compositional ideas begin to butt up against what is possible within western notation and, indeed, pyknon?
I think that that's what the chapter on primitives -- introducing csound is for. Also, I think that experimenting with musical conventions and the like is really interesting. If you want to talk about this sort of thing further, my email's in my profile.
haliax is right, although I don't cover Csound much.
If you want to compose for instruments, you may want to learn more about what contemporary classical composers are doing (or have done) [1] to address the notational challenges.
On the other hand, if you want to have completely freedom, computer generated music [2] can give you that, specially if you use something like Csound, Supercollider [3], Chuck [4], or PD [5].
+1 for ChucK. Learned that this past year in school. Was my first time programming, definitely wasn't as difficult as I always envisioned it being... (:
The kindle version at amazon shouldn't have DRM (I hate DRM).
Just keep in mind that some (older) kindle readers may not display some formatting properly, such as code blocks and tables (gasp!) that's why I sell a package with 3 formats. It looks good on my kindle3, but your mileage may very.
Unfortunately this is a limitation of the format (modi) and readers (it should get better with the kindle format 8).
I bought some programming books from Amazon for the kindle that I end up buying again from the publisher just to have a pdf copy and be able to read the source code better. It's still convenient to have some programming books on the kindle, though.
So the extra $5 just gets you a broader choice of file formats?
I'm interested in buying it, and I'm pretty sure my kindle show be able to handle the format. That said, I think I'd rather buy from your website than from Amazon (assuming more of the money ends up in your pocket) - but not at a markup of 50%!
FYI, since it isn't mentioned on the OP, the Amazon version only costs $9.99. The downside is that it's Kindle only, though with no restriction on number of Kindle devices.
http://www.amazon.com/dp/B008NSO6SI
Hopefully, Kroger sees this and has a bit of time to reply.
I excelled in music. Is there anything in particular in programming that you teach differently so musicians can understand it better? If so, do you have any ebooks, PDFs or other resources of this? Just wondering because I've only recently taken up programming and I'm looking to pull information from various resources. Thank you!
Good question. When I teach programming to musicians I find that they can learn programming from a functional perspective very quickly and they take a long time to "get" object oriented programming (or maybe I'm not good at teaching OOP ;-).
Usually I start with a SICP-like [1] approach, but focused on musical, instead of mathematical problems. I show them some basics of the language and ask them to implement musical operations they already know, such as transposition and inversion. Then, I show how they can simplify their code.
If you want to learn programming, I suggest SICP [1]. The videos [2] are also very good.
That's an interesting observation - as a musician, functional programming has somehow always felt more intuitive to me than OOP. What characteristics of functional programming do you think are similar to music?
To be honest, I think both paradigms are good for music. You can have a Note as an object with attributes such as pitch, octave, name, etc. Maybe musicians like FP at first because it's somewhat simpler (I'm not talking about Monads here ;-). They already know about functions from high school and function composition translates directly to how they may think about music operations:
also explain the relationship between each part of this function as retrogradation does with transposition and inversion? E.g., if you start with a triad, transpose it to another key, and then create an inverted chord out of it? Or were the musical terms chosen merely to indicate that they can be a "subset" of a particular general idea ("chord" or "function"?)?
Will grab it and read when I next have some space on my reading list, but as a former professional musician and occasional amateur coder, I'm pretty much the exact opposite of the target audience, so will be interesting to see how it reads for me.
Great stuff. Bought myself a copy after reading that you're strongly influenced by SICP - good enough for me :)
Edit: Forgot to mention, I spent a weekend writing a bunch of similar music manipulation tools in clojure if anybody is interested in checking it out: https://github.com/dmansen/composition-assistant
This is extremely interesting in concept; I know essentially nothing about music theory and have been interested in learning more about it, and a logical/mathematical approach sounds perfect.
But is the book suitable for someone seeking to acquire a foundational knowledge of music theory, or does it require some level of pre-existing understanding?
I ask because most of the material on the page refers to learning "more" about music, and the sample material does seem to assume some background knowledge in musical notation, etc.
If this isn't suitable as an entry-level primer on music theory, can anyone recommend some other works to read first?
In theory you should be fine but it's hard for me to tell. You could use the book and supplement the things you don't know with Wikipedia (I even recommend a few articles in the book). Have you tried the sample?
I've looked at the sample, and found some of it to rely on prior knowledge, but perhaps it will be fine if I have appropriate reference material handy. I'll go ahead and get a copy.
76 comments
[ 2.8 ms ] story [ 442 ms ] threadThank you for the awesome work! I'll try and leave feedback on the subreddit once I get started.
done. :)
I know Ableton Live has python scripting support built in. I wonder how hard it'd be to integrate all this into composer tools in the DAW
Yes, the controllers are configured using precompiled python scripts and 3rd party users have been decompiling them and building their own bindings based on that. But liveapi.org / http://code.google.com/p/liveapi/ has been down for a while and was built for version 6.0.7 (current is version 8).
Currently official way to access Ableton API seems to be MAX [1] but I have no experience with that. At first sight it didn't seem to have any python reference. I could be wrong.
[1] http://cycling74.com/docs/max5/refpages/m4l-ref/m4l_live_api...
Music during 'Notch live coding 0x10c': http://news.ycombinator.com/item?id=3811332
Found somewhere in there, a 290GB 'Essential Mix' archive: http://soundcloud.com/das-boy/sets/essential-mix
I few years back, I wrote Ruby and C wrappers to communicate with Live via OSC: https://github.com/tassock/ruby_4_live, https://github.com/tassock/ofxAbleton
I'm asking this because http://musicforgeeksandnerds.com/resources.html lists csound as one of the resources.
Any ideas how pyknon API relates to csound API?
I was working with some programmatic sound generation and csound built-in python interpreter seemed to be one of the most advanced free solutions to get some python-based music generated. Csound is free for academic and research. Commercial license requires contacting MIT. But yes, csound itself is not python...
I even didn't find anything close to csound in terms of features, instruments available and community.
[1] https://s3.amazonaws.com/musicforgeeksandnerds.com/code.zip
[2] https://github.com/kroger/pyknon
[3] http://www.csounds.com/journal/issue14/realtimeCsoundPython....
EDIT: I just noticed that pyknon is generating a MIDI, not an audiofile. Pyknon is for building midi scores and is not meant for sound synthesis.
@kroger Will this help?
I'd love to see some more advanced topics covered in much the same way!
I waited a couple minutes and clicked the download link again and it worked. Wanted to let someone know, since the site doesn't appear to have any contact information.
That said, where do we go from here? Many of the challenges in writing contemporary music are in fact notational challenges. We have a system of music notation that developed largely alongside the musical styles of the baroque and early classical eras, which tends to emphasize discrete pitches and a "divisional" model of time. (That is, the only allowable note lengths are those that can be expressed roughly as multiples of powers of 2.)
This book seems like a great way to get your toes wet, but what is the geek or nerd to do when their compositional ideas begin to butt up against what is possible within western notation and, indeed, pyknon?
If you want to compose for instruments, you may want to learn more about what contemporary classical composers are doing (or have done) [1] to address the notational challenges.
On the other hand, if you want to have completely freedom, computer generated music [2] can give you that, specially if you use something like Csound, Supercollider [3], Chuck [4], or PD [5].
[1] http://en.wikipedia.org/wiki/Contemporary_classical_music
[2] http://en.wikipedia.org/wiki/Computer_music#Computer-generat...
[3] http://supercollider.sourceforge.net
[4] http://chuck.cs.princeton.edu
[5] http://puredata.info
Note - It's also available on Amazon priced at 9.99, though that would be DRM encumbered and (probably?) not include the sound samples.
The kindle version at amazon shouldn't have DRM (I hate DRM).
Just keep in mind that some (older) kindle readers may not display some formatting properly, such as code blocks and tables (gasp!) that's why I sell a package with 3 formats. It looks good on my kindle3, but your mileage may very.
Unfortunately this is a limitation of the format (modi) and readers (it should get better with the kindle format 8).
I bought some programming books from Amazon for the kindle that I end up buying again from the publisher just to have a pdf copy and be able to read the source code better. It's still convenient to have some programming books on the kindle, though.
I'm interested in buying it, and I'm pretty sure my kindle show be able to handle the format. That said, I think I'd rather buy from your website than from Amazon (assuming more of the money ends up in your pocket) - but not at a markup of 50%!
I excelled in music. Is there anything in particular in programming that you teach differently so musicians can understand it better? If so, do you have any ebooks, PDFs or other resources of this? Just wondering because I've only recently taken up programming and I'm looking to pull information from various resources. Thank you!
Usually I start with a SICP-like [1] approach, but focused on musical, instead of mathematical problems. I show them some basics of the language and ask them to implement musical operations they already know, such as transposition and inversion. Then, I show how they can simplify their code.
If you want to learn programming, I suggest SICP [1]. The videos [2] are also very good.
[1] http://mitpress.mit.edu/sicp/
[2] http://ocw.mit.edu/courses/electrical-engineering-and-comput...
Thank you for taking the time for this.
retrogradation(transposition(inversion([0, 4, 7])))
also explain the relationship between each part of this function as retrogradation does with transposition and inversion? E.g., if you start with a triad, transpose it to another key, and then create an inverted chord out of it? Or were the musical terms chosen merely to indicate that they can be a "subset" of a particular general idea ("chord" or "function"?)?
The Haskell School of Music — From Signals to Symphonies, by Paul Hudak (pdf available at http://www.cs.yale.edu/homes/hudak/Papers/HSoM.pdf).
Music: a Mathematical Offering, by David J. Benson (pdf available at http://homepages.abdn.ac.uk/mth192/pages/html/music.pdf)
Is there anything practical I can expect to use as a result of reading it and going through the exercises?
Some others you have to pay for, but worth it IMHO:
http://www.musimathics.com/
http://www.amazon.com/Music-Probability-David-Temperley/dp/0...
also Prof Cope from UCSC:
http://artsites.ucsc.edu/faculty/cope/experiments.htm
http://learnpythonthehardway.org
[0]: http://github.com/prezjordan/Melopy
http://prezjordan.github.com/Melopy/
Edit: Forgot to mention, I spent a weekend writing a bunch of similar music manipulation tools in clojure if anybody is interested in checking it out: https://github.com/dmansen/composition-assistant
But is the book suitable for someone seeking to acquire a foundational knowledge of music theory, or does it require some level of pre-existing understanding?
I ask because most of the material on the page refers to learning "more" about music, and the sample material does seem to assume some background knowledge in musical notation, etc.
If this isn't suitable as an entry-level primer on music theory, can anyone recommend some other works to read first?
I'm currently Yale's free online course, Listening to Music. Should be a great complement.
http://oyc.yale.edu/music/musi-112