Previous topic

music21.chord

Next topic

music21.common

Table Of Contents

Table Of Contents

This Page

music21.clef

This module defines numerous subclasses of Clef, providing object representations for all commonly used clefs. Clef objects are often found within Measure objects.

Functions

music21.clef.clefFromString(clefString, octaveShift=0)

Returns a Clef object given a string like “G2” or “F4” etc.

>>> tc = clef.clefFromString("G2")
>>> tc
<music21.clef.TrebleClef>
>>> nonStandard1 = clef.clefFromString("F1")
>>> nonStandard1
<music21.clef.FClef>
>>> nonStandard1.line
1
>>> nonStandard2 = clef.clefFromString("D4")
>>> nonStandard2
<music21.clef.PitchClef>
>>> nonStandard2.sign
'D'
>>> nonStandard2.line
4
>>> tc8vb = clef.clefFromString("G2", -1)
>>> tc8vb
<music21.clef.Treble8vbClef>
>>> tabClef = clef.clefFromString("TAB")
>>> tabClef
<music21.clef.TabClef>

Clef

class music21.clef.Clef

A Clef is a basic music21 object for representing musical clefs (Treble, Bass, etc.)

Some clefs only represent the graphical element of the clef, such as G clef, which is subclassed by TrebleClef() and FrenchViolinClef().

>>> tc = clef.TrebleClef()
>>> tc.sign
'G'
>>> tc.line
2

