The clef object

Type: Dictionary

Keys

Name Type Required? Description
class style class No An optional style class to use for this element and all child elements.
color simple color No An optional color to be used when rendering this element and all child elements.
glyph smufl glyph No A specific SMuFL glyph name to be used when rendering this clef, e.g. gClefArrowUp. See SMuFL clef glyphs.
octave integer (signed) No The number of octaves by which the pitches normally indicated by the given clef sign should be transposed. Default is zero.
sign clef sign Yes The clef sign.
staffPosition staff position Yes The staff position at which the clef is drawn. For example, a standard G glef is drawn at position -2.

Parent objects

This object is used by the following parent objects:

Examples

This object is used in the following examples:

Accidentals, Articulations, Beams, Beams (across barlines), Beams (hooks), Beams (secondary beam breaks), Beams (with inner grace notes), Clef changes, Dotted notes (augmentation dots), Grace note, Grace notes (beamed), Grand staff piano music, Jumps (D.S. al Fine), Jumps (Dal Segno), Key signatures, Lyric line metadata, Lyrics (basic), Lyrics (multi-line), Multimeasure rests, Multiple layouts, Multiple voices, Organ layout, Ottavas (8va), Parts, Repeats, Repeats (more than once repeated), Repeats (with alternate endings, advanced), Repeats (with alternate endings, simple), Repeats (with implied start repeat), Rest positions, Slurs, Slurs (for chords), Slurs (incomplete slurs), Slurs (targeting specific notes), Styling elements (basic), Styling via a class (basic), Tempo markings, Three-note chord and half rest, Ties, Time signatures, Tremolos (single-note), Tuplets, Two-bar C major scale, “Hello world”