good for baking https://dough.strudel.cc/
  • HTML 55.5%
  • C 29.9%
  • JavaScript 13.6%
  • Shell 0.5%
  • CSS 0.5%
Find a file
Felix Roos a0bfa97078
All checks were successful
Build and Deploy / build (push) Successful in 1m9s
Test / build (22) (push) Successful in 1m35s
more magic
2026-02-12 00:33:07 +01:00
.forgejo/workflows fix ci: git lfs 2026-01-02 15:59:32 +01:00
bakery wip prerender example 2026-01-04 23:45:35 +01:00
examples dummy file 2026-01-02 15:50:31 +01:00
scripts fix: native build 2026-01-02 16:11:21 +01:00
snapshots fix: snapshots 2025-12-31 16:00:05 +01:00
.gitattributes fix: snapshots 2025-12-31 16:00:05 +01:00
.gitignore WIP clangwasm build 2025-11-03 13:45:21 +01:00
.npmignore distribute dough.c with npm 2025-11-14 09:47:39 +01:00
dough.c more magic 2026-02-12 00:33:07 +01:00
dough.js more magic 2026-02-12 00:33:07 +01:00
FontWithASyntaxHighlighter-Regular.woff2 start new index page 2025-10-22 00:13:37 +02:00
index.html more magic 2026-02-12 00:33:07 +01:00
LICENSE code + license + readme 2025-10-12 22:19:45 +02:00
links.md some links 2025-10-24 10:58:39 +02:00
memory.png smaller image 2025-10-12 22:47:16 +02:00
mini-repl.js explicitly load default samples in mini-repl + strudel example 2025-11-15 14:40:39 +01:00
package.json remove emcc + simplify introspection using js_init 2026-01-02 14:43:50 +01:00
README.md byebye 2026-02-12 00:27:38 +01:00
reference.html more magic 2026-02-12 00:33:07 +01:00
server.mjs fix: add shebang 2025-10-22 00:14:33 +02:00
style.css consistent examples 2025-12-30 16:34:16 +01:00

dough

memory

good for baking. wip synth engine that runs natively and in the browser.

see the superdough puzzle for details.

Demo

dough is deployed at dough.strudel.cc.

contributing

in this repository, we practise jam oriented programming. this means:

  • anybody is welcome to make changes
  • to become a collaborator, create an issue and ask to get added
  • we aim to be hierarchy free, assuming good faith in everyone
  • either create a PR, or push directly to main, both is fine
  • we try to follow the design goals, which are open to change

design goals

these are the initial design goals for dough:

  • runs natively and in the browser
  • a single .c file
  • keep it simple stupid
  • runs fast
  • similar to superdough

Development Setup

To be able to build and test the native version, we're going to install:

  1. portaudio for cross platform audio
  2. liblo for osc messaging
  3. pkg-config to simplify building
  4. node.js to run the osc bridge

To build and test the browser version, you need:

  1. clang to compile c to wasm
  2. node.js to run the dev server

MacOS Setup

  1. make sure you have https://brew.sh/ installed
  2. install libraries:
brew install pkg-config liblo portaudio libsndfile libsamplerate

Linux Setup

sudo apt install liblo-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev lld
# .. should work similarly with other package managers

Get the Source Code

git clone https://codeberg.org/uzu/dough.git && cd dough

Native Version

here's how you compile and run the native version:

./scripts/build-native.sh

testing with strudel

so far, i'm doing my testing with strudel. to make sure strudel can talk to dough, you need to run the osc bridge in a separate terminal:

# run strudel osc bridge:
npx --yes @strudel/osc --port 7771

now you can run a pattern with .osc()!

WASM version

the demo is not deployed yet, so you need to run it locally:

  1. run the dev server* via node server.mjs
  2. open localhost:8888
  3. press play

compiling the wasm version

here's how to compile to WebAssembly using clang:

./scripts/build-wasm.sh

after compiling, refresh the page to get the new version of dough.wasm.

MacOS: the system clang might not work, so you'd need to brew install llvm then echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc.

git lfs

this repo uses git lfs. you may have to install the git-lfs plugin and initialize it in the repo by running git lfs install. if the files you see in snapshots/* are smaller than 1kB then git-lfs is not working.

snapshot testing

the reference contained in dough.js is tested with snapshots. if you're in a "correct" state, meaning dough does what you expect it to do, run:

./scripts/write-snapshots.sh

at any later time, you can test the current behavior of dough against the previously "correct" state via:

./scripts/test-snapshots.sh

this is also part of test.yml to make sure things don't break.

note that .pcm files are stored with git lfs, which is why write-snapshots will track them automatically.

inspiration

dough is inspired by