Most clefs also have a “lowest note” function which represents the diatonicNoteNum of the note. (Where C4,C#4,C##4,C-4 etc. = 29, all types of D4 = 30, etc.)

>>> tc.lowestLine
31

Clef bases

Clef read-only properties

Read-only properties inherited from Music21Object:

Clef read/write properties

Read/write properties inherited from Music21Object:

Clef methods

Methods inherited from Music21Object:

Clef instance variables

Clef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
Clef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

Clef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

Clef.id

A unique identification string (not to be confused with the default .id() method.

Clef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

Clef.isStream

Boolean value for quickly identifying Stream objects (False by default).

Clef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

Clef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from Music21Object:

TrebleClef

class music21.clef.TrebleClef

TrebleClef bases

TrebleClef read-only properties

Read-only properties inherited from Music21Object:

TrebleClef read/write properties

Read/write properties inherited from Music21Object:

TrebleClef methods

Methods inherited from Music21Object:

TrebleClef instance variables

TrebleClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
TrebleClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

TrebleClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

TrebleClef.id

A unique identification string (not to be confused with the default .id() method.

TrebleClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

TrebleClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

TrebleClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

TrebleClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from GClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

BassClef

class music21.clef.BassClef

BassClef bases

BassClef read-only properties

Read-only properties inherited from Music21Object:

BassClef read/write properties

Read/write properties inherited from Music21Object:

BassClef methods

Methods inherited from Music21Object:

BassClef instance variables

BassClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
BassClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

BassClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

BassClef.id

A unique identification string (not to be confused with the default .id() method.

BassClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

BassClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

BassClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

BassClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from FClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

AltoClef

class music21.clef.AltoClef

AltoClef bases

AltoClef read-only properties

Read-only properties inherited from Music21Object:

AltoClef read/write properties

Read/write properties inherited from Music21Object:

AltoClef methods

Methods inherited from Music21Object:

AltoClef instance variables

AltoClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
AltoClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

AltoClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

AltoClef.id

A unique identification string (not to be confused with the default .id() method.

AltoClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

AltoClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

AltoClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

AltoClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from CClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

Bass8vaClef

class music21.clef.Bass8vaClef

Bass8vaClef bases

Bass8vaClef read-only properties

Read-only properties inherited from Music21Object:

Bass8vaClef read/write properties

Read/write properties inherited from Music21Object:

Bass8vaClef methods

Methods inherited from Music21Object:

Bass8vaClef instance variables

Bass8vaClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
Bass8vaClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

Bass8vaClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

Bass8vaClef.id

A unique identification string (not to be confused with the default .id() method.

Bass8vaClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

Bass8vaClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

Bass8vaClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

Bass8vaClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from FClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

Bass8vbClef

class music21.clef.Bass8vbClef

Bass8vbClef bases

Bass8vbClef read-only properties

Read-only properties inherited from Music21Object:

Bass8vbClef read/write properties

Read/write properties inherited from Music21Object:

Bass8vbClef methods

Methods inherited from Music21Object:

Bass8vbClef instance variables

Bass8vbClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
Bass8vbClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

Bass8vbClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

Bass8vbClef.id

A unique identification string (not to be confused with the default .id() method.

Bass8vbClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

Bass8vbClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

Bass8vbClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

Bass8vbClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from FClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

CBaritoneClef

class music21.clef.CBaritoneClef

CBaritoneClef bases

CBaritoneClef read-only properties

Read-only properties inherited from Music21Object:

CBaritoneClef read/write properties

Read/write properties inherited from Music21Object:

CBaritoneClef methods

Methods inherited from Music21Object:

CBaritoneClef instance variables

CBaritoneClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
CBaritoneClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

CBaritoneClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

CBaritoneClef.id

A unique identification string (not to be confused with the default .id() method.

CBaritoneClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

CBaritoneClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

CBaritoneClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

CBaritoneClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from CClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

CClef

class music21.clef.CClef

CClef bases

CClef read-only properties

Read-only properties inherited from Music21Object:

CClef read/write properties

Read/write properties inherited from Music21Object:

CClef methods

Methods inherited from Music21Object:

CClef instance variables

CClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
CClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

CClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

CClef.id

A unique identification string (not to be confused with the default .id() method.

CClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

CClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

CClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

CClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

FBaritoneClef

class music21.clef.FBaritoneClef

FBaritoneClef bases

FBaritoneClef read-only properties

Read-only properties inherited from Music21Object:

FBaritoneClef read/write properties

Read/write properties inherited from Music21Object:

FBaritoneClef methods

Methods inherited from Music21Object:

FBaritoneClef instance variables

FBaritoneClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
FBaritoneClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

FBaritoneClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

FBaritoneClef.id

A unique identification string (not to be confused with the default .id() method.

FBaritoneClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

FBaritoneClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

FBaritoneClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

FBaritoneClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from FClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

FClef

class music21.clef.FClef

FClef bases

FClef read-only properties

Read-only properties inherited from Music21Object:

FClef read/write properties

Read/write properties inherited from Music21Object:

FClef methods

Methods inherited from Music21Object:

FClef instance variables

FClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
FClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

FClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

FClef.id

A unique identification string (not to be confused with the default .id() method.

FClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

FClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

FClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

FClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

FrenchViolinClef

class music21.clef.FrenchViolinClef

FrenchViolinClef bases

FrenchViolinClef read-only properties

Read-only properties inherited from Music21Object:

FrenchViolinClef read/write properties

Read/write properties inherited from Music21Object:

FrenchViolinClef methods

Methods inherited from Music21Object:

FrenchViolinClef instance variables

FrenchViolinClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
FrenchViolinClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

FrenchViolinClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

FrenchViolinClef.id

A unique identification string (not to be confused with the default .id() method.

FrenchViolinClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

FrenchViolinClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

FrenchViolinClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

FrenchViolinClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from GClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

GClef

class music21.clef.GClef

GClef bases

GClef read-only properties

Read-only properties inherited from Music21Object:

GClef read/write properties

Read/write properties inherited from Music21Object:

GClef methods

Methods inherited from Music21Object:

GClef instance variables

GClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
GClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

GClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

GClef.id

A unique identification string (not to be confused with the default .id() method.

GClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

GClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

GClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

GClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

GSopranoClef

class music21.clef.GSopranoClef

GSopranoClef bases

GSopranoClef read-only properties

Read-only properties inherited from Music21Object:

GSopranoClef read/write properties

Read/write properties inherited from Music21Object:

GSopranoClef methods

Methods inherited from Music21Object:

GSopranoClef instance variables

GSopranoClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
GSopranoClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

GSopranoClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

GSopranoClef.id

A unique identification string (not to be confused with the default .id() method.

GSopranoClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

GSopranoClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

GSopranoClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

GSopranoClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from GClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

MezzoSopranoClef

class music21.clef.MezzoSopranoClef

MezzoSopranoClef bases

MezzoSopranoClef read-only properties

Read-only properties inherited from Music21Object:

MezzoSopranoClef read/write properties

Read/write properties inherited from Music21Object:

MezzoSopranoClef methods

Methods inherited from Music21Object:

MezzoSopranoClef instance variables

MezzoSopranoClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
MezzoSopranoClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

MezzoSopranoClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

MezzoSopranoClef.id

A unique identification string (not to be confused with the default .id() method.

MezzoSopranoClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

MezzoSopranoClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

MezzoSopranoClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

MezzoSopranoClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from CClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

NoClef

class music21.clef.NoClef

represents the absence of a Clef.

NoClef bases

NoClef read-only properties

Read-only properties inherited from Music21Object:

NoClef read/write properties

Read/write properties inherited from Music21Object:

NoClef methods

Methods inherited from Music21Object:

NoClef instance variables

NoClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
NoClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

NoClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

NoClef.id

A unique identification string (not to be confused with the default .id() method.

NoClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

NoClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

NoClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

NoClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

PercussionClef

class music21.clef.PercussionClef

represents a Percussion clef.

PercussionClef bases

PercussionClef read-only properties

Read-only properties inherited from Music21Object:

PercussionClef read/write properties

Read/write properties inherited from Music21Object:

PercussionClef methods

Methods inherited from Music21Object:

PercussionClef instance variables

PercussionClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
PercussionClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

PercussionClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

PercussionClef.id

A unique identification string (not to be confused with the default .id() method.

PercussionClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

PercussionClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

PercussionClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

PercussionClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

PitchClef

class music21.clef.PitchClef

superclass for all other clef subclasses.

PitchClef bases

PitchClef read-only properties

Read-only properties inherited from Music21Object:

PitchClef read/write properties

Read/write properties inherited from Music21Object:

PitchClef methods

Methods inherited from Music21Object:

PitchClef instance variables

PitchClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
PitchClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

PitchClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

PitchClef.id

A unique identification string (not to be confused with the default .id() method.

PitchClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

PitchClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

PitchClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

PitchClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

SopranoClef

class music21.clef.SopranoClef

SopranoClef bases

SopranoClef read-only properties

Read-only properties inherited from Music21Object:

SopranoClef read/write properties

Read/write properties inherited from Music21Object:

SopranoClef methods

Methods inherited from Music21Object:

SopranoClef instance variables

SopranoClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
SopranoClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

SopranoClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

SopranoClef.id

A unique identification string (not to be confused with the default .id() method.

SopranoClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

SopranoClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

SopranoClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

SopranoClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from CClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

SubBassClef

class music21.clef.SubBassClef

SubBassClef bases

SubBassClef read-only properties

Read-only properties inherited from Music21Object:

SubBassClef read/write properties

Read/write properties inherited from Music21Object:

SubBassClef methods

Methods inherited from Music21Object:

SubBassClef instance variables

SubBassClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
SubBassClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

SubBassClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

SubBassClef.id

A unique identification string (not to be confused with the default .id() method.

SubBassClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

SubBassClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

SubBassClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

SubBassClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from FClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

TabClef

class music21.clef.TabClef

represents a Tablature clef (not used).

TabClef bases

TabClef read-only properties

Read-only properties inherited from Music21Object:

TabClef read/write properties

Read/write properties inherited from Music21Object:

TabClef methods

Methods inherited from Music21Object:

TabClef instance variables

TabClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
TabClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

TabClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

TabClef.id

A unique identification string (not to be confused with the default .id() method.

TabClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

TabClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

TabClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

TabClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

TenorClef

class music21.clef.TenorClef

TenorClef bases

TenorClef read-only properties

Read-only properties inherited from Music21Object:

TenorClef read/write properties

Read/write properties inherited from Music21Object:

TenorClef methods

Methods inherited from Music21Object:

TenorClef instance variables

TenorClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
TenorClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

TenorClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

TenorClef.id

A unique identification string (not to be confused with the default .id() method.

TenorClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

TenorClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

TenorClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

TenorClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from CClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

Treble8vaClef

class music21.clef.Treble8vaClef

Treble8vaClef bases

Treble8vaClef read-only properties

Read-only properties inherited from Music21Object:

Treble8vaClef read/write properties

Read/write properties inherited from Music21Object:

Treble8vaClef methods

Methods inherited from Music21Object:

Treble8vaClef instance variables

Treble8vaClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
Treble8vaClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

Treble8vaClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

Treble8vaClef.id

A unique identification string (not to be confused with the default .id() method.

Treble8vaClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

Treble8vaClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

Treble8vaClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

Treble8vaClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from TrebleClef:

Instance variables inherited from GClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object:

Treble8vbClef

class music21.clef.Treble8vbClef

Treble8vbClef bases

Treble8vbClef read-only properties

Read-only properties inherited from Music21Object:

Treble8vbClef read/write properties

Read/write properties inherited from Music21Object:

Treble8vbClef methods

Methods inherited from Music21Object:

Treble8vbClef instance variables

Treble8vbClef.classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note.

All undefined classes have classSortOrder of 20 – same as note.Note

>>> m21o = base.Music21Object()
>>> m21o.classSortOrder
20
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1

New classes can define their own default classSortOrder

>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5
Treble8vbClef.groups

An instance of a Group object which describes arbitrary Groups that this object belongs to.

Treble8vbClef.hideObjectOnPrint

if set to True will not print upon output (only used in MusicXML output at this point and Lilypond for notes, chords, and rests).

Treble8vbClef.id

A unique identification string (not to be confused with the default .id() method.

Treble8vbClef.isSpanner

Boolean value for quickly identifying Spanner objects (False by default).

Treble8vbClef.isStream

Boolean value for quickly identifying Stream objects (False by default).

Treble8vbClef.isVariant

Boolean value for quickly identifying Variant objects (False by default).

Treble8vbClef.xPosition

if set, defines the display x-position from the start of the container (in musicxml “tenths” by default)

Instance variables inherited from TrebleClef:

Instance variables inherited from GClef:

Instance variables inherited from PitchClef:

Instance variables inherited from Clef:

Instance variables inherited from Music21Object: