This week we welcome Ryan Kirkbride (@ryankirkbride26) as our PyDev of the Week! Ryan is the creator of Foxdot, a live coding library for live coding music in an interactive Python editor. You can see what projects Ryan is a part of by going to his Github page. Let’s take a few moments to get to know Ryan!
Can you tell us a little about yourself (hobbies, education, etc):
I’m currently doing a PhD at the University of Leeds in the School of Music researching collaborative tools for live coding music. Live coding is basically interactive programming for creating music or visuals and probably my favourite thing to do right now. There’s a growing scene called “Algorave” where live coders get together to make music for people to dance to and they’re a lot of fun to perform at.
Why did you start using Python?
I started using Python during my first year of university when I was studying computer science. It’s such as great language for beginners but there’s also so much to learn as you use it more and more.
What other programming languages do you know and which is your favorite?
What projects are you working on now?
At the moment I’m working on my live coding environment, FoxDot, which is basically a library for live coding music that comes with an interactive Python editor. It doesn’t actually make any sound itself but triggers synths and samples loaded in a program called SuperCollider. FoxDot isn’t the only library out there for live coding music but it might be the only one using Python. It’s very heavily inspired by a Haskell environment called TidalCycles and the SuperCollider program I mentioned above.
I’m also working on a real-time collaborative editor for live coding as part of my PhD. Kind of like a Google docs editor for live coding music. I started writing it in Python to just use it with FoxDot but it can also be used with TidalCycles and SuperCollider and I’d like to add a popular Ruby-based language called Sonic-Pi.
Which Python libraries are your favorite (core or 3rd party)?
This is a tough one! I had a lot of fun with the Natural Language Toolkit (nltk) module writing a program for predicting movie box office takings based on reviews but I haven’t used it in some time. I’ve recently started to use “functools” a lot although I’ve actually delved that deeply into it yet. Combining functions to manipulate patterns of notes and rhythms is a really important part of algorithmic music and functools helps me do that using things like partials etc.
How did you end up creating/working on the Foxdot project?
I tried live coding using TidalCycles, which is based in Haskell – a functional programming language, but I wasn’t always able to express myself in the way I wanted to. It’s a wonderfully elegant way to create music but I was quite rooted in my object-oriented programming ways and decided to have a go at creating my own version in Python. Using the standard library’s “exec” function it’s really easy to take a string of text and run code and I just went from there!
What have you learned from working on an open source project?
It’s really made me work harder at documenting my code! It started off as a completely personal project and there were no docstrings and barely any comments but as other people started to use and contribute to it I started to appreciate how useful good documentation is. When other contributors add or change something, it makes it much easier if there is clear information in the code.
Do you have any tips for people who would like to contribute to or start their own open source projects?
Set up some automatic documentation generator, e.g. sphinx and read-the-docs, from the start. It’s very hard to go back and do once the project is well underway.
Is there anything else you’d like to say?
Just that programming doesn’t always have to be goal-oriented and that it can be purely creative. Live coding is a really good creative outlet that lets you express yourself using skills you’ve developed as a programmer.
Thanks for doing the interview!