Skip to content

Tag Archives: music

A not inconsiderable divergence from the original theory, but it certainly keeps things simple implementation-wise :)

Lerdahl, part 2

This is a sequel to this post on Lerdahl’s GTTM.

Okay…apologies for the delay…I was busy, but also was uncretain whether I understood the material myself, that stopped me from saying more. Additional disclaimer: I’ve tried my best to pull out all the melody and counterpoint related content of the theory to leave things chordal. I’ve savaged the original theory in the process. Apologies to all affected by my act of gross violence.

Prolongation Trees

Okay, so what is a prolongation tree? They look like this:


Continue reading ›

First part of three.

Lerdahl, part 1

(serialized from this tigsource thread)

I couldn’t find any nice stuff on-line, but I’ve been meaning to properly go through this stuff myself for a while, so I’m happy to have the excuse to learn something about it (Disclaimer: all of what I’m saying is a filtered version of what Lerdahl says in his book, both through my misunderstandings, and my understandings of what might be useful to Muku in his PG music program (This is primarily a response to a request made by him for info on this stuff, but of course I’d love if other people were to chip in and comment)).

Continue reading ›

Tigsource articles, that will appear here anyway, can be found here, if you can't wait for me to copy and paste them on here.

GTTM-based Chord Progression Generator

I’ll be posting some articles about the theory of Lerdahl very very soon. In anticipation of them (and to put something up so I can submit it to the Haskell Activity Report), here’s my implementation of a toy-model based roughly around his theory. It’s restricted to the process of chord generation.

Here‘s a simple playing by me of a chord-sequence that it produced. Here‘s a midi example that it produced by itself when I had it more developed.

There’s still a reasonable amount of work to be done on it, but it’s at a stage where it’s presentable.

Anyway, the current version of the haskell source code is here. Hopefully I’ll have more developed versions up in the future.

I even managed to do something useful with this sort of code, that I'll post some time in the near future.

Basic Haskell Midi file output

I thought it would be an unpleasant task, but it turned out it to be an entirely lovely task to deal with haskell and MIDI files directly (without having to deal with the current work-in-progress that is haskore).

The source file is here. To produce a major scale in ghci, do something like the following:

:l miditest
createMidi "test.mid" [50,52,54,55,57,59,61,62]

I even managed to do something useful with this sort of code, that I’ll post some time in the near future.

Next time: some microtonality. Well; one piece anyway.

Scoredump the nth

Two short pieces here I finished about a month and a month-and-a-half ago respectively; one I think a not unsuccessful attempt at, admittedly, a genre without incredibly high standards of acceptance, that of the waltz-set:

5 Waltzes ( ps | pdf )

Anyway, the point was to try and be a little bit lyrical, and I don’t think I fell flat on my face (saying that they’re not particularly inspired lines).

And the second piece, which I have, I think, almost no time for excepting an odd rhythmical artefact that people might notice in bar 9 that doesn’t occur in bar 11, even though they are precisely the same. Unless my playing’s deteriorated to the extent that I have developed some accenting pathology. I should be able to have more fun with this effect in future (I’m not saying that it hasn’t been done before; it is, however, something that as an effect is new to me).

Lullaby ( ps | pdf )

Oh yes, now, without committing to anything, I wish to explain that though these pieces are rather a further step down the path of the trivialisation and miniaturisation I have tried rather hard to avoid, I had not put much time in to writing music when I wrote them and, as such, these are my just desserts, but that they do not in any event signify where I am going, nor where I wish to go, merely that I am, in fact, at least so obliging to myself so as to trundle along doing something where I can.

And, for those of the world with an interest in what I’ve been doing musically in the month or so since I wrote these things; I have put together several rather more substantial (but still, alas, miniature) pieces. They’ll find their way here in their own good time. Trying to become more harmonic. Succeeding, I think, but I’m going to have soon to make some concerted efforts to introduce some rhythm and polyphony else ways I’ll end up writing pseudo-chorales for the rest of my days, and then where would I be?

Also, prepare yourself for a JOKE, tomorrow, courtesy of a clarinettist.

