diff --git a/cli/tek.rs b/cli/tek.rs index b9d67570..680db546 100644 --- a/cli/tek.rs +++ b/cli/tek.rs @@ -78,8 +78,6 @@ pub fn main () -> Usually<()> { let right_tos = PortConnection::collect(&cli.right_to, empty, empty); 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( "Clip", true, 384usize, None, Some(ItemColor::random().into())))); let default_player = |jack: &Arc>, clip: Option<&Arc>>| @@ -124,7 +122,7 @@ pub fn main () -> Usually<()> { note_pt: 36.into(), state: default_sampler(jack)?, color, - size, + size: Measure::new(), } ))?)?, TekMode::Sequencer => engine.run(&jack.activate_with(|jack|Ok({ diff --git a/tek/src/model.rs b/tek/src/model.rs index 3ff2e905..1887de52 100644 --- a/tek/src/model.rs +++ b/tek/src/model.rs @@ -77,14 +77,17 @@ impl App { tracks: usize, track_width: usize, ) -> Self { - Self { + let mut arranger = Self { edn: include_str!("../edn/arranger.edn").to_string(), ..Self::groovebox( jack, pool, editor, None, midi_froms, midi_tos, sampler, audio_froms, audio_tos ) - } + }; + arranger.scenes_add(scenes); + arranger.tracks_add(tracks, track_width, &[], &[]); + arranger } } has_size!(|self: App|&self.size); diff --git a/tek/src/view.rs b/tek/src/view.rs index afc20926..7b003821 100644 --- a/tek/src/view.rs +++ b/tek/src/view.rs @@ -91,7 +91,7 @@ impl App { self.row(w, h, output_header(&self), output_cells(&self)) } fn scene_row (&self, w: u16, h: u16) -> impl Content + '_ { - self.row(w, h, output_header(&self), output_cells(&self)) + self.row(w, h, scene_header(&self), scene_cells(&self)) } pub fn tracks_with_sizes (&self) @@ -228,7 +228,7 @@ fn output_cells <'a> (state: &'a App) -> BoxThunk<'a, TuiOut> { )))) })).boxed()).into() } -fn scene_headers <'a> (state: &'a App) -> BoxThunk<'a, TuiOut> { +fn scene_header <'a> (state: &'a App) -> BoxThunk<'a, TuiOut> { (||{ let last_color = Arc::new(RwLock::new(ItemPalette::from(Color::Rgb(0, 0, 0)))); let selected = state.selected.scene(); @@ -600,7 +600,6 @@ fn cell > (color: ItemPalette, field: T) -> impl Content impl Content + use<'_> { //Fill::x(Fixed::y(2, Align::x(ClockView::new(true, &self.clock))))