Support sus4 chords in root-finding algorithm

未关闭
#1,650 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@p2rez 已经在做这个了。

开始于 2026年7月22日。

  • #1988 来自 @p2rez —— 已关闭,未合并

评估

难度
5/5
预计耗时
一周以上
新手友好度
18/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
data

调研方向

The payload names chord.Chord('F B- C E-').root(), which should return F rather than C, and a rootnessFunction() idea that favours adjacent intervals. It names no source files, so locate the root-finding code from the Chord.root() method. The issue is still a discussion without an agreed design, and a closed, unmerged pull request (#1988) is linked, so check that thread before starting. Done means that example returns F and the existing chord tests still pass.

由索引模型根据 Issue 内容生成。

描述

enhancement

Motivation
sus4 chords are common enough that we could support them in the root-finding algorithm.

Feature summary

>>> from music21 import chord
>>> chord.Chord('F B- C E-').root()  # expected F
<music21.pitch.Pitch C>

Proposed implementation
rootnessFunction() might possibly prefer adjacent values (e.g. having a fifth and seventh trumps having a third and a seventh), but this would need to be tested (makes less sense in the case of adjacent ninth and eleventh, etc.)

Intent

[?] I plan on implementing this myself.
[ ] I am willing to pay to have this feature added.
[x] 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.

Reported on m21 list Sept. 2023

主要语言
Python
星标
2.6k
派生
459
PR 合并指标
30 天内没有已合并 PR

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cuthbertLab/music21 的其他 Issue

查看 cuthbertLab/music21 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。