From 2c5352da8cc0a47be2b211179092229e0e4659b3 Mon Sep 17 00:00:00 2001 From: Lance Jordan Date: Tue, 3 Jan 2017 14:41:49 -0500 Subject: [PATCH 1/3] Mo Deeper Kick --- src/initialState.js | 4 ++-- src/synth/drumModules/bassDrum.js | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/initialState.js b/src/initialState.js index ab7b6ce..c12c58e 100644 --- a/src/initialState.js +++ b/src/initialState.js @@ -121,7 +121,7 @@ export default Immutable({ selectedPlayFillPattern: 0, fillScheduled: false, - tempo: 135, + tempo: 118, fineTempo: 0, currentStep: 0, @@ -132,4 +132,4 @@ export default Immutable({ clearDragging: false, pendingPatternLength: 0 -}) \ No newline at end of file +}) diff --git a/src/synth/drumModules/bassDrum.js b/src/synth/drumModules/bassDrum.js index 5fbc16f..4eb9aef 100644 --- a/src/synth/drumModules/bassDrum.js +++ b/src/synth/drumModules/bassDrum.js @@ -6,14 +6,14 @@ import PulseTrigger from 'synth/basics/pulseTrigger'; import SoftClipper from 'synth/effects/softClipper'; import {equalPower} from 'helpers'; -const FREQ_AMT = 50; -const START_FREQ = 48; +const FREQ_AMT = 14; +const START_FREQ = 44; export default function (audioCtx, destination, time, {level, tone, decay}) { // parameters const outputLevel = equalPower(level); - const vcfFreq = 200 + tone * 20; - const decayTime = decay * 5 + 50; + const vcfFreq = 100 + tone * 20; + const decayTime = decay * 8 + 50; // audio modules const vco = new VCO(SINE, audioCtx); @@ -31,11 +31,11 @@ export default function (audioCtx, destination, time, {level, tone, decay}) { const outputVCA = new VCA(audioCtx); outputVCA.amplitude.value = outputLevel + 0.4; - const softClipper = new SoftClipper(0.6, audioCtx); + const softClipper = new SoftClipper(0.9, audioCtx); // envelopes - const oscEnv = new ADGenerator(EXPONENTIAL, 0.11, decayTime, START_FREQ, FREQ_AMT); - const ampEnv = new ADGenerator(LINEAR, 2, decayTime, 0.0, 1.0); + const oscEnv = new ADGenerator(EXPONENTIAL, 0.12, decayTime, START_FREQ, FREQ_AMT); + const ampEnv = new ADGenerator(LINEAR, 2, decayTime, 0.0, 1.4); // module routing vco.connect(vca); @@ -64,4 +64,4 @@ export default function (audioCtx, destination, time, {level, tone, decay}) { }, (time - audioCtx.currentTime) + 1000); return outputVCA; -} \ No newline at end of file +} From e9c9e0660dfaf8427ada36e73569a0a7fbbea1a0 Mon Sep 17 00:00:00 2001 From: Lance Jordan Date: Tue, 3 Jan 2017 15:54:22 -0500 Subject: [PATCH 2/3] Better Snare and Roll Back Overload on Kick Close #10 --- src/synth/drumModules/bassDrum.js | 4 ++-- src/synth/drumModules/snareDrum.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/synth/drumModules/bassDrum.js b/src/synth/drumModules/bassDrum.js index 4eb9aef..891f608 100644 --- a/src/synth/drumModules/bassDrum.js +++ b/src/synth/drumModules/bassDrum.js @@ -29,9 +29,9 @@ export default function (audioCtx, destination, time, {level, tone, decay}) { vca.amplitude.value = 0; const outputVCA = new VCA(audioCtx); - outputVCA.amplitude.value = outputLevel + 0.4; + outputVCA.amplitude.value = outputLevel + 0.2; - const softClipper = new SoftClipper(0.9, audioCtx); + const softClipper = new SoftClipper(0.7, audioCtx); // envelopes const oscEnv = new ADGenerator(EXPONENTIAL, 0.12, decayTime, START_FREQ, FREQ_AMT); diff --git a/src/synth/drumModules/snareDrum.js b/src/synth/drumModules/snareDrum.js index 42dde97..b5f28a3 100644 --- a/src/synth/drumModules/snareDrum.js +++ b/src/synth/drumModules/snareDrum.js @@ -10,8 +10,8 @@ const lowOscFreq = 238; export default function (audioCtx, destination, time, { level, tone, snappy }) { // parameters const outputLevel = equalPower(level); - const noiseVCFFreq = (tone * 100) + 800; - const snappyEnvAmt = snappy / 200; + const noiseVCFFreq = (tone * 100) + 500; + const snappyEnvAmt = snappy / 180; // audio modules const highOsc = new VCO(SINE, audioCtx); @@ -32,7 +32,7 @@ export default function (audioCtx, destination, time, { level, tone, snappy }) { outputVCA.amplitude.value = outputLevel; // envelopes - const noiseEnv = new ADGenerator(LINEAR, 0.1, 75, 0, 0.5); + const noiseEnv = new ADGenerator(LINEAR, 0.1, 160, 0, 0.9); const snappyEnv = new ADGenerator(LINEAR, 0.1, 50, 0, snappyEnvAmt); // module routing From 525cfc8f0c62d97ad2b75f682e41db262d158e6c Mon Sep 17 00:00:00 2001 From: Lance Jordan Date: Sat, 7 Jan 2017 15:29:39 -0500 Subject: [PATCH 3/3] Progress On Snare. Still Needs Work --- src/synth/drumModules/snareDrum.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/synth/drumModules/snareDrum.js b/src/synth/drumModules/snareDrum.js index b5f28a3..e511406 100644 --- a/src/synth/drumModules/snareDrum.js +++ b/src/synth/drumModules/snareDrum.js @@ -1,18 +1,21 @@ import VCO, { SINE, WHITE_NOISE } from 'synth/basics/vco'; import VCF, { HIGHPASS } from 'synth/basics/vcf'; import VCA from 'synth/basics/vca'; -import ADGenerator, { LINEAR } from 'synth/basics/ADGenerator'; +import ADGenerator, { LINEAR, EXPONENTIAL } from 'synth/basics/ADGenerator'; import {equalPower} from 'helpers'; - -const highOscFreq = 476; -const lowOscFreq = 238; - +var highOscFreq = 478; +var lowOscFreq = 238; export default function (audioCtx, destination, time, { level, tone, snappy }) { + tone = tone == 0 ? 1 : tone; // parameters const outputLevel = equalPower(level); - const noiseVCFFreq = (tone * 100) + 500; - const snappyEnvAmt = snappy / 180; - + const noiseVCFFreq = 300; + const snappyEnvAmt = snappy / 10; + var oscVCFFreq = (function(){ + var freq = 20; + freq = freq * tone + return freq; + })(); // audio modules const highOsc = new VCO(SINE, audioCtx); highOsc.frequency.value = highOscFreq; @@ -24,6 +27,9 @@ export default function (audioCtx, destination, time, { level, tone, snappy }) { const noiseVCF = new VCF(HIGHPASS, audioCtx); noiseVCF.frequency.value = noiseVCFFreq; + + const oscVCF = new VCF(HIGHPASS, audioCtx); + oscVCF.frequency.value = oscVCFFreq; const oscVCA = new VCA(audioCtx); const noiseVCA = new VCA(audioCtx); @@ -32,14 +38,14 @@ export default function (audioCtx, destination, time, { level, tone, snappy }) { outputVCA.amplitude.value = outputLevel; // envelopes - const noiseEnv = new ADGenerator(LINEAR, 0.1, 160, 0, 0.9); - const snappyEnv = new ADGenerator(LINEAR, 0.1, 50, 0, snappyEnvAmt); + const noiseEnv = new ADGenerator(EXPONENTIAL, 0.1, 100, 0, snappyEnvAmt*.5); + const snappyEnv = new ADGenerator(EXPONENTIAL, 0.1, 80, 0, tone); // module routing highOsc.connect(oscVCA); lowOsc.connect(oscVCA); oscVCA.connect(outputVCA); - + oscVCF.connect(oscVCF); noiseOsc.connect(noiseVCF); noiseVCF.connect(noiseVCA); noiseVCA.connect(outputVCA);