2.1.9 FretBoards

A context for displaying fret diagrams.

This context also accepts commands for the following context(s):


This context creates the following layout object(s):

FretBoard, InstrumentName, StaffSpacing and VerticalAxisGroup.

This context sets the following properties:

This context is a ‘bottom’ context; it cannot contain other contexts.

This context is built from the following engraver(s):


Put fontSize into font-size grob property.

Properties (read)

fontSize (number)

The relative size of all grobs in a context.


Generate fret diagram from one or more events of type NoteEvent.

Music types accepted:

fingering-event, note-event and string-number-event

Properties (read)

chordChanges (boolean)

Only show changes in chords scheme?

defaultStrings (list)

A list of strings to use in calculating frets for tablatures and fretboards if no strings are provided in the notes for the current moment.

highStringOne (boolean)

Whether the first string is the string with highest pitch on the instrument. This used by the automatic string selector for tablature notation.

maximumFretStretch (number)

Don’t allocate frets further than this from specified frets.

minimumFret (number)

The tablature auto string-selecting mechanism selects the highest string with a fret at least minimumFret.

noteToFretFunction (procedure)

Convert list of notes and list of defined strings to full list of strings and fret numbers. Parameters: The context, a list of note events, a list of tabstring events, and the fretboard grob if a fretboard is desired.

predefinedDiagramTable (hash table)

The hash table of predefined fret diagrams to use in FretBoards.

stringTunings (list)

The tablature strings tuning. It is a list of the pitches of each string (starting with the lowest numbered one).

tablatureFormat (procedure)

A function formatting a tablature note head. Called with three arguments: context, string number and, fret number. It returns the text as a markup.

This engraver creates the following layout object(s):



Like Axis_group_engraver, but make a hara-kiri spanner, and add interesting items (i.e., note heads, lyric syllables, and normal rests).

Properties (read)

keepAliveInterfaces (list)

A list of symbols, signifying grob interfaces that are worth keeping a staff with remove-empty set around for.

This engraver creates the following layout object(s):



Create a system start text for instrument or vocal names.

Properties (read)

currentCommandColumn (graphical (layout) object)

Grob that is X-parent to all current breakable (clef, key signature, etc.) items.

instrumentName (markup)

The name to print left of a staff. The instrumentName property labels the staff in the first system, and the shortInstrumentName property labels following lines.

shortInstrumentName (markup)

See instrumentName.

shortVocalName (markup)

Name of a vocal line, short version.

vocalName (markup)

Name of a vocal line.

This engraver creates the following layout object(s):



Apply a procedure to any grob acknowledged.

Music types accepted:



Generate objects for computing spacing parameters.

Properties (read)

createSpacing (boolean)

Create StaffSpacing objects? Should be set for staves.

Properties (write)

hasStaffSpacing (boolean)

True if the current CommandColumn contains items that will affect spacing.

This engraver creates the following layout object(s):


Internals Reference