scmnote : Scheme Note

News
9/25/2002
scmnote 0.0.2 released

I implemented a lot of new things on the TODO list:

  • Splitting into channels
  • Setting channel volumes
  • Setting channel instruments
  • Changing duration unit (i.e. quarter vs half vs septuplet etc)
  • Changing the velocity of notes
  • A repeater construct
  • Changing the tempo
9/19/2002
scmnote 0.0.1 released.

The elements of a scmnote file might as well be called "constructions". This initial release supports:

  • single notes - octaves, durations, accidentals
  • lists of constructions
  • simultaneous constructions
I'm doing this myself as of now, any other coders are welcome!

About
In my search for notation editing software for linux (and for windows before I saw the light), I found nothing that is very satisfactory. NoteEdit is the best I've found, but I want a system that does not depend on any sound library or hardware - just converts one disk format to another, which can then be played by any appropriate program.

I plan on following this up with an editor that conceptually edits the "tree" that is implied by the nested parentheses, which will automatically encompass the idea of tracks, chords, and multiple melodies. The Timidity++ player does not have a facility to start midway through a file (at least I don't know of any); the aforementioned tree structure remedies this. It can be output starting at any node - i.e. any open parentheses - other than the channels construct. This will enable the editor to merely output the file starting at a given parentheses, and pipe it (though not with unix pipes) through scmnote and on to Timidity++.

scmnote depends on guile... I have version 1.5.6, and I have no idea which version is really necessary. I get the impression that Guile is pretty unstable, but I use the new "scm" interface (as opposed to the old "gh" one) so it should stabilize and play nice.

Other notation formats of interest:

  • CMN- Common Music Notation. Particularly similar, probably more powerful, but too verbose and redundant for my taste. The redundance comes from the fact that rather than be a lisp-like data format, it is a big old function call.
  • Lilypond - An exceedingly high quality music typesetting format/software package from the GNU project. It is modeled after TeX, and is too print-oriented for easy use in synthetic composition, but a scmnote to lilypond filter will absolutely occur if scmnote gets off the ground (i.e. anyone but me uses it) I have no intent of "competing" with any typesetting software.
  • There are numerous XML file formats for music/notation. I think they are pretty pointless because XML is so verbose that in all but the simplest situations they are as inaccesible as binaries (to a user, obviously they are easy to parse - but so is lisp)

Docs
A scmnote file (extension .sn) contains exactly one valide scmnote item. An item can be any of the following:
DescriptionExamples
A single note, consisting of:
  • pitch class
  • octave - optional, continues in previous octave
  • duration prolongers - each character 'o' trailing a note extends it by one "duration unit", such as a quarter note
c3
f#2oo
abboo
a list of items: ( item item ... ) (a4 b c5 b4 ao g# a)
(c#3oo c# b2 a g#oo g#oo c#3ooooo)
(g3 b a c4 (d b a b) gooo) ; a list is an item, so it can be in a list
a repeated item: (repeat number item) ; breaking the law, without the rhythm
((repeat 3 (a2 b c3)) (repeat 2 (f2 g a)) f2 c3 b2)
A simultaneously played list of items: (sim item item ...)
(sim (c3 c# d d# e e# f# g)
     (e3 e# f# f## g# g## a# b)) ; look ma, major thirds

((sim c2o c3o g3o e4o) (sim g1o b2o (g3 f3) d4o) (sim c2o e3o g3o c4o))
; I - V - V7 - I
Numeric specifiers: (keyword value)
keywords are (synonyms next to each other):
vol volume, vel velocity, tempo, inst instrument
((tempo 40) a3 b c4 d (tempo 55) d# e f f# g)
Changing the fraction of a quarter note that each "duration" unit represents:
(dur number)
(c3oo (dur 1 3) c d b2 (dur 3 1) c3) ; 3 beats, triplet, 3 beats
A mapping of a keyword over an item: (map (keyword <value duration-prolonger>*) item) Or an interpolation of a keyword over an item, same as map, but smoothly interpolated (map (velocity 60 o 65 oo 75 oooo 120) (c4o doo gooo c))
(interpolate (velocity 60 o 65 oo 75 oooo 120) (c4o doo gooo c))
splitting of the input into channels (direct correlation to midi, sorry) (channels item*) (channels (a3 b c4) (c5 b4 a))

Example Files
These are included in the tar files as well
A Single Note, a perfectly valid file
A simple not-very-pretty melody
Merging melodies
Nested merging
Another merge test
And yet another
One way to express a chord progression
Afraid of what? predates the wicker man by a few years

Download
9/25/2002
scmnote-0.0.2.tar.gz
scmnote-0.0.2.tar.bz2
9/19/2002
scmnote-0.0.1.tar.gz
scmnote-0.0.1.tar.bz2