Encoding Modulation and Harmonicity Channel

For a synth tone, the modulator’s pitch can be adjusted using modulation index (FM/AM) or harmonicity (AM) channels.

The higher the modulation index is, the more warping the sound is.

On the other hand, be careful using the harmonicity channel because it is not linear. An integer harmonicity value that provides a more harmonious sound than non-integer values. If you are familiar with harmony theory, multiples of 1, 2, 1.5, and 1.33 work better in this order while multiples of 1.25, 1.2 are not good.

Both values must be greater than 0.

Modulation (index) for FM synth

The modulation channel for an FM synth tone encodes the modulation index defined as the ratio of modulator’s amplitude to modulator’s frequency.

Usage pattern

JSON

{
  ...
  "synth": [
    {
      "name": "Fm1",
      "type": "FM",
      "modulatorVolume": 50,
      ...
    }
  ],
  "tone": {
    "type": "Fm1",
    "continued": false
  },
  "encoding" : {
    "modulation": {
      "field": "Body Mass (g)",
      "type": "quantitative",
      "scale": {
        "doamin": [0, 7000], // optional
        "range": [0, 10]
      }
    }
  }
  ...
}

JavaScript

let stream = new Erie.Stream();
...

let synth = new Erie.SynthTone("Fm1");
synth.modulatorVolume(50);
stream.synth.add(synth);
...
stream.tone.set(synth);
stream.encoding.modulation.field("Body Mass (g)", "quantitative");
stream.encoding.modulation.scale("domain", [0, 7000]); // optinal
stream.encoding.modulation.scale("range", [0, 10]);
...

Modulation (index) for AM synth

The modulation channel for an AM tone encodes the modulation index defined as modulator’s amplitude / carrier’s amplitude.

Usage pattern

JSON

{
  ...
  "synth": [
    {
      "name": "Am1",
      "type": "AM",
      ...
    }
  ],
  "tone": {
    "type": "Am1",
    "continued": false
  },
  "encoding" : {
    "modulation": {
      "field": "Body Mass (g)",
      "type": "quantitative",
      "scale": {
        "doamin": [0, 7000], // optional
        "range": [10, 500]
      }
    }
  }
  ...
}

JavaScript

let stream = new Erie.Stream();
...

let synth = new Erie.SynthTone("Am1");
synth.type("AM");
stream.synth.add(synth);
...
stream.tone.set(synth);
stream.encoding.modulation.field("Body Mass (g)", "quantitative");
stream.encoding.modulation.scale("domain", [0, 7000]); // optinal
stream.encoding.modulation.scale("range", [10, 500]);
...

Harmonicity

The harmonicity channel encodes the harmoniy between the (pitch) frequencies of the carrier and moudlator. Harmonicity of 1 equivalents to one octave scale. This only available for an AM synth.

pitch usage pattern

JSON

{
  ...
  "synth": [
    {
      "name": "Am1",
      "type": "AM"
      ...
    }
  ],
  "tone": {
    "type": "Am1",
    "continued": false
  },
  "encoding" : {
    "harmonicity": {
      "field": "Body Mass (g)",
      "type": "quantitative",
      "scale": {
        "doamin": [0, 7000], // optional
        "range": [0, 1]
      }
    }
  }
  ...
}

JavaScript

let stream = new Erie.Stream();
...

let synth = new Erie.SynthTone("Am1");
synth.type('AM');
stream.synth.add(synth);
...
stream.tone.set(synth);
stream.encoding.harmonicity.field("Body Mass (g)", "quantitative");
stream.encoding.harmonicity.scale("domain", [0, 7000]); // optinal
stream.encoding.harmonicity.scale("range", [0, 1]);
...
© Hyeok Kim