Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions .github/workflows/maincheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.14'
cache: 'pip'
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
Expand All @@ -76,7 +75,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.14'
cache: 'pip'
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
Expand All @@ -99,7 +97,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.14'
cache: 'pip'
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
Expand Down
48 changes: 24 additions & 24 deletions music21/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Reed Organ'
# TODO self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'R Org'
self.midiProgram = 20
self.instrumentSound = 'keyboard.organ.reed'

Expand Down Expand Up @@ -681,7 +681,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Fretless Bass'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Fretl b'
self.midiProgram = 35
self.instrumentSound = 'pluck.bass.fretless'

Expand Down Expand Up @@ -752,7 +752,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Shamisen'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Shmsn'
self.instrumentSound = 'pluck.shamisen'
self.midiProgram = 106

Expand All @@ -762,7 +762,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Koto'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Koto'
self.instrumentSound = 'pluck.koto'
self.midiProgram = 107

Expand Down Expand Up @@ -1248,7 +1248,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Handbells'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Hbells'
self.instrumentSound = 'pitched-percussion.handbells'


Expand All @@ -1257,7 +1257,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Dulcimer'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Dlc'
self.instrumentSound = 'pluck.dulcimer'
self.midiProgram = 15

Expand Down Expand Up @@ -1333,7 +1333,7 @@ def __init__(self, **keywords):
self.instrumentName = 'Maracas'
self.inGMPercMap = True
self.percMapPitch = 70
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Mrcs'
self.instrumentSound = 'rattle.maraca'


Expand Down Expand Up @@ -1391,7 +1391,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Suspended Cymbal'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Sus Cym'
self.instrumentSound = 'metal.cymbal.suspended'


Expand All @@ -1400,7 +1400,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Sizzle Cymbal'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Siz Cym'
self.instrumentSound = 'metal.cymbal.sizzle'


Expand All @@ -1409,7 +1409,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Splash Cymbals'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Spl Cym'
self.instrumentSound = 'metal.cymbal.splash'


Expand All @@ -1418,7 +1418,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Ride Cymbals'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Ride Cym'
self.instrumentSound = 'metal.cymbal.ride'


Expand All @@ -1442,7 +1442,7 @@ def __init__(self, **keywords):
}
self.percMapPitch = self._modifierToPercMapPitch[self._modifier]

# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Hi-Hat'


class Triangle(UnpitchedPercussion):
Expand Down Expand Up @@ -1480,7 +1480,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Agogo'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Ago'
self.instrumentSound = 'metal.bells.agogo'
self.inGMPercMap = True
self.percMapPitch = 67
Expand All @@ -1492,7 +1492,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Tam-Tam'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Tam-t'
self.instrumentSound = 'metal.tamtam'


Expand All @@ -1501,7 +1501,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Sleigh Bells'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Slgh Bl'
self.instrumentSound = 'metal.bells.sleigh-bells'


Expand Down Expand Up @@ -1554,7 +1554,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Tom-Tom'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Tom'
self.instrumentSound = 'drum.tom-tom'
self.inGMPercMap = True
self._modifier = 'low floor'
Expand Down Expand Up @@ -1612,7 +1612,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Taiko'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Tko'
self.instrumentSound = 'drum.taiko'
self.midiProgram = 116

Expand All @@ -1633,7 +1633,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Whip'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Whip'
self.instrumentSound = 'effect.whip'


Expand All @@ -1642,7 +1642,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Ratchet'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Ratc'
self.instrumentSound = 'rattle.ratchet'


Expand All @@ -1651,7 +1651,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Siren'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Siren'
self.instrumentSound = 'effect.siren'


Expand All @@ -1669,7 +1669,7 @@ def __init__(self, **keywords):
super().__init__(**keywords)

self.instrumentName = 'Wind Machine'
# TODO: self.instrumentAbbreviation = ''
self.instrumentAbbreviation = 'Wind Mach'
self.instrumentSound = 'effect.wind'


Expand Down Expand Up @@ -2009,7 +2009,7 @@ def deduplicate(s: stream.Stream, inPlace: bool = False) -> stream.Stream:
73: Flute,
74: Recorder,
75: PanFlute,
76: PanFlute, # TODO 76: Bottle
76: PanFlute, # TODO: 76: Bottle
77: Shakuhachi,
78: Whistle,
79: Ocarina,
Expand Down Expand Up @@ -2045,7 +2045,7 @@ def deduplicate(s: stream.Stream, inPlace: bool = False) -> stream.Stream:
109: Bagpipes,
110: Violin, # TODO: instrumentSound
111: Shehnai,
112: Glockenspiel, # TODO 112: Tinkle Bell
112: Glockenspiel, # TODO: 112: Tinkle Bell
113: Agogo,
114: SteelDrum,
115: Woodblock,
Expand All @@ -2060,7 +2060,7 @@ def deduplicate(s: stream.Stream, inPlace: bool = False) -> stream.Stream:
124: Sampler,
125: Sampler,
126: Sampler,
127: Sampler
127: Sampler,
}


Expand Down
9 changes: 5 additions & 4 deletions music21/test/commonTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ def _getName(self, fp):
if fn.startswith(os.sep):
fn = fn[1:]
fn = fn.replace(os.sep, '_') # replace w/ _
fn = fn.replace('.py', '')
if fn.endswith('.py'):
fn = fn[:-3]
return fn

def _getNamePeriod(self, fp, *, addM21=False):
Expand All @@ -363,11 +364,11 @@ def _getNamePeriod(self, fp, *, addM21=False):
'''
fn = fp.replace(self.dirParent, '') # remove parent
parts = [x for x in fn.split(os.sep) if x]
if parts[-1] == '__init__.py':
if parts[-1].endswith('.py'):
parts[-1] = parts[-1][:-3]
if parts[-1] == '__init__':
parts.pop()
fn = '.'.join(parts) # replace w/ period

fn = fn.replace('.py', '')
if addM21 and fn:
fn = 'music21.' + fn
elif addM21:
Expand Down
2 changes: 1 addition & 1 deletion music21/test/multiprocessTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def mainPoolRunner(testGroup=('test',), restoreEnvironmentDefaults=False, leaveO
eventsProcessed = 0
summaryOutput = []

while continueIt is True:
while continueIt:
try:
newResult = res.next(timeout=1)
if timeouts >= 5:
Expand Down