Skip to content

Commit

Permalink
Merge pull request #80 from napulen/remove_drum_parts
Browse files Browse the repository at this point in the history
Removing drum parts from music21.stream before processing.
  • Loading branch information
napulen authored Jun 20, 2022
2 parents 8e1b719 + ce830b0 commit c293a90
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion AugmentedNet/score_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@


def _m21Parse(f, fmt=None):
return music21.converter.parse(f, format=fmt)
s = music21.converter.parse(f, format=fmt)
perc = [
p
for p in s.parts
if list(p.recurse().getElementsByClass("PercussionClef"))
]
s.remove(perc, recurse=True)
return s


def from_tsv(tsv, sep="\t"):
Expand Down

0 comments on commit c293a90

Please sign in to comment.