Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

synthio.Envelope properties cannot be modified after creation

Aperta
#10,902 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
c, python
Ambito
embedded-iot

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C
Stelle
4.6k
Fork
1.4k
Merge medio
1g 7h
PR unite (30g)
166

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di adafruit/circuitpython

Tutte le issue di adafruit/circuitpython

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.