Skip to content

Tag Archives: hsProcMusic

Preview
Image
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.

Preview
Image
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.

Preview
Image
I always like when I can bring (structured) graphs and cohomology into the picture. Yeah. : )

A quick tutorial, and a piece

So, I link two things here; firstly a sort-of tutorial for the counterpoint analysis program (more a worked example):

Counterpoint Analysis Program Tutorial/Fugue in Eb ( PS | PDF )

It should make the program make rather a lot more sense. Oh, and for the record, I don’t dislike the piece as much now as I did when I was writing the tutorial.

and, secondly, a rather dull affair:

Waking ( PS | PDF )

Well, that’s it for now. Have another compositional tool I’ve just finished, but want to see if I can do anything with it before putting it up.

Preview
Image
It was a pleasant experience, writing this program.

Counterpoint Analysis Program

Counterpoint Analysis Program

V0.1 as of June 01 2007

So, this is a program that, when you input various melodies, will attempt to find contrapuntal relationships between them. I use something like a slightly weakened version of the 1st species counterpoint rules of Fuchs for this. As you may guess from the version number, this program is chiefly for my own use. However, I think it’s usable enough that it’s conceivable that other people might also use it. Oh, disclaimer: it doesn’t always (or even mostly) give great counterpoint examples, but that wasn’t so much the motivation; I wrote it because I’m never sure when writing fugues that I’m not missing some particular combination of themes that sounds especially nice; with this, I get straight away a bunch of combinations to play about with; many which I wouldn’t have seen without it I think (of course, I won’t limit myself to what this program outputs, but it’s a very good starting point I think), this makes it useful as a compositional tool for me.

No, no no, don’t expect any pictures (yet); it’s a console program (so far), so! And please, if you’ve anything to say about it, don’t hesitate to say it, either here or via email – I’m unlikely to do any work on it otherwise (as it fulfils my personal needs rather well in its current form).

Download Zip – Contains windows binaries, basic documentation, and Haskell source (should you wish to recompile it on a different platform).

Worked Example