mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 21:48:27 +00:00
add headless-serverless-buildless example
This commit is contained in:
parent
db79c05d9a
commit
1de784b817
16
packages/web/examples/headless-serverless-buildless.html
Normal file
16
packages/web/examples/headless-serverless-buildless.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<button id="a">A</button>
|
||||||
|
<button id="b">B</button>
|
||||||
|
<button id="c">C</button>
|
||||||
|
<button id="stop">stop</button>
|
||||||
|
<script type="module">
|
||||||
|
import { initStrudel } from 'https://cdn.skypack.dev/@strudel/web@0.8.2';
|
||||||
|
initStrudel({
|
||||||
|
prebake: () => samples('github:tidalcycles/Dirt-Samples/master'),
|
||||||
|
});
|
||||||
|
const click = (id, action) => document.getElementById(id).addEventListener('click', action);
|
||||||
|
click('a', () => evaluate(`s('bd,jvbass(3,8)').jux(rev)`));
|
||||||
|
click('b', () => s('bd*2,hh(3,4),jvbass(5,8,1)').jux(rev).play());
|
||||||
|
click('c', () => s('bd*2,hh(3,4),jvbass:[0 4](5,8,1)').jux(rev).stack(s('~ sd')).play());
|
||||||
|
click('stop', () => hush());
|
||||||
|
</script>
|
||||||
Loading…
x
Reference in New Issue
Block a user