mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
38 lines
1.5 KiB
Rust
38 lines
1.5 KiB
Rust
use crate::*;
|
|
|
|
audio!(|self: Arranger, client, scope|{
|
|
// Start profiling cycle
|
|
let t0 = self.perf.get_t0();
|
|
// Update transport clock
|
|
//if Control::Quit == ClockAudio(self).process(client, scope) {
|
|
//return Control::Quit
|
|
//}
|
|
//// Update MIDI sequencers
|
|
//let tracks = &mut self.tracks;
|
|
//let note_buf = &mut self.note_buf;
|
|
//let midi_buf = &mut self.midi_buf;
|
|
//if Control::Quit == TracksAudio(tracks, note_buf, midi_buf).process(client, scope) {
|
|
//return Control::Quit
|
|
//}
|
|
// FIXME: one of these per playing track
|
|
//self.now.set(0.);
|
|
//if let ArrangerSelection::Clip(t, s) = self.selected {
|
|
//let phrase = self.scenes.get(s).map(|scene|scene.clips.get(t));
|
|
//if let Some(Some(Some(phrase))) = phrase {
|
|
//if let Some(track) = self.tracks().get(t) {
|
|
//if let Some((ref started_at, Some(ref playing))) = track.player.play_phrase {
|
|
//let phrase = phrase.read().unwrap();
|
|
//if *playing.read().unwrap() == *phrase {
|
|
//let pulse = self.current().pulse.get();
|
|
//let start = started_at.pulse.get();
|
|
//let now = (pulse - start) % phrase.length as f64;
|
|
//self.now.set(now);
|
|
//}
|
|
//}
|
|
//}
|
|
//}
|
|
//}
|
|
// End profiling cycle
|
|
self.perf.update(t0, scope);
|
|
return Control::Continue
|
|
});
|