HasChorus is a set of Haskell modules written on top of Haskore to make it easier to sequence simple, repetitive music.

In the early 1990s 2 things happened to make me interested in writing some software to sequence repetitive music:

  • I did quite a bit of music sequence using trackers; and
  • I went to a seminar presented by a UK academic (sorry, I've forgotten his name) about expressing music in functional programming languages (probably Miranda, in this case) at Sydney University.

Trackers were nice because you could express things in simple blocks and arrange those blocks into sequences. However, the constant cutting and pasting, and minor tweaking was tedious. You needed to be able to program this stuff: the computer should handle the repetition.

I waited until the late 1990s before doing anything. By this time I had seen Haskore. It was very powerful but didn't do the tracker-like block structuring in any obvious way.

So I wrote HasChorus on top of Haskore.


HasChorus has a bunch of useful modules:

Build (diatonic) chords from scales and scale degrees.
Sequence drums in a similar manner to a drum machine.
Allow simple specification of simple music sequences.
Modify Haskore performances via normal distributions.
Sequence patterns by playing chords in different ways.
Build scales and pick notes by scale degree.
Some boring ways of playing some instruments.
Some useful functions that aren't in Haskore.

including some utilities:

An implementation of bubble sort. Used by HasGroove.lhs.
Generate normal distributions. Used by HasGroove.lhs.

and a sample song:

An example song.

See the README for a few more details...

Testing, maintenance, ...

HasChorus has been tested under:

  • Hugs: Currently I use Hugs 98, February 2000. I use -h1000000 so that HasGroove doesn't melt down... :-)
  • GHC: 4.08 (previously under 4.07) under x86 Linux.

Lack of more recent Haskell versions confirms that I haven't run Haschorus myself in a very long time. There's probably some useful code in there but it is unmaintained. I used to use HasChorus to sequence up simple backing tracks for my own compositions... but then I discovered the joy of playing with other people... :-)

File haschorus-1.2.1.tar.gz20.17 KB