Pygmusic

By Kragen Javier Sitaker <kragen@canonical.org>

Download Pygmusic version 4 (2007-12-10) (56kiB).

Pygmusic is a toy sample sequencer I wrote in Python with PyGame in a few days in the summer of 2007. It starts up with tracks on several relatively prime but commensurable cycles, currently 3, 5, 7, and 8 beats (at 360bpm), so that you can easily construct rhythmic patterns that take a long time (140 seconds) to repeat exactly.

You can drag samples (represented by letters) into these tracks or reposition them therein, or toggle tracks on and off by clicking on them, or activate sounds by clicking on them. There's also a nonrepeating track that you can trigger from any point in the other tracks, or manually.

The 'f' key toggles fullscreen mode.

It is in the public domain.

It should run on any platform supported by PyGame, such as Linux, Microsoft Windows, or MacOS. I wrote it on the version of Debian Linux called "etch".

Pygmusic is available for download: version 4 (2007-12-09) (56kiB), (or older: 3, 2, 1.) The darcs repository is accessible by darcs get http://canonical.org/~kragen/sw/repos/pygmusic.

I wrote it for three reasons:

  1. I wanted to learn about programming with PyGame, and in particular how to construct user interfaces in it. This was successful.
  2. I wanted to explore some ideas I had about "programming by demonstration" in the context of music. I don't think I've gotten far enough into that to find out whether those ideas were sensible or not.
  3. I wanted to write some nice code that other people would enjoy reading, and which might help them (or me, in the future) figure out how to do stuff. You can peruse the source of the current version or the pydoc output to see if I succeeded.

Bugs