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 |
- Source:
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 |
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 tomusic21.instrument.maxMidichannels (16)
Skips 10 unless this.inGMPercMap is trueParameters:
Name Type Argument Description usedChannelsArray.<Int> <optional>
- Source:
Returns:
- Type
- Number