Feat: UI/UX and ducking compressor

This commit is contained in:
2026-02-24 02:57:27 +01:00
parent 848d0e773f
commit 2de49bdeba
24 changed files with 402 additions and 71 deletions

View File

@@ -112,8 +112,7 @@ pub(super) fn handle_main_page(ctx: &mut InputContext, key: KeyEvent, ctrl: bool
ctx.dispatch(AppCommand::OpenModal(Modal::SetTempo(current)));
}
KeyCode::Char(':') => {
let current = (ctx.app.editor_ctx.step + 1).to_string();
ctx.dispatch(AppCommand::OpenModal(Modal::JumpToStep(current)));
ctx.dispatch(AppCommand::OpenModal(Modal::JumpToStep(String::new())));
}
KeyCode::Char('<') | KeyCode::Char(',') => ctx.dispatch(AppCommand::LengthDecrease),
KeyCode::Char('>') | KeyCode::Char('.') => ctx.dispatch(AppCommand::LengthIncrease),

View File

@@ -25,6 +25,17 @@ pub(crate) fn cycle_option_value(ctx: &mut InputContext, right: bool) {
OptionsFocus::ShowScope => ctx.dispatch(AppCommand::ToggleScope),
OptionsFocus::ShowSpectrum => ctx.dispatch(AppCommand::ToggleSpectrum),
OptionsFocus::ShowLissajous => ctx.dispatch(AppCommand::ToggleLissajous),
OptionsFocus::GainBoost => {
const GAINS: &[f32] = &[1.0, 2.0, 4.0, 8.0, 16.0];
let pos = GAINS.iter().position(|g| (*g - ctx.app.audio.config.gain_boost).abs() < 0.01).unwrap_or(0);
let new_pos = if right {
(pos + 1) % GAINS.len()
} else {
(pos + GAINS.len() - 1) % GAINS.len()
};
ctx.dispatch(AppCommand::SetGainBoost(GAINS[new_pos]));
}
OptionsFocus::NormalizeViz => ctx.dispatch(AppCommand::ToggleNormalizeViz),
OptionsFocus::ShowCompletion => ctx.dispatch(AppCommand::ToggleCompletion),
OptionsFocus::ShowPreview => ctx.dispatch(AppCommand::TogglePreview),
OptionsFocus::PerformanceMode => ctx.dispatch(AppCommand::TogglePerformanceMode),