Euclidean + hue rotation
Some checks failed
Deploy Website / deploy (push) Has been cancelled

This commit is contained in:
2026-02-02 13:25:27 +01:00
parent c396c39b6b
commit 4396147a8b
21 changed files with 1338 additions and 53 deletions

View File

@@ -41,6 +41,32 @@ impl PatternPropsField {
}
}
#[derive(Clone, Copy, PartialEq, Eq, Default)]
pub enum EuclideanField {
#[default]
Pulses,
Steps,
Rotation,
}
impl EuclideanField {
pub fn next(&self) -> Self {
match self {
Self::Pulses => Self::Steps,
Self::Steps => Self::Rotation,
Self::Rotation => Self::Rotation,
}
}
pub fn prev(&self) -> Self {
match self {
Self::Pulses => Self::Pulses,
Self::Steps => Self::Pulses,
Self::Rotation => Self::Steps,
}
}
}
pub struct EditorContext {
pub bank: usize,
pub pattern: usize,

View File

@@ -30,7 +30,8 @@ pub mod ui;
pub use audio::{AudioSettings, DeviceKind, EngineSection, MainLayout, Metrics, SettingKind};
pub use color_scheme::ColorScheme;
pub use editor::{
CopiedStepData, CopiedSteps, EditorContext, PatternField, PatternPropsField, StackCache,
CopiedStepData, CopiedSteps, EditorContext, EuclideanField, PatternField, PatternPropsField,
StackCache,
};
pub use live_keys::LiveKeyState;
pub use modal::Modal;

View File

@@ -1,5 +1,5 @@
use crate::model::{LaunchQuantization, PatternSpeed, SyncMode};
use crate::state::editor::{PatternField, PatternPropsField};
use crate::state::editor::{EuclideanField, PatternField, PatternPropsField};
use crate::state::file_browser::FileBrowserState;
#[derive(Clone, PartialEq, Eq)]
@@ -66,4 +66,13 @@ pub enum Modal {
KeybindingsHelp {
scroll: usize,
},
EuclideanDistribution {
bank: usize,
pattern: usize,
source_step: usize,
field: EuclideanField,
pulses: String,
steps: String,
rotation: String,
},
}

View File

@@ -4,6 +4,7 @@ use super::CyclicEnum;
pub enum OptionsFocus {
#[default]
ColorScheme,
HueRotation,
RefreshRate,
RuntimeHighlight,
ShowScope,
@@ -26,6 +27,7 @@ pub enum OptionsFocus {
impl CyclicEnum for OptionsFocus {
const VARIANTS: &'static [Self] = &[
Self::ColorScheme,
Self::HueRotation,
Self::RefreshRate,
Self::RuntimeHighlight,
Self::ShowScope,

View File

@@ -50,6 +50,7 @@ pub struct UiState {
pub event_flash: f32,
pub flash_brightness: f32,
pub color_scheme: ColorScheme,
pub hue_rotation: f32,
}
impl Default for UiState {
@@ -78,6 +79,7 @@ impl Default for UiState {
event_flash: 0.0,
flash_brightness: 1.0,
color_scheme: ColorScheme::default(),
hue_rotation: 0.0,
}
}
}