tidalcycles / strudel

Web-based environment for live coding algorithmic patterns, incorporating a faithful port of TidalCycles to JavaScript
https://strudel.cc/
GNU Affero General Public License v3.0
642 stars 111 forks source link

local sample server cli #1033

Closed felixroos closed 6 months ago

felixroos commented 6 months ago

adds @strudel/sampler, which can serve a folder of samples via npx @strudel/sampler. When running strudel locally, this is done automatically with the /samples folder.

When the sample server is running, you can load it via:

samples('local:')

This will load http://localhost:5432/strudel.json, which will be dynamically generated based on the folder structure of the folder the sampler is running in (/samples when strudel is running locally).

This can be used to load samples into strudel, without the need to save it to upload it into the browser. It can also be used over the local network, which might be handy for local collab sessions, for example:

samples('http://192.168.1.24:5432')