And that's also what I was alluding to with the pictures of directed graphs back there a few posts ago.

In which the hero sketches something, for he hath not the strength to venture, unbidden, into more detail. Gerbes? He thinks not.

Hmm. This is going to be harder than I had initially thought now that I think of it. Basically, given three melodies that work in counterpoint they are written on three staves, one above the other. And we have the identity that the interval between the lower and middle voice added to the interval between the middle and upper voice will give the interval between the lower and upper voice. And we have rules that relate how these voices should interact with eachother.

However, one can still apply most of the rules quite well if we make things a little bit abstract and no longer require the above relationship [a,b]+[b,c]=[a,c] to hold, but rather that it hold only up to a certain constant interval I.

And what’s the sense in this? Well with this you still have three melodies, only now instead of all three being contrapuntally amenable, we have that any two of them are. I haven’t seen this expounded elsewhere, and given how practical it seems I thought I’d mention it here.

And why the devil did I want to mix up Fuchs with cohomology? Well, I was trying to figure out an easy example of a Gerbe :) (I failed, as it happened, but it’s quite teasingly close!).

And why this rambley ramble here as opposed to something more deliberate? Because I’ve been meaning to post this since November last year, that’s why. So this means I get to relax about it now. Chill, you know? And if anybody should wish for any explication I would be Only Too Happy to provide it.

I promised myself a strict regimen of counterpoint last weekend. I guess I'm just getting what I deserved, then :(

More scores. More dump. Hurrah!

Woh, like. Totally going in a dodge direction at the moment. No more, though.

So first three light pieces. The first I threw together today and am more or less ok with, insubstantial as it is, the other two are my first efforts from last October when I was making the transition from thinking about modulations to trying to write music. I had a bunch of other modulatory snippits that were short, but occasionally quite nice; alas I don’t really have the skills to extract cohesive musical works from them at the moment.

Ok, so, then:

Piece 1 ( ps | pdf )
Piece 2 ( ps | pdf )
Piece 3 ( ps | pdf )

And, only slightly more substantially, a sonatina; weak, and almost certainly a dead and, indeed, rather clichéd end, but I do like some of the sounds it in.

Sonatina ( ps | pdf )

Really like Reger's set of variations on this theme actually.

And now: A Prelude and a Sonata

Hmm. Weak prelude, and a weak (and v. short) sonata (I do like two bit of the sonata though, you’ll probably be able to guess pretty easily). Anyway the sonata’s my first try at doing something with some rigid medium-scale structure in a long time. Thus: I’m okay with it!

Sonata #2 ( PS | PDF )
Prelude ( PS | PDF )

Episode 34: In which I return to the gimp.

Some Preludes

So I had a bit of a break there for a few weeks from musical things. I found it rather hard to do anything upon my return, so forced myself through seven short exercise pieces (linked to below), where in the more developed ones I was trying to figure out how to write free counterpoint properly (no, I haven’t quite cracked that yet). Anyway, I think I’m ready to try writing music again now.

Seven Preludes ( PS | PDF )

Hmm. Pity there isn't any proper measure of consonance, Euler :/

Consonance-preserving maps.

Grrr. Baaad program. But I’m putting it up anyway, because it’s not *that* bad.

Basically, say we had a scale, and a gradus suavitatus on that, a measure of consonance, so that given any two intervals, you can say if one is more consonant than the other. Now given two scales, it might be a worthwhile thing to look for things that preserve relative consonance; that is to say, a function f from one scale to another will have to satisfy the rule a>b => f(a)>f(b).

So, I wrote a program to do it. No interface yet, it’s to be run from within ghci; specific details of how to use it are given (in a very rambling sort of way) at the top of the source code. It seemed like it might be most useful in looking for interesting transformations of melodic motives that have a small number of notes. However, I can’t say I have been able to do anything useful with it, alas.

For an example of the program’s output, see this file:

Harmony-preserving maps example ( ps | pdf ).

For the code itself, here’s the source file:

Harmony Preserving Maps Generator V0.1 ( hs )

So yeah. Out.