mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-05 14:49:02 -04:00
delaysync
This commit is contained in:
@@ -985,15 +985,31 @@ export const { delayfeedback, delayfb, dfb } = registerControl('delayfeedback',
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export const { delaytime, delayt, dt } = registerControl('delaytime', 'delayt', 'dt');
|
export const { delaytime, delayt, dt } = registerControl('delaytime', 'delayt', 'dt');
|
||||||
/* // TODO: test
|
|
||||||
|
/**
|
||||||
|
* Sets the time of the delay effect in cycles.
|
||||||
|
*
|
||||||
|
* @name delaysync
|
||||||
|
* @param {number | Pattern} cycles delay length in cycles
|
||||||
|
* @synonyms delayt, dt
|
||||||
|
* @example
|
||||||
|
* s("bd bd").delay(.25).delaysync("<1 2 3 5>".div(8))
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export const { delaysync } = registerControl('delaysync');
|
||||||
|
|
||||||
|
/**
|
||||||
* Specifies whether delaytime is calculated relative to cps.
|
* Specifies whether delaytime is calculated relative to cps.
|
||||||
*
|
*
|
||||||
* @name lock
|
* @name lock
|
||||||
* @param {number | Pattern} enable When set to 1, delaytime is a direct multiple of a cycle.
|
* @param {number | Pattern} enable When set to 1, delaytime is a direct multiple of a cycle.
|
||||||
|
* @superdirtOnly
|
||||||
* @example
|
* @example
|
||||||
* s("sd").delay().lock(1).osc()
|
* s("sd").delay().lock(1).osc()
|
||||||
*
|
*
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const { lock } = registerControl('lock');
|
export const { lock } = registerControl('lock');
|
||||||
/**
|
/**
|
||||||
* Set detune for stacked voices of supported oscillators
|
* Set detune for stacked voices of supported oscillators
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ export const superdough = async (value, t, hapDuration, cps = 0.5) => {
|
|||||||
compressorRelease,
|
compressorRelease,
|
||||||
} = value;
|
} = value;
|
||||||
|
|
||||||
delaytime = delaytime ?? cycleToSeconds(delaysync)
|
delaytime = delaytime ?? cycleToSeconds(delaysync, cps);
|
||||||
|
|
||||||
const orbitChannels = mapChannelNumbers(
|
const orbitChannels = mapChannelNumbers(
|
||||||
multiChannelOrbits && orbit > 0 ? [orbit * 2 - 1, orbit * 2] : getDefaultValue('channels'),
|
multiChannelOrbits && orbit > 0 ? [orbit * 2 - 1, orbit * 2] : getDefaultValue('channels'),
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ export const webaudioOutput = (hap, deadline, hapDuration, cps, t) => {
|
|||||||
return superdough(hap2value(hap), t ? `=${t}` : deadline, hapDuration, cps);
|
return superdough(hap2value(hap), t ? `=${t}` : deadline, hapDuration, cps);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Pattern.prototype.webaudio = function () {
|
Pattern.prototype.webaudio = function () {
|
||||||
return this.onTrigger(webaudioOutputTrigger);
|
return this.onTrigger(webaudioOutputTrigger);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user