Previous topic

music21.humdrum.spineParser

Next topic

music21.interval

Table Of Contents

Table Of Contents

This Page

music21.instrument

This module represents instruments through objects that contain general information such as Metadata for instrument names, classifications, transpositions and default MIDI program numbers. It also contains information specific to each instrument or instrument family, such as string pitches, etc. Information about instrumental ensembles is also included here though it may later be separated out into its own ensemble.py module.

Functions

music21.instrument.bundleInstruments(streamIn, inPlace=False)
>>> up1 = note.Unpitched()
>>> up1.storedInstrument = instrument.BassDrum()
>>> upUnknownInstrument = note.Unpitched()
>>> up2 = note.Unpitched()
>>> up2.storedInstrument = instrument.Cowbell()
>>> s = stream.Stream()
>>> s.append(up1)
>>> s.append(upUnknownInstrument)
>>> s.append(up2)
>>> s2 = instrument.unbundleInstruments(s)
>>> s3 = instrument.bundleInstruments(s2)
>>> for test in s3:
...     print(test.storedInstrument)
Bass Drum
Bass Drum
Cowbell
music21.instrument.ensembleNameBySize(number)

return the name of a generic ensemble with “number” players:

>>> instrument.ensembleNameBySize(4)
'quartet'
>>> instrument.ensembleNameBySize(1)
'solo'
>>> instrument.ensembleNameBySize(83)
'treoctogetet'
music21.instrument.fromString(instrumentString)

Given a string with instrument content (from an orchestral score for example), attempts to return an appropriate Instrument.

>>> from music21 import instrument
>>> t1 = instrument.fromString("Clarinet 2 in A")
>>> t1
<music21.instrument.Instrument Clarinet>
>>> t1.transposition
<music21.interval.Interval m-3>
>>> t2 = instrument.fromString("Clarinetto 3")
>>> t2
<music21.instrument.Instrument Clarinet>
>>> t3 = instrument.fromString("Flauto 2")
>>> t3
<music21.instrument.Instrument Flute>

Excess information is ignored, and the useful information can be extracted correctly as long as it’s sequential.

>>> t4 = instrument.fromString("I <3 music saxofono tenor go beavers")
>>> t4
<music21.instrument.Instrument Tenor Saxophone>
music21.instrument.instrumentFromMidiProgram(number)

return the instrument with “number” as its assigned midi program:

>>> instrument.instrumentFromMidiProgram(0)
<music21.instrument.Instrument Piano>
>>> instrument.instrumentFromMidiProgram(21)
<music21.instrument.Instrument Accordion>
>>> instrument.instrumentFromMidiProgram(500)
Traceback (most recent call last):
    ...
InstrumentException: No instrument found with given midi program
music21.instrument.partitionByInstrument(streamObj)

Given a single Stream, or a Score or similar multi-part structure, partition into a Part for each unique Instrument, joining events possibly from different parts.

