Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
**/.DS_Store
101 changes: 0 additions & 101 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ version = "0.1.0"

[dependencies]
anyhow = "*"
clap = "*"
cpal = "*"
eframe = "0.23.0"
egui_plot = "0.23.0"
interpolation = "0.2.0"
rand = "*"
ringbuf = "*"
rtrb = "0.2"
Expand Down
1 change: 1 addition & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Roadmap
* Presets.
* Routing and modulation system (dynamic? macros?)
* Voices.
* Use lenses for state selectors.

## Oscillators
* Anti-aliasing.
Expand Down
14 changes: 7 additions & 7 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ impl SynthApp {
impl SynthState {
pub fn new() -> Self {
SynthState {
osc_freq: 440.0,
osc_freq: 440,
amp: 1.0,
mod_freq: 440.0,
mod_freq: 440,
osc_mix: 0.0,
mod_amount: 0.0,
sh_rate: 0.0,
Expand Down Expand Up @@ -112,9 +112,9 @@ impl PlotState {

#[derive(Copy, Clone)]
pub struct SynthState {
pub osc_freq: f32,
pub osc_freq: u32,
pub amp: f32,
pub mod_freq: f32,
pub mod_freq: u32,
pub osc_mix: f32,
pub mod_amount: f32,
pub sh_rate: f32,
Expand Down Expand Up @@ -184,7 +184,7 @@ impl eframe::App for SynthApp {
ui.add(
egui::Slider::new(
&mut self.state.osc_freq,
20f32..=8000f32,
2..=16000,
)
.suffix("Hz")
.smart_aim(false),
Expand Down Expand Up @@ -215,7 +215,7 @@ impl eframe::App for SynthApp {
ui.add(
egui::Slider::new(
&mut self.state.mod_freq,
2f32..=4000f32,
2..=16000,
)
.suffix("Hz")
.smart_aim(false),
Expand Down Expand Up @@ -342,7 +342,7 @@ impl eframe::App for SynthApp {
.height(100.0)
.show(ui, |plot_ui| plot_ui.line(line));
});

// Publish updated state to the UI thread.
let _ = self.state_tx.push(self.state);

Expand Down
Loading
Loading