Tanpura: the waveguide string has no jawari, and what a credible one needs #104
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
bcox/tymbal#104
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?
bcox asked on 2026-09-26 what Tymbal needs to get a credible tanpura. This ticket records the answer so a spec can start from it. Nothing here is built, measured or scheduled. It is an assessment from reading the tree, rechecked at
5aa82002onmain. No patch was rendered and nothing was listened to.On the citations: every paper below is cited from memory and was not checked against the source in that session. Treat the attributions, and the two claims marked unverified, as leads to confirm before a spec leans on them.
Summary
The tanpura's identity is a nonlinearity the waveguide string does not have. Everything else it needs is already in the tree.
What makes it a tanpura
The jawari bridge is a wide, gently curved surface, with a cotton thread under the string near it. The string is constrained on one side only. On the half-cycle toward the bridge it wraps progressively onto the curve and its effective length shortens. On the other half it swings free.
Two consequences follow, both described by Raman in 1921:
That inverted brightness trajectory is the identity. The buzz is secondary. The thread's position tunes where the migration happens and how fast.
Literature, from memory:
What is already here
dsp/waveguide.h,dsp/waveguide_layer.hdsp/junction.hkFeltis already a Hunt-Crossley contact.Drive::kInputindsp/waveguide_layer.hEventKind::kTuninginfabric/event.h//tools:resynth, harmonic scanFor a burst drive the waveguide loop is entirely linear: a sign, a one-pole loss, a gain, the cascade and the tuning allpass. A linear recirculating string can only darken after the pluck. No patch of today's engine can be a tanpura, however it is tuned.
The passive bridge design already parked this item twice, in
docs/superpowers/specs/2026-09-23-passive-bridge-design.mdunder both "Out of scope" lists: "The jawari. Still local to one voice, still not ruled out." This ticket is that item.What it needs
1. A nonlinear reflection at the far end
In
WaveguideLoop::Process, the statement that formsreflectedfromincidentapplies the bore's sign and nothing else. The smallest jawari is a curve at that point:The property it must hold is contraction:
|f(x)| <= |x|everywhere. That makes the loop passive with no further argument. Note that this is a different condition from the onejunction_test.ccchecks. The junction's contract isx * f(x) >= 0and|f(x)| <= 1, which bounds a force, not a reflection. A reflection curve needs its own exhaustive sweep for contraction, whether or not it shares the junction's table machinery.What it does dynamically: every lap converts some of the fundamental's energy into upper harmonics while the amplitude sits above the knee. As the string decays below the knee the conversion stops, and the loss filter drains the top. That is the precursor's rise and fall.
Cost: one table lookup per sample and no interior writes to the line.
What it cannot do: the progressive wrap. A memoryless curve at one point cannot make the effective length depend on amplitude within a half-cycle, and every model in the literature above is distributed. Expect a buzz with a bloom. Whether that reads as tanpura or as sitar is a listening question and is open.
Two tests, each with its injection:
Open risk: the curve runs inside the loop at 1x. The waveguide design deferred oversampling as a risk "to be measured, not believed", and that applies here with more force, since this curve exists to make high partials.
2. A distributed bridge, if the listen says sitar
The line lives in a store the voice owns, outside the variant, and is indexable. Displacement at a point near the far end is the sum of the two traveling waves there. In a single recirculating line those are one index and its mirror, approximately, since the loss and the allpasses are lumped at one point and not distributed.
For K points across the bridge region:
That is the construction in Krishnaswamy and Smith. Unverified, from memory: their rigid-obstacle scheme can add energy at the contact boundary. If so, the correction needs the same discipline as every other stage in this loop, a contraction rounded toward zero, or a penalty formulation in its place.
Cost: a few line reads and writes per point per sample. K is a degradation rung in the way the cascade's depth is, and K of zero is today's loop. New patch fields would be the curvature, the thread offset and K.
The modal route is the alternative, and it is the one Van Walstijn's model takes.
dsp/mode_bank.hhas collocated sites and a delay-free inject. It has two sites (kModeBankSites), where a distributed barrier needs several, and its contact is explicit. Unverified, from memory: the modal collision papers use implicit energy-conserving solves because a stiff contact is unstable under an explicit one at audio rate. A bone bridge is stiff. The waveguide route looks like the better fit for fixed point, and that is a judgment, not a measurement.3. A dull pluck
Drive::kBurstinjects white noise scaled by the strike and the breath envelope. That fills the loop bright. A bright onset masks the bloom, which is the whole point of the instrument.Drive::kInputalready lets another slot excite the line, so an unvoiced layer through its own filter is a patch-level answer. Try that before adding a drive.4. Probably nothing for loss, body or cycle
The shortcut: resynthesis
Resynthesize a recording of one plucked string. The per-harmonic amplitude tracks are the precursor, so the migration comes with the analysis.
Capacities, read from
plugin/program.h:kMaxHarmonicskMaxWaveskMaxFramesWhether 32 waves resolve the migration well enough is untried.
What it loses:
For a drone that nobody plays expressively, both are small losses.
This needs a recording the repo is allowed to carry. Per CLAUDE.md, a checked-in recording grows the bank by its size for good.
Suggested order
Open questions for a spec
dsp/junction.h's table and interpolation, or live beside the loop? Either way it needs a contraction sweep of its own.WVGDrecord with a minor bump. Which ones are mod destinations? The knee is the obvious candidate, since moving the thread is how a player tunes the jawari.