spectrum doc

This commit is contained in:
Felix Roos 2024-12-16 23:18:20 +01:00
parent 8a33c171f5
commit eb02997836
2 changed files with 16 additions and 0 deletions

View File

@ -6,6 +6,18 @@ import { analysers, getAnalyzerData } from 'superdough';
* Renders a spectrum analyzer for the incoming audio signal.
* @name spectrum
* @param {object} config optional config with options:
* @param {integer} thickness line thickness in px (default 3)
* @param {integer} speed scroll speed (default 1)
* @param {integer} min min db (default -80)
* @param {integer} max max db (default 0)
* @example
* n("<0 4 <2 3> 1>*3")
* .off(1/8, add(n(5)))
* .off(1/5, add(n(7)))
* .scale("d3:minor:pentatonic")
* .s('sine')
* .dec(.3).room(.5)
* ._spectrum()
*/
let latestColor = {};
Pattern.prototype.spectrum = function (config = {}) {

View File

@ -99,6 +99,10 @@ What follows is the API doc of all the options you can pass:
<JsDoc client:idle name="pitchwheel" h={0} />
## Spectrum
<JsDoc client:idle name="spectrum" h={0} />
## markcss
<JsDoc client:idle name="markcss" h={0} />