Skip to content

Commit

Permalink
added jsdoc files
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhattwick committed Aug 2, 2024
1 parent 3bc2ec5 commit 86fcc59
Show file tree
Hide file tree
Showing 44 changed files with 26,772 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package-lock.json
/build

# docs
/docs


# misc
.DS_Store
Expand Down
133 changes: 133 additions & 0 deletions docs/m080/0.1.0/AnalogDelay.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>AnalogDelay.js - Documentation</title>

<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="AnalogDelay_AnalogDelay.html">AnalogDelay</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Cymbal.html">Cymbal</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#connect">connect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#createKnob">createKnob</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#disconnect">disconnect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#hideGui">hideGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#initGui">initGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#listPresets">listPresets</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#loadPreset">loadPreset</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#sequence">sequence</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#setADSR">setADSR</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#setFilterADSR">setFilterADSR</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#showGui">showGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#trigger">trigger</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#triggerAttack">triggerAttack</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#triggerAttackRelease">triggerAttackRelease</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Cymbal.html#triggerRelease">triggerRelease</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="DrumTemplate.html">DrumTemplate</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#connect">connect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#createKnob">createKnob</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#disconnect">disconnect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#hideGui">hideGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#initGui">initGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#listPresets">listPresets</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#loadPreset">loadPreset</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#sequence">sequence</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#setADSR">setADSR</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#setFilterADSR">setFilterADSR</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#showGui">showGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#trigger">trigger</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#triggerAttack">triggerAttack</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#triggerAttackRelease">triggerAttackRelease</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="DrumTemplate.html#triggerRelease">triggerRelease</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="MonophonicTemplate.html">MonophonicTemplate</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#connect">connect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#createKnob">createKnob</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#disconnect">disconnect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#hideGui">hideGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#initGui">initGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#listPresets">listPresets</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#loadPreset">loadPreset</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#sequence">sequence</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#setADSR">setADSR</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#setFilterADSR">setFilterADSR</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#showGui">showGui</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#triggerAttack">triggerAttack</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#triggerAttackRelease">triggerAttackRelease</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="MonophonicTemplate.html#triggerRelease">triggerRelease</a></span></li>
</nav>

<div id="main">

<h1 class="page-title">AnalogDelay.js</h1>







<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* AnalogDelay.js
*
* Simple approximation of an analog delay
*
* Signal path:
* input -> hpf -> gain -> waveShaper -> lpf -> delay -> wet -> output
* -> feedback -> hpf
* input -> dry -> output
*
* @class
*/
import p5 from 'p5';
import * as Tone from 'tone';
import { DelayOp } from './DelayOp.js';

export class AnalogDelay {
/**
* Creates an instance of AnalogDelay.
* @constructor
* @param {number} [initialTime=0.1] - Initial delay time in seconds.
* @param {number} [initialFB=0] - Initial feedback amount.
*/
constructor(initialTime = 0.1, initialFB = 0) {
this.input = new Tone.Multiply(1);
this.hpf = new Tone.Filter({ type: 'highpass', frequency: 20, Q: 0 });
this.gain = new Tone.Multiply(0.1);
this.waveShaper = new Tone.WaveShaper((x) => { return x });
this.lpf = new Tone.Filter({ type: 'lowpass', frequency: 5000, Q: 0, slope: '-24' });
this.delay = new Tone.Delay(initialTime);
this.feedback = new Tone.Multiply(initialFB);
this.wet = new Tone.Multiply(10);
this.dry = new Tone.Multiply(1);
this.output = new Tone.Multiply(1);

// Connecting signal path
this.input.connect(this.dry);
this.input.connect(this.hpf);
this.hpf.connect(this.lpf);
this.lpf.connect(this.gain);
this.gain.connect(this.waveShaper);
this.waveShaper.connect(this.delay);
this.delay.connect(this.feedback);
this.feedback.connect(this.hpf);
this.delay.connect(this.wet);
this.wet.connect(this.output);
this.dry.connect(this.output);
}

/**
* Connect the output to a destination.
* @param {Tone.Signal | AudioNode} destination - The destination to connect to.
*/
connect(destination) {
if (destination.input) {
this.output.connect(destination.input);
} else {
this.output.connect(destination);
}
}

/**
* Disconnect the output from a destination.
* @param {Tone.Signal | AudioNode} destination - The destination to disconnect from.
*/
disconnect(destination) {
if (destination.input) {
this.output.disconnect(destination.input);
} else {
this.output.disconnect(destination);
}
}
}
</code></pre>
</article>
</section>




</div>

<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Aug 01 2024 21:44:36 GMT-0400 (Eastern Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
Loading

0 comments on commit 86fcc59

Please sign in to comment.