mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
delete sample
This commit is contained in:
parent
5bd9068bbe
commit
8dedc8fd5f
2 changed files with 6 additions and 1 deletions
|
|
@ -163,6 +163,10 @@ keymap!(KEYS_GROOVEBOX: |state: Groovebox, input: Event| GrooveboxCommand {
|
||||||
} else {
|
} else {
|
||||||
SamplerCommand::RecordBegin(u7::from(state.editor.note_point() as u8))
|
SamplerCommand::RecordBegin(u7::from(state.editor.note_point() as u8))
|
||||||
}),
|
}),
|
||||||
|
// Shift-Del: delete sample
|
||||||
|
shift(key(Delete)) => Cmd::Sampler(
|
||||||
|
SamplerCommand::SetSample(u7::from(state.editor.note_point() as u8), None)
|
||||||
|
),
|
||||||
// e: Toggle between editing currently playing or other phrase
|
// e: Toggle between editing currently playing or other phrase
|
||||||
shift(key(Char('e'))) => if let Some((_, Some(playing))) = state.player.play_phrase() {
|
shift(key(Char('e'))) => if let Some((_, Some(playing))) = state.player.play_phrase() {
|
||||||
let editing = state.editor.phrase().as_ref().map(|p|p.read().unwrap().clone());
|
let editing = state.editor.phrase().as_ref().map(|p|p.read().unwrap().clone());
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,8 @@ render!(Tui: (self: MidiEditStatus<'a>) => {
|
||||||
|
|
||||||
let note_point = format!("{:>3}", self.0.note_point());
|
let note_point = format!("{:>3}", self.0.note_point());
|
||||||
let note_name = format!("{:4}", Note::pitch_to_name(self.0.note_point()));
|
let note_name = format!("{:4}", Note::pitch_to_name(self.0.note_point()));
|
||||||
let note_field = Field(color, "Note", format!("{note_name} {note_point}"));
|
let note_len = format!("{:>4}", self.0.note_len());;;;
|
||||||
|
let note_field = Field(color, "Note", format!("{note_name} {note_point} {note_len}"));
|
||||||
|
|
||||||
Tui::bg(color.darkest.rgb, Fill::x(Tui::fg(color.lightest.rgb, Bsp::e(
|
Tui::bg(color.darkest.rgb, Fill::x(Tui::fg(color.lightest.rgb, Bsp::e(
|
||||||
time_field,
|
time_field,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue