diff --git a/.prettierignore b/.prettierignore index f4b94613c..010ad28a6 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,4 @@ paper pnpm-lock.yaml pnpm-workspace.yaml **/dev-dist +website/.astro diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 556df3fcf..f9bc117c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,7 +114,7 @@ You can run the same check with `pnpm check` ## Package Workflow The project is split into multiple [packages](https://github.com/tidalcycles/strudel/tree/main/packages) with independent versioning. -When you run `pnpm i` on the root folder, [pnpm workspaces](https://pnpm.io/workspaces) will install all dependencies of all subpackages. This will allow any js file to import `@strudel.cycles/` to get the local version, +When you run `pnpm i` on the root folder, [pnpm workspaces](https://pnpm.io/workspaces) will install all dependencies of all subpackages. This will allow any js file to import `@strudel/` to get the local version, allowing to develop multiple packages at the same time. ## Package Publishing diff --git a/examples/buildless/basic.html b/examples/buildless/basic.html index 97508132c..bd74d83b8 100644 --- a/examples/buildless/basic.html +++ b/examples/buildless/basic.html @@ -7,7 +7,7 @@ />
+ - + diff --git a/website/src/components/HeadSEO.astro b/website/src/components/HeadSEO.astro index 556b50a72..413668c16 100644 --- a/website/src/components/HeadSEO.astro +++ b/website/src/components/HeadSEO.astro @@ -1,5 +1,5 @@ --- -import { SITE, OPEN_GRAPH, Frontmatter } from '../config'; +import { SITE, OPEN_GRAPH, type Frontmatter } from '../config'; export interface Props { frontmatter: Frontmatter; @@ -25,11 +25,3 @@ const imageAlt = frontmatter.image?.alt ?? OPEN_GRAPH.image.alt; - - - - - - - - diff --git a/website/src/components/Header/Header.astro b/website/src/components/Header/Header.astro index 6447d9d63..cbc91ca0a 100644 --- a/website/src/components/Header/Header.astro +++ b/website/src/components/Header/Header.astro @@ -9,7 +9,7 @@ import MobileNav from '../../docs/MobileNav'; import { SIDEBAR } from '../../config'; type Props = { - currentPage: string; + currentPage?: string; }; const { currentPage } = Astro.props as Props; diff --git a/website/src/components/PageContent/PageContent.astro b/website/src/components/PageContent/PageContent.astro index 9c433945f..c53053aff 100644 --- a/website/src/components/PageContent/PageContent.astro +++ b/website/src/components/PageContent/PageContent.astro @@ -1,18 +1,11 @@ --- -import type { Frontmatter } from '../../config'; import MoreMenu from '../RightSidebar/MoreMenu.astro'; -import TableOfContents from '../RightSidebar/TableOfContents'; -import type { MarkdownHeading } from 'astro'; type Props = { - frontmatter: Frontmatter; - headings: MarkdownHeading[]; - githubEditUrl: string; + githubEditUrl?: string; }; -const { frontmatter, headings, githubEditUrl } = Astro.props as Props; -const title = frontmatter.title; -const currentPage = Astro.url.pathname; +const { githubEditUrl } = Astro.props as Props; ---
diff --git a/website/src/components/PitchSlider.jsx b/website/src/components/PitchSlider.jsx index 41b215fb3..2f23a96d0 100644 --- a/website/src/components/PitchSlider.jsx +++ b/website/src/components/PitchSlider.jsx @@ -1,7 +1,7 @@ import useEvent from '@src/useEvent.mjs'; import useFrame from '@src/useFrame.mjs'; -import { getAudioContext } from '@strudel.cycles/webaudio'; -import { midi2note } from '@strudel.cycles/core'; +import { getAudioContext } from '@strudel/webaudio'; +import { midi2note } from '@strudel/core'; import { useState, useRef, useEffect } from 'react'; import Claviature from '@components/Claviature'; diff --git a/website/src/components/RightSidebar/MoreMenu.astro b/website/src/components/RightSidebar/MoreMenu.astro index 1cf1c4e5a..5205c9c57 100644 --- a/website/src/components/RightSidebar/MoreMenu.astro +++ b/website/src/components/RightSidebar/MoreMenu.astro @@ -2,7 +2,7 @@ import * as CONFIG from '../../config'; type Props = { - editHref: string; + editHref?: string; }; const { editHref } = Astro.props as Props; diff --git a/website/src/components/RightSidebar/RightSidebar.astro b/website/src/components/RightSidebar/RightSidebar.astro index ba193d240..cd501b1a2 100644 --- a/website/src/components/RightSidebar/RightSidebar.astro +++ b/website/src/components/RightSidebar/RightSidebar.astro @@ -6,7 +6,7 @@ import AvatarList from '../Footer/AvatarList.astro'; type Props = { headings: MarkdownHeading[]; - githubEditUrl: string; + githubEditUrl?: string; }; const { headings, githubEditUrl } = Astro.props as Props; diff --git a/website/src/components/Showcase.jsx b/website/src/components/Showcase.jsx index bbdf77855..e4e624a99 100644 --- a/website/src/components/Showcase.jsx +++ b/website/src/components/Showcase.jsx @@ -36,6 +36,13 @@ export function Showcase() { } let _videos = [ + { title: 'Coding Music With Strudel Workhop by Dan Gorelick and Viola He', id: 'oqyAJ4WeKoU' }, + { title: 'Hexe - playing w strudel live coding music', id: '03m3F5xVOMg' }, + { title: 'DJ_Dave - Array [Lil Data Edit]', id: 'KUujFuTcuKc' }, + { title: 'DJ_Dave - Bitrot [v10101a Edit]', id: 'z_cJMdBp67Q' }, + { title: 'you will not steve reich your way out of it', id: 'xpILnXcWyuo' }, + { title: 'dough dream #1 - strudel jam 12/03/23', id: 'p0J7XrT9JEs' }, + { title: 'eddyflux & superdirtspatz at the dough cathedral', id: 'GrkwKMQ7_Ys' }, // solstice 2023 { title: 'Jade Rose @ solstice stream 2023', id: 'wg0vW5Ac7L0' }, { diff --git a/website/src/config.ts b/website/src/config.ts index fc904bfa6..effc593c1 100644 --- a/website/src/config.ts +++ b/website/src/config.ts @@ -57,6 +57,7 @@ export const SIDEBAR: Sidebar = { Presentation: [ { text: 'What is Strudel?', link: 'workshop/getting-started' }, { text: 'Showcase', link: 'intro/showcase' }, + { text: 'Blog', link: 'blog' }, ], Workshop: [ // { text: 'Getting Started', link: 'workshop/getting-started' }, diff --git a/website/src/content/blog/release-0.0.2-schwindlig.mdx b/website/src/content/blog/release-0.0.2-schwindlig.mdx new file mode 100644 index 000000000..b65ff98f5 --- /dev/null +++ b/website/src/content/blog/release-0.0.2-schwindlig.mdx @@ -0,0 +1,40 @@ +--- +title: 'Release Notes v0.0.2 Schwindlig' +description: '' +date: '2022-03-28' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- Most work done as [commits to main](https://github.com/tidalcycles/strudel/commits/2a0d8c3f77ff7b34e82602e2d02400707f367316) +- repl + reify functions by @felixroos in https://github.com/tidalcycles/strudel/pull/2 +- Fix path by @yaxu in https://github.com/tidalcycles/strudel/pull/3 +- update readme for local dev by @kindohm in https://github.com/tidalcycles/strudel/pull/4 +- Patternify all the things by @yaxu in https://github.com/tidalcycles/strudel/pull/5 +- krill parser + improved repl by @felixroos in https://github.com/tidalcycles/strudel/pull/6 +- fixed editor crash by @felixroos in https://github.com/tidalcycles/strudel/pull/7 +- timeCat by @yaxu in https://github.com/tidalcycles/strudel/pull/8 +- Bugfix every, and create more top level functions by @yaxu in https://github.com/tidalcycles/strudel/pull/9 +- Failing test for `when` WIP by @yaxu in https://github.com/tidalcycles/strudel/pull/10 +- Added mask() and struct() by @yaxu in https://github.com/tidalcycles/strudel/pull/11 +- Add continuous signals (sine, cosine, saw, etc) by @yaxu in https://github.com/tidalcycles/strudel/pull/13 +- add apply and layer, and missing div/mul methods by @yaxu in https://github.com/tidalcycles/strudel/pull/15 +- higher latencyHint by @felixroos in https://github.com/tidalcycles/strudel/pull/16 +- test: 📦 Add missing dependency and a CI check, to prevent oversights ;p by @puria in https://github.com/tidalcycles/strudel/pull/17 +- fix: 💄 Enhance visualisation of the Tutorial on mobile by @puria in https://github.com/tidalcycles/strudel/pull/19 +- Stateful queries and events (WIP) by @yaxu in https://github.com/tidalcycles/strudel/pull/14 +- Fix resolveState by @yaxu in https://github.com/tidalcycles/strudel/pull/22 +- added \_asNumber + interprete numbers as midi by @felixroos in https://github.com/tidalcycles/strudel/pull/21 +- Update package.json by @ChiakiUehira in https://github.com/tidalcycles/strudel/pull/23 +- packaging by @felixroos in https://github.com/tidalcycles/strudel/pull/24 + +## New Contributors + +- @felixroos made their first contribution in https://github.com/tidalcycles/strudel/pull/2 +- @kindohm made their first contribution in https://github.com/tidalcycles/strudel/pull/4 +- @puria made their first contribution in https://github.com/tidalcycles/strudel/pull/17 +- @ChiakiUehira made their first contribution in https://github.com/tidalcycles/strudel/pull/23 + +**Full Changelog**: https://github.com/tidalcycles/strudel/commits/2a0d8c3f77ff7b34e82602e2d02400707f367316 diff --git a/website/src/content/blog/release-0.0.2.1-stuermisch.mdx b/website/src/content/blog/release-0.0.2.1-stuermisch.mdx new file mode 100644 index 000000000..3824bd6b1 --- /dev/null +++ b/website/src/content/blog/release-0.0.2.1-stuermisch.mdx @@ -0,0 +1,53 @@ +--- +title: 'Release Notes v0.0.3 Stürmisch' +date: '2022-05-20' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- Add chunk, chunkBack and iterBack by @yaxu in https://github.com/tidalcycles/strudel/pull/25 +- Update tutorial.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/37 +- Update tutorial.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/38 +- Compose by @felixroos in https://github.com/tidalcycles/strudel/pull/40 +- Fix polymeter by @yaxu in https://github.com/tidalcycles/strudel/pull/44 +- First run at squeezeBind, ref #32 by @yaxu in https://github.com/tidalcycles/strudel/pull/48 +- Implement `chop()` by @yaxu in https://github.com/tidalcycles/strudel/pull/50 +- OSC and SuperDirt support by @yaxu in https://github.com/tidalcycles/strudel/pull/27 +- More functions by @yaxu in https://github.com/tidalcycles/strudel/pull/56 +- More functions by @yaxu in https://github.com/tidalcycles/strudel/pull/61 +- Separate out strudel.mjs, make index.mjs aggregate module by @yaxu in https://github.com/tidalcycles/strudel/pull/62 +- Speech output by @felixroos in https://github.com/tidalcycles/strudel/pull/67 +- use new fixed version of osc-js package by @felixroos in https://github.com/tidalcycles/strudel/pull/68 +- First effort at rand() by @yaxu in https://github.com/tidalcycles/strudel/pull/69 +- More randomness, fix `rand`, and add `brand`, `irand` and `choose` by @yaxu in https://github.com/tidalcycles/strudel/pull/70 +- webaudio package by @felixroos in https://github.com/tidalcycles/strudel/pull/26 +- Port `perlin` noise, `rangex`, and `palindrome` by @yaxu in https://github.com/tidalcycles/strudel/pull/73 +- More random functions by @yaxu in https://github.com/tidalcycles/strudel/pull/74 +- Try to fix appLeft / appRight by @yaxu in https://github.com/tidalcycles/strudel/pull/75 +- Basic webserial support by @yaxu in https://github.com/tidalcycles/strudel/pull/80 +- Webaudio in REPL by @felixroos in https://github.com/tidalcycles/strudel/pull/77 +- add `striate()` by @yaxu in https://github.com/tidalcycles/strudel/pull/76 +- Tidy up a couple of old files by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/84 +- Add pattern composers, implements #82 by @yaxu in https://github.com/tidalcycles/strudel/pull/83 +- Fiddles with cat/stack by @yaxu in https://github.com/tidalcycles/strudel/pull/90 +- Paper by @felixroos in https://github.com/tidalcycles/strudel/pull/98 +- Change to Affero GPL by @yaxu in https://github.com/tidalcycles/strudel/pull/101 +- Work on Codemirror 6 highlighting by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/102 +- Codemirror 6 by @felixroos in https://github.com/tidalcycles/strudel/pull/97 +- Tune tests by @felixroos in https://github.com/tidalcycles/strudel/pull/104 +- /embed package: web component for repl by @felixroos in https://github.com/tidalcycles/strudel/pull/106 +- Reset, Restart and other composers by @felixroos in https://github.com/tidalcycles/strudel/pull/88 +- Embed style by @felixroos in https://github.com/tidalcycles/strudel/pull/109 +- In source doc by @yaxu in https://github.com/tidalcycles/strudel/pull/105 +- `.brak()`, `.inside()` and `.outside()` by @yaxu in https://github.com/tidalcycles/strudel/pull/112 +- loopAt by @yaxu in https://github.com/tidalcycles/strudel/pull/114 +- Osc timing improvements by @yaxu in https://github.com/tidalcycles/strudel/pull/113 + +## New Contributors + +- @bwagner made their first contribution in https://github.com/tidalcycles/strudel/pull/37 +- @mindofmatthew made their first contribution in https://github.com/tidalcycles/strudel/pull/84 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.0.2...@strudel.cycles/core@0.1.0 diff --git a/website/src/content/blog/release-0.0.3-maelstrom.mdx b/website/src/content/blog/release-0.0.3-maelstrom.mdx new file mode 100644 index 000000000..542412d82 --- /dev/null +++ b/website/src/content/blog/release-0.0.3-maelstrom.mdx @@ -0,0 +1,66 @@ +--- +title: 'Release Notes v0.0.3 Maelstrom' +description: '' +date: '2022-06-18' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- Add chunk, chunkBack and iterBack by @yaxu in https://github.com/tidalcycles/strudel/pull/25 +- Update tutorial.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/37 +- Update tutorial.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/38 +- Compose by @felixroos in https://github.com/tidalcycles/strudel/pull/40 +- Fix polymeter by @yaxu in https://github.com/tidalcycles/strudel/pull/44 +- First run at squeezeBind, ref #32 by @yaxu in https://github.com/tidalcycles/strudel/pull/48 +- Implement `chop()` by @yaxu in https://github.com/tidalcycles/strudel/pull/50 +- OSC and SuperDirt support by @yaxu in https://github.com/tidalcycles/strudel/pull/27 +- More functions by @yaxu in https://github.com/tidalcycles/strudel/pull/56 +- More functions by @yaxu in https://github.com/tidalcycles/strudel/pull/61 +- Separate out strudel.mjs, make index.mjs aggregate module by @yaxu in https://github.com/tidalcycles/strudel/pull/62 +- Speech output by @felixroos in https://github.com/tidalcycles/strudel/pull/67 +- use new fixed version of osc-js package by @felixroos in https://github.com/tidalcycles/strudel/pull/68 +- First effort at rand() by @yaxu in https://github.com/tidalcycles/strudel/pull/69 +- More randomness, fix `rand`, and add `brand`, `irand` and `choose` by @yaxu in https://github.com/tidalcycles/strudel/pull/70 +- webaudio package by @felixroos in https://github.com/tidalcycles/strudel/pull/26 +- Port `perlin` noise, `rangex`, and `palindrome` by @yaxu in https://github.com/tidalcycles/strudel/pull/73 +- More random functions by @yaxu in https://github.com/tidalcycles/strudel/pull/74 +- Try to fix appLeft / appRight by @yaxu in https://github.com/tidalcycles/strudel/pull/75 +- Basic webserial support by @yaxu in https://github.com/tidalcycles/strudel/pull/80 +- Webaudio in REPL by @felixroos in https://github.com/tidalcycles/strudel/pull/77 +- add `striate()` by @yaxu in https://github.com/tidalcycles/strudel/pull/76 +- Tidy up a couple of old files by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/84 +- Add pattern composers, implements #82 by @yaxu in https://github.com/tidalcycles/strudel/pull/83 +- Fiddles with cat/stack by @yaxu in https://github.com/tidalcycles/strudel/pull/90 +- Paper by @felixroos in https://github.com/tidalcycles/strudel/pull/98 +- Change to Affero GPL by @yaxu in https://github.com/tidalcycles/strudel/pull/101 +- Work on Codemirror 6 highlighting by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/102 +- Codemirror 6 by @felixroos in https://github.com/tidalcycles/strudel/pull/97 +- Tune tests by @felixroos in https://github.com/tidalcycles/strudel/pull/104 +- /embed package: web component for repl by @felixroos in https://github.com/tidalcycles/strudel/pull/106 +- Reset, Restart and other composers by @felixroos in https://github.com/tidalcycles/strudel/pull/88 +- Embed style by @felixroos in https://github.com/tidalcycles/strudel/pull/109 +- In source doc by @yaxu in https://github.com/tidalcycles/strudel/pull/105 +- `.brak()`, `.inside()` and `.outside()` by @yaxu in https://github.com/tidalcycles/strudel/pull/112 +- loopAt by @yaxu in https://github.com/tidalcycles/strudel/pull/114 +- Osc timing improvements by @yaxu in https://github.com/tidalcycles/strudel/pull/113 +- react package + vite build by @felixroos in https://github.com/tidalcycles/strudel/pull/116 +- In source doc by @felixroos in https://github.com/tidalcycles/strudel/pull/117 +- fix: #108 by @felixroos in https://github.com/tidalcycles/strudel/pull/123 +- fix: #122 ctrl enter would add newline by @felixroos in https://github.com/tidalcycles/strudel/pull/124 +- Webdirt by @felixroos in https://github.com/tidalcycles/strudel/pull/121 +- Fix link to contributing to tutorial docs by @stephendwolff in https://github.com/tidalcycles/strudel/pull/129 +- Pianoroll enhancements by @felixroos in https://github.com/tidalcycles/strudel/pull/131 +- add createParam + createParams by @felixroos in https://github.com/tidalcycles/strudel/pull/110 +- remove cycle + delta from onTrigger by @felixroos in https://github.com/tidalcycles/strudel/pull/135 +- Scheduler improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/134 +- add onTrigger helper by @felixroos in https://github.com/tidalcycles/strudel/pull/136 + +## New Contributors + +- @bwagner made their first contribution in https://github.com/tidalcycles/strudel/pull/37 +- @mindofmatthew made their first contribution in https://github.com/tidalcycles/strudel/pull/84 +- @stephendwolff made their first contribution in https://github.com/tidalcycles/strudel/pull/129 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.0.2...v0.0.3 diff --git a/website/src/content/blog/release-0.0.4-gischt.mdx b/website/src/content/blog/release-0.0.4-gischt.mdx new file mode 100644 index 000000000..83b831a75 --- /dev/null +++ b/website/src/content/blog/release-0.0.4-gischt.mdx @@ -0,0 +1,45 @@ +--- +title: 'Release Notes v0.0.4 Gischt' +description: '' +date: '2022-08-14' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- Webaudio rewrite by @felixroos in https://github.com/tidalcycles/strudel/pull/138 +- Fix createParam() by @yaxu in https://github.com/tidalcycles/strudel/pull/140 +- Soundfont Support by @felixroos in https://github.com/tidalcycles/strudel/pull/139 +- Serial twiddles by @yaxu in https://github.com/tidalcycles/strudel/pull/141 +- Pianoroll Object Support by @felixroos in https://github.com/tidalcycles/strudel/pull/142 +- flash effect on ctrl enter by @felixroos in https://github.com/tidalcycles/strudel/pull/144 +- can now generate short link for sharing by @felixroos in https://github.com/tidalcycles/strudel/pull/146 +- Sampler optimizations and more by @felixroos in https://github.com/tidalcycles/strudel/pull/148 +- Final update to demo.pdf by @yaxu in https://github.com/tidalcycles/strudel/pull/151 +- add webdirt drum samples to prebake for general availability by @larkob in https://github.com/tidalcycles/strudel/pull/150 +- update to tutorial documentation by @larkob in https://github.com/tidalcycles/strudel/pull/162 +- add chooseInWith/chooseCycles by @yaxu in https://github.com/tidalcycles/strudel/pull/166 +- fix: jsdoc comments by @felixroos in https://github.com/tidalcycles/strudel/pull/169 +- Pianoroll fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/163 +- Talk fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/164 +- Amend shapeshifter to allow use of dynamic import by @debrisapron in https://github.com/tidalcycles/strudel/pull/171 +- add more shapeshifter flags by @felixroos in https://github.com/tidalcycles/strudel/pull/99 +- Replace react-codemirror6 with @uiw/react-codemirror by @felixroos in https://github.com/tidalcycles/strudel/pull/173 +- fix some annoying bugs by @felixroos in https://github.com/tidalcycles/strudel/pull/177 +- incorporate elements of randomness to the mini notation by @bpow in https://github.com/tidalcycles/strudel/pull/165 +- replace mocha with vitest by @felixroos in https://github.com/tidalcycles/strudel/pull/175 +- scheduler improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/181 +- Fix codemirror bug by @felixroos in https://github.com/tidalcycles/strudel/pull/186 +- wait for prebake to finish before evaluating by @felixroos in https://github.com/tidalcycles/strudel/pull/189 +- fix regression: old way of setting frequencies was broken by @felixroos in https://github.com/tidalcycles/strudel/pull/190 +- Soundfont file support by @felixroos in https://github.com/tidalcycles/strudel/pull/183 +- change "stride"/"offset" of successive degradeBy/chooseIn by @bpow in https://github.com/tidalcycles/strudel/pull/185 + +## New Contributors + +- @larkob made their first contribution in https://github.com/tidalcycles/strudel/pull/150 +- @debrisapron made their first contribution in https://github.com/tidalcycles/strudel/pull/171 +- @bpow made their first contribution in https://github.com/tidalcycles/strudel/pull/165 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.0.3...v0.0.4 diff --git a/website/src/content/blog/release-0.3.0-donauwelle.mdx b/website/src/content/blog/release-0.3.0-donauwelle.mdx new file mode 100644 index 000000000..70dba0e68 --- /dev/null +++ b/website/src/content/blog/release-0.3.0-donauwelle.mdx @@ -0,0 +1,65 @@ +--- +title: 'Release Notes v0.3.0 Donauwelle' +description: '' +date: '2022-11-06' +tags: ['meta'] +author: froos +--- + +## Package Versions + +- @strudel.cycles/core@0.3.1 +- @strudel.cycles/eval@0.3.1 +- @strudel.cycles/midi@0.3.1 +- @strudel.cycles/mini@0.3.1 +- @strudel.cycles/react@0.3.1 +- @strudel.cycles/soundfonts@0.3.1 +- @strudel.cycles/tonal@0.3.1 +- @strudel.cycles/tone@0.3.1 +- @strudel.cycles/webaudio@0.3.1 +- @strudel.cycles/webdirt@0.3.1 +- @strudel.cycles/xen@0.3.1 + +## What's Changed + +- Fix numbers in sampler by @felixroos in https://github.com/tidalcycles/strudel/pull/196 +- document random functions by @felixroos in https://github.com/tidalcycles/strudel/pull/199 +- add rollup-plugin-visualizer to build by @felixroos in https://github.com/tidalcycles/strudel/pull/200 +- add vowel to .out by @felixroos in https://github.com/tidalcycles/strudel/pull/201 +- Coarse crush shape by @felixroos in https://github.com/tidalcycles/strudel/pull/205 +- Webaudio guide by @felixroos in https://github.com/tidalcycles/strudel/pull/207 +- Even more docs by @felixroos in https://github.com/tidalcycles/strudel/pull/212 +- Just another docs PR by @felixroos in https://github.com/tidalcycles/strudel/pull/215 +- sampler features + fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/217 +- samples now have envelopes by @felixroos in https://github.com/tidalcycles/strudel/pull/218 +- encapsulate webaudio output by @felixroos in https://github.com/tidalcycles/strudel/pull/219 +- Fix squeeze join by @yaxu in https://github.com/tidalcycles/strudel/pull/220 +- Feedback Delay by @felixroos in https://github.com/tidalcycles/strudel/pull/213 +- support negative speeds by @felixroos in https://github.com/tidalcycles/strudel/pull/222 +- focus tweak for squeezeJoin - another go at fixing #216 by @yaxu in https://github.com/tidalcycles/strudel/pull/221 +- Reverb by @felixroos in https://github.com/tidalcycles/strudel/pull/224 +- fix fastgap for events that go across cycle boundaries by @yaxu in https://github.com/tidalcycles/strudel/pull/225 +- Core util tests by @mystery-house in https://github.com/tidalcycles/strudel/pull/226 +- Refactor tunes away from tone by @felixroos in https://github.com/tidalcycles/strudel/pull/230 +- Just another docs branch by @felixroos in https://github.com/tidalcycles/strudel/pull/228 +- Patternify range by @yaxu in https://github.com/tidalcycles/strudel/pull/231 +- Out by default by @felixroos in https://github.com/tidalcycles/strudel/pull/232 +- Fix zero length queries WIP by @yaxu in https://github.com/tidalcycles/strudel/pull/234 +- add vcsl sample library by @felixroos in https://github.com/tidalcycles/strudel/pull/235 +- fx on stereo speakers by @felixroos in https://github.com/tidalcycles/strudel/pull/236 +- Tidal drum machines by @felixroos in https://github.com/tidalcycles/strudel/pull/237 +- Object arithmetic by @felixroos in https://github.com/tidalcycles/strudel/pull/238 +- Load samples from url by @felixroos in https://github.com/tidalcycles/strudel/pull/239 +- feat: support github: links by @felixroos in https://github.com/tidalcycles/strudel/pull/240 +- in source example tests by @felixroos in https://github.com/tidalcycles/strudel/pull/242 +- Readme + TLC by @felixroos in https://github.com/tidalcycles/strudel/pull/244 +- patchday by @felixroos in https://github.com/tidalcycles/strudel/pull/246 +- Some tunes by @felixroos in https://github.com/tidalcycles/strudel/pull/247 +- snapshot tests on shared snippets by @felixroos in https://github.com/tidalcycles/strudel/pull/243 +- General purpose scheduler by @felixroos in https://github.com/tidalcycles/strudel/pull/248 + +## New Contributors + +- @mystery-house made their first contribution in https://github.com/tidalcycles/strudel/pull/226 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.0.4...v0.3.0 diff --git a/website/src/content/blog/release-0.4.0-brandung.mdx b/website/src/content/blog/release-0.4.0-brandung.mdx new file mode 100644 index 000000000..56a1d2e29 --- /dev/null +++ b/website/src/content/blog/release-0.4.0-brandung.mdx @@ -0,0 +1,15 @@ +--- +title: 'Release Notes v0.4.0 Brandung' +description: '' +date: '2022-11-13' +tags: ['meta'] +author: froos +--- + +## What's Changed + +- new transpiler based on acorn by @felixroos in https://github.com/tidalcycles/strudel/pull/249 +- Webaudio build by @felixroos in https://github.com/tidalcycles/strudel/pull/250 +- Repl refactoring by @felixroos in https://github.com/tidalcycles/strudel/pull/255 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.3.0...v0.4.0 diff --git a/website/src/content/blog/release-0.5.0-wirbel.mdx b/website/src/content/blog/release-0.5.0-wirbel.mdx new file mode 100644 index 000000000..7d04f0d27 --- /dev/null +++ b/website/src/content/blog/release-0.5.0-wirbel.mdx @@ -0,0 +1,59 @@ +--- +title: 'Release Notes v0.5.0 Wirbel' +description: '' +date: '2022-12-13' +tags: ['meta'] +author: froos +--- + +## Package Versions + +- @strudel.cycles/core@0.5.0 +- @strudel.cycles/osc@0.4.0 +- @strudel.cycles/serial@0.3.0 +- @strudel.cycles/csound@0.5.1 +- @strudel.cycles/eval@0.5.0 +- @strudel.cycles/midi@0.5.0 +- @strudel.cycles/mini@0.5.0 +- @strudel.cycles/react@0.5.0 +- @strudel.cycles/soundfonts@0.5.0 +- @strudel.cycles/tonal@0.5.0 +- @strudel.cycles/tone@0.5.0 +- @strudel.cycles/transpiler@0.5.0 +- @strudel.cycles/webaudio@0.5.0 +- @strudel.cycles/webdirt@0.5.0 +- @strudel.cycles/xen@0.5.0 + +## What's Changed + +- Binaries by @felixroos in https://github.com/tidalcycles/strudel/pull/254 +- fix tutorial bugs by @felixroos in https://github.com/tidalcycles/strudel/pull/263 +- fix performance bottleneck by @felixroos in https://github.com/tidalcycles/strudel/pull/266 +- Tidying up core by @yaxu in https://github.com/tidalcycles/strudel/pull/256 +- tonal update with fixed memory leak by @felixroos in https://github.com/tidalcycles/strudel/pull/272 +- add eslint by @felixroos in https://github.com/tidalcycles/strudel/pull/271 +- release version bumps by @felixroos in https://github.com/tidalcycles/strudel/pull/273 +- Support sending CRC16 bytes with serial messages by @yaxu in https://github.com/tidalcycles/strudel/pull/276 +- add licenses / credits to all tunes + remove some by @felixroos in https://github.com/tidalcycles/strudel/pull/277 +- add basic csound output by @felixroos in https://github.com/tidalcycles/strudel/pull/275 +- do not recompile orc by @felixroos in https://github.com/tidalcycles/strudel/pull/278 +- implement collect + arp function by @felixroos in https://github.com/tidalcycles/strudel/pull/281 +- Switch 'operators' from .whatHow to .what.how by @yaxu in https://github.com/tidalcycles/strudel/pull/285 +- Fancy hap show, include part in snapshots by @yaxu in https://github.com/tidalcycles/strudel/pull/291 +- Reorganise pattern.mjs with a 'toplevel first' regime by @yaxu in https://github.com/tidalcycles/strudel/pull/286 +- add prettier task by @felixroos in https://github.com/tidalcycles/strudel/pull/296 +- Move stuff to new register function by @felixroos in https://github.com/tidalcycles/strudel/pull/295 +- can now add bare numbers to numeral object props by @felixroos in https://github.com/tidalcycles/strudel/pull/287 +- update vitest by @felixroos in https://github.com/tidalcycles/strudel/pull/297 +- remove whitespace from highlighted region by @felixroos in https://github.com/tidalcycles/strudel/pull/298 +- .defragmentHaps() for merging touching haps that share a whole and value by @yaxu in https://github.com/tidalcycles/strudel/pull/299 +- fix whitespace trimming by @felixroos in https://github.com/tidalcycles/strudel/pull/300 +- add freq support to sampler by @felixroos in https://github.com/tidalcycles/strudel/pull/301 +- add lint + prettier check before test by @felixroos in https://github.com/tidalcycles/strudel/pull/305 +- Updated csoundm to use the register facility . by @gogins in https://github.com/tidalcycles/strudel/pull/303 + +## New Contributors + +- @gogins made their first contribution in https://github.com/tidalcycles/strudel/pull/303 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.4.0...v0.5.0 diff --git a/website/src/content/blog/release-0.6.0-zimtschnecke.mdx b/website/src/content/blog/release-0.6.0-zimtschnecke.mdx new file mode 100644 index 000000000..ee6353d36 --- /dev/null +++ b/website/src/content/blog/release-0.6.0-zimtschnecke.mdx @@ -0,0 +1,84 @@ +--- +title: 'Release Notes v0.6.0 Zimtschnecke' +description: '' +date: '2023-02-01' +tags: ['meta'] +author: froos +--- + +## Package Versions + +- @strudel.cycles/core@0.6.8 +- @strudel.cycles/eval@0.6.2 +- @strudel.cycles/transpiler@0.6.0 +- @strudel.cycles/mini@0.6.0 +- @strudel.cycles/tonal@0.6.0 +- @strudel.cycles/tone@0.6.0 +- @strudel.cycles/xen@0.6.0 +- @strudel.cycles/webaudio@0.6.1 +- @strudel.cycles/react@0.6.0 +- @strudel.cycles/osc@0.6.0 +- @strudel.cycles/midi@0.6.0 +- @strudel.cycles/webdirt@0.6.0 +- @strudel.cycles/serial@0.6.0 +- @strudel.cycles/soundfonts@0.6.0 +- @strudel.cycles/csound@0.6.0 + +## What's Changed + +- support freq in pianoroll by @felixroos in https://github.com/tidalcycles/strudel/pull/308 +- ICLC2023 paper WIP by @yaxu in https://github.com/tidalcycles/strudel/pull/306 +- fix: copy share link to clipboard was broken for some browers by @felixroos in https://github.com/tidalcycles/strudel/pull/311 +- Jsdoc component by @felixroos in https://github.com/tidalcycles/strudel/pull/312 +- object support for .scale by @felixroos in https://github.com/tidalcycles/strudel/pull/307 +- Astro build by @felixroos in https://github.com/tidalcycles/strudel/pull/315 +- Reference tab sort by @felixroos in https://github.com/tidalcycles/strudel/pull/318 +- tutorial updates by @jarmitage in https://github.com/tidalcycles/strudel/pull/320 +- support notes without octave by @felixroos in https://github.com/tidalcycles/strudel/pull/323 +- mini repl improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/324 +- fix: workaround Object.assign globalThis by @felixroos in https://github.com/tidalcycles/strudel/pull/326 +- add examples route by @felixroos in https://github.com/tidalcycles/strudel/pull/327 +- add my-patterns by @felixroos in https://github.com/tidalcycles/strudel/pull/328 +- my-patterns build + deploy by @felixroos in https://github.com/tidalcycles/strudel/pull/329 +- my-patterns: fix paths + update readme by @felixroos in https://github.com/tidalcycles/strudel/pull/330 +- improve displaying 's' in pianoroll by @felixroos in https://github.com/tidalcycles/strudel/pull/331 +- fix: can now multiply floats in mini notation by @felixroos in https://github.com/tidalcycles/strudel/pull/332 +- Embed mode improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/333 +- testing + docs docs by @felixroos in https://github.com/tidalcycles/strudel/pull/334 +- animate mvp by @felixroos in https://github.com/tidalcycles/strudel/pull/335 +- Tidy parser, implement polymeters by @yaxu in https://github.com/tidalcycles/strudel/pull/336 +- animation options by @felixroos in https://github.com/tidalcycles/strudel/pull/337 +- move /my-patterns to /swatch by @yaxu in https://github.com/tidalcycles/strudel/pull/338 +- more animate functions + mini repl fix by @felixroos in https://github.com/tidalcycles/strudel/pull/340 +- Patternify euclid, fast, slow and polymeter step parameters in mininotation by @yaxu in https://github.com/tidalcycles/strudel/pull/341 +- fixes #346 by @felixroos in https://github.com/tidalcycles/strudel/pull/347 +- Fix prebake base path by @felixroos in https://github.com/tidalcycles/strudel/pull/345 +- Fix Bjorklund by @yaxu in https://github.com/tidalcycles/strudel/pull/343 +- docs: tidal comparison + add global fx + add missing sampler fx by @felixroos in https://github.com/tidalcycles/strudel/pull/356 +- Fix .out(), renaming webaudio's out() to webaudio() by @yaxu in https://github.com/tidalcycles/strudel/pull/361 +- Support for multiple mininotation operators by @yaxu in https://github.com/tidalcycles/strudel/pull/350 +- doc structuring by @felixroos in https://github.com/tidalcycles/strudel/pull/360 +- add https to url by @urswilke in https://github.com/tidalcycles/strudel/pull/364 +- document more functions + change arp join by @felixroos in https://github.com/tidalcycles/strudel/pull/369 +- improve new draw logic by @felixroos in https://github.com/tidalcycles/strudel/pull/372 +- Draw fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/377 +- update my-patterns instructions by @felixroos in https://github.com/tidalcycles/strudel/pull/384 +- docs: use note instead of n to mitigate confusion by @felixroos in https://github.com/tidalcycles/strudel/pull/385 +- add run + test + docs by @felixroos in https://github.com/tidalcycles/strudel/pull/386 +- Rename a to angle by @felixroos in https://github.com/tidalcycles/strudel/pull/387 +- document csound by @felixroos in https://github.com/tidalcycles/strudel/pull/391 +- Notes are not essential :) by @yaxu in https://github.com/tidalcycles/strudel/pull/393 +- add ribbon + test + docs by @felixroos in https://github.com/tidalcycles/strudel/pull/388 +- Add tidal-drum-patterns to examples by @urswilke in https://github.com/tidalcycles/strudel/pull/379 +- add pattern methods hurry, press and pressBy by @yaxu in https://github.com/tidalcycles/strudel/pull/397 +- proper builds + use pnpm workspaces by @felixroos in https://github.com/tidalcycles/strudel/pull/396 +- fix: minirepl styles by @felixroos in https://github.com/tidalcycles/strudel/pull/398 +- can now await initAudio + initAudioOnFirstClick by @felixroos in https://github.com/tidalcycles/strudel/pull/399 +- release webaudio by @felixroos in https://github.com/tidalcycles/strudel/pull/400 + +## New Contributors + +- @jarmitage made their first contribution in https://github.com/tidalcycles/strudel/pull/320 +- @urswilke made their first contribution in https://github.com/tidalcycles/strudel/pull/364 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.5.0...v0.6.0 diff --git a/website/src/content/blog/release-0.7.0-zuckerguss.mdx b/website/src/content/blog/release-0.7.0-zuckerguss.mdx new file mode 100644 index 000000000..1d810cb29 --- /dev/null +++ b/website/src/content/blog/release-0.7.0-zuckerguss.mdx @@ -0,0 +1,88 @@ +--- +title: 'Release Notes v0.7.0 Zimtschnecke' +description: '' +date: '2023-03-23' +tags: ['meta'] +author: froos +--- + +## Package Versions + +- @strudel.cycles/core@0.7.2 +- @strudel.cycles/transpiler@0.7.1 +- @strudel.cycles/mini@0.7.2 +- @strudel.cycles/tonal@0.7.1 +- @strudel.cycles/xen@0.7.1 +- @strudel.cycles/tone@0.7.1 +- @strudel.cycles/webaudio@0.7.1 +- @strudel.cycles/react@0.7.1 +- @strudel.cycles/osc@0.7.1 +- @strudel.cycles/serial@0.7.1 +- @strudel.cycles/midi@0.7.1 +- @strudel.cycles/csound@0.7.1 + +## What's Changed + +- pin @csound/browser to 6.18.3 + bump by @felixroos in https://github.com/tidalcycles/strudel/pull/403 +- update csound + fix sound output by @felixroos in https://github.com/tidalcycles/strudel/pull/404 +- fix: share url on subpath by @felixroos in https://github.com/tidalcycles/strudel/pull/405 +- add shabda doc by @felixroos in https://github.com/tidalcycles/strudel/pull/407 +- Update effects.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/410 +- improve effects doc by @felixroos in https://github.com/tidalcycles/strudel/pull/409 +- google gtfo by @felixroos in https://github.com/tidalcycles/strudel/pull/413 +- improve samples doc by @felixroos in https://github.com/tidalcycles/strudel/pull/411 +- PWA with offline support by @felixroos in https://github.com/tidalcycles/strudel/pull/417 +- add caching strategy for missing file types + cache all samples loaded from github by @felixroos in https://github.com/tidalcycles/strudel/pull/419 +- add more offline caching by @felixroos in https://github.com/tidalcycles/strudel/pull/421 +- add cdn.freesound to cache list by @felixroos in https://github.com/tidalcycles/strudel/pull/425 +- minirepl: add keyboard shortcuts by @felixroos in https://github.com/tidalcycles/strudel/pull/429 +- Themes by @felixroos in https://github.com/tidalcycles/strudel/pull/431 +- autocomplete preparations by @felixroos in https://github.com/tidalcycles/strudel/pull/427 +- Fix anchors by @felixroos in https://github.com/tidalcycles/strudel/pull/433 +- Update code.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/436 +- Update mini-notation.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/437 +- Update synths.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/438 +- FIXES: Warning about jsxBracketSameLine deprecation by @bwagner in https://github.com/tidalcycles/strudel/pull/461 +- Composable functions by @yaxu in https://github.com/tidalcycles/strudel/pull/390 +- weave and weaveWith by @yaxu in https://github.com/tidalcycles/strudel/pull/465 +- slice and splice by @yaxu in https://github.com/tidalcycles/strudel/pull/466 +- fix: osc should not return a promise by @felixroos in https://github.com/tidalcycles/strudel/pull/472 +- FIXES: freqs instead of pitches by @bwagner in https://github.com/tidalcycles/strudel/pull/464 +- Update input-output.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/471 +- settings tab with vim / emacs modes + additional themes and fonts by @felixroos in https://github.com/tidalcycles/strudel/pull/467 +- fix: hash links by @felixroos in https://github.com/tidalcycles/strudel/pull/473 +- midi cc support by @felixroos in https://github.com/tidalcycles/strudel/pull/478 +- Fix array args by @felixroos in https://github.com/tidalcycles/strudel/pull/480 +- docs: packages + offline by @felixroos in https://github.com/tidalcycles/strudel/pull/482 +- Update mini-notation.mdx by @yaxu in https://github.com/tidalcycles/strudel/pull/365 +- Revert "Another attempt at composable functions - WIP (#390)" by @felixroos in https://github.com/tidalcycles/strudel/pull/484 +- fix app height by @felixroos in https://github.com/tidalcycles/strudel/pull/485 +- add algolia creds + optimize sidebar for crawling by @felixroos in https://github.com/tidalcycles/strudel/pull/488 +- refactor react package by @felixroos in https://github.com/tidalcycles/strudel/pull/490 +- react style fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/491 +- implement cps in scheduler by @felixroos in https://github.com/tidalcycles/strudel/pull/493 +- Add control aliases by @yaxu in https://github.com/tidalcycles/strudel/pull/497 +- fix: nano-repl highlighting by @felixroos in https://github.com/tidalcycles/strudel/pull/501 +- Reinstate slice and splice by @yaxu in https://github.com/tidalcycles/strudel/pull/500 +- can now use : as a replacement for space in scales by @felixroos in https://github.com/tidalcycles/strudel/pull/502 +- Support list syntax in mininotation by @yaxu in https://github.com/tidalcycles/strudel/pull/512 +- update react to 18 by @felixroos in https://github.com/tidalcycles/strudel/pull/514 +- add arrange function by @felixroos in https://github.com/tidalcycles/strudel/pull/508 +- Update README.md by @bwagner in https://github.com/tidalcycles/strudel/pull/474 +- add 2 illegible fonts by @felixroos in https://github.com/tidalcycles/strudel/pull/518 +- registerSound API + improved sounds tab + regroup soundfonts by @felixroos in https://github.com/tidalcycles/strudel/pull/516 +- fix: envelopes in chrome by @felixroos in https://github.com/tidalcycles/strudel/pull/521 +- Update samples.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/524 +- Update intro.mdx by @bwagner in https://github.com/tidalcycles/strudel/pull/525 +- fix(footer): fix link to tidalcycles by @revolunet in https://github.com/tidalcycles/strudel/pull/529 +- FIXES: alias pm for polymeter by @bwagner in https://github.com/tidalcycles/strudel/pull/527 +- Maintain random seed state in parser, not globally by @ijc8 in https://github.com/tidalcycles/strudel/pull/531 +- feat: add freq support to gm soundfonts by @felixroos in https://github.com/tidalcycles/strudel/pull/534 +- Update lerna by @felixroos in https://github.com/tidalcycles/strudel/pull/535 + +## New Contributors + +- @revolunet made their first contribution in https://github.com/tidalcycles/strudel/pull/529 +- @ijc8 made their first contribution in https://github.com/tidalcycles/strudel/pull/531 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.6.0...v0.7.0 diff --git a/website/src/content/blog/release-0.8.0-himbeermuffin.mdx b/website/src/content/blog/release-0.8.0-himbeermuffin.mdx new file mode 100644 index 000000000..7baea4c1b --- /dev/null +++ b/website/src/content/blog/release-0.8.0-himbeermuffin.mdx @@ -0,0 +1,130 @@ +--- +title: 'Release Notes v0.8.0 Himbeermuffin' +description: '' +date: '2023-06-30' +tags: ['meta'] +author: froos +--- + +import BlogVideo from '../../components/BlogVideo.astro'; + +These are the release notes for Strudel 0.8.0 aka "Himbeermuffin"! + +[Go to Tidal Club Forum for this Release](https://club.tidalcycles.org/t/strudel-0-8-0-released/4769) + +Let me write up some of the highlights: + +## Desktop App + +Besides the REPL (https://strudel.tidalcycles.org/), Strudel is now also distributed as a Desktop App via https://tauri.app/! Thanks to [vasilymilovidov](https://github.com/vasilymilovidov)! + +- [Linux: Debian based](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/strudel_0.1.0_amd64.deb) +- [Linux: AppImage](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/strudel_0.1.0_amd64.AppImage) +- [MacOS](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/Strudel_0.1.0_x64.dmg) +- [Windows .exe](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/Strudel_0.1.0_x64-setup.exe) +- [Windows .msi](https://github.com/tidalcycles/strudel/releases/download/v0.8.0/Strudel_0.1.0_x64_en-US.msi) + +edit: the desktop app performance on linux is currently not that great.. the web REPL runs much smoother (using firefox or chromium) + +The desktop App has the same features as the webapp, with the additional ability to load samples from disk. It is currently not documented yet, but you can do something like + +```js +await samples('~/music/xxx'); + +s('my_sound'); +``` + +You have to start with `~/music/`, followed by an arbitrary folder path that is expected to be present in the systems [audio directory](https://tauri.app/v1/api/js/path/#audiodir). +When you first run it, the app will create a strudel.json file in that directory to map out the available samples. + +I would be very happy to collect some feedback on how it works across different platforms & systems! + +## Spiral Visualization + +Also still undocumented, but you can now visualize patterns as a spiral via `.spiral()`: + + + +This is especially nice because strudel is not only the name of a dessert but also the german word for vortex! The spiral is very fitting to visualize cycles because you can align cycles vertically, while surfing along an infinite twisted timeline. + +## More settings + +In the settings tab, you can now toggle: + +- line numbers +- auto-complete +- line wrapping + +Thanks to [roipoussiere](https://github.com/roipoussiere)! + +## More + +Scroll down to see the full list of Changes! + +A big thanks to all the contributors! + +## Package Versions + +- @strudel.cycles/core: 0.8.2 +- @strudel.cycles/mini: 0.8.2 +- @strudel.cycles/transpiler: 0.8.2 +- @strudel.cycles/webaudio: 0.8.2 +- @strudel.cycles/soundfonts: 0.8.2 +- @strudel.cycles/react: 0.8.0 +- @strudel.cycles/midi: 0.8.0 +- @strudel.cycles/osc: 0.8.0 +- @strudel.cycles/csound: 0.8.0 +- @strudel.cycles/serial: 0.8.0 +- @strudel.cycles/tonal: 0.8.2 +- @strudel.cycles/xen: 0.8.0 +- @strudel/codemirror: 0.8.4 +- @strudel/web: 0.8.3 + +## What's Changed + +- fix period key for dvorak + remove duplicated code by @felixroos in https://github.com/tidalcycles/strudel/pull/537 +- improve initial loading + wait before eval by @felixroos in https://github.com/tidalcycles/strudel/pull/538 +- do not reset cps before eval #517 by @felixroos in https://github.com/tidalcycles/strudel/pull/539 +- feat: add loader bar to animate loading state by @felixroos in https://github.com/tidalcycles/strudel/pull/542 +- add firacode font by @felixroos in https://github.com/tidalcycles/strudel/pull/544 +- fix: allow whitespace at the end of a mini pattern by @felixroos in https://github.com/tidalcycles/strudel/pull/547 +- fix: reset time on stop by @felixroos in https://github.com/tidalcycles/strudel/pull/548 +- fix: load soundfonts in prebake by @felixroos in https://github.com/tidalcycles/strudel/pull/550 +- fix: colorable highlighting by @felixroos in https://github.com/tidalcycles/strudel/pull/553 +- fix: make soundfonts import dynamic by @felixroos in https://github.com/tidalcycles/strudel/pull/556 +- add basic triads and guidetone voicings by @felixroos in https://github.com/tidalcycles/strudel/pull/557 +- Patchday by @felixroos in https://github.com/tidalcycles/strudel/pull/559 +- Vanilla JS Refactoring by @felixroos in https://github.com/tidalcycles/strudel/pull/563 +- repl: add option to display line numbers by @roipoussiere in https://github.com/tidalcycles/strudel/pull/582 +- learn/tonal: fix typo in "scaleTran[s]pose" by @srenatus in https://github.com/tidalcycles/strudel/pull/585 +- Music metadata by @roipoussiere in https://github.com/tidalcycles/strudel/pull/580 +- New Workshop by @felixroos in https://github.com/tidalcycles/strudel/pull/587 +- Fix option dot by @felixroos in https://github.com/tidalcycles/strudel/pull/596 +- fix: allow f for flat notes like tidal by @felixroos in https://github.com/tidalcycles/strudel/pull/593 +- fix: division by zero by @felixroos in https://github.com/tidalcycles/strudel/pull/591 +- Solmization added by @dariacotocu in https://github.com/tidalcycles/strudel/pull/570 +- improve cursor by @felixroos in https://github.com/tidalcycles/strudel/pull/597 +- enable auto-completion by @roipoussiere in https://github.com/tidalcycles/strudel/pull/588 +- add ratio function by @felixroos in https://github.com/tidalcycles/strudel/pull/602 +- editor: enable line wrapping by @roipoussiere in https://github.com/tidalcycles/strudel/pull/581 +- tonal fixes by @felixroos in https://github.com/tidalcycles/strudel/pull/607 +- fix: flatten scale lists by @felixroos in https://github.com/tidalcycles/strudel/pull/605 +- clip now works like legato in tidal by @felixroos in https://github.com/tidalcycles/strudel/pull/598 +- fix: doc links by @felixroos in https://github.com/tidalcycles/strudel/pull/612 +- tauri desktop app by @vasilymilovidov in https://github.com/tidalcycles/strudel/pull/613 +- add spiral viz by @felixroos in https://github.com/tidalcycles/strudel/pull/614 +- patterning ui settings by @felixroos in https://github.com/tidalcycles/strudel/pull/606 +- Fix typo on packages.mdx by @paikwiki in https://github.com/tidalcycles/strudel/pull/520 +- cps dependent functions by @felixroos in https://github.com/tidalcycles/strudel/pull/620 +- desktop: play samples from disk by @felixroos in https://github.com/tidalcycles/strudel/pull/621 +- fix: midi clock drift by @felixroos in https://github.com/tidalcycles/strudel/pull/627 + +## New Contributors + +- @roipoussiere made their first contribution in https://github.com/tidalcycles/strudel/pull/582 +- @srenatus made their first contribution in https://github.com/tidalcycles/strudel/pull/585 +- @dariacotocu made their first contribution in https://github.com/tidalcycles/strudel/pull/570 +- @vasilymilovidov made their first contribution in https://github.com/tidalcycles/strudel/pull/613 +- @paikwiki made their first contribution in https://github.com/tidalcycles/strudel/pull/520 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.7.0...v0.8.0 diff --git a/website/src/content/blog/release-0.9.0-bananenbrot.mdx b/website/src/content/blog/release-0.9.0-bananenbrot.mdx new file mode 100644 index 000000000..eed5bf553 --- /dev/null +++ b/website/src/content/blog/release-0.9.0-bananenbrot.mdx @@ -0,0 +1,114 @@ +--- +title: 'Release Notes v0.9.0 Bananenbrot' +description: '' +date: '2023-09-17' +tags: ['meta'] +author: froos +--- + +import BlogVideo from '../../components/BlogVideo.astro'; + +These are the release notes for Strudel 0.9.0 aka "Bananenbrot"! + +The last release was over 11 weeks ago, so a lot of things have happened! + +Let me write up some of the highlights: + +## Improved Synth Engine + +The synth engine has gotten a lot of love + a name: [superdough](https://www.npmjs.com/package/superdough) encapsulates the web audio based synth / sampler / fx engine into a reusable package, which is already used by [Topos](https://topos.raphaelforment.fr/). +Main new features include: + +- [filter envelopes](https://strudel.tidalcycles.org/learn/effects#filter-envelope) +- [FM Synthesis](https://strudel.tidalcycles.org/learn/synths#fm-synthesis) +- [looping samples](https://strudel.tidalcycles.org/learn/samples#loop), allowing [wavetable synthesis](https://strudel.tidalcycles.org/?I9myTNQoKKaP) +- [vibrato](https://strudel.tidalcycles.org/learn/synths#vibrato) +- an integration of [ZZFX](https://strudel.tidalcycles.org/learn/synths#zzfx) + + + +Related PRs: + +- superdough: encapsulates web audio output by @felixroos in https://github.com/tidalcycles/strudel/pull/664 +- basic fm by @felixroos in https://github.com/tidalcycles/strudel/pull/669 +- Wave Selection and Global Envelope on the FM Synth Modulator by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/683 +- control osc partial count with n by @felixroos in https://github.com/tidalcycles/strudel/pull/674 +- ZZFX Synth support by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/684 +- Adding filter envelopes and filter order selection by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/692 +- Adding loop points and thus wavetable synthesis by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/698 +- Adding vibrato to base oscillators by @Bubobubobubobubo in https://github.com/tidalcycles/strudel/pull/693 + +## Desktop App Improvements + +Thanks to @daslyfe and @vasilymilovidov , the desktop app now has its own rust based MIDI and OSC integrations, +which do not depend on browser APIs! + +You can see superdough, superdirt via OSC + hardware synths via MIDI all together playing in harmony in this [awesome video](https://www.youtube.com/watch?v=lxQgBeLQBgk). These are the related PRs: + +- Create Midi Integration for Tauri Desktop app by @daslyfe in https://github.com/tidalcycles/strudel/pull/685 +- add sleep timer + improve message iterating by @daslyfe in https://github.com/tidalcycles/strudel/pull/688 +- fix MIDI CC messages by @vasilymilovidov in https://github.com/tidalcycles/strudel/pull/690 +- Direct OSC Support in Tauri by @daslyfe in https://github.com/tidalcycles/strudel/pull/694 +- Add logging from tauri by @daslyfe in https://github.com/tidalcycles/strudel/pull/697 +- fix osc bundle timestamp glitches caused by drifting clock by @daslyfe in https://github.com/tidalcycles/strudel/pull/666 +- Midi time fixes by @daslyfe in https://github.com/tidalcycles/strudel/pull/668 +- [Bug Fix] Account for numeral notation when converting to midi by @daslyfe in https://github.com/tidalcycles/strudel/pull/656 +- [Bug Fix] Midi: Don't treat note 0 as false by @daslyfe in https://github.com/tidalcycles/strudel/pull/657 + +## Visuals + +- 2 new FFT based vizualisations have now landed: [scope and fscope](https://github.com/tidalcycles/strudel/pull/677) (featured in the video at the top). +- pianoroll has new options, see [PR](https://github.com/tidalcycles/strudel/pull/679) + +Related PRs: + +- Scope by @felixroos in https://github.com/tidalcycles/strudel/pull/677 ([demo](https://strudel.tidalcycles.org/?hXVQF-KxMI8p)) +- Pianoroll improvements by @felixroos in https://github.com/tidalcycles/strudel/pull/679 ([demo](https://strudel.tidalcycles.org/?aPMKqXGVMgSM)) + +## Voicings + +There is now a new way to play chord voicings + a huge selection of chord voicings available. Find out more in these PRs: + +- stateless voicings + tonleiter lib by @felixroos in https://github.com/tidalcycles/strudel/pull/647 ([demo](https://strudel.tidalcycles.org/?FoILM0Hs9y9f)) +- ireal voicings by @felixroos in https://github.com/tidalcycles/strudel/pull/653 ([demo](https://strudel.tidalcycles.org/?bv_TjY9hOC28)) + +## Adaptive Highlighting + +Thanks to @mindofmatthew , the highlighting will adapt to edits instantly! Related PRs: + +- More work on highlight IDs by @mindofmatthew in https://github.com/tidalcycles/strudel/pull/636 +- Adaptive Highlighting by @felixroos in https://github.com/tidalcycles/strudel/pull/634 + +## UI Changes + +- teletext theme + fonts by @felixroos in https://github.com/tidalcycles/strudel/pull/681 (featured in video at the top) +- togglable panel position by @felixroos in https://github.com/tidalcycles/strudel/pull/667 + +## Other New Features + +- slice: list mode by @felixroos in https://github.com/tidalcycles/strudel/pull/645 ([demo](https://strudel.tidalcycles.org/?bAYIqz5NLjRr)) +- add emoji support by @felixroos in https://github.com/tidalcycles/strudel/pull/680 ([demo](https://strudel.tidalcycles.org/?a6FgLz475gN9)) + +## Articles + +- Understand pitch by @felixroos in https://github.com/tidalcycles/strudel/pull/652 + +## Other Fixes & Enhancements + +- fix: out of range error by @felixroos in https://github.com/tidalcycles/strudel/pull/630 +- fix: update canvas size on window resize by @felixroos in https://github.com/tidalcycles/strudel/pull/631 +- FIXES: TODO in rotateChroma by @bwagner in https://github.com/tidalcycles/strudel/pull/650 +- snapshot tests: sort haps by part by @felixroos in https://github.com/tidalcycles/strudel/pull/637 +- Delete old packages by @felixroos in https://github.com/tidalcycles/strudel/pull/639 +- update vitest by @felixroos in https://github.com/tidalcycles/strudel/pull/651 +- fix: welcome message for latestCode by @felixroos in https://github.com/tidalcycles/strudel/pull/659 +- fix: always run previous trigger by @felixroos in https://github.com/tidalcycles/strudel/pull/660 + +## New Contributors + +- @daslyfe made their first contribution in https://github.com/tidalcycles/strudel/pull/656 +- @Bubobubobubobubo made their first contribution in https://github.com/tidalcycles/strudel/pull/683 + +**Full Changelog**: https://github.com/tidalcycles/strudel/compare/v0.8.0...v0.9.0 + +A big thanks to all the contributors! diff --git a/website/src/content/config.ts b/website/src/content/config.ts new file mode 100644 index 000000000..bc5d1dd37 --- /dev/null +++ b/website/src/content/config.ts @@ -0,0 +1,24 @@ +import { defineCollection, z } from 'astro:content'; + +const blog = defineCollection({ + // Type-check frontmatter using a schema + schema: z.object({ + title: z.string(), + author: z.string(), + description: z.string().optional(), + // Transform string to Date object + date: z + .string() + .or(z.date()) + .transform((val) => new Date(val)), + updatedDate: z + .string() + .optional() + .transform((str) => (str ? new Date(str) : undefined)), + image: z.string().optional(), + tags: z.array(z.string()).optional(), + draft: z.boolean().optional(), + }), +}); + +export const collections = { blog }; diff --git a/website/src/docs/Colors.jsx b/website/src/docs/Colors.jsx index 59f7bca0d..7cc7eab61 100644 --- a/website/src/docs/Colors.jsx +++ b/website/src/docs/Colors.jsx @@ -1,4 +1,4 @@ -import { colorMap } from '@strudel.cycles/core/color.mjs'; +import { colorMap } from '@strudel/core/color.mjs'; import React from 'react'; const Colors = () => { diff --git a/website/src/docs/Icon.jsx b/website/src/docs/Icon.jsx index 64d5f88ac..48b05d87f 100644 --- a/website/src/docs/Icon.jsx +++ b/website/src/docs/Icon.jsx @@ -1,4 +1,19 @@ export function Icon({ type }) { + if (type === 'skip') { + // !Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc. + return ( + + + + ); + } return ( { @@ -31,6 +46,13 @@ export function Icon({ type }) { clipRule="evenodd" /> ), + skip: ( + + ), }[type] } diff --git a/website/src/docs/MiniRepl.jsx b/website/src/docs/MiniRepl.jsx index 5e915641f..10eff4832 100644 --- a/website/src/docs/MiniRepl.jsx +++ b/website/src/docs/MiniRepl.jsx @@ -1,8 +1,8 @@ import { useState, useRef, useCallback, useMemo, useEffect } from 'react'; import { Icon } from './Icon'; -import { silence, getPunchcardPainter, noteToMidi } from '@strudel.cycles/core'; -import { transpiler } from '@strudel.cycles/transpiler'; -import { getAudioContext, webaudioOutput } from '@strudel.cycles/webaudio'; +import { silence, getPunchcardPainter, noteToMidi, _mod } from '@strudel/core'; +import { transpiler } from '@strudel/transpiler'; +import { getAudioContext, webaudioOutput, initAudioOnFirstClick } from '@strudel/webaudio'; import { StrudelMirror } from '@strudel/codemirror'; // import { prebake } from '@strudel/repl'; import { prebake } from '../repl/prebake.mjs'; @@ -10,14 +10,16 @@ import { loadModules } from '../repl/util.mjs'; import Claviature from '@components/Claviature'; import useClient from '@src/useClient.mjs'; -let prebaked, modulesLoading; +let prebaked, modulesLoading, audioLoading; if (typeof window !== 'undefined') { prebaked = prebake(); modulesLoading = loadModules(); + audioLoading = initAudioOnFirstClick(); } export function MiniRepl({ - tune: code, + tune, + tunes, hideHeader = false, canvasHeight = 100, onTrigger, @@ -26,6 +28,7 @@ export function MiniRepl({ claviature, claviatureLabels, }) { + const code = tunes ? tunes[0] : tune; const id = useMemo(() => s4(), []); const canvasId = useMemo(() => `canvas-${id}`, [id]); const shouldDraw = !!punchcard || !!claviature; @@ -75,7 +78,7 @@ export function MiniRepl({ } return pat; }, - prebake: async () => Promise.all([modulesLoading, prebaked]), + prebake: async () => Promise.all([modulesLoading, prebaked, audioLoading]), onUpdateState: (state) => { setReplState({ ...state }); }, @@ -91,6 +94,14 @@ export function MiniRepl({ const containerRef = useRef(); const client = useClient(); + const [tuneIndex, setTuneIndex] = useState(0); + const changeTune = (index) => { + index = _mod(index, tunes.length); + setTuneIndex(index); + editorRef.current?.setCode(tunes[index]); + editorRef.current?.evaluate(); + }; + if (!client) { return
{code}
; } @@ -119,6 +130,28 @@ export function MiniRepl({ + {tunes && ( +
+ + +
+ )} )}
diff --git a/website/src/env.d.ts b/website/src/env.d.ts index 5263bd6a3..bd7aa94b7 100644 --- a/website/src/env.d.ts +++ b/website/src/env.d.ts @@ -2,3 +2,5 @@ /// /// /// + +declare module 'date-fns'; diff --git a/website/src/examples.mjs b/website/src/examples.mjs new file mode 100644 index 000000000..d752e711d --- /dev/null +++ b/website/src/examples.mjs @@ -0,0 +1,81 @@ +export const examples = [ + `// "coastline" @by eddyflux +await samples('github:eddyflux/crate') +setcps(.75) +let chords = chord("/4").dict('ireal') +stack( + stack( // DRUMS + s("bd").struct("<[x*<1 2> [~@3 x]] x>"), + s("~ [rim, sd:<2 3>]").room("<0 .2>"), + n("[0 <1 3>]*<2!3 4>").s("hh"), + s("rd:<1!3 2>*2").mask("<0 0 1 1>/16").gain(.5) + ).bank('crate') + .mask("<[0 1] 1 1 1>/16".early(.5)) + , // CHORDS + chords.offset(-1).voicing().s("gm_epiano1:1") + .phaser(4).room(.5) + , // MELODY + n("<0!3 1*2>").set(chords).mode("root:g2") + .voicing().s("gm_acoustic_bass"), + chords.n("[0 <4 3 <2 5>>*2](<3 5>,8)") + .set(x).anchor("D5").voicing() + .segment(4).clip(rand.range(.4,.8)) + .room(.75).shape(.3).delay(.25) + .fm(sine.range(3,8).slow(8)) + .lpf(sine.range(500,1000).slow(8)).lpq(5) + .rarely(ply("2")).chunk(4, fast(2)) + .gain(perlin.range(.6, .9)) + .mask("<0 1 1 0>/16") +) +.late("[0 .01]*4").late("[0 .01]*2").size(4)`, + `// "broken cut 1" @by froos + +await samples('github:tidalcycles/Dirt-Samples/master') +samples({ + 'slap': 'https://cdn.freesound.org/previews/495/495416_10350281-lq.mp3', + 'whirl': 'https://cdn.freesound.org/previews/495/495313_10350281-lq.mp3', + 'attack': 'https://cdn.freesound.org/previews/494/494947_10350281-lq.mp3' +}) + +setcps(1.25) + +note("[c2 ~](3,8)*2,eb,g,bb,d").s("sawtooth") + .noise(0.3) + .lpf(perlin.range(800,2000).mul(0.6)) + .lpenv(perlin.range(1,5)).lpa(.25).lpd(.1).lps(0) + .add.mix(note("<0!3 [1 <4!3 12>]>")).late(.5) + .vib("4:.2") + .room(1).roomsize(4).slow(4) + .stack( + s("bd").late("<0.01 .251>"), + s("breaks165:1/2").fit() + .chop(4).sometimesBy(.4, ply("2")) + .sometimesBy(.1, ply("4")).release(.01) + .gain(1.5).sometimes(mul(speed("1.05"))).cut(1) + , + s("?").delay(".8:.1:.8").room(2).slow(8).cut(2), + ).reset("".late(2))`, + `// "acidic tooth" @by eddyflux + setcps(1) + stack( + note("[/8](<3 5>,8)") + .clip(perlin.range(.15,1.5)) + .release(.1) + .s("sawtooth") + .lpf(sine.range(400,800).slow(16)) + .lpq(cosine.range(6,14).slow(3)) + .lpenv(sine.mul(4).slow(4)) + .lpd(.2).lpa(.02) + .ftype('24db') + .rarely(add(note(12))) + .room(.2).shape(.3).postgain(.5) + .superimpose(x=>x.add(note(12)).delay(.5).bpf(1000)) + .gain("[.2 1@3]*2") // fake sidechain + , + stack( + s("bd*2").mask("<0@4 1@16>"), + s("hh*8").gain(saw.mul(saw.fast(2))).clip(sine) + .mask("<0@8 1@16>") + ).bank('RolandTR909') + )`, +]; diff --git a/website/src/pages/metadata_parser.js b/website/src/metadata_parser.js similarity index 100% rename from website/src/pages/metadata_parser.js rename to website/src/metadata_parser.js diff --git a/website/src/my_patterns.js b/website/src/my_patterns.js new file mode 100644 index 000000000..5779cc427 --- /dev/null +++ b/website/src/my_patterns.js @@ -0,0 +1,10 @@ +import { getMetadata } from './metadata_parser'; + +export function getMyPatterns() { + const my = import.meta.glob('../../my-patterns/**', { as: 'raw', eager: true }); + return Object.fromEntries( + Object.entries(my) + .filter(([name]) => name.endsWith('.txt')) + .map(([name, raw]) => [getMetadata(raw)['title'] || name.split('/').slice(-1), raw]), + ); +} diff --git a/website/src/pages/blog.astro b/website/src/pages/blog.astro new file mode 100644 index 000000000..f735e7ba7 --- /dev/null +++ b/website/src/pages/blog.astro @@ -0,0 +1,61 @@ +--- +import BlogPost from '../components/BlogPost.astro'; +import HeadCommon from '../components/HeadCommon.astro'; +import HeadSEO from '../components/HeadSEO.astro'; +import Header from '../components/Header/Header.astro'; +import LeftSidebar from '../components/LeftSidebar/LeftSidebar.astro'; +import PageContent from '../components/PageContent/PageContent.astro'; +import RightSidebar from '../components/RightSidebar/RightSidebar.astro'; +import { getCollection } from 'astro:content'; +import { compareDesc } from 'date-fns'; + +const currentPage = Astro.url.pathname; + +const posts = (await getCollection('blog')).sort((a, b) => compareDesc(a.data.date, b.data.date)); +--- + + + + + + 🌀 Strudel Blog + + + +
+
+
+
+
+
+ + +
+

Strudel Blog

+

+ Welcome to the Strudel Blog, where we will keep you updated with the latest changes and things happening + in the strudelsphere. You can subscribe to this blog using this rss link +

+
+
+ {posts.map((post) => )} +
+
+ +
+
+
+ + diff --git a/website/src/pages/de/workshop/first-effects.mdx b/website/src/pages/de/workshop/first-effects.mdx index b408a343e..a790120ab 100644 --- a/website/src/pages/de/workshop/first-effects.mdx +++ b/website/src/pages/de/workshop/first-effects.mdx @@ -15,7 +15,6 @@ import Box from '@components/Box.astro'; **low-pass filter** /2") .sound("sawtooth").lpf(800)`} @@ -33,7 +32,6 @@ lpf = **l**ow **p**ass **f**ilter **filter automatisieren** /2") .sound("sawtooth").lpf("200 1000")`} @@ -51,7 +49,6 @@ Später sehen wir, wie man mit Wellenformen Dinge automatisieren kann. **vowel = Vokal** /2") .sound("sawtooth").vowel("/2")`} @@ -60,7 +57,6 @@ Später sehen wir, wie man mit Wellenformen Dinge automatisieren kann. **gain = Verstärkung** ") .sound("sawtooth").lpf(600) @@ -145,7 +139,6 @@ Kannst du erraten, was die einzelnen Werte machen? **adsr-Kurznotation** ") .sound("sawtooth").lpf(600) @@ -156,7 +149,6 @@ Kannst du erraten, was die einzelnen Werte machen? **delay = Verzögerung** ~]") @@ -188,7 +180,6 @@ Was passiert, wenn du `.delay(".8:.06:.8")` schreibst? Kannst du erraten, was di **room aka reverb = Hall** ~@16] ~>/2") .scale("D4:minor").sound("gm_accordion:2") @@ -206,7 +197,6 @@ Füg auch ein Delay hinzu! **kleiner Dub-Tune** ~]") @@ -221,7 +211,6 @@ Füg auch ein Delay hinzu! Für echten Dub fehlt noch der Bass: ~]") @@ -245,7 +234,6 @@ Füg `.hush()` ans Ende eines Patterns im stack... **pan = Panorama** ").room(.2)`} /> +").room(.2)`} /> **fast and slow = schnell und langsam** Mit `fast` und `slow` kann man das Tempo eines Patterns außerhalb der Mini-Notation ändern: - + @@ -272,13 +260,13 @@ Was passiert, wenn du den Wert automatisierst? z.b. `.fast("<1 [2 4]>")` ? Übrigens, innerhalb der Mini-Notation: `fast` ist `*` und `slow` ist `/`. -")`} /> +")`} /> ## Automation mit Signalen Anstatt Werte schrittweise zu automatisieren, können wir auch sogenannte Signale benutzen: - + @@ -294,7 +282,7 @@ Der `gain`-Wert (Verstärkung) wird in der Visualisierung als Transparenz darges Signale bewegen sich standardmäßig zwischen 0 und 1. Wir können das mit `range` ändern: - + `range` ist nützlich wenn wir Funktionen mit einem anderen Wertebereich als 0 und 1 automatisieren wollen (z.b. `lpf`) @@ -307,7 +295,6 @@ Was passiert wenn du die beiden Werte vertauschst? Wir können die Geschwindigkeit der Automation mit slow / fast ändern: /2") .sound("sawtooth") @@ -322,15 +309,15 @@ Die ganze Automation braucht nun 8 cycle bis sie sich wiederholt. ## Rückblick -| Name | Beispiel | -| ----- | -------------------------------------------------------------------------------------------------- | -| lpf | ")`} /> | -| vowel | ")`} /> | -| gain | | -| delay | | -| room | | -| pan | | -| speed | ")`} /> | -| range | | +| Name | Beispiel | +| ----- | --------------------------------------------------------------------------------------- | +| lpf | ")`} /> | +| vowel | ")`} /> | +| gain | | +| delay | | +| room | | +| pan | | +| speed | ")`} /> | +| range | | Lass uns nun die für Tidal typischen [Pattern-Effekte anschauen](/de/workshop/pattern-effects). diff --git a/website/src/pages/de/workshop/first-notes.mdx b/website/src/pages/de/workshop/first-notes.mdx index c44969dfb..ad0c4586a 100644 --- a/website/src/pages/de/workshop/first-notes.mdx +++ b/website/src/pages/de/workshop/first-notes.mdx @@ -4,7 +4,7 @@ layout: ../../../layouts/MainLayout.astro --- import { MiniRepl } from '@src/docs/MiniRepl'; -import { midi2note } from '@strudel.cycles/core/'; +import { midi2note } from '@strudel/core/'; import Box from '@components/Box.astro'; import QA from '@components/QA'; @@ -17,7 +17,6 @@ Jetzt schauen wir uns an wie man mit Tönen mit der `note` Funktion spielt. **Töne mit Zahlen** + @@ -126,7 +121,6 @@ Probier ein paar sounds aus: **Zwischen Sounds hin und her wechseln** + @@ -171,7 +164,7 @@ Wenn eine Sequenz unabhängig von ihrem Inhalt immer gleich schnell bleiben soll **Eins pro Cycle per \< \>** -").sound("gm_acoustic_bass")`} punchcard /> +").sound("gm_acoustic_bass")`} punchcard /> @@ -190,7 +183,6 @@ usw.. **Eine Sequenz pro Cycle** ") .sound("gm_acoustic_bass")`} @@ -200,7 +192,6 @@ usw.. oder auch... /2") .sound("gm_acoustic_bass")`} @@ -212,7 +203,6 @@ oder auch... Ähnlich wie Unter-Sequenzen, kann auch `<...>` innerhalb einer Sequenz verwendet werden: ") .sound("gm_xylophone")`} @@ -222,7 +212,6 @@ oder auch... Das ist auch praktisch für atonale Sounds: , [~ hh]*2") .bank("RolandTR909")`} @@ -235,7 +224,6 @@ Es kann mühsam sein die richtigen Noten zu finden wenn man alle zur Verfügung Mit Skalen ist das einfacher: ") .scale("C:minor").sound("piano")`} @@ -262,7 +250,6 @@ Probier verschiedene Skalen: Wie alle Funktionen können auch Skalen mit einem Pattern automatisiert werden: , 2 4 <[6,8] [7,9]>") .scale("/4") @@ -283,7 +270,7 @@ Nimm dir Zeit um herauszufinden welche Skalen du magst. **Verlängern mit @** - + @@ -296,7 +283,6 @@ Spiel mit der Länge! **Unter-Sequenzen verlängern** *2") .scale("/4") @@ -314,7 +300,7 @@ Das nennt man auch manchmal `triolen swing`. Es ist ein typischer Rhythmus im Bl **Wiederholen** -]").sound("piano")`} punchcard /> +]").sound("piano")`} punchcard /> @@ -328,27 +314,26 @@ Was ist der Unterschied? Das haben wir in diesem Kapitel gelernt: -| Concept | Syntax | Example | -| ------------ | ------ | ------------------------------------------------------------------- | -| Verlangsamen | \/ | | -| Alternativen | \<\> | ")`} /> | -| Verlängern | @ | | -| Wiederholen | ! | | +| Concept | Syntax | Example | +| ------------ | ------ | -------------------------------------------------------- | +| Verlangsamen | \/ | | +| Alternativen | \<\> | ")`} /> | +| Verlängern | @ | | +| Wiederholen | ! | | Neue Funktionen: -| Name | Description | Example | -| ----- | --------------------------------------- | -------------------------------------------------------------------------------------------- | -| note | Tonhöhe als Buchstabe oder Zahl | | -| scale | Interpretiert `n` als Skalenstufe | | -| stack | Spiele mehrere Patterns parallel (s.u.) | | +| Name | Description | Example | +| ----- | --------------------------------------- | --------------------------------------------------------------------------------- | +| note | Tonhöhe als Buchstabe oder Zahl | | +| scale | Interpretiert `n` als Skalenstufe | | +| stack | Spiele mehrere Patterns parallel (s.u.) | | ## Beispiele **Bassline** /2") .sound("gm_synth_bass_1") @@ -358,7 +343,6 @@ Neue Funktionen: **Melodie** , [~ hh]*2") .bank("RolandTR909")`} @@ -387,7 +370,6 @@ Das geht mit `stack` 😙 /2") diff --git a/website/src/pages/de/workshop/first-sounds.mdx b/website/src/pages/de/workshop/first-sounds.mdx index a689add80..743a53125 100644 --- a/website/src/pages/de/workshop/first-sounds.mdx +++ b/website/src/pages/de/workshop/first-sounds.mdx @@ -15,7 +15,7 @@ Dies ist das erste Kapitel im Strudel Workshop, schön dich an Bord zu haben! Der Workshop ist voller interaktiver Textfelder. Lass uns lernen wie sie funktionieren. Hier ist eins: - + @@ -35,7 +35,7 @@ Glückwunsch, du kannst jetzt live coden! Gerade haben wir schon den ersten sound mit `sound` abgespielt: - + @@ -57,7 +57,7 @@ Ein Sound kann mehrere Samples (Audio Dateien) enthalten. Du kannst ein anderes Sample wählen, indem du `:` und eine Zahl an den Sound-Namen anhängst: - + @@ -74,7 +74,7 @@ Vorerst bleiben wir bei den voreingestellten Sounds, später erfahren wir noch w Strudel kommt von Haus aus mit einer breiten Auswahl an Drum Sounds: - + @@ -92,7 +92,7 @@ Probier verschiedene Sounds aus! Wir können den Charakter des Drum Sounds verändern, indem wir mit `bank` die Drum Machine auswählen: - + In diesem Beispiel ist `RolandTR909` der Name der Drum Machine, die eine prägende Rolle für House und Techno Musik spielte. @@ -117,7 +117,7 @@ Dann kannst du ihn mit `Strg`+`C` kopieren und mit `Strg`+`V` einfügen. Im letzten Beispiel haben wir schon gesehen dass man mehrere Sounds hintereinander abspielen kann wenn man sie durch Leerzeichen trennt: - + Beachte wie der aktuell gespielte Sound im Code markiert und auch darunter visualisiert wird. @@ -129,13 +129,13 @@ Versuch noch mehr Sounds hinzuzfügen! **Je länger die Sequence, desto schneller** - + Der Inhalt einer Sequence wird in einen sogenannten Cycle (=Zyklus) zusammengequetscht. **Tempo ändern mit `cpm`** - + @@ -151,7 +151,7 @@ Wir werden später noch mehr Möglichkeiten kennen lernen das Tempo zu veränder **Pausen mit '~'** - + @@ -164,7 +164,7 @@ Tilde tippen: **Unter-Sequenzen mit [Klammern]** - + @@ -178,11 +178,11 @@ Genau wie bei der ganzen Sequence wird eine Unter-Sequence schneller je mehr dri **Multiplikation: Dinge schneller machen** - + **Multiplikation: Vieeeeeeel schneller** - + @@ -192,12 +192,11 @@ Tonhöhe = sehr schneller Rhythmus **Multiplikation: Ganze Unter-Sequences schneller machen** - + Bolero: + @@ -216,15 +215,15 @@ Du kannst so tief verschachteln wie du willst! **Parallele Sequenzen mit Komma** - + Du kannst so viele Kommas benutzen wie du möchtest: - + Kommas können auch in Unter-Sequenzen verwendet werden: - + @@ -237,7 +236,6 @@ Es kommt öfter vor, dass man die gleiche Idee auf verschiedene Arten ausdrücke **Mehrere Zeilen schreiben mit \` (backtick)** + Das gleiche kann man auch so schreiben: - + ## Rückblick @@ -267,35 +265,35 @@ Wir haben jetzt die Grundlagen der sogenannten Mini-Notation gelernt, der Rhythm Das haben wir bisher gelernt: -| Concept | Syntax | Example | -| --------------------- | ----------- | -------------------------------------------------------------------------------- | -| Sequenz | Leerzeichen | | -| Sound Nummer | :x | | -| Pausen | ~ | | -| Unter-Sequenzen | \[\] | | -| Unter-Unter-Sequenzen | \[\[\]\] | | -| Schneller | \* | | -| Parallel | , | | +| Concept | Syntax | Example | +| --------------------- | ----------- | --------------------------------------------------------------------- | +| Sequenz | Leerzeichen | | +| Sound Nummer | :x | | +| Pausen | ~ | | +| Unter-Sequenzen | \[\] | | +| Unter-Unter-Sequenzen | \[\[\]\] | | +| Schneller | \* | | +| Parallel | , | | Die mit Apostrophen umgebene Mini-Notation benutzt man normalerweise in einer sogenannten Funktion. Die folgenden Funktionen haben wir bereits gesehen: -| Name | Description | Example | -| ----- | -------------------------------------- | ---------------------------------------------------------------------------------- | -| sound | Spielt den Sound mit dem Namen | | -| bank | Wählt die Soundbank / Drum Machine | | -| cpm | Tempo in **C**ycles **p**ro **M**inute | | -| n | Sample Nummer | | +| Name | Description | Example | +| ----- | -------------------------------------- | ----------------------------------------------------------------------- | +| sound | Spielt den Sound mit dem Namen | | +| bank | Wählt die Soundbank / Drum Machine | | +| cpm | Tempo in **C**ycles **p**ro **M**inute | | +| n | Sample Nummer | | ## Beispiele **Einfacher Rock Beat** - + **Klassischer House** - + @@ -306,12 +304,11 @@ Bestimmte Drum Patterns werden oft genreübergreifend wiederverwendet. We Will Rock you - + **Yellow Magic Orchestra - Firecracker** + **jux = einen stereo kanal modifizieren** - + So würde man das ohne `jux` schreiben: + Das hat den gleichen Effekt, wie: >")) .color(">").adsr("[.1 0]:.2:[1 0]") @@ -95,7 +91,6 @@ z.B. c4 = 60, also ist c4 + 2 = 62 Man kann auch mehrmals addieren: >").add("0,7")) .color(">").adsr("[.1 0]:.2:[1 0]") @@ -106,7 +101,6 @@ Man kann auch mehrmals addieren: **add + scale** [~ <4 1>]>*2".add("<0 [0,2,4]>/4")) .scale("C5:minor").release(.5) @@ -117,7 +111,6 @@ Man kann auch mehrmals addieren: **Alles zusammen** [~ <4 1>]>*2".add("<0 [0,2,4]>/4")) @@ -134,11 +127,11 @@ Man kann auch mehrmals addieren: **ply** - + das ist wie: - + @@ -149,7 +142,6 @@ Probier `ply` mit einem pattern zu automatisieren, z.b. `"<1 2 1 3>"` **off** ] <2 3> [~ 1]>" .off(1/8, x=>x.add(4)) @@ -168,16 +160,15 @@ In der Notation `x=>x.`, ist `x` das Pattern, das wir bearbeiten. `off` ist auch nützlich für Sounds: x.speed(1.5).gain(.25))`} /> -| Name | Beschreibung | Beispiel | -| ---- | --------------------------------- | ---------------------------------------------------------------------------------------------- | -| rev | rückwärts | | -| jux | einen Stereo-Kanal modifizieren | | -| add | addiert Zahlen oder Noten | ")).scale("C:minor")`} /> | -| ply | multipliziert jedes Element x mal | ")`} /> | -| off | verzögert eine modifizierte Kopie | x.speed(2))`} /> | +| Name | Beschreibung | Beispiel | +| ---- | --------------------------------- | ----------------------------------------------------------------------------------- | +| rev | rückwärts | | +| jux | einen Stereo-Kanal modifizieren | | +| add | addiert Zahlen oder Noten | ")).scale("C:minor")`} /> | +| ply | multipliziert jedes Element x mal | ")`} /> | +| off | verzögert eine modifizierte Kopie | x.speed(2))`} /> | diff --git a/website/src/pages/de/workshop/recap.mdx b/website/src/pages/de/workshop/recap.mdx index c0d577d16..14ef6b252 100644 --- a/website/src/pages/de/workshop/recap.mdx +++ b/website/src/pages/de/workshop/recap.mdx @@ -11,58 +11,58 @@ Diese Seite ist eine Auflistung aller im Workshop vorgestellten Funktionen. ## Mini Notation -| Konzept | Syntax | Beispiel | -| --------------------- | -------- | -------------------------------------------------------------------------------- | -| Sequenz | space | | -| Sample-Nummer | :x | | -| Pausen | ~ | | -| Unter-Sequenzen | \[\] | | -| Unter-Unter-Sequenzen | \[\[\]\] | | -| Schneller | \* | | -| Verlangsamen | \/ | | -| Parallel | , | | -| Alternieren | \<\> | ")`} /> | -| Verlängern | @ | | -| Wiederholen | ! | | +| Konzept | Syntax | Beispiel | +| --------------------- | -------- | --------------------------------------------------------------------- | +| Sequenz | space | | +| Sample-Nummer | :x | | +| Pausen | ~ | | +| Unter-Sequenzen | \[\] | | +| Unter-Unter-Sequenzen | \[\[\]\] | | +| Schneller | \* | | +| Verlangsamen | \/ | | +| Parallel | , | | +| Alternieren | \<\> | ")`} /> | +| Verlängern | @ | | +| Wiederholen | ! | | ## Sounds -| Name | Beschreibung | Beispiel | -| ----- | -------------------------- | ---------------------------------------------------------------------------------- | -| sound | spielt den Sound mit Namen | | -| bank | wählt die Soundbank | | -| n | wählt Sample mit Nummer | | +| Name | Beschreibung | Beispiel | +| ----- | -------------------------- | ----------------------------------------------------------------------- | +| sound | spielt den Sound mit Namen | | +| bank | wählt die Soundbank | | +| n | wählt Sample mit Nummer | | ## Noten -| Name | Beschreibung | Beispiel | -| --------- | ---------------------------------- | -------------------------------------------------------------------------------------------- | -| note | wählt Note per Zahl oder Buchstabe | | -| n + scale | wählt Note n in Skala | | -| stack | spielt mehrere Patterns parallel | | +| Name | Beschreibung | Beispiel | +| --------- | ---------------------------------- | --------------------------------------------------------------------------------- | +| note | wählt Note per Zahl oder Buchstabe | | +| n + scale | wählt Note n in Skala | | +| stack | spielt mehrere Patterns parallel | | ## Audio-Effekte -| Name | Beispiele | -| ----- | -------------------------------------------------------------------------------------------------- | -| lpf | ")`} /> | -| vowel | ")`} /> | -| gain | | -| delay | | -| room | | -| pan | | -| speed | ")`} /> | -| range | | +| Name | Beispiele | +| ----- | --------------------------------------------------------------------------------------- | +| lpf | ")`} /> | +| vowel | ")`} /> | +| gain | | +| delay | | +| room | | +| pan | | +| speed | ")`} /> | +| range | | ## Pattern-Effekte -| Name | Beschreibung | Beispiel | -| ---- | --------------------------------- | ---------------------------------------------------------------------------------------------- | -| cpm | Tempo in Cycles pro Minute | | -| fast | schneller | | -| slow | langsamer | | -| rev | rückwärts | | -| jux | einen Stereo-Kanal modifizieren | | -| add | addiert Zahlen oder Noten | ")).scale("C:minor")`} /> | -| ply | jedes Element schneller machen | ")`} /> | -| off | verzögert eine modifizierte Kopie | x.speed(2))`} /> | +| Name | Beschreibung | Beispiel | +| ---- | --------------------------------- | ----------------------------------------------------------------------------------- | +| cpm | Tempo in Cycles pro Minute | | +| fast | schneller | | +| slow | langsamer | | +| rev | rückwärts | | +| jux | einen Stereo-Kanal modifizieren | | +| add | addiert Zahlen oder Noten | ")).scale("C:minor")`} /> | +| ply | jedes Element schneller machen | ")`} /> | +| off | verzögert eine modifizierte Kopie | x.speed(2))`} /> | diff --git a/website/src/pages/examples/index.astro b/website/src/pages/examples/index.astro index d44406898..6b24d9ff8 100644 --- a/website/src/pages/examples/index.astro +++ b/website/src/pages/examples/index.astro @@ -2,7 +2,7 @@ import * as tunes from '../../../src/repl/tunes.mjs'; import HeadCommon from '../../components/HeadCommon.astro'; -import { getMetadata } from '../metadata_parser'; +import { getMetadata } from '../../metadata_parser'; const { BASE_URL } = import.meta.env; const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL; @@ -25,3 +25,4 @@ const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL }
+../../metadata_parser \ No newline at end of file diff --git a/website/src/pages/img/example-[name].png.js b/website/src/pages/img/example-[name].png.js index b058a017f..86d8a5528 100644 --- a/website/src/pages/img/example-[name].png.js +++ b/website/src/pages/img/example-[name].png.js @@ -1,6 +1,6 @@ import { createCanvas } from 'canvas'; -import { pianoroll } from '@strudel.cycles/core'; -import { evaluate } from '@strudel.cycles/transpiler'; +import { pianoroll } from '@strudel/core'; +import { evaluate } from '@strudel/transpiler'; import '../../../../test/runtime.mjs'; import * as tunes from '../../repl/tunes.mjs'; diff --git a/website/src/pages/learn/effects.mdx b/website/src/pages/learn/effects.mdx index a3ae91d79..be4a11840 100644 --- a/website/src/pages/learn/effects.mdx +++ b/website/src/pages/learn/effects.mdx @@ -138,6 +138,60 @@ There is one filter envelope for each filter type and thus one set of envelope f +# Pitch Envelope + +You can also control the pitch with envelopes! +Pitch envelopes can breathe life into static sounds: + +*<2!3 4>") + .scale("/8:pentatonic") + .s("gm_electric_guitar_jazz") + .penv("<.5 0 7 -2>*2").vib("4:.1") + .phaser(2).delay(.25).room(.3) + .size(4).fast(.75)`} +/> + +You also create some lovely chiptune-style sounds: + +/16")).jux(rev) +.chord(">") +.dict('ireal') +.voicing().add(note("<0 1>/8")) +.dec(.1).room(.2) +.segment("<4 [2 8]>") +.penv("<0 <2 -2>>").patt(.02)`} +/> + +Let's break down all pitch envelope controls: + +## pattack + + + +## pdecay + + + +## prelease + + + +## penv + + + +## pcurve + + + +## panchor + + + # Dynamics ## gain diff --git a/website/src/pages/learn/metadata.mdx b/website/src/pages/learn/metadata.mdx index 9ade4447c..e8bb86dfc 100644 --- a/website/src/pages/learn/metadata.mdx +++ b/website/src/pages/learn/metadata.mdx @@ -50,7 +50,7 @@ Available tags are: - `@title`: music title - `@by`: music author(s), separated by comma, eventually followed with a link in `<>` (ex: `@by John Doe `) -- `@license`: music license(s) +- `@license`: music license(s), e.g. CC BY-NC-SA. Unsure? [Choose a creative commons license here](https://creativecommons.org/choose/) - `@details`: some additional information about the music - `@url`: web page(s) related to the music (git repo, soundcloud link, etc.) - `@genre`: music genre(s) (pop, jazz, etc) diff --git a/website/src/pages/recipes/microrhythms.mdx b/website/src/pages/recipes/microrhythms.mdx index 107b56fdf..c032c6da9 100644 --- a/website/src/pages/recipes/microrhythms.mdx +++ b/website/src/pages/recipes/microrhythms.mdx @@ -4,8 +4,6 @@ layout: ../../layouts/MainLayout.astro --- import { MiniRepl } from '../../docs/MiniRepl'; -import { JsDoc } from '../../docs/JsDoc'; -import { samples } from '@strudel.cycles/webaudio'; see https://strudel.cc/?zMEo5kowGrFc diff --git a/website/src/pages/recipes/rhythms.mdx b/website/src/pages/recipes/rhythms.mdx index 08aef82ac..144616c96 100644 --- a/website/src/pages/recipes/rhythms.mdx +++ b/website/src/pages/recipes/rhythms.mdx @@ -4,8 +4,6 @@ layout: ../../layouts/MainLayout.astro --- import { MiniRepl } from '../../docs/MiniRepl'; -import { JsDoc } from '../../docs/JsDoc'; -import { samples } from '@strudel.cycles/webaudio'; Note: diff --git a/website/src/pages/rss.xml.js b/website/src/pages/rss.xml.js new file mode 100644 index 000000000..02ecd7618 --- /dev/null +++ b/website/src/pages/rss.xml.js @@ -0,0 +1,19 @@ +import rss from '@astrojs/rss'; +import { getCollection } from 'astro:content'; + +export async function GET(context) { + const posts = (await getCollection('blog')).filter((p) => !p.data.draft); + const options = { + title: 'Strudel Blog', + description: + 'The Strudel Blog will keep you updated with the latest changes and things happening in the strudelsphere.', + site: context.site, + items: posts.map((post) => ({ + link: `/blog/#${post.slug}`, + title: post.data.title, + pubDate: post.data.date, + description: post.data.description, + })), + }; + return rss(options); +} diff --git a/website/src/pages/swatch/[name].png.js b/website/src/pages/swatch/[name].png.js index aa8aabf3c..c0a52a6be 100644 --- a/website/src/pages/swatch/[name].png.js +++ b/website/src/pages/swatch/[name].png.js @@ -1,10 +1,10 @@ import { createCanvas } from 'canvas'; -import { pianoroll } from '@strudel.cycles/core'; -import { evaluate } from '@strudel.cycles/transpiler'; +import { pianoroll } from '@strudel/core'; +import { evaluate } from '@strudel/transpiler'; import '../../../../test/runtime.mjs'; -import { getMyPatterns } from './list.json'; +import { getMyPatterns } from '../../my_patterns'; -export async function get({ params, request }) { +export async function GET({ params, request }) { const patterns = await getMyPatterns(); const { name } = params; const tune = patterns[name]; @@ -14,10 +14,7 @@ export async function get({ params, request }) { const ctx = canvas.getContext('2d'); pianoroll({ time: 4, haps, ctx, playhead: 1, fold: 1, background: 'transparent', playheadColor: 'transparent' }); const buffer = canvas.toBuffer('image/png'); - return { - body: buffer, - encoding: 'binary', - }; + return new Response(buffer); } export async function getStaticPaths() { const patterns = await getMyPatterns(); diff --git a/website/src/pages/swatch/index.astro b/website/src/pages/swatch/index.astro index 65484856c..5f5754494 100644 --- a/website/src/pages/swatch/index.astro +++ b/website/src/pages/swatch/index.astro @@ -1,5 +1,5 @@ --- -import { getMyPatterns } from './list.json'; +import { getMyPatterns } from '../../my_patterns.js'; import { Content } from '../../../../my-patterns/README.md'; import HeadCommon from '../../components/HeadCommon.astro'; @@ -37,3 +37,4 @@ const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL } +../../list.json diff --git a/website/src/pages/swatch/list.json.js b/website/src/pages/swatch/list.json.js deleted file mode 100644 index 4bf6bb4ae..000000000 --- a/website/src/pages/swatch/list.json.js +++ /dev/null @@ -1,17 +0,0 @@ -import { getMetadata } from '../metadata_parser'; - -export function getMyPatterns() { - const my = import.meta.glob('../../../../my-patterns/**', { as: 'raw', eager: true }); - return Object.fromEntries( - Object.entries(my) - .filter(([name]) => name.endsWith('.txt')) - .map(([name, raw]) => [getMetadata(raw)['title'] || name.split('/').slice(-1), raw]), - ); -} - -export async function get() { - const all = await getMyPatterns(); - return { - body: JSON.stringify(all), - }; -} diff --git a/website/src/pages/technical-manual/packages.mdx b/website/src/pages/technical-manual/packages.mdx index 9c7204d90..d378f781a 100644 --- a/website/src/pages/technical-manual/packages.mdx +++ b/website/src/pages/technical-manual/packages.mdx @@ -16,16 +16,16 @@ The purpose of the multiple packages is to ## Overview -[See the latest published packages on npm](https://www.npmjs.com/search?q=%40strudel.cycles). +[See the latest published packages on npm](https://www.npmjs.com/search?q=%40strudel). Here is an overview of all the packages: ### Essential Packages These package are the most essential. You might want to use all of those if you're using strudel in your project: -- [core](https://github.com/tidalcycles/strudel/tree/main/packages/core#strudelcyclescore): tidal pattern engine with core primitives -- [mini](https://github.com/tidalcycles/strudel/tree/main/packages/mini#strudelcyclesmini): mini notation parser + core bindings -- [transpiler](https://github.com/tidalcycles/strudel/tree/main/packages/transpiler#strudelcyclestranspiler): user code transpiler. syntax sugar + highlighting +- [core](https://github.com/tidalcycles/strudel/tree/main/packages/core#strudelcore): tidal pattern engine with core primitives +- [mini](https://github.com/tidalcycles/strudel/tree/main/packages/mini#strudelmini): mini notation parser + core bindings +- [transpiler](https://github.com/tidalcycles/strudel/tree/main/packages/transpiler#strudeltranspiler): user code transpiler. syntax sugar + highlighting ### Language Extensions @@ -38,23 +38,24 @@ These packages extend the pattern language by specific functions These packages provide bindings for different ways to output strudel patterns: -- [webaudio](https://github.com/tidalcycles/strudel/tree/main/packages/webaudio#strudelcycleswebaudio): the default webaudio output -- [osc](https://github.com/tidalcycles/strudel/tree/main/packages/osc#strudelcyclesosc): bindings to communicate via OSC -- [midi](https://github.com/tidalcycles/strudel/tree/main/packages/midi#strudelcyclesmidi): webmidi bindings -- [csound](https://github.com/tidalcycles/strudel/tree/main/packages/csound#strudelcyclescsound): csound bindings -- [soundfonts](https://github.com/tidalcycles/strudel/tree/main/packages/serial#strudelcyclessoundfonts): Soundfont support -- [serial](https://github.com/tidalcycles/strudel/tree/main/packages/serial#strudelcyclesserial): webserial bindings +- [webaudio](https://github.com/tidalcycles/strudel/tree/main/packages/webaudio#strudelwebaudio): the default webaudio output +- [osc](https://github.com/tidalcycles/strudel/tree/main/packages/osc#strudelosc): bindings to communicate via OSC +- [midi](https://github.com/tidalcycles/strudel/tree/main/packages/midi#strudelmidi): webmidi bindings +- [csound](https://github.com/tidalcycles/strudel/tree/main/packages/csound#strudelcsound): csound bindings +- [soundfonts](https://github.com/tidalcycles/strudel/tree/main/packages/serial#strudelsoundfonts): Soundfont support +- [serial](https://github.com/tidalcycles/strudel/tree/main/packages/serial#strudelserial): webserial bindings ### Others -- [embed](https://github.com/tidalcycles/strudel/tree/main/packages/embed#strudelcyclesembed): embeddable REPL web component -- [react](https://github.com/tidalcycles/strudel/tree/main/packages/react#strudelcyclesreact): react hooks and components for strudel +- [embed](https://github.com/tidalcycles/strudel/tree/main/packages/embed#strudelembed): embeddable REPL web component ### No Longer Maintained +- [react](https://www.npmjs.com/package/@strudel.cycles/react): react hooks and components for strudel - [eval](https://www.npmjs.com/package/@strudel.cycles/eval): old code transpiler - [tone](https://www.npmjs.com/package/@strudel.cycles/tone): bindings for Tone.js instruments and effects - [webdirt](https://www.npmjs.com/package/@strudel.cycles/webdirt): webdirt bindings, replaced by webaudio package +- any `@strudel.cycles/*` packages have been renamed to `@strudel/*` since version 0.10.0. ## Tools diff --git a/website/src/pages/workshop/first-effects.mdx b/website/src/pages/workshop/first-effects.mdx index e3ce54874..48764bce3 100644 --- a/website/src/pages/workshop/first-effects.mdx +++ b/website/src/pages/workshop/first-effects.mdx @@ -17,7 +17,6 @@ We have sounds, we have notes, now let's look at effects! **low-pass filter** /2") .sound("sawtooth").lpf(800)`} @@ -35,7 +34,6 @@ lpf = **l**ow **p**ass **f**ilter **pattern the filter** /2") .sound("sawtooth").lpf("200 1000")`} @@ -53,7 +51,6 @@ We will learn how to automate with waves later... **vowel** /2") .sound("sawtooth").vowel("/2")`} @@ -62,7 +59,6 @@ We will learn how to automate with waves later... **gain** ") .sound("sawtooth").lpf(600) @@ -146,7 +140,6 @@ Can you guess what they do? **adsr short notation** ") .sound("sawtooth").lpf(600) @@ -157,7 +150,6 @@ Can you guess what they do? **delay** ~]") @@ -189,7 +181,6 @@ What happens if you use `.delay(".8:.06:.8")` ? Can you guess what the third num **room aka reverb** ~@16] ~>/2") .scale("D4:minor").sound("gm_accordion:2") @@ -207,7 +198,6 @@ Add a delay too! **little dub tune** ~]") @@ -222,7 +212,6 @@ Add a delay too! Let's add a bass to make this complete: ~]") @@ -246,7 +235,6 @@ Try adding `.hush()` at the end of one of the patterns in the stack... **pan** ").room(.2)`} /> +").room(.2)`} /> **fast and slow** We can use `fast` and `slow` to change the tempo of a pattern outside of Mini-Notation: - + @@ -273,13 +261,13 @@ What happens if you use a pattern like `.fast("<1 [2 4]>")`? By the way, inside Mini-Notation, `fast` is `*` and `slow` is `/`. -")`} /> +")`} /> ## automation with signals Instead of changing values stepwise, we can also control them with signals: - + @@ -295,7 +283,7 @@ The gain is visualized as transparency in the pianoroll. By default, waves oscillate between 0 to 1. We can change that with `range`: - + @@ -306,7 +294,6 @@ What happens if you flip the range values? We can change the automation speed with slow / fast: /2") .sound("sawtooth") @@ -321,15 +308,15 @@ The whole automation will now take 8 cycles to repeat. ## Recap -| name | example | -| ----- | -------------------------------------------------------------------------------------------------- | -| lpf | ")`} /> | -| vowel | ")`} /> | -| gain | | -| delay | | -| room | | -| pan | | -| speed | ")`} /> | -| range | | +| name | example | +| ----- | --------------------------------------------------------------------------------------- | +| lpf | ")`} /> | +| vowel | ")`} /> | +| gain | | +| delay | | +| room | | +| pan | | +| speed | ")`} /> | +| range | | Let us now take a look at some of Tidal's typical [pattern effects](/workshop/pattern-effects). diff --git a/website/src/pages/workshop/first-notes.mdx b/website/src/pages/workshop/first-notes.mdx index ab11ed903..230c8e604 100644 --- a/website/src/pages/workshop/first-notes.mdx +++ b/website/src/pages/workshop/first-notes.mdx @@ -4,7 +4,7 @@ layout: ../../layouts/MainLayout.astro --- import { MiniRepl } from '@src/docs/MiniRepl'; -import { midi2note } from '@strudel.cycles/core/'; +import { midi2note } from '@strudel/core'; import Box from '@components/Box.astro'; import QA from '@components/QA'; @@ -17,7 +17,6 @@ Let's look at how we can play notes **play notes with numbers** + {/* c2 g2, e3 b3 d4 e4 */} @@ -127,7 +122,6 @@ Try out different sounds: **switch between sounds** + @@ -172,7 +165,7 @@ Because it is so common to just play one thing per cycle, you can.. **Play one per cycle with \< \>** -").sound("gm_acoustic_bass")`} punchcard /> +").sound("gm_acoustic_bass")`} punchcard /> @@ -185,7 +178,6 @@ Try adding more notes inside the brackets and notice how it does **not** get fas {/* <[c2 c3]*4 [bb1 bb2]*4 [f2 f3]*4 [eb2 eb3]*4>/2 */} /2") .sound("gm_acoustic_bass")`} @@ -195,7 +187,6 @@ Try adding more notes inside the brackets and notice how it does **not** get fas **Alternate between multiple things** ") .sound("gm_xylophone")`} @@ -205,7 +196,6 @@ Try adding more notes inside the brackets and notice how it does **not** get fas This is also useful for unpitched sounds: , [~ hh]*2") .bank("RolandTR909")`} @@ -217,7 +207,6 @@ This is also useful for unpitched sounds: Finding the right notes can be difficult.. Scales are here to help: ") .scale("C:minor").sound("piano")`} @@ -244,7 +233,6 @@ Try out different scales: Just like anything, we can automate the scale with a pattern: , 2 4 <[6,8] [7,9]>") .scale("/4") @@ -265,7 +253,7 @@ Take your time and you'll find scales you like! **Elongate with @** - + @@ -278,7 +266,6 @@ Try changing that number! **Elongate within sub-sequences** *2") .scale("/4") @@ -296,7 +283,7 @@ This is also sometimes called triplet swing. You'll often find it in blues and j **Replicate** -]").sound("piano")`} punchcard /> +]").sound("piano")`} punchcard /> @@ -310,27 +297,26 @@ What's the difference? Let's recap what we've learned in this chapter: -| Concept | Syntax | Example | -| --------- | ------ | ------------------------------------------------------------------- | -| Slow down | \/ | | -| Alternate | \<\> | ")`} /> | -| Elongate | @ | | -| Replicate | ! | | +| Concept | Syntax | Example | +| --------- | ------ | -------------------------------------------------------- | +| Slow down | \/ | | +| Alternate | \<\> | ")`} /> | +| Elongate | @ | | +| Replicate | ! | | New functions: -| Name | Description | Example | -| ----- | ----------------------------------- | -------------------------------------------------------------------------------------------- | -| note | set pitch as number or letter | | -| scale | interpret `n` as scale degree | | -| stack | play patterns in parallel (read on) | | +| Name | Description | Example | +| ----- | ----------------------------------- | --------------------------------------------------------------------------------- | +| note | set pitch as number or letter | | +| scale | interpret `n` as scale degree | | +| stack | play patterns in parallel (read on) | | ## Examples **Classy Bassline** /2") .sound("gm_synth_bass_1") @@ -340,7 +326,6 @@ New functions: **Classy Melody** , [~ hh]*2") .bank("RolandTR909")`} @@ -369,7 +353,6 @@ It's called `stack` 😙 /2") diff --git a/website/src/pages/workshop/first-sounds.mdx b/website/src/pages/workshop/first-sounds.mdx index 5897f0292..91ae1e5a0 100644 --- a/website/src/pages/workshop/first-sounds.mdx +++ b/website/src/pages/workshop/first-sounds.mdx @@ -15,7 +15,7 @@ This is the first chapter of the Strudel Workshop, nice to have you on board! The workshop is full of interactive code fields. Let's learn how to use those. Here is one: - + @@ -33,7 +33,7 @@ Congratulations, you are now live coding! We have just played a sound with `sound` like this: - + @@ -55,7 +55,7 @@ One Sound can contain multiple samples (audio files). You can select the sample by appending `:` followed by a number to the name: - + @@ -72,7 +72,7 @@ For now we'll stick to this little selection of sounds, but we'll find out how t By default, Strudel comes with a wide selection of drum sounds: - + @@ -90,7 +90,7 @@ Try out different drum sounds! To change the sound character of our drums, we can use `bank` to change the drum machine: - + In this example `RolandTR909` is the name of the drum machine that we're using. It is a famous drum machine for house and techno beats. @@ -115,7 +115,7 @@ There are a lot more, but let's keep it simple for now In the last example, we already saw that you can play multiple sounds in a sequence by separating them with a space: - + Notice how the currently playing sound is highlighted in the code and also visualized below. @@ -127,13 +127,13 @@ Try adding more sounds to the sequence! **The longer the sequence, the faster it runs** - + The content of a sequence will be squished into what's called a cycle. **One way to change the tempo is using `cpm`** - + @@ -147,11 +147,11 @@ We will look at other ways to change the tempo later! **Add a rests in a sequence with '~'** - + **Sub-Sequences with [brackets]** - + @@ -163,15 +163,15 @@ Similar to the whole sequence, the content of a sub-sequence will be squished to **Multiplication: Speed things up** - + **Multiplication: Speed up sequences** - + **Multiplication: Speeeeeeeeed things up** - + @@ -181,7 +181,7 @@ Pitch = really fast rhythm **Sub-Sub-Sequences with [[brackets]]** - + @@ -191,15 +191,15 @@ You can go as deep as you want! **Play sequences in parallel with comma** - + You can use as many commas as you want: - + Commas can also be used inside sub-sequences: - + @@ -212,7 +212,6 @@ It is quite common that there are many ways to express the same idea. **Multiple Lines with backticks** + This is shorter and more readable than: - + ## Recap Now we've learned the basics of the so called Mini-Notation, the rhythm language of Tidal. This is what we've leared so far: -| Concept | Syntax | Example | -| ----------------- | -------- | -------------------------------------------------------------------------------- | -| Sequence | space | | -| Sample Number | :x | | -| Rests | ~ | | -| Sub-Sequences | \[\] | | -| Sub-Sub-Sequences | \[\[\]\] | | -| Speed up | \* | | -| Parallel | , | | +| Concept | Syntax | Example | +| ----------------- | -------- | --------------------------------------------------------------------- | +| Sequence | space | | +| Sample Number | :x | | +| Rests | ~ | | +| Sub-Sequences | \[\] | | +| Sub-Sub-Sequences | \[\[\]\] | | +| Speed up | \* | | +| Parallel | , | | The Mini-Notation is usually used inside some function. These are the functions we've seen so far: -| Name | Description | Example | -| ----- | ----------------------------------- | ---------------------------------------------------------------------------------- | -| sound | plays the sound of the given name | | -| bank | selects the sound bank | | -| cpm | sets the tempo in cycles per minute | | -| n | select sample number | | +| Name | Description | Example | +| ----- | ----------------------------------- | ----------------------------------------------------------------------- | +| sound | plays the sound of the given name | | +| bank | selects the sound bank | | +| cpm | sets the tempo in cycles per minute | | +| n | select sample number | | ## Examples **Basic rock beat** - + **Classic house** - + @@ -273,12 +272,11 @@ Certain drum patterns are reused across genres. We Will Rock you - + **Yellow Magic Orchestra - Firecracker** ],hh*8") - .speed(perlin.range(.8,.9)), // random sample speed variation - // bassline - "" - .off(1/8,x=>x.add(12).degradeBy(.5)) // random octave jumps - .add(perlin.range(0,.5)) // random pitch variation - .superimpose(add(.05)) // add second, slightly detuned voice - .note() // wrap in "note" - .decay(.15).sustain(0) // make each note of equal length - .s('sawtooth') // waveform - .gain(.4) // turn down - .cutoff(sine.slow(7).range(300,5000)), // automate cutoff - // chords - ">".voicings('lefthand') - .superimpose(x=>x.add(.04)) // add second, slightly detuned voice - .add(perlin.range(0,.5)) // random pitch variation - .note() // wrap in "note" - .s('sawtooth') // waveform - .gain(.16) // turn down - .cutoff(500) // fixed cutoff - .attack(1) // slowly fade in -) -.slow(3/2)`} -/> + -To hear more, go to the [Strudel REPL](https://strudel.cc/) and press shuffle to hear a random example pattern. +These examples cannot fully encompass the variety of things you can do, so [check out the showcase](/intro/showcase/) for some videos of how people use Strudel. ## Getting Started diff --git a/website/src/pages/workshop/pattern-effects.mdx b/website/src/pages/workshop/pattern-effects.mdx index 23346ccb7..20a432b1d 100644 --- a/website/src/pages/workshop/pattern-effects.mdx +++ b/website/src/pages/workshop/pattern-effects.mdx @@ -15,16 +15,15 @@ In this chapter, we are going to look at functions that are more unique to tidal **reverse patterns with rev** - + **play pattern left and modify it right with jux** - + This is the same as: + This is like doing >")) .color(">").adsr("[.1 0]:.2:[1 0]") @@ -93,7 +89,6 @@ If you add a number to a note, the note will be treated as if it was a number We can add as often as we like: >").add("0,7")) .color(">").adsr("[.1 0]:.2:[1 0]") @@ -104,7 +99,6 @@ We can add as often as we like: **add with scale** [~ <4 1>]>*2".add("<0 [0,2,4]>/4")) .scale("C5:minor").release(.5) @@ -115,7 +109,6 @@ We can add as often as we like: **time to stack** [~ <4 1>]>*2".add("<0 [0,2,4]>/4")) @@ -132,11 +125,11 @@ We can add as often as we like: **ply** - + this is like writing: - + @@ -147,7 +140,6 @@ Try patterning the `ply` function, for example using `"<1 2 1 3>"` **off** ] <2 3> [~ 1]>" .off(1/8, x=>x.add(4)) @@ -166,16 +158,15 @@ In the notation `x=>x.`, the `x` is the shifted pattern, which where modifying. off is also useful for sounds: x.speed(1.5).gain(.25))`} /> -| name | description | example | -| ---- | ------------------------------ | ---------------------------------------------------------------------------------------------- | -| rev | reverse | | -| jux | split left/right, modify right | | -| add | add numbers / notes | ")).scale("C:minor")`} /> | -| ply | speed up each event n times | ")`} /> | -| off | copy, shift time & modify | x.speed(2))`} /> | +| name | description | example | +| ---- | ------------------------------ | ----------------------------------------------------------------------------------- | +| rev | reverse | | +| jux | split left/right, modify right | | +| add | add numbers / notes | ")).scale("C:minor")`} /> | +| ply | speed up each event n times | ")`} /> | +| off | copy, shift time & modify | x.speed(2))`} /> | diff --git a/website/src/pages/workshop/recap.mdx b/website/src/pages/workshop/recap.mdx index fad14fb4f..9260a8f6a 100644 --- a/website/src/pages/workshop/recap.mdx +++ b/website/src/pages/workshop/recap.mdx @@ -11,58 +11,58 @@ This page is just a listing of all functions covered in the workshop! ## Mini Notation -| Concept | Syntax | Example | -| ----------------- | -------- | -------------------------------------------------------------------------------- | -| Sequence | space | | -| Sample Number | :x | | -| Rests | ~ | | -| Sub-Sequences | \[\] | | -| Sub-Sub-Sequences | \[\[\]\] | | -| Speed up | \* | | -| Parallel | , | | -| Slow down | \/ | | -| Alternate | \<\> | ")`} /> | -| Elongate | @ | | -| Replicate | ! | | +| Concept | Syntax | Example | +| ----------------- | -------- | --------------------------------------------------------------------- | +| Sequence | space | | +| Sample Number | :x | | +| Rests | ~ | | +| Sub-Sequences | \[\] | | +| Sub-Sub-Sequences | \[\[\]\] | | +| Speed up | \* | | +| Parallel | , | | +| Slow down | \/ | | +| Alternate | \<\> | ")`} /> | +| Elongate | @ | | +| Replicate | ! | | ## Sounds -| Name | Description | Example | -| ----- | --------------------------------- | ---------------------------------------------------------------------------------- | -| sound | plays the sound of the given name | | -| bank | selects the sound bank | | -| n | select sample number | | +| Name | Description | Example | +| ----- | --------------------------------- | ----------------------------------------------------------------------- | +| sound | plays the sound of the given name | | +| bank | selects the sound bank | | +| n | select sample number | | ## Notes -| Name | Description | Example | -| --------- | ----------------------------- | -------------------------------------------------------------------------------------------- | -| note | set pitch as number or letter | | -| n + scale | set note in scale | | -| stack | play patterns in parallel | | +| Name | Description | Example | +| --------- | ----------------------------- | --------------------------------------------------------------------------------- | +| note | set pitch as number or letter | | +| n + scale | set note in scale | | +| stack | play patterns in parallel | | ## Audio Effects -| name | example | -| ----- | -------------------------------------------------------------------------------------------------- | -| lpf | ")`} /> | -| vowel | ")`} /> | -| gain | | -| delay | | -| room | | -| pan | | -| speed | ")`} /> | -| range | | +| name | example | +| ----- | --------------------------------------------------------------------------------------- | +| lpf | ")`} /> | +| vowel | ")`} /> | +| gain | | +| delay | | +| room | | +| pan | | +| speed | ")`} /> | +| range | | ## Pattern Effects -| name | description | example | -| ---- | ----------------------------------- | ---------------------------------------------------------------------------------------------- | -| cpm | sets the tempo in cycles per minute | | -| fast | speed up | | -| slow | slow down | | -| rev | reverse | | -| jux | split left/right, modify right | | -| add | add numbers / notes | ")).scale("C:minor")`} /> | -| ply | speed up each event n times | ")`} /> | -| off | copy, shift time & modify | x.speed(2))`} /> | +| name | description | example | +| ---- | ----------------------------------- | ----------------------------------------------------------------------------------- | +| cpm | sets the tempo in cycles per minute | | +| fast | speed up | | +| slow | slow down | | +| rev | reverse | | +| jux | split left/right, modify right | | +| add | add numbers / notes | ")).scale("C:minor")`} /> | +| ply | speed up each event n times | ")`} /> | +| off | copy, shift time & modify | x.speed(2))`} /> | diff --git a/website/src/repl/Repl.jsx b/website/src/repl/Repl.jsx index d53e7e5bd..8651cc26e 100644 --- a/website/src/repl/Repl.jsx +++ b/website/src/repl/Repl.jsx @@ -4,13 +4,14 @@ Copyright (C) 2022 Strudel contributors - see . */ -import { code2hash, getDrawContext, logger, silence } from '@strudel.cycles/core'; +import { code2hash, getDrawContext, logger, silence } from '@strudel/core'; import cx from '@src/cx.mjs'; -import { transpiler } from '@strudel.cycles/transpiler'; -import { getAudioContext, initAudioOnFirstClick, webaudioOutput } from '@strudel.cycles/webaudio'; -import { defaultAudioDeviceName, getAudioDevices, setAudioDevice } from './panel/AudioDeviceSelector'; +import { transpiler } from '@strudel/transpiler'; +import { getAudioContext, initAudioOnFirstClick, webaudioOutput } from '@strudel/webaudio'; +import { defaultAudioDeviceName } from '../settings.mjs'; +import { getAudioDevices, setAudioDevice } from './util.mjs'; import { StrudelMirror, defaultSettings } from '@strudel/codemirror'; -import { createContext, useCallback, useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import { initUserCode, setActivePattern, @@ -24,12 +25,11 @@ import Loader from './Loader'; import { Panel } from './panel/Panel'; import { useStore } from '@nanostores/react'; import { prebake } from './prebake.mjs'; -import { getRandomTune, initCode, loadModules, shareCode } from './util.mjs'; +import { getRandomTune, initCode, loadModules, shareCode, ReplContext } from './util.mjs'; import PlayCircleIcon from '@heroicons/react/20/solid/PlayCircleIcon'; import './Repl.css'; const { code: randomTune, name } = getRandomTune(); -export const ReplContext = createContext(null); const { latestCode } = settingsMap.get(); diff --git a/website/src/repl/files.mjs b/website/src/repl/files.mjs index 3131c8c4e..63ac5f853 100644 --- a/website/src/repl/files.mjs +++ b/website/src/repl/files.mjs @@ -5,7 +5,7 @@ import { onTriggerSample, getAudioContext, loadBuffer, -} from '@strudel.cycles/webaudio'; +} from '@strudel/webaudio'; let TAURI; if (typeof window !== 'undefined') { diff --git a/website/src/repl/idbutils.mjs b/website/src/repl/idbutils.mjs index 7613b767a..40219c9ac 100644 --- a/website/src/repl/idbutils.mjs +++ b/website/src/repl/idbutils.mjs @@ -1,6 +1,6 @@ -import { registerSound, onTriggerSample } from '@strudel.cycles/webaudio'; +import { registerSound, onTriggerSample } from '@strudel/webaudio'; import { isAudioFile } from './files.mjs'; -import { logger } from '@strudel.cycles/core'; +import { logger } from '@strudel/core'; //utilites for writing and reading to the indexdb diff --git a/website/src/repl/panel/AudioDeviceSelector.jsx b/website/src/repl/panel/AudioDeviceSelector.jsx index 98e3e0687..969bf3873 100644 --- a/website/src/repl/panel/AudioDeviceSelector.jsx +++ b/website/src/repl/panel/AudioDeviceSelector.jsx @@ -1,42 +1,8 @@ import React, { useState } from 'react'; -import { getAudioContext, initializeAudioOutput, setDefaultAudioContext } from '@strudel.cycles/webaudio'; +import { getAudioDevices, setAudioDevice } from '../util.mjs'; import { SelectInput } from './SelectInput'; -import { logger } from '@strudel.cycles/core'; const initdevices = new Map(); -export const defaultAudioDeviceName = 'System Standard'; - -export const getAudioDevices = async () => { - await navigator.mediaDevices.getUserMedia({ audio: true }); - let mediaDevices = await navigator.mediaDevices.enumerateDevices(); - mediaDevices = mediaDevices.filter((device) => device.kind === 'audiooutput' && device.deviceId !== 'default'); - const devicesMap = new Map(); - devicesMap.set(defaultAudioDeviceName, ''); - mediaDevices.forEach((device) => { - devicesMap.set(device.label, device.deviceId); - }); - return devicesMap; -}; - -export const setAudioDevice = async (id) => { - let audioCtx = getAudioContext(); - if (audioCtx.sinkId === id) { - return; - } - await audioCtx.suspend(); - await audioCtx.close(); - audioCtx = setDefaultAudioContext(); - await audioCtx.resume(); - const isValidID = (id ?? '').length > 0; - if (isValidID) { - try { - await audioCtx.setSinkId(id); - } catch { - logger('failed to set audio interface', 'warning'); - } - } - initializeAudioOutput(); -}; // Allows the user to select an audio interface for Strudel to play through export function AudioDeviceSelector({ audioDeviceName, onChange, isDisabled }) { diff --git a/website/src/repl/panel/Panel.jsx b/website/src/repl/panel/Panel.jsx index 1c421af24..7d35f0e4b 100644 --- a/website/src/repl/panel/Panel.jsx +++ b/website/src/repl/panel/Panel.jsx @@ -1,5 +1,5 @@ import XMarkIcon from '@heroicons/react/20/solid/XMarkIcon'; -import { logger } from '@strudel.cycles/core'; +import { logger } from '@strudel/core'; import useEvent from '@src/useEvent.mjs'; import cx from '@src/cx.mjs'; import { nanoid } from 'nanoid'; diff --git a/website/src/repl/panel/PatternsTab.jsx b/website/src/repl/panel/PatternsTab.jsx index 4466b5999..cec165c1f 100644 --- a/website/src/repl/panel/PatternsTab.jsx +++ b/website/src/repl/panel/PatternsTab.jsx @@ -1,6 +1,8 @@ import { DocumentDuplicateIcon, PencilSquareIcon, TrashIcon } from '@heroicons/react/20/solid'; import { useMemo } from 'react'; import { + $featuredPatterns, + $publicPatterns, clearUserPatterns, deleteActivePattern, duplicateActivePattern, @@ -14,6 +16,8 @@ import { useSettings, } from '../../settings.mjs'; import * as tunes from '../tunes.mjs'; +import { useStore } from '@nanostores/react'; +import { getMetadata } from '../../metadata_parser'; function classNames(...classes) { return classes.filter(Boolean).join(' '); @@ -22,6 +26,8 @@ function classNames(...classes) { export function PatternsTab({ context }) { const { userPatterns } = useSettings(); const activePattern = useActivePattern(); + const featuredPatterns = useStore($featuredPatterns); + const publicPatterns = useStore($publicPatterns); const isExample = useMemo(() => activePattern && !!tunes[activePattern], [activePattern]); return (
@@ -94,8 +100,52 @@ export function PatternsTab({ context }) {
+ {featuredPatterns && ( +
+

Featured Patterns

+
+
+ )} + {publicPatterns && ( +
+

Last Creations

+ +
+ )}
-

Examples

+

Stock Examples

{Object.entries(tunes).map(([key, tune]) => ( ); } + +export function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) { + const meta = useMemo(() => getMetadata(pattern.code), [pattern]); + return ( + <> + {pattern.id}. {meta.title || pattern.hash} by {Array.isArray(meta.by) ? meta.by.join(',') : 'Anonymous'} + + ); +} diff --git a/website/src/repl/panel/SoundsTab.jsx b/website/src/repl/panel/SoundsTab.jsx index a3639dfb2..d4b52ee58 100644 --- a/website/src/repl/panel/SoundsTab.jsx +++ b/website/src/repl/panel/SoundsTab.jsx @@ -1,6 +1,6 @@ import useEvent from '@src/useEvent.mjs'; import { useStore } from '@nanostores/react'; -import { getAudioContext, soundMap, connectToDestination } from '@strudel.cycles/webaudio'; +import { getAudioContext, soundMap, connectToDestination } from '@strudel/webaudio'; import React, { useMemo, useRef } from 'react'; import { settingsMap, useSettings } from '../../settings.mjs'; import { ButtonGroup } from './Forms.jsx'; @@ -57,32 +57,36 @@ export function SoundsTab() { settingsMap.setKey('soundsFilter', 'user')} />
- {soundEntries.map(([name, { data, onTrigger }]) => ( - { - const ctx = getAudioContext(); - const params = { - note: ['synth', 'soundfont'].includes(data.type) ? 'a3' : undefined, - s: name, - clip: 1, - release: 0.5, - }; - const time = ctx.currentTime + 0.05; - const onended = () => trigRef.current?.node?.disconnect(); - trigRef.current = Promise.resolve(onTrigger(time, params, onended)); - trigRef.current.then((ref) => { - connectToDestination(ref?.node); - }); - }} - > - {' '} - {name} - {data?.type === 'sample' ? `(${getSamples(data.samples)})` : ''} - {data?.type === 'soundfont' ? `(${data.fonts.length})` : ''} - - ))} + {soundEntries.map(([name, { data, onTrigger }]) => { + return ( + { + const ctx = getAudioContext(); + const params = { + note: ['synth', 'soundfont'].includes(data.type) ? 'a3' : undefined, + s: name, + clip: 1, + release: 0.5, + sustain: 1, + duration: 0.5, + }; + const time = ctx.currentTime + 0.05; + const onended = () => trigRef.current?.node?.disconnect(); + trigRef.current = Promise.resolve(onTrigger(time, params, onended)); + trigRef.current.then((ref) => { + connectToDestination(ref?.node); + }); + }} + > + {' '} + {name} + {data?.type === 'sample' ? `(${getSamples(data.samples)})` : ''} + {data?.type === 'soundfont' ? `(${data.fonts.length})` : ''} + + ); + })} {!soundEntries.length ? 'No custom sounds loaded in this pattern (yet).' : ''}
diff --git a/website/src/repl/piano.mjs b/website/src/repl/piano.mjs index bb849b208..3b02fd0b4 100644 --- a/website/src/repl/piano.mjs +++ b/website/src/repl/piano.mjs @@ -1,4 +1,4 @@ -import { Pattern, noteToMidi, valueToMidi } from '@strudel.cycles/core'; +import { Pattern, noteToMidi, valueToMidi } from '@strudel/core'; const maxPan = noteToMidi('C8'); const panwidth = (pan, width) => pan * width + (1 - width) / 2; diff --git a/website/src/repl/prebake.mjs b/website/src/repl/prebake.mjs index 96a484e75..2ce3a1949 100644 --- a/website/src/repl/prebake.mjs +++ b/website/src/repl/prebake.mjs @@ -1,5 +1,5 @@ -import { Pattern, noteToMidi, valueToMidi } from '@strudel.cycles/core'; -import { registerSynthSounds, registerZZFXSounds, samples } from '@strudel.cycles/webaudio'; +import { Pattern, noteToMidi, valueToMidi } from '@strudel/core'; +import { registerSynthSounds, registerZZFXSounds, samples } from '@strudel/webaudio'; import { registerSamplesFromDB } from './idbutils.mjs'; import './piano.mjs'; import './files.mjs'; @@ -15,10 +15,10 @@ export async function prebake() { registerZZFXSounds(), registerSamplesFromDB(), //registerSoundfonts(), - // need dynamic import here, because importing @strudel.cycles/soundfonts fails on server: - // => getting "window is not defined", as soon as "@strudel.cycles/soundfonts" is imported statically + // need dynamic import here, because importing @strudel/soundfonts fails on server: + // => getting "window is not defined", as soon as "@strudel/soundfonts" is imported statically // seems to be a problem with soundfont2 - import('@strudel.cycles/soundfonts').then(({ registerSoundfonts }) => registerSoundfonts()), + import('@strudel/soundfonts').then(({ registerSoundfonts }) => registerSoundfonts()), samples(`${baseNoTrailing}/piano.json`, `${baseNoTrailing}/piano/`, { prebake: true }), // https://github.com/sgossner/VCSL/ // https://api.github.com/repositories/126427031/contents/ diff --git a/website/src/repl/util.mjs b/website/src/repl/util.mjs index 2b93b619f..3a6758f6a 100644 --- a/website/src/repl/util.mjs +++ b/website/src/repl/util.mjs @@ -1,18 +1,45 @@ -import { controls, evalScope, hash2code, logger } from '@strudel.cycles/core'; -import { settingPatterns } from '../settings.mjs'; +import { controls, evalScope, hash2code, logger } from '@strudel/core'; +import { settingPatterns, defaultAudioDeviceName } from '../settings.mjs'; +import { getAudioContext, initializeAudioOutput, setDefaultAudioContext } from '@strudel/webaudio'; + import { isTauri } from '../tauri.mjs'; import './Repl.css'; import * as tunes from './tunes.mjs'; import { createClient } from '@supabase/supabase-js'; import { nanoid } from 'nanoid'; import { writeText } from '@tauri-apps/api/clipboard'; +import { createContext } from 'react'; +import { $publicPatterns, $featuredPatterns } from '../settings.mjs'; // Create a single supabase client for interacting with your database -const supabase = createClient( +export const supabase = createClient( 'https://pidxdsxphlhzjnzmifth.supabase.co', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBpZHhkc3hwaGxoempuem1pZnRoIiwicm9sZSI6ImFub24iLCJpYXQiOjE2NTYyMzA1NTYsImV4cCI6MTk3MTgwNjU1Nn0.bqlw7802fsWRnqU5BLYtmXk_k-D1VFmbkHMywWc15NM', ); +export function loadPublicPatterns() { + return supabase.from('code').select().eq('public', true).limit(20).order('id', { ascending: false }); +} + +export function loadFeaturedPatterns() { + return supabase.from('code').select().eq('featured', true).limit(20).order('id', { ascending: false }); +} + +async function loadDBPatterns() { + try { + const { data: publicPatterns } = await loadPublicPatterns(); + const { data: featuredPatterns } = await loadFeaturedPatterns(); + $publicPatterns.set(publicPatterns); + $featuredPatterns.set(featuredPatterns); + } catch (err) { + console.error('error loading patterns'); + } +} + +if (typeof window !== 'undefined') { + loadDBPatterns(); +} + export async function initCode() { // load code from url hash (either short hash from database or decode long hash) try { @@ -52,16 +79,16 @@ export function getRandomTune() { export function loadModules() { let modules = [ - import('@strudel.cycles/core'), - import('@strudel.cycles/tonal'), - import('@strudel.cycles/mini'), - import('@strudel.cycles/xen'), - import('@strudel.cycles/webaudio'), + import('@strudel/core'), + import('@strudel/tonal'), + import('@strudel/mini'), + import('@strudel/xen'), + import('@strudel/webaudio'), import('@strudel/codemirror'), import('@strudel/hydra'), - import('@strudel.cycles/serial'), - import('@strudel.cycles/soundfonts'), - import('@strudel.cycles/csound'), + import('@strudel/serial'), + import('@strudel/soundfonts'), + import('@strudel/csound'), ]; if (isTauri()) { modules = modules.concat([ @@ -70,7 +97,7 @@ export function loadModules() { import('@strudel/desktopbridge/oscbridge.mjs'), ]); } else { - modules = modules.concat([import('@strudel.cycles/midi'), import('@strudel.cycles/osc')]); + modules = modules.concat([import('@strudel/midi'), import('@strudel/osc')]); } return evalScope( @@ -87,10 +114,13 @@ export async function shareCode(codeToShare) { logger(`Link already generated!`, 'error'); return; } + const isPublic = confirm( + 'Do you want your pattern to be public? If no, press cancel and you will get just a private link.', + ); // generate uuid in the browser const hash = nanoid(12); const shareUrl = window.location.origin + window.location.pathname + '?' + hash; - const { data, error } = await supabase.from('code').insert([{ code: codeToShare, hash }]); + const { error } = await supabase.from('code').insert([{ code: codeToShare, hash, ['public']: isPublic }]); if (!error) { lastShared = codeToShare; // copy shareUrl to clipboard @@ -110,3 +140,37 @@ export async function shareCode(codeToShare) { logger(message); } } + +export const ReplContext = createContext(null); + +export const getAudioDevices = async () => { + await navigator.mediaDevices.getUserMedia({ audio: true }); + let mediaDevices = await navigator.mediaDevices.enumerateDevices(); + mediaDevices = mediaDevices.filter((device) => device.kind === 'audiooutput' && device.deviceId !== 'default'); + const devicesMap = new Map(); + devicesMap.set(defaultAudioDeviceName, ''); + mediaDevices.forEach((device) => { + devicesMap.set(device.label, device.deviceId); + }); + return devicesMap; +}; + +export const setAudioDevice = async (id) => { + let audioCtx = getAudioContext(); + if (audioCtx.sinkId === id) { + return; + } + await audioCtx.suspend(); + await audioCtx.close(); + audioCtx = setDefaultAudioContext(); + await audioCtx.resume(); + const isValidID = (id ?? '').length > 0; + if (isValidID) { + try { + await audioCtx.setSinkId(id); + } catch { + logger('failed to set audio interface', 'warning'); + } + } + initializeAudioOutput(); +}; diff --git a/website/src/settings.mjs b/website/src/settings.mjs index c74136363..2b00c812d 100644 --- a/website/src/settings.mjs +++ b/website/src/settings.mjs @@ -1,9 +1,14 @@ +import { atom } from 'nanostores'; import { persistentMap, persistentAtom } from '@nanostores/persistent'; import { useStore } from '@nanostores/react'; -import { register } from '@strudel.cycles/core'; +import { register } from '@strudel/core'; import * as tunes from './repl/tunes.mjs'; -import { defaultAudioDeviceName } from './repl/panel/AudioDeviceSelector'; -import { logger } from '@strudel.cycles/core'; +import { logger } from '@strudel/core'; + +export let $publicPatterns = atom([]); +export let $featuredPatterns = atom([]); + +export const defaultAudioDeviceName = 'System Standard'; export const defaultSettings = { activeFooter: 'intro', @@ -171,11 +176,25 @@ export function updateUserCode(code) { setActivePattern(example); return; } + const publicPattern = $publicPatterns.get().find((pat) => pat.code === code); + if (publicPattern) { + setActivePattern(publicPattern.hash); + return; + } + const featuredPattern = $featuredPatterns.get().find((pat) => pat.code === code); + if (featuredPattern) { + setActivePattern(featuredPattern.hash); + return; + } if (!activePattern) { // create new user pattern activePattern = newUserPattern(); setActivePattern(activePattern); - } else if (!!tunes[activePattern] && code !== tunes[activePattern]) { + } else if ( + (!!tunes[activePattern] && code !== tunes[activePattern]) || // fork example tune? + $publicPatterns.get().find((p) => p.hash === activePattern) || // fork public pattern? + $featuredPatterns.get().find((p) => p.hash === activePattern) // fork featured pattern? + ) { // fork example activePattern = getNextCloneName(activePattern); setActivePattern(activePattern);