Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature request: `.getOffsetBySiteInSeconds` in Music21Object

Đang mở
#1,771 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
data

Hướng nghiên cứu

Start from the existing seconds property on Music21Object and from how the object's offset relative to a given stream (site) is looked up, since the request asks for the same idea with a user-supplied site. The payload names no files or tests, so locate those in the codebase first. Done means a method that returns the object's start time in seconds relative to the chosen stream, with a test that checks it against a stream of known tempo and durations. The issue has no assignee, no linked pull request, and no reply since its first comment, so confirm with maintainers before starting.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Motivation
We already have Music21Object.seconds that returns the duration of the object in seconds. I hope that we can have a function that returns the object's position relative to a stream it belongs to. It is useful in the following scenarios:

  • Developing audio synthesizers that takes Music21 stream as input.
  • Handling a stream with a lot of objects. A .getOffsetBySiteInSeconds will avoid cumulative error in summing the .seconds duration of all objects.

Feature summary
Add a method, .getOffsetBySiteInSeconds, that returns the position relative to a user-given stream it belongs to.

Proposed implementation

Optionally, describe the implementation or the interface, in code or pseudocode.

Like how .seconds is implemented

Intent

  • 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.
Ngôn ngữ chính
Python
Star
2.6k
Fork
459
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
40

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cuthbertLab/music21

Tất cả issue của cuthbertLab/music21

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.