Repository navigation
Envelopes: gain inlet reads 1 when nothing is connected - #47
Merged
Merged
Conversation
Max hands an unconnected signal inlet zeros, so a plain zerr.envelopes~ with only a control signal multiplied every envelope by 0 and was silent; every example patch needed a [sig~ 1]. dsp64's count[] now tells the wrapper whether the gain inlet has a cord and perform() fills the block with 1.0 when it has none. Pd: zerr_envelopes~ creates the gain inlet with signalinlet_new(1.0), so it reads 1 unconnected and a float sent to it sets a constant gain. Max: zerr.envelopes~ plays at full level without a gain signal. Pd: zerr_envelopes~ likewise. Notes in max-v0.3.0.md and pd-next.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An unconnected signal inlet reads 0 in both hosts, so a plain
zerr.envelopes~/zerr_envelopes~with only a control signal multiplied every envelope by 0 and was silent. Found while writing the Max examples, all of which needed asig~ 1on the third inlet.Max (
zerr_envelopes.hpp,zerr.envelopes_tilde.cpp):dsp64readscount[2]and tells the wrapper whether the gain inlet has a cord;perform()fills the gain block with 1.0 when it has none. Atomic flag, set at DSP setup, read per block; no change to the core.Pd (
zerr_envelopes~.cpp): the gain inlet is created withsignalinlet_new(&x->x_obj, 1.0f), so it reads 1 unconnected and a float sent to it sets a constant gain, as for any Pd signal inlet.User-visible effect (rule 7)
zerr.envelopes~plays at full level without a gain signal. Assist text and README inlet line updated. Line added todocs/releases/max-v0.3.0.md.zerr_envelopes~likewise. Line added under a new Changed heading indocs/releases/pd-next.md.Verified: both hosts build from this branch. Headless Pd (
pd -nogui -batch):[sig~ 0.5]into a plain[zerr_envelopes~ trajectory circulation_8], nothing on the gain inlet,snapshot~of outlets 4 and 5 after 300 ms.sp4: 0 sp5: 1sp4: 0 sp5: 0Max needs a listening check: open any example without its
sig~ 1and the sound must play.🤖 Generated with Claude Code