Reference: attributes

note attribute

note
Type Element Description Use
    a specific pitch of frequency within a certain framework of frequencies To indicate the frequency of a musical "note" or its glyph in visual rendering

Notes can be expressed absolutely as frequencies, or relatively with conventional notation. A note is also expressed in terms of its duration (see the Note length values).

 

Relative note values

Note names:

A
B
C
D
E
F
G

These note names refer to the so-called naturals.

When these relative note names are used, the octave should also be declared, eg 3C refers to note C in octave 3.

Example

Here are a few C notes, each in a different octave:

Long form:

note="3C"
note="7C"
note="4C"
note="2C"

Short form:

3C
7C
4C
2C

Notes values:

Apart from the note name, referring to pitch, its length is also important. In Western staff notation relative length units are as follows:

1 = whole
2 = minim / half
4 = crotchet / quarter
8 = eighth
16 = sixteenth
32 = thirty-second
64 = sixty-fourth

In MML convention a length units number follows the note name., separated with a colon.

Examples

Here are examples of an A note with different relative note length values.

A:2
A:4
A:8
A:16
A:32
A:64

The default is the whole note. However, a songs as a whole, or any part of it, may have a different default note length. To have economical markup it is advised that a default value be declared for smaller structural units, for example on beat level.

Examples

Here is a bar (bar number 20) with eighth notes as default:

<bar 20:8>

Here is a beat with sixteenth notes as default:

<bar 20:8>
<beat 3:16>

Absolute note values

Absolute note values are expressed in terms of frequency noted in Herz (Hz). When all notes are expressed absolutely, there is no need to state octaves.

 

Example
Markup What happens...
Absolute note
note="341Hz" this note is rendered at 341Hz
Relative note
note="4C:8" This note is rendered as an eight C note on octave 4.
When the medium is audio, it is played at the relevant frequency as provided by the frequency table.
When the medium is visual it is rendered on the appropriate location on the staff.

 

© 1999, 2000 Author: Jacques Steyn