makeKnownSymbol

maelzel.core.symbols.makeKnownSymbol(name)[source]

Create a symbol from a known name

Parameters:

name (str) – the name of the symbol (‘accent’, ‘fermata’, ‘mordent’, etc.). Supported are all articulations, ornaments, breath marks (‘comma’, ‘caesura’), colors, ‘fermata’.

Return type:

Symbol | None

Returns:

the created Symbol, or None if the name cannot be interpreted as a Symbol. No Exceptions are thrown

This is mostly used internally to add symbols to notes/chords which are defined as strings. For example, a note defined as “C4:1:accent”, will result in a C4 note with a duration of 1 (quarternotes) and an Accent symbol.