Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danigb committed Sep 4, 2024
1 parent bdcfc6f commit 2740c56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 5 additions & 6 deletions packages/ad/src/ad.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ describe("AdWorkletNode", () => {
const node = new AdWorklet();
const params = {
trigger: [1],
attack: [0.2],
decay: [0.2],
attack: [0.5],
decay: [0.5],
offset: [100],
gain: [50],
};
let output = runProcessMono(node, 10, params);
expect(Array.from(output)).toEqual([
119.67346954345703, 131.6060333251953, 138.84349060058594,
143.2332305908203, 145.895751953125, 147.51065063476562,
148.49012756347656, 149.08421325683594, 149.44454956054688,
149.66310119628906,
149.08421325683594, 149.9832305908203, 149.99969482421875, 150, 150, 150,
106.76676177978516, 100.91577911376953, 100.12393951416016,
100.01676940917969,
]);
});

Expand Down
2 changes: 0 additions & 2 deletions packages/polyblep-oscillator/src/dsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ export function createPolyblepOscillator(sampleRate: number) {
frequency: number
) {
if (type !== waveformType) {
console.log("POLYBLEP WT", type);
type = waveformType;
gen = GENS[type] ?? sine;
}
if (freq !== frequency) {
console.log("POLYBLEP FREQ", frequency);
freq = frequency;
inc = freq * ivsr;
}
Expand Down

0 comments on commit 2740c56

Please sign in to comment.