mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
fix arranger view but input is now dead
This commit is contained in:
parent
479988272e
commit
8850fbf2f8
3 changed files with 8 additions and 8 deletions
|
|
@ -78,8 +78,6 @@ pub fn main () -> Usually<()> {
|
||||||
let right_tos = PortConnection::collect(&cli.right_to, empty, empty);
|
let right_tos = PortConnection::collect(&cli.right_to, empty, empty);
|
||||||
let audio_froms = &[left_froms.as_slice(), right_froms.as_slice()];
|
let audio_froms = &[left_froms.as_slice(), right_froms.as_slice()];
|
||||||
let audio_tos = &[left_tos.as_slice(), right_tos.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(
|
let default_clip = ||Arc::new(RwLock::new(MidiClip::new(
|
||||||
"Clip", true, 384usize, None, Some(ItemColor::random().into()))));
|
"Clip", true, 384usize, None, Some(ItemColor::random().into()))));
|
||||||
let default_player = |jack: &Arc<RwLock<JackConnection>>, clip: Option<&Arc<RwLock<MidiClip>>>|
|
let default_player = |jack: &Arc<RwLock<JackConnection>>, clip: Option<&Arc<RwLock<MidiClip>>>|
|
||||||
|
|
@ -124,7 +122,7 @@ pub fn main () -> Usually<()> {
|
||||||
note_pt: 36.into(),
|
note_pt: 36.into(),
|
||||||
state: default_sampler(jack)?,
|
state: default_sampler(jack)?,
|
||||||
color,
|
color,
|
||||||
size,
|
size: Measure::new(),
|
||||||
}
|
}
|
||||||
))?)?,
|
))?)?,
|
||||||
TekMode::Sequencer => engine.run(&jack.activate_with(|jack|Ok({
|
TekMode::Sequencer => engine.run(&jack.activate_with(|jack|Ok({
|
||||||
|
|
|
||||||
|
|
@ -77,14 +77,17 @@ impl App {
|
||||||
tracks: usize,
|
tracks: usize,
|
||||||
track_width: usize,
|
track_width: usize,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
let mut arranger = Self {
|
||||||
edn: include_str!("../edn/arranger.edn").to_string(),
|
edn: include_str!("../edn/arranger.edn").to_string(),
|
||||||
..Self::groovebox(
|
..Self::groovebox(
|
||||||
jack, pool, editor,
|
jack, pool, editor,
|
||||||
None, midi_froms, midi_tos,
|
None, midi_froms, midi_tos,
|
||||||
sampler, audio_froms, audio_tos
|
sampler, audio_froms, audio_tos
|
||||||
)
|
)
|
||||||
}
|
};
|
||||||
|
arranger.scenes_add(scenes);
|
||||||
|
arranger.tracks_add(tracks, track_width, &[], &[]);
|
||||||
|
arranger
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
has_size!(<TuiOut>|self: App|&self.size);
|
has_size!(<TuiOut>|self: App|&self.size);
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ impl App {
|
||||||
self.row(w, h, output_header(&self), output_cells(&self))
|
self.row(w, h, output_header(&self), output_cells(&self))
|
||||||
}
|
}
|
||||||
fn scene_row (&self, w: u16, h: u16) -> impl Content<TuiOut> + '_ {
|
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)
|
pub fn tracks_with_sizes (&self)
|
||||||
|
|
@ -228,7 +228,7 @@ fn output_cells <'a> (state: &'a App) -> BoxThunk<'a, TuiOut> {
|
||||||
))))
|
))))
|
||||||
})).boxed()).into()
|
})).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 last_color = Arc::new(RwLock::new(ItemPalette::from(Color::Rgb(0, 0, 0))));
|
||||||
let selected = state.selected.scene();
|
let selected = state.selected.scene();
|
||||||
|
|
@ -600,7 +600,6 @@ fn cell <T: Content<TuiOut>> (color: ItemPalette, field: T) -> impl Content<TuiO
|
||||||
//impl Arranger {
|
//impl Arranger {
|
||||||
//const EDN: &'static str = include_str!("../edn/arranger.edn");
|
//const EDN: &'static str = include_str!("../edn/arranger.edn");
|
||||||
//pub const LEFT_SEP: char = '▎';
|
//pub const LEFT_SEP: char = '▎';
|
||||||
//pub const TRACK_MIN_WIDTH: usize = 9;
|
|
||||||
|
|
||||||
//fn toolbar (&self) -> impl Content<TuiOut> + use<'_> {
|
//fn toolbar (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
//Fill::x(Fixed::y(2, Align::x(ClockView::new(true, &self.clock))))
|
//Fill::x(Fixed::y(2, Align::x(ClockView::new(true, &self.clock))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue