Tuesday, 29 March 2011

Classical guitar progress logging (Mar'11)

I missed the recording for February (way too busy) and almost the one for this month...  This one has quite a number of mistakes (it is amazing to see how stage fright kicks in even when playing alone, just in front of the video camera. Trust me that when truly alone this comes out a lot better...).

This is René Barbier, Prélude for guitar, op. 119, and the video is here.

This is my first recording with my own guitar (my own in the sense that I built it).

Prélude for guitar, op. 119 by René Barbier from Angel de Vicente on Vimeo.

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, http://www.huygens-fokker.org/software/scala-22-pc64-linux.tar.bz2
  • Make sure that gnuplot, libgnat-4.4, playmidi, and timidity are installed (all available through Synaptic Package Manager).
  • Copy the provided libgtkada-2.14.so.0 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 my_scala.sh
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 http://angel-de-vicente.blogspot.com/2011/03/screencasts-with-xvidcap-in-ubuntu-1004.html), 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).

Thursday, 10 March 2011

Customizing GNU Solfege

As part of my work on Music Harmony (and ear-training), I wanted to configure GNU Solfege with my own exercises. I didn't realize it would be so easy. Following the instructions online, I just had to do the following things to get my first customized exercise:
  • Figure out where the pre-loaded lesson files are and where the customized lesson files should go. 
Help:File Locations tells me that in my system the pre-loaded ones are in /usr/share/solfege/lesson-files and the customized ones should go inside lessonfiles in my home directory.
  • Copy one of the pre-loaded lesson files (similar to the exercise I want to obtain) into the customized directory and edit. 
Make sure to delete the lesson_id field, since these have to be unique (later on GNU Solfege will create one automatically and will add it to the file). In my case I wanted to get an exercise to discriminate between major, minor, augmented and diminished chords, so I start with the chord-min-major lesson file:

# Solfege - ear training for GNOME
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Tom Cato Amundsen
# License is GPL, see file COPYING

header {
lesson_id = "38bfaa64-c182-4687-aa41-ed6352017342"
help = "idbyname-chords"
module = idbyname
have_music_displayer = yes
fillnum = 2
random_transpose = accidentals, -5, 5
title = _("Minor and major chords")
lesson_heading = _("Identify the chord")
test = "6x"
test_requirement = "90%"

# We do in-file translation to norwegian in this file, just
# to show that it is possible.
question { name=_("major") name[no]="dur" chord("c' e' g'") }
question { name=_("minor") name[no]="moll" chord("c' es' g'") }

and change it to:

header {
help = "idbyname-chords"
module = idbyname
have_music_displayer = yes
fillnum = 2
random_transpose = accidentals, -5, 5

title = _("Minor, major, augmented and diminished chords")
lesson_heading = _("Identify the chord")
test = "6x"
test_requirement = "90%"

# We do in-file translation to norwegian in this file, just
# to show that it is possible.
question { name=_("major") chord("c' e' g'") }
question { name=_("minor") chord("c' es' g'") }
question { name=_("augmented") chord("c' e' gis'") }
question { name=_("diminished") chord("c' es' ges'") }

  • Add it to lesson tree in GNU Solfege. I create my own learning tree via File:Edit Learning Tree, then New. First add a toplevel menu, then a submenu, and lastly Add lesson, (the first time I have to click on "Search for new lesson files" so that the stuff I just put in my own directory shows up), and look for the lesson to include. Just like that, I have a customized lesson:

Wednesday, 2 March 2011

Screencasts with xvidcap in Ubuntu 10.04

In the near future I'm going to need to do a couple of screencasts, so I've tried different programs to do it: recordmydesktop, recorditnow, istanbul and xvidcap. The one that gets the best video (for example a moving score in Musescore) is xvidcap, but I couldn't get it to get the sound, no matter what (and it seems that this is a common problem in Ubuntu 10.04).

It turns out that the package that you download via Synaptic is broken in this respect, so the solution is to uninstall that one, and instead install xvidcap_1.1.7jaunty_i386.deb (at http://sourceforge.net/projects/xvidcap/files/) In order to install it in my x86_64 system I just have to use the --force-architecture option to the dpkg -i command.

angelv@vaso:~/Desktop$ sudo dpkg --force-architecture -i xvidcap_1.1.7jaunty_i386.deb 

But when trying to run it I see that there are some i386 libraries missing. In order to easily install them I use the getlibs script.

angelv@vaso:~/Desktop$ padsp xvidcap
xvidcap: error while loading shared libraries: libtheora.so.0: cannot open shared object file: No such file or directory

angelv@vaso:~/Desktop$ getlibs /usr/bin/xvidcap

Once that is in place, it is quite easy to record a screencast, together with the audio produced by the computer:
  1. Start xvidcap with padsp 
  2. Once you start recording with xvidcap, make sure that the Recording is done from the "Monitor of Internal Audio Analog Stereo", which can be modified with pavucontrol.
  3. When recording from Musescore (and probably other programs as well), make sure that the sound is being sent to PulseAudio.
The following video illustrates these options and the end result:  http://vimeo.com/20552593