Monday, 14 March 2011

Playing with different temperaments (tuning systems)

It all started with the entry exam for the Conservatoire, where one of the questions was about the Harmonic Series, then a comment by my Harmony teacher about Bach's well-tempered clavier. So I decided to learn a bit more about tuning systems in particular, and about the relation between music and mathematics in general. Reading material will be the book Music and Mathematics: From Pythagoras to Fractals and playing material will be the Scala software, which according to its webpage is "a powerful software tool for experimentation with musical tunings, such as just intonation scales, equal and historical temperaments, microtonal and macrotonal scales, and non-Western scales".

In order to get Scala to work on my computer (Ubuntu 10.04 64bits) I just had to follow these steps:
  • Download the software (the source code is available upon request to the author, but the downloaded package comes with the compiled code). Version 2.30d for 64-bit GNU/Linux on PC/Intel,
  • Make sure that gnuplot, libgnat-4.4, playmidi, and timidity are installed (all available through Synaptic Package Manager).
  • Copy the provided to /usr/lib/
  • Since I need the ISO8859 characters, I make my own script to launch scala:
angelv@vaso:~/Music-Guitar/Software/scala-22-pc64-linux$ cat
export LANG=en_US.iso8859-15

angelv@vaso:~/Music-Guitar/Software/scala-22-pc64-linux$ sudo modprobe snd-virmidi
angelv@vaso:~/Music-Guitar/Software/scala-22-pc64-linux$ cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xefffc000 irq 16
1 [VirMIDI ]: VirMIDI - VirMIDI
Virtual MIDI Card 1

  • Now we just connect the output of this Virtual MIDI card to timidity with acconectgui 

  • And we can start experimenting with weird tuning systems, for example TET-19 (19 equal temperament):

The sound is fine, but if I try to record a screencast of it (as per my previous post, I cannot do it, so I will have to investigate further.

After a few tests, I discovered that the problem is with timidity and PulseAudio. Googling didn't give me any good results, but after trying different things, I realized that the one that works best to record the output of timidity with xvidcap is just to start another timidity process, but under padsp. Then, the method described in my previous xvidcap post works without any trouble, as can be seen in this demo video.

By the way, experimenting with different tunings can be quite fun, and interesting music can be made (as an example of a song composed in 19-TET see Incidence and Coincidence from William A. Sethares' Xentonality disc).

1 comment:

Dran said...

Thanks, your tutorial was easier to follow and more accurate than the one linked by the scala site. :)

There is so much to Scala! I wrote a small similar-ish program of my own last summer trying to search for 'good' even-tempered scales of various sorts; haven't quite duplicated what I'd done in Scala but surely it will be possible. The built-in keyboard is fun with my touchscreen but unfortunately I can't do multi-touch chords...