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
+65
-46
@@ -14,12 +14,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(),
|
||||
}
|
||||
}
|
||||
@@ -194,18 +197,26 @@ 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, "BRAZE", "TEMPO-LOCKED BEATING", |ui| {
|
||||
let r = ui
|
||||
.selectable_label(settings.bypass, RichText::new("BYPASS").size(13.))
|
||||
.on_hover_text("Crossfade to the delayed dry signal.");
|
||||
if r.clicked() {
|
||||
settings.bypass = !settings.bypass;
|
||||
}
|
||||
ui.separator();
|
||||
let mut mode = settings.source.mode();
|
||||
pitch_from(ui, &mut mode, &mut settings.pitch);
|
||||
settings.source = Source::from_mode(mode);
|
||||
});
|
||||
let mut advanced = state.advanced;
|
||||
header_paged(
|
||||
ui,
|
||||
"BRAZE",
|
||||
"TEMPO-LOCKED BEATING",
|
||||
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.");
|
||||
if r.clicked() {
|
||||
settings.bypass = !settings.bypass;
|
||||
}
|
||||
ui.separator();
|
||||
let mut mode = settings.source.mode();
|
||||
pitch_from(ui, &mut mode, &mut settings.pitch);
|
||||
settings.source = Source::from_mode(mode);
|
||||
},
|
||||
);
|
||||
state.advanced = advanced;
|
||||
ui.add_space(6.);
|
||||
let frame = state.analyzer;
|
||||
ui.horizontal_top(|ui| {
|
||||
@@ -319,7 +330,8 @@ fn controls(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
});
|
||||
ui.add_space(8.);
|
||||
ui.separator();
|
||||
ui.columns(6, |c| {
|
||||
let advanced = state.advanced;
|
||||
ui.columns(if advanced { 6 } else { 4 }, |c| {
|
||||
knob(
|
||||
&mut c[0],
|
||||
state,
|
||||
@@ -355,30 +367,35 @@ fn controls(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
"Moves the right channel's beat against the left. 100 %: one side peaks while \
|
||||
the other nulls. Check the mono sum.",
|
||||
);
|
||||
let at = if advanced {
|
||||
knob(
|
||||
&mut c[3],
|
||||
state,
|
||||
"Phase",
|
||||
&mut settings.phase,
|
||||
0. ..=360.,
|
||||
d.phase,
|
||||
"°",
|
||||
72.,
|
||||
"Where the beat peaks. 0° puts the peak of the chosen harmonic on the beat.",
|
||||
);
|
||||
knob(
|
||||
&mut c[4],
|
||||
state,
|
||||
"Gate",
|
||||
&mut settings.gate,
|
||||
-60. ..=-20.,
|
||||
d.gate,
|
||||
" dB",
|
||||
72.,
|
||||
"Input level that counts as a note. Raise it if tails retrigger.",
|
||||
);
|
||||
5
|
||||
} else {
|
||||
3
|
||||
};
|
||||
knob(
|
||||
&mut c[3],
|
||||
state,
|
||||
"Phase",
|
||||
&mut settings.phase,
|
||||
0. ..=360.,
|
||||
d.phase,
|
||||
"°",
|
||||
72.,
|
||||
"Where the beat peaks. 0° puts the peak of the chosen harmonic on the beat.",
|
||||
);
|
||||
knob(
|
||||
&mut c[4],
|
||||
state,
|
||||
"Gate",
|
||||
&mut settings.gate,
|
||||
-60. ..=-20.,
|
||||
d.gate,
|
||||
" dB",
|
||||
72.,
|
||||
"Input level that counts as a note. Raise it if tails retrigger.",
|
||||
);
|
||||
knob(
|
||||
&mut c[5],
|
||||
&mut c[at],
|
||||
state,
|
||||
"Output",
|
||||
&mut settings.output,
|
||||
@@ -389,15 +406,17 @@ fn controls(ui: &mut egui::Ui, settings: &mut Settings, state: &mut State) {
|
||||
"Output trim.",
|
||||
);
|
||||
});
|
||||
ui.add_space(4.);
|
||||
let r = ui.selectable_label(settings.snap, RichText::new("SNAP TO SEMITONE").size(13.));
|
||||
if r.clicked() {
|
||||
settings.snap = !settings.snap;
|
||||
if state.advanced {
|
||||
ui.add_space(4.);
|
||||
let r = ui.selectable_label(settings.snap, RichText::new("SNAP TO SEMITONE").size(13.));
|
||||
if r.clicked() {
|
||||
settings.snap = !settings.snap;
|
||||
}
|
||||
hint(
|
||||
&r,
|
||||
state,
|
||||
"Round the detected pitch. Off keeps the copy's jumps on the real period, which is \
|
||||
seamless on detuned patches.",
|
||||
);
|
||||
}
|
||||
hint(
|
||||
&r,
|
||||
state,
|
||||
"Round the detected pitch. Off keeps the copy's jumps on the real period, which is \
|
||||
seamless on detuned patches.",
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user