Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ElizabethHudnott
ElizabethHudnott / main.js
Last active January 10, 2024 15:22
Phase Distortion Synthesis in wavepot
/*
* Basic implementation of Phase Distortion Synthesis, like as was used in the Casio CZ series.
* By Elizabeth Hudnott.
*/
const TWO_PI = 2 * Math.PI;
const TIME_CONSTANTS = Math.log(2 ** (1023 / 128));
function cosine(phase) {
return -Math.cos(TWO_PI * phase);