make slides samples work offline

This commit is contained in:
Felix Roos
2023-04-16 15:57:40 +02:00
parent a4a6321afb
commit d689d71ee6
10 changed files with 33 additions and 7 deletions
+2
View File
@@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
public/samples
+14 -1
View File
@@ -6,4 +6,17 @@ pnpm i
pnpm dev
```
- ctrl+click or ctrl+(left|right) to switch slides
- ctrl+click or ctrl+(left|right) to switch slides
## Samples
To make sure all the samples are available, clone:
```sh
cd public/samples
git clone https://github.com/ritchse/tidal-drum-machines.git
git clone https://github.com/tidalcycles/Dirt-Samples.git
git clone https://github.com/felixroos/webaudiofontdata.git
```
or use symlinks..
+1
View File
@@ -18,6 +18,7 @@
"@strudel.cycles/tonal": "workspace:*",
"@strudel.cycles/webaudio": "workspace:*",
"@uiw/codemirror-themes-all": "^4.19.8",
"escodegen": "^2.0.0",
"nanostores": "^0.7.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
File diff suppressed because one or more lines are too long
+1
View File
@@ -43,6 +43,7 @@ const order = [
// pattern alignment?
// flexible typing?
// future outlook?
'end',
];
const slideEntries = order.map((name) => loadedMDXFiles.find(([file]) => file === name));
+4 -2
View File
@@ -9,13 +9,15 @@ export async function prebake() {
await Promise.all([
/* samples(`./piano.json`, `./piano/`, { prebake: true }),
samples(`./vcsl.json`, 'github:sgossner/VCSL/master/', { prebake: true }),
*/ samples(`./tidal-drum-machines.json`, 'github:ritchse/tidal-drum-machines/main/machines/', {
*/
//samples(`./tidal-drum-machines.json`, 'github:ritchse/tidal-drum-machines/main/machines/', {
samples(`./tidal-drum-machines.json`, './samples/tidal-drum-machines/machines/', {
prebake: true,
tag: 'drum-machines',
}) /*
samples(`./EmuSP12.json`, `./EmuSP12/`, { prebake: true, tag: 'drum-machines' }), */,
// samples('github:tidalcycles/Dirt-Samples/master'),
samples('github:tidalcycles/Dirt-Samples/master'),
samples('./Dirt-Samples.json', './samples/Dirt-Samples/'),
]);
}
/*
+4
View File
@@ -0,0 +1,4 @@
# Thanks
- ICLC organizers
- Tidal Community
+1 -4
View File
@@ -10,8 +10,6 @@ import { SlideRepl } from '../SlideRepl.jsx';
hideHeader
fontSize={24}
tune={`// froos - freakuency - 2023/03/29
await samples('https://shabda.ndre.gr/speech/frequency,freaky.json?strudel=1')
//
stack(
stack(
s("bd, ~ <rim cp>,~ hh*2").off(1/8, x=>x.speed(2).gain(.5)).fast(2),
@@ -26,6 +24,5 @@ stack(
.add(note(perlin.range(0,.8))).s('gm_epiano2')
.mask("<0 1>")
).restart("<1@3 1*[4 [8 16]]>")
.stack(s("<~ [[~@2.4 freaky] frequency]>/2").delay(.8)
.echoWith(4,-.0125,(p,n)=>p.speed(1-n*.1).gain(n*.2))).slow(2)`}
.slow(2)`}
/>
+3
View File
@@ -12,4 +12,7 @@ const options = {
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), mdx(options)],
build: {
target: 'esnext', //browsers can handle the latest ES features
},
});
+2
View File
@@ -67,6 +67,7 @@ importers:
'@uiw/codemirror-themes-all': ^4.19.8
'@vitejs/plugin-react': ^3.1.0
autoprefixer: ^10.4.14
escodegen: ^2.0.0
nanostores: ^0.7.4
postcss: ^8.4.21
react: ^18.2.0
@@ -85,6 +86,7 @@ importers:
'@strudel.cycles/tonal': link:../../packages/tonal
'@strudel.cycles/webaudio': link:../../packages/webaudio
'@uiw/codemirror-themes-all': 4.19.8
escodegen: 2.0.0
nanostores: 0.7.4
react: 18.2.0
react-dom: 18.2.0_react@18.2.0