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

Version 1.6.0 #398

Open
wants to merge 156 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 140 commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
ba0266d
parse fingering info from MusicXML
CarlosCancino-Chacon Apr 5, 2024
e0ed514
allow to_matched_score to use note arrays as inputs
CarlosCancino-Chacon Apr 9, 2024
10ad1a5
added fingering support in MEI export.
manoskary Apr 25, 2024
eae4542
fix 358
sildater Jul 19, 2024
50d3343
add check for empty note array
sildater Jul 19, 2024
cbc9f48
improve documentation performance note_array
sildater Jul 19, 2024
d366f60
Merge pull request #360 from CPJKU/fix358
sildater Jul 22, 2024
693b2c4
Format code with black (bot)
sildater Jul 22, 2024
30ffdc4
Merge pull request #361 from CPJKU/fix_356
sildater Jul 23, 2024
42423e0
Merge pull request #362 from CPJKU/fix_349
sildater Jul 23, 2024
1e80195
fix bug, update documentation
sildater Jul 25, 2024
498995e
Corrected Offsets for tied notes.
manoskary Aug 1, 2024
e06b975
Correction for staff line 2 as int.
manoskary Aug 3, 2024
75b7213
Removed unused code and added comments.
manoskary Aug 6, 2024
df54d0c
Merge pull request #366 from CPJKU/kern_tied_offset_bug
sildater Aug 7, 2024
9d480d9
Merge pull request #364 from CPJKU/fix_363
huispaty Aug 8, 2024
8dccc0a
Format code with black (bot)
huispaty Aug 8, 2024
f532be4
update tutorial with correct import
sildater Aug 13, 2024
26d30c5
Edits to support or remove editorials.
manoskary Aug 28, 2024
0a139f2
Removed unnecessary code.
manoskary Aug 28, 2024
bedc78d
Naive solution for estimate_symbolic_duration
manoskary Sep 5, 2024
ffeb587
Update for symbolic estimation function to cover most cases from 0-4 …
manoskary Sep 9, 2024
0e77947
Test for symbolic duration estimator.
manoskary Sep 9, 2024
d401dcb
estimate_voice_info now default to false
fosfrancesco Sep 16, 2024
ed0e8bb
int casting
sildater Sep 23, 2024
35d56a7
update docstring load_match
sildater Sep 23, 2024
699738e
remove unused match line base class imports
sildater Sep 23, 2024
ac9b64a
removed more unused imports
sildater Sep 23, 2024
98e9086
fix typing
sildater Sep 23, 2024
fb64f4f
refactor bar lines
sildater Sep 23, 2024
bb363d8
compute bar times wip
sildater Sep 23, 2024
125e1d2
barline in quarters wip
sildater Sep 23, 2024
b68d120
on_off_scale debug
sildater Sep 23, 2024
c24062f
add measures
sildater Sep 23, 2024
4eafa93
cleanup
sildater Sep 23, 2024
4ed8241
measure number starts at 1
sildater Sep 23, 2024
7c4a695
remove anacrusis measure conditional
sildater Sep 24, 2024
f8120dc
note_array_to_score measure number and name
sildater Sep 24, 2024
0eee6a8
measure export musicxml
sildater Sep 24, 2024
f69b983
reformat symbolic duration in match test file
sildater Sep 24, 2024
c0668c7
clean imports
sildater Sep 24, 2024
13e0ced
Merge pull request #373 from CPJKU/import_lakh
sildater Sep 24, 2024
5a1a6a8
Format code with black (bot)
sildater Sep 24, 2024
07eb9ed
use typing tuple
sildater Sep 24, 2024
5784c1c
find closest straight duration below
sildater Sep 24, 2024
c3e35ce
remove duplicate sym durs
sildater Sep 24, 2024
7ab8b3f
set test to eighth note quintuplets
sildater Sep 24, 2024
e51b3e3
duration test estimation
sildater Sep 24, 2024
3056e0a
file formatting
sildater Sep 24, 2024
1e76b64
measure feature wip
sildater Sep 25, 2024
e5d8938
single measure wip
sildater Sep 25, 2024
de5cc0b
rework default wip
sildater Sep 25, 2024
7db9f9b
fill measure info wip
sildater Sep 25, 2024
4306340
measure feature complete
sildater Sep 25, 2024
3fdfd39
fix time maps import
sildater Oct 1, 2024
69f8945
add warning
sildater Oct 1, 2024
6d24b6a
explainer in warning
sildater Oct 1, 2024
9754a90
correct formatting
sildater Oct 1, 2024
2d96acf
basic feature
sildater Oct 2, 2024
cec10ff
clef feature wip
sildater Oct 2, 2024
cc8c25c
clef dictionary wip
sildater Oct 2, 2024
01c0ecf
clef interpolator wip
sildater Oct 2, 2024
726ff82
compute note-wise clef features wip
sildater Oct 2, 2024
4ae870d
numerical clef signs
sildater Oct 2, 2024
788e743
add some defaults and safety
sildater Oct 2, 2024
ace407d
cleanup and documentation
sildater Oct 2, 2024
435edc1
add safety for part without clef
sildater Oct 2, 2024
9c23a9e
extrapolate
sildater Oct 2, 2024
c159bc9
Update globals.py
manoskary Oct 2, 2024
14d2d77
fix for notes with reonset during sustain pedal on
huispaty Oct 2, 2024
824a39b
Merge pull request #368 from CPJKU/fix-import348
CarlosCancino-Chacon Oct 2, 2024
3520066
Merge pull request #379 from CPJKU/fix_issue_378
CarlosCancino-Chacon Oct 2, 2024
ca3ce79
Merge pull request #372 from CPJKU/estimate_symbolic_duration_fix
manoskary Oct 2, 2024
00f6329
Format code with black (bot)
manoskary Oct 2, 2024
b61d8bf
updated performance features test
huispaty Oct 2, 2024
91ee519
Update importkern.py
manoskary Oct 2, 2024
ee8dfd3
Update importkern.py
manoskary Oct 2, 2024
1ca009c
Merge pull request #370 from CPJKU/kern_fixes
manoskary Oct 2, 2024
f424010
Format code with black (bot)
manoskary Oct 2, 2024
90ae765
Add clef_map
leleogere Oct 3, 2024
7d2623e
Fix a typing issue
leleogere Oct 3, 2024
b585213
Add a test
leleogere Oct 3, 2024
b2a8f5d
add test file
sildater Oct 4, 2024
446340c
remove initial clefs
sildater Oct 4, 2024
a59cf1d
tidy test files wip
sildater Oct 4, 2024
05e955b
test setup wip
sildater Oct 4, 2024
340b6f9
test case extraction wip
sildater Oct 4, 2024
e9d3845
another try
sildater Oct 4, 2024
d7c6008
Merge pull request #376 from CPJKU/measure_refactor_match
fosfrancesco Oct 7, 2024
1ddc259
Format code with black (bot)
fosfrancesco Oct 7, 2024
682f668
Relax assertion for tuplets parsing in musicxml
manoskary Oct 10, 2024
307f09d
Relax conditions for ChordSymbols by accepting empty kind.
manoskary Oct 10, 2024
4c9679d
clef feature ordered by na
sildater Oct 14, 2024
d3947ad
articulation feature ordered
sildater Oct 14, 2024
58e9b6a
ornament feature ordered
sildater Oct 14, 2024
acd8829
metrical feature ordered
sildater Oct 14, 2024
d81788c
require note ids in tests
sildater Oct 14, 2024
c77e5db
...
sildater Oct 14, 2024
b5abc4c
Added support for stem direction in musicxml import/export
manoskary Oct 14, 2024
c85acf9
measure feature ordered
sildater Oct 15, 2024
115d3a7
measure test and data
sildater Oct 15, 2024
5f265a2
add measure feature asserts
sildater Oct 15, 2024
7ff737e
disable cost-based merging of non-note attributes
sildater Oct 17, 2024
2a80fbc
documentation
sildater Oct 17, 2024
3f88474
sign test
sildater Oct 17, 2024
aaaa242
all attributes
sildater Oct 17, 2024
b2d4106
full test unmerged
sildater Oct 17, 2024
24dc6b5
full test including merging
sildater Oct 17, 2024
ea79e9d
support for stem direction in MEI.
manoskary Oct 18, 2024
97f7930
restricted values for the support of stem direction in MEI.
manoskary Oct 18, 2024
fad521c
Testing musicxml import with stems.
manoskary Oct 18, 2024
73a9620
adding stem information in target test files for unfolding.
manoskary Oct 18, 2024
55daed4
updated the position of stem in test file.
manoskary Oct 18, 2024
37cc068
Merge pull request #391 from CPJKU/fix_issue_390
sildater Oct 22, 2024
187e594
Format code with black (bot)
sildater Oct 22, 2024
9044296
Merge pull request #387 from CPJKU/relax_assertion_tuplet
manoskary Oct 22, 2024
c8d3bff
Format code with black (bot)
manoskary Oct 22, 2024
f0146a7
unique ID warning
sildater Oct 24, 2024
36b8423
unique rest ID warning
sildater Oct 24, 2024
1376edc
Merge pull request #382 from CPJKU/clef-feature
manoskary Oct 25, 2024
65ec4c5
Format code with black (bot)
manoskary Oct 25, 2024
faa6b52
Merge pull request #384 from leleogere/add_clef_map
sildater Oct 29, 2024
3bed493
refactor test
sildater Oct 29, 2024
865ca57
always check for starting clef
sildater Oct 29, 2024
dc424fa
default to none
sildater Oct 29, 2024
8cfc020
refactor clef feature
sildater Oct 29, 2024
733a926
typing
sildater Oct 29, 2024
8701d84
multipart and missing clef test
sildater Oct 29, 2024
17a89c5
error in CI
sildater Oct 29, 2024
fc480bf
remove typing for CI test
sildater Oct 29, 2024
bf5355d
Merge pull request #396 from CPJKU/clef_map_testing
sildater Oct 29, 2024
725861d
Format code with black (bot)
sildater Oct 29, 2024
50c52ce
fix typo
sildater Oct 29, 2024
af0f1cb
remove extra lines
sildater Oct 30, 2024
07225bc
Merge pull request #392 from CPJKU/stem_direction
manoskary Oct 30, 2024
37811e0
Format code with black (bot)
manoskary Oct 30, 2024
f2a1698
update MEI example to be valid. Previous one had a wrong staff defini…
fosfrancesco Oct 30, 2024
c460088
adding the "auto"mode on merge_parts, which mimic the voice handling …
fosfrancesco Oct 30, 2024
88fcd5a
mei import now takes voice and staff number from the score informatio…
fosfrancesco Oct 30, 2024
89ce10d
updated tests
fosfrancesco Oct 30, 2024
471e65f
give default values to staves and voice if they are mising in the MEI…
fosfrancesco Nov 3, 2024
94b0566
Merge pull request #397 from CPJKU/cross_staff_voices
manoskary Nov 5, 2024
975d300
Format code with black (bot)
manoskary Nov 5, 2024
3309554
Merge pull request #377 from CPJKU/measure_feature
sildater Nov 5, 2024
e5bf2e1
Format code with black (bot)
sildater Nov 5, 2024
f72cf19
Minor doc correction for nakamura corresp.
manoskary Nov 6, 2024
3f15113
Merge pull request #399 from CPJKU/performance_pedal_fix
CarlosCancino-Chacon Nov 11, 2024
46895d9
Format code with black (bot)
CarlosCancino-Chacon Nov 11, 2024
598af13
remove spurious musicxml file, add version
sildater Nov 14, 2024
1c88e59
Merge remote-tracking branch 'origin/develop' into fingering
manoskary Dec 2, 2024
86117e8
minor corrections.
manoskary Dec 3, 2024
03e062b
Sort exported notes by step when same midi_pitch
leleogere Dec 19, 2024
f4930b5
Merge pull request #407 from leleogere/patch-1
fosfrancesco Dec 19, 2024
9b82412
Format code with black (bot)
fosfrancesco Dec 19, 2024
bb1adac
Merge pull request #403 from CPJKU/fingering
fosfrancesco Dec 19, 2024
9c31c5b
Format code with black (bot)
fosfrancesco Dec 19, 2024
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
186 changes: 93 additions & 93 deletions docs/source/Tutorial/notebook.ipynb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this file supposed to be edited?

