Archive for the ‘maemo’ Category

I’ve added a custom file browser and playlist function to my pyGTK MIDI player. The file browser is more lightweight and read files faster than the GTK FileChooser widget on the Nokia Internet tablet. The GUI is nothing fancy but it works.

Download playmus version 0.2

I don’t think I’ll try to determine the MIDI song length. It’s too much trouble to do for a simple player app.

Along the way, I learnt how to use the GTK Tree widgets to do the list boxes, and I think they are one of the more powerful frameworks in the GTK suite (they can do much more than just simple list boxes), but for simple list boxes there’s a lot of setup to do. Perhaps I should start writing higher-level abstractions to make it easier to create simple GUI programs.


Read Full Post »

Timidity problems solved

I figured out what’s wrong with my timidity patches. That shrill noise in some of my midis came from a whistle in the drum patches that has been looped in the eawpats config files. Removing the loop setting solved the problem. I think I’ll stick with eawpats since freepats is missing quite a number of instruments.

Read Full Post »

playmus screenshotWrote my first PyGTK program for my Nokia 770. It’s a simple GUI midi player that uses the PyGame module. It works pretty well, although while testing the app PyGame sometimes couldn’t initialise and the only option is to reboot my device. But my final round testing seems to be quite stable. Python rocks on the Nokia 770!

Download playmus.py

I’m thinking of putting in other stuff like song repeat, fade out, perhaps a progress bar (if I can find out the midi file length, coz PyGame doesn’t have that API) or even a song shuffle feature.

Read Full Post »

Midi on my Nokia 770

When I got my Nokia 770, I’ve always wanted to have midi playback. It’s funny that something that came out of Nokia couldn’t play midi files when all their phones could.

It has been reported that timidity compiles for the Nokia 770, but the binary that’s floating around on the Web doesn’t work for me, and funny no one else ever bothered to build and distribute a port. well, I’m too lazy to download and set up the Maemo development environment and mess about with cross-compilation. So what am I to do?

There is another way. I already have Python 2.5 installed, which comes with PyGame and which is supposed to support midi. I’m not sure if libSDL_mixer came on board or with Python or with something else I installed, but it’s there on my device and I read that PyGame actually uses it for midi playback. It contains some really ancient version of timidity (read: no SoundFont support for you!). So I got some GUS instrument patches instead, set up timidity.cfg (it must be in /usr/local/lib/timidity/timidity.cfg), wrote a little Python script and yay it works! ^_^

It’s not that perfect though. I threw a few midis at it. It can’t read some of them, not sure why. For some others, at some point there would be a shrill noise in the background (is that a particular instrument or just the player being overloaded/screwing up?) It does seem to work the CPU quite a bit though. But I could play some files all the way through, not bad.

Need some more testing, perhaps other instrument patches might work better, but I’m quite happy to have found a solution without doing all that cross-compilation stuff. I may post more details and instructions if it turns out well. ^_^

Update: I think it’s instrument patches that are causing those funny sounds, perhaps something in the drumset. I switched to the standard freepats instruments and it works much better now – I still get funny noises with some midi files but they are not that long shrill I get earlier. And it plays everything I threw at it. Earlier on I used the instrument set from the libsdl website. I’m sticking to the larger freepats instruments now – you can put them on the media card so don’t have to worry so much about storage. Perhaps someone who knows what’s happening can advise me how to improve the playback quality.

Read Full Post »

I was reading the forums and just learned that my little Nokia 770 Internet Tablet actually has Perl in it by default. Cool! Should have known it from day one though. A Linux installation without Perl? Unthinkable! That means I actually have two languages to play with on the tablet, Python (which I installed) and Perl. Now just need to think of something to write…

Read Full Post »