Skip to content

Instantly share code, notes, and snippets.

@bignimbus
Last active August 29, 2015 13:58
Show Gist options
  • Save bignimbus/10045557 to your computer and use it in GitHub Desktop.
Save bignimbus/10045557 to your computer and use it in GitHub Desktop.
Initial impression of a standard json container for Web Audio API sound synthesis information portability.
{
"name" : "Fun Song",
"instruments" : {
"funSound" : {
"sources" : {
"1" : "sine",
"2" : "sine",
},
"envelope": {
"attack" : 0,
"decay" : 0,
"sustain" : 1,
"hold" : 1,
"release" : 0.5
},
"filters" : {
"1" : {
"type" : "square",
"frequency" : 400,
"q" : 20,
"env" : {
"frequency" : 1000,
"attack" : 0
}
}
},
"vibrato" : {
"shape" : "triangle",
"magnitude" : 2,
"speed" : 3,
"attack" : 0
},
"tremolo" : {
"shape" : "sawtooth",
"magnitude" : 2,
"speed" : 3,
"attack" : 0
}
},
"unFunSound" : {
"source" : "sine",
"envelope" : {
"attack" : 0,
"decay" : 0,
"sustain" : 1,
"hold" : 1,
"release" : 0.5
},
"filter" : {
"type" : "square",
"frequency" : 400,
"q" : 20,
"env" : {
"frequency" : 1000,
"attack" : 0
},
},
"vibrato" : {
"shape" : "triangle",
"magnitude" : 2,
"speed" : 3,
"attack" : 0
},
"tremolo" : {
"shape" : "sawtooth",
"magnitude" : 2,
"speed" : 3,
"attack" : 0
}
},
},
"sequence" : {
"tempo" : 120, //bpm
"beatsPerMeasure" : 4,
"measures" : {
"1" : {
"note" : {
"duration" : 1,
"pitch" : "A4"
},
"note" : {
"duration" : 3,
"pitch" : "B4"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment