Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mo deeper - Improved 808 Kick sound #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/initialState.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default Immutable({
selectedPlayFillPattern: 0,
fillScheduled: false,

tempo: 135,
tempo: 118,
fineTempo: 0,

currentStep: 0,
Expand All @@ -132,4 +132,4 @@ export default Immutable({
clearDragging: false,

pendingPatternLength: 0
})
})
18 changes: 9 additions & 9 deletions src/synth/drumModules/bassDrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -29,13 +29,13 @@ 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.6, audioCtx);
const softClipper = new SoftClipper(0.7, 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);
Expand Down Expand Up @@ -64,4 +64,4 @@ export default function (audioCtx, destination, time, {level, tone, decay}) {
}, (time - audioCtx.currentTime) + 1000);

return outputVCA;
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The work here does sound a lot more like the original, nice work!

6 changes: 3 additions & 3 deletions src/synth/drumModules/snareDrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really think that this is too long of a decay time. The decay time on the snare is documented to be 60ms, and I had just nudged it a bit up to 75ms to account for the differences in the envelope curves.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would trust ears over eyes. If you listen to actual 808 Snare it has a much longer sounding decay

Copy link
Author

@lacostenycoder lacostenycoder Jan 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the waveforms you can see that the original 808 sample trails off much longer, around 260ms

808-sample-snare

vs your snare around 130ms
io-808-snare

This is just to illustrate the sample behavior. I feel the snare needs a lot of work. It really sounds nothing like a real 808 snare. IMHO it's better to make something that SOUNDS more like an 808 in practice than trying to match specs that really don't hold true anyway. Analog gears have many anomalies including the pre-amp and filters etc that also effect the sound. When I have time I will see how I can further improve the sound of the snare and other instruments. But sound improvement / design is always subjective.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything in the code that mimics the subtle nuances of the bridged T-Network components used in both the Kick and Snare sounds of a real 808? If not, I think we can agree that just setting basic ADSR envelops to certain specs probably won't do the trick. We also don't know what frequencies are used and so again I think we're guessing and need to trust our ears. I suppose you've already looked at http://fa.utfs.org/diy/rolandtr808/roland_TR-808_service-manual.pdf
Interesting info here too: https://www.kvraudio.com/forum/viewtopic.php?p=5778538

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case the lengthening of the snare's decay time should also go with a change to an EXPONENTIAL type AD envelope. In the case of the bridged-t osc I'm still experimenting with ways to emulate it but haven't had much luck so far.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been tweaking the snare for the last few hrs. trying a few different things.
One thing for sure is that the behavior of Tone and Snappy don't currently resemble the 808 snare. I think I made some progress but not there yet. My approach is to try to understand what sound / dynamics are effected by the sound module. If you totally roll off the snappy on https://codepen.io/lacostenycoder/full/bgbQzX/ for example you'll hear there is no snare rattle tone. So what snappy does really sounds more like it's must mixing in the White noise. I sort of have that part worked out I just pushed update with where I'm out. I have some other ideas I'm gonna try. Are you on Gitter or Slack? Maybe we can hack at this together if you have time. LMK

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey it's been a while, were any of the ideas here any help?

const snappyEnv = new ADGenerator(LINEAR, 0.1, 50, 0, snappyEnvAmt);

// module routing
Expand Down