Skip to content

Commit

Permalink
Merge pull request #46 from ardura/gui_update_generators
Browse files Browse the repository at this point in the history
v1.3.2 update
  • Loading branch information
ardura committed Aug 30, 2024
2 parents e4eb3d0 + 2fb94cb commit bcb83d0
Show file tree
Hide file tree
Showing 10 changed files with 1,317 additions and 752 deletions.
442 changes: 224 additions & 218 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "Actuate"
version = "1.3.1"
version = "1.3.2"
edition = "2021"
authors = ["Ardura <[email protected]>"]
license = "GPL-3.0-or-later"
Expand All @@ -19,11 +19,11 @@ hound = "3.5.0"
lazy_static = "1.4.0"

# Nih plug update
nih_plug = { git = "https://github.com/ardura/nih-plug.git", rev = "cd1c66b054a8ff7d44084369b7022a0272ac690e", features = ["assert_process_allocs"] }
nih_plug_egui = { git = "https://github.com/ardura/nih-plug.git", rev = "cd1c66b054a8ff7d44084369b7022a0272ac690e" }
nih_plug = { git = "https://github.com/ardura/nih-plug.git", rev = "de315f902d7b5a75f80bc9d4164e4485bf2b34a1", features = ["assert_process_allocs"] }
nih_plug_egui = { git = "https://github.com/ardura/nih-plug.git", rev = "de315f902d7b5a75f80bc9d4164e4485bf2b34a1" }

# egui_file fork for nih-plug/Actuate
egui_file = { git = "https://github.com/ardura/egui_file.git", rev = "03dd37a395e08d7ed224dee8d05dcd55302d7d79" }
egui_file = { git = "https://github.com/ardura/egui_file.git", rev = "33c96389cd1c5e40c5d2ece87ef7f86a1df53cb2" }

num-complex = "0.4.4"
num-traits = "0.2.17"
Expand Down
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Actuate (Latest is v1.3.1)
# Actuate (Latest is v1.3.2)
A Subtractive and Additive Synthesizer, Sampler, and Granulizer built in Rust + Nih-Plug
Written by Ardura

Expand Down Expand Up @@ -81,21 +81,6 @@ Since Actuate 1.2.8 the new file browser and UI use native text editing. This cr
- Text input works if you add "-_EnsureKeyMessagesForPlugins" to Options.txt in preferences. See https://forum.ableton.com/viewtopic.php?t=97318
- Unfortunately I don't know where this would be on Linux or Mac so I'm open to help from Ableton users!

## Roadmap
- [x] Create an additive module
- [ ] Create filter release bypass toggle
- [ ] Find more things to add here

