Skip to content

Commit

Permalink
v0.6.0 Improved SVF (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
danigb authored Sep 9, 2024
1 parent ce9291d commit fa16050
Show file tree
Hide file tree
Showing 32 changed files with 587 additions and 281 deletions.
29 changes: 25 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
# synthlet

## 0.6.0

### Minor Changes

- d9ae8bf: State Variable Filter improvements:

- It uses a better algorithm (by Andrew Simper and Freq Anton Corvest)
- `frequency` is now a a-rate parameter suitable for modulation
- Renamed `resonance` to `Q` to match Web Audio API standard

### Patch Changes

- Updated dependencies [d9ae8bf]
- @synthlet/state-variable-filter@0.2.0

## 0.5.0

- New chorus @synthlet/chorus

- Updated dependencies
- @synthlet/chorus@0.1.0
- @synthlet/chorus-t@0.1.1

## 0.4.0

- New @synthlet/arp package
- New arpeggiator @synthlet/arp package

## 0.3.0

- New reverb @synthlet/dattorro-reverb
- Function `registerSynthlet` renamed to `registerAllWorklets`

- Initial release of:
- @synthlet/dattorro-reverb@0.1.0

## 0.2.0

- Initial release of the following modules:
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Collection of synth modules implemented as AudioWorklets.
import {
registerAllWorklets,
AdsrAmp,
StateVariableFilter,
StateVariableFilterType,
Svf,
SvfType,
PolyblepOscillator
} from "synthlet";

Expand All @@ -18,8 +18,8 @@ await registerAllWorklets(ac);

// Simplest synth: Oscillator -> Filter -> Amplifier
const osc = PolyblepOscillator(ac, { frequency: 440 });
const filter = StateVariableFilter(ac, {
type: StateVariableFilterType.LowPass
const filter = Svf(ac, {
type: SvfType.LowPass
frequency: 4000,
});
const amp = AdsrAmp(ac, { attack: 0.1, release: 0.5 });
Expand Down Expand Up @@ -84,7 +84,6 @@ This library wouldn't be possible with all the people writing books, blog posts
- https://github.com/BillyDM/awesome-audio-dsp
- https://paulbatchelor.github.io/sndkit/algos/
- https://www.musicdsp.org/
- [Cytomic technical papers](https://cytomic.com/technical-papers/) specially famous for its [State Variable Filters](https://cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf)
- [Signalsmith Audio blog](https://signalsmith-audio.co.uk/writing/)
- [Valhalla DSP Blog](https://valhalladsp.com/category/learn/plugin-design-learn/)
- http://synthworks.eu/ - DIY Synthetizers
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"test": "jest --coverage",
"test:ci": "npm run api && npm run build && npm run test",
"processors": "find ./packages -name 'processor.ts' -exec wc -m {} +",
"bump": "changeset version && npm run publish:prepare",
"publish:prepare": "cp README.md packages/synthlet && cp packages/synthlet/CHANGELOG.md CHANGELOG.md"
},
"packageManager": "npm@7.21.0"
Expand Down
8 changes: 8 additions & 0 deletions packages/state-variable-filter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @synthlet/state-variable-filter

## 0.2.0

- State Variable Filter improvements:

- It uses a better algorithm (by Andrew Simper and Freq Anton Corvest)
- `frequency` is now a a-rate parameter suitable for modulation
- Renamed `resonance` to `Q` to match Web Audio API standard

## 0.1.0

- Initial release
Expand Down
2 changes: 1 addition & 1 deletion packages/state-variable-filter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@synthlet/state-variable-filter",
"version": "0.1.0",
"version": "0.2.0",
"description": "State Variable Filter module for synthlet",
"keywords": [
"modular",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,50 +27,50 @@ Float32Array [

exports[`SVFilter filters the signal 2`] = `
Float32Array [
-7.058988571166992,
-96.1963882446289,
-933.3245239257812,
-7950.83740234375,
-63193.6796875,
-481030.5,
-3555095.5,
-25716442,
-183016032,
-1285889280,
-8941918208,
-61654106112,
-422081658880,
-2872091344896,
-19441708433408,
-131008733118464,
-879299460595712,
-5880895244337152,
-39209108632502270,
-260680291251650560,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
]
`;

exports[`SVFilter filters the signal 3`] = `
Float32Array [
-1728730658831859700,
-11437933590730506000,
-75519349223376030000,
-497665280641740050000,
-3.2738075880989456e+21,
-2.150135330517005e+22,
-1.4100311966854957e+23,
-9.233990443912205e+23,
-6.03935217634656e+24,
-3.9452060773814655e+25,
-2.574315262255496e+26,
-1.6780219466165328e+27,
-1.0927115680685831e+28,
-7.109042947525591e+28,
-4.621019964675439e+29,
-3.001284075478557e+30,
-1.9477740115635436e+31,
-1.263136567931854e+32,
-8.18576013175832e+32,
-5.3012721012231e+33,
29.75,
9.75,
3.608224830031759e-15,
8.326672684688674e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
2.7755575615628914e-17,
]
`;
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ exports[`ProcessorNode has parameter descriptors 1`] = `
{
"automationRate": "k-rate",
"defaultValue": 1,
"maxValue": 3,
"maxValue": 10,
"minValue": 0,
"name": "type",
},
{
"automationRate": "k-rate",
"automationRate": "a-rate",
"defaultValue": 1000,
"maxValue": 20000,
"minValue": 20,
"name": "frequency",
},
{
"automationRate": "k-rate",
"defaultValue": 1,
"defaultValue": 0.5,
"maxValue": 40,
"minValue": 0,
"name": "resonance",
"minValue": 0.025,
"name": "Q",
},
]
`;
Loading

0 comments on commit fa16050

Please sign in to comment.