Skip to content

Commit

Permalink
re-organize sliders
Browse files Browse the repository at this point in the history
to prepare for new params:  channel and sync_to_host
  • Loading branch information
magnetophon committed Nov 30, 2024
1 parent e62560a commit a3e1680
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
30 changes: 15 additions & 15 deletions src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ pub fn create(editor_data: Data, editor_state: Arc<ViziaState>) -> Option<Box<dy
})
.class("row");
HStack::new(cx, |cx| {
Label::new(cx, "attack").class("slider-label");
ParamSlider::new(cx, Data::params, |params| &params.global.attack_ms)
Label::new(cx, "mutes").class("slider-label");
ParamSlider::new(cx, Data::params, |params| &params.global.mute_is_toggle)
.set_style(ParamSliderStyle::CurrentStepLabeled { even: true })
.class("widget");
})
.class("row");
Expand All @@ -95,8 +96,8 @@ pub fn create(editor_data: Data, editor_state: Arc<ViziaState>) -> Option<Box<dy
})
.class("row");
HStack::new(cx, |cx| {
Label::new(cx, "release").class("slider-label");
ParamSlider::new(cx, Data::params, |params| &params.global.release_ms)
Label::new(cx, "drive").class("slider-label");
ParamSlider::new(cx, Data::params, |params| &params.global.global_drive)
.class("widget");
})
.class("row");
Expand All @@ -105,27 +106,26 @@ pub fn create(editor_data: Data, editor_state: Arc<ViziaState>) -> Option<Box<dy

HStack::new(cx, |cx| {
HStack::new(cx, |cx| {
Label::new(cx, "drive").class("slider-label");
ParamSlider::new(cx, Data::params, |params| &params.global.global_drive)
Label::new(cx, "attack").class("slider-label");
ParamSlider::new(cx, Data::params, |params| &params.global.attack_ms)
.class("widget");
})
.class("row");
HStack::new(cx, |cx| {
Label::new(cx, "min tap").class("slider-label");
ParamSlider::new(cx, Data::params, |params| {
&params.global.min_tap_milliseconds
})
.class("widget");
Label::new(cx, "release").class("slider-label");
ParamSlider::new(cx, Data::params, |params| &params.global.release_ms)
.class("widget");
})
.class("row");
})
.class("param-group");
HStack::new(cx, |cx| {
HStack::new(cx, |cx| {
Label::new(cx, "mutes").class("slider-label");
ParamSlider::new(cx, Data::params, |params| &params.global.mute_is_toggle)
.set_style(ParamSliderStyle::CurrentStepLabeled { even: true })
.class("widget");
Label::new(cx, "min tap").class("slider-label");
ParamSlider::new(cx, Data::params, |params| {
&params.global.min_tap_milliseconds
})
.class("widget");
})
.class("row");
HStack::new(cx, |cx| {
Expand Down
31 changes: 30 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,36 @@ https://github.com/neodsp/simper-filter
TODO: research choke event, possibly clear_taps()
***************
dry/wet attack
wet release
drive min
mutes max
***************
dry/wet mutes
wet drive
attack release
min max
channel tempo_sync
***************
dry/wet wet
attack release
min max
channel tempo_sync
mutes drive
***************
dry/wet wet
attack release
mutes drive
pref:
min max
channel tempo_sync
tooltips ??
*/

// #![allow(non_snake_case)]
Expand Down

0 comments on commit a3e1680

Please sign in to comment.