Add the Edges pulse oscillators to Blocks #3
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
peterswimm/potatochips!3
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/mutable-edges-feasibility-b6y1i0"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Blocks ports channel 4 of Mutable Instruments Edges — the sampled digital oscillator in
digital_oscillator.cc— four times over. Channels 1 through 3 of the hardware are not DSP at all: they are XMEGA timers driving output pins (timer_oscillator.cc), which is why they were never part of the port. Their timbres are the rest of the module, so this renders them as six more shapes available on every channel, rather than as a module of its own with a new panel and manual.pulse_widthstable fromtimer_oscillator.cc. The panel of the hardware labels them 50%, 66%, 75%, 87%, and 95%, each of which is the complement of the duty cycle the timer produces; a pulse and its complement differ only in sign, so they sound the same.Settings::dac_to_fm()does on the hardware. The width is centered on a square, so an unpatched port renders one and the attenuverter sets the depth and direction of the sweep.DigitalOscillator::Shape, so a patch that stores a shape index still loads.Both front-ends are covered: the Rack module and the disting NT algorithm, which gains the six enum strings and the same width routing.
Incidental fixes along the way, each called out in the changelog:
shape + 1packed into R/G/B) only reached seven shapes.dataFromJson()clamps the shape index a patch supplies, which now indexes the color and label tables.RenderSilence()does on the hardware, rather than the negative rail. Neither front-end closes the gate, so no patch changes.dsp/mi_edges/wavetable.hppincludes<limits>, which it uses and had been getting fromrack.hpp.Not included, because both need panel controls that this deliberately avoids: the hard sync switch (channel 1's timer restarting channel 2's) and per-channel gate inputs. The sub-oscillator that follows channel 1 an octave down is already reachable through the normalled pitch chain.
No issue to close — this came out of a question about how much of Edges was still missing.
Type of change
How Has This Been Tested?
test/dsp/mi_edges/test_wavetable.cpp, run under ASan and UBSan: the shape indexes of the digital oscillator are unchanged,cycleShape()visits all twelve, each fixed pulse renders the duty cycle of the hardware's table, the CV controlled width clamps to the boundsTimerOscillator::set_cv_pw()uses, every shape stays inside the output range across a sweep of pitches from 0Hz to 40kHz, and a closed gate is silent.make -C distingNT/test, which builds under ASan and UBSan and checks the parameter tables, the declared memory, and rendering from defaults, saturated inputs, and random parameters.src/Blocks.cppcompiles clean against the Rack SDK with-Wall -Wextra.Two notes on running this yourself.
scons testneeds-DCATCH_CONFIG_NO_POSIX_SIGNALSon a recent glibc, because the pinned Catch2 predates theMINSIGSTKSZchange; that affects the existing suites equally. And a full plugin build against a v2 SDK fails insrc/SuperEcho.cpponmasteras well, untouched by this branch.Test Configuration
-std=c++11Checklist
Doxygen style
The prose documentation moved too: the README feature list, the Blocks manual (the shape table gains its six rows, and the frequency modulation section explains the width routing), the disting NT algorithm table, and the changelog. The manual's
moduleNamesaid Infinite Stairs; it now says Blocks. The panel art is untouched, since no control moved.WIP: Add the Edges pulse oscillators to Blocksto Add the Edges pulse oscillators to Blocks