Archive for the ‘music’ Category

Following your imagination

Monday, January 14th, 2008

This entertaining article supporting test-first development has been playing on my mind. The article is beautifully written so it is easy to see the assumed context of working to deadline on well specified problems, most probably in a commercial environment. It saddens me though that we accept this implicit context across all discussion of software development practice all too easily.

Here’s a nice illustration from the article, which appears under the heading “Prevent imagination overrun”.

unit-test-graph.png
Diagram © lispcast, some rights reserved

So there is a fairly clear reason not to write any tests for your code — you will take in more of the problem domain without such directive constraints. What you are left with will be the result of many varied transformations, and be richer as a result. You might argue that this is undesirable if you are coding a stock control system to a tight deadline. If you instead take the example of writing some code to generate a piece of music, then you should see my point. The implicit commercial context does not apply when you are representing artistic rather than business processes as code.

In fact this notional straight line is impossible in many creative tasks — there is no definable end goal to head towards. A musician is often compelled to begin composing by the spark of a musical idea, but after many iterations that idea may be absent from the end result. If they are scoring their piece using a programming language, then there would be no use in formalising this inspirational spark in the form of a test, even if it were even possible to do so.

What this boils down to is the difference between programming to a design, and design while programming. Code is a creative medium for me, and the code is where I want my hands to be while I am making the hundreds of creative decisions that go into making something new. That is, I want to define the problem while I am working on it.

While “end user programming” in artistic domains such as video and music becomes more commonplace and widely understood, then perhaps we will see more discussion about non-goal driven development. After all artist-programmers are to some extent forced to reflect upon their creative processes, in order to externalise them as computer programs. Perhaps this gives a rare opportunity for the magic of creative processes to be gazed upon and shared, rather than jealously guarded for fear that it may escape.

This post is distributed under the attribution share-alike cc license.

Textual patching

Monday, January 7th, 2008

I wrote a perl script that allows you to compose puredata patches in a text editor. You define the patch using ASCII art like this:


    *------------------------*
    |           .--------.    \
  .-x--------.  | osc~ 5 |     *
  | osc~ 500 |  `-x------'     |
  `-x--------'    |            |
    |           .-x------.     |
    |           | *~ 300 |     |
    |           `-x------'     |
    *---*         |            |
        |         *------------*
      .-x------.
      | *~ 0.2 |
      `-x------'
        |
        *
        |\
        | *
        | |
      .-x-x--.
      | dac~ |
      `------'

Then run the Perl script over it to produce a .pd file, that you can then load into puredata to get this:

patch.png

The ASCII syntax basically allows you to define pd objects and connect them together. Layout is preserved. Much like in ghostbusters, you can’t cross the lines, and there isn’t syntax for different box types (messages and numbers). Fixing this would be short work, but I ran out of train journey :)

There is a particular syntax for drawing the lines. You use - for going left and right, | for going up and down and \ and / for going diagonally. To change direction or fork a wire you have to place a * . Mark inlets and outlets with x .

I think this shows nicely how there is no real difference between patching and coding. Shades of pixels are an alphabet, anything can be a program if you define a suitable interpreter to go with it.

Sadly you can’t do live patching with this, but perhaps this could be a starting point for thinking about more interesting ways of programming with text.

If you are curious you can download the script (and patch) here.

MSc Thesis: Improvising with Synthesised Vocables, with Analysis Towards Computational Creativity

Monday, December 10th, 2007

My MSc thesis is here. The reader may find many loose ends, which may well get tied up through my PhD research.

Abstract:
In the context of the live coding of music and computational creativity, literature examining perceptual relationships between text, speech and instrumental sounds are surveyed, including the use of vocable words in music. A system for improvising polymetric rhythms with vocable words is introduced, together with a working prototype for producing rhythmic continuations within the system. This is shown to be a promising direction for both text based music improvisation and research into creative agents.

More vocable synthesis

Wednesday, November 28th, 2007

Another screencast, a short one this time, which I’ve been using as a demo in talks.

Vocable source released

Thursday, November 15th, 2007

The haskell source for my vocable synthesis system used in my previous screencasts is now available. I’ve been having fun rewriting this over the last couple of days, and would appreciate any criticism of my code.

More vocable synthesis

Monday, September 10th, 2007

Another screencast:

As ever, feedback, both positive and negative is very much appreciated!

ASCII Rave in Haskell

Wednesday, August 8th, 2007

I’ve been playing with using words to control the articulation of a physical modelling synthesiser based on the elegant Karplus-Strong algorithm.

The idea is to be able to make instrumental sounds by typing onomatopoeic words. (extra explanation added in the comments)

Here’s my first ever go at playing with it:


ASCII Rave in Haskell

For a fuller, more readable experience you’re better off looking at the higher quality avi than the above flash transcoding.

As before, I’m using HSC3 to do the synthesis. If anyone’s interested, I plan to release the full source in September, but the synthesis part is available here

Canntaireachd synthesis part two

Saturday, May 5th, 2007

Sounds a bit nicer now… This time with a smaller font and an exciting slither of my desktop visible. Sorry about that, see it a bit bigger over here

SoundVis

Saturday, May 5th, 2007

Frederic Leymarie and I have created a blog called SoundVis to document our research into the visualisation of sound and music. We’ll be adding our findings to it as time allows…

Canntaireachd for sinewaves

Tuesday, April 10th, 2007

An early sketch of a system of vocables for describing manipulations of a sine wave.

The text is a bit small there, it’s better in the original avi version.

Vowels give pitch, and consonants give movements between pitches.

Inspired by the notation of canntaireachd. Made with hsc (Haskell client for scsynth). As ever, code available under GPL
on application.

I’m not sure where I’m going with this. It’s nice to describe a sound in this way but to use it in music the sound has to change over time otherwise it gets repetitive and therefore boring in many situations. I think I either have to develop ways of manipulating these strings programmatically, or ways of manipulating how they are interpreted. Both approaches would involve livecoding of course…