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

Allow objects to be in multiple sites

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
8/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
data

調査の方向性

This is a design question about letting one music object sit in several sites (a Voice and a PartStaff, or a beam or tuplet container), so it touches the core stream and site model rather than a single file. The author has no comments or assignee and intends to implement it personally, and the request is about architecture, not a bounded fix. A newcomer should only pick it up after the maintainers agree on a design, which this thread does not show.

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

説明

enhancement

Motivation
I noticed that the way music21objects are organized in voices in polyphonic/pianoform music is in Voice streams. Because a Voice is part of a Measure is part of a PartStaff, this means voices can not change staff, a case that sometimes happens for the piano.
Unfortunately, the way music21 is set up right now, allowing objects to be in one site only, prevents it from expressing voice and staff independently because this would mean logging an object in two different sites (Voice and Staff). I think this library really needs to allow for this to be a truly general representation for music notation. This would also be useful in other cases: Consider tuplets and beams for example. Right now, they are set up as objects that are logged in notes (correct me if I'm wrong). It would make a lot of sense from a modelling perspective to consider beams and tuplets as sites that live in Voice and that contain objects themselves. For that, see these figures from the musicdiff paper https://inria.hal.science/hal-02267454v2/document
beams
tuplets

As you can see, this makes it easy to express the nested nature of beams and tuplets but comes with the same problem as Voice/Statff: objects must be in multiple sites (both located inside Voice). This is because beams can extend over tuplet borders so you really need two independent strucures.

I think if music21 would overcome this specific limitation, it would become the library OMR researchers like myself desperately need right now. I would happily work on this if someone is open to discuss this issue. What makes me qualified to do so?
I already dedicated the last decade to develop a music model myself that can handle all these cases, albeit without being so dynamic (objects have fixed parents and can't be instantiated and used without them). I know this model can express all these cases because I also wrote a custom score rendering tool, playback and import/export from musicxml/midi. The model can also be edited and automatically tracks changes to tell the renderer what to update. Problem is, it is in Java and I need a powerful model for my work in OMR, especially to try and provide a common standard for comparing OMR results. You can look at the structure I came up with:
music_model

I don't want to translate my model because it is designed for other use cases, but I would happily work on this library if this makes it more versatile and usable for my research. My dataset contains and is explicitly tested for voices changing staffs, so I can not use it right now (among other smaller issues, see #1633, #1638).
Please tell me if you think having objects in multiple sites is feasible.

Intent

[x] I plan on implementing this myself.
[ ] I am willing to pay to have this feature added.
[ ] I am starting a discussion with the hope that community members will volunteer their time to create this. I understand that individuals work on features of interest to them and that this feature may never be implemented.

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

環境構築

Codespaces で開く

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

はじめの一歩

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

cuthbertLab/music21 のほかの issue

cuthbertLab/music21 の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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