Add retrig option for LFOs
This commit is contained in:
parent
8ec1d4d034
commit
62bf9abed3
2 changed files with 5 additions and 2 deletions
|
|
@ -3046,6 +3046,7 @@ registerSubControls('lfo', [
|
||||||
['skew', 'sk'],
|
['skew', 'sk'],
|
||||||
['curve', 'cu'],
|
['curve', 'cu'],
|
||||||
['sync', 's'],
|
['sync', 's'],
|
||||||
|
['retrig', 'rt'],
|
||||||
['fxi'],
|
['fxi'],
|
||||||
]);
|
]);
|
||||||
registerSubControls('env', [
|
registerSubControls('env', [
|
||||||
|
|
@ -3132,13 +3133,14 @@ Pattern.prototype.modulate = function (type, config, idPat) {
|
||||||
* @param {string | Pattern} [config.control] Node to modulate. Aliases: c
|
* @param {string | Pattern} [config.control] Node to modulate. Aliases: c
|
||||||
* @param {string | Pattern} [config.subControl] Sub-control name to append to the control key. Aliases: sc
|
* @param {string | Pattern} [config.subControl] Sub-control name to append to the control key. Aliases: sc
|
||||||
* @param {number | Pattern} [config.rate] Modulation rate. Aliases: r
|
* @param {number | Pattern} [config.rate] Modulation rate. Aliases: r
|
||||||
|
* @param {number | Pattern} [config.sync] Tempo-synced modulation rate. Aliases: s
|
||||||
* @param {number | Pattern} [config.depth] Relative modulation depth. Aliases: dep, dr
|
* @param {number | Pattern} [config.depth] Relative modulation depth. Aliases: dep, dr
|
||||||
* @param {number | Pattern} [config.depthabs] Absolute modulation depth. Aliases: da
|
* @param {number | Pattern} [config.depthabs] Absolute modulation depth. Aliases: da
|
||||||
* @param {number | Pattern} [config.dcoffset] DC offset / bias for the waveform. Aliases: dc
|
* @param {number | Pattern} [config.dcoffset] DC offset / bias for the waveform. Aliases: dc
|
||||||
* @param {number | Pattern} [config.shape] Shape index. Aliases: sh
|
* @param {number | Pattern} [config.shape] Shape index. Aliases: sh
|
||||||
* @param {number | Pattern} [config.skew] Skew amount. Aliases: sk
|
* @param {number | Pattern} [config.skew] Skew amount. Aliases: sk
|
||||||
* @param {number | Pattern} [config.curve] Exponential curve amount. Aliases: cu
|
* @param {number | Pattern} [config.curve] Exponential curve amount. Aliases: cu
|
||||||
* @param {number | Pattern} [config.sync] Tempo-synced modulation rate. Aliases: s
|
* @param {number | Pattern} [config.retrig] If > 0.5, the LFO will retrigger on each event. Aliases: rt
|
||||||
* @param {number | Pattern} [config.fxi] FX index to target
|
* @param {number | Pattern} [config.fxi] FX index to target
|
||||||
* @param {string | Pattern} id ID to use for this modulator
|
* @param {string | Pattern} id ID to use for this modulator
|
||||||
* @returns Pattern
|
* @returns Pattern
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ export const connectLFO = (id, params, nodeTracker) => {
|
||||||
fxi = 'main',
|
fxi = 'main',
|
||||||
depth = 1,
|
depth = 1,
|
||||||
depthabs,
|
depthabs,
|
||||||
|
retrig = 0,
|
||||||
...filteredParams
|
...filteredParams
|
||||||
} = params;
|
} = params;
|
||||||
const { targetParams, paramName } = getTargetParamsForControl(control, nodeTracker[fxi], subControl);
|
const { targetParams, paramName } = getTargetParamsForControl(control, nodeTracker[fxi], subControl);
|
||||||
|
|
@ -109,7 +110,7 @@ export const connectLFO = (id, params, nodeTracker) => {
|
||||||
const modParams = {
|
const modParams = {
|
||||||
...filteredParams,
|
...filteredParams,
|
||||||
frequency: sync !== undefined ? sync * cps : rate,
|
frequency: sync !== undefined ? sync * cps : rate,
|
||||||
time: cycle / cps,
|
time: retrig > 0.5 ? 0 : cycle / cps,
|
||||||
depth: depthValue,
|
depth: depthValue,
|
||||||
min,
|
min,
|
||||||
max,
|
max,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue