Humdrum data format
The Humdrum data format consists of two layers:
- File organization specifications
- Data format specifications
I. File organization
Humdrum files are ASCII-encoded text files. Each line of the file
can be one of several record types which fall into two categories:
- Global Records -- lines which apply to all data fields.
- Global comments -- lines starting in the first column with
- Bibliographic records -- lines starting with "!!!"
then any number of non-space characters, followed by a colon,
followed by the bibliographic record information.
- Spine-Based Records
- Interpretation records -- records (and spines) which start
- Local comments -- records (and spines) which start with a
- Data records -- just about anything else.
Blank lines are not allowed in the Humdrum file format, but it would
be wise to process them gracefully in programs that process Humdrum
Spines are columns of data, local comments and interpretations.
Data traverses down though a spine, with one data element to a record.
Multiple streams of data are separated from each other by tab
characters. Exactly one tab character is allowed to separate each data
fields. Two or more tabs in succession in a Humdrum file is not
valid syntax. Ending or starting a line with a tab is also not valid.
Structure of spines : Data is contained in spines, with
one data element to a line. To indicate the start of the data and
the type of data, a spine token called an exclusive
interpretation is required.
Exclusive interpretations are
interpretations records that contain the string
"**" followed by a name
identifier for the data, consisting of any number of non-space
characters (but typically 5 or less alphabetic characters).
Only one exclusive interpretation is allowed in a spine, and it must
come before any data in the spine.
Spine data is terminated with the interpretation
Humdrum special characters and symbols
The following characters have special organizational meanings in Humdrum files:
- "!" (exclamation marks) --
these indicate three levels of commentary in the file
- ! = local comment
- !! = global comment
- !!! = bibliographic record
- "*" (asteriks) --
these indicate interpretations to be applied to the data.
There are two general categories of interpretations:
- Exclusive Interpretations --
- Tandem Interpretations --
- "." (periods) --
these are called null-tokens. They represent place holders
for the previous data in the spine.
- "TAB" (tab character) --
Tabs separate individual spines from each other.
- "NEWLINE" (newline character) --
Newlines separate individual Humdrum records.
II. Data format specifications