fix arranger view but input is now dead

This commit is contained in:
🪞👃🪞 2025-01-12 00:58:32 +01:00
parent 479988272e
commit 8850fbf2f8
3 changed files with 8 additions and 8 deletions

View file

@ -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<RwLock<JackConnection>>, clip: Option<&Arc<RwLock<MidiClip>>>|
@ -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({

View file

@ -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!(<TuiOut>|self: App|&self.size);

View file

@ -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<TuiOut> + '_ {
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 <T: Content<TuiOut>> (color: ItemPalette, field: T) -> impl Content<TuiO
//impl Arranger {
//const EDN: &'static str = include_str!("../edn/arranger.edn");
//pub const LEFT_SEP: char = '▎';
//pub const TRACK_MIN_WIDTH: usize = 9;
//fn toolbar (&self) -> impl Content<TuiOut> + use<'_> {
//Fill::x(Fixed::y(2, Align::x(ClockView::new(true, &self.clock))))