Recategorize

This commit is contained in:
Václav Volhejn
2025-10-12 16:33:07 +02:00
parent ee1a894f3b
commit a4212589e5
3 changed files with 52 additions and 52 deletions
+18 -18
View File
@@ -1621,7 +1621,7 @@ export const { fadeInTime } = registerControl('fadeInTime');
* Set frequency of sound.
*
* @name freq
* @tags transforms
* @tags temporal
* @param {number | Pattern} frequency in Hz. the audible range is between 20 and 20000 Hz
* @example
* freq("220 110 440 110").s("superzow").osc()
@@ -2205,7 +2205,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
* @tags transforms
* @tags temporal
* @synonyms legato
* @param {number | Pattern} factor >= 0
* @example
@@ -2218,7 +2218,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
* @tags transforms
* @tags temporal
* @synonyms dur
* @param {number | Pattern} seconds >= 0
* @example
@@ -2297,7 +2297,7 @@ export const ar = register('ar', (t, pat) => {
* MIDI channel: Sets the MIDI channel for the event.
*
* @name midichan
* @tags examples
* @tags external_io
* @param {number | Pattern} channel MIDI channel number (0-15)
* @example
* note("c4").midichan(1).midi()
@@ -2310,7 +2310,7 @@ export const { midimap } = registerControl('midimap');
* MIDI port: Sets the MIDI port for the event.
*
* @name midiport
* @tags examples
* @tags external_io
* @param {number | Pattern} port MIDI port
* @example
* note("c a f e").midiport("<0 1 2 3>").midi()
@@ -2321,7 +2321,7 @@ export const { midiport } = registerControl('midiport');
* MIDI command: Sends a MIDI command message.
*
* @name midicmd
* @tags examples
* @tags external_io
* @param {number | Pattern} command MIDI command
* @example
* midicmd("clock*48,<start stop>/2").midi()
@@ -2332,7 +2332,7 @@ export const { midicmd } = registerControl('midicmd');
* MIDI control: Sends a MIDI control change message.
*
* @name control
* @tags examples
* @tags external_io
* @param {number | Pattern} MIDI control number (0-127)
* @param {number | Pattern} MIDI controller value (0-127)
*/
@@ -2348,7 +2348,7 @@ export const control = register('control', (args, pat) => {
* MIDI control number: Sends a MIDI control change message.
*
* @name ccn
* @tags examples
* @tags external_io
* @param {number | Pattern} MIDI control number (0-127)
*/
export const { ccn } = registerControl('ccn');
@@ -2356,7 +2356,7 @@ export const { ccn } = registerControl('ccn');
* MIDI control value: Sends a MIDI control change message.
*
* @name ccv
* @tags examples
* @tags external_io
* @param {number | Pattern} MIDI control value (0-127)
*/
export const { ccv } = registerControl('ccv');
@@ -2366,7 +2366,7 @@ export const { ctlNum } = registerControl('ctlNum');
/**
* MIDI NRPN non-registered parameter number: Sends a MIDI NRPN non-registered parameter number message.
* @name nrpnn
* @tags examples
* @tags external_io
* @param {number | Pattern} nrpnn MIDI NRPN non-registered parameter number (0-127)
* @example
* note("c4").nrpnn("1:8").nrpv("123").midichan(1).midi()
@@ -2375,7 +2375,7 @@ export const { nrpnn } = registerControl('nrpnn');
/**
* MIDI NRPN non-registered parameter value: Sends a MIDI NRPN non-registered parameter value message.
* @name nrpv
* @tags examples
* @tags external_io
* @param {number | Pattern} nrpv MIDI NRPN non-registered parameter value (0-127)
* @example
* note("c4").nrpnn("1:8").nrpv("123").midichan(1).midi()
@@ -2386,7 +2386,7 @@ export const { nrpv } = registerControl('nrpv');
* MIDI program number: Sends a MIDI program change message.
*
* @name progNum
* @tags examples
* @tags external_io
* @param {number | Pattern} program MIDI program number (0-127)
* @example
* note("c4").progNum(10).midichan(1).midi()
@@ -2396,7 +2396,7 @@ export const { progNum } = registerControl('progNum');
/**
* MIDI sysex: Sends a MIDI sysex message.
* @name sysex
* @tags examples
* @tags external_io
* @param {number | Pattern} id Sysex ID
* @param {number | Pattern} data Sysex data
* @example
@@ -2412,7 +2412,7 @@ export const sysex = register('sysex', (args, pat) => {
/**
* MIDI sysex ID: Sends a MIDI sysex identifier message.
* @name sysexid
* @tags examples
* @tags external_io
* @param {number | Pattern} id Sysex ID
* @example
* note("c4").sysexid("0x77").sysexdata("0x01:0x02:0x03:0x04").midichan(1).midi()
@@ -2421,7 +2421,7 @@ export const { sysexid } = registerControl('sysexid');
/**
* MIDI sysex data: Sends a MIDI sysex message.
* @name sysexdata
* @tags examples
* @tags external_io
* @param {number | Pattern} data Sysex data
* @example
* note("c4").sysexid("0x77").sysexdata("0x01:0x02:0x03:0x04").midichan(1).midi()
@@ -2431,7 +2431,7 @@ export const { sysexdata } = registerControl('sysexdata');
/**
* MIDI pitch bend: Sends a MIDI pitch bend message.
* @name midibend
* @tags examples
* @tags external_io
* @param {number | Pattern} midibend MIDI pitch bend (-1 - 1)
* @example
* note("c4").midibend(sine.slow(4).range(-0.4,0.4)).midi()
@@ -2440,7 +2440,7 @@ export const { midibend } = registerControl('midibend');
/**
* MIDI key after touch: Sends a MIDI key after touch message.
* @name miditouch
* @tags examples
* @tags external_io
* @param {number | Pattern} miditouch MIDI key after touch (0-1)
* @example
* note("c4").miditouch(sine.slow(4).range(0,1)).midi()
@@ -2461,7 +2461,7 @@ export const getControlName = (alias) => {
* Sets properties in a batch.
*
* @name as
* @tags transforms
* @tags temporal
* @param {String | Array} mapping the control names that are set
* @example
* "c:.5 a:1 f:.25 e:.8".as("note:clip")
+10 -10
View File
@@ -978,7 +978,7 @@ Pattern.prototype.collect = function () {
/**
* Selects indices in in stacked notes.
* @tags transforms
* @tags temporal
* @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.
* @tags transforms
* @tags temporal
* @example
* note("<[c,eb,g]!2 [c,f,ab] [d,f,ab]>")
* .arp("0 [0,2] 1 [0,2]")
@@ -1342,7 +1342,7 @@ export function reify(thing) {
/**
* Takes a list of patterns, and returns a pattern of lists.
*
* @tags transforms
* @tags temporal
*/
export function sequenceP(pats) {
let result = pure([]);
@@ -3354,7 +3354,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
* @tags transforms
* @tags temporal
* @memberof Pattern
* @returns Pattern
* @example
@@ -3385,7 +3385,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
* @tags transforms
* @tags temporal
* @memberof Pattern
* @returns Pattern
* @example
@@ -3404,7 +3404,7 @@ export const striate = register('striate', function (n, pat) {
/**
* Makes the sample fit the given number of cycles by changing the speed.
* @name loopAt
* @tags transforms
* @tags temporal
* @memberof Pattern
* @returns Pattern
* @example
@@ -3423,7 +3423,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
* @tags transforms
* @tags temporal
* @memberof Pattern
* @returns Pattern
* @example
@@ -3477,7 +3477,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
* @tags transforms
* @tags temporal
* @example
* samples('github:tidalcycles/dirt-samples')
* s("breaks165")
@@ -3515,7 +3515,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
* @tags transforms
* @tags temporal
* @example
* samples({ rhodes: 'https://cdn.freesound.org/previews/132/132051_316502-lq.mp3' })
* s("rhodes/2").fit()
@@ -3541,7 +3541,7 @@ export const fit = register('fit', (pat) =>
* given by a global clock and this function will be
* deprecated/removed.
* @name loopAtCps
* @tags transforms
* @tags temporal
* @memberof Pattern
* @returns Pattern
* @example
+24 -24
View File
@@ -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
* @tags transforms
* @tags temporal
* @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
* @tags transforms
* @tags temporal
* @example
* note("c d e f").sound("piano").scramble(4)
* @example
@@ -393,7 +393,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
* @tags transforms
* @tags temporal
* @param {Pattern} pat
* @param {*} xs
* @returns {Pattern}
@@ -407,7 +407,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.
* @tags transforms
* @tags temporal
* @param {Pattern} pat
* @param {*} xs
* @returns {Pattern}
@@ -418,7 +418,7 @@ export const chooseInWith = (pat, xs) => {
/**
* Chooses randomly from the given list of elements.
* @tags transforms
* @tags temporal
* @param {...any} xs values / patterns to choose from.
* @returns {Pattern} - a continuous pattern.
* @example
@@ -434,7 +434,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.
* @tags transforms
* @tags temporal
* @param {...any} xs
* @returns {Pattern}
*/
@@ -445,7 +445,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
* @tags transforms
* @tags temporal
* @param {...any} xs
* @returns {Pattern}
*/
@@ -455,7 +455,7 @@ Pattern.prototype.choose2 = function (...xs) {
/**
* Picks one of the elements at random each cycle.
* @tags transforms
* @tags temporal
* @synonyms randcat
* @returns {Pattern}
* @example
@@ -498,7 +498,7 @@ const wchooseWith = (...args) => _wchooseWith(...args).outerJoin();
/**
* Chooses randomly from the given list of elements by giving a probability to each element
* @tags transforms
* @tags temporal
* @param {...any} pairs arrays of value and weight
* @returns {Pattern} - a continuous pattern.
* @example
@@ -508,7 +508,7 @@ export const wchoose = (...pairs) => wchooseWith(rand, ...pairs);
/**
* Picks one of the elements at random each cycle by giving a probability to each element
* @tags transforms
* @tags temporal
* @synonyms wrandcat
* @returns {Pattern}
* @example
@@ -590,7 +590,7 @@ export const degradeByWith = register(
* 0 = 0% chance of removal
* 1 = 100% chance of removal
*
* @tags transforms
* @tags temporal
* @name degradeBy
* @memberof Pattern
* @param {number} amount - a number between 0 and 1
@@ -616,7 +616,7 @@ export const degradeBy = register(
*
* Randomly removes 50% of events from the pattern. Shorthand for `.degradeBy(0.5)`
*
* @tags transforms
* @tags temporal
* @name degrade
* @memberof Pattern
* @returns Pattern
@@ -633,7 +633,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).
*
* @tags transforms
* @tags temporal
* @name undegradeBy
* @memberof Pattern
* @param {number} amount - a number between 0 and 1
@@ -662,7 +662,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).
*
* @tags transforms
* @tags temporal
* @name undegrade
* @memberof Pattern
* @returns Pattern
@@ -681,7 +681,7 @@ export const undegrade = register('undegrade', (pat) => pat._undegradeBy(0.5), t
* Randomly applies the given function by the given probability.
* Similar to `someCyclesBy`
*
* @tags transforms
* @tags temporal
* @name sometimesBy
* @memberof Pattern
* @param {number | Pattern} probability - a number between 0 and 1
@@ -701,7 +701,7 @@ export const sometimesBy = register('sometimesBy', function (patx, func, pat) {
*
* Applies the given function with a 50% chance
*
* @tags transforms
* @tags temporal
* @name sometimes
* @memberof Pattern
* @param {function} function - the transformation to apply
@@ -723,7 +723,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
* @tags transforms
* @tags temporal
* @example
* s("bd,hh*8").someCyclesBy(.3, x=>x.speed("0.5"))
*/
@@ -746,7 +746,7 @@ export const someCyclesBy = register('someCyclesBy', function (patx, func, pat)
* @name someCycles
* @memberof Pattern
* @returns Pattern
* @tags transforms
* @tags temporal
* @example
* s("bd,hh*8").someCycles(x=>x.speed("0.5"))
*/
@@ -761,7 +761,7 @@ export const someCycles = register('someCycles', function (func, pat) {
* @name often
* @memberof Pattern
* @returns Pattern
* @tags transforms
* @tags temporal
* @example
* s("hh*8").often(x=>x.speed("0.5"))
*/
@@ -776,7 +776,7 @@ export const often = register('often', function (func, pat) {
* @name rarely
* @memberof Pattern
* @returns Pattern
* @tags transforms
* @tags temporal
* @example
* s("hh*8").rarely(x=>x.speed("0.5"))
*/
@@ -788,7 +788,7 @@ export const rarely = register('rarely', function (func, pat) {
*
* Shorthand for `.sometimesBy(0.1, fn)`
*
* @tags transforms
* @tags temporal
* @name almostNever
* @memberof Pattern
* @returns Pattern
@@ -803,7 +803,7 @@ export const almostNever = register('almostNever', function (func, pat) {
*
* Shorthand for `.sometimesBy(0.9, fn)`
*
* @tags transforms
* @tags temporal
* @name almostAlways
* @memberof Pattern
* @returns Pattern
@@ -818,7 +818,7 @@ export const almostAlways = register('almostAlways', function (func, pat) {
*
* Shorthand for `.sometimesBy(0, fn)` (never calls fn)
*
* @tags transforms
* @tags temporal
* @name never
* @memberof Pattern
* @returns Pattern
@@ -833,7 +833,7 @@ export const never = register('never', function (_, pat) {
*
* Shorthand for `.sometimesBy(1, fn)` (always calls fn)
*
* @tags transforms
* @tags temporal
* @name always
* @memberof Pattern
* @returns Pattern