mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
show sample names
This commit is contained in:
parent
511ff91864
commit
5bc19a45d2
8 changed files with 23 additions and 25 deletions
|
|
@ -33,7 +33,7 @@ impl Groovebox {
|
|||
let mut player = crate::midi::MidiPlayer::new(jack, &"sequencer", &midi_from, &midi_to)?;
|
||||
jack.read().unwrap().client().connect_ports(&player.midi_outs[0], &sampler.midi_in)?;
|
||||
let phrase = Arc::new(RwLock::new(MidiClip::new(
|
||||
"New", true, 4 * player.clock.timebase.ppq.get() as usize,
|
||||
"Clip", true, 4 * player.clock.timebase.ppq.get() as usize,
|
||||
None, Some(ItemColor::random().into())
|
||||
)));
|
||||
player.play_phrase = Some((Moment::zero(&player.clock.timebase), Some(phrase.clone())));
|
||||
|
|
@ -112,16 +112,13 @@ render!(Tui: (self: Groovebox) => {
|
|||
Bsp::s(
|
||||
lay!(Align::w(edit_clip), Align::e(selectors)),
|
||||
Bsp::n(
|
||||
Bsp::a(
|
||||
Outer(Style::default().fg(TuiTheme::g(128))),
|
||||
Fill::x(Fixed::y(sample_h, if let Some((_, sample)) = &self.sampler.recording {
|
||||
SampleViewer(Some(sample.clone()))
|
||||
} else if let Some(sample) = &self.sampler.mapped[note_pt] {
|
||||
SampleViewer(Some(sample.clone()))
|
||||
} else {
|
||||
SampleViewer(None)
|
||||
})),
|
||||
),
|
||||
Max::y(sample_h, Fill::xy(if let Some((_, sample)) = &self.sampler.recording {
|
||||
SampleViewer(Some(sample.clone()))
|
||||
} else if let Some(sample) = &self.sampler.mapped[note_pt] {
|
||||
SampleViewer(Some(sample.clone()))
|
||||
} else {
|
||||
SampleViewer(None)
|
||||
})),
|
||||
Bsp::n(
|
||||
lay!(
|
||||
Align::w(Fixed::y(1, SamplerStatus(&self.sampler, note_pt))),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue