This commit is contained in:
Jade (Rose) Rowland
2025-09-16 11:36:21 -04:00
parent 4cc453c640
commit 9cdba1a50e
3 changed files with 5 additions and 5 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ This program is free software: you can redistribute it and/or modify it under th
import TimeSpan from './timespan.mjs';
import Fraction, { lcm } from './fraction.mjs';
import FractionClass from 'fraction.js';
import Hap from './hap.mjs';
import State from './state.mjs';
import { unionWithObj } from './value.mjs';
@@ -26,6 +27,7 @@ import {
} from './util.mjs';
import drawLine from './drawLine.mjs';
import { logger } from './logger.mjs';
import fraction from './fraction.mjs';
let stringParser;
@@ -999,7 +1001,7 @@ addToPrototype('weaveWith', function (t, ...funcs) {
// compose matrix functions
function _nonArrayObject(x) {
return !Array.isArray(x) && typeof x === 'object';
return !Array.isArray(x) && typeof x === 'object' && !(x instanceof FractionClass);
}
function _composeOp(a, b, func) {
if (_nonArrayObject(a) || _nonArrayObject(b)) {
+1 -3
View File
@@ -152,9 +152,7 @@ export const itri2 = fastcat(isaw2, saw2);
*
* @return {Pattern}
*/
export const time = signal((x) => {
return x.valueOf();
});
export const time = signal(id);
/**
* The mouse's x position value ranges from 0 to 1.
+1 -1
View File
@@ -465,7 +465,7 @@ function duckOrbit(audioContext, targetOrbit, t, onsettime = 0, attacktime = 0.1
gainParam.cancelScheduledValues(now);
gainParam.setValueAtTime(currVal, now);
const t0 = Math.max(t, now); // guard against now > t
const t0 = now; // guard against now > t
const duckedVal = clamp(1 - Math.sqrt(depth), 0.01, currVal);
gainParam.exponentialRampToValueAtTime(duckedVal, t0 + onset);
gainParam.exponentialRampToValueAtTime(1, t0 + onset + attack);