Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

synthio.Envelope properties cannot be modified after creation

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
c, python
领域
embedded-iot

调研方向

The issue does not name implementation files or tests. Start by locating the synthio.Envelope implementation and related tests, then determine how its properties are exposed and whether notes use the envelope while it changes. Done means the intended mutability and behavior during each envelope phase are decided, implemented, and documented.

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

描述

synthio
CircuitPython version and board name
Adafruit CircuitPython 10.1.4 on 2026-03-09; Raspberry Pi Pico W with rp2040
Code/REPL
Adafruit CircuitPython 10.1.4 on 2026-03-09; Raspberry Pi Pico W with rp2040
>>>
>>>
>>> import synthio
>>> test_env1 = synthio.Envelope(release_time=1.0)
>>> test_env1.release_time
1.0
>>> test_env1.release_time = 2.0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: can't set attribute

>>> test_env2 = synthio.Envelope(release_time=synthio.Math(synthio.MathOperation.ABS, 1.0))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: release_time must be of type float, not Math
Behavior

The properties are read only and cannot be changed. Using synthio.Math as a variable can't be used as a workaround.

Description

The envelope cannot be modified after it's been created. I mentioned this a while ago in a forum post but never tested it til now. This would include the case when the envelope is being actively used as an amplitude envelope for a synthio.Note. One case where this would be useful is changing the release time (based on a MIDI CC 72 message) while a note is being played and typically before the key is released.

If the properties are mutable then a decision would be needed on whether they affect a note in that phase, e.g. attack_level is changed during the attack phase. If the behaviour is documented I'm fine either way.

Additional information

@todbot and @relic-se may be interested in this or know of a workaround.

主要语言
C
星标
4.6k
派生
1.4k
平均合并
1 天 8 小时
30 天内合并 PR
155

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

adafruit/circuitpython 的其他 Issue

查看 adafruit/circuitpython 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

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