--- source: https://www.w3.org/2021/06/musicxml40/tutorial/notation-basics/ downloaded: 2026-01-30T08:38:31.962Z --- # Notation Basics in MusicXML | MusicXML 4.0 MusicXML 4.0 > Tutorial > Notation Basics in MusicXML # Notation Basics in MusicXML MIDI represents musical performance information, but leaves out a great deal of information about music notation. MusicXML represents this information, making it much more useful than MIDI for interchange between notation programs. In this section we describe the main elements used to represent music notation that go far beyond what is represented in MIDI files. ## How Music Looks vs. How Music Sounds Let us look again at the example we used in the previous section - the first four bars of "Après un rêve" by Gabriel Fauré: Clearly our discussion of the MIDI-compatible portion of MusicXML left out many things represented in this music. Where are the tempo and dynamic markings: the Andantino, pp, dolce, crescendo and diminuendo wedges? Where are stem directions stored? The downstem on the initial G in the voice part is not what many programs would default to. How is the beaming represented, so that all the eighth notes are beamed together in the piano part, but separated into triplets in the voice part? How are the piano chords split between staves? How are accidentals indicated, including courtesy accidentals like the A-flat in the fourth bar? A fundamental part of MusicXML is the distinction between elements that primarily represent the sound of the music versus those that represent its appearance. We discussed the sound elements in the previous section, and they are of great use to applications dealing with MIDI or other sound files. Now we discuss the elements for musical appearance, which are of great use to music notation applications. Here is what the beginning of the voice part looks like for "Après un rêve," up to the end of the first measure: ```xml 24 -3 minor G 2 Andantino 72 1 ``` And here is what the beginning of the piano part looks like for "Après un rêve," up to the first chord in the piano part. We will discuss the appearance elements used in these two examples in the rest of this section. ```xml 2 -3 minor 2 G 2 F 4 1 C 4 1 1 eighth up 1 begin E -1 4 1 1 eighth up 1 G 4 1 1 eighth up 1 ``` ## Attributes ### Staves The element indicates the number of staves in a musical part, which in this case is 2 staves for the piano part. The element is optional. If it is not present, as is the case in the voice part, there is 1 staff for the part. ### Clef The clef element is used to indicate the clef for the staff. By specifying the clef's and its , MusicXML handles both the common treble and bass clefs along with tenor, alto, percussion, tab, and older clefs. The treble clef definition indicates that the second line from the bottom of the staff is a G; the bass clef definition indicates that the fourth line from the bottom of the staff is an F. The number attribute indicates the staff number if the part has more than one staff. The element may also contain a element after the element. This is used for clefs that are written either an octave higher or lower than sounding pitch. For example, the tenor line in choral music is usually written in treble clef, an octave higher than the notes actually sound. The clef for this part would be represented as: ```xml G 2 -1 ``` While attributes usually appear at the start of a measure, they can appear anywhere within the measure. Mid-measure clef changes are the main use for this feature. ### Time To represent common and cut time signatures, use the symbol attribute of the