mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
fix canvas density; play sampler from sequencer; jump to pressed key
This commit is contained in:
parent
b1ca35e5d9
commit
198a730e33
2 changed files with 10 additions and 2 deletions
|
|
@ -49,12 +49,20 @@ audio!(|self: GrooveboxTui, client, scope|{
|
|||
if Control::Quit == ClockAudio(&mut self.player).process(client, scope) {
|
||||
return Control::Quit
|
||||
}
|
||||
if Control::Quit == PlayerAudio(
|
||||
&mut self.player, &mut self.note_buf, &mut self.midi_buf
|
||||
).process(client, scope) {
|
||||
return Control::Quit
|
||||
}
|
||||
if Control::Quit == SamplerAudio(&mut self.sampler).process(client, scope) {
|
||||
return Control::Quit
|
||||
}
|
||||
for RawMidi { time, bytes } in self.sampler.midi_in.iter(scope) {
|
||||
for RawMidi { time, bytes } in self.player.midi_ins[0].iter(scope) {
|
||||
if let LiveEvent::Midi { message, .. } = LiveEvent::parse(bytes).unwrap() {
|
||||
match message {
|
||||
MidiMessage::NoteOn { ref key, .. } => {
|
||||
self.editor.set_note_point(key.as_int() as usize);
|
||||
},
|
||||
MidiMessage::Controller { controller, value } => {
|
||||
if controller == u7::from(20) {
|
||||
if let Some(sample) = &self.sampler.mapped[self.editor.note_point()] {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ render!(<Tui>|self: SampleViewer|render(|to|{
|
|||
let x = t as f64;
|
||||
let y = meter as f64;
|
||||
lines.push(Line::new(x, min_db, x, y, Color::Green));
|
||||
t += step;
|
||||
t += step / 2.;
|
||||
}
|
||||
(
|
||||
[sample.start as f64, sample.end as f64],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue