fix: example encoding for testing builds locally without server
This commit is contained in:
parent
3a4ffb13ad
commit
915a4d2149
2 changed files with 40 additions and 23 deletions
|
|
@ -1,9 +1,18 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- <script src="../../packages/web/dist/index.js"></script> -->
|
||||||
<script src="https://unpkg.com/@strudel/web@1.0.3"></script>
|
<script src="https://unpkg.com/@strudel/web@1.0.3"></script>
|
||||||
|
|
||||||
<button id="play">play</button>
|
<button id="play">play</button>
|
||||||
<button id="stop">stop</button>
|
<button id="stop">stop</button>
|
||||||
<script>
|
<script>
|
||||||
strudel.initStrudel();
|
strudel.initStrudel();
|
||||||
document.getElementById('play').addEventListener('click', () => evaluate('note("c a f e").jux(rev)'));
|
document.getElementById('play').addEventListener('click', () => evaluate('note("c a f e").jux(rev)'));
|
||||||
document.getElementById('play').addEventListener('stop', () => hush());
|
document.getElementById('stop').addEventListener('click', () => strudel.hush());
|
||||||
</script>
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- <script src="../../packages/web/dist/index.js"></script> -->
|
||||||
<script src="https://unpkg.com/@strudel/web@1.0.3"></script>
|
<script src="https://unpkg.com/@strudel/web@1.0.3"></script>
|
||||||
<button id="a">A</button>
|
<button id="a">A</button>
|
||||||
<button id="b">B</button>
|
<button id="b">B</button>
|
||||||
|
|
@ -14,3 +20,5 @@
|
||||||
click('c', () => s('bd*2,hh(3,4),jvbass:[0 4](5,8,1)').jux(rev).stack(s('~ sd')).play());
|
click('c', () => s('bd*2,hh(3,4),jvbass:[0 4](5,8,1)').jux(rev).stack(s('~ sd')).play());
|
||||||
click('stop', () => hush());
|
click('stop', () => hush());
|
||||||
</script>
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue