removing comments
This commit is contained in:
parent
c3cd5d08c9
commit
c625096f59
1 changed files with 0 additions and 7 deletions
|
|
@ -3,10 +3,6 @@ import { registerSound, getAudioContext } from './superdough.mjs';
|
||||||
import { getOscillator, gainNode, getEnvelope, getExpEnvelope } from './helpers.mjs';
|
import { getOscillator, gainNode, getEnvelope, getExpEnvelope } from './helpers.mjs';
|
||||||
|
|
||||||
const fm = (osc, harmonicityRatio, modulationIndex, wave) => {
|
const fm = (osc, harmonicityRatio, modulationIndex, wave) => {
|
||||||
/*
|
|
||||||
* This function helps to setup a modulator for FM Synthesis
|
|
||||||
* @returns a modulator
|
|
||||||
*/
|
|
||||||
const carrfreq = osc.frequency.value;
|
const carrfreq = osc.frequency.value;
|
||||||
const modfreq = carrfreq * harmonicityRatio;
|
const modfreq = carrfreq * harmonicityRatio;
|
||||||
const modgain = modfreq * modulationIndex;
|
const modgain = modfreq * modulationIndex;
|
||||||
|
|
@ -14,9 +10,6 @@ const fm = (osc, harmonicityRatio, modulationIndex, wave) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const mod = (freq, range = 1, type) => {
|
const mod = (freq, range = 1, type) => {
|
||||||
/*
|
|
||||||
* This function creates an oscillator
|
|
||||||
*/
|
|
||||||
const ctx = getAudioContext();
|
const ctx = getAudioContext();
|
||||||
const osc = ctx.createOscillator();
|
const osc = ctx.createOscillator();
|
||||||
osc.type = type;
|
osc.type = type;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue