provide components to App

This commit is contained in:
🪞👃🪞 2025-01-11 20:48:29 +01:00
parent cff87657b9
commit ed462cd0f6
5 changed files with 172 additions and 82 deletions

View file

@ -76,8 +76,8 @@ pub fn main () -> Usually<()> {
let left_tos = PortConnection::collect(&cli.left_to, empty, empty);
let right_froms = PortConnection::collect(&cli.right_from, empty, empty);
let right_tos = PortConnection::collect(&cli.right_to, empty, empty);
let audio_froms = &[&left_froms, &right_froms];
let audio_tos = &[&left_tos, &right_tos ];
let audio_froms = &[left_froms.as_slice(), right_froms.as_slice()];
let audio_tos = &[left_tos.as_slice(), right_tos.as_slice() ];
let perf = PerfModel::default();
let size = Measure::new();
let default_clip = ||Arc::new(RwLock::new(MidiClip::new(
@ -93,10 +93,7 @@ pub fn main () -> Usually<()> {
}
clock
};
let default_clock = |jack: &Arc<RwLock<JackConnection>>|{
let clock = Clock::from(jack);
default_bpm(clock)
};
let default_clock = |jack: &Arc<RwLock<JackConnection>>|default_bpm(Clock::from(jack));
// TODO: enable sync master/follow
//let sync_clock = |jack: &Arc<RwLock<JackConnection>>, app|{
//if cli.sync_lead {
@ -148,7 +145,7 @@ pub fn main () -> Usually<()> {
App::groovebox(
jack, (&clip).into(), (&clip).into(),
Some(player), &midi_froms, &midi_tos,
sampler, &audio_froms, &audio_tos,
sampler, audio_froms, audio_tos,
)
}))?)?,
TekMode::Arranger { scenes, tracks, track_width, .. } => engine.run(&jack.activate_with(|jack|Ok({
@ -156,7 +153,7 @@ pub fn main () -> Usually<()> {
jack,
PoolModel::default(),
MidiEditor::default(), &midi_froms, &midi_tos,
default_sampler(jack)?, &audio_froms, &audio_tos,
default_sampler(jack)?, audio_froms, audio_tos,
scenes, tracks, track_width
)
}))?)?,