Wednesday, May 31, 2006


...has been slow this week - I have mocks on Thursday and Friday.

There have been lots of helpful suggestions for a graphics library varying from feature requests (The need to address individual pixels) to heavy duty discussions on the pedagogical aspects of graphics.

I started coding a library at the beginning of the week, but I have since realised that it was far too complex for a 7 year old. The Livewires API looks interesting but is aimed at 12+, maybe 7 year olds are a bit ambitious. Platform independence is another issue: Cairo is all well and good on UNIX, but it has stupid dependencies on Windows - there is a large part of me that wants to use Cairo on *NIX (it even has SVG support, imagine the possibilities!) and fall back on something less impressive for Windows. Or maybe I should create my own distribution of PyCairo for Windows that doesn't depend on GTK.

I have also just realised that sound is going to be an issue - PyGame has excellent support for playing pregenerated sound, but virtually none for synthesized sound, which was what I had envisaged. Some kind of interface to MIDI would be perfect - although maybe too much to hope for. I don't want to have to rely on pre-recorded sound, it's much less interesting.

Anyway, end of winge. There won't be another status update until Sunday at the earliest I'm afraid.


Michael Dillon said...

Make a GTK independent port of Cairo for Windows? Yes, please. Lot's of people would use it.

Anyway, here is a clip from another site about music players that may help you.

Real time music keyboard
Use the keyboard to make music, turns the laptop into an instrument! Simply map keyboard keys to notes and instruments, note length is determined by how long the keys are held down. Software keyboard is displayed on screen that shows what note is mapped to what keys and users can customize what range of notes and instruments are used.

If a midi system is present this could be a very small program. Advanced features such as record to midi file could be added to let children save their song in a small format that could be played back and edited with a composition program. This program’s functionality could be included in the composing application, but could be a separate app to keep its simplicity.


Music trackers (or mod players) do exactly this and were very popular back in the days when PC's like Amiga and Atari were common. I remember running tracker software on MS-DOS on a 286 computer. This is well suited to a limited storage machine like the OLPC. Some background on tracker software is in this article. There are at least three trackers/modplayers for Linux:

Jon Schull said...

vpython (graphics) and jfugue (midi) don't play together well (jfugue is jython-based), but each is as elegantly pythonically simple as one might hope.