switchable monitoring

This commit is contained in:
🪞👃🪞 2024-07-02 19:51:50 +03:00
parent e30dd94d23
commit edadfde1a4
5 changed files with 94 additions and 107 deletions

View file

@ -204,23 +204,14 @@ fn play_toggle (s: &mut Launcher) -> Usually<bool> {
//unimplemented!()
//}
fn record_toggle (s: &mut Launcher) -> Usually<bool> {
s.recording = !s.recording;
for track in s.tracks.iter() {
track.sequencer.state().recording = s.recording;
}
s.sequencer().map(|mut s|s.recording = !s.recording);
Ok(true)
}
fn overdub_toggle (s: &mut Launcher) -> Usually<bool> {
s.overdub = !s.overdub;
for track in s.tracks.iter() {
track.sequencer.state().overdub = s.overdub;
}
s.sequencer().map(|mut s|s.overdub = !s.overdub);
Ok(true)
}
fn monitor_toggle (s: &mut Launcher) -> Usually<bool> {
s.monitoring = !s.monitoring;
for track in s.tracks.iter() {
track.sequencer.state().monitoring = s.monitoring;
}
s.sequencer().map(|mut s|s.monitoring = !s.monitoring);
Ok(true)
}