Large diffs are not rendered by default.

81 changes: 47 additions & 34 deletions partitura/assets/score_example.mei
Original file line number Diff line number Diff line change
@@ -1,52 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0">
<meiHead>
<fileDesc>
<titleStmt>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
<meiHead xml:id="m21agkk">
<fileDesc xml:id="f1x9ud6p">
<titleStmt xml:id="t1pe4slb">
<title />
<respStmt />
</titleStmt>
<pubStmt></pubStmt>
<pubStmt xml:id="p1kxcrok">
<date isodate="2024-10-30" type="encoding-date">2024-10-30</date>
</pubStmt>
</fileDesc>
<encodingDesc xml:id="encodingdesc-2o9bqo">
<appInfo xml:id="appinfo-j7rtco">
<application xml:id="application-hc9py4" isodate="2021-12-09T11:27:15" version="3.8.0-dev-45c3f2c">
<name xml:id="name-symba1">Verovio</name>
<p xml:id="p-roup2t">Transcoded from MusicXML</p>
<encodingDesc xml:id="e1xr2zpp">
<appInfo xml:id="a1wyxc5n">
<application xml:id="a1t43ge2" isodate="2024-10-30T10:56:32" version="4.3.1-3b8cc17">
<name xml:id="n1cp60l4">Verovio</name>
<p xml:id="p13nndma">Transcoded from MusicXML</p>
</application>
</appInfo>
</encodingDesc>
</meiHead>
<music>
<body>
<mdiv xml:id="mhblkrl">
<score xml:id="ssc72wy">
<scoreDef xml:id="s3uaoz5">
<staffGrp xml:id="sjczhy0">
<staffDef xml:id="P1" n="1" lines="5" ppq="12">
<label xml:id="lezfcog">Piano</label>
<meterSig xml:id="mhw0sp2" count="4" unit="4" />
</staffDef>
<mdiv xml:id="muo97v6">
<score xml:id="suneqlv">
<scoreDef xml:id="sz00r05">
<staffGrp xml:id="s1h35kps">
<staffGrp xml:id="P1" bar.thru="true">
<grpSym xml:id="g1eji31e" symbol="brace" />
<label xml:id="l8lirjj">Piano</label>
<instrDef xml:id="iggd40h" midi.channel="0" midi.instrnum="0" midi.volume="78.00%" />
<staffDef xml:id="sbpks8p" n="1" lines="5" ppq="1">
<clef xml:id="c1p7nrnw" shape="G" line="2" />
<keySig xml:id="ki5anqv" sig="0" />
<meterSig xml:id="m1vpw2w2" count="4" unit="4" />
</staffDef>
<staffDef xml:id="s1g416nz" n="2" lines="5" ppq="1">
<clef xml:id="cezkswz" shape="G" line="2" />
<keySig xml:id="kk41xfz" sig="0" />
<meterSig xml:id="m7alo7s" count="4" unit="4" />
</staffDef>
</staffGrp>
</staffGrp>
</scoreDef>
<sb xml:id="st1gphw" />
<section xml:id="swgpvx8">
<pb xml:id="paw6v6b" />
<measure xml:id="mz87quy" n="1">
<staff xml:id="sxxu2aq" n="1">
<layer xml:id="llktcv2" n="1">
<note xml:id="n01" dur.ppq="48" dur="1" staff="2" oct="4" pname="a" />
</layer>
<layer xml:id="lgap59p" n="2">
<rest xml:id="r01" dur.ppq="24" dur="2" />
<chord xml:id="carc8ao" dur.ppq="24" dur="2">
<note xml:id="n02" oct="5" pname="c" />
<note xml:id="n03" oct="5" pname="e" />
<section xml:id="suu4o7p">
<measure xml:id="m1e358qx" n="1">
<staff xml:id="s1ufvigy" n="1">
<layer xml:id="l1r7cvga" n="1">
<rest xml:id="ro1o7cb" dur.ppq="2" dur="2" />
<chord xml:id="c1c1r6b7" dur.ppq="2" dur="2" stem.dir="down">
<note xml:id="n6dpu2p" oct="5" pname="c" />
<note xml:id="njfgcwp" oct="5" pname="e" />
</chord>
</layer>
</staff>
<staff xml:id="s710zw2" n="2">
<layer xml:id="leffrs2" n="5">
<note xml:id="n1txt37q" dur.ppq="4" dur="1" oct="4" pname="a" />
</layer>
</staff>
</measure>
</section>
</score>
Expand Down
1 change: 0 additions & 1 deletion partitura/io/exportmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from partitura.io.matchlines_v1 import (
make_info,
make_scoreprop,
make_section,
MatchSnote,
MatchNote,
MatchSnoteNote,
Expand Down
3 changes: 3 additions & 0 deletions partitura/io/exportmei.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ def _handle_note(self, note, xml_voice_el):
elif note.tie_prev is not None:
note_el.set("tie", "t")

if note.stem_direction in ["up", "down"]:
note_el.set("stem.dir", note.stem_direction)

if note.alter is not None:
if (
note.step.lower() + ALTER_TO_MEI[note.alter]
Expand Down
22 changes: 17 additions & 5 deletions partitura/io/exportmusicxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ def make_note_el(note, dur, voice, counter, n_of_staves):
if voice not in (None, 0):
etree.SubElement(note_e, "voice").text = "{}".format(voice)

if note.stem_direction is not None:
stem_e = etree.SubElement(note_e, "stem")
stem_e.text = note.stem_direction

if note.fermata is not None:
notations.append(etree.Element("fermata"))

Expand Down Expand Up @@ -634,12 +638,20 @@ def merge_measure_contents(notes, other, measure_start):
merged[0] = []
cost[0] = 0

# CHANGE: disabled cost-based merging of non-note elements into stream
# because this led to attributes not being in the beginning of the measure,
# which in turn led to problems with musescore
# fix: add atributes first, then the notes.
# problem: unclear whether this cost-based merging will break anything or
# was just cosmetic to avoid too many forwards and backwards.
# related issue: https://github.com/CPJKU/partitura/issues/390

# get the voice for which merging notes and other has lowest cost
merge_voice = sorted(cost.items(), key=itemgetter(1))[0][0]
# merge_voice = sorted(cost.items(), key=itemgetter(1))[0][0]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this might end up having some unintended effect down the line... In any case, I think this change is ok as long as it doesn't break anything on the tests. Would it be possible to have a documented list of scores/pieces that had an issue with the sorting (i.e., the piece(s) that prompted this issue)? This could be useful for further testing down the line

result = []
pos = measure_start
for i, voice in enumerate(sorted(notes.keys())):
if voice == merge_voice:
if i == 0: # voice == merge_voice:
elements = merged[voice]

else:
Expand All @@ -658,7 +670,7 @@ def merge_measure_contents(notes, other, measure_start):
elif gap > 0:
e = etree.Element("forward")
ee = etree.SubElement(e, "duration")
ee.text = "{:d}".format(gap)
ee.text = "{:d}".format(int(gap))
result.append(e)

result.extend([e for _, _, e in elements])
Expand Down Expand Up @@ -1053,8 +1065,8 @@ def handle_parents(part):
part_e.append(etree.Comment(MEASURE_SEP_COMMENT))
attrib = {}

if measure.number is not None:
attrib["number"] = str(measure.number)
if measure.name is not None:
attrib["number"] = str(measure.name)

measure_e = etree.SubElement(part_e, "measure", **attrib)
contents = linearize_measure_contents(
Expand Down
41 changes: 28 additions & 13 deletions partitura/io/importkern.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@
}


class KernElement(object):
def __init__(self, element):
self.editorial_start = True if "ossia" in element else False
self.editorial_end = True if "Xstrophe" in element else False
self.voice_end = True if "*v" in element else False
self.voice_start = True if "*^" in element else False
self.element = element.replace("*", "")


def add_durations(a, b):
return a * b / (a + b)

Expand Down Expand Up @@ -102,8 +111,10 @@ def parse_by_voice(file: list, dtype=np.object_):
data[line, voice] = file[line][voice]
data = data.T
if num_voices > 1:
# Copy global lines from the first voice to all other voices
# Copy global lines from the first voice to all other voices unless they are the string "*S/ossia"
cp_idx = np.char.startswith(data[0], "*")
un_idx = np.char.startswith(data[0], "*S/ossia")
cp_idx = np.logical_and(cp_idx, ~un_idx)
for i in range(1, num_voices):
data[i][cp_idx] = data[0][cp_idx]
# Copy Measure Lines from the first voice to all other voices
Expand Down Expand Up @@ -171,10 +182,16 @@ def element_parsing(
):
divs_pq = part._quarter_durations[0]
current_tl_pos = 0
editorial = False
measure_mapping = {m.number: m.start.t for m in part.iter_all(spt.Measure)}
for i in range(elements.shape[0]):
element = elements[i]
if element is None:
if isinstance(element, KernElement):
if element.editorial_start:
editorial = True
if element.editorial_end:
editorial = False
if element is None or editorial:
continue
if isinstance(element, spt.GenericNote):
if total_duration_values[i] == 0:
Expand Down Expand Up @@ -250,9 +267,6 @@ def load_kern(
)
# Get Splines
splines = file[1:].T[note_parts]
# Inverse Order
splines = splines[::-1]
parsing_idxs = parsing_idxs[::-1]
prev_staff = 1
has_instrument = np.char.startswith(splines, "*I")
# if all parts have the same instrument, then they are the same part.
Expand Down Expand Up @@ -351,7 +365,8 @@ def load_kern(
)

doc_name = get_document_name(filename)
score = spt.Score(partlist=partlist, id=doc_name)
# inversing the partlist results to correct part order and visualization for exporting musicxml files
score = spt.Score(partlist=partlist[::-1], id=doc_name)
return score


Expand Down Expand Up @@ -430,17 +445,15 @@ def parse(self, spline: np.array):
self.tie_prev = np.zeros(note_num, dtype=bool)
notes = np.vectorize(self.meta_note_line, otypes=[object])(spline[note_mask])
self.total_duration_values[note_mask] = self.note_duration_values
# shift tie_next by one to the right
# Notes should appear in order within stream so shift tie_next by one to the right
# and tie next and inversingly tie_prev also
# Case of note to chord tie or chord to note tie is not handled yet
for note, to_tie in np.c_[
notes[self.tie_next], notes[np.roll(self.tie_next, -1)]
]:
to_tie.tie_next = note
# note.tie_prev = to_tie
for note, to_tie in np.c_[
notes[self.tie_prev], notes[np.roll(self.tie_prev, 1)]
]:
note.tie_prev = to_tie
# to_tie.tie_next = note

elements[note_mask] = notes

# Find Slur indices, i.e. where spline cells contain "(" or ")"
Expand Down Expand Up @@ -505,6 +518,8 @@ def meta_tandem_line(self, line: str):
return self.process_key_line(rest)
elif line.startswith("*-"):
return self.process_fine()
else:
return KernElement(element=line)

def process_tempo_line(self, line: str):
return spt.Tempo(float(line))
Expand Down Expand Up @@ -561,7 +576,7 @@ def process_clef_line(self, line: str):
else:
raise ValueError("Unrecognized clef line: {}".format(line))
else:
clef_line = has_line.group(0)
clef_line = int(has_line.group(0))
if octave_change and clef_line == 2 and clef == "G":
octave = -1
elif octave_change:
Expand Down
Loading