feat(ui): MAIN and ADVANCED pages, Anvil main page around Mode, Split and Sub level
Producers found the panels crowded: every control had the same weight. The header now carries a MAIN / ADVANCED switch (common-ui header_paged). The main page keeps the controls a first result needs; the advanced page shows everything, as before. - Anvil: Mode (Replace or Enhance), Split and Sub level, plus Octave, Ghost, Keep and Output. Kick lock, Dynamics, Drive, Glide, Phase, Gate and the pitch switches move to Advanced. The note readout says when the original sub plays because tracking is unsure. - Lathe, Temper, Knurl, Planish, Braze: tracking and fine-tuning controls (Gate, Smooth, Snap, Harmonics, Push at, Floor, Bright, Normalize, band gains, Phase) move to Advanced. Lathe labels the octaves of the note in Hz on the harmonic axis. - Forge passes the page to its module pages. - Weld: the main page shows the level won back at full height, Mode, Response and Output; the phase plot, Sections, Low, High and Gate move to Advanced. - editor-check renders the advanced pages with --advanced.
This commit is contained in:
1 parent
d6939a753a
commit
01fd3241eb
10 files changed
+594
-227
No files matched your search
+67
-56
@@ -18,12 +18,15 @@ pub struct State {
|
||||
/// True while a pointer button is held, so knob drags become one host gesture.
|
||||
pub gesture_active: bool,
|
||||
pub help: String,
|
||||
/// The advanced page shows its extra controls. Not saved.
|
||||
pub advanced: bool,
|
||||
}
|
||||
impl Default for State {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
analyzer: AnalyzerFrame::default(),
|
||||
gesture_active: false,
|
||||
advanced: false,
|
||||
help: DEFAULT_HELP.into(),
|
||||
}
|
||||
}
|
||||
@@ -70,7 +73,8 @@ pub fn show(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
state.help = DEFAULT_HELP.into();
|
||||
state.gesture_active = ui.input(|i| i.pointer.any_down());
|
||||
ui.add_space(2.);
|
||||
header(ui, "KNURL", "CYCLE TEXTURE", |ui| {
|
||||
let mut advanced = state.advanced;
|
||||
header_paged(ui, "KNURL", "CYCLE TEXTURE", Some(&mut advanced), |ui| {
|
||||
let r = ui
|
||||
.selectable_label(settings.bypass, RichText::new("BYPASS").size(13.))
|
||||
.on_hover_text("Crossfade to the delayed dry signal.");
|
||||
@@ -82,6 +86,7 @@ pub fn show(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
pitch_from(ui, &mut mode, &mut settings.pitch);
|
||||
settings.source = Source::from_mode(mode);
|
||||
});
|
||||
state.advanced = advanced;
|
||||
body(ui, settings, state);
|
||||
ui.separator();
|
||||
ui.label(RichText::new(&state.help).color(MUTED));
|
||||
@@ -397,20 +402,11 @@ fn controls(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
hint(&plus, state, help);
|
||||
});
|
||||
ui.add_space(4.);
|
||||
ui.columns(10, |c| {
|
||||
let advanced = state.advanced;
|
||||
ui.columns(if advanced { 10 } else { 5 }, |c| {
|
||||
knob(
|
||||
&mut c[0],
|
||||
state,
|
||||
"Edge",
|
||||
&mut settings.edge,
|
||||
5. ..=50.,
|
||||
d.edge,
|
||||
" %",
|
||||
"How soft each step change is, as a share of a cycle. Low is sharper and buzzier.",
|
||||
);
|
||||
knob(
|
||||
&mut c[1],
|
||||
state,
|
||||
"Level",
|
||||
&mut settings.level_jitter,
|
||||
0. ..=6.,
|
||||
@@ -419,7 +415,7 @@ fn controls(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
"Random level per cycle: a rough, living surface.",
|
||||
);
|
||||
knob(
|
||||
&mut c[2],
|
||||
&mut c[1],
|
||||
state,
|
||||
"Time",
|
||||
&mut settings.time_jitter,
|
||||
@@ -429,7 +425,7 @@ fn controls(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
"Random timing per cycle, in percent of a period: rattle and scrape.",
|
||||
);
|
||||
knob(
|
||||
&mut c[3],
|
||||
&mut c[2],
|
||||
state,
|
||||
"Grit",
|
||||
&mut settings.grit,
|
||||
@@ -438,48 +434,63 @@ fn controls(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
" dB",
|
||||
"Level of the noise burst in each cycle, relative to the input. Fully left is off.",
|
||||
);
|
||||
let at = if advanced {
|
||||
knob(
|
||||
&mut c[3],
|
||||
state,
|
||||
"Edge",
|
||||
&mut settings.edge,
|
||||
5. ..=50.,
|
||||
d.edge,
|
||||
" %",
|
||||
"How soft each step change is, as a share of a cycle. Low is sharper and buzzier.",
|
||||
);
|
||||
knob(
|
||||
&mut c[4],
|
||||
state,
|
||||
"Tone",
|
||||
&mut settings.tone,
|
||||
4. ..=64.,
|
||||
d.tone,
|
||||
" ×f0",
|
||||
"Lowest frequency of the grit, in harmonics of the note.",
|
||||
);
|
||||
knob(
|
||||
&mut c[5],
|
||||
state,
|
||||
"Position",
|
||||
&mut settings.position,
|
||||
0. ..=100.,
|
||||
d.position,
|
||||
" %",
|
||||
"Where in the cycle the grit burst sits.",
|
||||
);
|
||||
knob(
|
||||
&mut c[6],
|
||||
state,
|
||||
"Length",
|
||||
&mut settings.length,
|
||||
2. ..=50.,
|
||||
d.length,
|
||||
" %",
|
||||
"Length of the grit burst, as a share of a cycle.",
|
||||
);
|
||||
knob(
|
||||
&mut c[7],
|
||||
state,
|
||||
"Gate",
|
||||
&mut settings.gate,
|
||||
-60. ..=-20.,
|
||||
d.gate,
|
||||
" dB",
|
||||
"Input level that counts as a note (AUDIO). Raise it if tails retrigger.",
|
||||
);
|
||||
8
|
||||
} else {
|
||||
3
|
||||
};
|
||||
knob(
|
||||
&mut c[4],
|
||||
state,
|
||||
"Tone",
|
||||
&mut settings.tone,
|
||||
4. ..=64.,
|
||||
d.tone,
|
||||
" ×f0",
|
||||
"Lowest frequency of the grit, in harmonics of the note.",
|
||||
);
|
||||
knob(
|
||||
&mut c[5],
|
||||
state,
|
||||
"Position",
|
||||
&mut settings.position,
|
||||
0. ..=100.,
|
||||
d.position,
|
||||
" %",
|
||||
"Where in the cycle the grit burst sits.",
|
||||
);
|
||||
knob(
|
||||
&mut c[6],
|
||||
state,
|
||||
"Length",
|
||||
&mut settings.length,
|
||||
2. ..=50.,
|
||||
d.length,
|
||||
" %",
|
||||
"Length of the grit burst, as a share of a cycle.",
|
||||
);
|
||||
knob(
|
||||
&mut c[7],
|
||||
state,
|
||||
"Gate",
|
||||
&mut settings.gate,
|
||||
-60. ..=-20.,
|
||||
d.gate,
|
||||
" dB",
|
||||
"Input level that counts as a note (AUDIO). Raise it if tails retrigger.",
|
||||
);
|
||||
knob(
|
||||
&mut c[8],
|
||||
&mut c[at],
|
||||
state,
|
||||
"Mix",
|
||||
&mut settings.mix,
|
||||
@@ -489,7 +500,7 @@ fn controls(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
"Blend with the delayed dry signal.",
|
||||
);
|
||||
knob(
|
||||
&mut c[9],
|
||||
&mut c[at + 1],
|
||||
state,
|
||||
"Output",
|
||||
&mut settings.output,
|
||||
|
||||
Reference in new issue
Block a user