February 27, 2007

CSound

I have been looking a little at CSound, because I wanted to do some musi-mathematical investigations and text formats always make for nice accessibility. A text format however is no guarantee for readability. Csounds looks like what you get if you try to construct a programming idiom without any knowledge of other programming languages. I know that sounds a bit harsh and I do think there are likeable features but there are so many strange things that are just unsoftwarelike in the language. Have a look at the sample in the Wikipedia entry for CSound, as an example. Let's begin to enumerate the strangeness:


  1. Unreadable shorthands for everything - I can understand this from a "it's better for serious users" standpoint though

  2. It's XML - but it isn't: The semantics are still in CSound's legacy ASCII format that must be parsed with a CSound parser. The grammar is simple - but it's still a grammar.

  3. In the instruments section arguments are separated by comma, in the score section just by whitespace (it's a syntax error if you mix it up)

  4. instruments, user-defined function-tables, notes in the score, built in functions: All are just recognized by numbers, not by names.

  5. The a1 in the instrument definition is a variable and it's scoped inside the instrument. The f1 and the i1 are really "f - and a first argument of 1" and "i and a first argument of 1" - it's just OK to have them as one token. These variables are global.

  6. The argument "10" in the f1 line is the name of built in generator function GEN10, a sine curve. The set of GEN functions is fixed.

  7. p4 and p5 in the instrument definition refer to argument numbers 4 and 5 in the "i1" line. You either have to go out of your way - or maybe you can't - name them

  8. The final 1 in the instrument definition refers to the f1 function. In this example. everything is in one file - but originally the score section and the instrument sections are in separate files. So the value 1 in the score file plugs into the instruments in the other file...

All of this makes sense as a kind of "minimal theory" language version of a physical device: "Plug the sine you setup with the first oscillator into the first generator" - software wiring. But without the visuals for orientation, these kinds of semi-physical coordinates are extremely confusiing.

Posted by Claus at 02:45 PM | Comments (0)

February 22, 2007

Hacking with Vista Speech Recognition

Or... failing to, actually. No wonder. Perl isn't called line noise for nothiing.

Posted by Claus at 01:34 PM | Comments (0)

February 16, 2007

Mapping the CapsLock key to the Windows key

This is essential on a small format Thinkpad. Use SharpKeys for convenience.

Posted by Claus at 10:44 AM | Comments (0)

February 02, 2007

Vista hacks...

Funny stuff: If you switch on voice control in Windows Vista and leave your speakers on, it's possible for websites you visit to control you PC by simply talking to the Vista voice control over the speakers. It's obvious - but the problem is already fixed in the pre-vista OS, Mac OS X which requires a special keyword before commands, because this exploit is so obvious (a passable sound for words that will shut down Vista will be common on websites shortly, I assume).

Posted by Claus at 01:26 AM | Comments (0)