Here are some of my latest blog articles. See the full index here.
Happy new year! I’ve been making a few changes to my main site, schoolcoders.com, and as a knock on effect this blog will also be changing a little. All for the better I hope.
We have seen how to control the frequency of our simple instrument. But what if we ant to play a particular musical note? Note frequencies Every musical note has a specific frequency. For example middle C is 261.63Hz, the D above it is 293.66Hz, E is 329.63Hz, and the rest of the notes follow the same pattern. No, really, there is a pattern! A bit of music theory If you are familiar with a piano keyboard, you will know that there are several keys all claiming to be C.
We have seen how to control the frequency of our simple instrument. But what if we want to play a particular musical note? Note frequencies Every musical note has a specific frequency. For example middle C is 261.63Hz, the D above it is 293.66Hz, E is 329.63Hz, etc. You can find tables of these frequencies on the internet, you can even work them out (there is a formula), but you don’t really want to have to type these numbers in for every note!
So far, our simple instrument isn’t much fun, because it can only play one note! Let’s change it so that we can play different notes. While we are here, we will also give it the ability to play louder and softer notes, so we can make it a bit more expressive. Note parameters If you recall, our notes list looks like this: i 1 0 0.5 i 1 1 0.
Here we will design the simplest possible CSound instrument, and play a little tune. We will first take a look at a basic CSound setup. Setting up You will need to download and install CSound. As this isn’t meant to be a beginners guide, I won’t cover that here. There are various ways of running CSound. For this tutorial I will use CSoundQt (sometimes known as QuteCSound), as it is convenient way to edit and play smallish CSound files.
CSound is a sound and music computing system. It can be used to create electronic instruments, and also to create scores (sequences of sounds), which can be anything from a simple tune to a full orchestral piece (or just a sound effect of some kind). CSound can be used for other things too - it can be controlled from a MIDI keyboard to make a playable synthesiser, or it can be hooked up to other types of sensor to create other types of novel electronic instrument.
The gingerbread man attractor is another simple attractor, but it looks very different to the Henon attractor.
Fractals are closely related to iterated functions. This involves calculating the same function, over and over, each time feeding the result of the function back into the same function and calculating it again. When we plot the result, we sometimes find even very simple functions can create incredibly complex patterns.
In a previous post, I shared my experience of connecting a Raspberry Pi terminal window accessing raspberry pi terminal remotely, giving me command line access to my Pi from another computer. This time, I would like to run the the Pi desktop on my Windows PC. In that way I can sit at my PC and see the Pi desktop, and open up GUI applications like Python IDLE or Scratch, using my PC mouse and keyboard.
My home Raspberry Pi setup isn’t ideal. The Pi is set up on a rickety little desk in the corner, which isn’t comfortable to sit at. It has an old “square” monitor (the first one I ever bought which wasn’t a CRT), and an old keyboard and mouse which don’t really work properly. As you can imagine, often when I think I might like to try something out on the Pi, I end up doings something else on the PC instead.