Hardware entropy for the voice RNG #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
bcox/tymbal#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Status: considered and rejected. Filed for the record so it is not
re-proposed without the counter-argument.
Raised as: should the voice RNG use real entropy — ring-oscillator TRNGs on the
FPGA, or a CPU cycle counter?
Both were rejected, for the same reason.
Determinism is load-bearing here
.bazelrcforbids FMA contraction and fast-math reassociation specifically sothat a float reference stays a usable oracle for the fixed-point
implementation. Tests assert on concrete rendered audio — the corrupt-preset
test compares a subject instance's energy against a reference instance's, and
the LFO tests pin quarter-cycle values. A nondeterministic source on the
synthesis path would reduce all of that to statistical assertions.
It would also mean a patch sounds different every time it loads, which is
usually a bug report.
The specific mechanisms
primitive, but they would spend fabric on a property this design does not
want.
rdtscis not synthesisable, so it cannot follow the code to the FPGAtarget at all, and reading it on the audio thread injects nondeterminism into
the one place the design works hardest to keep deterministic.
What was actually wanted
The problem that prompted it was voices sharing a sequence, not voices being
predictable. That was decorrelation, not entropy, and it is fixed in
6776866.If across-session variation is ever wanted, see the separate issue on a session
seed chosen at the boundary — entropy outside
dsp/, determinism inside.