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!