mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-10-08 18:56:42 +02:00
use Arc<str> where applicable; use konst split_at
This commit is contained in:
parent
411fc0c4bc
commit
305481adee
35 changed files with 286 additions and 273 deletions
|
|
@ -24,7 +24,7 @@ pub struct PoolModel {
|
|||
#[derive(Debug, Clone)]
|
||||
pub enum PoolMode {
|
||||
/// Renaming a pattern
|
||||
Rename(usize, String),
|
||||
Rename(usize, Arc<str>),
|
||||
/// Editing the length of a pattern
|
||||
Length(usize, usize, PhraseLengthFocus),
|
||||
/// Load phrase from disk
|
||||
|
|
@ -147,10 +147,10 @@ fn to_phrases_command (state: &PoolModel, input: &Event) -> Option<PoolCommand>
|
|||
return None
|
||||
},
|
||||
kpat!(Char('a')) | kpat!(Shift-Char('A')) => Cmd::Phrase(PhrasePoolCommand::Add(count, MidiClip::new(
|
||||
String::from("Clip"), true, 4 * PPQ, None, Some(ItemPalette::random())
|
||||
"Clip", true, 4 * PPQ, None, Some(ItemPalette::random())
|
||||
))),
|
||||
kpat!(Char('i')) => Cmd::Phrase(PhrasePoolCommand::Add(index + 1, MidiClip::new(
|
||||
String::from("Clip"), true, 4 * PPQ, None, Some(ItemPalette::random())
|
||||
"Clip", true, 4 * PPQ, None, Some(ItemPalette::random())
|
||||
))),
|
||||
kpat!(Char('d')) | kpat!(Shift-Char('D')) => {
|
||||
let mut phrase = state.phrases()[index].read().unwrap().duplicate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue