Preserve's period detection: probes are placed by position, and a sustain loop is the span analysed
This commit is contained in:
@@ -300,7 +300,12 @@ anything for a trigger shape.
|
||||
is DERIVED from the audio, so it is cache and not state: nothing persists it, and it takes no
|
||||
rung of the payload ladder. **Answering "none" is a first-class result** — noise, polyphony,
|
||||
percussion and a source whose period changes mid-sample all return it, and the shifter's
|
||||
fixed-window geometry is the documented fallback.
|
||||
fixed-window geometry is the documented fallback. **Detection analyses the SUSTAIN LOOP when
|
||||
the capture carries one long enough to host the full search band** (`periodAnalysisSpan`),
|
||||
otherwise the whole source: the loop is what a Gate voice asymptotically plays, and a phrase
|
||||
whose head is pitched differently from its sustain would otherwise disagree its way to none.
|
||||
A shorter loop analyses the whole source rather than a narrowed band — a narrower span may
|
||||
never buy itself a higher lowest-findable fundamental.
|
||||
- `time_stretch` — the TIME half beside `pitch_shift`'s PITCH half, header-only: `StretchCursor`, the per-output-frame source-feed schedule (a fractional cursor carrying its rate debt, loop-wrapped), plus the rate bounds and their clamp. Rate 1.0 is exactly one source frame per output frame with no residue, which is what makes the unity Preserve read bit-identical to the pre-stretch engine. The bounds are **measured**, not arbitrary — see the header.
|
||||
- `velocity_curve` — THE monotone spline, shared by every consumer: the three velocity transfer curves and the three spline EGs. `VelocityCurve` is evaluated as ONE OR MORE Fritsch–Carlson monotone cubic Hermite splines joined at its HARD points — a hard knot is a sub-curve boundary for tangent purposes (exactly what the point array's own ends already are), so the two adjacent segments meet at their natural angle instead of a shared derivative and the no-overshoot guarantee holds PER SEGMENT rather than globally. Points are smooth by default; the ceiling is `kMaxCurvePoints` = 128, a MUSICAL bound (long rhythmic phrases, ~two points per articulation event) and not a performance one — **do not lower it**. `eval(velocity)` is the COLD reader, called once per note-on or once per drawn pixel column; `SplineCursor` is the RT one, an indexed segment search plus one Hermite evaluation with the segment and its tangents cached across samples. Both share the same `segmentTangents`/`hermiteAt` free functions, so there is one spline and not two. It carries its own y `CurveDomain`: UNIPOLAR [0,1] is the amp's GAIN, defaulting to `flat()` (y=1, every velocity→unity — a deliberate non-back-compat replacement of the old fixed `velocity/127` path, Daniel-approved); BIPOLAR [−1,1] is the signed modulation shape for pitch and filter, defaulting to `zero()` so velocity modulates neither until a curve is drawn. A bipolar curve does not imply the absence of a depth beside it: the filter keeps its `velAmount` knob and the two compose multiplicatively (`velAmount × curve.eval(v)`, `play_params.h`), while the pitch curve's throw is the fixed `kVelocityPitchRangeSemitones`.
|
||||
- `master_gain` — pure dB↔linear taper math (FB1): normalized [0,1] ↔ dB ↔ linear for the post-mixer master gain control (−∞…+24 dB, norm 0 = true silence, unity ≈ 0.714). Shared by the editor knob and the processor multiply so the needle, persisted value, and audio multiply cannot drift.
|
||||
|
||||
Reference in New Issue
Block a user