项目作者: musikinformatik

项目描述 :
Generic additive synthesis is a generalisation of additive sound synthesis.
高级语言:
项目地址: git://github.com/musikinformatik/Generic-Additive-Synthesis.git


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

Here we provide some examples from the article and will add more in the future.

A few simple examples, using SuperCollider:

Simple case of concatenative frequency (phase) modulation (p. 273)

  1. (
  2. Ndef(\g, {
  3. var combinator = { |a, b| a <> b }; // operator: function composition
  4. var c = { |i| LFTri.ar(1 / i, 1 / i).range(-1, 1).max(0) }; // spectrum: time varying
  5. var g = { |x, i|
  6. SinOsc.ar(i * 40, x * 3) // basis: sine function that takes a modulated phase argument
  7. };
  8. var n = (1..12); // number of operands
  9. n.inject(0, { |x, i| // inject is also known as left fold. Base case is 0 here
  10. g.(x, i) * c.(i) + (x * (1 - c.(i))) // this is so we get 0 as the neutral element
  11. }) * 0.1
  12. }).play;
  13. )

sound_examples/example_1.flac

Generic additive synthesis with a sine basis and addition (p. 271)

  1. (
  2. Ndef(\g, {
  3. var combinator = { |a, b| a + b }; // operator: just binary sum here
  4. var c = { |i| 1 / ((i % 7) + (i % 8) + (i % 11) + 1) }; // spectrum: jagged static shape
  5. var g = { |i|
  6. SinOsc.ar(110 * i) * c.(i); // basis: sine function
  7. };
  8. var z = (1..30); // number of operands
  9. var set = z.collect { |i| g.(i) }; // sequence
  10. // combine and scale output:
  11. set.reduce(combinator) ! 2 * (1 / z.size)
  12. }).play;
  13. )

sound_examples/example_2.flac

Generic additive synthesis with a more complicated basis and a product combinator (p. 271)

  1. (
  2. Ndef(\g, {
  3. var combinator = { |a, b| a * b }; // operator: product function
  4. var c = { |i| 8 / i }; // spectrum: linear
  5. var g = { |i| // basis: phase modulated pulses
  6. var cn = c.(i);
  7. var y1 = SinOsc.ar(120 * i, SinOsc.ar(cn * 10 * i) * (1/i));
  8. var y2 = LFPulse.kr(cn, 0, SinOsc.ar(cn * i, i, 0.2, 0.3));
  9. y1 * y2 * cn + 1
  10. };
  11. var n = (1..12); // number of operands
  12. var set = n.collect { |i| g.(i) }; // sequence
  13. LeakDC.ar(set.reduce(combinator) * (0.01 / n.size)).tanh * 0.1 ! 2 // tanh projects the final output into range
  14. }).play;
  15. )

sound_examples/example_3.flac

Modifications of the examples from the article

Generic additive synthesis with a sine basis and addition, interactively control the spectral shape

  1. (
  2. Ndef(\g, {
  3. var x = MouseX.kr(0, 50);
  4. var y = MouseY.kr(0, 10);
  5. var combinator = { |a, b| a + b }; // operator: just binary sum here
  6. var c = { |i| // spectrum: jagged dynamic shape
  7. i = i * y + x;
  8. 1 / (((i % 7) + (i % 8) + (i % 11)).max(0) + 1)
  9. };
  10. var g = { |i|
  11. SinOsc.ar(50 * i) * (100 / i) * c.(i); // basis: sine function
  12. };
  13. var z = (1..100); // number of operands
  14. var set = z.collect { |i| g.(i) }; // sequence
  15. // combine and scale output:
  16. set.reduce(combinator) ! 2 * (1 / z.size)
  17. }).play;
  18. )

sound_examples/example_4.flac

Steno

Another example, using the Steno embedded language:

  1. t = Steno.push(8); // a small 8 channel spectrum
  2. // definition of a spectrum composition operator G
  3. (
  4. t.filter(\G, { |in, envir|
  5. var r = \rotate.kr(0);
  6. in = in.collect { |x| PanAz.ar(in.size, x, 2*r/in.size) }.sum;
  7. SinOsc.ar((100 / (\index.kr + 1)), in * 2)
  8. });
  9. // the last node mixes down to stereo
  10. t.filter('.', { |in|
  11. Splay.ar(in)
  12. })
  13. );
  14. --GGGGG.
  15. t.setGlobal(\index, { |i| i + 1 });

sound_examples/example_5.flac