BafS / Phase

Generates sounds from javascript functions.

Home Page:https://bafs.github.io/Phase/build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phase

Evaluate, plot and listen given javascript functions using web audio api.

Example

const a = 440;
const sum = (fn, [min, max]) => Array(max - min + 1).fill().reduce((sum, _, i) => sum + fn(i + min), 0);

// 3 harmonics to have a more realistic sound
sum(n => Math.sin(2 * a * n * Math.PI * t) * .7 / n, [1, 3])

Dev

npm i to install the dependencies

  • npm run dev to dev and run a local server
  • npm run build to build for production

About

Generates sounds from javascript functions.

https://bafs.github.io/Phase/build


Languages

Language:TypeScript 52.5%Language:JavaScript 31.0%Language:HTML 8.7%Language:CSS 7.8%