Skip to content

Commit

Permalink
Merge pull request #1558 from cuthbertLab/ct_measure_numbers
Browse files Browse the repository at this point in the history
Improve measure numbers on ClercqTemperley
  • Loading branch information
mscuthbert authored May 8, 2023
2 parents 696545a + 83696c5 commit 42534a3
Show file tree
Hide file tree
Showing 3 changed files with 313 additions and 167 deletions.
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

0 comments on commit 42534a3

Please sign in to comment.