Trying to clena the mess opened by plugins

This commit is contained in:
2026-02-21 01:03:55 +01:00
parent 5ef988382b
commit e9bca2548c
67 changed files with 1246 additions and 69 deletions

View File

@@ -0,0 +1,46 @@
use std::sync::Arc;
use cagire_project::Project;
use nih_plug::prelude::*;
use nih_plug_egui::EguiState;
use parking_lot::Mutex;
#[derive(Params)]
pub struct CagireParams {
#[persist = "editor-state"]
pub editor_state: Arc<EguiState>,
#[persist = "project"]
pub project: Arc<Mutex<Project>>,
#[id = "tempo"]
pub tempo: FloatParam,
#[id = "sync"]
pub sync_to_host: BoolParam,
#[id = "bank"]
pub bank: IntParam,
#[id = "pattern"]
pub pattern: IntParam,
}
impl Default for CagireParams {
fn default() -> Self {
Self {
editor_state: EguiState::from_size(1200, 800),
project: Arc::new(Mutex::new(Project::default())),
tempo: FloatParam::new("Tempo", 120.0, FloatRange::Linear { min: 40.0, max: 300.0 })
.with_unit(" BPM")
.with_step_size(0.1),
sync_to_host: BoolParam::new("Sync to Host", true),
bank: IntParam::new("Bank", 0, IntRange::Linear { min: 0, max: 31 }),
pattern: IntParam::new("Pattern", 0, IntRange::Linear { min: 0, max: 31 }),
}
}
}