You are here: MusicXML Reference > Score Schema (XSD) > Elements > Element: alter

Element: alter

Description

The alter element represents chromatic alteration in number of semitones (e.g., -1 for flat, 1 for sharp). Decimal values like 0.5 (quarter tone sharp) are used for microtones. The octave element is represented by the numbers 0 to 9, where 4 indicates the octave started by middle C.  In the first example below, notice an accidental element is used for the third note, rather than the alter element, because the pitch is not altered from the the pitch designated to that staff position by the key signature.

Derived By

Type semitones

Referenced By
Example

      <note default-x="101">
        <pitch>
          <step>B</step>
          <alter>-2</alter>
          <octave>4</octave>
        </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>flat-flat</accidental>
        <stem default-y="-52">down</stem>
        <beam number="1">begin</beam>
      </note>
      <note default-x="131">
        <pitch>
          <step>B</step>
          <alter>-1</alter>
          <octave>4</octave>
        </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>flat</accidental>
        <stem default-y="-52">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="161">
        <pitch>
          <step>B</step>
          <octave>4</octave>
        </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>natural</accidental>
        <stem default-y="-52">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="191">
        <pitch>
          <step>B</step>
          <alter>1</alter>
          <octave>4</octave>
        </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>sharp</accidental>
        <stem default-y="-52">down</stem>
        <beam number="1">end</beam>
      </note>
      <note default-x="222">
        <pitch>
          <step>B</step>
          <alter>2</alter>
          <octave>4</octave>
        </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>quarter</type>
        <accidental>double-sharp</accidental>
        <stem default-y="-55">down</stem>
      </note>

Microtones

        <pitch>
          <step>B</step>
          <alter>-.5</alter>
          <octave>4</octave>
        </pitch>
Definition

See pitch

 

MusicXML Documentation Home
Last built 2/20/2015

7007 Winchester Circle, Suite 140

Boulder, CO 80301