>>> p1 = converter.parse("tinynotation: 4/4 c4  d  e  f  g  a  b  c'  c1")
>>> p2 = converter.parse("tinynotation: 4/4 C#4 D# E# F# G# A# B# c#  C#1")
>>> p1.makeMeasures(inPlace=True)
>>> p2.makeMeasures(inPlace=True)
>>> p1.getElementsByClass('Measure')[0].insert(0.0, instrument.Piccolo())
>>> p1.getElementsByClass('Measure')[0].insert(2.0, instrument.AltoSaxophone())
>>> p1.getElementsByClass('Measure')[1].insert(3.0, instrument.Piccolo())
>>> p2.getElementsByClass('Measure')[0].insert(0.0, instrument.Trombone())
>>> p2.getElementsByClass('Measure')[0].insert(3.0, instrument.Piccolo()) # not likely...
>>> p2.getElementsByClass('Measure')[1].insert(1.0, instrument.Trombone())
>>> s = stream.Score()
>>> s.insert(0, p1)
>>> s.insert(0, p2)
>>> s.show('text')
{0.0} <music21.tinyNotation.TinyNotationStream ...>
    {0.0} <music21.stream.Measure 1 offset=0.0>
        {0.0} <music21.instrument.Instrument Piccolo>
        {0.0} <music21.clef.TrebleClef>
        {0.0} <music21.meter.TimeSignature 4/4>
        {0.0} <music21.note.Note C>
        {1.0} <music21.note.Note D>
        {2.0} <music21.instrument.Instrument Alto Saxophone>
        {2.0} <music21.note.Note E>
        {3.0} <music21.note.Note F>
    {4.0} <music21.stream.Measure 2 offset=4.0>
        {0.0} <music21.note.Note G>
        {1.0} <music21.note.Note A>
        {2.0} <music21.note.Note B>
        {3.0} <music21.instrument.Instrument Piccolo>
        {3.0} <music21.note.Note C>
    {8.0} <music21.stream.Measure 3 offset=8.0>
        {0.0} <music21.note.Note C>
        {4.0} <music21.bar.Barline style=final>
{0.0} <music21.tinyNotation.TinyNotationStream ...>
    {0.0} <music21.stream.Measure 1 offset=0.0>
        {0.0} <music21.instrument.Instrument Trombone>
        {0.0} <music21.clef.BassClef>
        {0.0} <music21.meter.TimeSignature 4/4>
        {0.0} <music21.note.Note C#>
        {1.0} <music21.note.Note D#>
        {2.0} <music21.note.Note E#>
        {3.0} <music21.instrument.Instrument Piccolo>
        {3.0} <music21.note.Note F#>
    {4.0} <music21.stream.Measure 2 offset=4.0>
        {0.0} <music21.note.Note G#>
        {1.0} <music21.instrument.Instrument Trombone>
        {1.0} <music21.note.Note A#>
        {2.0} <music21.note.Note B#>
        {3.0} <music21.note.Note C#>
    {8.0} <music21.stream.Measure 3 offset=8.0>
        {0.0} <music21.note.Note C#>
        {4.0} <music21.bar.Barline style=final>
>>> s2 = instrument.partitionByInstrument(s)
>>> len(s2.parts)
3

# TODO: this step might not be necessary...

>>> for p in s2.parts:
...     unused = p.makeRests(fillGaps=True, inPlace=True)

# TODO: this step SHOULD not be necessary (measureTemplate)...

>>> for p in s2.parts:
...     p.makeMeasures(inPlace = True)
...     p.makeTies(inPlace = True)
>>> s2.show('text')
{0.0} <music21.stream.Part Piccolo>
    {0.0} <music21.stream.Measure 1 offset=0.0>
        {0.0} <music21.instrument.Instrument Piccolo>
        {0.0} <music21.clef.TrebleClef>
        {0.0} <music21.meter.TimeSignature 4/4>
        {0.0} <music21.note.Note C>
        {1.0} <music21.note.Note D>
        {2.0} <music21.note.Rest rest>
        {3.0} <music21.note.Note F#>
    {4.0} <music21.stream.Measure 2 offset=4.0>
        {0.0} <music21.note.Note G#>
        {1.0} <music21.note.Rest rest>
        {3.0} <music21.note.Note C>
    {8.0} <music21.stream.Measure 3 offset=8.0>
        {0.0} <music21.note.Note C>
        {4.0} <music21.bar.Barline style=final>
{0.0} <music21.stream.Part Trombone>
    {0.0} <music21.stream.Measure 1 offset=0.0>
        {0.0} <music21.instrument.Instrument Trombone>
        {0.0} <music21.clef.BassClef>
        {0.0} <music21.meter.TimeSignature 4/4>
        {0.0} <music21.note.Note C#>
        {1.0} <music21.note.Note D#>
        {2.0} <music21.note.Note E#>
        {3.0} <music21.note.Rest rest>
    {4.0} <music21.stream.Measure 2 offset=4.0>
        {0.0} <music21.note.Rest rest>
        {1.0} <music21.note.Note A#>
        {2.0} <music21.note.Note B#>
        {3.0} <music21.note.Note C#>
    {8.0} <music21.stream.Measure 3 offset=8.0>
        {0.0} <music21.note.Note C#>
        {4.0} <music21.bar.Barline style=final>
{0.0} <music21.stream.Part Alto Saxophone>
    {0.0} <music21.stream.Measure 1 offset=0.0>
        {0.0} <music21.instrument.Instrument Alto Saxophone>
        {0.0} <music21.clef.TrebleClef>
        {0.0} <music21.meter.TimeSignature 4/4>
        {2.0} <music21.note.Note E>
        {3.0} <music21.note.Note F>
    {4.0} <music21.stream.Measure 2 offset=4.0>
        {0.0} <music21.instrument.Instrument Alto Saxophone>
        {0.0} <music21.note.Note G>
        {1.0} <music21.note.Note A>
        {2.0} <music21.note.Note B>
        {3.0} <music21.bar.Barline style=final>

