add some sequences

This commit is contained in:
sigil-03 2025-11-06 10:53:57 -07:00
parent 48b836904b
commit 1bdb68c0d4
3 changed files with 542 additions and 48 deletions

View file

@ -295,7 +295,7 @@ pub struct Sequences {
pub led0: sequencer::BasicSequence<'static>,
pub led1: sequencer::BasicSequence<'static>,
pub led2: sequencer::BasicSequence<'static>,
pub audio: [&'static [sequencer::SequenceEntry]; 2],
pub audio: &'static [&'static [sequencer::SequenceEntry]],
}
// things that touch hardware
@ -439,9 +439,15 @@ impl App {
self.services.led2.service();
}
// TODO: disable when you get to the end automatically
// in the sequencer, not here
if self.services.sequencer.need_service() {
if let Some(out) = self.services.sequencer.service() {
self.services.synth0.set_freq(out.into());
if out == 0 {
self.services.synth0.disable();
} else {
self.services.synth0.set_freq(out.into());
}
} else {
self.services.sequencer.disable();
self.services.synth0.disable();