A JavaScript DAW that emphasizes functions as its core building block. In practice, a realtime audio scripting language and batteries-included DSP library, running on the web. Live-coding ready!
Try it now on lambda.cuesta.dev!
Important
Keep in mind JavaScript is not the best language for CPU-intensive tasks, so performance will be limited.
On the other hand, it runs in your browser!
A Musika script is just a regular JS script:
- interpreted client side
- that returns a function
t => [l, r] - where
tis time - and
landrare output samples for the left and right channels in[-1, 1]range
For now there is no static documentation available, just dive in the source code and learn form the default song, other examples, or just browse the Musika library.
sampleRate, current audio device sample rate.setLength(secs), sets the total length of the song in seconds.- Used to seek using the time slider.
- When omitted the time slider is disabled and the sound is played endlessly (useful for drone or endless procedural music).
Musika, the Musika library
const { Generator, Envelope, Filter, Operator, Music, Util } = Musika;
return (t) => [0, 0];Install Node.js, clone this repository and run this in the root of the project to install the required dependencies:
corepack enable
corepack install
pnpm install --frozen-lockfileJust run this to start a local development server and follow the instructions:
pnpm devYou should periodically run linters to ensure the code passes some basic checks:
pnpm lintOr just let your IDE do the work with TypeScript/ESLint/Prettier integrations. These are automatically run as checks on GitHub Actions, but it's better if you keep lints up to date as you code!
Run all package tests from the workspace root:
pnpm testThese are automatically run as checks on GitHub Actions, but it's better if you keep tests up to date as you code!
- See
TODO.mdfor outstanding general tasks. - See open issues.
- Do a global search for
@todoin the code.
Run this to serve the application in production mode:
pnpm build
pnpm preview