Bug in makeRests – notice the missing rest at the beginning of the alto sax part...

TODO: parts should be in Score Order. Cooindicence that this works. TODO: note redundant Alto Saxophone...

music21.instrument.unbundleInstruments(streamIn, inPlace=False)

takes a Stream that has Unpitched objects and moves their .storedInstrument attributes to a new Stream (unless inPlace = True)

>>> up1 = note.Unpitched()
>>> up1.storedInstrument = instrument.BassDrum()
>>> up2 = note.Unpitched()
>>> up2.storedInstrument = instrument.Cowbell()
>>> s = stream.Stream()
>>> s.append(up1)
>>> s.append(up2)
>>> s2 = instrument.unbundleInstruments(s)
>>> s2.show('text')
{0.0} <music21.instrument.Instrument Bass Drum>
{0.0} <music21.note.Unpitched object at 0x...>
{1.0} <music21.instrument.Instrument Cowbell>
{1.0} <music21.note.Unpitched object at 0x...>

Instrument

class music21.instrument.Instrument

Base class for all musical instruments. Designed for subclassing, though usually a more specific instrument class (such as StringInstrument) would be better to subclass.

Instrument bases

Instrument read-only properties

Read-only properties inherited from Music21Object:

Instrument read/write properties

Read/write properties inherited from Music21Object:

Instrument methods

Instrument.autoAssignMidiChannel(usedChannels=[])

Assign an unused midi channel given a list of used channels.

assigns the number to self.midiChannel and returns it as an int.

Note that midi channel 10 is special, and thus is skipped.

Currently only 16 channels are used.

>>> used = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11]
>>> i = instrument.Violin()
>>> i.autoAssignMidiChannel(used)
12
>>> i.midiChannel
12
Instrument.bestName()

Find a viable name, looking first at instrument, then part, then abbreviations.

Instrument.instrumentIdRandomize()

Force a unique id by using an MD5

Instrument.partIdRandomize()

Force a unique id by using an MD5

Methods inherited from Music21Object:

Instrument instance variables

Instance variables inherited from Music21Object:

Accordion

class music21.instrument.Accordion

Accordion bases

Accordion read-only properties

Read-only properties inherited from Music21Object:

Accordion read/write properties

Read/write properties inherited from Music21Object:

Accordion methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Accordion instance variables

Instance variables inherited from Organ:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

AcousticBass

class music21.instrument.AcousticBass

AcousticBass bases

AcousticBass read-only properties

Read-only properties inherited from Music21Object:

AcousticBass read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

AcousticBass methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

AcousticBass instance variables

Instance variables inherited from Guitar:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

AcousticGuitar

class music21.instrument.AcousticGuitar

AcousticGuitar bases

AcousticGuitar read-only properties

Read-only properties inherited from Music21Object:

AcousticGuitar read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

AcousticGuitar methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

AcousticGuitar instance variables

Instance variables inherited from Guitar:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Agogo

class music21.instrument.Agogo

Agogo bases

Agogo read-only properties

Read-only properties inherited from Music21Object:

Agogo read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

Agogo methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Agogo instance variables

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Alto

class music21.instrument.Alto

Alto bases

Alto read-only properties

Read-only properties inherited from Music21Object:

Alto read/write properties

Read/write properties inherited from Music21Object:

Alto methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Alto instance variables

Instance variables inherited from Vocalist:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

AltoSaxophone

class music21.instrument.AltoSaxophone

AltoSaxophone bases

AltoSaxophone read-only properties

Read-only properties inherited from Music21Object:

AltoSaxophone read/write properties

Read/write properties inherited from Music21Object:

AltoSaxophone methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

AltoSaxophone instance variables

Instance variables inherited from Saxophone:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from WoodwindInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Banjo

class music21.instrument.Banjo

Banjo bases

Banjo read-only properties

Read-only properties inherited from Music21Object:

Banjo read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

Banjo methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Banjo instance variables

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Baritone

class music21.instrument.Baritone

Baritone bases

Baritone read-only properties

Read-only properties inherited from Music21Object:

Baritone read/write properties

Read/write properties inherited from Music21Object:

Baritone methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Baritone instance variables

