From 9f6c0520e870f130102b15c3272a1942aa89ac97 Mon Sep 17 00:00:00 2001 From: argarak Date: Tue, 12 Mar 2024 14:58:02 +0000 Subject: [PATCH] add examples and stop button function --- components/app.js | 13 +- components/welcome-dialog.js | 20 +- examples/160bpm fast syncopation.blip | 41 +- ...linky thing.blip => arpeggiator demo.blip} | 548 ++++---- examples/fmblip remix.blip | 1226 +++++++++++++++++ examples/simple fm demo.blip | 44 +- 6 files changed, 1567 insertions(+), 325 deletions(-) rename examples/{fm plinky thing.blip => arpeggiator demo.blip} (89%) create mode 100644 examples/fmblip remix.blip diff --git a/components/app.js b/components/app.js index 0538f64..af654f4 100644 --- a/components/app.js +++ b/components/app.js @@ -38,6 +38,13 @@ class App extends LitElement { else btnPlay.classList.remove("active"); } + _onStopClick() { + const seq = State.sequencer(); + Tone.Transport.stop(); + seq.step = -1; + seq.requestUpdate(); + } + displayWelcome() { this.welcomeDialog = document.createElement("ui-welcome-dialog"); document.body.appendChild(this.welcomeDialog); @@ -147,7 +154,11 @@ class App extends LitElement { - diff --git a/components/welcome-dialog.js b/components/welcome-dialog.js index ddb4c1b..0acea80 100644 --- a/components/welcome-dialog.js +++ b/components/welcome-dialog.js @@ -44,6 +44,15 @@ class WelcomeDialog extends LitElement { } render() { + // + // + // + // const leftpanel = html`
${this.blipboxes}

blip— grid

@@ -54,21 +63,12 @@ class WelcomeDialog extends LitElement {
- - - -
`; @@ -86,13 +86,13 @@ class WelcomeDialog extends LitElement { // // + //
by ${example.author}
const fileElement = html` `; diff --git a/examples/160bpm fast syncopation.blip b/examples/160bpm fast syncopation.blip index 99a2b09..cdd5e4d 100644 --- a/examples/160bpm fast syncopation.blip +++ b/examples/160bpm fast syncopation.blip @@ -1,7 +1,7 @@ { "name": "160bpm fast syncopation", - "author": "argarak", - "date": 1707687502803, + "author": "", + "date": 1709729881240, "version": 0, "bpm": 160, "swing": 0, @@ -962,7 +962,6 @@ }, "Noise_5": { "volume": -79.99999999999997, - "playbackRate": 1, "type": "white" }, "Filter_6": { @@ -998,7 +997,6 @@ }, "Noise_5": { "volume": -5.999980895881677, - "playbackRate": 0, "type": "white" }, "Filter_6": { @@ -1034,7 +1032,6 @@ }, "Noise_5": { "volume": -5.999980895881677, - "playbackRate": 0, "type": "white" }, "Filter_6": { @@ -1046,7 +1043,7 @@ "3": { "Oscillator_0": { "volume": 0, - "frequency": 55, + "frequency": 46.2493028389543, "type": "square" }, "AmplitudeEnvelope_1": { @@ -1073,12 +1070,12 @@ "baseFrequency": 22 }, "Oscillator_1": { - "volume": -79.99999999999999, + "volume": -79.99999999999997, "frequency": 0, "type": "sine" }, "Oscillator_2": { - "volume": -79.99999999999999, + "volume": -79.99999999999997, "frequency": 180, "type": "sine" }, @@ -1092,7 +1089,6 @@ }, "Noise_5": { "volume": -5.999980895881677, - "playbackRate": 0, "type": "white" }, "Filter_6": { @@ -1104,7 +1100,7 @@ "5": { "Oscillator_0": { "volume": 0, - "frequency": 369.9944227116344, + "frequency": 293.6647679174076, "type": "sine" }, "AmplitudeEnvelope_1": { @@ -1113,7 +1109,7 @@ }, "Oscillator_2": { "volume": 0, - "frequency": 369.9944227116344, + "frequency": 293.6647679174076, "type": "sine" }, "Gain_3": { @@ -1123,7 +1119,7 @@ "6": { "Oscillator_0": { "volume": 0, - "frequency": 493.8833012561242, + "frequency": 587.3295358348151, "type": "triangle" }, "AmplitudeEnvelope_1": { @@ -1169,7 +1165,6 @@ }, "Noise_5": { "volume": 0, - "playbackRate": 1, "type": "white" }, "Filter_6": { @@ -1182,7 +1177,7 @@ "mixer": { "0": { "master": { - "volume": 0, + "volume": -3.2892246720947744, "pan": 0 }, "effect": { @@ -1194,7 +1189,7 @@ }, "1": { "master": { - "volume": 0, + "volume": -1.704242688311438, "pan": 0 }, "effect": { @@ -1206,7 +1201,7 @@ }, "2": { "master": { - "volume": -1.3764516236952884, + "volume": -2.6485763488138185, "pan": 0 }, "effect": { @@ -1218,11 +1213,11 @@ }, "3": { "master": { - "volume": -0.626667109343913, + "volume": -6.324815634038286, "pan": 0 }, "effect": { - "chorus": -6.2506121259349765, + "chorus": -6.250612125934976, "chebyshev": null, "reverb": null, "delay": null @@ -1242,7 +1237,7 @@ }, "5": { "master": { - "volume": 0, + "volume": -7.182839153871299, "pan": 0 }, "effect": { @@ -1254,19 +1249,19 @@ }, "6": { "master": { - "volume": -0.945476837556512, + "volume": -6.429551532376749, "pan": 0 }, "effect": { "chorus": -3.6415196065803452, "chebyshev": null, - "reverb": -15.138557176360079, + "reverb": -3.039187582913598, "delay": -3.2892246720947744 } }, "7": { "master": { - "volume": null, + "volume": 0, "pan": 0 }, "effect": { @@ -1296,4 +1291,4 @@ "feedback": 0.575 } } -} +} \ No newline at end of file diff --git a/examples/fm plinky thing.blip b/examples/arpeggiator demo.blip similarity index 89% rename from examples/fm plinky thing.blip rename to examples/arpeggiator demo.blip index 9d013ab..64f0ceb 100644 --- a/examples/fm plinky thing.blip +++ b/examples/arpeggiator demo.blip @@ -1,103 +1,109 @@ { - "name": "fm plinky thing", + "name": "arpeggiator demo", "author": "", - "date": 1707686458182, + "date": 1710250790684, "version": 0, "bpm": 120, "swing": 0, "root": { - "name": "F", - "note": 29 + "name": "D", + "note": 26 }, "scale": { - "name": "aeolian", + "name": "mixolydian", "semitones": [ 0, 2, - 3, + 4, 5, 7, - 8, + 9, 10 ] }, "sequencer": { "0": { "mod": [ - 10, - 3 + 38, + 23 ], - "length": 32, + "length": 64, "algorithm": "euclidean" }, "1": { "mod": [ - 10, - 5 + 16, + 3 ], - "length": 32, + "length": 64, "algorithm": "euclidean" }, "2": { "mod": [ - 8, + 1, 3 ], - "length": 32, + "length": 8, "algorithm": "euclidean" }, "3": { "mod": [ - 4, - 11 + 9, + 3 ], "length": 32, "algorithm": "euclidean" }, "4": { "mod": [ - 26, + 61, + 5, 7 ], "length": 32, - "algorithm": "euclidean" + "algorithm": "sine threshold" }, "5": { - "mod": [], - "length": 32, + "mod": [ + 53, + 4 + ], + "length": 64, "algorithm": "euclidean" }, "6": { - "mod": [], - "length": 32, - "algorithm": "euclidean" + "mod": [ + 3, + 1 + ], + "length": 12, + "algorithm": "modulo" }, "7": { - "mod": [], - "length": 32, + "mod": [ + 0, + 4 + ], + "length": 20, "algorithm": "euclidean" } }, "arpeggiator": { "0": { "mod": [ + 10, 18, - 11, - 0 + 1 ], "algorithm": "modulo motion", "rangeStart": 21, "rangeEnd": 108 }, "1": { - "mod": [ - 11, - 9, - 0 - ], + "mod": [], "algorithm": "modulo motion", - "rangeStart": 4, - "rangeEnd": 15 + "rangeStart": 21, + "rangeEnd": 108 }, "2": { "mod": [], @@ -106,16 +112,24 @@ "rangeEnd": 108 }, "3": { - "mod": [], + "mod": [ + 14, + 6, + 2 + ], "algorithm": "modulo motion", - "rangeStart": 21, - "rangeEnd": 108 + "rangeStart": 5, + "rangeEnd": 12 }, "4": { - "mod": [], + "mod": [ + 18, + 16, + 2 + ], "algorithm": "modulo motion", "rangeStart": 21, - "rangeEnd": 108 + "rangeEnd": 31 }, "5": { "mod": [], @@ -208,68 +222,6 @@ ] }, "1": { - "name": "basic melodic synth", - "modules": [ - { - "id": 0, - "type": "Oscillator", - "start": true - }, - { - "id": 1, - "type": "AmplitudeEnvelope", - "toDestination": true - }, - { - "id": 2, - "type": "Filter" - }, - { - "id": 3, - "type": "FrequencyEnvelope" - } - ], - "connects": [ - { - "input": { - "id": 0, - "property": null - }, - "output": { - "id": 2, - "property": null - } - }, - { - "input": { - "id": 2, - "property": null - }, - "output": { - "id": 1, - "property": null - } - }, - { - "input": { - "id": 3, - "property": null - }, - "output": { - "id": 2, - "property": "frequency" - } - } - ], - "defaults": [ - { - "id": 1, - "property": "sustain", - "value": 0 - } - ] - }, - "2": { "name": "basic percussive synth", "modules": [ { @@ -387,7 +339,7 @@ } ] }, - "3": { + "2": { "name": "basic percussive synth", "modules": [ { @@ -505,7 +457,139 @@ } ] }, + "3": { + "name": "basic melodic synth", + "modules": [ + { + "id": 0, + "type": "Oscillator", + "start": true + }, + { + "id": 1, + "type": "AmplitudeEnvelope", + "toDestination": true + }, + { + "id": 2, + "type": "Filter" + }, + { + "id": 3, + "type": "FrequencyEnvelope" + } + ], + "connects": [ + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 2, + "property": null + } + }, + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 1, + "property": null + } + }, + { + "input": { + "id": 3, + "property": null + }, + "output": { + "id": 2, + "property": "frequency" + } + } + ], + "defaults": [ + { + "id": 1, + "property": "sustain", + "value": 0 + } + ] + }, "4": { + "name": "simple fm", + "modules": [ + { + "id": 0, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": false + }, + { + "id": 1, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": true + }, + { + "id": 2, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": false + }, + { + "id": 3, + "type": "Gain", + "start": false, + "toDestination": false + } + ], + "connects": [ + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 3, + "property": null + }, + "output": { + "id": 0, + "property": "frequency" + } + }, + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 1, + "property": null + } + } + ], + "defaults": [ + { + "id": 1, + "property": "sustain", + "value": 0 + } + ] + }, + "5": { "name": "basic percussive synth", "modules": [ { @@ -623,7 +707,7 @@ } ] }, - "5": { + "6": { "name": "basic percussive synth", "modules": [ { @@ -741,68 +825,6 @@ } ] }, - "6": { - "name": "basic melodic synth", - "modules": [ - { - "id": 0, - "type": "Oscillator", - "start": true - }, - { - "id": 1, - "type": "AmplitudeEnvelope", - "toDestination": true - }, - { - "id": 2, - "type": "Filter" - }, - { - "id": 3, - "type": "FrequencyEnvelope" - } - ], - "connects": [ - { - "input": { - "id": 0, - "property": null - }, - "output": { - "id": 2, - "property": null - } - }, - { - "input": { - "id": 2, - "property": null - }, - "output": { - "id": 1, - "property": null - } - }, - { - "input": { - "id": 3, - "property": null - }, - "output": { - "id": 2, - "property": "frequency" - } - } - ], - "defaults": [ - { - "id": 1, - "property": "sustain", - "value": 0 - } - ] - }, "7": { "name": "basic percussive synth", "modules": [ @@ -926,49 +948,27 @@ "0": { "Oscillator_0": { "volume": 0, - "frequency": 415.3046975799451, + "frequency": 220, "type": "sine" }, "AmplitudeEnvelope_1": { "attack": 0.01, - "decay": 0.26335000000000003 + "decay": 0.44559999999999994 }, "Oscillator_2": { "volume": 0, - "frequency": 415.3046975799451, - "type": "sine" + "frequency": 220, + "type": "sawtooth" }, "Gain_3": { "gain": 720 } }, "1": { - "Oscillator_0": { - "volume": 0, - "frequency": 51.91308719749314, - "type": "square" - }, - "AmplitudeEnvelope_1": { - "attack": 0.01, - "decay": 0.496 - }, - "Filter_2": { - "frequency": 0, - "Q": 1.9, - "type": "lowpass" - }, - "FrequencyEnvelope_3": { - "attack": 0.01, - "decay": 0.14455000000000004, - "sustain": 0.115, - "baseFrequency": 55 - } - }, - "2": { "FrequencyEnvelope_0": { "attack": 0.01, "decay": 0.1, - "sustain": 0.1, + "sustain": 0.13, "baseFrequency": 20 }, "Oscillator_1": { @@ -983,7 +983,7 @@ }, "AmplitudeEnvelope_3": { "attack": 0.01, - "decay": 0.30295000000000005 + "decay": 0.32770000000000005 }, "AmplitudeEnvelope_4": { "attack": 0.01, @@ -991,7 +991,6 @@ }, "Noise_5": { "volume": -79.99999999999997, - "playbackRate": 1, "type": "white" }, "Filter_6": { @@ -1000,7 +999,7 @@ "type": "lowpass" } }, - "3": { + "2": { "FrequencyEnvelope_0": { "attack": 0.01, "decay": 0.01, @@ -1023,11 +1022,10 @@ }, "AmplitudeEnvelope_4": { "attack": 0.01, - "decay": 0.30295000000000005 + "decay": 0.39205000000000007 }, "Noise_5": { "volume": -5.999980895881677, - "playbackRate": 0, "type": "white" }, "Filter_6": { @@ -1036,40 +1034,45 @@ "type": "bandpass" } }, - "4": { - "FrequencyEnvelope_0": { + "3": { + "Oscillator_0": { + "volume": 0, + "frequency": 46.2493028389543, + "type": "square" + }, + "AmplitudeEnvelope_1": { "attack": 0.01, - "decay": 0.01, - "sustain": 1, - "baseFrequency": 22 + "decay": 0.4168 }, - "Oscillator_1": { - "volume": -79.99999999999999, + "Filter_2": { "frequency": 0, - "type": "sine" - }, - "Oscillator_2": { - "volume": -79.99999999999999, - "frequency": 180, - "type": "sine" + "Q": 1.9, + "type": "lowpass" }, - "AmplitudeEnvelope_3": { + "FrequencyEnvelope_3": { "attack": 0.01, - "decay": 0.01 + "decay": 0.13465000000000005, + "sustain": 0.095, + "baseFrequency": 50 + } + }, + "4": { + "Oscillator_0": { + "volume": 0, + "frequency": 220, + "type": "sine" }, - "AmplitudeEnvelope_4": { + "AmplitudeEnvelope_1": { "attack": 0.01, - "decay": 0.030700000000000026 + "decay": 0.6148 }, - "Noise_5": { - "volume": -5.999980895881677, - "playbackRate": 0, - "type": "white" + "Oscillator_2": { + "volume": 0, + "frequency": 220, + "type": "square" }, - "Filter_6": { - "frequency": 2950, - "Q": 3.3, - "type": "bandpass" + "Gain_3": { + "gain": 551 } }, "5": { @@ -1080,62 +1083,74 @@ "baseFrequency": 10 }, "Oscillator_1": { - "volume": 0, + "volume": -79.99999999999997, "frequency": 0, "type": "sine" }, "Oscillator_2": { - "volume": 0, + "volume": -79.99999999999997, "frequency": 440, "type": "sine" }, "AmplitudeEnvelope_3": { "attack": 0.01, - "decay": 0.1 + "decay": 0.06535000000000003 }, "AmplitudeEnvelope_4": { "attack": 0.01, - "decay": 0.1 + "decay": 0.0199 }, "Noise_5": { "volume": 0, - "playbackRate": 1, "type": "white" }, "Filter_6": { - "frequency": 350, - "Q": 1, - "type": "lowpass" + "frequency": 4350, + "Q": 10.3, + "type": "bandpass" } }, "6": { - "Oscillator_0": { - "volume": 0, - "frequency": 440, - "type": "sine" - }, - "AmplitudeEnvelope_1": { + "FrequencyEnvelope_0": { "attack": 0.01, - "decay": 0.1 + "decay": 0.01, + "sustain": 1, + "baseFrequency": 22 }, - "Filter_2": { + "Oscillator_1": { + "volume": -9.013387281530145, "frequency": 0, - "Q": 1, - "type": "lowpass" + "type": "sine" }, - "FrequencyEnvelope_3": { + "Oscillator_2": { + "volume": -8.154726319389695, + "frequency": 180, + "type": "sine" + }, + "AmplitudeEnvelope_3": { "attack": 0.01, - "decay": 0.1, - "sustain": 0.5, - "baseFrequency": 200 + "decay": 0.14 + }, + "AmplitudeEnvelope_4": { + "attack": 0.01, + "decay": 0.10000000000000002 + }, + "Noise_5": { + "volume": -5.999980895881677, + "type": "white" + }, + "Filter_6": { + "frequency": 2600, + "Q": 6.1, + "type": "bandpass" } }, "7": { "FrequencyEnvelope_0": { "attack": 0.01, "decay": 0.1, - "sustain": 0.5, - "baseFrequency": 10 + "sustain": 0.1, + "baseFrequency": 20 }, "Oscillator_1": { "volume": 0, @@ -1143,21 +1158,20 @@ "type": "sine" }, "Oscillator_2": { - "volume": 0, + "volume": -79.99999999999997, "frequency": 440, "type": "sine" }, "AmplitudeEnvelope_3": { "attack": 0.01, - "decay": 0.1 + "decay": 0.22375000000000003 }, "AmplitudeEnvelope_4": { "attack": 0.01, - "decay": 0.1 + "decay": 0.01 }, "Noise_5": { - "volume": 0, - "playbackRate": 1, + "volume": -79.99999999999997, "type": "white" }, "Filter_6": { @@ -1170,19 +1184,19 @@ "mixer": { "0": { "master": { - "volume": -1.8143969311208676, + "volume": -6.753599371099802, "pan": 0 }, "effect": { - "chorus": -79.99999999999999, - "chebyshev": null, + "chorus": -14.210227265014439, + "chebyshev": -79.99999999999997, "reverb": 0.000020653100890443027, - "delay": -2.518448560521919 + "delay": -6.513479080667449 } }, "1": { "master": { - "volume": -1.9250035547229918, + "volume": 0, "pan": 0 }, "effect": { @@ -1206,7 +1220,7 @@ }, "3": { "master": { - "volume": 0, + "volume": -3.1320904731218335, "pan": 0 }, "effect": { @@ -1218,23 +1232,23 @@ }, "4": { "master": { - "volume": 0, + "volume": -4.975351358533385, "pan": 0 }, "effect": { "chorus": null, "chebyshev": null, - "reverb": null, - "delay": null + "reverb": -5.225393198888822, + "delay": -2.372042037445155 } }, "5": { "master": { - "volume": 0, + "volume": -0.732523602210463, "pan": 0 }, "effect": { - "chorus": null, + "chorus": -79.99999999999997, "chebyshev": null, "reverb": null, "delay": null @@ -1273,15 +1287,15 @@ "spread": 180 }, "Chebyshev": { - "order": 26 + "order": 50 }, "Reverb": { - "decay": 15.258999999999999, + "decay": 17.5015, "preDelay": 0.01 }, "FeedbackDelay": { - "delayTime": 0.375, - "feedback": 0.68 + "delayTime": 0.25, + "feedback": 0.5 } } } \ No newline at end of file diff --git a/examples/fmblip remix.blip b/examples/fmblip remix.blip new file mode 100644 index 0000000..356bd08 --- /dev/null +++ b/examples/fmblip remix.blip @@ -0,0 +1,1226 @@ +{ + "name": "fmblip remix", + "author": "", + "date": 1710250538759, + "version": 0, + "bpm": 120, + "swing": 0, + "root": { + "name": "F", + "note": 29 + }, + "scale": { + "name": "dorian", + "semitones": [ + 0, + 2, + 3, + 5, + 7, + 9, + 10 + ] + }, + "sequencer": { + "0": { + "mod": [ + 0, + 34, + 16 + ], + "length": 32, + "algorithm": "sine threshold" + }, + "1": { + "mod": [ + 12, + 5 + ], + "length": 32, + "algorithm": "euclidean" + }, + "2": { + "mod": [ + 8, + 3 + ], + "length": 32, + "algorithm": "euclidean" + }, + "3": { + "mod": [ + 4, + 11 + ], + "length": 32, + "algorithm": "euclidean" + }, + "4": { + "mod": [ + 26, + 7 + ], + "length": 32, + "algorithm": "euclidean" + }, + "5": { + "mod": [ + 2, + 2 + ], + "length": 7, + "algorithm": "euclidean" + }, + "6": { + "mod": [], + "length": 32, + "algorithm": "euclidean" + }, + "7": { + "mod": [], + "length": 32, + "algorithm": "euclidean" + } + }, + "arpeggiator": { + "0": { + "mod": [ + 18, + 34, + 2 + ], + "algorithm": "modulo motion", + "rangeStart": 23, + "rangeEnd": 35 + }, + "1": { + "mod": [ + 11, + 9, + 0 + ], + "algorithm": "modulo motion", + "rangeStart": 4, + "rangeEnd": 15 + }, + "2": { + "mod": [], + "algorithm": "modulo motion", + "rangeStart": 21, + "rangeEnd": 108 + }, + "3": { + "mod": [], + "algorithm": "modulo motion", + "rangeStart": 21, + "rangeEnd": 108 + }, + "4": { + "mod": [], + "algorithm": "modulo motion", + "rangeStart": 21, + "rangeEnd": 108 + }, + "5": { + "mod": [ + 17, + 7, + 0 + ], + "algorithm": "modulo motion", + "rangeStart": 25, + "rangeEnd": 108 + }, + "6": { + "mod": [], + "algorithm": "modulo motion", + "rangeStart": 21, + "rangeEnd": 108 + }, + "7": { + "mod": [], + "algorithm": "modulo motion", + "rangeStart": 21, + "rangeEnd": 108 + } + }, + "patch": { + "0": { + "name": "simple fm", + "modules": [ + { + "id": 0, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": false + }, + { + "id": 1, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": true + }, + { + "id": 2, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": false + }, + { + "id": 3, + "type": "Gain", + "start": false, + "toDestination": false + } + ], + "connects": [ + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 3, + "property": null + }, + "output": { + "id": 0, + "property": "frequency" + } + }, + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 1, + "property": null + } + } + ], + "defaults": [ + { + "id": 1, + "property": "sustain", + "value": 0 + } + ] + }, + "1": { + "name": "basic melodic synth", + "modules": [ + { + "id": 0, + "type": "Oscillator", + "start": true + }, + { + "id": 1, + "type": "AmplitudeEnvelope", + "toDestination": true + }, + { + "id": 2, + "type": "Filter" + }, + { + "id": 3, + "type": "FrequencyEnvelope" + } + ], + "connects": [ + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 2, + "property": null + } + }, + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 1, + "property": null + } + }, + { + "input": { + "id": 3, + "property": null + }, + "output": { + "id": 2, + "property": "frequency" + } + } + ], + "defaults": [ + { + "id": 1, + "property": "sustain", + "value": 0 + } + ] + }, + "2": { + "name": "basic percussive synth", + "modules": [ + { + "id": 0, + "type": "FrequencyEnvelope", + "start": false, + "toDestination": false + }, + { + "id": 1, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": true + }, + { + "id": 2, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": true + }, + { + "id": 3, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": true + }, + { + "id": 4, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": false + }, + { + "id": 5, + "type": "Noise", + "start": true, + "toDestination": false + }, + { + "id": 6, + "type": "Filter", + "start": false, + "toDestination": true + } + ], + "connects": [ + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 1, + "property": "frequency" + } + }, + { + "input": { + "id": 1, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 5, + "property": null + }, + "output": { + "id": 4, + "property": null + } + }, + { + "input": { + "id": 4, + "property": null + }, + "output": { + "id": 6, + "property": null + } + } + ], + "defaults": [ + { + "id": 3, + "property": "sustain", + "value": 0 + }, + { + "id": 4, + "property": "sustain", + "value": 0 + }, + { + "id": 0, + "property": "baseFrequency", + "value": 10 + } + ] + }, + "3": { + "name": "basic percussive synth", + "modules": [ + { + "id": 0, + "type": "FrequencyEnvelope", + "start": false, + "toDestination": false + }, + { + "id": 1, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": true + }, + { + "id": 2, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": true + }, + { + "id": 3, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": true + }, + { + "id": 4, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": false + }, + { + "id": 5, + "type": "Noise", + "start": true, + "toDestination": false + }, + { + "id": 6, + "type": "Filter", + "start": false, + "toDestination": true + } + ], + "connects": [ + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 1, + "property": "frequency" + } + }, + { + "input": { + "id": 1, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 5, + "property": null + }, + "output": { + "id": 4, + "property": null + } + }, + { + "input": { + "id": 4, + "property": null + }, + "output": { + "id": 6, + "property": null + } + } + ], + "defaults": [ + { + "id": 3, + "property": "sustain", + "value": 0 + }, + { + "id": 4, + "property": "sustain", + "value": 0 + }, + { + "id": 0, + "property": "baseFrequency", + "value": 10 + } + ] + }, + "4": { + "name": "basic percussive synth", + "modules": [ + { + "id": 0, + "type": "FrequencyEnvelope", + "start": false, + "toDestination": false + }, + { + "id": 1, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": true + }, + { + "id": 2, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": true + }, + { + "id": 3, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": true + }, + { + "id": 4, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": false + }, + { + "id": 5, + "type": "Noise", + "start": true, + "toDestination": false + }, + { + "id": 6, + "type": "Filter", + "start": false, + "toDestination": true + } + ], + "connects": [ + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 1, + "property": "frequency" + } + }, + { + "input": { + "id": 1, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 5, + "property": null + }, + "output": { + "id": 4, + "property": null + } + }, + { + "input": { + "id": 4, + "property": null + }, + "output": { + "id": 6, + "property": null + } + } + ], + "defaults": [ + { + "id": 3, + "property": "sustain", + "value": 0 + }, + { + "id": 4, + "property": "sustain", + "value": 0 + }, + { + "id": 0, + "property": "baseFrequency", + "value": 10 + } + ] + }, + "5": { + "name": "simple fm", + "modules": [ + { + "id": 0, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": false + }, + { + "id": 1, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": true + }, + { + "id": 2, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": false + }, + { + "id": 3, + "type": "Gain", + "start": false, + "toDestination": false + } + ], + "connects": [ + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 3, + "property": null + }, + "output": { + "id": 0, + "property": "frequency" + } + }, + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 1, + "property": null + } + } + ], + "defaults": [ + { + "id": 1, + "property": "sustain", + "value": 0 + } + ] + }, + "6": { + "name": "basic melodic synth", + "modules": [ + { + "id": 0, + "type": "Oscillator", + "start": true + }, + { + "id": 1, + "type": "AmplitudeEnvelope", + "toDestination": true + }, + { + "id": 2, + "type": "Filter" + }, + { + "id": 3, + "type": "FrequencyEnvelope" + } + ], + "connects": [ + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 2, + "property": null + } + }, + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 1, + "property": null + } + }, + { + "input": { + "id": 3, + "property": null + }, + "output": { + "id": 2, + "property": "frequency" + } + } + ], + "defaults": [ + { + "id": 1, + "property": "sustain", + "value": 0 + } + ] + }, + "7": { + "name": "basic percussive synth", + "modules": [ + { + "id": 0, + "type": "FrequencyEnvelope", + "start": false, + "toDestination": false + }, + { + "id": 1, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": true + }, + { + "id": 2, + "type": "Oscillator", + "start": true, + "toDestination": false, + "independent": true + }, + { + "id": 3, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": true + }, + { + "id": 4, + "type": "AmplitudeEnvelope", + "start": false, + "toDestination": false + }, + { + "id": 5, + "type": "Noise", + "start": true, + "toDestination": false + }, + { + "id": 6, + "type": "Filter", + "start": false, + "toDestination": true + } + ], + "connects": [ + { + "input": { + "id": 0, + "property": null + }, + "output": { + "id": 1, + "property": "frequency" + } + }, + { + "input": { + "id": 1, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 2, + "property": null + }, + "output": { + "id": 3, + "property": null + } + }, + { + "input": { + "id": 5, + "property": null + }, + "output": { + "id": 4, + "property": null + } + }, + { + "input": { + "id": 4, + "property": null + }, + "output": { + "id": 6, + "property": null + } + } + ], + "defaults": [ + { + "id": 3, + "property": "sustain", + "value": 0 + }, + { + "id": 4, + "property": "sustain", + "value": 0 + }, + { + "id": 0, + "property": "baseFrequency", + "value": 10 + } + ] + } + }, + "controls": { + "0": { + "Oscillator_0": { + "volume": 0, + "frequency": 293.6647679174076, + "type": "triangle" + }, + "AmplitudeEnvelope_1": { + "attack": 0.01, + "decay": 1 + }, + "Oscillator_2": { + "volume": 0, + "frequency": 293.6647679174076, + "type": "triangle" + }, + "Gain_3": { + "gain": 510 + } + }, + "1": { + "Oscillator_0": { + "volume": 0, + "frequency": 87.30705785825097, + "type": "square" + }, + "AmplitudeEnvelope_1": { + "attack": 0.01, + "decay": 0.496 + }, + "Filter_2": { + "frequency": 0, + "Q": 1.9, + "type": "lowpass" + }, + "FrequencyEnvelope_3": { + "attack": 0.01, + "decay": 0.13465000000000005, + "sustain": 0.1, + "baseFrequency": 45 + } + }, + "2": { + "FrequencyEnvelope_0": { + "attack": 0.01, + "decay": 0.1, + "sustain": 0.1, + "baseFrequency": 20 + }, + "Oscillator_1": { + "volume": 0, + "frequency": 0, + "type": "sine" + }, + "Oscillator_2": { + "volume": -79.99999999999997, + "frequency": 440, + "type": "sine" + }, + "AmplitudeEnvelope_3": { + "attack": 0.01, + "decay": 0.30295000000000005 + }, + "AmplitudeEnvelope_4": { + "attack": 0.01, + "decay": 0.01 + }, + "Noise_5": { + "volume": -79.99999999999997, + "type": "white" + }, + "Filter_6": { + "frequency": 350, + "Q": 1, + "type": "lowpass" + } + }, + "3": { + "FrequencyEnvelope_0": { + "attack": 0.01, + "decay": 0.01, + "sustain": 1, + "baseFrequency": 22 + }, + "Oscillator_1": { + "volume": -9.013387281530145, + "frequency": 0, + "type": "sine" + }, + "Oscillator_2": { + "volume": -8.154726319389695, + "frequency": 180, + "type": "sine" + }, + "AmplitudeEnvelope_3": { + "attack": 0.01, + "decay": 0.14 + }, + "AmplitudeEnvelope_4": { + "attack": 0.01, + "decay": 0.6544 + }, + "Noise_5": { + "volume": -5.999980895881677, + "type": "white" + }, + "Filter_6": { + "frequency": 2800, + "Q": 0.9, + "type": "bandpass" + } + }, + "4": { + "FrequencyEnvelope_0": { + "attack": 0.01, + "decay": 0.01, + "sustain": 1, + "baseFrequency": 22 + }, + "Oscillator_1": { + "volume": -79.99999999999997, + "frequency": 0, + "type": "sine" + }, + "Oscillator_2": { + "volume": -79.99999999999997, + "frequency": 180, + "type": "sine" + }, + "AmplitudeEnvelope_3": { + "attack": 0.01, + "decay": 0.01 + }, + "AmplitudeEnvelope_4": { + "attack": 0.01, + "decay": 0.020800000000000027 + }, + "Noise_5": { + "volume": -5.999980895881677, + "type": "white" + }, + "Filter_6": { + "frequency": 4900, + "Q": 2.1, + "type": "bandpass" + } + }, + "5": { + "Oscillator_0": { + "volume": 0, + "frequency": 698.4564628660078, + "type": "sine" + }, + "AmplitudeEnvelope_1": { + "attack": 0.01, + "decay": 0.27820000000000006 + }, + "Oscillator_2": { + "volume": 0, + "frequency": 698.4564628660078, + "type": "sine" + }, + "Gain_3": { + "gain": 451 + } + }, + "6": { + "Oscillator_0": { + "volume": 0, + "frequency": 440, + "type": "sine" + }, + "AmplitudeEnvelope_1": { + "attack": 0.01, + "decay": 0.1 + }, + "Filter_2": { + "frequency": 0, + "Q": 1, + "type": "lowpass" + }, + "FrequencyEnvelope_3": { + "attack": 0.01, + "decay": 0.1, + "sustain": 0.5, + "baseFrequency": 200 + } + }, + "7": { + "FrequencyEnvelope_0": { + "attack": 0.01, + "decay": 0.1, + "sustain": 0.5, + "baseFrequency": 10 + }, + "Oscillator_1": { + "volume": 0, + "frequency": 0, + "type": "sine" + }, + "Oscillator_2": { + "volume": 0, + "frequency": 440, + "type": "sine" + }, + "AmplitudeEnvelope_3": { + "attack": 0.01, + "decay": 0.1 + }, + "AmplitudeEnvelope_4": { + "attack": 0.01, + "decay": 0.1 + }, + "Noise_5": { + "volume": 0, + "type": "white" + }, + "Filter_6": { + "frequency": 350, + "Q": 1, + "type": "lowpass" + } + } + }, + "mixer": { + "0": { + "master": { + "volume": -6.850760087171077, + "pan": 0 + }, + "effect": { + "chorus": 0.000020653100890443027, + "chebyshev": -79.99999999999997, + "reverb": 0.000020653100890443027, + "delay": -12.459399382535878 + } + }, + "1": { + "master": { + "volume": -5.356128818049881, + "pan": 0 + }, + "effect": { + "chorus": null, + "chebyshev": null, + "reverb": null, + "delay": null + } + }, + "2": { + "master": { + "volume": -2.372042037445155, + "pan": 0 + }, + "effect": { + "chorus": null, + "chebyshev": null, + "reverb": null, + "delay": null + } + }, + "3": { + "master": { + "volume": -0.945476837556512, + "pan": 0 + }, + "effect": { + "chorus": null, + "chebyshev": null, + "reverb": null, + "delay": null + } + }, + "4": { + "master": { + "volume": 0, + "pan": 0 + }, + "effect": { + "chorus": null, + "chebyshev": null, + "reverb": null, + "delay": null + } + }, + "5": { + "master": { + "volume": -8.86634046906991, + "pan": 0 + }, + "effect": { + "chorus": null, + "chebyshev": null, + "reverb": -11.631004364172197, + "delay": -6.645940591502635 + } + }, + "6": { + "master": { + "volume": 0, + "pan": 0 + }, + "effect": { + "chorus": null, + "chebyshev": null, + "reverb": null, + "delay": null + } + }, + "7": { + "master": { + "volume": 0, + "pan": 0 + }, + "effect": { + "chorus": null, + "chebyshev": null, + "reverb": null, + "delay": null + } + } + }, + "effect": { + "Chorus": { + "frequency": 1.5, + "delayTime": 3.5, + "depth": 0.7, + "spread": 180 + }, + "Chebyshev": { + "order": 14 + }, + "Reverb": { + "decay": 27.069499999999998, + "preDelay": 0.35 + }, + "FeedbackDelay": { + "delayTime": 0.375, + "feedback": 0.68 + } + } +} \ No newline at end of file diff --git a/examples/simple fm demo.blip b/examples/simple fm demo.blip index 6722cb4..a370c93 100644 --- a/examples/simple fm demo.blip +++ b/examples/simple fm demo.blip @@ -1,7 +1,7 @@ { "name": "simple fm demo", "author": "argarak", - "date": 1706631184561, + "date": 1710250908030, "version": 0, "bpm": 120, "swing": 0, @@ -912,7 +912,7 @@ "0": { "Oscillator_0": { "volume": 0, - "frequency": 369.9944227116344, + "frequency": 293.6647679174076, "type": "sine" }, "AmplitudeEnvelope_1": { @@ -921,7 +921,7 @@ }, "Oscillator_2": { "volume": 0, - "frequency": 369.9944227116344, + "frequency": 293.6647679174076, "type": "sine" }, "Gain_3": { @@ -936,7 +936,7 @@ "baseFrequency": 20 }, "Oscillator_1": { - "volume": 0, + "volume": -1.8143969311208676, "frequency": 0, "type": "sine" }, @@ -955,7 +955,6 @@ }, "Noise_5": { "volume": -79.99999999999997, - "playbackRate": 1, "type": "white" }, "Filter_6": { @@ -967,7 +966,7 @@ "2": { "Oscillator_0": { "volume": 0, - "frequency": 69.29565774421802, + "frequency": 46.2493028389543, "type": "sine" }, "AmplitudeEnvelope_1": { @@ -976,7 +975,7 @@ }, "Oscillator_2": { "volume": 0, - "frequency": 69.29565774421802, + "frequency": 46.2493028389543, "type": "sine" }, "Gain_3": { @@ -1010,7 +1009,6 @@ }, "Noise_5": { "volume": -5.999980895881677, - "playbackRate": 0, "type": "white" }, "Filter_6": { @@ -1027,12 +1025,12 @@ "baseFrequency": 22 }, "Oscillator_1": { - "volume": -79.99999999999999, + "volume": -79.99999999999997, "frequency": 0, "type": "sine" }, "Oscillator_2": { - "volume": -79.99999999999999, + "volume": -79.99999999999997, "frequency": 180, "type": "sine" }, @@ -1046,7 +1044,6 @@ }, "Noise_5": { "volume": -5.999980895881677, - "playbackRate": 0, "type": "white" }, "Filter_6": { @@ -1058,7 +1055,7 @@ "5": { "Oscillator_0": { "volume": 0, - "frequency": 369.9944227116344, + "frequency": 587.3295358348151, "type": "sine" }, "AmplitudeEnvelope_1": { @@ -1067,7 +1064,7 @@ }, "Oscillator_2": { "volume": 0, - "frequency": 369.9944227116344, + "frequency": 587.3295358348151, "type": "sawtooth" }, "Gain_3": { @@ -1101,12 +1098,12 @@ "baseFrequency": 9 }, "Oscillator_1": { - "volume": -79.99999999999999, + "volume": -79.99999999999997, "frequency": 0, "type": "triangle" }, "Oscillator_2": { - "volume": -79.99999999999999, + "volume": -79.99999999999997, "frequency": 414.99999999999994, "type": "triangle" }, @@ -1119,8 +1116,7 @@ "decay": 0.80785 }, "Noise_5": { - "volume": -5.999980895881677, - "playbackRate": 3.9, + "volume": -5.477876444106171, "type": "pink" }, "Filter_6": { @@ -1137,15 +1133,15 @@ "pan": 0 }, "effect": { - "chorus": -79.99999999999999, - "chebyshev": -79.99999999999999, + "chorus": -79.99999999999997, + "chebyshev": -79.99999999999997, "reverb": -1.3764516236952884, - "delay": -79.99999999999999 + "delay": -79.99999999999997 } }, "1": { "master": { - "volume": 0, + "volume": -1.1601091053720718, "pan": 0 }, "effect": { @@ -1157,7 +1153,7 @@ }, "2": { "master": { - "volume": -3.1728294701740367, + "volume": -6.504506509399728, "pan": 0 }, "effect": { @@ -1193,12 +1189,12 @@ }, "5": { "master": { - "volume": -3.2892246720947744, + "volume": -7.077656383137433, "pan": 0 }, "effect": { "chorus": -8.010344402161095, - "chebyshev": -79.99999999999999, + "chebyshev": -79.99999999999997, "reverb": -5.861329918917263, "delay": -4.482393360083591 }