From 0e685ce7e859e7835aac101f855cf0ab73e5e5e9 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Tue, 7 Nov 2023 22:28:29 +0000 Subject: [PATCH] That's the longest out by one I've ever had to debug Thanks Corwin for helping! --- tracker/agb-midi-core/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tracker/agb-midi-core/src/lib.rs b/tracker/agb-midi-core/src/lib.rs index 3f25224d..24687fb7 100644 --- a/tracker/agb-midi-core/src/lib.rs +++ b/tracker/agb-midi-core/src/lib.rs @@ -130,7 +130,6 @@ pub fn parse_midi(midi_info: &MidiInfo) -> TokenStream { data, restart_point, note_offset, - sample_start, sample_rate: sample.get_sample_rate() as u32, }; @@ -227,7 +226,7 @@ pub fn parse_midi(midi_info: &MidiInfo) -> TokenStream { + coarse_tune as f64 + fine_tune as f64 / 8192.0, ), - sample: sample_id as u16, + sample: sample_id as u16 + 1, effect1: PatternEffect::Volume(Num::from_f32( vel.as_int() as f32 / 128.0 * channel_data.volume, )), @@ -365,8 +364,6 @@ struct SampleData { restart_point: Option, sample_rate: u32, note_offset: i32, - - sample_start: usize, } fn midi_key_to_speed(key: i16, sample: &SampleData, tune: f64) -> Num {