Instance variables inherited from Vocalist:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

BaritoneSaxophone

class music21.instrument.BaritoneSaxophone

BaritoneSaxophone bases

BaritoneSaxophone read-only properties

Read-only properties inherited from Music21Object:

BaritoneSaxophone read/write properties

Read/write properties inherited from Music21Object:

BaritoneSaxophone methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

BaritoneSaxophone instance variables

Instance variables inherited from Saxophone:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from WoodwindInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Bass

class music21.instrument.Bass

Bass bases

Bass read-only properties

Read-only properties inherited from Music21Object:

Bass read/write properties

Read/write properties inherited from Music21Object:

Bass methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Bass instance variables

Instance variables inherited from Vocalist:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

BassClarinet

class music21.instrument.BassClarinet
>>> bcl = instrument.BassClarinet()
>>> bcl.instrumentName
'Bass clarinet'
>>> bcl.midiProgram
71
>>> 'WoodwindInstrument' in bcl.classes
True

BassClarinet bases

BassClarinet read-only properties

Read-only properties inherited from Music21Object:

BassClarinet read/write properties

Read/write properties inherited from Music21Object:

BassClarinet methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

BassClarinet instance variables

Instance variables inherited from Clarinet:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from WoodwindInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

BassDrum

class music21.instrument.BassDrum

BassDrum bases

BassDrum read-only properties

Read-only properties inherited from Music21Object:

BassDrum read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

BassDrum methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

BassDrum instance variables

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

BassTrombone

class music21.instrument.BassTrombone

BassTrombone bases

BassTrombone read-only properties

Read-only properties inherited from Music21Object:

BassTrombone read/write properties

Read/write properties inherited from Music21Object:

BassTrombone methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

BassTrombone instance variables

Instance variables inherited from Trombone:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from BrassInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

BongoDrums

class music21.instrument.BongoDrums

BongoDrums bases

BongoDrums read-only properties

Read-only properties inherited from Music21Object:

BongoDrums read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

BongoDrums methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

BongoDrums instance variables

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Castanets

class music21.instrument.Castanets

Castanets bases

Castanets read-only properties

Read-only properties inherited from Music21Object:

Castanets read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

Castanets methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Castanets instance variables

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

ChurchBells

class music21.instrument.ChurchBells

ChurchBells bases

ChurchBells read-only properties

Read-only properties inherited from Music21Object:

ChurchBells read/write properties

Read/write properties inherited from Music21Object:

ChurchBells methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

ChurchBells instance variables

Instance variables inherited from PitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

CongaDrum

class music21.instrument.CongaDrum

CongaDrum bases

CongaDrum read-only properties

Read-only properties inherited from Music21Object:

CongaDrum read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

CongaDrum methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

CongaDrum instance variables

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Contrabass

class music21.instrument.Contrabass

For the Contrabass (or double bass), the stringPitches attribute refers to the sounding pitches of each string; whereas the lowestNote attribute refers to the lowest written note

Contrabass bases

Contrabass read-only properties

Read-only properties inherited from Music21Object:

Contrabass read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

Contrabass methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Contrabass instance variables

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Cowbell

class music21.instrument.Cowbell

Cowbell bases

Cowbell read-only properties

Read-only properties inherited from Music21Object:

Cowbell read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

Cowbell methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Cowbell instance variables

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

CrashCymbals

class music21.instrument.CrashCymbals

CrashCymbals bases

CrashCymbals read-only properties

Read-only properties inherited from Music21Object:

CrashCymbals read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

CrashCymbals methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

CrashCymbals instance variables

Instance variables inherited from Cymbals:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Cymbals

class music21.instrument.Cymbals

Cymbals bases

Cymbals read-only properties

Read-only properties inherited from Music21Object:

Cymbals read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

Cymbals methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Cymbals instance variables

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Dulcimer

class music21.instrument.Dulcimer

Dulcimer bases

Dulcimer read-only properties

Read-only properties inherited from Music21Object:

Dulcimer read/write properties

Read/write properties inherited from Music21Object:

Dulcimer methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Dulcimer instance variables

Instance variables inherited from PitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

ElectricBass

class music21.instrument.ElectricBass

ElectricBass bases

ElectricBass read-only properties

Read-only properties inherited from Music21Object:

ElectricBass read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

ElectricBass methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

