From 5032b4e966ecd3c92c47497457a5bf0576d85a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Volhejn?= Date: Sat, 11 Oct 2025 14:11:50 +0200 Subject: [PATCH] Rename group -> tags --- jsdoc/jsdoc-synonyms.js | 4 +- packages/core/controls.mjs | 324 +++++++++++++++--------------- packages/core/pattern.mjs | 270 ++++++++++++------------- packages/core/signal.mjs | 104 +++++----- packages/motion/motion.mjs | 30 +-- packages/superdough/reverbGen.mjs | 2 +- packages/supradough/dough.mjs | 2 +- 7 files changed, 368 insertions(+), 368 deletions(-) diff --git a/jsdoc/jsdoc-synonyms.js b/jsdoc/jsdoc-synonyms.js index 423c7ad6e..c5860626a 100644 --- a/jsdoc/jsdoc-synonyms.js +++ b/jsdoc/jsdoc-synonyms.js @@ -13,10 +13,10 @@ function defineTags(dictionary) { }, }); - dictionary.defineTag('group', { + dictionary.defineTag('tags', { mustHaveValue: true, onTagged: function (doclet, tag) { - doclet.group = tag.value; + doclet.tags = tag.value.split(/[ ,]+/); }, }); } diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index e43af8967..44b358e67 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -77,7 +77,7 @@ export function registerControl(names, ...aliases) { * separated by ':'. * * @name s - * @group samples + * @tags samples * @param {string | Pattern} sound The sound / pattern of sounds to pick * @synonyms sound * @example @@ -92,7 +92,7 @@ export const { s, sound } = registerControl(['s', 'n', 'gain'], 'sound'); * Position in the wavetable of the wavetable oscillator * * @name wt - * @group effects + * @tags effects * @param {number | Pattern} position Position in the wavetable from 0 to 1 * @synonyms wavetablePosition * @example @@ -104,7 +104,7 @@ export const { wt, wavetablePosition } = registerControl('wt', 'wavetablePositio * Amount of envelope applied wavetable oscillator's position envelope * * @name wtenv - * @group effects + * @tags effects * @param {number | Pattern} amount between 0 and 1 */ export const { wtenv } = registerControl('wtenv'); @@ -112,7 +112,7 @@ export const { wtenv } = registerControl('wtenv'); * Attack time of the wavetable oscillator's position envelope * * @name wtattack - * @group effects + * @tags effects * @synonyms wtatt * @param {number | Pattern} time attack time in seconds */ @@ -122,7 +122,7 @@ export const { wtattack, wtatt } = registerControl('wtattack', 'wtatt'); * Decay time of the wavetable oscillator's position envelope * * @name wtdecay - * @group effects + * @tags effects * @synonyms wtdec * @param {number | Pattern} time decay time in seconds */ @@ -132,7 +132,7 @@ export const { wtdecay, wtdec } = registerControl('wtdecay', 'wtdec'); * Sustain time of the wavetable oscillator's position envelope * * @name wtsustain - * @group effects + * @tags effects * @synonyms wtsus * @param {number | Pattern} gain sustain level (0 to 1) */ @@ -142,7 +142,7 @@ export const { wtsustain, wtsus } = registerControl('wtsustain', 'wtsus'); * Release time of the wavetable oscillator's position envelope * * @name wtrelease - * @group effects + * @tags effects * @synonyms wtrel * @param {number | Pattern} time release time in seconds */ @@ -152,7 +152,7 @@ export const { wtrelease, wtrel } = registerControl('wtrelease', 'wtrel'); * Rate of the LFO for the wavetable oscillator's position * * @name wtrate - * @group effects + * @tags effects * @param {number | Pattern} rate rate in hertz */ export const { wtrate } = registerControl('wtrate'); @@ -160,7 +160,7 @@ export const { wtrate } = registerControl('wtrate'); * cycle synced rate of the LFO for the wavetable oscillator's position * * @name wtsync - * @group effects + * @tags effects * @param {number | Pattern} rate rate in cycles */ export const { wtsync } = registerControl('wtsync'); @@ -169,7 +169,7 @@ export const { wtsync } = registerControl('wtsync'); * Depth of the LFO for the wavetable oscillator's position * * @name wtdepth - * @group effects + * @tags effects * @param {number | Pattern} depth depth of modulation */ export const { wtdepth } = registerControl('wtdepth'); @@ -178,7 +178,7 @@ export const { wtdepth } = registerControl('wtdepth'); * Shape of the LFO for the wavetable oscillator's position * * @name wtshape - * @group effects + * @tags effects * @param {number | Pattern} shape Shape of the lfo (0, 1, 2, ..) */ export const { wtshape } = registerControl('wtshape'); @@ -187,7 +187,7 @@ export const { wtshape } = registerControl('wtshape'); * DC offset of the LFO for the wavetable oscillator's position * * @name wtdc - * @group effects + * @tags effects * @param {number | Pattern} dcoffset dc offset. set to 0 for unipolar */ export const { wtdc } = registerControl('wtdc'); @@ -196,7 +196,7 @@ export const { wtdc } = registerControl('wtdc'); * Skew of the LFO for the wavetable oscillator's position * * @name wtskew - * @group effects + * @tags effects * @param {number | Pattern} skew How much to bend the LFO shape */ export const { wtskew } = registerControl('wtskew'); @@ -205,7 +205,7 @@ export const { wtskew } = registerControl('wtskew'); * Amount of warp (alteration of the waveform) to apply to the wavetable oscillator * * @name warp - * @group effects + * @tags effects * @param {number | Pattern} amount Warp of the wavetable from 0 to 1 * @synonyms wavetableWarp * @example @@ -218,7 +218,7 @@ export const { warp, wavetableWarp } = registerControl('warp', 'wavetableWarp'); * Attack time of the wavetable oscillator's warp envelope * * @name warpattack - * @group effects + * @tags effects * @synonyms warpatt * @param {number | Pattern} time attack time in seconds */ @@ -228,7 +228,7 @@ export const { warpattack, warpatt } = registerControl('warpattack', 'warpatt'); * Decay time of the wavetable oscillator's warp envelope * * @name warpdecay - * @group effects + * @tags effects * @synonyms warpdec * @param {number | Pattern} time decay time in seconds */ @@ -238,7 +238,7 @@ export const { warpdecay, warpdec } = registerControl('warpdecay', 'warpdec'); * Sustain time of the wavetable oscillator's warp envelope * * @name warpsustain - * @group effects + * @tags effects * @synonyms warpsus * @param {number | Pattern} gain sustain level (0 to 1) */ @@ -248,7 +248,7 @@ export const { warpsustain, warpsus } = registerControl('warpsustain', 'warpsus' * Release time of the wavetable oscillator's warp envelope * * @name warprelease - * @group effects + * @tags effects * @synonyms warprel * @param {number | Pattern} time release time in seconds */ @@ -258,7 +258,7 @@ export const { warprelease, warprel } = registerControl('warprelease', 'warprel' * Rate of the LFO for the wavetable oscillator's warp * * @name warprate - * @group effects + * @tags effects * @param {number | Pattern} rate rate in hertz */ export const { warprate } = registerControl('warprate'); @@ -267,7 +267,7 @@ export const { warprate } = registerControl('warprate'); * Depth of the LFO for the wavetable oscillator's warp * * @name warpdepth - * @group effects + * @tags effects * @param {number | Pattern} depth depth of modulation */ export const { warpdepth } = registerControl('warpdepth'); @@ -276,7 +276,7 @@ export const { warpdepth } = registerControl('warpdepth'); * Shape of the LFO for the wavetable oscillator's warp * * @name warpshape - * @group effects + * @tags effects * @param {number | Pattern} shape Shape of the lfo (0, 1, 2, ..) */ export const { warpshape } = registerControl('warpshape'); @@ -285,7 +285,7 @@ export const { warpshape } = registerControl('warpshape'); * DC offset of the LFO for the wavetable oscillator's warp * * @name warpdc - * @group effects + * @tags effects * @param {number | Pattern} dcoffset dc offset. set to 0 for unipolar */ export const { warpdc } = registerControl('warpdc'); @@ -294,7 +294,7 @@ export const { warpdc } = registerControl('warpdc'); * Skew of the LFO for the wavetable oscillator's warp * * @name warpskew - * @group effects + * @tags effects * @param {number | Pattern} skew How much to bend the LFO shape */ export const { warpskew } = registerControl('warpskew'); @@ -306,7 +306,7 @@ export const { warpskew } = registerControl('warpskew'); * spin, chaos, primes, binary, brownian, reciprocal, wormhole, logistic, sigmoid, fractal, flip * * @name warpmode - * @group effects + * @tags effects * @param {number | string | Pattern} mode Warp mode * @synonyms wavetableWarpMode * @example @@ -320,7 +320,7 @@ export const { warpmode, wavetableWarpMode } = registerControl('warpmode', 'wave * Amount of randomness of the initial phase of the wavetable oscillator. * * @name wtphaserand - * @group effects + * @tags effects * @param {number | Pattern} amount Randomness of the initial phase. Between 0 (not random) and 1 (fully random) * @synonyms wavetablePhaseRand * @example @@ -333,7 +333,7 @@ export const { wtphaserand, wavetablePhaseRand } = registerControl('wtphaserand' * Amount of envelope applied wavetable oscillator's position envelope * * @name warpenv - * @group effects + * @tags effects * @param {number | Pattern} amount between 0 and 1 */ export const { warpenv } = registerControl('warpenv'); @@ -342,7 +342,7 @@ export const { warpenv } = registerControl('warpenv'); * cycle synced rate of the LFO for the wavetable warp position * * @name warpsync - * @group effects + * @tags effects * @param {number | Pattern} rate rate in cycles */ export const { warpsync } = registerControl('warpsync'); @@ -351,7 +351,7 @@ export const { warpsync } = registerControl('warpsync'); * Define a custom webaudio node to use as a sound source. * * @name source - * @group external_io + * @tags external_io * @synonyms src * @param {function} getSource * @synonyms src @@ -364,7 +364,7 @@ export const { source, src } = registerControl('source', 'src'); * `n` can also be used to play midi numbers, but it is recommended to use `note` instead. * * @name n - * @group samples + * @tags samples * @param {number | Pattern} value sample index starting from 0 * @example * s("bd sd [~ bd] sd,hh*6").n("<0 1>") @@ -383,7 +383,7 @@ export const { n } = registerControl('n'); * You can also use midi numbers instead of note names, where 69 is mapped to A4 440Hz in 12EDO. * * @name note - * @group music_theory + * @tags music_theory * @example * note("c a f e") * @example @@ -399,7 +399,7 @@ export const { note } = registerControl(['note', 'n']); * A pattern of numbers that speed up (or slow down) samples while they play. Currently only supported by osc / superdirt. * * @name accelerate - * @group samples + * @tags samples * @param {number | Pattern} amount acceleration. * @superdirtOnly * @example @@ -411,7 +411,7 @@ export const { accelerate } = registerControl('accelerate'); * Sets the velocity from 0 to 1. Is multiplied together with gain. * * @name velocity - * @group effects + * @tags effects * @example * s("hh*8") * .gain(".4!2 1 .4!2 1 .4 1") @@ -422,7 +422,7 @@ export const { velocity } = registerControl('velocity'); * Controls the gain by an exponential amount. * * @name gain - * @group effects + * @tags effects * @param {number | Pattern} amount gain. * @example * s("hh*8").gain(".4!2 1 .4!2 1 .4 1").fast(2) @@ -433,7 +433,7 @@ export const { gain } = registerControl('gain'); * Gain applied after all effects have been processed. * * @name postgain - * @group effects + * @tags effects * @example * s("bd sd [~ bd] sd,hh*8") * .compressor("-20:20:10:.002:.02").postgain(1.5) @@ -444,7 +444,7 @@ export const { postgain } = registerControl('postgain'); * Like `gain`, but linear. * * @name amp - * @group effects + * @tags effects * @param {number | Pattern} amount gain. * @superdirtOnly * @example @@ -456,7 +456,7 @@ export const { amp } = registerControl('amp'); * Amplitude envelope attack time: Specifies how long it takes for the sound to reach its peak value, relative to the onset. * * @name attack - * @group effects + * @tags effects * @param {number | Pattern} attack time in seconds. * @synonyms att * @example @@ -472,7 +472,7 @@ export const { attack, att } = registerControl('attack', 'att'); * while decimal numbers and complex ratios sound metallic. * * @name fmh - * @group effects + * @tags effects * @param {number | Pattern} harmonicity * @example * note("c e g b g e") @@ -487,7 +487,7 @@ export const { fmh } = registerControl(['fmh', 'fmi'], 'fmh'); * Controls the modulation index, which defines the brightness of the sound. * * @name fm - * @group effects + * @tags effects * @param {number | Pattern} brightness modulation index * @synonyms fmi * @example @@ -502,7 +502,7 @@ export const { fmi, fm } = registerControl(['fmi', 'fmh'], 'fm'); * Ramp type of fm envelope. Exp might be a bit broken.. * * @name fmenv - * @group effects + * @tags effects * @param {number | Pattern} type lin | exp * @example * note("c e g b g e") @@ -518,7 +518,7 @@ export const { fmenv } = registerControl('fmenv'); * Attack time for the FM envelope: time it takes to reach maximum modulation * * @name fmattack - * @group effects + * @tags effects * @param {number | Pattern} time attack time * @example * note("c e g b g e") @@ -533,7 +533,7 @@ export const { fmattack } = registerControl('fmattack'); * Waveform of the fm modulator * * @name fmwave - * @group effects + * @tags effects * @param {number | Pattern} wave waveform * @example * n("0 1 2 3".fast(4)).scale("d:minor").s("sine").fmwave("").fm(4).fmh(2.01) @@ -547,7 +547,7 @@ export const { fmwave } = registerControl('fmwave'); * Decay time for the FM envelope: seconds until the sustain level is reached after the attack phase. * * @name fmdecay - * @group effects + * @tags effects * @param {number | Pattern} time decay time * @example * note("c e g b g e") @@ -562,7 +562,7 @@ export const { fmdecay } = registerControl('fmdecay'); * Sustain level for the FM envelope: how much modulation is applied after the decay phase * * @name fmsustain - * @group effects + * @tags effects * @param {number | Pattern} level sustain level * @example * note("c e g b g e") @@ -581,7 +581,7 @@ export const { fmvelocity } = registerControl('fmvelocity'); * Select the sound bank to use. To be used together with `s`. The bank name (+ "_") will be prepended to the value of `s`. * * @name bank - * @group samples + * @tags samples * @param {string | Pattern} bank the name of the bank * @example * s("bd sd [~ bd] sd").bank('RolandTR909') // = s("RolandTR909_bd RolandTR909_sd") @@ -593,7 +593,7 @@ export const { bank } = registerControl('bank'); * mix control for the chorus effect * * @name chorus - * @group effects + * @tags effects * @param {string | Pattern} chorus mix amount between 0 and 1 * @example * note("d d a# a").s("sawtooth").chorus(.5) @@ -611,7 +611,7 @@ export const { fft } = registerControl('fft'); * Note that the decay is only audible if the sustain value is lower than 1. * * @name decay - * @group effects + * @tags effects * @param {number | Pattern} time decay time in seconds * @synonyms dec * @example @@ -623,7 +623,7 @@ export const { decay, dec } = registerControl('decay', 'dec'); * Amplitude envelope sustain level: The level which is reached after attack / decay, being sustained until the offset. * * @name sustain - * @group effects + * @tags effects * @param {number | Pattern} gain sustain level between 0 and 1 * @synonyms sus * @example @@ -635,7 +635,7 @@ export const { sustain, sus } = registerControl('sustain', 'sus'); * Amplitude envelope release time: The time it takes after the offset to go from sustain level to zero. * * @name release - * @group effects + * @tags effects * @param {number | Pattern} time release time in seconds * @synonyms rel * @example @@ -650,7 +650,7 @@ export const { hold } = registerControl('hold'); * can also optionally supply the 'bpq' parameter separated by ':'. * * @name bpf - * @group effects + * @tags effects * @param {number | Pattern} frequency center frequency * @synonyms bandf, bp * @example @@ -663,7 +663,7 @@ export const { bandf, bpf, bp } = registerControl(['bandf', 'bandq', 'bpenv'], ' * Sets the **b**and-**p**ass **q**-factor (resonance). * * @name bpq - * @group effects + * @tags effects * @param {number | Pattern} q q factor * @synonyms bandq * @example @@ -678,7 +678,7 @@ export const { bandq, bpq } = registerControl('bandq', 'bpq'); * * @memberof Pattern * @name begin - * @group samples + * @tags samples * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample * @example * samples({ rave: 'rave/AREUREADY.wav' }, 'github:tidalcycles/dirt-samples') @@ -691,7 +691,7 @@ export const { begin } = registerControl('begin'); * * @memberof Pattern * @name end - * @group samples + * @tags samples * @param {number | Pattern} length 1 = whole sample, .5 = half sample, .25 = quarter sample etc.. * @example * s("bd*2,oh*4").end("<.1 .2 .5 1>").fast(2) @@ -704,7 +704,7 @@ export const { end } = registerControl('end'); * To change the loop region, use loopBegin / loopEnd. * * @name loop - * @group samples + * @tags samples * @param {number | Pattern} on If 1, the sample is looped * @example * s("casio").loop(1) @@ -717,7 +717,7 @@ export const { loop } = registerControl('loop'); * Note: Samples starting with wt_ will automatically loop! (wt = wavetable) * * @name loopBegin - * @group samples + * @tags samples * @param {number | Pattern} time between 0 and 1, where 1 is the length of the sample * @synonyms loopb * @example @@ -731,7 +731,7 @@ export const { loopBegin, loopb } = registerControl('loopBegin', 'loopb'); * Note that the loop point must be inbetween `begin` and `end`, and after `loopBegin`! * * @name loopEnd - * @group samples + * @tags samples * @param {number | Pattern} time between 0 and 1, where 1 is the length of the sample * @synonyms loope * @example @@ -743,7 +743,7 @@ export const { loopEnd, loope } = registerControl('loopEnd', 'loope'); * Bit crusher effect. * * @name crush - * @group effects + * @tags effects * @param {number | Pattern} depth between 1 (for drastic reduction in bit-depth) to 16 (for barely no reduction). * @example * s(",hh*3").fast(2).crush("<16 8 7 6 5 4 3 2>") @@ -755,7 +755,7 @@ export const { crush } = registerControl('crush'); * Fake-resampling for lowering the sample rate. Caution: This effect seems to only work in chromium based browsers * * @name coarse - * @group effects + * @tags effects * @param {number | Pattern} factor 1 for original 2 for half, 3 for a third and so on. * @example * s("bd sd [~ bd] sd,hh*8").coarse("<1 4 8 16 32>") @@ -767,7 +767,7 @@ export const { coarse } = registerControl('coarse'); * Modulate the amplitude of a sound with a continuous waveform * * @name tremolo - * @group effects + * @tags effects * @synonyms trem * @param {number | Pattern} speed modulation speed in HZ * @example @@ -780,7 +780,7 @@ export const { tremolo } = registerControl(['tremolo', 'tremolodepth', 'tremolos * Modulate the amplitude of a sound with a continuous waveform * * @name tremolosync - * @group effects + * @tags effects * @synonyms tremsync * @param {number | Pattern} cycles modulation speed in cycles * @example @@ -796,7 +796,7 @@ export const { tremolosync } = registerControl( * Depth of amplitude modulation * * @name tremolodepth - * @group effects + * @tags effects * @synonyms tremdepth * @param {number | Pattern} depth * @example @@ -808,7 +808,7 @@ export const { tremolodepth } = registerControl('tremolodepth', 'tremdepth'); * Alter the shape of the modulation waveform * * @name tremoloskew - * @group effects + * @tags effects * @synonyms tremskew * @param {number | Pattern} amount between 0 & 1, the shape of the waveform * @example @@ -821,7 +821,7 @@ export const { tremoloskew } = registerControl('tremoloskew', 'tremskew'); * Alter the phase of the modulation waveform * * @name tremolophase - * @group effects + * @tags effects * @synonyms tremphase * @param {number | Pattern} offset the offset in cycles of the modulation * @example @@ -834,7 +834,7 @@ export const { tremolophase } = registerControl('tremolophase', 'tremphase'); * Shape of amplitude modulation * * @name tremoloshape - * @group effects + * @tags effects * @synonyms tremshape * @param {number | Pattern} shape tri | square | sine | saw | ramp * @example @@ -846,7 +846,7 @@ export const { tremoloshape } = registerControl('tremoloshape', 'tremshape'); * Filter overdrive for supported filter types * * @name drive - * @group effects + * @tags effects * @param {number | Pattern} amount * @example * note("{f g g c d a a#}%16".sub(17)).s("supersaw").lpenv(8).lpf(150).lpq(.8).ftype('ladder').drive("<.5 4>") @@ -860,7 +860,7 @@ export const { drive } = registerControl('drive'); * Can be applied to multiple orbits with the ':' mininotation, e.g. `duckorbit("2:3")` * * @name duckorbit - * @group effects + * @tags effects * @synonyms duck * @param {number | Pattern} orbit target orbit * @example @@ -881,7 +881,7 @@ export const { duck } = registerControl('duckorbit', 'duck'); * Note: this requires first applying the effect to multiple orbits with e.g. `duckorbit("2:3")`. * * @name duckdepth - * @group effects + * @tags effects * @param {number | Pattern} depth depth of modulation from 0 to 1 * @example * stack( n(run(8)).scale("c:minor").s("sawtooth").delay(.7).orbit(2), s("bd:4!4").beat("0,4,8,11,14",16).duckorbit(2).duckattack(0.2).duckdepth("<1 .9 .6 0>")) @@ -901,7 +901,7 @@ export const { duckdepth } = registerControl('duckdepth'); * Note: this requires first applying the effect to multiple orbits with e.g. `duckorbit("2:3")`. * * @name duckonset - * @group effects + * @tags effects * @synonyms duckons * * @param {number | Pattern} time The onset time in seconds @@ -929,7 +929,7 @@ export const { duckonset } = registerControl('duckonset', 'duckons'); * Note: this requires first applying the effect to multiple orbits with e.g. `duckorbit("2:3")`. * * @name duckattack - * @group effects + * @tags effects * @synonyms duckatt * * @param {number | Pattern} time The attack time in seconds @@ -974,7 +974,7 @@ export const { byteBeatStartTime, bbst } = registerControl('byteBeatStartTime', * Allows you to set the output channels on the interface * * @name channels - * @group external_io + * @tags external_io * @synonyms ch * * @param {number | Pattern} channels pattern the output channels @@ -988,7 +988,7 @@ export const { channels, ch } = registerControl('channels', 'ch'); * Controls the pulsewidth of the pulse oscillator * * @name pw - * @group effects + * @tags effects * @param {number | Pattern} pulsewidth * @example * note("{f a c e}%16").s("pulse").pw(".8:1:.2") @@ -1001,7 +1001,7 @@ export const { pw } = registerControl(['pw', 'pwrate', 'pwsweep']); * Controls the lfo rate for the pulsewidth of the pulse oscillator * * @name pwrate - * @group effects + * @tags effects * @param {number | Pattern} rate * @example * n(run(8)).scale("D:pentatonic").s("pulse").pw("0.5").pwrate("<5 .1 25>").pwsweep("<0.3 .8>") @@ -1014,7 +1014,7 @@ export const { pwrate } = registerControl('pwrate'); * Controls the lfo sweep for the pulsewidth of the pulse oscillator * * @name pwsweep - * @group effects + * @tags effects * @param {number | Pattern} sweep * @example * n(run(8)).scale("D:pentatonic").s("pulse").pw("0.5").pwrate("<5 .1 25>").pwsweep("<0.3 .8>") @@ -1026,7 +1026,7 @@ export const { pwsweep } = registerControl('pwsweep'); * Phaser audio effect that approximates popular guitar pedals. * * @name phaser - * @group effects + * @tags effects * @synonyms ph * @param {number | Pattern} speed speed of modulation * @example @@ -1044,7 +1044,7 @@ export const { phaserrate, ph, phaser } = registerControl( * The frequency sweep range of the lfo for the phaser effect. Defaults to 2000 * * @name phasersweep - * @group effects + * @tags effects * @synonyms phs * @param {number | Pattern} phasersweep most useful values are between 0 and 4000 * @example @@ -1058,7 +1058,7 @@ export const { phasersweep, phs } = registerControl('phasersweep', 'phs'); * The center frequency of the phaser in HZ. Defaults to 1000 * * @name phasercenter - * @group effects + * @tags effects * @synonyms phc * @param {number | Pattern} centerfrequency in HZ * @example @@ -1073,7 +1073,7 @@ export const { phasercenter, phc } = registerControl('phasercenter', 'phc'); * The amount the signal is affected by the phaser effect. Defaults to 0.75 * * @name phaserdepth - * @group effects + * @tags effects * @synonyms phd, phasdp * @param {number | Pattern} depth number between 0 and 1 * @example @@ -1088,7 +1088,7 @@ export const { phaserdepth, phd, phasdp } = registerControl('phaserdepth', 'phd' * Choose the channel the pattern is sent to in superdirt * * @name channel - * @group effects + * @tags effects * @param {number | Pattern} channel channel number * */ @@ -1097,7 +1097,7 @@ export const { channel } = registerControl('channel'); * In the style of classic drum-machines, `cut` will stop a playing sample as soon as another samples with in same cutgroup is to be played. An example would be an open hi-hat followed by a closed one, essentially muting the open. * * @name cut - * @group effects + * @tags effects * @param {number | Pattern} group cut group number * @example * s("[oh hh]*4").cut(1) @@ -1110,7 +1110,7 @@ export const { cut } = registerControl('cut'); * When using mininotation, you can also optionally add the 'lpq' parameter, separated by ':'. * * @name lpf - * @group effects + * @tags effects * @param {number | Pattern} frequency audible between 0 and 20000 * @synonyms cutoff, ctf, lp * @example @@ -1124,7 +1124,7 @@ export const { cutoff, ctf, lpf, lp } = registerControl(['cutoff', 'resonance', /** * Sets the lowpass filter envelope modulation depth. * @name lpenv - * @group effects + * @tags effects * @param {number | Pattern} modulation depth of the lowpass filter envelope between 0 and _n_ * @synonyms lpe * @example @@ -1138,7 +1138,7 @@ export const { lpenv, lpe } = registerControl('lpenv', 'lpe'); /** * Sets the highpass filter envelope modulation depth. * @name hpenv - * @group effects + * @tags effects * @param {number | Pattern} modulation depth of the highpass filter envelope between 0 and _n_ * @synonyms hpe * @example @@ -1152,7 +1152,7 @@ export const { hpenv, hpe } = registerControl('hpenv', 'hpe'); /** * Sets the bandpass filter envelope modulation depth. * @name bpenv - * @group effects + * @tags effects * @param {number | Pattern} modulation depth of the bandpass filter envelope between 0 and _n_ * @synonyms bpe * @example @@ -1166,7 +1166,7 @@ export const { bpenv, bpe } = registerControl('bpenv', 'bpe'); /** * Sets the attack duration for the lowpass filter envelope. * @name lpattack - * @group effects + * @tags effects * @param {number | Pattern} attack time of the filter envelope * @synonyms lpa * @example @@ -1180,7 +1180,7 @@ export const { lpattack, lpa } = registerControl('lpattack', 'lpa'); /** * Sets the attack duration for the highpass filter envelope. * @name hpattack - * @group effects + * @tags effects * @param {number | Pattern} attack time of the highpass filter envelope * @synonyms hpa * @example @@ -1194,7 +1194,7 @@ export const { hpattack, hpa } = registerControl('hpattack', 'hpa'); /** * Sets the attack duration for the bandpass filter envelope. * @name bpattack - * @group effects + * @tags effects * @param {number | Pattern} attack time of the bandpass filter envelope * @synonyms bpa * @example @@ -1208,7 +1208,7 @@ export const { bpattack, bpa } = registerControl('bpattack', 'bpa'); /** * Sets the decay duration for the lowpass filter envelope. * @name lpdecay - * @group effects + * @tags effects * @param {number | Pattern} decay time of the filter envelope * @synonyms lpd * @example @@ -1222,7 +1222,7 @@ export const { lpdecay, lpd } = registerControl('lpdecay', 'lpd'); /** * Sets the decay duration for the highpass filter envelope. * @name hpdecay - * @group effects + * @tags effects * @param {number | Pattern} decay time of the highpass filter envelope * @synonyms hpd * @example @@ -1237,7 +1237,7 @@ export const { hpdecay, hpd } = registerControl('hpdecay', 'hpd'); /** * Sets the decay duration for the bandpass filter envelope. * @name bpdecay - * @group effects + * @tags effects * @param {number | Pattern} decay time of the bandpass filter envelope * @synonyms bpd * @example @@ -1252,7 +1252,7 @@ export const { bpdecay, bpd } = registerControl('bpdecay', 'bpd'); /** * Sets the sustain amplitude for the lowpass filter envelope. * @name lpsustain - * @group effects + * @tags effects * @param {number | Pattern} sustain amplitude of the lowpass filter envelope * @synonyms lps * @example @@ -1267,7 +1267,7 @@ export const { lpsustain, lps } = registerControl('lpsustain', 'lps'); /** * Sets the sustain amplitude for the highpass filter envelope. * @name hpsustain - * @group effects + * @tags effects * @param {number | Pattern} sustain amplitude of the highpass filter envelope * @synonyms hps * @example @@ -1282,7 +1282,7 @@ export const { hpsustain, hps } = registerControl('hpsustain', 'hps'); /** * Sets the sustain amplitude for the bandpass filter envelope. * @name bpsustain - * @group effects + * @tags effects * @param {number | Pattern} sustain amplitude of the bandpass filter envelope * @synonyms bps * @example @@ -1297,7 +1297,7 @@ export const { bpsustain, bps } = registerControl('bpsustain', 'bps'); /** * Sets the release time for the lowpass filter envelope. * @name lprelease - * @group effects + * @tags effects * @param {number | Pattern} release time of the filter envelope * @synonyms lpr * @example @@ -1313,7 +1313,7 @@ export const { lprelease, lpr } = registerControl('lprelease', 'lpr'); /** * Sets the release time for the highpass filter envelope. * @name hprelease - * @group effects + * @tags effects * @param {number | Pattern} release time of the highpass filter envelope * @synonyms hpr * @example @@ -1329,7 +1329,7 @@ export const { hprelease, hpr } = registerControl('hprelease', 'hpr'); /** * Sets the release time for the bandpass filter envelope. * @name bprelease - * @group effects + * @tags effects * @param {number | Pattern} release time of the bandpass filter envelope * @synonyms bpr * @example @@ -1345,7 +1345,7 @@ export const { bprelease, bpr } = registerControl('bprelease', 'bpr'); /** * Sets the filter type. The ladder filter is more aggressive. More types might be added in the future. * @name ftype - * @group effects + * @tags effects * @param {number | Pattern} type 12db (0), ladder (1), or 24db (2) * @example * note("{f g g c d a a#}%8").s("sawtooth").lpenv(4).lpf(500).ftype("<0 1 2>").lpq(1) @@ -1361,7 +1361,7 @@ export const { ftype } = registerControl('ftype'); /** * controls the center of the filter envelope. 0 is unipolar positive, .5 is bipolar, 1 is unipolar negative * @name fanchor - * @group effects + * @tags effects * @param {number | Pattern} center 0 to 1 * @example * note("{f g g c d a a#}%8").s("sawtooth").lpf("{1000}%2") @@ -1374,7 +1374,7 @@ export const { fanchor } = registerControl('fanchor'); * When using mininotation, you can also optionally add the 'hpq' parameter, separated by ':'. * * @name hpf - * @group effects + * @tags effects * @param {number | Pattern} frequency audible between 0 and 20000 * @synonyms hp, hcutoff * @example @@ -1389,7 +1389,7 @@ export const { fanchor } = registerControl('fanchor'); * Applies a vibrato to the frequency of the oscillator. * * @name vib - * @group effects + * @tags effects * @synonyms vibrato, v * @param {number | Pattern} frequency of the vibrato in hertz * @example @@ -1407,7 +1407,7 @@ export const { vib, vibrato, v } = registerControl(['vib', 'vibmod'], 'vibrato', * Adds pink noise to the mix * * @name noise - * @group generators + * @tags generators * @param {number | Pattern} wet wet amount * @example * sound("/2") @@ -1417,7 +1417,7 @@ export const { noise } = registerControl('noise'); * Sets the vibrato depth in semitones. Only has an effect if `vibrato` | `vib` | `v` is is also set * * @name vibmod - * @group effects + * @tags effects * @synonyms vmod * @param {number | Pattern} depth of vibrato (in semitones) * @example @@ -1436,7 +1436,7 @@ export const { hcutoff, hpf, hp } = registerControl(['hcutoff', 'hresonance', 'h * Controls the **h**igh-**p**ass **q**-value. * * @name hpq - * @group effects + * @tags effects * @param {number | Pattern} q resonance factor between 0 and 50 * @synonyms hresonance * @example @@ -1448,7 +1448,7 @@ export const { hresonance, hpq } = registerControl('hresonance', 'hpq'); * Controls the **l**ow-**p**ass **q**-value. * * @name lpq - * @group effects + * @tags effects * @param {number | Pattern} q resonance factor between 0 and 50 * @synonyms resonance * @example @@ -1461,7 +1461,7 @@ export const { resonance, lpq } = registerControl('resonance', 'lpq'); * DJ filter, below 0.5 is low pass filter, above is high pass filter. * * @name djf - * @group effects + * @tags effects * @param {number | Pattern} cutoff below 0.5 is low pass filter, above is high pass filter * @example * n(irand(16).seg(8)).scale("d:phrygian").s("supersaw").djf("<.5 .3 .2 .75>") @@ -1478,7 +1478,7 @@ export const { djf } = registerControl('djf'); * * * @name delay - * @group effects + * @tags effects * @param {number | Pattern} level between 0 and 1 * @example * s("bd bd").delay("<0 .25 .5 1>") @@ -1492,7 +1492,7 @@ export const { delay } = registerControl(['delay', 'delaytime', 'delayfeedback'] * Caution: Values >= 1 will result in a signal that gets louder and louder! Don't do it * * @name delayfeedback - * @group effects + * @tags effects * @param {number | Pattern} feedback between 0 and 1 * @synonyms delayfb, dfb * @example @@ -1506,7 +1506,7 @@ export const { delayfeedback, delayfb, dfb } = registerControl('delayfeedback', * Caution: Values >= 1 will result in a signal that gets louder and louder! Don't do it * * @name delayfeedback - * @group effects + * @tags effects * @param {number | Pattern} feedback between 0 and 1 * @synonyms delayfb, dfb * @example @@ -1518,7 +1518,7 @@ export const { delayspeed } = registerControl('delayspeed'); * Sets the time of the delay effect. * * @name delayspeed - * @group effects + * @tags effects, foo * @param {number | Pattern} delayspeed controls the pitch of the delay feedback * @synonyms delayt, dt * @example @@ -1531,7 +1531,7 @@ export const { delaytime, delayt, dt } = registerControl('delaytime', 'delayt', * Sets the time of the delay effect in cycles. * * @name delaysync - * @group effects + * @tags effects * @param {number | Pattern} cycles delay length in cycles * @synonyms delayt, dt * @example @@ -1544,7 +1544,7 @@ export const { delaysync } = registerControl('delaysync'); * Specifies whether delaytime is calculated relative to cps. * * @name lock - * @group effects + * @tags effects, foo * @param {number | Pattern} enable When set to 1, delaytime is a direct multiple of a cycle. * @superdirtOnly * @example @@ -1558,7 +1558,7 @@ export const { lock } = registerControl('lock'); * Set detune for stacked voices of supported oscillators * * @name detune - * @group effects + * @tags effects * @param {number | Pattern} amount * @synonyms det * @example @@ -1570,7 +1570,7 @@ export const { detune, det } = registerControl('detune', 'det'); * Set number of stacked voices for supported oscillators * * @name unison - * @group effects + * @tags effects * @param {number | Pattern} numvoices * @example * note("d f a a# a d3").fast(2).s("supersaw").unison("<1 2 7>") @@ -1582,7 +1582,7 @@ export const { unison } = registerControl('unison'); * Set the stereo pan spread for supported oscillators * * @name spread - * @group effects + * @tags effects * @param {number | Pattern} spread between 0 and 1 * @example * note("d f a a# a d3").fast(2).s("supersaw").spread("<0 .3 1>") @@ -1593,7 +1593,7 @@ export const { spread } = registerControl('spread'); * Set dryness of reverb. See `room` and `size` for more information about reverb. * * @name dry - * @group effects + * @tags effects * @param {number | Pattern} dry 0 = wet, 1 = dry * @example * n("[0,3,7](3,8)").s("superpiano").room(.7).dry("<0 .5 .75 1>").osc() @@ -1619,7 +1619,7 @@ export const { fadeInTime } = registerControl('fadeInTime'); * Set frequency of sound. * * @name freq - * @group transforms + * @tags transforms * @param {number | Pattern} frequency in Hz. the audible range is between 20 and 20000 Hz * @example * freq("220 110 440 110").s("superzow").osc() @@ -1633,7 +1633,7 @@ export const { freq } = registerControl('freq'); * Attack time of pitch envelope. * * @name pattack - * @group effects + * @tags effects * @synonyms patt * @param {number | Pattern} time time in seconds * @example @@ -1645,7 +1645,7 @@ export const { pattack, patt } = registerControl('pattack', 'patt'); * Decay time of pitch envelope. * * @name pdecay - * @group effects + * @tags effects * @synonyms pdec * @param {number | Pattern} time time in seconds * @example @@ -1659,7 +1659,7 @@ export const { psustain, psus } = registerControl('psustain', 'psus'); * Release time of pitch envelope * * @name prelease - * @group effects + * @tags effects * @synonyms prel * @param {number | Pattern} time time in seconds * @example @@ -1674,7 +1674,7 @@ export const { prelease, prel } = registerControl('prelease', 'prel'); * If you don't set other pitch envelope controls, `pattack:.2` will be the default. * * @name penv - * @group effects + * @tags effects * @param {number | Pattern} semitones change in semitones * @example * note("c") @@ -1686,7 +1686,7 @@ export const { penv } = registerControl('penv'); * Curve of envelope. Defaults to linear. exponential is good for kicks * * @name pcurve - * @group effects + * @tags effects * @param {number | Pattern} type 0 = linear, 1 = exponential * @example * note("g1*4") @@ -1703,7 +1703,7 @@ export const { pcurve } = registerControl('pcurve'); * If you don't set an anchor, the value will default to the psustain value. * * @name panchor - * @group effects + * @tags effects * @param {number | Pattern} anchor anchor offset * @example * note("c c4").penv(12).panchor("<0 .5 1 .5>") @@ -1725,7 +1725,7 @@ export const { gate, gat } = registerControl('gate', 'gat'); * Emulation of a Leslie speaker: speakers rotating in a wooden amplified cabinet. * * @name leslie - * @group effects + * @tags effects * @param {number | Pattern} wet between 0 and 1 * @example * n("0,4,7").s("supersquare").leslie("<0 .4 .6 1>").osc() @@ -1737,7 +1737,7 @@ export const { leslie } = registerControl('leslie'); * Rate of modulation / rotation for leslie effect * * @name lrate - * @group effects + * @tags effects * @param {number | Pattern} rate 6.7 for fast, 0.7 for slow * @example * n("0,4,7").s("supersquare").leslie(1).lrate("<1 2 4 8>").osc() @@ -1750,7 +1750,7 @@ export const { lrate } = registerControl('lrate'); * Physical size of the cabinet in meters. Be careful, it might be slightly larger than your computer. Affects the Doppler amount (pitch warble) * * @name lsize - * @group effects + * @tags effects * @param {number | Pattern} meters somewhere between 0 and 1 * @example * n("0,4,7").s("supersquare").leslie(1).lrate(2).lsize("<.1 .5 1>").osc() @@ -1762,7 +1762,7 @@ export const { lsize } = registerControl('lsize'); * Sets the displayed text for an event on the pianoroll * * @name label - * @group visualization + * @tags visualization * @param {string} label text to display */ export const { activeLabel } = registerControl('activeLabel'); @@ -1828,7 +1828,7 @@ export const { overshape } = registerControl('overshape'); * Sets position in stereo. * * @name pan - * @group effects + * @tags effects * @param {number | Pattern} pan between 0 and 1, from left to right (assuming stereo), once round a circle (assuming multichannel) * @example * s("[bd hh]*2").pan("<.5 1 .5 0>") @@ -1894,7 +1894,7 @@ export const { mode } = registerControl(['mode', 'anchor']); * When using mininotation, you can also optionally add the 'size' parameter, separated by ':'. * * @name room - * @group effects + * @tags effects * @param {number | Pattern} level between 0 and 1 * @example * s("bd sd [~ bd] sd").room("<0 .2 .4 .6 .8 1>") @@ -1908,7 +1908,7 @@ export const { room } = registerControl(['room', 'size']); * When this property is changed, the reverb will be recaculated, so only change this sparsely.. * * @name roomlp - * @group effects + * @tags effects * @synonyms rlp * @param {number} frequency between 0 and 20000hz * @example @@ -1922,7 +1922,7 @@ export const { roomlp, rlp } = registerControl('roomlp', 'rlp'); * When this property is changed, the reverb will be recaculated, so only change this sparsely.. * * @name roomdim - * @group effects + * @tags effects * @synonyms rdim * @param {number} frequency between 0 and 20000hz * @example @@ -1937,7 +1937,7 @@ export const { roomdim, rdim } = registerControl('roomdim', 'rdim'); * When this property is changed, the reverb will be recaculated, so only change this sparsely.. * * @name roomfade - * @group effects + * @tags effects * @synonyms rfade * @param {number} seconds for the reverb to fade * @example @@ -1950,7 +1950,7 @@ export const { roomfade, rfade } = registerControl('roomfade', 'rfade'); /** * Sets the sample to use as an impulse response for the reverb. * @name iresponse - * @group effects + * @tags effects * @param {string | Pattern} sample to use as an impulse response * @synonyms ir * @example @@ -1962,7 +1962,7 @@ export const { ir, iresponse } = registerControl(['ir', 'i'], 'iresponse'); /** * Sets speed of the sample for the impulse response. * @name irspeed - * @group effects + * @tags effects * @param {string | Pattern} speed * @example * samples('github:switchangel/pad') @@ -1974,7 +1974,7 @@ export const { irspeed } = registerControl('irspeed'); /** * Sets the beginning of the IR response sample * @name irbegin - * @group effects + * @tags effects * @param {string | Pattern} begin between 0 and 1 * @synonyms ir * @example @@ -1988,7 +1988,7 @@ export const { irbegin } = registerControl('irbegin'); * When this property is changed, the reverb will be recaculated, so only change this sparsely.. * * @name roomsize - * @group effects + * @tags effects * @param {number | Pattern} size between 0 and 10 * @synonyms rsize, sz, size * @example @@ -2012,7 +2012,7 @@ export const { roomsize, size, sz, rsize } = registerControl('roomsize', 'size', * * * @name shape - * @group effects + * @tags effects * @param {number | Pattern} distortion between 0 and 1 * @example * s("bd sd [~ bd] sd,hh*8").shape("<0 .2 .4 .6 .8>") @@ -2025,7 +2025,7 @@ export const { shape } = registerControl(['shape', 'shapevol']); * Most useful values are usually between 0 and 10 (depending on source gain). If you are feeling adventurous, you can turn it up to 11 and beyond ;) * * @name distort - * @group effects + * @tags effects * @synonyms dist * @param {number | Pattern} distortion * @example @@ -2040,7 +2040,7 @@ export const { distort, dist } = registerControl(['distort', 'distortvol'], 'dis * More info [here](https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode?retiredLocale=de#instance_properties) * * @name compressor - * @group effects + * @tags effects * @example * s("bd sd [~ bd] sd,hh*8") * .compressor("-20:20:10:.002:.02") @@ -2061,7 +2061,7 @@ export const { compressorRelease } = registerControl('compressorRelease'); * Changes the speed of sample playback, i.e. a cheap way of changing pitch. * * @name speed - * @group effects + * @tags effects * @param {number | Pattern} speed -inf to inf, negative numbers play the sample backwards. * @example * s("bd*6").speed("1 2 4 1 -2 -4") @@ -2075,7 +2075,7 @@ export const { speed } = registerControl('speed'); * Changes the speed of sample playback, i.e. a cheap way of changing pitch. * * @name stretch - * @group effects + * @tags effects * @param {number | Pattern} factor -inf to inf, negative numbers play the sample backwards. * @example * s("gm_flute").stretch("1 2 .5") @@ -2086,7 +2086,7 @@ export const { stretch } = registerControl('stretch'); * Used in conjunction with `speed`, accepts values of "r" (rate, default behavior), "c" (cycles), or "s" (seconds). Using `unit "c"` means `speed` will be interpreted in units of cycles, e.g. `speed "1"` means samples will be stretched to fill a cycle. Using `unit "s"` means the playback speed will be adjusted so that the duration is the number of seconds specified by `speed`. * * @name unit - * @group effects + * @tags effects * @param {number | string | Pattern} unit see description above * @example * speed("1 2 .5 3").s("bd").unit("c").osc() @@ -2101,7 +2101,7 @@ export const { unit } = registerControl('unit'); * "A simplistic pitch-raising algorithm. It's not meant to sound natural; its sound is reminiscent of some weird mixture of filter, ring-modulator and pitch-shifter, depending on the input. The algorithm works by cutting the signal into fragments (delimited by upwards-going zero-crossings) and squeezing those fragments in the time domain (i.e. simply playing them back faster than they came in), leaving silences inbetween. All the parameters apart from memlen can be modulated." * * @name squiz - * @group effects + * @tags effects * @param {number | Pattern} squiz Try passing multiples of 2 to it - 2, 4, 8 etc. * @example * squiz("2 4/2 6 [8 16]").s("bd").osc() @@ -2126,7 +2126,7 @@ export const { squiz } = registerControl('squiz'); * Formant filter to make things sound like vowels. * * @name vowel - * @group effects + * @tags effects * @param {string | Pattern} vowel You can use a e i o u ae aa oe ue y uh un en an on, corresponding to [a] [e] [i] [o] [u] [æ] [ɑ] [ø] [y] [ɯ] [ʌ] [œ̃] [ɛ̃] [ɑ̃] [ɔ̃]. Aliases: aa = å = ɑ, oe = ø = ö, y = ı, ae = æ. * @example * note("[c2 >]*2").s('sawtooth') @@ -2151,7 +2151,7 @@ export const { waveloss } = registerControl('waveloss'); * Noise crackle density * * @name density - * @group effects + * @tags effects * @param {number | Pattern} density between 0 and x * @example * s("crackle*4").density("<0.01 0.04 0.2 0.5>".slow(4)) @@ -2202,7 +2202,7 @@ export const { cps } = registerControl('cps'); * Multiplies the duration with the given number. Also cuts samples off at the end if they exceed the duration. * * @name clip - * @group transforms + * @tags transforms * @synonyms legato * @param {number | Pattern} factor >= 0 * @example @@ -2215,7 +2215,7 @@ export const { clip, legato } = registerControl('clip', 'legato'); * Sets the duration of the event in cycles. Similar to clip / legato, it also cuts samples off at the end if they exceed the duration. * * @name duration - * @group transforms + * @tags transforms * @synonyms dur * @param {number | Pattern} seconds >= 0 * @example @@ -2244,7 +2244,7 @@ export const { zzfx } = registerControl('zzfx'); /** * Sets the color of the hap in visualizations like pianoroll or highlighting. * @name color - * @group visualization + * @tags visualization * @synonyms colour * @param {string} color Hexadecimal or CSS color name */ @@ -2259,7 +2259,7 @@ export let createParams = (...names) => * ADSR envelope: Combination of Attack, Decay, Sustain, and Release. * * @name adsr - * @group effects + * @tags effects * @param {number | Pattern} time attack time in seconds * @param {number | Pattern} time decay time in seconds * @param {number | Pattern} gain sustain level (0 to 1) @@ -2294,7 +2294,7 @@ export const ar = register('ar', (t, pat) => { * MIDI channel: Sets the MIDI channel for the event. * * @name midichan - * @group examples + * @tags examples * @param {number | Pattern} channel MIDI channel number (0-15) * @example * note("c4").midichan(1).midi() @@ -2307,7 +2307,7 @@ export const { midimap } = registerControl('midimap'); * MIDI port: Sets the MIDI port for the event. * * @name midiport - * @group examples + * @tags examples * @param {number | Pattern} port MIDI port * @example * note("c a f e").midiport("<0 1 2 3>").midi() @@ -2318,7 +2318,7 @@ export const { midiport } = registerControl('midiport'); * MIDI command: Sends a MIDI command message. * * @name midicmd - * @group examples + * @tags examples * @param {number | Pattern} command MIDI command * @example * midicmd("clock*48,/2").midi() @@ -2329,7 +2329,7 @@ export const { midicmd } = registerControl('midicmd'); * MIDI control: Sends a MIDI control change message. * * @name control - * @group examples + * @tags examples * @param {number | Pattern} MIDI control number (0-127) * @param {number | Pattern} MIDI controller value (0-127) */ @@ -2345,7 +2345,7 @@ export const control = register('control', (args, pat) => { * MIDI control number: Sends a MIDI control change message. * * @name ccn - * @group examples + * @tags examples * @param {number | Pattern} MIDI control number (0-127) */ export const { ccn } = registerControl('ccn'); @@ -2353,7 +2353,7 @@ export const { ccn } = registerControl('ccn'); * MIDI control value: Sends a MIDI control change message. * * @name ccv - * @group examples + * @tags examples * @param {number | Pattern} MIDI control value (0-127) */ export const { ccv } = registerControl('ccv'); @@ -2363,7 +2363,7 @@ export const { ctlNum } = registerControl('ctlNum'); /** * MIDI NRPN non-registered parameter number: Sends a MIDI NRPN non-registered parameter number message. * @name nrpnn - * @group examples + * @tags examples * @param {number | Pattern} nrpnn MIDI NRPN non-registered parameter number (0-127) * @example * note("c4").nrpnn("1:8").nrpv("123").midichan(1).midi() @@ -2372,7 +2372,7 @@ export const { nrpnn } = registerControl('nrpnn'); /** * MIDI NRPN non-registered parameter value: Sends a MIDI NRPN non-registered parameter value message. * @name nrpv - * @group examples + * @tags examples * @param {number | Pattern} nrpv MIDI NRPN non-registered parameter value (0-127) * @example * note("c4").nrpnn("1:8").nrpv("123").midichan(1).midi() @@ -2383,7 +2383,7 @@ export const { nrpv } = registerControl('nrpv'); * MIDI program number: Sends a MIDI program change message. * * @name progNum - * @group examples + * @tags examples * @param {number | Pattern} program MIDI program number (0-127) * @example * note("c4").progNum(10).midichan(1).midi() @@ -2393,7 +2393,7 @@ export const { progNum } = registerControl('progNum'); /** * MIDI sysex: Sends a MIDI sysex message. * @name sysex - * @group examples + * @tags examples * @param {number | Pattern} id Sysex ID * @param {number | Pattern} data Sysex data * @example @@ -2409,7 +2409,7 @@ export const sysex = register('sysex', (args, pat) => { /** * MIDI sysex ID: Sends a MIDI sysex identifier message. * @name sysexid - * @group examples + * @tags examples * @param {number | Pattern} id Sysex ID * @example * note("c4").sysexid("0x77").sysexdata("0x01:0x02:0x03:0x04").midichan(1).midi() @@ -2418,7 +2418,7 @@ export const { sysexid } = registerControl('sysexid'); /** * MIDI sysex data: Sends a MIDI sysex message. * @name sysexdata - * @group examples + * @tags examples * @param {number | Pattern} data Sysex data * @example * note("c4").sysexid("0x77").sysexdata("0x01:0x02:0x03:0x04").midichan(1).midi() @@ -2428,7 +2428,7 @@ export const { sysexdata } = registerControl('sysexdata'); /** * MIDI pitch bend: Sends a MIDI pitch bend message. * @name midibend - * @group examples + * @tags examples * @param {number | Pattern} midibend MIDI pitch bend (-1 - 1) * @example * note("c4").midibend(sine.slow(4).range(-0.4,0.4)).midi() @@ -2437,7 +2437,7 @@ export const { midibend } = registerControl('midibend'); /** * MIDI key after touch: Sends a MIDI key after touch message. * @name miditouch - * @group examples + * @tags examples * @param {number | Pattern} miditouch MIDI key after touch (0-1) * @example * note("c4").miditouch(sine.slow(4).range(0,1)).midi() @@ -2458,7 +2458,7 @@ export const getControlName = (alias) => { * Sets properties in a batch. * * @name as - * @group transforms + * @tags transforms * @param {String | Array} mapping the control names that are set * @example * "c:.5 a:1 f:.25 e:.8".as("note:clip") @@ -2478,7 +2478,7 @@ export const as = register('as', (mapping, pat) => { * Allows you to scrub an audio file like a tape loop by passing values that represents the position in the audio file * in the optional array syntax ex: "0.5:2", the second value controls the speed of playback * @name scrub - * @group samples + * @tags samples * @memberof Pattern * @returns Pattern * @example diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index e3d4f5f9c..39d6555f5 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -84,7 +84,7 @@ export class Pattern { /** * Returns a new pattern, with the function applied to the value of * each hap. It has the alias `fmap`. - * @group functional + * @tags functional * @synonyms fmap * @param {Function} func to to apply to the value * @returns Pattern @@ -117,7 +117,7 @@ export class Pattern { * Assumes 'this' is a pattern of functions, and given a function to * resolve wholes, applies a given pattern of values to that * pattern of functions. - * @group functional + * @tags functional * @param {Function} whole_func * @param {Function} func * @noAutocomplete @@ -155,7 +155,7 @@ export class Pattern { * In this `_appBoth` variant, where timespans of the function and value haps * are not the same but do intersect, the resulting hap has a timespan of the * intersection. This applies to both the part and the whole timespan. - * @group functional + * @tags functional * @param {Pattern} pat_val * @noAutocomplete * @returns Pattern @@ -183,7 +183,7 @@ export class Pattern { * on. In practice, this means that the pattern structure, including onsets, * are preserved from the pattern of functions (often referred to as the left * hand or inner pattern). - * @group functional + * @tags functional * @param {Pattern} pat_val * @noAutocomplete * @returns Pattern @@ -217,7 +217,7 @@ export class Pattern { * As with `appLeft`, but `whole` timespans are instead taken from the * pattern of values, i.e. structure is preserved from the right hand/outer * pattern. - * @group functional + * @tags functional * @param {Pattern} pat_val * @noAutocomplete * @returns Pattern @@ -408,7 +408,7 @@ export class Pattern { /** * Query haps inside the given time span. * - * @group internals + * @tags internals * @param {Fraction | number} begin from time * @param {Fraction | number} end to time * @returns Hap[] @@ -432,7 +432,7 @@ export class Pattern { * Returns a new pattern, with queries split at cycle boundaries. This makes * some calculations easier to express, as all haps are then constrained to * happen within a cycle. - * @group internals + * @tags internals * @returns Pattern * @noAutocomplete */ @@ -447,7 +447,7 @@ export class Pattern { /** * Returns a new pattern, where the given function is applied to the query * timespan before passing it to the original pattern. - * @group internals + * @tags internals * @param {Function} func the function to apply * @returns Pattern * @noAutocomplete @@ -470,7 +470,7 @@ export class Pattern { /** * As with `withQuerySpan`, but the function is applied to both the * begin and end time of the query timespan. - * @group internals + * @tags internals * @param {Function} func the function to apply * @returns Pattern * @noAutocomplete @@ -483,7 +483,7 @@ export class Pattern { * Similar to `withQuerySpan`, but the function is applied to the timespans * of all haps returned by pattern queries (both `part` timespans, and where * present, `whole` timespans). - * @group internals + * @tags internals * @param {Function} func * @returns Pattern * @noAutocomplete @@ -495,7 +495,7 @@ export class Pattern { /** * As with `withHapSpan`, but the function is applied to both the * begin and end time of the hap timespans. - * @group internals + * @tags internals * @param {Function} func the function to apply * @returns Pattern * @noAutocomplete @@ -506,7 +506,7 @@ export class Pattern { /** * Returns a new pattern with the given function applied to the list of haps returned by every query. - * @group internals + * @tags internals * @param {Function} func * @returns Pattern * @noAutocomplete @@ -519,7 +519,7 @@ export class Pattern { /** * As with `withHaps`, but applies the function to every hap, rather than every list of haps. - * @group internals + * @tags internals * @param {Function} func * @returns Pattern * @noAutocomplete @@ -530,7 +530,7 @@ export class Pattern { /** * Returns a new pattern with the context field set to every hap set to the given value. - * @group internals + * @tags internals * @param {*} context * @returns Pattern * @noAutocomplete @@ -541,7 +541,7 @@ export class Pattern { /** * Returns a new pattern with the given function applied to the context field of every hap. - * @group internals + * @tags internals * @param {Function} func * @returns Pattern * @noAutocomplete @@ -557,7 +557,7 @@ export class Pattern { /** * Returns a new pattern with the context field of every hap set to an empty object. - * @group internals + * @tags internals * @returns Pattern * @noAutocomplete */ @@ -568,7 +568,7 @@ export class Pattern { /** * Returns a new pattern with the given location information added to the * context of every hap. - * @group internals + * @tags internals * @param {Number} start start offset * @param {Number} end end offset * @returns Pattern @@ -592,7 +592,7 @@ export class Pattern { /** * Returns a new Pattern, which only returns haps that meet the given test. - * @group internals + * @tags internals * @param {Function} hap_test - a function which returns false for haps to be removed from the pattern * @returns Pattern * @noAutocomplete @@ -604,7 +604,7 @@ export class Pattern { /** * As with `filterHaps`, but the function is applied to values * inside haps. - * @group internals + * @tags internals * @param {Function} value_test * @returns Pattern * @noAutocomplete @@ -616,7 +616,7 @@ export class Pattern { /** * Returns a new pattern, with haps containing undefined values removed from * query results. - * @group internals + * @tags internals * @returns Pattern * @noAutocomplete */ @@ -628,7 +628,7 @@ export class Pattern { * Returns a new pattern, with all haps without onsets filtered out. A hap * with an onset is one with a `whole` timespan that begins at the same time * as its `part` timespan. - * @group internals + * @tags internals * @returns Pattern * @noAutocomplete */ @@ -642,7 +642,7 @@ export class Pattern { /** * Returns a new pattern, with 'continuous' haps (those without 'whole' * timespans) removed from query results. - * @group internals + * @tags internals * @returns Pattern * @noAutocomplete */ @@ -654,7 +654,7 @@ export class Pattern { /** * Combines adjacent haps with the same value and whole. Only * intended for use in tests. - * @group internals + * @tags internals * @noAutocomplete */ defragmentHaps() { @@ -707,7 +707,7 @@ export class Pattern { /** * Queries the pattern for the first cycle, returning Haps. Mainly of use when * debugging a pattern. - * @group internals + * @tags internals * @param {Boolean} with_context - set to true, otherwise the context field * will be stripped from the resulting haps. * @returns [Hap] @@ -723,7 +723,7 @@ export class Pattern { /** * Accessor for a list of values returned by querying the first cycle. - * @group internals + * @tags internals * @noAutocomplete */ get firstCycleValues() { @@ -732,7 +732,7 @@ export class Pattern { /** * More human-readable version of the `firstCycleValues` accessor. - * @group internals + * @tags internals * @noAutocomplete */ get showFirstCycle() { @@ -744,7 +744,7 @@ export class Pattern { /** * Returns a new pattern, which returns haps sorted in temporal order. Mainly * of use when comparing two patterns for equality, in tests. - * @group internals + * @tags internals * @returns Pattern * @noAutocomplete */ @@ -761,7 +761,7 @@ export class Pattern { /** * Returns a new pattern with all values parsed as numerals. - * @group internals + * @tags internals */ asNumber() { return this.fmap(parseNumeral); @@ -813,7 +813,7 @@ export class Pattern { /** * Layers the result of the given function(s). Like `superimpose`, but without the original pattern: * @name layer - * @group combiners + * @tags combiners * @memberof Pattern * @synonyms apply * @returns Pattern @@ -829,7 +829,7 @@ export class Pattern { /** * Superimposes the result of the given function(s) on top of the original pattern: * @name superimpose - * @group combiners + * @tags combiners * @memberof Pattern * @returns Pattern * @example @@ -889,7 +889,7 @@ export class Pattern { /** * Writes the content of the current event to the console (visible in the side menu). - * @group visualizers + * @tags visualizers * @name log * @memberof Pattern * @example @@ -904,7 +904,7 @@ export class Pattern { /** * A simplified version of `log` which writes all "values" (various configurable parameters) * within the event to the console (visible in the side menu). - * @group visualizers + * @tags visualizers * @name logValues * @memberof Pattern * @example @@ -938,7 +938,7 @@ export class Pattern { * source pattern to be looped, and for an (optional) given function to be * applied. False values result in the corresponding part of the source pattern * to be played unchanged. - * @group structure + * @tags structure * @name into * @memberof Pattern * @example @@ -978,7 +978,7 @@ Pattern.prototype.collect = function () { /** * Selects indices in in stacked notes. - * @group transforms + * @tags transforms * @example * note("<[c,eb,g]!2 [c,f,ab] [d,f,ab]>") * .arpWith(haps => haps[2]) @@ -993,7 +993,7 @@ export const arpWith = register('arpWith', (func, pat) => { /** * Selects indices in in stacked notes. - * @group transforms + * @tags transforms * @example * note("<[c,eb,g]!2 [c,f,ab] [d,f,ab]>") * .arp("0 [0,2] 1 [0,2]") @@ -1076,7 +1076,7 @@ function _composeOp(a, b, func) { * note("c3 e3 g3".add("<0 5 7 0>")) * // Behind the scenes, the notes are converted to midi numbers: * // note("48 52 55".add("<0 5 7 0>")) - * @group transforms + * @tags math */ add: [numeralArgs((a, b) => a + b)], // support string concatenation /** @@ -1189,7 +1189,7 @@ function _composeOp(a, b, func) { /** * Applies the given structure to the pattern: * - * @group structure + * @tags structure * @example * note("c,eb,g") * .struct("x ~ x ~ ~ x ~ x ~ ~ ~ x ~ x ~ ~") @@ -1204,7 +1204,7 @@ function _composeOp(a, b, func) { /** * Returns silence when mask is 0 or "~" * - * @group structure + * @tags structure * @example * note("c [eb,g] d [eb,g]").mask("<1 [0 1]>") */ @@ -1217,7 +1217,7 @@ function _composeOp(a, b, func) { /** * Resets the pattern to the start of the cycle for each onset of the reset pattern. * - * @group structure + * @tags structure * @example * s("[ sd]*2, hh*8").reset("") */ @@ -1231,7 +1231,7 @@ function _composeOp(a, b, func) { * Restarts the pattern for each onset of the restart pattern. * While reset will only reset the current cycle, restart will start from cycle 0. * - * @group structure + * @tags structure * @example * s("[ sd]*2, hh*8").restart("") */ @@ -1272,7 +1272,7 @@ export const pm = polymeter; /** * Does absolutely nothing, but with a given metrical 'steps' * @name gap - * @group generators + * @tags generators * @param {number} steps * @example * gap(3) // "~@3" @@ -1282,7 +1282,7 @@ export const gap = (steps) => new Pattern(() => [], steps); /** * Does absolutely nothing.. * @name silence - * @group generators + * @tags generators * @example * silence // "~" */ @@ -1294,7 +1294,7 @@ export const nothing = gap(0); /** * A discrete value that repeats once per cycle. * - * @group generators + * @tags generators * @returns {Pattern} * @example * pure('e4') // "e4" @@ -1339,7 +1339,7 @@ export function reify(thing) { /** * Takes a list of patterns, and returns a pattern of lists. * - * @group transforms + * @tags transforms */ export function sequenceP(pats) { let result = pure([]); @@ -1352,7 +1352,7 @@ export function sequenceP(pats) { /** * The given items are played at the same time at the same length. * - * @group structure + * @tags structure * @return {Pattern} * @synonyms polyrhythm, pr * @example @@ -1437,7 +1437,7 @@ export function stackBy(by, ...pats) { /** * Concatenation: combines a list of patterns, switching between them successively, one per cycle. * - * @group combiners + * @tags combiners * @return {Pattern} * @synonyms cat * @example @@ -1471,7 +1471,7 @@ export function slowcat(...pats) { } /** Concatenation: combines a list of patterns, switching between them successively, one per cycle. Unlike slowcat, this version will skip cycles. - * @group combiners + * @tags combiners * @param {...any} items - The items to concatenate * @return {Pattern} */ @@ -1487,7 +1487,7 @@ export function slowcatPrime(...pats) { /** The given items are con**cat**enated, where each one takes one cycle. * - * @group combiners + * @tags combiners * @param {...any} items - The items to concatenate * @synonyms slowcat * @return {Pattern} @@ -1509,7 +1509,7 @@ export function cat(...pats) { * Allows to arrange multiple patterns together over multiple cycles. * Takes a variable number of arrays with two elements specifying the number of cycles and the pattern to use. * - * @group combiners + * @tags combiners * @return {Pattern} * @example * arrange( @@ -1527,7 +1527,7 @@ export function arrange(...sections) { * Similarly to `arrange`, allows you to arrange multiple patterns together over multiple cycles. * Unlike `arrange`, you specify a start and stop time for each pattern rather than duration, which * means that patterns can overlap. - * @group combiners + * @tags combiners * @return {Pattern} * @example seqPLoop([0, 2, "bd(3,8)"], @@ -1572,7 +1572,7 @@ export function sequence(...pats) { } /** Like **cat**, but the items are crammed into one cycle. - * @group combiners + * @tags combiners * @synonyms sequence, fastcat * @example * seq("e5", "b4", ["d5", "c5"]).note() @@ -1746,7 +1746,7 @@ function stepRegister(name, func, patternify = true, preserveSteps = false, join * Assumes a numerical pattern. Returns a new pattern with all values rounded * to the nearest integer. * @name round - * @group math + * @tags math * @memberof Pattern * @returns Pattern * @example @@ -1761,7 +1761,7 @@ export const round = register('round', function (pat) { * replaced with `-5`. * @name floor * @memberof Pattern - * @group math + * @tags math * @returns Pattern * @example * note("42 42.1 42.5 43".floor()) @@ -1776,7 +1776,7 @@ export const floor = register('floor', function (pat) { * replaced with `-4`. * @name ceil * @memberof Pattern - * @group math + * @tags math * @returns Pattern * @example * note("42 42.1 42.5 43".ceil()) @@ -1787,7 +1787,7 @@ export const ceil = register('ceil', function (pat) { /** * Assumes a numerical pattern, containing unipolar values in the range 0 .. * 1. Returns a new pattern with values scaled to the bipolar range -1 .. 1 - * @group math + * @tags math * @returns Pattern * @noAutocomplete */ @@ -1798,7 +1798,7 @@ export const toBipolar = register('toBipolar', function (pat) { /** * Assumes a numerical pattern, containing bipolar values in the range -1 .. 1 * Returns a new pattern with values scaled to the unipolar range 0 .. 1 - * @group math + * @tags math * @returns Pattern * @noAutocomplete */ @@ -1812,7 +1812,7 @@ export const fromBipolar = register('fromBipolar', function (pat) { * Most useful in combination with continuous patterns. * @name range * @memberof Pattern - * @group math + * @tags math * @returns Pattern * @example * s("[bd sd]*2,hh*8") @@ -1828,7 +1828,7 @@ export const range = register('range', function (min, max, pat) { * following an exponential curve. * @name rangex * @memberof Pattern - * @group math + * @tags math * @returns Pattern * @example * s("[bd sd]*2,hh*8") @@ -1843,7 +1843,7 @@ export const rangex = register('rangex', function (min, max, pat) { * Returns a new pattern with values scaled to the given min/max range. * @name range2 * @memberof Pattern - * @group math + * @tags math * @returns Pattern * @example * s("[bd sd]*2,hh*8") @@ -1858,7 +1858,7 @@ export const range2 = register('range2', function (min, max, pat) { * Returns a new pattern with just numbers. * @name ratio * @memberof Pattern - * @group math + * @tags math * @returns Pattern * @example * ratio("1, 5:4, 3:2").mul(110) @@ -1877,7 +1877,7 @@ export const ratio = register('ratio', (pat) => // Structural and temporal transformations /** Compress each cycle into the given timespan, leaving a gap - * @group structure + * @tags structure * @example * cat( * s("bd sd").compress(.25,.75), @@ -1899,7 +1899,7 @@ export const { compressSpan, compressspan } = register(['compressSpan', 'compres /** * speeds up a pattern like fast, but rather than it playing multiple times as fast would it instead leaves a gap in the remaining space of the cycle. For example, the following will play the sound pattern "bd sn" only once but compressed into the first half of the cycle, i.e. twice as fast. - * @group structure + * @tags structure * @name fastGap * @synonyms fastgap * @example @@ -1937,7 +1937,7 @@ export const { fastGap, fastgap } = register(['fastGap', 'fastgap'], function (f /** * Similar to `compress`, but doesn't leave gaps, and the 'focus' can be bigger than a cycle - * @group structure + * @tags structure * @example * s("bd hh sd hh").focus(1/4, 3/4) */ @@ -1955,7 +1955,7 @@ export const { focusSpan, focusspan } = register(['focusSpan', 'focusspan'], fun }); /** The ply function repeats each event the given number of times. - * @group structure + * @tags structure * @example * s("bd ~ sd cp").ply("<1 2 3>") */ @@ -1970,7 +1970,7 @@ export const ply = register('ply', function (factor, pat) { /** * Speed up a pattern by the given factor. Used by "*" in mini notation. * - * @group structure + * @tags structure * @name fast * @synonyms density * @memberof Pattern @@ -1995,7 +1995,7 @@ export const { fast, density } = register( /** * Both speeds up the pattern (like 'fast') and the sample playback (like 'speed'). - * @group structure + * @tags structure * @example * s("bd sd:2").hurry("<1 2 4 3>").slow(1.5) */ @@ -2006,7 +2006,7 @@ export const hurry = register('hurry', function (r, pat) { /** * Slow down a pattern over the given number of cycles. Like the "/" operator in mini notation. * - * @group structure + * @tags structure * @name slow * @synonyms sparsity * @memberof Pattern @@ -2024,7 +2024,7 @@ export const { slow, sparsity } = register(['slow', 'sparsity'], function (facto /** * Carries out an operation 'inside' a cycle. - * @group structure + * @tags structure * @example * "0 1 2 3 4 3 2 1".inside(4, rev).scale('C major').note() * // "0 1 2 3 4 3 2 1".slow(4).rev().fast(4).scale('C major').note() @@ -2035,7 +2035,7 @@ export const inside = register('inside', function (factor, f, pat) { /** * Carries out an operation 'outside' a cycle. - * @group structure + * @tags structure * @example * "<[0 1] 2 [3 4] 5>".outside(4, rev).scale('C major').note() * // "<[0 1] 2 [3 4] 5>".fast(4).rev().slow(4).scale('C major').note() @@ -2046,7 +2046,7 @@ export const outside = register('outside', function (factor, f, pat) { /** * Applies the given function every n cycles, starting from the last cycle. - * @group structure + * @tags structure * @name lastOf * @memberof Pattern * @param {number} n how many cycles @@ -2063,7 +2063,7 @@ export const lastOf = register('lastOf', function (n, func, pat) { /** * Applies the given function every n cycles, starting from the first cycle. - * @group structure + * @tags structure * @name firstOf * @memberof Pattern * @param {number} n how many cycles @@ -2075,7 +2075,7 @@ export const lastOf = register('lastOf', function (n, func, pat) { /** * An alias for `firstOf` - * @group structure + * @tags structure * @name every * @memberof Pattern * @param {number} n how many cycles @@ -2092,7 +2092,7 @@ export const { firstOf, every } = register(['firstOf', 'every'], function (n, fu /** * Like layer, but with a single function: - * @group structure + * @tags structure * @name apply * @example * "".scale('C minor').apply(scaleTranspose("0,2,4")).note() @@ -2104,7 +2104,7 @@ export const apply = register('apply', function (func, pat) { /** * Plays the pattern at the given cycles per minute. - * @group structure + * @tags structure * @deprecated * @example * s(",hh*2").cpm(90) // = 90 bpm @@ -2117,7 +2117,7 @@ export const cpm = register('cpm', function (cpm, pat) { /** * Nudge a pattern to start earlier in time. Equivalent of Tidal's <~ operator * - * @group structure + * @tags structure * @name early * @memberof Pattern * @param {number | Pattern} cycles number of cycles to nudge left @@ -2138,7 +2138,7 @@ export const early = register( /** * Nudge a pattern to start later in time. Equivalent of Tidal's ~> operator * - * @group structure + * @tags structure * @name late * @memberof Pattern * @param {number | Pattern} cycles number of cycles to nudge right @@ -2159,7 +2159,7 @@ export const late = register( /** * Plays a portion of a pattern, specified by the beginning and end of a time span. The new resulting pattern is played over the time period of the original pattern: * - * @group structure + * @tags structure * @example * s("bd*2 hh*3 [sd bd]*2 perc").zoom(0.25, 0.75) * // s("hh*3 [sd bd]*2") // equivalent @@ -2186,7 +2186,7 @@ export const { zoomArc, zoomarc } = register(['zoomArc', 'zoomarc'], function (a /** * Splits a pattern into the given number of slices, and plays them according to a pattern of slice numbers. * Similar to `slice`, but slices up patterns rather than sound samples. - * @group structure + * @tags structure * @param {number} number of slices * @param {number} slices to play * @example @@ -2214,7 +2214,7 @@ export const bite = register( /** * Selects the given fraction of the pattern and repeats that part to fill the remainder of the cycle. - * @group structure + * @tags structure * @param {number} fraction fraction to select * @example * s("lt ht mt cp, [hh oh]*2").linger("<1 .5 .25 .125>") @@ -2235,7 +2235,7 @@ export const linger = register( /** * Samples the pattern at a rate of n events per cycle. Useful for turning a continuous pattern into a discrete one. - * @group structure + * @tags structure * @name segment * @synonyms seg * @param {number} segments number of segments per cycle @@ -2248,7 +2248,7 @@ export const { segment, seg } = register(['segment', 'seg'], function (rate, pat /** * The function `swingBy x n` breaks each cycle into `n` slices, and then delays events in the second half of each slice by the amount `x`, which is relative to the size of the (half) slice. So if `x` is 0 it does nothing, `0.5` delays for half the note duration, and 1 will wrap around to doing nothing again. The end result is a shuffle or swing-like rhythm - * @group structure + * @tags structure * @param {number} subdivision * @param {number} offset * @example @@ -2258,7 +2258,7 @@ export const swingBy = register('swingBy', (swing, n, pat) => pat.inside(n, late /** * Shorthand for swingBy with 1/3: - * @group structure + * @tags structure * @param {number} subdivision * @example * s("hh*8").swing(4) @@ -2268,7 +2268,7 @@ export const swing = register('swing', (n, pat) => pat.swingBy(1 / 3, n)); /** * Swaps 1s and 0s in a binary pattern. - * @group structure + * @tags structure * @name invert * @synonyms inv * @example @@ -2286,7 +2286,7 @@ export const { invert, inv } = register( /** * Applies the given function whenever the given pattern is in a true state. - * @group structure + * @tags structure * @name when * @memberof Pattern * @param {Pattern} binary_pat @@ -2301,7 +2301,7 @@ export const when = register('when', function (on, func, pat) { /** * Superimposes the function result on top of the original pattern, delayed by the given time. - * @group structure + * @tags structure * @name off * @memberof Pattern * @param {Pattern | number} time offset time @@ -2318,7 +2318,7 @@ export const off = register('off', function (time_pat, func, pat) { * Returns a new pattern where every other cycle is played once, twice as * fast, and offset in time by one quarter of a cycle. Creates a kind of * breakbeat feel. - * @group structure + * @tags structure * @returns Pattern */ export const brak = register('brak', function (pat) { @@ -2328,7 +2328,7 @@ export const brak = register('brak', function (pat) { /** * Reverse all haps in a pattern * - * @group structure + * @tags structure * @name rev * @memberof Pattern * @returns Pattern @@ -2362,7 +2362,7 @@ export const rev = register( /** Like press, but allows you to specify the amount by which each * event is shifted. pressBy(0.5) is the same as press, while * pressBy(1/3) shifts each event by a third of its timespan. - * @group structure + * @tags structure * @example * stack(s("hh*4"), * s("bd mt sd ht").pressBy("<0 0.5 0.25>") @@ -2374,7 +2374,7 @@ export const pressBy = register('pressBy', function (r, pat) { /** * Syncopates a rhythm, by shifting each event halfway into its timespan. - * @group structure + * @tags structure * @example * stack(s("hh*4"), * s("bd mt sd ht").every(4, press) @@ -2386,7 +2386,7 @@ export const press = register('press', function (pat) { /** * Silences a pattern. - * @group structure + * @tags structure * @example * stack( * s("bd").hush(), @@ -2399,7 +2399,7 @@ Pattern.prototype.hush = function () { /** * Applies `rev` to a pattern every other cycle, so that the pattern alternates between forwards and backwards. - * @group structure + * @tags structure * @example * note("c d e g").palindrome() */ @@ -2414,7 +2414,7 @@ export const palindrome = register( /** * Jux with adjustable stereo width. 0 = mono, 1 = full stereo. - * @group structure + * @tags structure * @name juxBy * @synonyms juxby * @example @@ -2436,7 +2436,7 @@ export const { juxBy, juxby } = register(['juxBy', 'juxby'], function (by, func, /** * The jux function creates strange stereo effects, by applying a function to a pattern, but only in the right-hand channel. - * @group structure + * @tags structure * @example * s("bd lt [~ ht] mt cp ~ bd hh").jux(rev) * @example @@ -2450,7 +2450,7 @@ export const jux = register('jux', function (func, pat) { /** * Superimpose and offset multiple times, applying the given function each time. - * @group structure + * @tags structure * @name echoWith * @synonyms echowith, stutWith, stutwith * @param {number} times how many times to repeat @@ -2470,7 +2470,7 @@ export const { echoWith, echowith, stutWith, stutwith } = register( /** * Superimpose and offset multiple times, gradually decreasing the velocity - * @group structure + * @tags structure * @name echo * @memberof Pattern * @returns Pattern @@ -2486,7 +2486,7 @@ export const echo = register('echo', function (times, time, feedback, pat) { /** * Deprecated. Like echo, but the last 2 parameters are flipped. - * @group structure + * @tags structure * @name stut * @param {number} times how many times to repeat * @param {number} feedback velocity multiplicator for each iteration @@ -2508,7 +2508,7 @@ export const applyN = register('applyN', function (n, func, p) { /** * The plyWith function repeats each event the given number of times, applying the given function to each event.\n - * @group structure + * @tags structure * @name plyWith * @synonyms plywith * @param {number} factor how many times to repeat @@ -2531,7 +2531,7 @@ export const plyWith = register(['plyWith', 'plywith'], function (factor, func, /** * The plyForEach function repeats each event the given number of times, applying the given function to each event. * This version of ply uses the iteration index as an argument to the function, similar to echoWith. - * @group structure + * @tags structure * @name plyForEach * @synonyms plyforeach * @param {number} factor how many times to repeat @@ -2553,7 +2553,7 @@ export const plyForEach = register(['plyForEach', 'plyforeach'], function (facto /** * Divides a pattern into a given number of subdivisions, plays the subdivisions in order, but increments the starting subdivision each cycle. The pattern wraps to the first subdivision after the last subdivision is played. - * @group structure + * @tags structure * @name iter * @memberof Pattern * @returns Pattern @@ -2581,7 +2581,7 @@ export const iter = register( /** * Like `iter`, but plays the subdivisions in reverse order. Known as iter' in tidalcycles - * @group structure + * @tags structure * @name iterBack * @synonyms iterback * @memberof Pattern @@ -2600,7 +2600,7 @@ export const { iterBack, iterback } = register( /** * Repeats each cycle the given number of times. - * @group structure + * @tags structure * @name repeatCycles * @memberof Pattern * @returns Pattern @@ -2624,7 +2624,7 @@ export const { repeatCycles } = register( /** * Divides a pattern into a given number of parts, then cycles through those parts in turn, applying the given function to each part in turn (one part per cycle). - * @group structure + * @tags structure * @name chunk * @synonyms slowChunk, slowchunk * @memberof Pattern @@ -2656,7 +2656,7 @@ export const { chunk, slowchunk, slowChunk } = register( /** * Like `chunk`, but cycles through the parts in reverse order. Known as chunk' in tidalcycles - * @group structure + * @tags structure * @name chunkBack * @synonyms chunkback * @memberof Pattern @@ -2677,7 +2677,7 @@ export const { chunkBack, chunkback } = register( /** * Like `chunk`, but the cycles of the source pattern aren't repeated * for each set of chunks. - * @group structure + * @tags structure * @name fastChunk * @synonyms fastchunk * @memberof Pattern @@ -2698,7 +2698,7 @@ export const { fastchunk, fastChunk } = register( /** * Like `chunk`, but the function is applied to a looped subcycle of the source pattern. - * @group structure + * @tags structure * @name chunkInto * @synonyms chunkinto * @memberof Pattern @@ -2712,7 +2712,7 @@ export const { chunkinto, chunkInto } = register(['chunkinto', 'chunkInto'], fun /** * Like `chunkInto`, but moves backwards through the chunks. - * @group structure + * @tags structure * @name chunkBackInto * @synonyms chunkbackinto * @memberof Pattern @@ -2743,7 +2743,7 @@ export const bypass = register( /** * Loops the pattern inside an `offset` for `cycles`. * If you think of the entire span of time in cycles as a ribbon, you can cut a single piece and loop it. - * @group structure + * @tags structure * @name ribbon * @synonyms rib * @param {number} offset start point of loop in cycles @@ -2772,7 +2772,7 @@ export const hsl = register('hsl', (h, s, l, pat) => { /** * Tags each Hap with an identifier. Good for filtering. The function populates Hap.context.tags (Array). * @name tag - * @group structure + * @tags structure * @noAutocomplete * @param {string} tag anything unique */ @@ -2783,7 +2783,7 @@ Pattern.prototype.tag = function (tag) { /** * Filters haps using the given function * @name filter - * @group structure + * @tags structure * @param {Function} test function to test Hap * @example * s("hh!7 oh").filter(hap => hap.value.s==='hh') @@ -2793,7 +2793,7 @@ export const filter = register('filter', (test, pat) => pat.withHaps((haps) => h /** * Filters haps by their begin time * @name filterWhen - * @group structure + * @tags structure * @noAutocomplete * @param {Function} test function to test Hap.whole.begin */ @@ -2802,7 +2802,7 @@ export const filterWhen = register('filterWhen', (test, pat) => pat.filter((h) = /** * Use within to apply a function to only a part of a pattern. * @name within - * @group structure + * @tags structure * @param {number} start start within cycle (0 - 1) * @param {number} end end within cycle (0 - 1). Must be > start * @param {Function} func function to be applied to the sub-pattern @@ -2877,7 +2877,7 @@ export function _match(span, hap_p) { * *Experimental* * * Speeds a pattern up or down, to fit to the given number of steps per cycle. - * @group structure + * @tags structure * @example * sound("bd sd cp").pace(4) * // The same as sound("{bd sd cp}%4") or sound("*4") @@ -2919,7 +2919,7 @@ export function _polymeterListSteps(steps, ...args) { * *Experimental* * * Aligns the steps of the patterns, creating polymeters. The patterns are repeated until they all fit the cycle. For example, in the below the first pattern is repeated twice, and the second is repeated three times, to fit the lowest common multiple of six steps. - * @group structure + * @tags structure * @synonyms pm * @example * // The same as note("{c eb g, c2 g2}%6") @@ -2952,7 +2952,7 @@ export function polymeter(...args) { * The steps can either be inferred from the pattern, or provided as a [length, pattern] pair. * Has the alias `timecat`. * @name stepcat - * @group combiners + * @tags combiners * @synonyms timeCat, timecat * @return {Pattern} * @example @@ -3010,7 +3010,7 @@ export function stepcat(...timepats) { * Concatenates patterns stepwise, according to an inferred 'steps per cycle'. * Similar to `stepcat`, but if an argument is a list, the whole pattern will alternate between the elements in the list. * - * @group combiners + * @tags combiners * @return {Pattern} * @example * stepalt(["bd cp", "mt"], "bd").sound() @@ -3037,7 +3037,7 @@ export function stepalt(...groups) { * * Takes the given number of steps from a pattern (dropping the rest). * A positive number will take steps from the start of a pattern, and a negative number from the end. - * @group structure + * @tags structure * @return {Pattern} * @example * "bd cp ht mt".take("2").sound() @@ -3082,7 +3082,7 @@ export const take = stepRegister('take', function (i, pat) { * * Drops the given number of steps from a pattern. * A positive number will drop steps from the start of a pattern, and a negative number from the end. - * @group structure + * @tags structure * @return {Pattern} * @example * "tha dhi thom nam".drop("1").sound().bank("mridangam") @@ -3111,7 +3111,7 @@ export const drop = stepRegister('drop', function (i, pat) { * `extend` is similar to `fast` in that it increases its density, but it also increases the step count * accordingly. So `stepcat("a b".extend(2), "c d")` would be the same as `"a b a b c d"`, whereas * `stepcat("a b".fast(2), "c d")` would be the same as `"[a b] [a b] c d"`. - * @group structure + * @tags structure * @example * stepcat( * sound("bd bd - cp").extend(2), @@ -3126,7 +3126,7 @@ export const extend = stepRegister('extend', function (factor, pat) { * *Experimental* * * Expands the step size of the pattern by the given factor. - * @group structure + * @tags structure * @example * sound("tha dhi thom nam").bank("mridangam").expand("3 2 1 1 2 3").pace(8) */ @@ -3138,7 +3138,7 @@ export const expand = stepRegister('expand', function (factor, pat) { * *Experimental* * * Contracts the step size of the pattern by the given factor. See also `expand`. - * @group structure + * @tags structure * @example * sound("tha dhi thom nam").bank("mridangam").contract("3 2 1 1 2 3").pace(8) */ @@ -3193,7 +3193,7 @@ export const shrinklist = (amount, pat) => pat.shrinklist(amount); * Progressively shrinks the pattern by 'n' steps until there's nothing left, or if a second value is given (using mininotation list syntax with `:`), * that number of times. * A positive number will progressively drop steps from the start of a pattern, and a negative number from the end. - * @group structure + * @tags structure * @return {Pattern} * @example * "tha dhi thom nam".shrink("1").sound() @@ -3233,7 +3233,7 @@ export const shrink = register( * Progressively grows the pattern by 'n' steps until the full pattern is played, or if a second value is given (using mininotation list syntax with `:`), * that number of times. * A positive number will progressively grow steps from the start of a pattern, and a negative number from the end. - * @group structure + * @tags structure * @return {Pattern} * @example * "tha dhi thom nam".grow("1").sound() @@ -3274,7 +3274,7 @@ export const grow = register( * on successive repetitions. The patterns are added together stepwise, with all repetitions taking place over a single cycle. Using `pace` to set the * number of steps per cycle is therefore usually recommended. * - * @group combiners + * @tags combiners * @return {Pattern} * @example * "[c g]".tour("e f", "e f g", "g f e c").note() @@ -3301,7 +3301,7 @@ Pattern.prototype.tour = function (...many) { * 'zips' together the steps of the provided patterns. This can create a long repetition, taking place over a single, dense cycle. * Using `pace` to set the number of steps per cycle is therefore usually recommended. * - * @group combiners + * @tags combiners * @returns {Pattern} * @example * zip("e f", "e f g", "g [f e] a f4 c").note() @@ -3353,7 +3353,7 @@ Pattern.prototype.steps = Pattern.prototype.pace; * Cuts each sample into the given number of parts, allowing you to explore a technique known as 'granular synthesis'. * It turns a pattern of samples into a pattern of parts of samples. * @name chop - * @group transforms + * @tags transforms * @memberof Pattern * @returns Pattern * @example @@ -3384,7 +3384,7 @@ export const chop = register('chop', function (n, pat) { /** * Cuts each sample into the given number of parts, triggering progressive portions of each sample at each loop. * @name striate - * @group transforms + * @tags transforms * @memberof Pattern * @returns Pattern * @example @@ -3403,7 +3403,7 @@ export const striate = register('striate', function (n, pat) { /** * Makes the sample fit the given number of cycles by changing the speed. * @name loopAt - * @group transforms + * @tags transforms * @memberof Pattern * @returns Pattern * @example @@ -3422,7 +3422,7 @@ const _loopAt = function (factor, pat, cps = 0.5) { * Chops samples into the given number of slices, triggering those slices with a given pattern of slice numbers. * Instead of a number, it also accepts a list of numbers from 0 to 1 to slice at specific points. * @name slice - * @group transforms + * @tags transforms * @memberof Pattern * @returns Pattern * @example @@ -3458,7 +3458,7 @@ export const slice = register( * make something happen on event time * uses browser timeout which is innacurate for audio tasks * @name onTriggerTime - * @group external_io + * @tags external_io * @memberof Pattern * @returns Pattern * @example @@ -3476,7 +3476,7 @@ Pattern.prototype.onTriggerTime = function (func) { /** * Works the same as slice, but changes the playback speed of each slice to match the duration of its step. * @name splice - * @group transforms + * @tags transforms * @example * samples('github:tidalcycles/dirt-samples') * s("breaks165") @@ -3514,7 +3514,7 @@ export const { loopAt, loopat } = register(['loopAt', 'loopat'], function (facto * Makes the sample fit its event duration. Good for rhythmical loops like drum breaks. * Similar to `loopAt`. * @name fit - * @group transforms + * @tags transforms * @example * samples({ rhodes: 'https://cdn.freesound.org/previews/132/132051_316502-lq.mp3' }) * s("rhodes/2").fit() @@ -3540,7 +3540,7 @@ export const fit = register('fit', (pat) => * given by a global clock and this function will be * deprecated/removed. * @name loopAtCps - * @group transforms + * @tags transforms * @memberof Pattern * @returns Pattern * @example @@ -3567,7 +3567,7 @@ let fadeGain = (p) => (p < 0.5 ? 1 : 1 - (p - 0.5) / 0.5); * - 1 = (no left, full right) * * @name xfade - * @group combiners + * @tags combiners * @example * xfade(s("bd*2"), "<0 .25 .5 .75 1>", s("hh*8")) */ @@ -3589,7 +3589,7 @@ Pattern.prototype.xfade = function (pos, b) { * creates a structure pattern from divisions of a cycle * especially useful for creating rhythms * @name beat - * @group structure + * @tags structure * @example * s("bd").beat("0,7,10", 16) * @example @@ -3666,7 +3666,7 @@ export const _morph = (from, to, by) => { * sine.slow(8) // slowly morph between the rhythms * ) * ) - * @group structure + * @tags structure */ export const morph = (frompat, topat, bypat) => { frompat = reify(frompat); diff --git a/packages/core/signal.mjs b/packages/core/signal.mjs index 9f6636c84..03dd641a5 100644 --- a/packages/core/signal.mjs +++ b/packages/core/signal.mjs @@ -24,7 +24,7 @@ export const signal = (func) => { * A sawtooth signal between 0 and 1. * * @return {Pattern} - * @group generators + * @tags generators * @example * note("*8") * .clip(saw.slow(2)) @@ -39,7 +39,7 @@ export const saw = signal((t) => t % 1); * A sawtooth signal between -1 and 1 (like `saw`, but bipolar). * * @return {Pattern} - * @group generators + * @tags generators */ export const saw2 = saw.toBipolar(); @@ -47,7 +47,7 @@ export const saw2 = saw.toBipolar(); * A sawtooth signal between 1 and 0 (like `saw`, but flipped). * * @return {Pattern} - * @group generators + * @tags generators * @example * note("*8") * .clip(isaw.slow(2)) @@ -62,7 +62,7 @@ export const isaw = signal((t) => 1 - (t % 1)); * A sawtooth signal between 1 and -1 (like `saw2`, but flipped). * * @return {Pattern} - * @group generators + * @tags generators */ export const isaw2 = isaw.toBipolar(); @@ -70,14 +70,14 @@ export const isaw2 = isaw.toBipolar(); * A sine signal between -1 and 1 (like `sine`, but bipolar). * * @return {Pattern} - * @group generators + * @tags generators */ export const sine2 = signal((t) => Math.sin(Math.PI * 2 * t)); /** * A sine signal between 0 and 1. * @return {Pattern} - * @group generators + * @tags generators * @example * n(sine.segment(16).range(0,15)) * .scale("C:minor") @@ -89,7 +89,7 @@ export const sine = sine2.fromBipolar(); * A cosine signal between 0 and 1. * * @return {Pattern} - * @group generators + * @tags generators * @example * n(stack(sine,cosine).segment(16).range(0,15)) * .scale("C:minor") @@ -101,14 +101,14 @@ export const cosine = sine._early(Fraction(1).div(4)); * A cosine signal between -1 and 1 (like `cosine`, but bipolar). * * @return {Pattern} - * @group generators + * @tags generators */ export const cosine2 = sine2._early(Fraction(1).div(4)); /** * A square signal between 0 and 1. * @return {Pattern} - * @group generators + * @tags generators * @example * n(square.segment(4).range(0,7)).scale("C:minor") * @@ -119,7 +119,7 @@ export const square = signal((t) => Math.floor((t * 2) % 2)); * A square signal between -1 and 1 (like `square`, but bipolar). * * @return {Pattern} - * @group generators + * @tags generators */ export const square2 = square.toBipolar(); @@ -127,7 +127,7 @@ export const square2 = square.toBipolar(); * A triangle signal between 0 and 1. * * @return {Pattern} - * @group generators + * @tags generators * @example * n(tri.segment(8).range(0,7)).scale("C:minor") * @@ -138,7 +138,7 @@ export const tri = fastcat(saw, isaw); * A triangle signal between -1 and 1 (like `tri`, but bipolar). * * @return {Pattern} - * @group generators + * @tags generators */ export const tri2 = fastcat(saw2, isaw2); @@ -146,7 +146,7 @@ export const tri2 = fastcat(saw2, isaw2); * An inverted triangle signal between 1 and 0 (like `tri`, but flipped). * * @return {Pattern} - * @group generators + * @tags generators * @example * n(itri.segment(8).range(0,7)).scale("C:minor") * @@ -157,7 +157,7 @@ export const itri = fastcat(isaw, saw); * An inverted triangle signal between -1 and 1 (like `itri`, but bipolar). * * @return {Pattern} - * @group generators + * @tags generators */ export const itri2 = fastcat(isaw2, saw2); @@ -165,7 +165,7 @@ export const itri2 = fastcat(isaw2, saw2); * A signal representing the cycle time. * * @return {Pattern} - * @group generators + * @tags generators */ export const time = signal(id); @@ -173,7 +173,7 @@ export const time = signal(id); * The mouse's x position value ranges from 0 to 1. * @name mousex * @return {Pattern} - * @group external_io + * @tags external_io * @example * n(mousex.segment(4).range(0,7)).scale("C:minor") * @@ -183,7 +183,7 @@ export const time = signal(id); * The mouse's y position value ranges from 0 to 1. * @name mousey * @return {Pattern} - * @group external_io + * @tags external_io * @example * n(mousey.segment(4).range(0,7)).scale("C:minor") * @@ -238,7 +238,7 @@ const timeToRands = (t, n) => timeToRandsPrime(timeToIntSeed(t), n); /** * A discrete pattern of numbers from 0 to n-1 - * @group generators + * @tags generators * @example * n(run(4)).scale("C4:pentatonic") * // n("0 1 2 3").scale("C4:pentatonic") @@ -249,7 +249,7 @@ export const run = (n) => saw.range(0, n).round().segment(n); * Creates a pattern from a binary number. * * @name binary - * @group generators + * @tags generators * @param {number} n - input number to convert to binary * @example * "hh".s().struct(binary(5)) @@ -264,7 +264,7 @@ export const binary = (n) => { * Creates a pattern from a binary number, padded to n bits long. * * @name binaryN - * @group generators + * @tags generators * @param {number} n - input number to convert to binary * @param {number} nBits - pattern length, defaults to 16 * @example @@ -300,7 +300,7 @@ const _rearrangeWith = (ipat, n, pat) => { * Slices a pattern into the given number of parts, then plays those parts in random order. * Each part will be played exactly once per cycle. * @name shuffle - * @group transforms + * @tags transforms * @example * note("c d e f").sound("piano").shuffle(4) * @example @@ -314,7 +314,7 @@ export const shuffle = register('shuffle', (n, pat) => { * Slices a pattern into the given number of parts, then plays those parts at random. Similar to `shuffle`, * but parts might be played more than once, or not at all, per cycle. * @name scramble - * @group transforms + * @tags transforms * @example * note("c d e f").sound("piano").scramble(4) * @example @@ -328,7 +328,7 @@ export const scramble = register('scramble', (n, pat) => { * A continuous pattern of random numbers, between 0 and 1. * * @name rand - * @group generators + * @tags generators * @example * // randomly change the cutoff * s("bd*4,hh*8").cutoff(rand.range(500,8000)) @@ -346,7 +346,7 @@ export const _brandBy = (p) => rand.fmap((x) => x < p); * A continuous pattern of 0 or 1 (binary random), with a probability for the value being 1 * * @name brandBy - * @group generators + * @tags generators * @param {number} probability - a number between 0 and 1 * @example * s("hh*10").pan(brandBy(0.2)) @@ -357,7 +357,7 @@ export const brandBy = (pPat) => reify(pPat).fmap(_brandBy).innerJoin(); * A continuous pattern of 0 or 1 (binary random) * * @name brand - * @group generators + * @tags generators * @example * s("hh*10").pan(brand) */ @@ -369,7 +369,7 @@ export const _irand = (i) => rand.fmap((x) => Math.trunc(x * i)); * A continuous pattern of random integers, between 0 and n-1. * * @name irand - * @group generators + * @tags generators * @param {number} n max value (exclusive) * @example * // randomly select scale notes from 0 - 7 (= C to C) @@ -392,7 +392,7 @@ export const __chooseWith = (pat, xs) => { /** * Choose from the list of values (or patterns of values) using the given * pattern of numbers, which should be in the range of 0..1 - * @group transforms + * @tags transforms * @param {Pattern} pat * @param {*} xs * @returns {Pattern} @@ -406,7 +406,7 @@ export const chooseWith = (pat, xs) => { /** * As with {chooseWith}, but the structure comes from the chosen values, rather * than the pattern you're using to choose with. - * @group transforms + * @tags transforms * @param {Pattern} pat * @param {*} xs * @returns {Pattern} @@ -417,7 +417,7 @@ export const chooseInWith = (pat, xs) => { /** * Chooses randomly from the given list of elements. - * @group transforms + * @tags transforms * @param {...any} xs values / patterns to choose from. * @returns {Pattern} - a continuous pattern. * @example @@ -433,7 +433,7 @@ export const chooseOut = choose; * Chooses from the given list of values (or patterns of values), according * to the pattern that the method is called on. The pattern should be in * the range 0 .. 1. - * @group transforms + * @tags transforms * @param {...any} xs * @returns {Pattern} */ @@ -444,7 +444,7 @@ Pattern.prototype.choose = function (...xs) { /** * As with choose, but the pattern that this method is called on should be * in the range -1 .. 1 - * @group transforms + * @tags transforms * @param {...any} xs * @returns {Pattern} */ @@ -454,7 +454,7 @@ Pattern.prototype.choose2 = function (...xs) { /** * Picks one of the elements at random each cycle. - * @group transforms + * @tags transforms * @synonyms randcat * @returns {Pattern} * @example @@ -497,7 +497,7 @@ const wchooseWith = (...args) => _wchooseWith(...args).outerJoin(); /** * Chooses randomly from the given list of elements by giving a probability to each element - * @group transforms + * @tags transforms * @param {...any} pairs arrays of value and weight * @returns {Pattern} - a continuous pattern. * @example @@ -507,7 +507,7 @@ export const wchoose = (...pairs) => wchooseWith(rand, ...pairs); /** * Picks one of the elements at random each cycle by giving a probability to each element - * @group transforms + * @tags transforms * @synonyms wrandcat * @returns {Pattern} * @example @@ -555,7 +555,7 @@ export const berlinWith = (tpat) => { /** * Generates a continuous pattern of [perlin noise](https://en.wikipedia.org/wiki/Perlin_noise), in the range 0..1. * - * @group generators + * @tags generators * @name perlin * @example * // randomly change the cutoff @@ -568,7 +568,7 @@ export const perlin = perlinWith(time.fmap((v) => Number(v))); * Generates a continuous pattern of [berlin noise](conceived by Jame Coyne and Jade Rowland as a joke but turned out to be surprisingly cool and useful, * like perlin noise but with sawtooth waves), in the range 0..1. * - * @group generators + * @tags generators * @name berlin * @example * // ascending arpeggios @@ -589,7 +589,7 @@ export const degradeByWith = register( * 0 = 0% chance of removal * 1 = 100% chance of removal * - * @group transforms + * @tags transforms * @name degradeBy * @memberof Pattern * @param {number} amount - a number between 0 and 1 @@ -615,7 +615,7 @@ export const degradeBy = register( * * Randomly removes 50% of events from the pattern. Shorthand for `.degradeBy(0.5)` * - * @group transforms + * @tags transforms * @name degrade * @memberof Pattern * @returns Pattern @@ -632,7 +632,7 @@ export const degrade = register('degrade', (pat) => pat._degradeBy(0.5), true, t * 1 = 0% chance of removal * Events that would be removed by degradeBy are let through by undegradeBy and vice versa (see second example). * - * @group transforms + * @tags transforms * @name undegradeBy * @memberof Pattern * @param {number} amount - a number between 0 and 1 @@ -661,7 +661,7 @@ export const undegradeBy = register( * Inverse of `degrade`: Randomly removes 50% of events from the pattern. Shorthand for `.undegradeBy(0.5)` * Events that would be removed by degrade are let through by undegrade and vice versa (see second example). * - * @group transforms + * @tags transforms * @name undegrade * @memberof Pattern * @returns Pattern @@ -680,7 +680,7 @@ export const undegrade = register('undegrade', (pat) => pat._undegradeBy(0.5), t * Randomly applies the given function by the given probability. * Similar to `someCyclesBy` * - * @group transforms + * @tags transforms * @name sometimesBy * @memberof Pattern * @param {number | Pattern} probability - a number between 0 and 1 @@ -700,7 +700,7 @@ export const sometimesBy = register('sometimesBy', function (patx, func, pat) { * * Applies the given function with a 50% chance * - * @group transforms + * @tags transforms * @name sometimes * @memberof Pattern * @param {function} function - the transformation to apply @@ -722,7 +722,7 @@ export const sometimes = register('sometimes', function (func, pat) { * @param {number | Pattern} probability - a number between 0 and 1 * @param {function} function - the transformation to apply * @returns Pattern - * @group transforms + * @tags transforms * @example * s("bd,hh*8").someCyclesBy(.3, x=>x.speed("0.5")) */ @@ -745,7 +745,7 @@ export const someCyclesBy = register('someCyclesBy', function (patx, func, pat) * @name someCycles * @memberof Pattern * @returns Pattern - * @group transforms + * @tags transforms * @example * s("bd,hh*8").someCycles(x=>x.speed("0.5")) */ @@ -760,7 +760,7 @@ export const someCycles = register('someCycles', function (func, pat) { * @name often * @memberof Pattern * @returns Pattern - * @group transforms + * @tags transforms * @example * s("hh*8").often(x=>x.speed("0.5")) */ @@ -775,7 +775,7 @@ export const often = register('often', function (func, pat) { * @name rarely * @memberof Pattern * @returns Pattern - * @group transforms + * @tags transforms * @example * s("hh*8").rarely(x=>x.speed("0.5")) */ @@ -787,7 +787,7 @@ export const rarely = register('rarely', function (func, pat) { * * Shorthand for `.sometimesBy(0.1, fn)` * - * @group transforms + * @tags transforms * @name almostNever * @memberof Pattern * @returns Pattern @@ -802,7 +802,7 @@ export const almostNever = register('almostNever', function (func, pat) { * * Shorthand for `.sometimesBy(0.9, fn)` * - * @group transforms + * @tags transforms * @name almostAlways * @memberof Pattern * @returns Pattern @@ -817,7 +817,7 @@ export const almostAlways = register('almostAlways', function (func, pat) { * * Shorthand for `.sometimesBy(0, fn)` (never calls fn) * - * @group transforms + * @tags transforms * @name never * @memberof Pattern * @returns Pattern @@ -832,7 +832,7 @@ export const never = register('never', function (_, pat) { * * Shorthand for `.sometimesBy(1, fn)` (always calls fn) * - * @group transforms + * @tags transforms * @name always * @memberof Pattern * @returns Pattern @@ -861,7 +861,7 @@ export function _keyDown(keyname) { * Do something on a keypress, or array of keypresses * [Key name reference](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values) * - * @group external_io + * @tags external_io * @name whenKey * @memberof Pattern * @returns Pattern @@ -878,7 +878,7 @@ export const whenKey = register('whenKey', function (input, func, pat) { * returns true when a key or array of keys is held * [Key name reference](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values) * - * @group external_io + * @tags external_io * @name keyDown * @memberof Pattern * @returns Pattern diff --git a/packages/motion/motion.mjs b/packages/motion/motion.mjs index cba814a84..fed0fbe0c 100644 --- a/packages/motion/motion.mjs +++ b/packages/motion/motion.mjs @@ -7,7 +7,7 @@ import { signal } from '../core/signal.mjs'; * @name accelerationX * @return {Pattern} * @synonyms accX - * @group external_io + * @tags external_io * @example * n(accelerationX.segment(4).range(0,7)).scale("C:minor") * @@ -18,7 +18,7 @@ import { signal } from '../core/signal.mjs'; * @name accelerationY * @return {Pattern} * @synonyms accY - * @group external_io + * @tags external_io * @example * n(accelerationY.segment(4).range(0,7)).scale("C:minor") * @@ -29,7 +29,7 @@ import { signal } from '../core/signal.mjs'; * @name accelerationZ * @return {Pattern} * @synonyms accZ - * @group external_io + * @tags external_io * @example * n(accelerationZ.segment(4).range(0,7)).scale("C:minor") * @@ -40,7 +40,7 @@ import { signal } from '../core/signal.mjs'; * @name gravityX * @return {Pattern} * @synonyms gravX - * @group external_io + * @tags external_io * @example * n(gravityX.segment(4).range(0,7)).scale("C:minor") * @@ -51,7 +51,7 @@ import { signal } from '../core/signal.mjs'; * @name gravityY * @return {Pattern} * @synonyms gravY - * @group external_io + * @tags external_io * @example * n(gravityY.segment(4).range(0,7)).scale("C:minor") * @@ -62,7 +62,7 @@ import { signal } from '../core/signal.mjs'; * @name gravityZ * @return {Pattern} * @synonyms gravZ - * @group external_io + * @tags external_io * @example * n(gravityZ.segment(4).range(0,7)).scale("C:minor") * @@ -73,7 +73,7 @@ import { signal } from '../core/signal.mjs'; * @name rotationAlpha * @return {Pattern} * @synonyms rotA, rotZ, rotationZ - * @group external_io + * @tags external_io * @example * n(rotationAlpha.segment(4).range(0,7)).scale("C:minor") * @@ -84,7 +84,7 @@ import { signal } from '../core/signal.mjs'; * @name rotationBeta * @return {Pattern} * @synonyms rotB, rotX, rotationX - * @group external_io + * @tags external_io * @example * n(rotationBeta.segment(4).range(0,7)).scale("C:minor") * @@ -95,7 +95,7 @@ import { signal } from '../core/signal.mjs'; * @name rotationGamma * @return {Pattern} * @synonyms rotG, rotY, rotationY - * @group external_io + * @tags external_io * @example * n(rotationGamma.segment(4).range(0,7)).scale("C:minor") * @@ -106,7 +106,7 @@ import { signal } from '../core/signal.mjs'; * @name orientationAlpha * @return {Pattern} * @synonyms oriA, oriZ, orientationZ - * @group external_io + * @tags external_io * @example * n(orientationAlpha.segment(4).range(0,7)).scale("C:minor") * @@ -117,7 +117,7 @@ import { signal } from '../core/signal.mjs'; * @name orientationBeta * @return {Pattern} * @synonyms oriB, oriX, orientationX - * @group external_io + * @tags external_io * @example * n(orientationBeta.segment(4).range(0,7)).scale("C:minor") * @@ -128,7 +128,7 @@ import { signal } from '../core/signal.mjs'; * @name orientationGamma * @return {Pattern} * @synonyms oriG, oriY, orientationY - * @group external_io + * @tags external_io * @example * n(orientationGamma.segment(4).range(0,7)).scale("C:minor") * @@ -139,7 +139,7 @@ import { signal } from '../core/signal.mjs'; * @name absoluteOrientationAlpha * @return {Pattern} * @synonyms absOriA, absOriZ, absoluteOrientationZ - * @group external_io + * @tags external_io * @example * n(absoluteOrientationAlpha.segment(4).range(0,7)).scale("C:minor") * @@ -150,7 +150,7 @@ import { signal } from '../core/signal.mjs'; * @name absoluteOrientationBeta * @return {Pattern} * @synonyms absOriB, absOriX, absoluteOrientationX - * @group external_io + * @tags external_io * @example * n(absoluteOrientationBeta.segment(4).range(0,7)).scale("C:minor") * @@ -161,7 +161,7 @@ import { signal } from '../core/signal.mjs'; * @name absoluteOrientationGamma * @return {Pattern} * @synonyms absOriG, absOriY, absoluteOrientationY - * @group external_io + * @tags external_io * @example * n(absoluteOrientationGamma.segment(4).range(0,7)).scale("C:minor") * diff --git a/packages/superdough/reverbGen.mjs b/packages/superdough/reverbGen.mjs index 0d5fee264..42da7c6d5 100644 --- a/packages/superdough/reverbGen.mjs +++ b/packages/superdough/reverbGen.mjs @@ -80,7 +80,7 @@ reverbGen.generateGraph = function (data, width, height, min, max) { @param {number} lpFreqEndAt @param {!function(!AudioBuffer)} callback May be called immediately within the current execution context, or later. - @group effects + @tags effects */ var applyGradualLowpass = function (input, lpFreqStart, lpFreqEnd, lpFreqEndAt, callback) { if (lpFreqStart == 0) { diff --git a/packages/supradough/dough.mjs b/packages/supradough/dough.mjs index 7eeb7a507..23dfbee09 100644 --- a/packages/supradough/dough.mjs +++ b/packages/supradough/dough.mjs @@ -18,7 +18,7 @@ function applyGainCurve(val) { * @param {number} a - Signal A (can be a single value or an array value in buffer processing). * @param {number} b - Signal B (can be a single value or an array value in buffer processing). * @param {number} m - Crossfade parameter (0.0 = all A, 1.0 = all B, 0.5 = equal mix). - * @group effects + * @tags effects * @returns {number} Crossfaded output value. */ function crossfade(a, b, m) {