mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
fix renaming of duplicates; remove Arranger::modal
This commit is contained in:
parent
de4797ab52
commit
f500c717a2
5 changed files with 44 additions and 140 deletions
|
|
@ -40,7 +40,7 @@ pub enum PhrasePoolMode { Rename(usize, String) }
|
|||
pub struct Phrase {
|
||||
pub uuid: uuid::Uuid,
|
||||
/// Name of phrase
|
||||
pub name: Arc<RwLock<String>>,
|
||||
pub name: String,
|
||||
/// Temporal resolution in pulses per quarter note
|
||||
pub ppq: usize,
|
||||
/// Length of phrase in pulses
|
||||
|
|
@ -174,7 +174,7 @@ pub fn random_color () -> Color {
|
|||
}
|
||||
impl Phrase {
|
||||
pub fn new (
|
||||
name: &str,
|
||||
name: impl AsRef<str>,
|
||||
loop_on: bool,
|
||||
length: usize,
|
||||
notes: Option<PhraseData>,
|
||||
|
|
@ -182,7 +182,7 @@ impl Phrase {
|
|||
) -> Self {
|
||||
Self {
|
||||
uuid: uuid::Uuid::new_v4(),
|
||||
name: Arc::new(RwLock::new(name.into())),
|
||||
name: name.as_ref().to_string(),
|
||||
ppq: PPQ,
|
||||
length,
|
||||
notes: notes.unwrap_or(vec![Vec::with_capacity(16);length]),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue