BMML, Braille Music Markup Language

Author: Contrapunctus project / Enrico Bortolazzi, Giuseppe Nicotra, Gianni Bertoni, Nadine Baptiste
Copyright: 2008-2009 Contrapunctus project
Version: 1.0

Index

Abbr_name

Accidental

Accordion_register

Accordion_row

Alteration

Alternation

Alternation_ref

Appoggiatura_ref

Barline

Barline_left

Barre

Bow

Breath

Chord

Chord_data

Chord_prefix

Chord_type

Clef

Coda

Dot

Duration

Dynamic

Editorial_mark

Ending

Family

Fermata

Fingering

Foot_crossing

Generic_text

Hand

Harmonic

Inaccord

Interval

Interval_data

Interval_ref

Interval_type

Intervals

Key_signature

Line_of_continuation

Lyric

Lyric_prefix

Lyric_repeat

Lyric_repetition

Lyrics

Merged_text

Metronome

Metronome_equal

Metronome_note_type

Metronome_value

Midi_instrument

Midi_metronome

Multimeasure

Music_hyphen

Name

Newline

Note

Note_data

Note_ref

Note_type

Nuance

Nuance_ref

Nuances

Number

Octave

Organ_pedal

Ornament

Ornament_type

Part

Part_data

Part_list

Part_name

Pedal

Pitch

Pizzicato

Rasgueado

Repeat

Repeat_data

Repeat_ref

Repeats

Repetition

Rest

Rest_data

Rest_type

Rhythmic_group

Right_string_fingering

Score

Score_data

Score_header

Segno

Separator

Shift_line

Slur

Slur_ref

Slurs

Space

Stem

Stem_data

Stem_type

String

String_fingering

String_position

Stroke

Syllabic_mute

Syllabic_parenthesis

Syllabic_slur

Syllabic_text

Syllable

Syllable_mute

Syllable_ref

Tie

Tie_ref

Ties

Time_signature

Tremolo

Tremolo_ref

Tuplet

Tuplet_ref

Tuplets

Unknown

Value_prefix

Abbr_name

Abbreviated name, child of Part_data

DTD definition:

<!ELEMENT abbr_name (#PCDATA)>
<!ATTLIST abbr_name
    %id;
    value CDATA     #IMPLIED>

It's the abbreviated version of the Name element. value is the unicode text used for converting to other format, as MusicXML.

@todo: move lang from part_data into this element.

Accidental

Accidental, child of Note

DTD definition:

<!ELEMENT accidental (#PCDATA)>
<!ATTLIST accidental
    %id;
    value CDATA         #REQUIRED
    cancel CDATA        #IMPLIED
    placement (above|below)     #IMPLIED
    step CDATA          #IMPLIED
    editorial CDATA     #IMPLIED>

value can range from -2 to 2, with -2 equals to double flat and 2 equals to double sharp. If there are one or two naturals before the accidental sign the cancel attribute is used, ranging from 0 to 2. A special case is when one or two naturals are in front of the note: in this case a value is 0 and cancel is 1 or 2.

placement possible values are above, below. Note that in Braille music there's no distinction and the dots 6 is always used. step possible values are 1/4, 3/4. editorial is the dots 5 in Braille and possible values are braille, parenthesis. Usually the braille value is used but it can be parenthesis if we want to render it as parenthesis when converting to another format.

@todo: change step and editorial from CDATA to proper value.

Accordion_register

Accordion register, child of Part

DTD definition:

<!ELEMENT accordion_register (#PCDATA)>
<!ATTLIST accordion_register
    %id;
    value CDATA     #REQUIRED
    tremolo (normal|double|high|low|high_low)  #IMPLIED>

value can be a single integer value, 2,4,8 or 16 or a list of integers, example "4" or "4,8". tremolo can be normal (two dots in the middle of the circle), double (three dots), high (a dot to the right), low (a dot to the left) or a combination of high and low (a dot to the right and a dot to the left).

Accordion_row

Accordion row, child of Note, Interval

DTD definition:

<!ELEMENT accordion_row (#PCDATA)>
<!ATTLIST accordion_row
    %id;
    value CDATA             #REQUIRED>

The value ranges from 0 to 8.

Alteration

Alteration value, child of Note_data

DTD definition:

<!ELEMENT alteration (#PCDATA)>

The alteration value as calculated for this note, ranging from -2 to 2. This value comes from an alteration in the key signature, from an accidental written before this note or in the same measure.

Alternation

Alternation, child of Note

DTD definition:

<!ELEMENT alternation (#PCDATA)>
<!ATTLIST alternation
    %id;
    value CDATA             #REQUIRED>

The alternation value ranges from 1 to 5 and is the number of beats notated. See NIM 7-6.

Alternation_ref

Alternation reference, child of Note_data

DTD definition:

<!ELEMENT alternation_ref EMPTY>
<!ATTLIST alternation_ref
    %id_ref;
    type    (start|stop)   #REQUIRED>

The alternation reference refers to the alternation element written for this note or for the previous one. The link with its referred is given by the id_ref attribute. It's type could be start or stop.

Appoggiatura_ref

Appoggiatura reference, child of Note_data

DTD definition:

<!ELEMENT appoggiatura_ref EMPTY>
<!ATTLIST appoggiatura_ref
    %id_ref;>

Refers to the appoggiatura element written for this note or for a previous one in case of doubling. The appoggiatura is written as an ornament and the id_ref links to the Ornament_type element.

Barline

Barline, child of Part

DTD definition:

<!ELEMENT barline (#PCDATA)>
<!ATTLIST barline
    %id;
    value CDATA         #REQUIRED>

value is the type of barline and it's used in conversion to other formats. Can be one of space, newline, braille, dotted, light_heavy, light_light, dots_light_heavy or another value.

@todo: add an attribute for barline position: left, middle, right. @todo: unify with Barline_left

Barline_left

Barline_left, child of Part

DTD definition:

<!ELEMENT barline_left (#PCDATA)>
<!ATTLIST barline_left
    %id;
    value CDATA         #REQUIRED>

value is the type of barline and it's used in conversion to other formats. Can be heavy_light_dots or another value.

@todo: unify with Barline

Barre

Barre, child of Part

DTD definition:

<!ELEMENT barre (#PCDATA)>
<!ATTLIST barre
    %id;
    value (full|half|vertical)    #REQUIRED>

Bow

Bow, child of Note

DTD definition:

<!ELEMENT bow (#PCDATA)>
<!ATTLIST bow
    %id;
    value (up|down) #REQUIRED
    doubled (true|false)    #IMPLIED>

Breath

Breath, child of Part

DTD definition:

<!ELEMENT breath (#PCDATA)>
<!ATTLIST breath
    %id;
    value (full|half|caesura)    #REQUIRED>

Chord

element graph

Chord symbol, child of Score_data, Part

DTD definition:

<!ELEMENT chord (chord_data,chord_type,(stem_type,dot?)?)>
<!ATTLIST chord
    %id;>

Chord symbols can be written in at least three ways: below the lyric or the music, inside a chord part, inside a part after a Chord_prefix.

Chord_data

element graph

Chord data, child of Chord

DTD definition:

<!ELEMENT chord_data (duration)>

The duration value is the only calculated value for this chord. It's value can be calculated from Chord_type or Stem.

Chord_prefix

Chord prefix, child of Chord

DTD definition:

<!ELEMENT chord_prefix (#PCDATA)>
<!ATTLIST chord_prefix
    %id;>

Prefix for chord symbols after the notes in a part. See Vassio.

Chord_type

Chord type, child of Chord

DTD definition:

<!ELEMENT chord_type (#PCDATA)>
<!ATTLIST chord_type
    %id;
    root   CDATA        #REQUIRED
    notes  CDATA        #REQUIRED
    bass   CDATA        #IMPLIED
    duration   CDATA    #IMPLIED
    dot    CDATA        #IMPLIED
    value  CDATA        #IMPLIED>

Chord symbol element that can be written in Braille as a note or as letter, preceded and followed by other Braille symbols.

root and bass are a string composed by the note name, ranging from A to B, eventually followed by the alteration written as # or b, example "C#" or "Bb".

notes are the notes that build the chord, including the optional bass and the root. Notes are written as a sequence separated by commas, example "C,E,G" or "C,Eb,G".

duration is expressed as 1024 for a quarter. dot is the number of dots for this chord, usually one. duration and dot are optional parameter and are used when the chord symbol is written as a note.

value is the text used in conversion to other formats, example "Cmin"

Clef

Clef, child of Part

DTD definition:

<!ELEMENT clef (#PCDATA)>
<!ATTLIST clef
    %id;
    name CDATA          #REQUIRED
    line CDATA          #IMPLIED
    eight (above|below) #IMPLIED
    cross_staff (true|false)    #IMPLIED
    >

name can be one of G, F, C. Other values are possible for percussion or modern clefs (not handled in this version). line is the line on which the clef is written. The default value is 2 for the G clef and 4 for the F clef.

eight is the 8 written above or below the note. The cross_staff flag is for the clefs that are used when one hand part is written in the opposite staff, see NIM 15-14.

Coda

Coda, child of Part

DTD definition:

<!ELEMENT coda (#PCDATA)>
<!ATTLIST coda
    %id;>

Dot

Dot, child of Note

DTD definition:

<!ELEMENT dot (#PCDATA)>
<!ATTLIST dot
    %id;
    value CDATA             #REQUIRED>

value is the number of dots, from 1 to 3.

Duration

Duration, child of Chord_data, Note_data, Rest_data, Stem_data

DTD definition:

<!ELEMENT duration (#PCDATA)>

The duration as calculated for a musical element, with 1024 for a quarter. For dotted notes or rests the duration take into account also the dots, so a dotted eighth have duration equals to 768 (512+256). For musical elements in an irregular group the duration value is the duration as written, so three eights in a triplet have duration equals to 512. The real duration can be retrieved combining this value with the Tuplet_ref data.

Dynamic

Dynamic, child of Part

DTD definition:

<!ELEMENT dynamic (#PCDATA)>
<!ATTLIST dynamic
    %id;
    value CDATA         #REQUIRED
    line_of_continuation (1|2) #IMPLIED>

value can be one of:

*mp, mf, sf, sfp, sfz, sfpp, sffz,
rf ,rfz ,f, p, cresc., dim.,
accordion_draw, accordion_push,
cresc_start, cresc_stop, dim_start, dim_stop*

The crest_start, cresc_stop values and so on are used for the Braille symbol for start crescendo and end crescendo.

Other values are written as Generic_text.

Editorial_mark

Editorial_mark, child of Rest

DTD definition:

<!ELEMENT editorial_mark (#PCDATA)>
<!ATTLIST editorial_mark
    %id;>

Ending

Ending, child of Part

DTD definition:

<!ELEMENT ending (#PCDATA)>
<!ATTLIST ending
    %id;
    value CDATA         #REQUIRED>

value can be a single integer value or a list of integers, example "1" or "1,2"

Family

Family, child of Part_data

DTD definition:

<!ELEMENT family (#PCDATA)>
<!ATTLIST family
    %id;>

Known values are brass, chords, keyboard, organ pedal, string, voice.

Fermata

Fermata, child of Note, Rest

DTD definition:

<!ELEMENT fermata (#PCDATA)>
<!ATTLIST fermata
    %id;>

@todo: set fermata also as child of Part to take into account fermata between notes of above barlines. Probably it will be necessary to add a value attribute.

Fingering

Fingering, child of Note, Interval

DTD definition:

<!ELEMENT fingering (#PCDATA)>
<!ATTLIST fingering
    %id;
    value CDATA     #IMPLIED
    alternative CDATA     #IMPLIED>

value and alternative range from 1 to 5. In case of a finger substitution on a note value is written as a sequence of integers separated by comma, example "1,2". One of value and alternative is mandatory.

Foot_crossing

Foot crossing, child of Note

DTD definition:

<!ELEMENT foot_crossing (#PCDATA)>
<!ATTLIST foot_crossing
    %id;
    value (change|front|behind) #IMPLIED>

Foot crossing for the organ pedal.

Generic_text

Generic text, child of Score_data, Part, Metronome

DTD definition:

<!ELEMENT generic_text (#PCDATA)>
<!ATTLIST generic_text
    %id;
    type CDATA          #IMPLIED
    value CDATA         #IMPLIED
    xml:lang CDATA      #IMPLIED
    line_of_continuation (1|2) #IMPLIED>

Generic text is a multipurpose element can be used to encode text used in a score and that is not encoded as Dynamic. type is the category to which the text pertains. Known values are title,opus,author,description,expression,annotation,text. New values can be set by the user. value is the unicode text ready to be used in a translation process.

Hand

Hand, child of Part

DTD definition:

<!ELEMENT hand (#PCDATA)>
<!ATTLIST hand
    %id;
    value (left|right)  #REQUIRED
    chord_dir (up|down)   #IMPLIED>

chord_dir is the chord reading direction, if missing default to down

Harmonic

Harmonic, child of Note, Interval

DTD definition:

<!ELEMENT harmonic (#PCDATA)>
<!ATTLIST harmonic
    %id;
    value (natural|artificial) #REQUIRED
    doubled (true|false)    #IMPLIED>

Inaccord

Inaccord, child of Part

DTD definition:

<!ELEMENT inaccord (#PCDATA)>
<!ATTLIST inaccord
    %id;
    value CDATA         #REQUIRED>

value is one of full for full-measure, part for part-measure, or division for measure division for part-measure inaccord.

Interval

element graph

Interval, child of Note

DTD definition:

<!ELEMENT interval (shift_line?,
    harmonic?,accordion_row?,accidental?,octave?,interval_type,
    (fingering|(string_fingering,harmonic?)|
    (harmonic,string_fingering)|organ_pedal)?,
    tie?,shift_line?)>
<!ATTLIST interval
    %id;>

Interval is the container for all the elements that precedes or follows an Interval_type.

@todo: add Stem.

Interval_data

element graph

Interval_data, child of Interval_ref

DTD definition:

<!ELEMENT interval_data (pitch,alteration?,ties?)>

Container for calculated data.

Interval_ref

element graph

Interval_ref, child of Intervals

DTD definition:

<!ELEMENT interval_ref (interval_data)>
<!ATTLIST interval_ref
    %id_ref;>

Refers to the interval element written for this note or for a previous one in case of doubling. The Interval_data contains the calculated data for the interval.

Interval_type

Interval_type, child of Interval

DTD definition:

<!ELEMENT interval_type (#PCDATA)>
<!ATTLIST interval_type
    %id;
    value CDATA         #REQUIRED
    doubled (true|false)    #IMPLIED>

value ranges from 2 to 8. If the interval is written in doubled form the doubled attribute is true.

Real pitch of the interval depends on various parameters like chord reading direction, presence of an octave sing in front of the interval and by the Braille rule for intervals. The real pitch is encoded in Interval_data.

Intervals

element graph

Intervals, child of Note_data

DTD definition:

<!ELEMENT intervals (interval_ref+)>

Container for interval references.

Key_signature

Key signature, child of Score_data, Part

DTD definition:

<!ELEMENT key_signature (#PCDATA)>
<!ATTLIST key_signature
    %id;
    value CDATA         #REQUIRED
    cancel CDATA        #IMPLIED>

Key signature can be written as child of Part, acting only on this part, or for all the parts as child of Score_data.

value is the alterations value, ranging from -7 to 7. cancel is the number of naturals used to cancel a previous key signature, ranging from 0 to 7.

Line_of_continuation

Line of continuation, child of Part

DTD definition:

<!ELEMENT line_of_continuation (#PCDATA)>
<!ATTLIST line_of_continuation
    %id;
    value (start|stop) #REQUIRED
    number  (1|2)   #IMPLIED>

Lyric

element graph

Lyric, child of Score_data

DTD definition:

<!ELEMENT lyric (lyric_prefix?,(syllable|syllable_mute|lyric_repeat|space)+)>
<!ATTLIST lyric
    %id;
    xml:lang CDATA      #IMPLIED>

Is the container for a lyric line written before or after the music. The lyric text is divided in syllables. The link between a syllable and a note is in the Note_data/Lyrics references.

xml:lang is the language used for this lyric. A lyric text written in more than a language can be encoded using the xml:lang for each syllable, see Syllabic_text.

Lyric_prefix

Lyric prefix, child of Lyric

DTD definition:

<!ELEMENT lyric_prefix (#PCDATA)>
<!ATTLIST lyric_prefix
    %id;>

Is the prefix for a line of lyric.

Lyric_repeat

element graph

Lyric repeat, child of Lyric

DTD definition:

<!ELEMENT lyric_repeat
    ((number?,lyric_repetition,(syllable|syllable_mute|space)+,lyric_repetition)|
    (lyric_repetition,(syllable|syllable_mute|space)+,lyric_repetition,number?))>
<!ATTLIST lyric_repeat
    %id;>

Container for repeating a lyric chunk of text. The Lyric_repetition Braille symbol is written before and after the part of text to be repeated. Can be preceded or followed by a number, or can be doubled.

Lyric_repetition

Lyric repetition, child of Lyric_repeat

DTD definition:

<!ELEMENT lyric_repetition (#PCDATA)>
<!ATTLIST lyric_repetition
    %id;
    doubled (true|false)    #IMPLIED>

Is the Braille symbol for repeating a lyric chucnk of text. Can be doubled as indicated in the doubled attribute.

Lyrics

element graph

Lyrics reference container, child of Note_data

DTD definition:

<!ELEMENT lyrics (syllable_ref)+>

Container for the syllable references, Syllable_ref. Each note can have one or more syllables associated as in the case of various verses.

Merged_text

Merged text, child of Note

DTD definition:

<!ELEMENT merged_text (#PCDATA)>
<!ATTLIST merged_text
    %id;
    value CDATA         #REQUIRED>

Braille symbol used for merging more syllables on a note. value is the number of merged syllables, ranging from 2 to 4.

Metronome

element graph

Metronome, child of Score_data

DTD definition:

<!ELEMENT metronome ((generic_text,space)?,
    metronome_note_type,(metronome_equal,(metronome_value|metronome_note_type))?)>
<!ATTLIST metronome
    %id;>

@todo: handle other markings as MM=120 or two notes=one note

Metronome_equal

Metronome equal, child of Metronome

DTD definition:

<!ELEMENT metronome_equal (#PCDATA)>
<!ATTLIST metronome_equal
    %id;>

Is the equal sign between two elements of a metronome marking.

Metronome_note_type

Metronome note type, child of Metronome

DTD definition:

<!ELEMENT metronome_note_type (#PCDATA)>
<!ATTLIST metronome_note_type
    %id;
    value (8th_or_128th|quarter_or_64th|half_or_32nd|whole_or_16th|brevis|longa)  #REQUIRED
    dot (true|false) #IMPLIED>

The metronome note type is similar to the Note_type element. The only difference is that a C note is used and the dot attribute.

Metronome_value

Metronome value, child of Metronome

DTD definition:

<!ELEMENT metronome_value (#PCDATA)>
<!ATTLIST metronome_value
    %id;
    value CDATA         #REQUIRED>

The metronome value is the numeric value written after the equal sign. It can be a single number or a string. The value attribute is an integer value or a tuple of integer, when multiple values are used.

Midi_instrument

Midi instrument, child of Part_data

DTD definition:

<!ELEMENT midi_instrument EMPTY>
<!ATTLIST midi_instrument
    value CDATA         #REQUIRED>

value is the MIDI value, from 0 to 128.

Midi_metronome

Midi metronome, child of Score_header

DTD definition:

<!ELEMENT midi_metronome EMPTY>
<!ATTLIST midi_metronome
    value CDATA         #REQUIRED>

value is the metronome value in quarters per minute, example "120".

Multimeasure

Multimeasure, child of Rest_data

DTD definition:

<!ELEMENT multimeasure (#PCDATA)>

Number of measures for this rest. This value can be encoded in the Rest_type element, for a multi measure rest written as a sequence of Braille signs or can be encoded in the Number element preceding the Rest_type.

Music_hyphen

Music hyphen, child of Part

DTD definition:

<!ELEMENT music_hyphen (#PCDATA)>
<!ATTLIST music_hyphen
    %id;>

Name

Name, child of Part_data

DTD definition:

<!ELEMENT name (#PCDATA)>
<!ATTLIST name
    %id;
    value CDATA     #IMPLIED>

Part name as written used in the Braille score. value is the unicode text used for converting to other format, as MusicXML.

@todo: move lang from part_data into this element.

Newline

Newline, child of Score_data, Part

DTD definition:

<!ELEMENT newline (#PCDATA)>
<!ATTLIST newline
    %id;>

Note

element graph

Note, child of Part

DTD definition:

<!ELEMENT note (note_data,
        foot_crossing?,
        slur?,shift_line?,(bow|stroke)?,pizzicato?,right_string_fingering?,
        tuplet?,value_prefix?,
        ornament*,nuance*,
        harmonic?,accordion_row?,accidental?,octave?,
        note_type,
        dot?,
        (fingering|(string_fingering,harmonic?)|
        (harmonic,string_fingering)|organ_pedal)?,
        ((slur,interval*,
        (tremolo|alternation)?,fermata?,(merged_text?|syllabic_slur*))|
        (interval*,
        (tremolo|alternation)?,fermata?,(merged_text?|syllabic_slur*),
        slur?)),
        tie?,shift_line?)>
<!ATTLIST note
    %id;>

A minimal note encoding contains Note_data and Note_type. The first is the place for all the calculated data, the latter is the written Braille note. Before and after Note_type usually are written several other Braille elements. The order of signs is not always defined and can vary with the national conventions.

Note_data

element graph

Note data, child of Note

DTD definition:

<!ELEMENT note_data (pitch,(duration|appoggiatura_ref),alteration?,
    rhythmic_group?,
    tuplets?,slurs?,ties?,intervals?,nuances?,tremolo_ref?,alternation_ref?,
    lyrics?)>

Is the container for all the calculated data for this note. Children are of three types: simple values, as Pitch or Duration, single references as Appoggiatura_ref, list of references as Slurs.

Note_ref

Note reference, child of Stem_data

DTD definition:

<!ELEMENT note_ref EMPTY>
<!ATTLIST note_ref
    %id_ref;>

@todo: remove this element when Stem is placed as child of Note or Interval

Note_type

Note type, child of Note

DTD definition:

<!ELEMENT note_type (#PCDATA)>
<!ATTLIST note_type
    %id;
    name (A|B|C|D|E|F|G)    #REQUIRED
    value (8th_or_128th|quarter_or_64th|half_or_32nd|whole_or_16th|brevis|longa)  #REQUIRED>

Nuance

Nuance, child of Note

DTD definition:

<!ELEMENT nuance (#PCDATA)>
<!ATTLIST nuance
    %id;
    value CDATA         #REQUIRED
    doubled (true|false)    #IMPLIED>

value is the name of the nuance. Know values are staccato, staccatissimo, mezzo_staccato, marcato, accento, accento_inverso, martellato

Nuance_ref

Nuance reference, child of Nuances

DTD definition:

<!ELEMENT nuance_ref EMPTY>
<!ATTLIST nuance_ref
    %id_ref;>

Refers to the nuance element written for this note or for a previous one in case of doubling.

Nuances

element graph

Nuances, child of Note_data

DTD definition:

<!ELEMENT nuances (nuance_ref+)>

Container for nuance references, see Nuance_ref

Number

Number, child of ...

DTD definition:

<!ELEMENT number (#PCDATA)>
<!ATTLIST number
    %id;
    value CDATA         #REQUIRED>

Number written as number sing followed by digits. value is the number value. @todo: change this to include different kind of numbers.

Octave

Octave, child of Interval, Note, Repeat

DTD definition:

<!ELEMENT octave (#PCDATA)>
<!ATTLIST octave
    %id;
    value CDATA         #REQUIRED
    position CDATA      #IMPLIED>

value and position range from 0 to 7. position is used when two octave marks are used for print "8va", the first used for position and the latter for the actual octave, see NIM 1-13.

Organ_pedal

Organ pedal, child of Note, Interval

DTD definition:

<!ELEMENT organ_pedal (#PCDATA)>
<!ATTLIST organ_pedal
    %id;
    value (left_toe|left_heel|right_toe|right_heel) #REQUIRED
    substitution (left_toe|left_heel|right_toe|right_heel) #IMPLIED>

Foot sign for the organ pedal.

Ornament

element graph

Ornament, child of Note

DTD definition:

<!ELEMENT ornament (accidental*,ornament_type)>
<!ATTLIST ornament
    %id;>

Ornament_type

Ornament_type, child of Ornament

DTD definition:

<!ELEMENT ornament_type (#PCDATA)>
<!ATTLIST ornament_type
    %id;
    value CDATA         #REQUIRED
    doubled (true|false)    #IMPLIED>

Known values for value are trill, appoggiatura, short_appoggiatura, turn, turn_above, inverted_turn, inverted_turn_above, short_trill, extended_short_trill, mordent, extended_mordent, arpeggio_up, extended_arpeggio_up, arpeggio_down ,extended_arpeggio_down

Part

element graph

Part, child of Score_data

DTD definition:

<!ELEMENT part (part_name?, (space|newline|key_signature|time_signature|clef|
            note|stem|rest|inaccord|barline|repeat|barline_left|
            music_hyphen|dynamic|ending|separator|hand|segno|coda|generic_text|
            pedal|chord_prefix|chord|line_of_continuation|
            string|barre|string_position|rasgueado|accordion_register|breath|
            right_string_fingering|
            unknown)+)>
<!ATTLIST part
    %id;>

Part is a container for musical elements, starts with a Part_name followed by music data. Each part is identified by an id and linked by this value to the corresponding Part_data entry in the Part_list. The sequence of parts follows the Braille document layout. For example in a section by section format score for piano, we have two Part_data entries in the Part_list. In the Score_data section we have a sequence of parts, each one starting with the Part_name, that is left hand or right hand. A part ends with new line or when a new part starts.

One exception to the above is a single part that has no name. This is a special case used for simple examples or short pieces where there's no part indication. In this case the Part_name is missing.

Elements that are outside the part elements apply to the document. For example a key signature written before the parts applie to all the parts, while a key signature written after the Part_name, that is inside the part, apply only to this part.

@todo: elements inside a part are not grouped by measure. Do we need to change this?

Part_data

element graph

Part data, child of Part_list

DTD definition:

<!ELEMENT part_data (name, abbr_name?, clef?, midi_instrument?, family?)>
<!ATTLIST part_data
    %id;
    chord_dir (up|down)   #IMPLIED
    xml:lang CDATA      #IMPLIED
    transpose CDATA     #IMPLIED>

Part data is a container for part definition entries. The chord_dir attribute is down by default. The xml:lang attribute can be set and applies to the Name and Abbr_name elements. The transpose attribute if the value of the transpose in semitones.

Children elements of part data are used to fully specify the part. In particular the Clef element is used as a default clef for translating the BMML document to another format, where the clef for a part is not explicity written (as usual in Braille music). The Family element is used for defining the category of the part. This is useful for example when there are elements that change their meaning or simply their speech output aaccording to the category: for example the Fingering element has different names and values whether the part is a keyboard part or a guitar part.

Part_list

element graph

Part list, child of Score_header

DTD definition:

<!ELEMENT part_list (part_data+)>

Defines the list of part used in the document. Each entry in the part list must match one or more Part entries in Score_data.

Part_name

Part name, child of Part

DTD definition:

<!ELEMENT part_name (#PCDATA)>
<!ATTLIST part_name
    %id;>

Defines the Braille text used to start a Part. Usually the text is equal to the Name or Abbr_name defined in Part_data.

Pedal

Pedal, child of Part

DTD definition:

<!ELEMENT pedal (#PCDATA)>
<!ATTLIST pedal
    %id;
    value CDATA         #REQUIRED>

Is the piano pedal as defined in NIM 15-15 and followings. Known values for value are down, up, up_down, half, up_immediately, down_up.

Pitch

Pitch, child of Interval_data, Note_data

DTD definition:

<!ELEMENT pitch (#PCDATA)>

Is the real pitch of the note. The value is an int with 28 equals to the middle C or C between the staves. Add 7 to go up one octave and subtract 7 to go down one octave. Alteration values are encoded in the Alteration element.

Pizzicato

Pizzicato, child of Note

DTD definition:

<!ELEMENT pizzicato (#PCDATA)>
<!ATTLIST pizzicato
    %id;
    value (left|right) #REQUIRED
    doubled (true|false)    #IMPLIED>

Rasgueado

Rasgueado, child of Part

DTD definition:

<!ELEMENT rasgueado (#PCDATA)>
<!ATTLIST rasgueado
    %id;
    value (up|down) #REQUIRED>

Repeat

element graph

Repeat, child of Part

DTD definition:

<!ELEMENT repeat (repeat_data,
            slur?,octave?,
            repetition,
            number?,slur?,tie?)>
<!ATTLIST repeat
    %id;>

Is the container for the Repeat element.

Repeat_data

element graph

Repeat data, child of Repeat

DTD definition:

<!ELEMENT repeat_data (repeats?)>

Is the container for the Repeats element.

Repeat_ref

element graph

Repeat reference, child of Repeats

DTD definition:

<!ELEMENT repeat_ref ((note_data|rest_data|stem_data)?)>
<!ATTLIST repeat_ref
    %id_ref;>

A repeat reference is a link to a musical element that is repeated. The Note_data or Rest_data element can have the same values of the referred element but can also be different. For example in the case of a repetition with an octave sign in front, the pitch values are different.

@todo: remove stem_data when the stem will be placed as child of note.

Repeats

element graph

Repeats, child of Repeat_data

DTD definition:

<!ELEMENT repeats (repeat_ref+)>

Is the container for repeat references Repeat_ref.

Repetition

Repetition, child of Repeat

DTD definition:

<!ELEMENT repetition (#PCDATA)>
<!ATTLIST repetition
    %id;
    value CDATA         #REQUIRED
    separation CDATA    #IMPLIED>

Is the Braille repetition element. The value attribute is the number of repetition sign written, default is 1. The separation sign can be placed in front of a repetition sign to indicate that the repetition is different from the previous one as in NIM 9-19.

Rest

element graph

Rest, child of Part

DTD definition:

<!ELEMENT rest (rest_data,
        slur?,tuplet?,editorial_mark?,number?,value_prefix?,
        rest_type,
        dot?,slur?,fermata?)>
<!ATTLIST rest
    %id;>

A minimal rest encoding contains Rest_data and Rest_type. The first is the place for all the calculated data, the latter is the written Braille rest. Before and after Rest_type usually are written several other Braille elements. The order of signs is not always defined and can vary with the national conventions.

Rest_data

element graph

Rest data, child of Rest

DTD definition:

<!ELEMENT rest_data (duration,multimeasure?,
    rhythmic_group?,tuplets?,slurs?)>

Is the container for all the calculated data for this rest. Children are of two types: simple values, as Duration, list of references as Slurs.

Rest_type

Rest type, child of Rest

DTD definition:

<!ELEMENT rest_type (#PCDATA)>
<!ATTLIST rest_type
    %id;
    value (8th_or_128th|quarter_or_64th|half_or_32nd|whole_or_16th|brevis|longa)  #REQUIRED
    multimeasure CDATA     #IMPLIED>

The multimeasure attribute is the number of measures for a multimeasure rest. For example a rest written as three consecutive Braille sign for three whole rests, has a multimeasure value equals to 3.

Rhythmic_group

Rhythmic group, child of Note_data, Rest_data

DTD definition:

<!ELEMENT rhythmic_group (#PCDATA)>

Identifies a rhythmic group as written according to NIM. The value is a string, one of start,stop,continue.

Right_string_fingering

Fingering for string for right hand, child of Note, Part

DTD definition:

<!ELEMENT right_string_fingering (#PCDATA)>
<!ATTLIST right_string_fingering
    %id;
    value CDATA     #REQUIRED>

value from 0 to 5, with 0 used for thumb and 5 for missing fingering.

Score

element graph

Score, root of the document

DTD definition:

<!ELEMENT score (score_header, score_data)>
<!ATTLIST score
    version CDATA #REQUIRED>

Score_data

element graph

Score_data, child of Score

DTD definition:

<!ELEMENT score_data (space|newline|key_signature|time_signature|
    lyric|part|unknown|metronome|generic_text)+>

Is the container for the Braille document text elements.

Score_header

element graph

Score_header, child of Score

DTD definition:

<!ELEMENT score_header (meta_data?, part_list, midi_metronome?)>

Is the header of the document, with all the definitions used to process the document.

Segno

Segno, child of Part

DTD definition:

<!ELEMENT segno (#PCDATA)>
<!ATTLIST segno
    %id;>

Separator

Separator, child of Part

DTD definition:

<!ELEMENT separator (#PCDATA)>
<!ATTLIST separator
    %id;>

Is a generic separator written in Braille as dot 3, used to separate for example a Part_name from the following element.

Shift_line

Shift line for string instruments, child of Part

DTD definition:

<!ELEMENT shift_line (#PCDATA)>
<!ATTLIST shift_line
    %id;
    value (glissando|start|stop)         #REQUIRED>

Slur

Slur, child of Note, Repeat, Rest, Stem

DTD definition:

<!ELEMENT slur (#PCDATA)>
<!ATTLIST slur
    %id;
    value CDATA         #REQUIRED>

Known values for value are short, long, phrasing_end, short_end_begin, long_end_begin, phrasing_begin, phrasing_end_begin

Slur_ref

Slur reference, child of Slurs

DTD definition:

<!ELEMENT slur_ref EMPTY>
<!ATTLIST slur_ref
    %id_ref;
    type    (start|stop|continue)   #REQUIRED
    start_ref  CDATA    #REQUIRED>

Is the reference to a Slur. type attribute can be start, stop or continue. The continue value is optional since usually only start and stop of a slur are cleraly determined. For example a short slur written in Braille as dots 1,4 is encoded after the first note, and a slur reference with type equals to start is used. For the following note a slur reference with type equals to stop is used. The id and start_ref attributes have the same values, the id of the Slur element.

The start_ref attribute is different from the id attribute when for example a long slur is used. The note with the long slur, written in Braille as dots 1,4 and 1,4, has a slur reference to its slur element. A following note with a short slur is then used to close the slur. In this case a slur reference with the id of the closing short slur is encode. This slur reference has a start_ref value equals to the id of the opening long slur. Last, the following note has a slur reference with id equals to the id of the closing short slur and start_ref equals to the id of the opening long slur.

Slurs

element graph

Slurs, child of Note_data, Rest_data

DTD definition:

<!ELEMENT slurs (slur_ref+)>

Is the container for the Slur_ref elements.

Space

Space, child of Score_data, Part, Metronome

DTD definition:

<!ELEMENT space (#PCDATA)>
<!ATTLIST space
    %id;>

Stem

element graph

Stem, child of Part

DTD definition:

<!ELEMENT stem (stem_data,
    slur?,stem_type,dot?,slur?,tie?)>
<!ATTLIST stem
    %id;>

@todo: move stem inside note and interval. At the moment it is not possible to write a note with a stem followed by an interval.

Stem_data

element graph

Stem data, child of Stem

DTD definition:

<!ELEMENT stem_data (note_ref,duration)>

Is the container for all the calculated data for this stem.

@todo: with stem child of note the note_ref element is no more needed.

Stem_type

Stem type, child of Stem

DTD definition:

<!ELEMENT stem_type (#PCDATA)>
<!ATTLIST stem_type
    %id;
    value CDATA         #REQUIRED>

value is the integer duration of the stem, with quarter equals to 1024

@todo: change value from int to something more readable ?

String

String, child of Part

DTD definition:

<!ELEMENT string (#PCDATA)>
<!ATTLIST string
    %id;
    value CDATA         #REQUIRED
    doubled (true|false)    #IMPLIED>

value is the integer number of the string, from 1 to 7

String_fingering

Fingering for string, child of Note, Interval

DTD definition:

<!ELEMENT string_fingering (#PCDATA)>
<!ATTLIST string_fingering
    %id;
    value CDATA     #REQUIRED
    line_of_continuation (start|stop)   #IMPLIED>

value from 0 to 5, with 0 used for thumb and 5 for open string. In case of a finger substitution on a note value is written as a sequence of integers separated by comma, example "1,2". line_of_continuation can be one of start|stop.

String_position

String_position, child of Part

DTD definition:

<!ELEMENT string_position (#PCDATA)>
<!ATTLIST string_position
    %id;
    value CDATA         #REQUIRED
    line_of_continuation (1|2)   #IMPLIED>

value is the string position, with 0 as half position line_of_continuation can only be 1 or 2.

Stroke

Stroke, child of Note

DTD definition:

<!ELEMENT stroke (#PCDATA)>
<!ATTLIST stroke
    %id;
    value (up|down) #REQUIRED
    doubled (true|false)    #IMPLIED>

Syllabic_mute

Syllabic mute, child of Syllable_mute

DTD definition:

<!ELEMENT syllabic_mute (#PCDATA)>
<!ATTLIST syllabic_mute
    %id;
    value (single|measure)  #REQUIRED
    doubled (true|false)    #IMPLIED>

Braille sign for a mute syllable (not in the NIM) used to indicate a break in the lyric syllables. value indicates whether only one syllable is mute or a whole measure.

Syllabic_parenthesis

Syllabic parenthesis, child of Syllable

DTD definition:

<!ELEMENT syllabic_parenthesis (#PCDATA)>
<!ATTLIST syllabic_parenthesis
    %id;>

Syllabic_slur

Syllabic slur, child of Note

DTD definition:

<!ELEMENT syllabic_slur (#PCDATA)>
<!ATTLIST syllabic_slur
    %id;
    value CDATA         #REQUIRED
    verses CDATA        #IMPLIED>

Known values for value attribute are short, long, verse. If verse, the verses attribute can be used to indicate to which verses this slur applies.

Syllabic_text

Syllabic text, child of Syllable

DTD definition:

<!ELEMENT syllabic_text (#PCDATA)>
<!ATTLIST syllabic_text
    %id;
    value CDATA     #IMPLIED
    xml:lang CDATA  #IMPLIED>

Is the text that forms a syllable, i.e. that is sung on a note. value is the unicode text used in translating to other formats.

Syllable

element graph

Syllable, child of Lyric, {Lyric_repeat}

DTD definition:

<!ELEMENT syllable ((syllabic_parenthesis,syllabic_text,syllabic_parenthesis)|
                    (syllabic_text))>
<!ATTLIST syllable
    %id;>

A syllable contains a text that can be enclosed in parenthesis.

Syllable_mute

element graph

Syllable_mute, child of Lyric, {Lyric_repeat}

DTD definition:

<!ELEMENT syllable_mute (syllabic_mute,number?)>
<!ATTLIST syllable_mute
    %id;>

A mute syllable is a place holder in a lyric text. Is composed by a Syllabic_mute eventually followed by a Number indicating the number of times the mute syllable need to be repeated.

Syllable_ref

Syllable reference, child of Lyrics

DTD definition:

<!ELEMENT syllable_ref EMPTY>
<!ATTLIST syllable_ref
    %id_ref;
    type (begin|middle|end|single|continue|mute) #IMPLIED>

The type attribute indicate the role of the syllable in a word or a phrase.

Tie

Tie, child of Note

DTD definition:

<!ELEMENT tie (#PCDATA)>
<!ATTLIST tie
    %id;
    value CDATA         #REQUIRED>

value known values are normal,chord,chord_doubled,arpeggio.

Tie_ref

Tie reference, child of Ties

DTD definition:

<!ELEMENT tie_ref EMPTY>
<!ATTLIST tie_ref
    %id_ref;
    type    (start|stop)   #REQUIRED
    start_ref  CDATA    #REQUIRED>

See Slur_ref description.

Ties

element graph

Ties, child of Note_data

DTD definition:

<!ELEMENT ties (tie_ref+)>

Is the container for the Tie_ref elements.

Time_signature

Time signature, child of Score_data, Part

DTD definition:

<!ELEMENT time_signature (#PCDATA)>
<!ATTLIST time_signature
    %id;
    values CDATA        #REQUIRED
    csymbol (C|c)       #IMPLIED
    figure (true|false) #IMPLIED
    single_number (true|false)  #IMPLIED>

The time signature can be written in various ways. The values attribute is a tuple of values: for a simple time signature it is a single tuple with the first number as number of beats and the second one as beat duration. If multiple time signatures are written the value attribute is a tuple, as ((4,1024),(3,512)) to write 4 quarters and 3 eighths, or ((3,4),1024) to write a 3+4 quarters.

The symbol attribute is used for common time, C, or cutted time, c. The figure attribute is true if a note is used for the beat duration. The single_number attribute is true if the time signature is written as a single number.

Tremolo

Tremolo, child of Note

DTD definition:

<!ELEMENT tremolo (#PCDATA)>
<!ATTLIST tremolo
    %id;
    value CDATA         #REQUIRED
    doubled (true|false)    #IMPLIED>

The tremolo sign value attribute is the number of beams used for the tremolo.

Tremolo_ref

Tremolo reference, child of Note_data

DTD definition:

<!ELEMENT tremolo_ref EMPTY>
<!ATTLIST tremolo_ref
    %id_ref;>

Tuplet

Tuplet, child of Note, Rest

DTD definition:

<!ELEMENT tuplet (#PCDATA)>
<!ATTLIST tuplet
    %id;
    value CDATA         #REQUIRED
    doubled (true|false)    #IMPLIED>

The value attribute is the number written for the irregular group.

Tuplet_ref

Tuplet reference, child of Tuplets

DTD definition:

<!ELEMENT tuplet_ref EMPTY>
<!ATTLIST tuplet_ref
    %id_ref;
    notes   CDATA   #REQUIRED
    type    (start|stop|continue)   #REQUIRED>

The notes attribute is a combination of two values: the number of real notes and the number of actual notes. So a triplet have a notes value equals to 2,3 to indicate two notes in place of three. The type attribute can be start,stop,continue.

Tuplets

element graph

Tuplets, child of Note_data, Rest_data

DTD definition:

<!ELEMENT tuplets (tuplet_ref+)>

Tuplet_ref container.

Unknown

Unknown, child of Score_data, Part

DTD definition:

<!ELEMENT unknown (#PCDATA)>
<!ATTLIST unknown
    %id;>

Each element that is not yet defined in the BMML code can be encoded as an unknown element.

@todo: add a value attribute to encode other information that can be useful, for example user information

Value_prefix

Value prefix, child of Note, Rest

DTD definition:

<!ELEMENT value_prefix (#PCDATA)>
<!ATTLIST value_prefix
    %id;
    value (separator|large|small|256th)         #REQUIRED>

Prefix for defining the duration of a Note or a Rest or used as distiction of value.