1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! RFC §2A — the per-tick **voice modulation bus**.
//!
//! [`VoiceMod`] is the explicit snapshot of a channel's per-tick
//! modulation (everything the lanes / effects contribute), decoupled
//! from *which voice reads it*. The channel fills it once per tick
//! ([`crate::channel::Channel::voice_mod`]); a voice consumes it
//! ([`crate::state_instr_default::StateInstrDefault::apply_voice_mod`]),
//! combining it with the voice's own envelope state to produce the
//! final per-sample step and stereo gains.
//!
//! Today there is exactly **one** consumer per channel — the live
//! voice, routed exactly as the pre-2A player did, so the render is
//! bit-identical. The point of making the bus explicit is the seam it
//! opens: RFC §2B re-points `apply_voice_mod` *per voice* (live + NNA
//! ghosts, MPE), each reading its own `VoiceMod`, without touching the
//! arithmetic this phase froze.
use Q15;
use ;
/// One channel's modulation contribution for a single tick. All
/// fields are *channel-side* values (from the lanes / row effects);
/// the voice-internal envelope (volume / panning / pitch) is **not**
/// here — it is read straight from the voice at apply time.
pub