mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Don't hold arpeggios
This commit is contained in:
parent
03b5f2fafd
commit
b8adf08382
|
@ -177,6 +177,8 @@ impl TrackerChannel {
|
|||
self.base_speed = speed;
|
||||
}
|
||||
|
||||
channel.playback(self.base_speed);
|
||||
|
||||
match effect {
|
||||
PatternEffect::None => {}
|
||||
PatternEffect::Stop => {
|
||||
|
@ -185,8 +187,8 @@ impl TrackerChannel {
|
|||
PatternEffect::Arpeggio(first, second) => {
|
||||
match tick % 3 {
|
||||
0 => channel.playback(self.base_speed),
|
||||
1 => channel.playback(self.base_speed + first.change_base()),
|
||||
2 => channel.playback(self.base_speed + second.change_base()),
|
||||
1 => channel.playback(first.change_base()),
|
||||
2 => channel.playback(second.change_base()),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -172,13 +172,6 @@ pub fn parse_module(module: &Module) -> TokenStream {
|
|||
let first_arpeggio = slot.effect_parameter >> 4;
|
||||
let second_arpeggio = slot.effect_parameter & 0xF;
|
||||
|
||||
let note_speed = note_to_speed(
|
||||
*note,
|
||||
sample.fine_tune,
|
||||
sample.relative_note,
|
||||
module.frequency_type,
|
||||
);
|
||||
|
||||
let first_arpeggio_speed = note_to_speed(
|
||||
*note,
|
||||
sample.fine_tune,
|
||||
|
@ -192,19 +185,13 @@ pub fn parse_module(module: &Module) -> TokenStream {
|
|||
module.frequency_type,
|
||||
);
|
||||
|
||||
let first_arpeggio_difference = first_arpeggio_speed - note_speed;
|
||||
let second_arpeggio_difference = second_arpeggio_speed - note_speed;
|
||||
|
||||
let first_arpeggio_difference = first_arpeggio_difference
|
||||
.try_change_base()
|
||||
.expect("Arpeggio difference too large");
|
||||
let second_arpeggio_difference = second_arpeggio_difference
|
||||
.try_change_base()
|
||||
.expect("Arpeggio difference too large");
|
||||
|
||||
PatternEffect::Arpeggio(
|
||||
first_arpeggio_difference,
|
||||
second_arpeggio_difference,
|
||||
first_arpeggio_speed
|
||||
.try_change_base()
|
||||
.expect("Arpeggio size too large"),
|
||||
second_arpeggio_speed
|
||||
.try_change_base()
|
||||
.expect("Arpeggio size too large"),
|
||||
)
|
||||
} else {
|
||||
PatternEffect::None
|
||||
|
|
Loading…
Reference in a new issue