Skip to content

composition.gs

Thomas Tortorini edited this page Aug 1, 2019 · 55 revisions
{
  id: "6313f4d6-1298-4ce2-a076-391b3dc12839",
  savedAt: 1558306516, // (timestamp in seconds)
  name: "My first composition",
  bpm: 120,
  stepsPerBeat: 4,
  beatsPerMeasure: 4,
  buffers: {
    "0": { type: "audio/wav", duration: 1.8111, hash: "V-00000SIZE-HAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASH" },
    "1": { type: "audio/mp3", duration: 4.0128, hash: "1-000644840-c3000494dcd794c26b60438edf7f41ecc81a70" },
  },
  effects: {
    "0": {
      toggle: true,
      name: "echo",
      gain: 1,
      data: {
            echoes: {
                  "0": { beat: .25,  gain: .8,  pan: -.5 },
                  "1": { beat: .50,  gain: .6,  pan: +.4 },
                  "2": { beat: .75,  gain: .4,  pan: -.3 },
                  "3": { beat: 1,    gain: .2,  pan: +.2 },
                  "4": { beat: 1.25, gain: .1,  pan: -.1 },
                  "5": { beat: 1.5,  gain: .05, pan: 0 },
            },
      },
    },
  },
  channels: {
    "main": { order: 0, toggle: true, name: "main",   pan: 0, gain: 1 },
    "1":    { order: 1, toggle: true, name: "chan#1", pan: 0, gain: 1, dest: "main" },
    "2":    { order: 2, toggle: true, name: "chan#2", pan: 0, gain: 1, dest: "main" },
    "3":    { order: 3, toggle: true, name: "chan#3", pan: 0, gain: 1, dest: "main" },
    "4":    { order: 4, toggle: true, name: "chan#4", pan: 0, gain: 1, dest: "main" },
  },
  patterns: {
    "0": { type: "buffer", name: "Drumloop", duration: 4, buffer: "0" },
    "1": { type: "buffer", name: "Vocal", duration: 4, buffer: "1" },
    "2": { type: "keys", name: "Melody", duration: 12, synth: "0", keys: "0" },
  },
  synths: {
    "0": {
      name: "Synth",
      oscillators: {
        "0": { gain: 1, pan:  0, detune:   0, type: "sine" },
        "1": { gain: 1, pan:  1, detune: -50, type: "triangle" },
        "2": { gain: 1, pan: -1, detune:  50, type: "sawtooth" },
        "3": { gain: 1, pan:  0, detune:   0, type: "square" },
      },
    },
  },
  keys: {
    "0": {
      "0": { when: 0,  duration: .25, gain: 1,  pan: 1,  key: 48, selected: true },
      "1": { when: 4,  duration: 2,   gain: .8, pan: -1, key: 49 },
      "2": { when: 8,  duration: 4,   gain: .2, pan: 0,  key: 50, next: "3" },
      "3": { when: 12, duration: 1,   gain: .8, pan: 0,  key: 48, prev: "2", next: "4" },
      "4": { when: 13, duration: 3,   gain: .8, pan: 0,  key: 48, prev: "3" },
    },
  },
  tracks: {
    "0": { order: 0, name: "drum",  toggle: false },
    "1": { order: 1, name: "vocal", toggle: true },
    "2": { order: 2, name: "keys",  toggle: true },
  },
  blocks: {
    "0": { pattern: "0", track: "0", when: 0, offset: 0, duration:  4 },
    "1": { pattern: "0", track: "0", when: 4, offset: 0, duration:  4 },
    "2": { pattern: "0", track: "0", when: 8, offset: 0, duration:  4 },
    "3": { pattern: "1", track: "1", when: 4, offset: 0, duration:  4 },
    "4": { pattern: "1", track: "1", when: 8, offset: 0, duration:  4 },
    "5": { pattern: "2", track: "2", when: 0, offset: 0, duration: 12 },
  },
}
Clone this wiki locally