Class: Instrument

music21.instrument. Instrument

new Instrument(instrumentName)

Represents an instrument. instrumentNames are found in the ext/soundfonts directory

See music21.miditools and esp. loadSoundfont for a way of loading soundfonts into
instruments.

Parameters:
Name Type Description
instrumentName string
Properties:
Name Type Default Description
partId string | undefined
partName string | undefined
partAbbreviation string | undefined
instrumentId string | undefined
instrumentName string | undefined
instrumentAbbreviation string | undefined
midiProgram Int | undefined
midiChannel Int | undefined
lowestNote Int | undefined
highestNote Int | undefined
transposition music21.interval.Interval | undefined
inGMPercMap Boolean false
soundfontFn string | undefined
oggSoundfont string | undefined

url of oggSoundfont for this instrument

mp3Soundfont string | undefined

url of mp3Soundfont for this instrument

Source:

Methods

<static> Instrument#autoAssignMidiChannel(usedChannels) → {Number}

Assign an instrument to an unused midi channel.

Will use the global list of used channels (music21.instrument.Instrument.usedChannels)
if not given. Assigns up to music21.instrument.maxMidi channels (16)
Skips 10 unless this.inGMPercMap is true

Parameters:
Name Type Argument Description
usedChannels Array.<Int> <optional>
Source:
Returns:
Type
Number
Music21j, Copyright © 2013-2018 Michael Scott Cuthbert and cuthbertLab.
Documentation generated by JSDoc 3.5.5 on Wed Jul 4th 2018 using the DocStrap template.