Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve measure numbers on ClercqTemperley #1558

Merged
merged 5 commits into from
May 8, 2023
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
1 change: 1 addition & 0 deletions music21/converter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ def getSubConverterFormats(self):
('abc', <class 'music21.converter.subConverters.ConverterABC'>)
('braille', <class 'music21.converter.subConverters.ConverterBraille'>)
('capella', <class 'music21.converter.subConverters.ConverterCapella'>)
('clercqtemperley', <class 'music21.converter.subConverters.ConverterClercqTemperley'>)
('cttxt', <class 'music21.converter.subConverters.ConverterClercqTemperley'>)
('har', <class 'music21.converter.subConverters.ConverterClercqTemperley'>)
('humdrum', <class 'music21.converter.subConverters.ConverterHumdrum'>)
Expand Down
8 changes: 4 additions & 4 deletions music21/converter/subConverters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,13 +1397,13 @@ class ConverterClercqTemperley(SubConverter):
Wrapper for parsing harmonic definitions in Trevor de Clercq and
David Temperley's format.
'''
registerFormats = ('cttxt', 'har')
registerInputExtensions = ('cttxt', 'har')
registerFormats = ('cttxt', 'har', 'clercqTemperley')
registerInputExtensions = ('cttxt', 'har', 'clercqTemperley')

def parseData(self, strData, number=None):
def parseData(self, strData: str | pathlib.Path, number=None):
from music21.romanText import clercqTemperley
ctSong = clercqTemperley.CTSong(strData)
self.stream = ctSong.toScore()
self.stream = ctSong.toPart()

def parseFile(self,
filePath: pathlib.Path | str,
Expand Down
Loading