Correctly interpret F00

This commit is contained in:
Gwilym Inzani 2023-08-05 22:29:31 +01:00
parent db75d8b048
commit 3976fd93ea

View file

@ -343,13 +343,13 @@ pub fn parse_module(module: &Module) -> TokenStream {
0xC => PatternEffect::NoteCut((slot.effect_parameter & 0xf).into()), 0xC => PatternEffect::NoteCut((slot.effect_parameter & 0xf).into()),
_ => PatternEffect::None, _ => PatternEffect::None,
}, },
0xF => { 0xF => match slot.effect_parameter {
if slot.effect_parameter < 0x20 { 0 => PatternEffect::SetTicksPerStep(u32::MAX),
PatternEffect::SetTicksPerStep(slot.effect_parameter as u32) 1..=0x20 => PatternEffect::SetTicksPerStep(slot.effect_parameter as u32),
} else { 0x21.. => PatternEffect::SetFramesPerTick(bpm_to_frames_per_tick(
PatternEffect::None slot.effect_parameter as u32,
} )),
} },
_ => PatternEffect::None, _ => PatternEffect::None,
}; };