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

Support MusicXML sample tutorial-percussion #4

Merged
merged 5 commits into from
Dec 6, 2024
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
Binary file removed 01f-Pitches-ParenthesizedMicrotoneAccidentals.png
Binary file not shown.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ MusicXML to MuseScore converter and back.
- `npm run --silent convert:mscx /path/to/score.musicxml instrumentsFile=/path/to/MuseScore/share/instruments/instruments.xml styleFile=/path/to/MuseScore/stylesheet.mss`

# Examples
Screenshot of a score converted with a specialized stylesheet file.
Screenshot of an official MusicXML example converted to MuseScore format. There are subtle differences from what MuseScore itself would import from MusicXML.

![Screenshot of an official MusicXML example converted to MuseScore format.](https://github.com/infojunkie/musicxml-mscx/blob/main/doc/screenshots/tutorial-percussion.png?raw=true)

![Screenshot of a score converted with a specialized stylesheet file.](https://github.com/infojunkie/musicxml-mscx/blob/main/9-20-special.png?raw=true)
Screenshot of a Lilypond test snippet with microtonal accidentals. Not shown are the note tunings that are converted correctly and that MuseScore would miss when it imports the MusicXML.

Screenshot of a score with accidentals, including microtonal accidentals.
![Screenshot of a Lilypond test snippet with microtonal accidentals.](https://github.com/infojunkie/musicxml-mscx/blob/main/doc/screenshots/01f-Pitches-ParenthesizedMicrotoneAccidentals.png?raw=true)

Screenshot of a score converted with a specialized stylesheet file.

![Screenshot of a score with accidentals, including microtonal accidentals.](https://github.com/infojunkie/musicxml-mscx/blob/main/01f-Pitches-ParenthesizedMicrotoneAccidentals.png?raw=true)
![Screenshot of a score converted with a specialized stylesheet file.](https://github.com/infojunkie/musicxml-mscx/blob/main/doc/screenshots/9-20-special.png?raw=true)

# Theory of operation
Why write a new converter between MusicXML and MuseScore, when MuseScore itself already does 2-way conversion?
Expand Down
2 changes: 1 addition & 1 deletion build/libmusicxml.sef.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/mscx.sef.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added doc/screenshots/tutorial-percussion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "musicxml-mscx",
"version": "0.3.1",
"version": "0.4.0",
"description": "MuseScore to MusicXML converter and back.",
"author": "Karim Ratib <[email protected]> (https://github.com/infojunkie)",
"license": "GPL-3.0-only",
Expand Down
8 changes: 8 additions & 0 deletions src/libmusicxml.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@
<xsl:accumulator-rule match="sound[@coda]" select="@coda"/>
</xsl:accumulator>

<!--
State: Current measure repeat mode.
-->
<xsl:accumulator name="measureRepeat" as="element()*" initial-value="()">
<xsl:accumulator-rule match="measure/attributes/measure-style/measure-repeat[@type = 'start']" select="."/>
<xsl:accumulator-rule match="measure/attributes/measure-style/measure-repeat[@type = 'stop']" select="()"/>
</xsl:accumulator>

<!--
State: Map of measure number to index.
-->
Expand Down
Loading
Loading