pub struct StmChannel {Show 23 fields
pub instrument: u8,
pub note: (u8, u8),
pub volume: u8,
pub voice: MixerVoice,
pub effect: u8,
pub effect_param: u8,
pub cur_semis: f32,
pub porta_target_semis: f32,
pub porta_speed: u8,
pub porta_updown_mem: u8,
pub vib_pos: u8,
pub vib_speed: u8,
pub vib_depth: u8,
pub vol_slide_mem: u8,
pub trem_pos: u8,
pub trem_speed: u8,
pub trem_depth: u8,
pub note_cut_tick: u8,
pub note_delay_tick: u8,
pub pending_note: (u8, u8),
pub pending_instrument: u8,
pub pending_volume: u8,
pub has_pending_delay: bool,
}Expand description
Per-channel playback state for STM.
Fields§
§instrument: u8Currently-loaded instrument index (1..=31, 0 = none).
note: (u8, u8)Current note (octave, semitone) for the currently playing sample.
volume: u8Volume 0..=64.
voice: MixerVoiceShared mixer voice.
effect: u8Current effect command 0..=0xF.
effect_param: u8Current effect parameter.
cur_semis: f32Current live semitone index (fractional, measured from C-0). Porta / vibrato / fine porta all mutate this; the voice frequency is derived from it every tick.
porta_target_semis: f32Target semitone index for tone portamento (3xy / 5xy).
porta_speed: u8Tone-porta speed memory (shared between 3xy and 5xy).
porta_updown_mem: u81xy / 2xy memory — last non-zero parameter (shared).
vib_pos: u8Vibrato sine-table position 0..=63.
vib_speed: u8Vibrato speed memory (last non-zero 4xy x nibble).
vib_depth: u8Vibrato depth memory (last non-zero 4xy y nibble).
vol_slide_mem: u8Axy volume-slide parameter memory (shared with 5xy / 6xy).
trem_pos: u8Tremolo sine-table position 0..=63. Walks like vib_pos but on
a separate register so 4xy vibrato and 7xy tremolo on the same
channel don’t share phase.
trem_speed: u8Tremolo speed memory (last non-zero 7xy x nibble). PT semantics
per Protracker-effects-MODFIL12.txt 7:Tremolo say the per-nibble
memory operates independently from vibrato’s.
trem_depth: u8Tremolo depth memory (last non-zero 7xy y nibble).
note_cut_tick: u8Pending note-cut tick (ECx): if >0, volume forced to 0 on that tick.
note_delay_tick: u8Pending note-delay tick (EDx): if >0, the cell’s note is triggered on this tick instead of tick 0.
pending_note: (u8, u8)Saved trigger data for a pending note-delay.
pending_instrument: u8§pending_volume: u8§has_pending_delay: boolTrue if the pending note-delay slot is populated.
Trait Implementations§
Source§impl Clone for StmChannel
impl Clone for StmChannel
Source§fn clone(&self) -> StmChannel
fn clone(&self) -> StmChannel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more