fixed tri shape
This commit is contained in:
parent
16472b59dd
commit
6c05a4eb7b
4 changed files with 46 additions and 14 deletions
|
|
@ -439,7 +439,7 @@ export const { coarse } = registerControl('coarse');
|
|||
* s("triangle").am("2").amshape("<tri saw ramp square>").amdepth(.5)
|
||||
*
|
||||
*/
|
||||
export const { am } = registerControl(['am', 'amdepth', 'amshape']);
|
||||
export const { am } = registerControl(['am', 'amdepth', 'amskew', 'amphase']);
|
||||
|
||||
/**
|
||||
* depth of amplitude modulation
|
||||
|
|
@ -451,6 +451,27 @@ export const { am } = registerControl(['am', 'amdepth', 'amshape']);
|
|||
*
|
||||
*/
|
||||
export const { amdepth } = registerControl('amdepth');
|
||||
/**
|
||||
* alter the shape of the modulation waveform
|
||||
*
|
||||
* @name amskew
|
||||
* @param {number | Pattern} amount between 0 & 1, the shape of the waveform
|
||||
* @example
|
||||
* note("{f a c e}%16").am(4).amskew("<.5 0 1>")
|
||||
*
|
||||
*/
|
||||
export const { amskew } = registerControl('amskew');
|
||||
|
||||
/**
|
||||
* alter the phase of the modulation waveform
|
||||
*
|
||||
* @name amphase
|
||||
* @param {number | Pattern} offset the offset in cycles of the modulation
|
||||
* @example
|
||||
* note("{f a c e}%16").am(4).amphase("<0 .25 .66>")
|
||||
*
|
||||
*/
|
||||
export const { amphase } = registerControl('amskew');
|
||||
|
||||
/**
|
||||
* shape of amplitude modulation
|
||||
|
|
|
|||
|
|
@ -34,13 +34,16 @@ export class Cyclist {
|
|||
|
||||
try {
|
||||
const begin = this.lastEnd;
|
||||
const cycle = this.now();
|
||||
|
||||
this.lastBegin = begin;
|
||||
const end = this.num_cycles_at_cps_change + num_cycles_since_cps_change;
|
||||
|
||||
this.lastEnd = end;
|
||||
|
||||
this.lastTick = phase;
|
||||
|
||||
const cycle = this.now();
|
||||
|
||||
if (phase < t) {
|
||||
// avoid querying haps that are in the past anyway
|
||||
console.log(`skip query: too late`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue