Repository navigation
Conversation
A tenth unison value, frame_spread (0-1, default 0), for WAVETABLE: the copies of a group read their own parts of the table, fanned over that fraction of it around the osc's own position, copy j of m at (j / (m - 1) - 0.5) of the fan. A fan that would reach past either end of the table shrinks to the room on that side, so the copies stay evenly spaced around the osc's position and the width follows the room; at the very end every copy reads the end frame. Every group fans the same way, and the osc's position still follows duty and its modulation, so a scan moves the whole fan. A detuned cluster whose copies also differ in spectrum reads as one wide, moving sound rather than a chorused single one; it is the "frame spread" of Vital's wavetable unison. render_wavetable() already renders each copy as two table passes with the crossfade as gains; it now picks each copy's cycle pair and weights from the copy's own position instead of once per block, so a copy costs what it did. unison_copy carries the copy's place in its group, set in unison_prepare(). Other waves ignore the field. Parsed, printed, unset, clamped, read back and MIDI-mappable like the other nine values; the generated JS constants follow. tests/test_unison: a two-copy wavetable cluster at 0.4 against two plain wavetable oscs at duty 0.3 and 0.7 (-68 dB), the same with two octave groups against four plain oscs (-62 dB), the shrink at both ends (duty 0.1 against plain oscs at 0 and 0.2, duty 0.9 against 0.8 and 1, four copies at duty 1 against four plain oscs at the last frame), the field inert on a saw cluster and on one wavetable copy, the clamp, read-back and wire form.
This branch has not been deployed
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.
unison: a cluster's copies fan over the wavetable (frame_spread)
Split out of #1251, where this was the second commit, so the wavetable rungs there can be reviewed on their own. One commit on main.
Summary
A detuned wavetable cluster whose copies all read the same frame sounds like one voice through a chorus. With each copy reading its own part of the table the stack turns into several related voices, and when the frame moves, each copy morphs at its own point. The idea is the frame spread of Vital's unison, with the fan centred on the osc's frame where Vital's runs one-sided from it by detune, so the frame position keeps meaning the centre of the sound when a scan moves it.
frame_spreadis a tenth value ofC(0-1, default 0) for WAVETABLE: the copies of a group fan over that fraction of the table around the osc's own position.docs/synth.mdon the branch carries the semantics.01-frame-spread-demo.mp4
BRAIDS01, then PPG_WA00, each at
frame_spread0, 0.3 and 0.6. Four oscs hold two chords below middle C, four copies each over +/-12 cents, no filter, and EG0 sweeps the frame from 0.2 to 0.55 over every note.Context
unison_copycarries the copy's place in its group, set inunison_prepare; the other renderers ignore it. The Pythonunisonkeyword is a list, so the tenth value passes through unchanged.Verification
frame_spreadsent the render is byte-identical to main: a four-copy cluster in two groups with the frame swept, and a plain wavetable note (host, fixed point).tests/test_unison: clusters atframe_spreadagainst plain oscs at the fanned positions, -54 to -70 dB over five cases, both ends of the shrink among them; the field inert on a saw cluster and on a single wavetable copy; clamp, read-back and wire form. The existing cases pass unchanged.Notes for reviewers
UNISON_FRAME_SPREADis appended beforeNO_PARAM, so no existing param id moves. That puts it afterUNISON_RANDOM, outside the range inplay_deltathat claims the unison union and respreads phases: aframe_spreadalone makes no cluster and moves no phase.posat the outer copy can land an ulp outside) and keeps the crossfade in 0..1.render_wavetable. Whichever of the two merges second, I rebase it over the other; the test of a fanned cluster reading from a rung comes with that one.