MusicXML writer: Ottavas that start or end in the middle of a multi-voice measure get the wrong notes from the other voices
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
The bug is in music21's MusicXML export of Ottavas across multiple voices in one measure. Start by reproducing it with the measure 127-128 snippet attached to the issue, then check how the octave-shift start and stop are emitted relative to each voice's notes. Done means the exported XML keeps only the correct notes inside the octave-shift span for both voice orders. The issue has no agreed design, so confirm the expected MusicXML structure with maintainers before writing a fix.
索引モデルが issue の本文から書いたものです。
説明
music21 version
9.2.0b2
Problem summary
MusicXML written from a music21 score that has an Ottava that ends in the middle of voice 2 will have the octave-shift stop after the appropriate note in voice 2, but the octave-shift'ed section will include all the notes in voice 1. I'm assuming (but haven't yet seen) that if the last note in the Ottava is in the middle of voice 1, then all the notes in voice 2 will be left out, even though some of them should be in the octave-shift'ed section. A similar thing can happen with an Ottava that starts in the middle of a multi-voice measure, with notes in the non-starting voice being left out or included inappropriately, depending on which voice comes first in the MusicXML file produced.
Steps to reproduce
The example I have is measures 127 and 128 of the right hand staff in Beethoven's Piano Sonata 32 Movement 2.
Measure 127's right hand staff has one voice, but measure 128's right hand staff has two voices. The Ottava spans from the first note in measure 127 through the first four notes in voice 2 of measure 128. Voice 1 in measure 128 has a hidden dotted quarter rest (which extends beyond the end of the ottava) followed by three 16th notes that are not in the Ottava. In the music21 score, all the correct notes are in the Ottava, and the start and end notes are correctly the very first and very last notes that should be octave-shifted (first note is the dotted eighth note E5, last note is the 16th note Ab4). The resulting written MusicXML file does have the octave-shift start just before the E5, and the octave-shift stop just after the Ab4 (yay), but... the entirety of measure 128's voice 1 is emitted before voice2, so all of voice 1 (including those three 16th notes) is incorrectly included in the octave-shift'ed section.
Measure127And128.musicxml.snippet.txt
Any advice?
I intend to fix this myself, but I need some advice about what the MusicXML should actually look like (I am no MusicXML expert).
The only solution I can come up with (still using the same example) is to emit (in measure 128) a partial voice 1 (up through the Ab4), then back up and emit partial voice 2 (just the hidden dotted quarter rest), then emit the octave-shift stop, then emit the rest of voice 1, then back up and emit the rest of voice 2. Of course this would have to be generalized to handle octave-shift start as well, and to deal with any number of voices, etc.
Do I have that right? I suspect I will have to do a quick scan for Ottavas that have this issue, because before I start exporting a measure to MusicXML I will need to know to do partial voices in that measure. I won't be able to wait until I encounter a note that is in an Ottava, since I may have already incorrectly emitted an entire voice at that point.
Any advice from @mscuthbert or @jacobtylerwalls?
- 主要言語
- Python
- スター
- 2.6k
- フォーク
- 459
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 40
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cuthbertLab/music21 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cuthbertLab/music21#2084 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cuthbertLab/music21#2082 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
cuthbertLab/music21#2074 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cuthbertLab/music21#2055 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Slur bezier-x/y from start element gets overwritten by stop element's values再び着手できるかも @bingliscodes が 9 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cuthbertLab/music21#2019 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
cuthbertLab/music21 の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws-samples/sample-per-model-bedrock#261 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
pwncollege/dojo#1188 ·
メンテナーはふだん 1 日以内に返信
-
bug launcher packaging
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
tenstorrent/tt-studio#1426 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
python-attrs/cattrs#796 ·
メンテナーはふだん 1 日以内に返信