(old items pre 1.3.0)
- [x] Create a Preset Browser
- [x] Add more reverb styles
- [x] Fix some bandpass glitching on certain filter types
- [x] Create different stereo spreading algorithms
- [x] Make the GUI nicer - see Discussion https://github.com/ardura/Actuate/discussions/26
- [x] Look into making the preset loading more reliable
- [x] Fix text input not working (right now it's a OS safe workaround)
- [x] Fix file dialog in the process thread (right now it's a OS safe workaround)

## DAWS and compatibility
- Compatible with Windows 10 and up
- Compatible with Linux
Expand Down
259 changes: 197 additions & 62 deletions src/CustomWidgets/BeizerButton.rs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/CustomWidgets/slim_checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ impl<'a> Widget for AtomicSlimCheckbox<'a> {
response.widget_info(|| {
WidgetInfo::selected(
WidgetType::Checkbox,
true,
checked.load(Ordering::SeqCst),
text.as_ref().map_or("", |x| x.text()),
)
Expand All @@ -96,6 +97,7 @@ impl<'a> Widget for AtomicSlimCheckbox<'a> {
stroke: visuals.bg_stroke,
fill_texture_id: TextureId::default(),
uv: big_icon_rect.expand(visuals.expansion),
blur_width: 0.0,
});

if checked.load(Ordering::SeqCst) {
Expand Down Expand Up @@ -171,6 +173,7 @@ impl<'a> Widget for SlimCheckbox<'a> {
response.widget_info(|| {
WidgetInfo::selected(
WidgetType::Checkbox,
true,
*checked,
text.as_ref().map_or("", |x| x.text()),
)
Expand All @@ -187,6 +190,7 @@ impl<'a> Widget for SlimCheckbox<'a> {
stroke: visuals.fg_stroke,
fill_texture_id: TextureId::default(),
uv: Rect::ZERO,
blur_width: 0.0,
});

if *checked {
Expand Down
31 changes: 15 additions & 16 deletions src/CustomWidgets/ui_knob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use lazy_static::lazy_static;
use nih_plug::prelude::{Param, ParamSetter};
use nih_plug_egui::egui::{
self,
epaint::{CircleShape, PathShape},
epaint::{CircleShape, PathShape, PathStroke},
pos2, Align2, Color32, FontId, Pos2, Rect, Response, Rgba, Rounding, Sense, Shape, Stroke, Ui,
Vec2, Widget,
};
Expand Down Expand Up @@ -437,7 +437,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: self.fill_color.linear_multiply(0.7),
stroke: outline_stroke,
stroke: outline_stroke.into(),
});
painter.add(outline_shape);
}
Expand All @@ -456,7 +456,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: arc_stroke,
stroke: arc_stroke.into(),
});
painter.add(shape);

Expand Down Expand Up @@ -520,7 +520,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g2 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.20)
Expand All @@ -540,7 +540,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g3 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.18)
Expand All @@ -560,7 +560,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g4 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.16)
Expand All @@ -580,7 +580,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g5 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.14)
Expand All @@ -600,7 +600,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g6 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.12)
Expand All @@ -620,7 +620,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g7 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.10)
Expand All @@ -640,7 +640,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g8 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.08)
Expand All @@ -660,7 +660,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g9 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.06)
Expand All @@ -680,7 +680,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g10 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.04)
Expand All @@ -700,7 +700,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: Color32::TRANSPARENT,
stroke: Stroke::new(
stroke: PathStroke::new(
ball_width * 3.0,
if g11 > 0.0 {
Color32::DARK_GRAY.gamma_multiply(0.02)
Expand All @@ -721,7 +721,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
),
closed: false,
fill: self.line_color,
stroke: Stroke::new(ball_width * 3.0, self.line_color),
stroke: PathStroke::new(ball_width * 3.0, self.line_color),
});
painter.add(line_shape);

Expand All @@ -741,8 +741,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
ui.allocate_rect(
Rect::from_center_size(center, Vec2::new(self.radius * 2.0, self.radius * 2.0)),
Sense::hover(),
)
.on_hover_text_at_pointer(self.hover_text_content);
).on_hover_text_at_pointer(self.hover_text_content);
}

// Label text from response rect bound
Expand Down
28 changes: 27 additions & 1 deletion src/actuate_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ use std::fmt;
use nih_plug::params::enums::Enum;
use serde::{Deserialize, Serialize};

#[derive(Debug, PartialEq, Enum, Clone, Copy)]
pub enum GeneratorType {
Off,
Sine,
Tri,
Saw,
RSaw,
WSaw,
SSaw,
RASaw,
Ramp,
Square,
RSquare,
Pulse,
Noise,
Sampler,
Granulizer,
Additive,
}

// Gui for which filter to display on bottom
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
Expand Down Expand Up @@ -64,8 +83,9 @@ pub enum ModulationDestination {
}

// Values for Audio Module Routing to filters
#[derive(Enum, PartialEq, Eq, Clone, Serialize, Deserialize)]
#[derive(Debug, Enum, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)]
pub enum AMFilterRouting {
UNSETROUTING,
Bypass,
Filter1,
Filter2,
Expand Down Expand Up @@ -152,4 +172,10 @@ impl fmt::Display for ModulationDestination {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}

impl fmt::Display for AMFilterRouting {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}
Loading

0 comments on commit bcb83d0

Please sign in to comment.