I haven’t done much with my Raspberry Pi yet. Judging from what a lot of people have been saying I’m not the only one. I was planning on taking it to a workshop at an Institute of Physics event in Liverpool, but due to the renovation of the host computer labs rendering them unavailable that particular workshop was cancelled.

One thing I did do with the Pi was set it up. This was a little problematic because I’ve borrowed a lab monitor which has integrated speakers and takes a HDMI feed for the visual stuff and a 3.5mm jack for audio. The result was no sound because the Pi assumed that if I’m using HDMI at all then that’s where it should be sending the sound to. Once I figured out how to change that, which involved the installing of some new drivers and the creation of some entries in a start up configuration file I found that Scratch (software for helping kids to learn to code visually) still didn’t have sound. Other things now seemed to be playing sound fine, but not Scratch.

After a while I stumbled upon a file that I assume is run when you run Scratch. I *think* it’s written in smalltalk. I have absolutely no experience with smalltalk, and although this sort of venture, messing with setup files that you don’t understand, is not advised and I don’t really know what I was doing the outcome was that I managed to make the Scratch cat meow. I made sure that I kept a good record of the changes I made, which boiled down to commenting out a bit of code that looks like it sets up sound, and replacing it with my own code.

This sort of fumbling around in the dark hacking took me back to the days of my childhood, when games ran in DOS and you had to write bat files to configure the memory before they would load. I didn’t really know what I was doing then either. I just knew that if I wanted to play X-Wing I needed to type in these commands, and then later – that if I wanted to play X-Wing faster in future I could save these commands as a file and call them all at once.

Anyway, I shared my solution, together with a disclaimer advising against using it, on the Raspberry Pi forum where so far it seems to have been of use to a few others who posted replies, and probably a few more who didn’t.

Advertisements