ElectricBass instance variables

Instance variables inherited from Guitar:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

ElectricGuitar

class music21.instrument.ElectricGuitar

ElectricGuitar bases

ElectricGuitar read-only properties

Read-only properties inherited from Music21Object:

ElectricGuitar read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

ElectricGuitar methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

ElectricGuitar instance variables

Instance variables inherited from Guitar:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

FingerCymbals

class music21.instrument.FingerCymbals

FingerCymbals bases

FingerCymbals read-only properties

Read-only properties inherited from Music21Object:

FingerCymbals read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

FingerCymbals methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

FingerCymbals instance variables

Instance variables inherited from Cymbals:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

FretlessBass

class music21.instrument.FretlessBass

FretlessBass bases

FretlessBass read-only properties

Read-only properties inherited from Music21Object:

FretlessBass read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

FretlessBass methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

FretlessBass instance variables

Instance variables inherited from Guitar:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Glockenspiel

class music21.instrument.Glockenspiel

Glockenspiel bases

Glockenspiel read-only properties

Read-only properties inherited from Music21Object:

Glockenspiel read/write properties

Read/write properties inherited from Music21Object:

Glockenspiel methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Glockenspiel instance variables

Instance variables inherited from PitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Gong

class music21.instrument.Gong

Gong bases

Gong read-only properties

Read-only properties inherited from Music21Object:

Gong read/write properties

Read/write properties inherited from Music21Object:

Gong methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Gong instance variables

Instance variables inherited from PitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Guitar

class music21.instrument.Guitar

Guitar bases

Guitar read-only properties

Read-only properties inherited from Music21Object:

Guitar read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

Guitar methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Guitar instance variables

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Handbells

class music21.instrument.Handbells

Handbells bases

Handbells read-only properties

Read-only properties inherited from Music21Object:

Handbells read/write properties

Read/write properties inherited from Music21Object:

Handbells methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Handbells instance variables

Instance variables inherited from PitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Harmonica

class music21.instrument.Harmonica

Harmonica bases

Harmonica read-only properties

Read-only properties inherited from Music21Object:

Harmonica read/write properties

Read/write properties inherited from Music21Object:

Harmonica methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Harmonica instance variables

Instance variables inherited from Organ:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Harp

class music21.instrument.Harp

Harp bases

Harp read-only properties

Read-only properties inherited from Music21Object:

Harp read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

Harp methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Harp instance variables

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

HiHatCymbal

class music21.instrument.HiHatCymbal

HiHatCymbal bases

HiHatCymbal read-only properties

Read-only properties inherited from Music21Object:

HiHatCymbal read/write properties

Read/write properties inherited from UnpitchedPercussion:

Read/write properties inherited from Music21Object:

HiHatCymbal methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

HiHatCymbal instance variables

Instance variables inherited from Cymbals:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from UnpitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Horn

class music21.instrument.Horn
>>> hn = instrument.Horn()
>>> hn.instrumentName
'Horn'
>>> hn.midiProgram
60
>>> 'BrassInstrument' in hn.classes
True

Horn bases

Horn read-only properties

Read-only properties inherited from Music21Object:

Horn read/write properties

Read/write properties inherited from Music21Object:

Horn methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Horn instance variables

Instance variables inherited from BrassInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Kalimba

class music21.instrument.Kalimba

Kalimba bases

Kalimba read-only properties

Read-only properties inherited from Music21Object:

Kalimba read/write properties

Read/write properties inherited from Music21Object:

Kalimba methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Kalimba instance variables

Instance variables inherited from PitchedPercussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Percussion:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Koto

class music21.instrument.Koto

Koto bases

Koto read-only properties

Read-only properties inherited from Music21Object:

Koto read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

Koto methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Koto instance variables

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object:

Lute

class music21.instrument.Lute

Lute bases

Lute read-only properties

Read-only properties inherited from Music21Object:

Lute read/write properties

Read/write properties inherited from StringInstrument:

Read/write properties inherited from Music21Object:

Lute methods

Methods inherited from Instrument:

Methods inherited from Music21Object:

Lute instance variables

Instance variables inherited from StringInstrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Instrument:

  • isStream
  • hideObjectOnPrint
  • classSortOrder
  • groups
  • isVariant
  • id
  • isSpanner
  • xPosition

Instance variables inherited from Music21Object: