Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/musikinformatik/Generic-Additive-Synthesis
Generic additive synthesis is a generalisation of additive sound synthesis.
https://github.com/musikinformatik/Generic-Additive-Synthesis
sound
Last synced: about 1 month ago
JSON representation
Generic additive synthesis is a generalisation of additive sound synthesis.
- Host: GitHub
- URL: https://github.com/musikinformatik/Generic-Additive-Synthesis
- Owner: musikinformatik
- Created: 2017-06-03T19:37:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-27T08:18:28.000Z (over 3 years ago)
- Last Synced: 2024-08-02T19:32:02.365Z (4 months ago)
- Topics: sound
- Homepage: https://link.springer.com/chapter/10.1007/978-3-319-47337-6_27
- Size: 8.45 MB
- Stars: 21
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-open-synth - Generic Additive Synthesis
README
# Generic Additive Synthesis
Julian Rohrhuber and Juan Sebastián Lach Lau.
A generalisation of additive synthesis, as described in our article [Generic Additive Synthesis. Hints from the Early Foundational Crisis in Mathematics for Experiments in Sound Ontology](https://link.springer.com/chapter/10.1007/978-3-319-47337-6_27)
Here we provide some examples from the article and will add more in the future.
A few simple examples, using [SuperCollider](https://github.com/supercollider/supercollider):
## Simple case of concatenative frequency (phase) modulation (p. 273)
```supercollider
(
Ndef(\g, {
var combinator = { |a, b| a <> b }; // operator: function composition
var c = { |i| LFTri.ar(1 / i, 1 / i).range(-1, 1).max(0) }; // spectrum: time varying
var g = { |x, i|
SinOsc.ar(i * 40, x * 3) // basis: sine function that takes a modulated phase argument
};
var n = (1..12); // number of operands
n.inject(0, { |x, i| // inject is also known as left fold. Base case is 0 here
g.(x, i) * c.(i) + (x * (1 - c.(i))) // this is so we get 0 as the neutral element
}) * 0.1
}).play;
)
```[sound_examples/example_1.flac](sound_examples/example_1.flac?raw=true)
## Generic additive synthesis with a sine basis and addition (p. 271)
```supercollider
(
Ndef(\g, {var combinator = { |a, b| a + b }; // operator: just binary sum here
var c = { |i| 1 / ((i % 7) + (i % 8) + (i % 11) + 1) }; // spectrum: jagged static shape
var g = { |i|
SinOsc.ar(110 * i) * c.(i); // basis: sine function
};
var z = (1..30); // number of operands
var set = z.collect { |i| g.(i) }; // sequence
// combine and scale output:
set.reduce(combinator) ! 2 * (1 / z.size)}).play;
)
```[sound_examples/example_2.flac](sound_examples/example_2.flac?raw=true)
## Generic additive synthesis with a more complicated basis and a product combinator (p. 271)```supercollider
(
Ndef(\g, {
var combinator = { |a, b| a * b }; // operator: product function
var c = { |i| 8 / i }; // spectrum: linear
var g = { |i| // basis: phase modulated pulses
var cn = c.(i);
var y1 = SinOsc.ar(120 * i, SinOsc.ar(cn * 10 * i) * (1/i));
var y2 = LFPulse.kr(cn, 0, SinOsc.ar(cn * i, i, 0.2, 0.3));
y1 * y2 * cn + 1
};
var n = (1..12); // number of operands
var set = n.collect { |i| g.(i) }; // sequence
LeakDC.ar(set.reduce(combinator) * (0.01 / n.size)).tanh * 0.1 ! 2 // tanh projects the final output into range
}).play;
)
```[sound_examples/example_3.flac](sound_examples/example_3.flac?raw=true)
## Modifications of the examples from the article### Generic additive synthesis with a sine basis and addition, interactively control the spectral shape
```supercollider
(
Ndef(\g, {
var x = MouseX.kr(0, 50);
var y = MouseY.kr(0, 10);
var combinator = { |a, b| a + b }; // operator: just binary sum here
var c = { |i| // spectrum: jagged dynamic shape
i = i * y + x;
1 / (((i % 7) + (i % 8) + (i % 11)).max(0) + 1)
};
var g = { |i|
SinOsc.ar(50 * i) * (100 / i) * c.(i); // basis: sine function
};
var z = (1..100); // number of operands
var set = z.collect { |i| g.(i) }; // sequence
// combine and scale output:
set.reduce(combinator) ! 2 * (1 / z.size)}).play;
)
```[sound_examples/example_4.flac](sound_examples/example_4.flac?raw=true)
### Steno
Another example, using the [Steno](https://github.com/telephon/Steno) embedded language:
```supercollider
t = Steno.push(8); // a small 8 channel spectrum
// definition of a spectrum composition operator G
(
t.filter(\G, { |in, envir|
var r = \rotate.kr(0);
in = in.collect { |x| PanAz.ar(in.size, x, 2*r/in.size) }.sum;
SinOsc.ar((100 / (\index.kr + 1)), in * 2)
});// the last node mixes down to stereo
t.filter('.', { |in|
Splay.ar(in)
})
);--GGGGG.
t.setGlobal(\index, { |i| i + 1 });
```
[sound_examples/example_5.flac](sound_examples/example_5.flac?raw=true)