Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Humdrum: Measure number restarts after fermata when in middle of measure

オープン
#1,730 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
data

調査の方向性

Start by running the reproduction script on chor001.krn with format='humdrum' and checking measureNumber for the notes after the fermata in measure 7. The Humdrum parsing code in music21 is where measure numbers are assigned, so look at how it handles barlines and fermatas mid-measure. Done means the note after the fermata reports measure 7 and the notes around it keep their numbers.

索引モデルが issue の本文から書いたものです。

説明

music21 version

Music21 9.1.0

Problem summary

In measure 7 of https://verovio.humdrum.org/?file=chorales/chor001.krn there's a fermata. In the same measure, the chorale continues. The note after the fermata has as measure 0.

# to reproduce
score = m21.converter.parse('chor001.krn', format='humdrum')
for element in score.recurse().getElementsByClass([m21.note.Note]):
    print(
        element.pitch.step,
        element.pitch.octave,
        element.pitch.accidental.alter if element.pitch.accidental else 0,
        element.quarterLength,
        element.getOffsetInHierarchy(score),
        element.getContextByClass('Part').id,
        element.activeSite.measureNumber
    )
    
    if element.activeSite.measureNumber == 8:
        break

# results in

G 4 0 1.0 0.0 spine_3 0
G 4 0 2.0 1.0 spine_3 1
D 5 0 1.0 3.0 spine_3 1
B 4 0 1.5 4.0 spine_3 2
A 4 0 0.5 5.5 spine_3 2
G 4 0 1.0 6.0 spine_3 2
G 4 0 1.5 7.0 spine_3 3
A 4 0 0.5 8.5 spine_3 3
B 4 0 1.0 9.0 spine_3 3
A 4 0 2.0 10.0 spine_3 4
B 4 0 1.0 12.0 spine_3 4
D 5 0 2.0 13.0 spine_3 5
C 5 0 1.0 15.0 spine_3 5
B 4 0 1.0 16.0 spine_3 6
A 4 0 2.0 17.0 spine_3 6
G 4 0 2.0 19.0 spine_3 7
B 4 0 1.0 21.0 spine_3 0   <------- 0 in stead of 7
B 4 0 1.0 22.0 spine_3 8


Expected vs. actual behavior

I expected the measure number to be 7

More information

主要言語
Python
スター
2.6k
フォーク
459
平均マージ
1日 7時間
マージ済み PR(30日)
40

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cuthbertLab/music21 のほかの issue

cuthbertLab/music21 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。