mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +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()] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue