Skip to content

Commit

Permalink
Rewrite.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamiPerttu committed Jun 8, 2024
1 parent 9d44466 commit 3c04914
Show file tree
Hide file tree
Showing 65 changed files with 8,049 additions and 8,062 deletions.
20 changes: 20 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
## Changes

### Version 0.18 (Next Version)

- This release involves a major rewrite and many changes.
- 64-bit sample support is gone. All samples are now `f32`.
- The 64-bit prelude presents a 32-bit interface now, with 64-bit internal state.
- All types and traits with `32/64` suffix are replaced with the 32-bit version with the suffix removed.
- Explicit SIMD support in block processing via the `wide` crate.
- `no_std` support can be enabled by disabling the `std` feature.
- Buffers for the `process` method have been rewritten. Both stack and heap allocation is supported.
- Settings have been rewritten, to make them compatible with the `AudioUnit` system.
- Waveshaping is done using a trait now. Remove `Shape::` prefix from shapes to migrate,
except for `AdaptiveTanh`, which is created using `AdaptiveTanh::new`.
- The `Atan` shape was tweaked to return values in -1...1 while retaining a slope of 1 at the origin.
- Asymmetric follow filters are now explicitly declared: `follow((a, r))` is now `afollow(a, r)`.
- Functions corresponding to operators are now available as an option, for example, `A >> B` can now be written `pipe(A, B)`.
What used to be `pipe` etc. now has an `i` suffix, for example, `pipei`.
- `rnd` function is now `rnd1`.
- `hash` function is now `hash1`. Added new hash function `hash2`.
- Wavetable oscillator now accepts an `Arc<Wavetable>` in the constructor.

### Version 0.17

- `Wave32/64`: `silence` is now `zero`.
Expand Down
84 changes: 21 additions & 63 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "fundsp"
description = "Audio processing and synthesis library."
keywords = ["dsp", "audio", "synthesizer", "sound", "wave"]
categories = ["multimedia::audio"]
license = "MIT OR Apache-2.0"
version = "0.17.1"
authors = ["SamiPerttu <[email protected]>"]
Expand All @@ -12,83 +13,40 @@ edition = "2021"

[dependencies]
generic-array = "0.14.7"
numeric-array = "0.5.2"
num-complex = "0.4.5"
rustfft = "6.2.0"
realfft = "3.3.0"
lazy_static = "1.4.0"
tinyvec = { version = "1.6.0", features = ["alloc"] }
rsor = "0.1.4"
duplicate = "1.0.0"
numeric-array = { version = "0.5.2", default-features = false }
dyn-clone = "1.0.17"
libm = "0.2.8"
wide = "0.7.23"
num-complex = { version = "0.4.6", default-features = false, features = ["libm"] }
tinyvec = { version = "1.6.0", features = ["alloc"] }
hashbrown = "0.14.5"
microfft = { version = "0.6.0", features = ["size-32768"] }
funutd = { version = "0.15.0", default-features = false }
thingbuf = { version = "0.1.6", default-features = false, features = ["alloc"] }
once_cell = { version = "1.19.0", default-features = false, features = ["race", "alloc"] }
symphonia = { version = "0.5.4", optional = true, features = ["all"] }
thingbuf = "0.1.5"
funutd = "0.14.0"

[features]
default = ["files"]
files = ["dep:symphonia"]

[dev-dependencies]
cpal = "0.15.3"
anyhow = "1.0.82"
plotters = "0.3.5"
anyhow = "1.0.86"
criterion = "0.5.1"
cpal = "0.15.3"
assert_no_alloc = "1.1.2"
eframe = "0.27.2"
plotters = "0.3.6"
midi-msg = "0.5.0"
midir = "0.9.1"
read_input = "0.8.6"
assert_no_alloc = "1.1.2"
eframe = "0.27.2"
rayon = "1.10.0"

[features]
default = ["std", "files"]
std = []
files = ["dep:symphonia"]

[[bench]]
name = "benchmark"
harness = false

[[example]]
name = "beep"
path = "examples/beep.rs"

[[example]]
name = "peek"
path = "examples/peek.rs"

[[example]]
name = "sequence"
path = "examples/sequence.rs"

[[example]]
name = "type"
path = "examples/type.rs"

[[example]]
name = "plot"
path = "examples/plot.rs"

[[example]]
name = "file"
path = "examples/file.rs"

[[example]]
name = "grain"
path = "examples/grain.rs"

[[example]]
name = "grain2"
path = "examples/grain2.rs"

[[example]]
name = "network"
path = "examples/network.rs"

[[example]]
name = "keys"
path = "examples/keys.rs"

[[example]]
name = "optimize"
path = "examples/optimize.rs"

[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
2 changes: 1 addition & 1 deletion FUTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ This is a list of feature ideas for the future.
- More physical models. Karplus-Strong exists already; figure out if it could be improved somehow.
- Dynamic bypass wrapper that bypasses a node when input and output levels drop low enough.
- Improve basic effects implemented in graph notation such as `reverb` (e.g., early reflections), `chorus`, `flanger` and `phaser`.
- Some kind of parameter system that works with both `AudioNode` and `AudioUnit` systems. At its simplest, it could be a key-value system with a fixed set of keys.
- More sound generators in the `gen` module.
- Improve or replace the drum sounds in the library.
- Real-time safe sound server that uses `cpal`. It could have a static set of read/write channels for rendering audio, including hardware channels.
Expand All @@ -19,3 +18,4 @@ This is a list of feature ideas for the future.
- Expand `README.md` into a book.
- Time stretching / pitch shifting algorithm.
- FFT convolution engine and HRTF support.
- Fading nodes in and out when replacing a node in `Net`.
Loading

0 comments on commit 3c04914

Please sign in to comment.