refactor: duration is now a regular control

This commit is contained in:
Felix Roos 2024-02-29 04:05:05 +01:00
parent f779e81993
commit eb93a6c149
6 changed files with 26 additions and 13 deletions

View file

@ -1376,8 +1376,6 @@ export const { waveloss } = registerControl('waveloss');
*
*/
export const { density } = registerControl('density');
// TODO: midi effects?
export const { dur } = registerControl('dur');
// ['modwheel'],
export const { expression } = registerControl('expression');
export const { sustainpedal } = registerControl('sustainpedal');
@ -1452,6 +1450,18 @@ export const { cps } = registerControl('cps');
*/
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
* @synonyms dur
* @param {number | Pattern} seconds >= 0
* @example
* note("c a f e").s("piano").dur("<.5 1 2>")
*
*/
export const { duration, dur } = registerControl('duration', 'dur');
// ZZFX
export const { zrand } = registerControl('zrand');
export const { curve } = registerControl('curve');