Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mingus/containers/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,12 @@ class MidiInstrument(Instrument):
'Gunshot',
]

def __init__(self, name=''):
self.name = name
def __init__(self, instrument_nr=1):
self.instrument_nr = instrument_nr
try:
self.name = self.names[instrument_nr -1]
except IndexError:
self.name = 'Unknown Instrument'

class MidiPercussionInstrument(Instrument):
def __init__(self):
Expand Down