Compare commits

..

2040 Commits

Author SHA1 Message Date
Felix Roos 1829d8cadf Publish
- @strudel/codemirror@1.0.0
 - @strudel/core@1.0.0
 - @strudel/csound@1.0.0
 - @strudel/embed@1.0.0
 - @strudel/hydra@1.0.0
 - @strudel/midi@1.0.0
 - @strudel/mini@1.0.0
 - @strudel/osc@1.0.0
 - @strudel/repl@1.0.0
 - @strudel/serial@1.0.0
 - @strudel/soundfonts@1.0.0
 - superdough@1.0.0
 - @strudel/tonal@1.0.0
 - @strudel/transpiler@1.0.0
 - @strudel/web@1.0.0
 - @strudel/webaudio@1.0.0
 - @strudel/xen@1.0.0
2024-01-22 22:46:35 +01:00
Felix Roos 02efc090ef hotfix: examples were still 1 cps based 2024-01-22 20:46:10 +01:00
Felix Roos b184348f55 hotfix: youtube embed styles were lost on prod 2024-01-22 20:38:34 +01:00
Felix Roos 06743cb072 Merge pull request #929 from tidalcycles/2-years
2 years blog post
2024-01-22 20:20:52 +01:00
Felix Roos 6fa66fb1d0 finish year 2 post 2024-01-22 20:19:01 +01:00
Felix Roos 23c0ab9648 offset blog post anchor links 2024-01-22 20:18:51 +01:00
Alex McLean 6422047cff make 0.5hz cps the default (#931)
* 0.5 default cps

* 1 -> 0.5 cps defaults

* start moving examples to 2Hz

* more 2Hz doc edits

* small tweaks

* format

* adapt cycles page

* adapt pitch page

* tonal page

* accumulation

* synth page

* adapt conditional-modifiers

* audio effects page

* adapt signals doc

* fix: errors for signals

* adapt signals page

* start time modifiers

* adapt time modifiers

* adapt factories

* hydra + pattern intro

* adapt mini notation page

* start recipes

* adapt recipes page

* use code_v1 table

* delete old dbdump + add new csv based tool

* fix: tests

* fix: cpm

* shuffle featured patterns

* fix: snapshot

---------

Co-authored-by: Felix Roos <flix91@gmail.com>
2024-01-22 19:02:34 +00:00
Jade (Rose) Rowland 46c2c72637 Merge pull request #934 from daslyfe/patterntab_fix
Fix pattern tab not showing patterns without created date
2024-01-21 18:52:01 -05:00
Jade (Rose) Rowland c088590244 remove console statement 2024-01-21 18:51:06 -05:00
Jade (Rose) Rowland 192ba69682 fixed if statement 2024-01-21 18:49:06 -05:00
Jade (Rose) Rowland 2cc428e968 Merge pull request #897 from daslyfe/pattern_selection
Add useful pattern selection behavior for performing.
2024-01-21 14:46:27 -05:00
Jade (Rose) Rowland 15c451a6d9 default pattern filtername 2024-01-21 14:35:17 -05:00
Jade (Rose) Rowland b46e8c07be reset/autoplay when window PARENT does not exist or does not contain oodles 2024-01-21 12:44:14 -05:00
Jade (Rose) Rowland 961e931c31 autoplay and reset cps on default 2024-01-21 12:12:33 -05:00
Jade (Rose) Rowland b1d49552ae title order 2024-01-21 11:27:48 -05:00
Jade (Rose) Rowland d31d154841 fix oven imports 2024-01-21 11:24:58 -05:00
Jade (Rose) Rowland d03892bbcf Merge branch 'tidalcycles:main' into pattern_selection 2024-01-21 11:19:06 -05:00
Felix Roos 0cf0c1c585 Merge pull request #933 from tidalcycles/refactor-cps-functions
Refactor cps functions
2024-01-21 01:30:27 +01:00
Felix Roos 0695b4bee9 clean + comment 2024-01-21 01:29:31 +01:00
Felix Roos 0cfec3a7bd show repls in community bakery 2024-01-21 01:21:21 +01:00
Felix Roos 6224cd40d4 mini repl max height option 2024-01-21 01:21:13 +01:00
Felix Roos 18ae82174d fix: "can't redefine non-configurable property" 2024-01-21 01:13:32 +01:00
Felix Roos aa1b9d11dc inject scheduler into Pattern methods right before eval 2024-01-21 00:59:31 +01:00
Felix Roos 0a82471112 implement loopAt with pat state 2024-01-21 00:45:40 +01:00
Felix Roos 8052e10f0c implement fit with pat state 2024-01-21 00:39:26 +01:00
Jade (Rose) Rowland 1146f6ba52 fix annoying div 2024-01-20 18:14:42 -05:00
Alex McLean 738cea0025 Make splice cps-aware (#932)
* make splice cps-aware

* format

* copypaste fix
2024-01-20 22:47:31 +00:00
Jade (Rose) Rowland 6c28398d20 fix scroll 2024-01-20 14:25:42 -05:00
Jade (Rose) Rowland 4fe75143d0 cleanup 2024-01-20 14:10:46 -05:00
Jade (Rose) Rowland 3cd59cdea5 cleaning up 2024-01-20 14:02:48 -05:00
Jade (Rose) Rowland 9dca7eb878 add pattern filter behaves like sounds tab 2024-01-20 13:59:32 -05:00
Jade (Rose) Rowland b45fd5ce3a fix invalid date 2024-01-20 13:00:33 -05:00
Felix Roos 229b1470f7 fix: localhost links 2024-01-20 10:59:34 +01:00
Jade (Rose) Rowland 0a349e1707 avoid json errors in firefox 2024-01-19 23:04:41 -05:00
Felix Roos d176e9ccf0 add stats 2024-01-19 21:51:52 +01:00
Felix Roos 710c3acb5d more writing 2024-01-19 21:21:33 +01:00
Felix Roos a7f5d0e0c1 Merge pull request #923 from tidalcycles/feed
community bakery
2024-01-19 18:50:57 +01:00
Felix Roos 9928526dda Merge pull request #924 from geikha/main
add pickF and pickmodF
2024-01-19 18:49:53 +01:00
Renzo Torr- 2f8111be0e update the .snap file 2024-01-19 14:47:03 -03:00
Renzo Torr- 68113937ff code format 2024-01-19 14:06:24 -03:00
Felix Roos c598fa026b write more 2024-01-19 15:49:16 +01:00
Alex McLean 491c99c348 Mini-notation additions towards tidal compatibility (#926)
- `.` feet now work, e.g. `"a b c . d e . f"` is the same as `"[a b c] [d e] [f]"`
- `_` elongation now works, e.g. `"a _ _ b"` is the same as `"a@3 b"` (`"a @ @ b"` also works, like in tidal)
- standalone `!` now works, e.g. `"a ! ! b"` is the same as `"a!3 b"`

Reworks #47 and #49
Ref #30
2024-01-19 14:10:47 +00:00
Felix Roos d49aa8242a begin 2 year post 2024-01-19 13:50:28 +01:00
Renzo Torr- 9ffbc06cf9 add pickF and pickmodF
allows to pick functions via a pattern of numbers, to apply to another pattern
2024-01-19 02:45:54 -03:00
Jade (Rose) Rowland af52ac30ba prettier 2024-01-19 00:28:55 -05:00
Jade (Rose) Rowland 7aea1b5fc8 fixed imports 2024-01-19 00:27:09 -05:00
Jade (Rose) Rowland 500ddf3946 Merge branch 'main' into pattern_selection 2024-01-19 00:23:06 -05:00
Jade (Rose) Rowland 3431eaf309 cleaning up 2024-01-19 00:20:10 -05:00
Jade (Rose) Rowland 9a13c58583 cleaning up 2024-01-19 00:14:08 -05:00
Jade (Rose) Rowland 77a48e8351 persistent pattern data 2024-01-18 22:30:53 -05:00
Jade (Rose) Rowland 6cb156d876 cleaning up 2024-01-18 20:01:54 -05:00
Felix Roos d8677c6261 hotfix: rss links 2024-01-18 23:40:22 +01:00
Felix Roos 6ef9ca18e9 Merge pull request #919 from tidalcycles/blog-improvements
Blog improvements
2024-01-18 23:34:10 +01:00
Felix Roos 6667738dc9 more rename 2024-01-18 21:34:20 +01:00
Felix Roos 4f7415b0ec rename 2024-01-18 21:31:21 +01:00
Felix Roos c6f3a8b7c7 more text 2024-01-18 18:30:57 +01:00
Felix Roos 4229d673c9 basic community oven 2024-01-18 18:21:56 +01:00
Alex McLean 98b7859605 pick, pickmod, inhabit, inhabitmod (#921)
* the args for `pick` are now reversed as standard (old behaviour still supported to avoid breaking change)
* `pick` is also now a pattern method
* `pick` now also accepts a lookup table for pick-by-name as an alternative to pick-by-index from a list
* `inhabit` added with same behaviour as `pick`, except cycles from source patterns are squeezed into events of inhabited patterns
* Also some general doc tidying, sorry for the noise..
* There is also `pickmod` and `inhabitmod`, for wrapping indexes around rather than clamping them
2024-01-18 17:08:29 +00:00
Alex McLean a8db707440 Revert "pick now accepts lookup tables, with alternate cycle squeezing behaviour as new inhabit function" (#920) 2024-01-18 17:04:26 +00:00
Alex McLean 873a412179 pick now accepts lookup tables, with alternate cycle squeezing behaviour as new inhabit function (#918)
- the args for `pick` are now reversed (breaking change!)
- `pick` is also now a method on the inhabited pattern
- `pick` now also accepts a lookup table
- `inhabit` added with same behaviour as `pick`, except cycles from source patterns are squeezed into events of inhabited patterns
- Also some general doc tidying, sorry for the noise..
- There is now also `pickmod` and `inhabitmod`, for wrapping indexes around rather than clamping them
2024-01-18 16:45:39 +00:00
Felix Roos 0778b4809e format 2024-01-18 13:47:34 +01:00
Felix Roos f85fb35c66 minirepl multi tune support + add other getting-started examples (more to come) 2024-01-18 13:46:35 +01:00
Felix Roos 5ada0daf40 add rss link to top + fix typo 2024-01-18 13:01:06 +01:00
Felix Roos 2ed5f5aa65 blog style fixes 2024-01-18 12:50:35 +01:00
Felix Roos ae5e6e3ab8 add rss.xml 2024-01-18 12:49:22 +01:00
Felix Roos 9ba7b9b4d4 Merge pull request #917 from tidalcycles/deprecate-old-package-names
rename @strudel.cycles/* packages to @strudel/*
2024-01-18 10:30:08 +01:00
Felix Roos a45f1fba45 update versions in example html files 2024-01-18 10:25:24 +01:00
Felix Roos e6b47d2cf2 fix link 2024-01-18 10:04:53 +01:00
Felix Roos b04a262433 Publish
- @strudel/codemirror@0.11.0
 - @strudel/core@0.11.0
 - @strudel/csound@0.11.0
 - @strudel/embed@0.11.0
 - @strudel/hydra@0.11.0
 - @strudel/midi@0.11.0
 - @strudel/mini@0.11.0
 - @strudel/osc@0.11.0
 - @strudel/repl@0.11.0
 - @strudel/serial@0.11.0
 - @strudel/soundfonts@0.11.0
 - @strudel/tonal@0.11.0
 - @strudel/transpiler@0.11.0
 - @strudel/web@0.11.0
 - @strudel/webaudio@0.11.0
 - @strudel/xen@0.11.0
2024-01-18 09:59:57 +01:00
Felix Roos 96bafa7f0b the big rename: @strudel.cycles/* -> @strudel/* 2024-01-18 09:54:37 +01:00
Felix Roos b10612da5c Publish
- @strudel/codemirror@0.10.0
 - @strudel.cycles/core@0.10.0
 - @strudel.cycles/csound@0.10.0
 - @strudel.cycles/embed@0.10.0
 - @strudel/hydra@0.10.0
 - @strudel.cycles/midi@0.10.0
 - @strudel.cycles/mini@0.10.0
 - @strudel.cycles/osc@0.10.0
 - @strudel/repl@0.10.0
 - @strudel.cycles/serial@0.10.0
 - @strudel.cycles/soundfonts@0.10.0
 - superdough@0.10.0
 - @strudel.cycles/tonal@0.10.0
 - @strudel.cycles/transpiler@0.10.0
 - @strudel/web@0.10.0
 - @strudel.cycles/webaudio@0.10.0
 - @strudel.cycles/xen@0.10.0
2024-01-18 09:35:20 +01:00
Felix Roos 171f4206a8 Merge branch 'main' into deprecate-old-package-names 2024-01-18 09:33:16 +01:00
Felix Roos bd83d19197 Merge pull request #913 from tidalcycles/pitch-envelopes
pitch envelope
2024-01-18 06:54:33 +01:00
Felix Roos 95cf201c6d fix: heading 2024-01-18 06:49:09 +01:00
Felix Roos 4107711dae snapshot 2024-01-18 06:48:21 +01:00
Felix Roos 67f0758cb5 document pitch envelope 2024-01-18 06:47:54 +01:00
Felix Roos 1c99944a32 pitch envelope now also works when setting one of the controls (penv not needed) 2024-01-18 06:47:44 +01:00
Felix Roos d3ea4959b4 - more flexible pitch envelopes
- fix: exponential envelopes could break due to 0 values
2024-01-18 06:47:12 +01:00
Felix Roos 70b27fbff2 Merge pull request #916 from oscarbyrne/fix-swatch-static-paths
Fix: swatch/[name].png.js static path
2024-01-18 05:09:38 +01:00
Oscar Byrne 96c2144857 Use astro Response class for swatch/[name].png.js endpoint 2024-01-17 17:09:11 -08:00
Felix Roos 0655af4d4f add pcurve 2024-01-17 17:35:35 +01:00
Jade (Rose) Rowland 7adfe6f2df fixing edge cases... 2024-01-17 09:45:00 -05:00
Felix Roos 3fc0fdbe62 remove todo 2024-01-16 17:57:52 +01:00
Felix Roos fd73571744 make sure the sustained pitch is the selected note 2024-01-16 17:56:38 +01:00
Felix Roos 80d861c12c Merge pull request #907 from fnordomat/more-vowels
Add more vowel qualities for the vowels function
2024-01-16 08:22:27 +01:00
Jade (Rose) Rowland 45df7bfea3 making things consistent 2024-01-16 00:45:00 -05:00
Jade (Rose) Rowland 106772e480 Merge branch 'main' into pattern_selection 2024-01-15 18:37:18 -05:00
Felix Roos 3506de8d1a vibrato for soundfonts
+ add getVibratoOscillator helper
2024-01-16 00:07:56 +01:00
Felix Roos 32456d6966 pitch envelope for sampler and soundfonts
+ added getPitchEnvelope helper
2024-01-15 23:55:49 +01:00
Felix Roos bdc2af9733 basic pitch envelope 2024-01-15 23:25:22 +01:00
Felix Roos a7daf41934 Merge pull request #911 from tidalcycles/blog
adds a blog
2024-01-14 23:56:36 +01:00
Felix Roos fe6ff2528a Merge pull request #894 from rjulian/feat/add-header-workshop
Remove hideHeader for better mobile UI and consistency
2024-01-14 23:52:41 +01:00
Felix Roos 7ceb8708b0 fix: do not format autogenerated file 2024-01-14 23:47:50 +01:00
Felix Roos 4d22d957a1 add more videos to showcase 2024-01-14 23:45:39 +01:00
Felix Roos 79f1a863b6 add date + author to posts + dedupe headings 2024-01-14 23:39:03 +01:00
Felix Roos 98db3d37ef add anchor links 2024-01-14 23:30:26 +01:00
Felix Roos c02976782b add video component 2024-01-14 23:22:10 +01:00
Felix Roos ceb4376eb8 format autogenerated types 2024-01-14 23:16:44 +01:00
Felix Roos 0566b7bcb3 basic blog with release notes 2024-01-14 23:16:09 +01:00
Jade (Rose) Rowland 6d0ecb9f5e Merge pull request #868 from daslyfe/envelope_improvements
Further Envelope improvements
2024-01-14 16:43:06 -05:00
Felix Roos 0901948564 fanchor default to 0.5 for now 2024-01-14 21:32:38 +01:00
Felix Roos e6d028fd6b soundfont mixing 2024-01-14 16:27:11 +01:00
Alex McLean 945e7082cd Update metadata.mdx 2024-01-14 10:15:40 +00:00
Alex McLean 0d6bdfb514 Link to creative commons chooser 2024-01-14 10:14:43 +00:00
fnordomat 70712bdab6 fix codeformat 2024-01-14 10:19:49 +01:00
Felix Roos 53771d7f95 hotfix: avoid crash for anonymous patterns 2024-01-14 01:50:48 +01:00
Felix Roos 6d32d4024d hotfix: fix built version loading at runtime.. 2024-01-14 01:08:01 +01:00
Felix Roos f387589342 hotfix: fix build error 2024-01-14 00:53:43 +01:00
Felix Roos 47a5080352 Merge pull request #910 from tidalcycles/browse
public sharing
2024-01-14 00:48:03 +01:00
Felix Roos e7e60d3ed8 Merge branch 'main' into pattern_selection 2024-01-14 00:18:57 +01:00
Felix Roos 5314c83534 delete browse page for now 2024-01-14 00:02:27 +01:00
Felix Roos 204c964050 integrate public patterns into patterns tab 2024-01-13 23:53:46 +01:00
Felix Roos 1ede99f71e ask for public sharing (very cheap) + order browse list 2024-01-13 23:12:22 +01:00
Felix Roos 3c1844046a basic browse page 2024-01-13 23:01:16 +01:00
Felix Roos eefa90a2bc fix: synth default envelope 2024-01-13 22:24:59 +01:00
fnordomat efa0737660 added some aliases for the vowels (cosmetics) 2024-01-13 15:11:30 +01:00
fnordomat 6232560273 document extra vowels in quick reference 2024-01-13 11:11:31 +01:00
fnordomat e051d383a0 add 10 new vowel qualities to formant table 2024-01-13 11:11:31 +01:00
Felix Roos 4fb5c1828d i have no clue why this works 2024-01-13 01:16:26 +01:00
Felix Roos 6f3b2fa66b negative fenv values now stay in the same range as positives 2024-01-13 00:26:16 +01:00
Felix Roos f17459fdc3 Merge branch 'main' into envelope_improvements 2024-01-12 19:41:05 +01:00
Felix Roos a053f40e59 Merge pull request #902 from tidalcycles/build-warnings
fix some build warnings
2024-01-12 18:31:41 +01:00
Felix Roos 9a0459fdd3 move non pages out of pages dir 2024-01-12 18:16:57 +01:00
Felix Roos 46a859736a Merge pull request #891 from daslyfe/remove_jsx_exports_for_vite
prevent vite from complaining about additional exports in jsx files
2024-01-12 18:01:55 +01:00
Felix Roos e4524a2be9 Merge pull request #892 from daslyfe/update_vite
Update Vite version so hot reload works properly with newest pnpm version
2024-01-12 17:05:46 +01:00
Felix Roos f3ee1cc947 Merge pull request #886 from tidalcycles/polymeter-slowcat
support , in < >
2024-01-12 15:09:40 +01:00
Felix Roos 86bc28dfb3 add deprecation notes 2024-01-11 20:46:22 +01:00
Felix Roos 1bc0934228 Merge branch 'main' into envelope_improvements 2024-01-10 15:15:22 +01:00
Felix Roos f26fd18c7a use 0.001 as linear mintime as well (to prevent cracks) 2024-01-10 15:02:10 +01:00
Felix Roos c68dba8c21 fix: use end 2024-01-10 14:28:38 +01:00
Felix Roos f768e1eece Merge pull request #898 from tidalcycles/fix-autocomplete
fix: autocomplete / tooltip code example bug
2024-01-10 13:55:39 +01:00
Felix Roos f99557cc05 fix: fanchor + default fanchor to 0 (breaking change) 2024-01-10 00:08:49 +01:00
Felix Roos f785823e00 add fenv to filter cutoff controls 2024-01-10 00:08:13 +01:00
Felix Roos 62cd2263c2 add silent flag to nanFallback 2024-01-10 00:03:18 +01:00
Felix Roos 7157634db0 fix: autocomplete / tooltip code example bug 2024-01-09 22:34:16 +01:00
Jade (Rose) Rowland 78f6fdf169 reset for example patterns 2024-01-08 10:49:26 -05:00
Jade (Rose) Rowland e01c6dc18d prettier 2024-01-08 00:25:58 -05:00
Jade (Rose) Rowland 51dd408733 all working 2024-01-08 00:15:07 -05:00
Jade (Rose) Rowland 1ff7548b52 refactoring 2024-01-07 22:48:07 -05:00
Jade (Rose) Rowland f7fe44063a handle deletion cases 2024-01-07 00:58:03 -05:00
Jade (Rose) Rowland 0355c358b8 fixed create and duplicate behavior 2024-01-06 23:49:37 -05:00
Jade (Rose) Rowland 4e0a60db00 example code logic 2024-01-06 22:10:14 -05:00
Jade (Rose) Rowland 3604d3940c mutate viewing pattern 2024-01-06 17:53:51 -05:00
Jade (Rose) Rowland 02b9bd82cf highlight viewing pattern 2024-01-06 17:33:24 -05:00
Jade (Rose) Rowland 86442adb20 prettier 2024-01-06 15:09:09 -05:00
Richard Julian 569137eb22 Formatting for passing CI 2024-01-06 12:05:39 -08:00
Jade (Rose) Rowland 5e3a37c9e8 init 2024-01-06 14:55:45 -05:00
Richard Julian 4651066472 Remove hideHeader for better mobile UI and consistency 2024-01-06 11:55:00 -08:00
Jade (Rose) Rowland 8d325b96ea init 2024-01-06 14:49:52 -05:00
Felix Roos b52cb198b5 Merge pull request #889 from tidalcycles/invisible-selection
fix: invisible selection on vim + emacs mode
2024-01-06 15:23:55 +01:00
Felix Roos bcee6632af fix: invisible selection on vim + emacs mode 2024-01-06 15:21:58 +01:00
Jade (Rose) Rowland 150a1b8eed restore buffer hold behavior 2024-01-05 17:45:09 -05:00
Felix Roos 4c49b84213 Merge pull request #888 from tidalcycles/scale-anchors
scales can now be anchored
2024-01-05 22:29:20 +01:00
Felix Roos b27f177138 scales can now be anchored 2024-01-05 13:03:40 +01:00
Jade (Rose) Rowland b2f63897f9 change default FM env to exp because it modulates frequency and sounds way better :) 2024-01-05 01:07:54 -05:00
Jade (Rose) Rowland 2ee392be9b fixed all the things 2024-01-05 01:00:22 -05:00
Felix Roos f37652edb3 Merge pull request #887 from tidalcycles/root-voicings
add root mode for voicings
2024-01-04 11:21:42 +01:00
Felix Roos 27049eb706 add root mode for voicings
+ allow numbers as anchor
2024-01-04 11:02:13 +01:00
Felix Roos a2974099c1 add dec synonym for decay 2024-01-03 23:06:23 +01:00
Felix Roos 041a809b07 add ar function 2024-01-03 22:41:03 +01:00
Felix Roos 2ecc6b30aa add ad function 2024-01-03 22:37:35 +01:00
Felix Roos d582bbbb60 fix: format 2024-01-03 22:17:11 +01:00
Felix Roos ca3eda8fc7 support , in < > 2024-01-03 21:54:10 +01:00
Jade (Rose) Rowland 1bc86c359e state 2024-01-03 01:04:39 -05:00
Jade (Rose) Rowland 1e2c26123b working 2024-01-03 00:35:47 -05:00
Felix Roos 4d25e3b90b hotfix: Zach B-B 2024-01-03 00:23:28 +01:00
Jade (Rose) Rowland 83c820a18c prettier again 2024-01-01 18:50:23 -05:00
Jade (Rose) Rowland 3eface706c Merge branch 'tidalcycles:main' into envelope_improvements 2024-01-01 18:47:28 -05:00
Felix Roos 8d143f4bf1 Merge pull request #885 from tidalcycles/showcase
Showcase
2024-01-01 18:32:17 +01:00
Felix Roos 88fbd78492 fix: shuffle by default 2024-01-01 18:04:38 +01:00
Felix Roos 9a235a7c15 comment out chalmers vid 2024-01-01 17:59:54 +01:00
Felix Roos d99607ea14 add showcase 2024-01-01 17:56:29 +01:00
Felix Roos 5150ec06dc Merge pull request #882 from daslyfe/audio_device_selection
bugfix: suspend and close exisiting audio context when changing interface
2024-01-01 14:22:10 +01:00
Felix Roos b9f190562e Merge pull request #884 from tidalcycles/mastodon-links
add mastodon link
2024-01-01 14:21:52 +01:00
Felix Roos eb189d077d add mastodon link 2024-01-01 14:20:01 +01:00
Jade (Rose) Rowland 9756d63cf1 prettier 2023-12-31 11:58:06 -05:00
Jade (Rose) Rowland a800b32529 Merge branch 'main' into envelope_improvements 2023-12-31 11:51:49 -05:00
Jade (Rose) Rowland 8f56ef6507 suspend and close exisiting audio context 2023-12-31 11:39:14 -05:00
Felix Roos 92e0d09c28 Merge pull request #881 from tidalcycles/error-tolerance
fix: make sure n is never undefined before nanFallback
2023-12-31 17:02:57 +01:00
Felix Roos 64d80f98db fix: make sure n is never undefined before nanFallback 2023-12-31 16:59:45 +01:00
Felix Roos 01391d316b Merge pull request #880 from tidalcycles/error-tolerance
Error tolerance
2023-12-31 16:47:22 +01:00
Felix Roos 1d32da075d mini: tolerate non-breaking space (alt+spacebar on macos) 2023-12-31 16:44:35 +01:00
Felix Roos 9b32900b96 revert changing default voicing dict for now... 2023-12-31 16:27:35 +01:00
Felix Roos ecf837636b show line where mini notation parse errors happen 2023-12-31 15:06:30 +01:00
Felix Roos 5a76bc93b8 rename default dict to legacy 2023-12-31 14:19:16 +01:00
Felix Roos b14e5577b4 breaking: use ireal as default voicing dictionary
+ this has the big benefit that all chord symbols work by default without the need to specify a dict
2023-12-31 12:19:05 +01:00
Felix Roos 4121ac91ee fix: graceful handling of invalid chord symbols 2023-12-31 12:11:08 +01:00
Felix Roos c44f202c44 fix: scale errors safety net 2023-12-31 12:07:08 +01:00
Felix Roos 9059b16c7c fix: editor focus on click below code 2023-12-31 11:20:35 +01:00
Felix Roos 3760f51c3c Merge pull request #871 from daslyfe/bugfix_sample_select
bugfix: sound select indexes out of bounds
2023-12-31 10:06:24 +01:00
Felix Roos aa18293f1d Merge pull request #854 from daslyfe/audio_device_selection
Audio device selection
2023-12-31 10:03:00 +01:00
Jade (Rose) Rowland 63066937e9 remove leftover setting 2023-12-30 22:51:30 -05:00
Jade (Rose) Rowland 34f0d631d9 remove console statement 2023-12-30 22:44:40 -05:00
Jade (Rose) Rowland b3522fea6a prevent selection while playing to avoid artifacts 2023-12-30 22:40:27 -05:00
Felix Roos 2ae3ce53f3 hotfix: zen mode was broken 2023-12-31 01:19:46 +01:00
Felix Roos 2adacbd27b Merge pull request #879 from tidalcycles/dependency-update
Dependency update
2023-12-31 00:59:49 +01:00
Felix Roos 45eed1b7e7 fix: for some reason, ci fails without it... 2023-12-31 00:58:09 +01:00
Felix Roos b36d334f78 fix: duplicate pretest 2023-12-31 00:56:38 +01:00
Felix Roos bd648185bc use node 20 for deployment too + bump node types 2023-12-31 00:54:39 +01:00
Felix Roos 67f1dc32a5 bump node version for test 2023-12-31 00:52:01 +01:00
Felix Roos d47d9dadf4 fix: build
+ seems fraction.js now works with ssr
2023-12-31 00:45:04 +01:00
Felix Roos b52f8c2925 update remaining packages 2023-12-31 00:41:06 +01:00
Felix Roos 59ce624521 update webmidi + codemirror 2023-12-31 00:34:55 +01:00
Felix Roos 70b9fbfcf6 updates..
+ codemirror-themes
+ acorn + escodegen
+ supabase
2023-12-31 00:13:05 +01:00
Felix Roos 74b9279416 update eslint 2023-12-31 00:03:45 +01:00
Felix Roos c3ba8ee0fa update fraction js 2023-12-30 23:59:00 +01:00
Felix Roos 4f5ca0767d updates... 2023-12-30 23:50:30 +01:00
Felix Roos d0a1374d2f more updates.. 2023-12-30 23:43:54 +01:00
Felix Roos a747c976fe update nanostores 2023-12-30 23:26:27 +01:00
Felix Roos 94fcea1040 codeformat 2023-12-30 23:21:34 +01:00
Felix Roos 7db684e308 update lerna 2023-12-30 23:19:22 +01:00
Felix Roos 1981e1c34c update dependency-tree + prettier
+ rerun undocumented script
2023-12-30 23:15:44 +01:00
Felix Roos 5274508665 fix: wrong parens.. 2023-12-30 23:09:31 +01:00
Felix Roos 6f68bdcf5b update vite + astro 2023-12-30 23:08:15 +01:00
Felix Roos cf20f1059f Merge branch 'main' into dependency-update 2023-12-30 22:26:05 +01:00
Felix Roos 307c69edb9 hotfix: another slight logic error 2023-12-30 10:36:50 +01:00
Felix Roos 9a07b15952 hotfix: update button behavior 2023-12-30 10:07:47 +01:00
Jade (Rose) Rowland a178d310fd Merge branch 'tidalcycles:main' into bugfix_sample_select 2023-12-29 23:51:09 -05:00
Jade (Rose) Rowland 12451ba5fc Merge branch 'tidalcycles:main' into envelope_improvements 2023-12-29 22:27:52 -05:00
Jade (Rose) Rowland 69554c0762 merged with vanilla updates 2023-12-29 22:27:01 -05:00
Jade (Rose) Rowland 3152bc123a Merge branch 'main' into audio_device_selection 2023-12-29 20:37:29 -05:00
Felix Roos 4871abbd71 fix superdough example readme 2023-12-29 16:57:46 +01:00
Felix Roos bd2333377f Merge pull request #878 from tidalcycles/move-examples
move all examples to separate examples folder
2023-12-29 16:53:39 +01:00
Felix Roos 76aaedba66 lockfile 2023-12-29 16:50:58 +01:00
Felix Roos b0f316eecd add readme to examples folder 2023-12-29 16:49:05 +01:00
Felix Roos 49903abed7 better naming 2023-12-29 16:48:00 +01:00
Felix Roos d106875605 Merge branch 'main' into move-examples 2023-12-29 16:40:28 +01:00
Felix Roos c13feccdcd better names + more readme 2023-12-29 16:36:38 +01:00
Felix Roos 6aebf99ebc hotfix: panel style 2023-12-29 16:22:50 +01:00
Felix Roos 5d6ccf56d7 add some readme 2023-12-29 16:18:13 +01:00
Felix Roos 0323f75bae move all examples to separate examples folder 2023-12-29 16:05:10 +01:00
Felix Roos f31fdb0988 Merge pull request #876 from tidalcycles/vanilla-repl-4
final vanillification
2023-12-29 15:29:17 +01:00
Felix Roos 92024f68cf default panel position right 2023-12-29 15:26:47 +01:00
Felix Roos f9c1e46c01 delete outdated svg graphics 2023-12-29 15:17:00 +01:00
Felix Roos a5af6d5f4c remove gist function 2023-12-29 15:07:53 +01:00
Felix Roos b1d06c4eb7 remove nano-repl workspace 2023-12-29 15:04:12 +01:00
Felix Roos 89bf3b2817 fix: tooltip padding 2023-12-29 15:03:36 +01:00
Felix Roos ea8aabceed fix: loader 2023-12-29 15:03:26 +01:00
Felix Roos 9fd2d3d640 add missing flash checkbox 2023-12-29 13:58:06 +01:00
Felix Roos 967dea346f fix: lint error 2023-12-29 13:57:52 +01:00
Felix Roos 57bc0b7032 cleanup 2023-12-29 01:07:11 +01:00
Felix Roos 9974311344 better repl init + a bit of ssr for main repl 2023-12-29 00:55:14 +01:00
Felix Roos b0bdd09032 fix: dumb react ssr workaround 2023-12-29 00:30:46 +01:00
Felix Roos f477273d8a delete react package 2023-12-28 21:06:18 +01:00
Felix Roos 014303b0d5 remove dependencies to @strudel.cycles/react 2023-12-28 21:04:29 +01:00
Felix Roos 201fe726b6 replace main repl 2023-12-28 20:48:59 +01:00
Felix Roos 2ed3a5c582 fix: lint 2023-12-28 20:36:59 +01:00
Felix Roos 975a198ee9 whole docs now run new repl
- move MicroRepl code to MiniRepl
- fix a ssr bug
2023-12-28 20:36:23 +01:00
Felix Roos 837f8f318d microrepl claviature support 2023-12-28 19:40:01 +01:00
Felix Roos f96827d052 fix: initial highlighting 2023-12-28 18:03:50 +01:00
Felix Roos a9dc0912d0 fix: drawer performance issue 2023-12-28 17:54:51 +01:00
Jade (Rose) Rowland b5039ecce8 fix import 2023-12-28 10:19:20 -05:00
Felix Roos 624affe092 Merge pull request #874 from daslyfe/clock_drift
Bug Fix #119: Clock drift
2023-12-27 18:38:09 +01:00
Felix Roos 9b5842b20e hotfix: fix build error 2023-12-27 13:28:20 +01:00
Felix Roos edfa0c65f9 Merge pull request #873 from tidalcycles/vanilla-repl-3
main repl vanillification
2023-12-27 13:17:02 +01:00
Felix Roos 39e81aa77c reduce drawTime to fix perf (for now) 2023-12-27 12:46:10 +01:00
Felix Roos 8bde87246b load imported samples directly in prebake 2023-12-27 12:45:27 +01:00
Felix Roos e2a082f748 move repl2 to /next 2023-12-27 11:42:18 +01:00
Felix Roos d7c2cf562f fix: hot reloading 2023-12-27 11:40:07 +01:00
Felix Roos f44ceb46cd remove react-dom dependency 2023-12-26 18:26:51 +01:00
Felix Roos f524dde5ae tooltip without react + simplify autocomplete 2023-12-26 18:03:58 +01:00
Felix Roos 47aa4cf198 autocomplete without react 2023-12-26 17:56:07 +01:00
Felix Roos 1b55a5e3e0 add trailing slash 2023-12-26 17:55:08 +01:00
Jade (Rose) Rowland cb57d8f497 working 2023-12-25 20:42:20 -05:00
Jade (Rose) Rowland e12421cee8 still getting too late 2023-12-25 20:27:42 -05:00
Felix Roos 53484db768 style fixes + remove lastShared state 2023-12-26 00:29:43 +01:00
Felix Roos 4c337a5114 fix: lint errors 2023-12-26 00:06:59 +01:00
Felix Roos 63ae95186b repl2: share + clean up imports 2023-12-26 00:06:15 +01:00
Felix Roos 8c0065f563 pull out repl utility functions
+ repl2 initCode / switching patterns works now
2023-12-25 23:53:54 +01:00
Felix Roos 5c41d6789c checkbox for isPatternHighlightingEnabled 2023-12-25 21:11:28 +01:00
Felix Roos e19f799046 wire up settings and theming 2023-12-25 20:52:00 +01:00
Felix Roos 7dac1e275d repl2: working update + shuffle buttons + faster loading 2023-12-25 20:08:57 +01:00
Felix Roos d74d50c40a first steps of using StrudelMirror in main repl 2023-12-25 19:37:03 +01:00
Felix Roos 8b4be4d100 Merge pull request #866 from tidalcycles/vanilla-repl-2
more work on vanilla repl: repl web component + package
2023-12-25 17:47:25 +01:00
Felix Roos de4460a047 remove redundant test pages 2023-12-25 15:45:49 +01:00
Felix Roos 0ed615a312 fix: add .piano function 2023-12-25 15:32:12 +01:00
Felix Roos e8e8f888dd fix: stop other repls on start 2023-12-25 15:21:54 +01:00
Jade (Rose) Rowland 3776791239 working 2023-12-23 12:30:55 -05:00
Jade (Rose) Rowland 77fee0b866 fixed popping on font envelope 2023-12-20 17:39:11 -05:00
Jade (Rose) Rowland 5671b40707 account for phase complete 2023-12-20 15:24:14 -05:00
Jade (Rose) Rowland dec039ead3 fixed filter envelope popping... 2023-12-20 13:09:04 -05:00
Jade (Rose) Rowland fb81f6f268 still working on popping issue with firefox 2023-12-20 10:50:06 -05:00
Jade (Rose) Rowland deb973afa5 fixed hold behavior 2023-12-20 10:17:12 -05:00
Jade (Rose) Rowland 2dea3911ba remove unused variable 2023-12-20 09:29:07 -05:00
Jade (Rose) Rowland e0a7fb8290 filter should decay to set frequency 2023-12-20 09:28:40 -05:00
Jade (Rose) Rowland 30e402b9f1 fixed release bug 2023-12-20 01:52:43 -05:00
Jade (Rose) Rowland f6d9ad51c6 trying to fix divergent firefox behavior 2023-12-20 01:44:34 -05:00
Jade (Rose) Rowland 34ba81a841 fixed test complaint 2023-12-20 00:25:56 -05:00
Jade (Rose) Rowland d7fae2620e create release audio param method, make volume envelopes consistant 2023-12-20 00:21:14 -05:00
Jade (Rose) Rowland 9979a08cb0 updated comment 2023-12-18 00:35:54 -05:00
Jade (Rose) Rowland 17dd48f2a4 prettier 2023-12-18 00:28:41 -05:00
Jade (Rose) Rowland 355ac2ea29 Merge branch 'main' into audio_device_selection 2023-12-18 00:22:33 -05:00
Jade Rowland 000e1293db initialize on first load 2023-12-18 00:09:30 -05:00
Jade Rowland 48fa04f164 system standard resets audio context 2023-12-17 23:15:38 -05:00
Felix Roos ed8f5bf24f fix: first frame 2023-12-17 22:51:43 +01:00
Felix Roos e17df79133 microrepl: ssr static code 2023-12-17 22:42:51 +01:00
Felix Roos 9519d286bd remove web component attribute support
+ settings are now controlled via nanostore
2023-12-17 21:48:53 +01:00
Felix Roos b462f19ef1 fix: boolean settings 2023-12-17 21:28:25 +01:00
Felix Roos 1cdb5964c6 settings sync 2023-12-17 21:16:29 +01:00
Felix Roos 592e54a53f delete strudelmirror example 2023-12-17 21:13:48 +01:00
Jade Rowland fe60f34015 removed accidental file commit 2023-12-17 12:13:05 -05:00
Jade Rowland b5dc65d52a format 2023-12-16 13:36:05 -05:00
Jade Rowland 93a4efcf6d updated fontloader 2023-12-16 13:21:23 -05:00
Felix Roos 40f3212efa fix: first frame active state 2023-12-16 17:04:08 +01:00
Felix Roos 53d6ef04b8 fix: drawTime + canvasHeight 2023-12-16 16:22:28 +01:00
Felix Roos c29d032027 add autodraw flag 2023-12-16 16:19:18 +01:00
Felix Roos 7fcd9d8a83 approaching proper draw logic in microrepl 2023-12-16 16:14:40 +01:00
Felix Roos fc034830d0 use StrudelMirror directly in MicroRepl 2023-12-16 13:08:09 +01:00
Felix Roos 48e06bd213 fix: redundant style injections for multiple repls 2023-12-16 12:37:16 +01:00
Jade Rowland 96e0cce2d2 improve response 2023-12-16 00:30:35 -05:00
Jade Rowland 88f677e910 fix envelope behavior 2023-12-15 18:54:04 -05:00
Jade (Rose) Rowland 9f50f6ef0e Merge branch 'tidalcycles:main' into envelope_improvements 2023-12-15 18:27:23 -05:00
Felix Roos 20e8a30583 copy recipes page to test new MicroRepl 2023-12-15 23:30:27 +01:00
Felix Roos 89c06046b5 fix: repl package import on server 2023-12-15 23:27:38 +01:00
Felix Roos 9c13f6bb53 fix: mini repl play toggle button 2023-12-15 23:20:21 +01:00
Felix Roos b5edcde638 cleanup 2023-12-15 23:18:58 +01:00
Felix Roos 93e8186388 MicroRepl poc 2023-12-15 22:23:20 +01:00
Felix Roos 8e35079fd1 more code in example 2023-12-15 21:01:45 +01:00
Jade Rowland 9663c2ec85 fileter envelopes 2023-12-15 12:16:28 -07:00
Jade Rowland 7da7554493 it works 2023-12-15 11:32:23 -07:00
Felix Roos 372e93e8f8 repl now accepts code in innerHTML + bump 2023-12-15 11:50:49 +01:00
Felix Roos 9b58cf9890 bump repl to 0.9.3 2023-12-15 11:34:14 +01:00
Felix Roos 9fac2c3c33 band aid fix for process is not defined 2023-12-15 11:33:35 +01:00
Felix Roos 505ad17447 fix: process is not defined 2023-12-15 11:25:36 +01:00
Felix Roos 129327077a bump repl to 0.9.2 2023-12-15 11:24:38 +01:00
Felix Roos 034df01e1f better theme style handling 2023-12-15 11:23:10 +01:00
Felix Roos be1e5a7d0e remove onReady callback
+ use strudelTheme as default
2023-12-15 11:21:48 +01:00
Felix Roos 9872a89a29 bump repl to 0.9.1 2023-12-15 10:49:13 +01:00
Felix Roos cf445633c2 bundle as iife instead of cjs 2023-12-15 10:47:58 +01:00
Felix Roos 2cec7bc1a6 fix: rollup warning 2023-12-15 10:47:45 +01:00
Felix Roos 46bfd74e8d repl build config without externals 2023-12-15 10:37:24 +01:00
Felix Roos f6b1e13113 fix: lint errors + wrong color 2023-12-15 10:14:20 +01:00
Felix Roos f0c3d38ea7 move repl web component to new repl package
+ use it in /vanilla + /vanilla/mini
2023-12-15 10:12:47 +01:00
Felix Roos d4afbc63e2 strudel web component 2023-12-15 09:22:50 +01:00
Felix Roos 466574a856 Merge pull request #865 from tidalcycles/vanilla-repl-2
Vanilla repl 3
2023-12-15 00:11:35 +01:00
Felix Roos a8d0d39055 fix: improve last fix by using Prec.highest 2023-12-15 00:07:08 +01:00
Felix Roos 1b04243af6 fix: ctrl+enter on linux 2023-12-15 00:03:12 +01:00
Felix Roos 29082808cb fix: make canvas visible
- automate editor background handling
2023-12-14 23:00:18 +01:00
Felix Roos d23cac506c fix: fontFamily setting 2023-12-14 22:51:17 +01:00
Felix Roos 8959c630ae move css variable injection to themes
+ prepare new HeadCommon in extra file
2023-12-14 22:39:44 +01:00
Felix Roos 35a4f9808d Merge pull request #863 from tidalcycles/vanilla-repl-2
Vanilla repl 2
2023-12-14 21:28:48 +01:00
Felix Roos 49906e98b7 get rid of duplication 2023-12-14 14:50:26 +01:00
Felix Roos 7b6f63db05 comment out fontFamily for now 2023-12-14 14:50:17 +01:00
Felix Roos 37f97e1c17 remove package-lock 2023-12-14 14:48:39 +01:00
Felix Roos 60e559a910 add /vanilla route to website
+ disable autocomplete for now
2023-12-14 14:38:10 +01:00
Felix Roos f6f5ee0375 fix: linter error 2023-12-14 11:50:52 +01:00
Felix Roos 72d1f129cf add settings form to codemirror example 2023-12-14 11:29:33 +01:00
Felix Roos 9474ed7d85 dedicated strudelmirror example 2023-12-14 10:37:16 +01:00
Felix Roos 99194814a9 move code hashing helpers to core 2023-12-14 10:36:56 +01:00
Felix Roos 87feac447b - make codemirror package more capable
- add themes from react package
- add Autocomplete from react package
- handle dynamic extensions
- handle keyboard shortcuts
- make StrudelMirror as capable as Repl
2023-12-14 09:42:25 +01:00
Felix Roos 0a070a2084 superdough 0.9.12 2023-12-12 22:27:08 +01:00
Felix Roos 1d3f87a431 Merge pull request #861 from tidalcycles/envelope-fix
fix: finally repair envelopes
2023-12-12 21:49:22 +01:00
Felix Roos f38d1c272e cleanup 2023-12-12 21:46:52 +01:00
Felix Roos b0bbd58f66 fix: finally repair envelopes 2023-12-12 21:36:32 +01:00
Felix Roos 73fd801907 Merge pull request #860 from tidalcycles/fix-slashless-urls
add missing trailing slashes
2023-12-12 21:20:00 +01:00
Felix Roos bc59f20af4 add missing trailing slashes 2023-12-12 21:17:15 +01:00
Felix Roos daf9187572 Merge pull request #839 from daslyfe/file_import
Sound Import from local file system
2023-12-12 19:08:31 +01:00
Felix Roos 783c856fd7 Merge pull request #858 from tidalcycles/pattern-organization
Pattern organization
2023-12-11 22:48:35 +01:00
Felix Roos f939e00a84 cleanup 2023-12-11 22:46:30 +01:00
Felix Roos b31faa9bbc Merge branch 'main' into pattern-organization 2023-12-11 22:43:53 +01:00
Felix Roos 853a31b638 improve code init logic 2023-12-11 22:17:10 +01:00
Felix Roos faaed61384 fix: do not sync activePattern between tabs
+ only deselect activePattern if code in url differs
2023-12-11 22:01:08 +01:00
Felix Roos b50f686a96 move dirt sample selection to prebake 2023-12-11 11:04:49 +01:00
Jade Rowland f45a3933de update text 2023-12-10 23:08:48 -05:00
Felix Roos 98a1786c10 hotfix: deselect user pattern when opening links 2023-12-10 21:06:51 +01:00
Felix Roos 1f16ebc5b2 fix: deselect user pattern when opening links 2023-12-10 21:01:51 +01:00
Felix Roos 79e8e430f1 fix: style for small screen 2023-12-10 19:50:20 +01:00
Felix Roos 6440621d5d Merge branch 'main' into audio_device_selection 2023-12-10 19:32:29 +01:00
Jade Rowland 59a4cd9cf8 updating buton location 2023-12-10 11:37:18 -05:00
Jade (Rose) Rowland 6238be7f2c Merge branch 'tidalcycles:main' into file_import 2023-12-10 11:28:50 -05:00
Jade Rowland 4051276d74 fixing merge conflicts 2023-12-10 11:27:39 -05:00
Jade Rowland 145510266a fixing merge conflicts 2023-12-10 11:26:46 -05:00
Jade Rowland 4d361a2b3d fixing merge conflicts 2023-12-10 11:24:39 -05:00
Jade Rowland c4fe664215 seperating things out 2023-12-10 11:22:50 -05:00
Jade Rowland ace71693b7 db utils should be reusable 2023-12-10 10:19:57 -05:00
Felix Roos f19ac748e6 slim down template
- move import + export logic to settings.mjs
2023-12-10 14:28:27 +01:00
Jade Rowland a7713213f9 indexdb 2023-12-10 00:44:34 -05:00
Felix Roos 845571a716 hotfix: pattern save was broken :-/ 2023-12-09 23:54:49 +01:00
Felix Roos 8b1dfab077 Merge pull request #855 from tidalcycles/export-patterns
Export patterns + ui tweaks
2023-12-09 17:25:11 +01:00
Felix Roos 6969800192 fix: update button bug 2023-12-09 17:23:24 +01:00
Felix Roos 37a13d1a00 add tooltips 2023-12-08 23:09:24 +01:00
Felix Roos 8c89938eaf pattern json export + import 2023-12-08 23:07:30 +01:00
Felix Roos 5116bf74ad reorder pattern action buttons 2023-12-08 22:25:05 +01:00
Felix Roos a6f969614e fix: rename cancel 2023-12-08 22:24:49 +01:00
Felix Roos c1b7476f43 + show active pattern at the top
+ move active pattern functions to top
2023-12-08 22:22:07 +01:00
Felix Roos 0ca4c1de0f make sure new recent patterns are on top 2023-12-08 22:21:26 +01:00
Jade Rowland ec44103d20 comments 2023-12-08 12:17:01 -05:00
Jade Rowland 89fe0f11ae cleaning up 2023-12-08 12:12:58 -05:00
Felix Roos 63a01088a0 hotfix: dont overwrite user pattern on shuffle 2023-12-08 11:42:15 +01:00
Felix Roos c3e48f1b4d Merge pull request #852 from tidalcycles/import-export-patterns
patterns tab: import patterns + style
2023-12-08 09:41:10 +01:00
Felix Roos 31cd626820 style sounds and patterns tab more consistently 2023-12-08 09:30:06 +01:00
Felix Roos 8dd0e9600d add some padding 2023-12-08 09:20:42 +01:00
Felix Roos 10d86ff835 more style + set reset flag 2023-12-08 09:18:55 +01:00
Felix Roos cec8553fb5 clear sounds + cps on pattern change
+ similar to shuffle
2023-12-08 09:18:33 +01:00
Felix Roos b03bf9ec3d remove log 2023-12-08 09:17:43 +01:00
Felix Roos a750490eea begin pattern import button 2023-12-08 08:49:03 +01:00
Jade Rowland 5281c61f99 fixing async stuff 2023-12-08 01:01:06 -05:00
Jade Rowland 52628920d9 working 2023-12-07 22:17:50 -05:00
Felix Roos ac2e450e38 fix: duplicate example 2023-12-07 21:43:08 +01:00
Felix Roos f8d1e9e004 Merge pull request #769 from tidalcycles/patterns-tab
Patterns tab + Refactor Panel
2023-12-07 20:42:00 +01:00
Felix Roos e551dfeddb reorder tabs + remove duplicated examples 2023-12-07 20:30:13 +01:00
Felix Roos 2f9244e90d style 2023-12-07 20:28:04 +01:00
Felix Roos 056fae518b add checks for forbidden actions 2023-12-07 20:28:01 +01:00
Felix Roos a45d87667f fix: update / fork logic 2023-12-07 20:17:01 +01:00
Felix Roos 7225b0b18d merge changes 2023-12-07 17:33:23 +01:00
Felix Roos e72c9cbebf Merge branch 'main' into patterns-tab 2023-12-07 17:33:07 +01:00
Felix Roos c787bb26c7 Merge pull request #850 from bwagner/pnpm_8.11.0
CHANGES: pnpm 8.1.3 to 8.11.0
2023-12-07 10:25:15 +01:00
Bernhard Wagner 20f3ddd277 CHANGES: pnpm 8.1.3 to 8.11.0 2023-12-07 10:19:26 +01:00
Felix Roos 5cac182b26 Merge pull request #849 from shiyouganai/shiyouganai-slashocalypse
Fix edge case with rehype-urls and trailing slashes in image file paths
2023-12-07 09:35:13 +01:00
Priere 78b2b5ccc3 Don't trim serialized query part of URL 2023-12-06 17:54:29 -05:00
Priere 60cee7fd2f Fix to not add trailing slash to URL with filename 2023-12-06 17:43:15 -05:00
Felix Roos 2bd21df762 Merge pull request #848 from shiyouganai/shiyouganai-slashocalypse
Fix examples page, piano() and a few workshop imgs
2023-12-06 23:02:31 +01:00
Priere a32ed02745 Fix piano and two doc images 2023-12-06 16:57:43 -05:00
Priere 93c5eeb99e Fix examples page and de workshop img 2023-12-06 16:45:37 -05:00
Felix Roos ff45baba2c Merge pull request #846 from tidalcycles/slashocalypse
fix: swatch png src
2023-12-06 22:30:59 +01:00
Felix Roos cc4d38b4a5 fix: swatch png src 2023-12-06 22:28:14 +01:00
Felix Roos bf30587180 Merge pull request #845 from tidalcycles/slashocalypse
fix: missing hash for links starting with /
2023-12-06 22:19:30 +01:00
Felix Roos 1b372a9a7b fix: missing hash for links starting with / 2023-12-06 22:16:43 +01:00
Felix Roos d9f78e1283 Merge pull request #842 from tidalcycles/slashocalypse
improve slashing + base href behavior
2023-12-06 22:05:05 +01:00
Felix Roos 2ddd2d1f39 fix: search links with basehref 2023-12-06 21:46:13 +01:00
Felix Roos 6b31160bbd fix: astro warnings 2023-12-06 21:34:39 +01:00
Felix Roos 74aa85b38b Merge pull request #843 from shiyouganai/shiyouganai-slashocalypse
Add in fixes from my fork to slashocalypse branch
2023-12-06 21:26:48 +01:00
Priere 8e9b607fa1 Revert to simpler link parsing and run formatter 2023-12-06 03:57:30 -05:00
Priere 5332f99a5a Fix another comment 2023-12-06 03:43:38 -05:00
Priere e1a8bd333d Fix comment 2023-12-06 03:41:54 -05:00
Priere 018a45e2d4 Rework rehype plugin and clean up changes 2023-12-06 02:57:28 -05:00
Priere 2c43fb2512 Remove unnecessary change 2023-12-05 19:34:15 -05:00
Priere 3e5664a877 Add quick fix for non root bases 2023-12-05 19:34:15 -05:00
Felix Roos ac41426a20 improve slashing + base href behavior
+ prefix sidebar links & mdx links with base
+ add trailing slashes
2023-12-05 23:09:34 +01:00
Felix Roos 8a0cf14fd7 Merge pull request #838 from ilesinge/prevent_crawler_404
Prevent 404 on Algolia crawls
2023-12-05 18:43:57 +01:00
Felix Roos 362f0df117 Merge pull request #820 from daslyfe/multichannel_audio
Multichannel audio
2023-12-05 18:26:47 +01:00
Felix Roos 1190f6e091 fix weird rounding change... 2023-12-05 18:17:33 +01:00
Bernhard Wagner ebf93c06dd ADDS: JetBrains IDE files (#840)
Co-authored-by: Bernhard Wagner <gitcommit@nosuch.biz>
2023-12-05 11:19:57 +00:00
Bernhard Wagner fe8debe6e8 CHANGES: github action pnpm version from 7 to 8.3.1 (#835)
Co-authored-by: Bernhard Wagner <gitcommit@nosuch.biz>
2023-12-05 11:19:26 +00:00
Bernhard Wagner b8866cf575 CHANGES: pin pnpm to version 8.3.1 (#834)
Co-authored-by: Bernhard Wagner <gitcommit@nosuch.biz>
2023-12-05 11:19:17 +00:00
Bernhard Wagner 2ce8576ab2 CHANGES: github action checkout v2->v4 (#837)
Co-authored-by: Bernhard Wagner <gitcommit@nosuch.biz>
2023-12-05 11:19:06 +00:00
Bernhard Wagner 1bca05e349 FIXES: palindrome abc -> abccba (#831)
* FIXES: palindrome abc -> abccba

* FIXES: tests for palindrome

---------

Co-authored-by: Bernhard Wagner <gitcommit@nosuch.biz>
2023-12-05 10:15:13 +00:00
Jade Rowland 8146725f89 removed unessecary change 2023-12-04 19:20:28 -05:00
Jade Rowland 34c44a29c6 style input 2023-12-04 19:11:38 -05:00
Alexandre G.-Raymond 7c948dd812 Prevent 404 on Algolia crawls 2023-12-04 14:48:54 +01:00
Jade Rowland 61919a1b3e upload samples 2023-12-03 23:33:04 -05:00
Jade Rowland 9be10890e1 update tests 2023-12-03 18:31:01 -05:00
Jade Rowland f51109cb26 comment 2023-12-03 18:26:48 -05:00
Jade Rowland 9aec18b3a0 add 1 to channel selection 2023-12-03 18:25:30 -05:00
Felix Roos b374cdf47c Merge pull request #830 from drewgbarnes/patch-1
Fix a typo
2023-12-02 09:43:50 +01:00
Drew Barnes b16f235e1c Update first-sounds.mdx 2023-12-01 14:23:07 -08:00
Felix Roos c26e5bbf0d Merge pull request #827 from ilesinge/add_search
Add and style algolia search
2023-11-30 10:42:41 +01:00
Alexandre G.-Raymond 020c326458 Codeformat for search 2023-11-26 22:52:17 +01:00
Alexandre G.-Raymond dacd1e6146 Add and style algolia search 2023-11-26 22:50:17 +01:00
Felix Roos 25b2eb5783 snapshot 2023-11-25 16:20:12 +01:00
Felix Roos 7c3dbac083 Merge branch 'main' into multichannel_audio 2023-11-25 16:19:44 +01:00
Felix Roos 54b5d69c8d Merge pull request #818 from atfornes/main
Hydra fixes and improvements
2023-11-25 15:50:43 +01:00
Felix Roos 407510e265 document feedStrudel 2023-11-25 15:20:19 +01:00
Felix Roos f7a283f87d add feedStrudel option + smarter reinit logic 2023-11-24 12:49:05 +01:00
Ámbar Tenorio Fornés 508a6c92b2 default hydra config without audio detection 2023-11-24 12:21:04 +01:00
Felix Roos 9045ce05da comment 2023-11-24 11:28:20 +01:00
Felix Roos 456be920d3 else clause 2023-11-24 11:17:30 +01:00
Felix Roos 71b4e14dd3 Merge branch 'main' into atfornesmain 2023-11-24 11:10:15 +01:00
Felix Roos fb7a9e2083 format 2023-11-24 10:28:40 +01:00
Felix Roos 69e99fa902 Merge pull request #808 from kasparsj/hydra-options
add options param to initHydra
2023-11-24 10:07:17 +01:00
Felix Roos 5e7e1ff0e8 Merge pull request #800 from ilesinge/improve_doc
Improve documentation for synonym functions
2023-11-24 09:57:02 +01:00
Felix Roos 18e9ceb501 populate autocomplete with all synonyms
+ properly display synonyms based on label
2023-11-24 09:52:39 +01:00
Felix Roos 458c97b927 list synonyms in Autocomplete 2023-11-24 09:37:26 +01:00
Felix Roos 4fd3e6e99c fix: entry.name mutation bug 2023-11-24 09:37:11 +01:00
Felix Roos c606f86e9d Merge pull request #806 from Bubobubobubobubo/noises
New noise type: "crackle"
2023-11-24 09:00:53 +01:00
Jade Rowland e7376c4fc8 panic function update 2023-11-23 14:17:17 -05:00
Jade Rowland 886b16d6fd fixed panic function 2023-11-23 14:07:32 -05:00
Jade Rowland 64c2e7c1e8 cleaning up 2023-11-23 13:45:58 -05:00
Jade Rowland 88e933ee25 cleaning up 2023-11-23 13:31:00 -05:00
Jade Rowland 1f62d85d8b cleaning up 2023-11-23 13:29:22 -05:00
Jade Rowland 3fd5fdf1ee preview outputs should be stereo 2023-11-23 12:43:51 -05:00
Jade Rowland e419733716 channel splitting and channels parameter 2023-11-23 01:04:53 -05:00
Alexandre Gravel-Raymond ecc8e0a108 More code beauty please 2023-11-22 20:38:25 +01:00
Alexandre Gravel-Raymond 2868a5ff4f Update the undocumented functions file 2023-11-22 20:36:01 +01:00
Alexandre Gravel-Raymond d71877f915 Move jsdoc files to subfolder 2023-11-22 20:35:19 +01:00
Ámbar Tenorio Fornés e0e896d4b5 improve hydra audio detection initialization 2023-11-22 17:39:16 +01:00
Ámbar Tenorio Fornés 0a280e9399 prettier code formatting 2023-11-22 15:47:16 +01:00
Ámbar Tenorio Fornés a58ac967a6 add Hydra audio example to documentation 2023-11-22 13:51:42 +01:00
Ámbar Tenorio Fornés ebc6723f55 enable hydra options update 2023-11-22 13:51:01 +01:00
Ámbar Tenorio Fornés 66fd20ace5 add hydra audio capture option 2023-11-22 12:36:43 +01:00
Ámbar Tenorio Fornés de00212bb6 fix hydra performance issues 2023-11-22 12:27:18 +01:00
Jade Rowland f0b458cd17 need to figure out channels input + seperating left right channels from source 2023-11-22 00:03:34 -05:00
Jade Rowland 7aa217828b testing 2023-11-20 23:06:35 -05:00
Felix Roos b27f8e45dc hotfix: build 2023-11-18 21:48:50 +01:00
Felix Roos 3e02f0a0ba Merge pull request #815 from tidalcycles/color-hsl
Color hsl
2023-11-18 21:18:16 +01:00
Felix Roos f759999826 pianoroll smear as float 2023-11-18 21:16:03 +01:00
Felix Roos 049aa35286 hsl + hsla functions 2023-11-18 21:15:52 +01:00
Felix Roos dd8be657c2 Merge pull request #813 from tidalcycles/fix-multiple-repls
fix: multiple repls
2023-11-17 23:18:23 +01:00
Felix Roos 09752241ba fix: multiple repls 2023-11-17 23:16:09 +01:00
Felix Roos 83561a0ceb Update README.md 2023-11-17 21:46:34 +01:00
Felix Roos b8ca83ddd1 rename pattern 2023-11-17 21:29:50 +01:00
Felix Roos 4cae6c051b fix: save pattern 2023-11-17 20:55:23 +01:00
Felix Roos e5f9467329 fix: slight layout improvement 2023-11-17 20:55:04 +01:00
Felix Roos 34c1f3c7de fix: examples layout 2023-11-17 20:54:48 +01:00
Kaspars c0f56be2a9 add options param to initHydra 2023-11-17 20:41:37 +01:00
Felix Roos c6f89431d9 fix: merge error 2023-11-17 20:37:21 +01:00
Felix Roos 80601451b6 Merge branch 'main' into patterns-tab 2023-11-17 20:36:15 +01:00
Felix Roos f74d1beb62 Merge branch 'main' of https://github.com/tidalcycles/strudel 2023-11-17 20:29:53 +01:00
Felix Roos b73ea7f086 Merge pull request #801 from ilesinge/add_doc
Add doc for euclidLegatoRot, wordfall and slider
2023-11-17 16:04:10 +01:00
Alexandre Gravel-Raymond a3bf6975c4 Mark optional slider params 2023-11-17 15:33:53 +01:00
Felix Roos 08ebb52e9b Merge pull request #804 from kasparsj/highlight-active-line-opt
add option to disable active line highlighting in Code Settings
2023-11-17 14:42:58 +01:00
Felix Roos 47a6af2b25 Merge pull request #805 from tidalcycles/pq-functions
tidal style d1 ... d9 functions + more
2023-11-17 14:37:51 +01:00
Felix Roos a84cfb5677 bump superdough 2023-11-17 14:07:26 +01:00
Raphael Forment 6e92c4915a Run prettier 2023-11-17 13:37:16 +01:00
Raphael Forment 2a18df61cd Fix documentation 2023-11-17 13:23:54 +01:00
Raphael Forment fb28083ce6 Fixing density and adding documentation 2023-11-17 13:18:49 +01:00
Raphael Forment 476bda812e Initial work on crackle 2023-11-17 12:55:17 +01:00
Felix Roos 265f01eb06 add p1 .. p9 shortcuts as well 2023-11-17 10:50:45 +01:00
Felix Roos cb9ef3ee6a add q1 .. q9 shortcuts 2023-11-17 09:45:44 +01:00
Felix Roos a4487179a5 fix tests 2023-11-16 07:25:20 +01:00
Felix Roos f43f627037 + add hush
+ add the ability to evaluate without clearing
2023-11-16 07:17:59 +01:00
Felix Roos a7b799f154 p and q methods + all function 2023-11-16 06:52:47 +01:00
Felix Roos ee7cd8cd4c remove pseudo note variables 2023-11-16 06:51:51 +01:00
Kaspars 2d1fcf4a8d fix typo 2023-11-15 22:53:56 +01:00
Kaspars ef14074164 add option to disable active line highlighting in Code Settings 2023-11-15 22:38:00 +01:00
Felix Roos 49aa9cf6da Merge pull request #802 from kasparsj/fix-strudelTheme-outline
remove unwanted cm6 outline for strudelTheme
2023-11-15 20:12:23 +01:00
Kaspars 8d5ef45e2b fix codeformat 2023-11-15 19:22:52 +01:00
Kaspars 9ef177e735 Merge branch 'main' into fix-strudelTheme-outline 2023-11-14 16:33:06 +01:00
Kaspars 7f1919ebc6 move fix to Repl.css 2023-11-14 11:16:51 +01:00
Felix Roos 1aaaaba619 Merge pull request #798 from daslyfe/phaser
Create phaser effect
2023-11-13 23:30:14 +01:00
Felix Roos b7dd9b7d35 Merge remote-tracking branch 'origin/main' into phaser 2023-11-13 21:59:10 +01:00
Kaspars ff0af15ac7 remove unwanted cm6 outline for strudelTheme 2023-11-13 00:06:01 +01:00
Alexandre G.-Raymond 8a7ff9e01d Add snapshot for euclidLegatoRot 2023-11-11 17:24:18 +01:00
Alexandre G.-Raymond e52e257d9b Document euclidLegatoRot 2023-11-11 17:03:21 +01:00
Alexandre G.-Raymond 2d6654b234 Document slider 2023-11-11 16:24:09 +01:00
Alexandre G.-Raymond 1b0427e943 Document wordfall 2023-11-11 16:23:58 +01:00
Alexandre G.-Raymond 24e1881876 Ignore jsdoc-synonyms by eslint 2023-11-11 15:53:03 +01:00
Alexandre G.-Raymond bfff38a262 Fix code format of JSDoc synonym plugin 2023-11-11 15:44:15 +01:00
Alexandre G.-Raymond 2aff31fe06 Simplify JSDoc 2023-11-11 14:24:20 +01:00
Alexandre G.-Raymond 6ba2b767b0 Show synonyms in API reference 2023-11-11 14:23:55 +01:00
Alexandre G.-Raymond bbc292561f Use synonyms in Tooltip 2023-11-11 14:23:30 +01:00
Alexandre G.-Raymond e4b00117c3 Parse the synonyms tag in source documentation 2023-11-11 14:22:52 +01:00
Alex McLean d25851ac17 support multiple named serial connections, change default baudrate to 115200 (#551) 2023-11-10 11:17:35 +00:00
Felix Roos d02450c0d9 Merge pull request #662 from gogins/main
Fix for #1. Enables named instruments for csoundm.
2023-11-09 09:27:57 +01:00
Felix Roos 400b2109fb Merge pull request #706 from Bubobubobubobubo/global-vibrato
Adding vibrato to Superdough sampler
2023-11-09 09:26:45 +01:00
Felix Roos 2a09f9ef0b fix: sampler broke without vibrato 2023-11-09 09:21:40 +01:00
Felix Roos 0052d349d9 refactor: move vibrato up + cleanup oscillator 2023-11-09 09:06:50 +01:00
Felix Roos 7c8a8b8b70 simplify 2023-11-09 08:59:23 +01:00
Felix Roos 85835087ba format 2023-11-09 08:48:23 +01:00
Felix Roos 5aac042c80 Merge branch 'main' into global-vibrato 2023-11-09 08:47:37 +01:00
Felix Roos 9dbd073073 Merge pull request #784 from ilesinge/document_pianoroll
Document pianoroll
2023-11-09 08:46:03 +01:00
Felix Roos 035f6c8098 Merge pull request #795 from bwagner/patch-2
Update first-effects.mdx
2023-11-09 08:45:29 +01:00
Felix Roos d2a06654c3 Merge pull request #796 from bwagner/patch-3
Update pattern-effects.mdx
2023-11-09 08:44:43 +01:00
Felix Roos c028686298 Merge pull request #797 from bwagner/patch-4
Update recap.mdx
2023-11-09 08:43:50 +01:00
Felix Roos 858a02634e dedupe / move supertdirt phaser controls 2023-11-09 08:40:21 +01:00
Felix Roos 2682fd38f8 add to doc page 2023-11-09 08:29:21 +01:00
Felix Roos 3ecb701504 add params to superdough readme 2023-11-09 08:19:04 +01:00
Felix Roos ac359a0e9e doc: phaser synonyms 2023-11-09 08:17:16 +01:00
Felix Roos df636cf4f6 phaser shortcuts 2023-11-09 08:16:17 +01:00
Felix Roos 791a363694 snapshots 2023-11-08 23:33:46 +01:00
Jade Rowland 06eb8b5be8 fixed doc 2023-11-07 22:57:00 -05:00
Jade Rowland 4b4290e087 add more parameters 2023-11-07 22:52:39 -05:00
Jade Rowland c89f91215c Merge branch 'tidalcycles:main' into phaser 2023-11-07 22:11:55 -05:00
Jade Rowland 65d07dbff2 create free running lfos for different orbits 2023-11-07 22:09:53 -05:00
Jade Rowland 2e4d28b910 update doc 2023-11-07 21:49:56 -05:00
Jade Rowland 51c63fa996 turn off of depth is 0 2023-11-07 21:44:57 -05:00
Jade Rowland f0a582dc92 cleaning up 2023-11-07 21:10:12 -05:00
Jade Rowland bee36a7a4f cleaning up 2023-11-07 20:25:31 -05:00
Jade Rowland 0edd54dee3 cleaning up 2023-11-07 20:23:45 -05:00
Bernhard Wagner 4a16cd891f FIXES: table 2023-11-07 18:55:35 +01:00
Bernhard Wagner 23dd9d4c01 Update recap.mdx
Adds a few missing translations
2023-11-07 16:16:46 +01:00
Bernhard Wagner df277d6b7b Update pattern-effects.mdx
grammatical amendments
2023-11-07 16:10:57 +01:00
Bernhard Wagner eed2c304e4 Update first-effects.mdx
grammatical amendments
2023-11-07 15:57:31 +01:00
Felix Roos bd5953317e Merge pull request #794 from bwagner/patch-1
Update first-sounds.mdx
2023-11-07 11:53:48 +01:00
Bernhard Wagner b88f58cc21 Update first-sounds.mdx
in eine sogenannte Funktion -> in einer sogenannten Funktion
2023-11-07 11:38:13 +01:00
Jade Rowland 9cbf3079f3 change to bus effect experiment 2023-11-06 19:02:09 -05:00
Felix Roos 682ac25111 Merge pull request #791 from tidalcycles/fix-ref-anchors
don't use anchor links for reference
2023-11-06 23:17:31 +01:00
Felix Roos 07da9a9dd2 don't use anchor links for reference 2023-11-06 23:13:10 +01:00
Felix Roos 395ae4d05a Merge pull request #788 from tidalcycles/github-shortcut
samples loading shortcuts:
2023-11-06 22:40:43 +01:00
Felix Roos 2ef35a8583 samples loading shortcuts:
- use main branch by default in github shortcut
- add bubo shortcut
2023-11-06 22:17:33 +01:00
Felix Roos 5807dbfdac Merge pull request #786 from tidalcycles/fix-scope-flip
Fix scope pos + document
2023-11-05 22:47:48 +01:00
Felix Roos c4f26c3cad snapshot 2023-11-05 22:46:16 +01:00
Felix Roos 26d87b691c document scope functions 2023-11-05 22:43:37 +01:00
Felix Roos 52e2b90eef fix: scope pos 2023-11-05 22:22:35 +01:00
Felix Roos 62eb9ce598 Merge pull request #783 from ilesinge/hover_tooltip
Implement optional hover tooltip with function documentation
2023-11-05 22:10:25 +01:00
Jade Rowland a9efda3bc3 tweaking to make it sound good 2023-11-05 15:40:02 -05:00
Alexandre G.-Raymond 8fe4dca4c2 Update pianoroll documentation 2023-11-05 18:07:42 +01:00
Felix Roos a05d3a47c6 Merge pull request #785 from ilesinge/reference_parameters
Add function params in reference tab
2023-11-05 16:46:06 +01:00
Alexandre G.-Raymond e9265eff35 Add function params in reference tab 2023-11-05 16:40:46 +01:00
Alexandre G.-Raymond 8fa7bf795a Fix pianoroll documentation 2023-11-05 16:25:10 +01:00
Alexandre G.-Raymond f045fb44de Add color function documentation 2023-11-05 16:23:36 +01:00
Alexandre G.-Raymond 0d06840a1b Add label function documentation 2023-11-05 16:23:21 +01:00
Alexandre G.-Raymond 624e540cb4 Add pianoroll function documentation 2023-11-05 16:23:00 +01:00
Alexandre G.-Raymond 353333653f Implement optional hover tooltip with function documentation 2023-11-05 13:00:54 +01:00
Felix Roos 83fec57400 Merge pull request #781 from tidalcycles/fix-styles
fix: style issues
2023-11-05 12:42:00 +01:00
Felix Roos 7ad0ec1600 fix: namespace mini-repl styles 2023-11-05 12:35:49 +01:00
Felix Roos ec611aac45 Merge pull request #780 from tidalcycles/xfade
add xfade
2023-11-05 12:21:28 +01:00
Felix Roos d7752961b8 snapshot 2023-11-05 12:12:25 +01:00
Felix Roos 8c5837e78a add xfade + docs 2023-11-05 12:11:17 +01:00
Jade Rowland b3f8df1783 initial commit 2023-11-04 20:20:25 -04:00
Felix Roos 0ecc6c196f Merge pull request #775 from tidalcycles/astro-3
Update to Astro 3
2023-11-02 09:30:26 +01:00
Felix Roos 77686547eb no double ! 2023-11-02 09:14:45 +01:00
Felix Roos 419cf6c12b update to astro 3 2023-11-02 09:13:29 +01:00
Felix Roos 326571b797 remove obsolete config 2023-11-02 09:01:53 +01:00
Felix Roos c25c2693f5 Merge branch 'main' into astro-3 2023-11-02 09:00:42 +01:00
Felix Roos 8d8a1f552d Merge pull request #773 from Dsm0/vscode-bindings
add vscode bindings
2023-11-02 08:57:14 +01:00
Felix Roos 638f5c7323 rename bindings key 2023-11-02 08:48:11 +01:00
Felix Roos 9ec5d33840 Merge pull request #774 from tidalcycles/tauri-clipboard
fix: share copy to clipboard + alert
2023-11-02 08:31:30 +01:00
Felix Roos 8d3ba2a8cd fix: share copy to clipboard + alert 2023-11-02 08:29:27 +01:00
Dsm0 0c2838cc90 fixed style issues 2023-11-01 17:55:40 -04:00
Felix Roos 1e5edfca26 Update CONTRIBUTING.md
fix prettier instructions
2023-11-01 22:40:23 +01:00
Dsm0 b141e1ee68 (hopefully) fixed broken lock file 2023-11-01 17:30:59 -04:00
Will 2fd4836228 Merge branch 'main' into vscode-bindings 2023-11-01 17:24:05 -04:00
Alex McLean 9ceab0f294 Fix chunk, add fastChunk and repeatCycles (#712)
* Match behaviour of chunk with tidal, add fastChunk for old strudel behaviour. Also adds repeatCycles. fixes #689

* documentation
2023-11-01 21:22:33 +00:00
Dsm0 d4c12dcef4 integrated vscode bindings 2023-11-01 17:14:22 -04:00
Felix Roos 16bb920011 Merge pull request #767 from ilesinge/document_adsr
Document adsr function
2023-11-01 22:12:48 +01:00
Felix Roos 158fa85c46 Merge pull request #771 from daslyfe/add_pick_and_squeeze_functions
Add pick and squeeze functions
2023-11-01 22:11:48 +01:00
Felix Roos 34bd0e11e4 add doc chapters 2023-11-01 22:09:40 +01:00
Felix Roos 9e649a18c4 snapshots 2023-11-01 22:07:19 +01:00
Felix Roos 2bb45afe5f Merge pull request #772 from tidalcycles/update-vite-pwa
Update vite pwa
2023-11-01 22:04:00 +01:00
Felix Roos 41a9098c80 use new flag 2023-11-01 21:59:53 +01:00
Felix Roos 36ef03a406 use 0.1.4 @vite-pwa/astro 2023-11-01 21:57:14 +01:00
Jade Rowland fd6c713119 move to signal file with other choose functions 2023-10-31 12:18:19 -04:00
Jade Rowland 4a57d3ada1 functions 2023-10-31 11:58:11 -04:00
Felix Roos 53160c638a half working user pattern management 2023-10-29 14:00:13 +01:00
Felix Roos a2077f7be1 fix logger import 2023-10-29 13:14:29 +01:00
Felix Roos b245d44220 hide patterns tab for now
+ add examples to welcome tab
2023-10-29 13:14:25 +01:00
Felix Roos b15f7bcf45 Merge branch 'main' into patterns-tab 2023-10-29 13:05:25 +01:00
Felix Roos f16cb8f7d2 Merge pull request #768 from tidalcycles/strudel-cc
replace strudel.tidalcycles.org with strudel.cc
2023-10-28 23:55:07 +02:00
Felix Roos af915be142 replace strudel.tidalcycles.org with strudel.cc 2023-10-28 23:49:30 +02:00
Alexandre G.-Raymond 2633f4fcef Document adsr function 2023-10-28 19:50:41 +02:00
Felix Roos 6c2330984e Merge pull request #766 from ilesinge/document_striate
Document striate function
2023-10-28 12:52:36 +02:00
Alexandre G.-Raymond 1e1d5ef442 Document striate function 2023-10-28 11:47:37 +02:00
Felix Roos 248757ac3f Merge pull request #760 from tidalcycles/zen-fix
fix zen mode logo overlap
2023-10-27 23:06:20 +02:00
Felix Roos cdbfb2c08c Merge pull request #764 from tidalcycles/fix-scale-offset2
fix: scale offset
2023-10-27 23:01:18 +02:00
Felix Roos d84c917f19 fix: scale offset 2023-10-27 22:50:21 +02:00
Felix Roos 1c7c82358d Merge pull request #762 from tidalcycles/fix-addivite-synthesis-phases
Fix addivite synthesis phases
2023-10-27 21:59:35 +02:00
Felix Roos c085694a8b fix: additive synthesis 2023-10-27 21:55:49 +02:00
Felix Roos a57c2b9fe5 fix: flip scope in y direction 2023-10-27 21:55:25 +02:00
Felix Roos 9fc87fe20f add px in zen mode to fix logo overlap 2023-10-27 21:29:31 +02:00
Felix Roos 4761e25fe1 Merge pull request #759 from tidalcycles/hydra-integration
Hydra integration
2023-10-26 16:28:16 +02:00
Felix Roos 3ce50d80de ignore hydra.mjs in linter 2023-10-26 16:20:19 +02:00
Felix Roos 8754b023d5 document H function 2023-10-26 16:11:22 +02:00
Felix Roos 22c9829fea add H function to plug patterns into Hydra 2023-10-26 16:05:10 +02:00
Felix Roos 0f7b3e9f84 add docs + fix hydra for mini repl 2023-10-26 16:01:51 +02:00
Felix Roos 1a456828df Merge branch 'main' into hydra-integration 2023-10-26 14:14:49 +02:00
Felix Roos 5958c69d64 Merge pull request #758 from tidalcycles/play-function
add play function
2023-10-26 14:14:26 +02:00
Felix Roos b14aa901ba also return pat 2023-10-26 13:16:15 +02:00
Felix Roos 535dfb5099 Merge pull request #740 from ilesinge/shabda_shortcut
Add shabda shortcut
2023-10-26 13:11:00 +02:00
Felix Roos 19f1aad88c Merge pull request #751 from ilesinge/alphabet_samples
mini notation: international alphabets support
2023-10-26 13:07:23 +02:00
Felix Roos 9009eccc8e add play function 2023-10-26 13:06:58 +02:00
Felix Roos 7f3cdedef9 basic hydra integration 2023-10-26 13:05:54 +02:00
Felix Roos 05095805f1 Merge pull request #753 from tidalcycles/fix-trailing-slash-bug
hopefully fix trainling slashes bug
2023-10-22 23:00:52 +02:00
Felix Roos 5430147572 use new vite-pwa-astro version from file 2023-10-22 22:53:50 +02:00
Alexandre G.-Raymond 9b9f031fe1 Revert error message length limitation 2023-10-21 23:41:56 +02:00
Felix Roos 2ad63247c2 Merge pull request #748 from ilesinge/fix_krill_readme
Fix krill build command in README
2023-10-21 23:38:50 +02:00
Alexandre G.-Raymond 87f37e3d87 Add a human-readable error message for invalid char in step 2023-10-21 23:20:04 +02:00
Alexandre G.-Raymond cb8edd9b8f Support international alphabets in mininotation 2023-10-21 22:51:20 +02:00
Alexandre G.-Raymond 072ae7280e Fix krill build command in README 2023-10-21 22:26:12 +02:00
Felix Roos e99c299c6f Merge pull request #745 from tidalcycles/fix-slash-confusion
completely revert config mess
2023-10-21 00:20:49 +02:00
Felix Roos 46cdbd514f completely revert config mess 2023-10-21 00:18:41 +02:00
Felix Roos a3e0189f0b Merge pull request #744 from tidalcycles/fix-slash-confusion
fix: try different trailing slash behavior
2023-10-20 22:41:39 +02:00
Felix Roos 8f4344f413 fix: try different trailing slash behavior 2023-10-20 22:38:46 +02:00
Felix Roos 7e28de1d24 Merge pull request #743 from tidalcycles/fix-slash-confusion
fix: trailing slash confusion
2023-10-20 22:34:03 +02:00
Felix Roos 624e685212 fix: trailing slash confusion 2023-10-20 22:32:12 +02:00
Felix Roos a23765a1cb fix: trailing slash confusion 2023-10-20 22:30:54 +02:00
Felix Roos 048502ecd1 Merge branch 'main' into astro-3 2023-10-20 22:08:21 +02:00
Alexandre G.-Raymond 1b072448c4 Add test snapshots for shabda shortcut 2023-10-20 21:59:54 +02:00
Felix Roos 86997488fb Merge pull request #741 from daslyfe/bugfix_choose_with
[Bug Fix] chooseWith: prevent pattern from stopping audio when selection is >= 1 or < 0
2023-10-20 12:07:03 +02:00
Felix Roos db6efec417 Merge pull request #742 from tidalcycles/recipes
Recipes
2023-10-20 11:34:26 +02:00
Felix Roos 2cc60c6ee2 format 2023-10-20 11:28:35 +02:00
Felix Roos 80c98b6a35 fix: loud example 2023-10-20 11:23:38 +02:00
Felix Roos f51c01dc88 move stuff around 2023-10-20 11:18:54 +02:00
Felix Roos 7b8a35a311 add understand cycles 2023-10-20 11:18:47 +02:00
Felix Roos d9db5263e8 add recipes 2023-10-20 11:18:40 +02:00
Jade Rowland 912a661c04 fixed example test failure 2023-10-17 23:03:14 -04:00
Jade Rowland d3edc62fc7 document function 2023-10-17 21:31:11 -04:00
Jade Rowland 6b5de5fec8 fixed 2023-10-17 01:33:51 -04:00
Alexandre G.-Raymond fed4c51aa4 Prettier doc file 2023-10-14 16:30:29 +02:00
Alexandre G.-Raymond 1721209f85 Update samples/shabda documentation 2023-10-14 16:20:53 +02:00
Alexandre G.-Raymond 289820188e Add shabda shortcut (#406) 2023-10-14 16:20:17 +02:00
Felix Roos 4fa0a9064b Merge branch 'main' of https://github.com/tidalcycles/strudel 2023-10-14 10:08:53 +02:00
Felix Roos f751d97c29 Merge pull request #737 from tidalcycles/readme-fix
vite-vanilla-repl readme fix
2023-10-13 12:57:24 +02:00
Felix Roos d7028252c2 vite-vanilla-repl readme fix 2023-10-13 12:55:31 +02:00
Felix Roos a2ee70a964 Merge pull request #717 from vasilymilovidov/reverb
Add support for using samples as impulse response buffers for the reverb
2023-10-10 00:17:59 +02:00
Felix Roos 57b166d13a fix: pitched sample as ir 2023-10-09 22:49:38 +02:00
Felix Roos 5c76f2b9a2 bump superdough to 0.9.10 2023-10-09 22:30:34 +02:00
Felix Roos e59f06ff92 Merge branch 'main' into reverb 2023-10-09 22:15:25 +02:00
Felix Roos d3b96dd048 Merge pull request #732 from tidalcycles/reverb-fix-sr
fix: reverb sampleRate
2023-10-09 21:43:42 +02:00
Felix Roos 6544e8135c fix: reverb sampleRate 2023-10-09 21:40:38 +02:00
Felix Roos 54ed415d75 Merge pull request #731 from tidalcycles/reverb-fix
fix: reverb roomsize not required
2023-10-09 21:34:33 +02:00
Felix Roos f34937d4ae fix: roomsize not required 2023-10-09 21:31:49 +02:00
Felix Roos a4fc40875b Merge pull request #729 from tidalcycles/compressor
Compressor
2023-10-08 13:54:51 +02:00
Felix Roos 56c1441494 snapshot 2023-10-08 13:38:18 +02:00
Felix Roos 08ce8213fc format 2023-10-08 13:37:56 +02:00
Felix Roos 0a3692e459 compressor docs 2023-10-08 13:37:39 +02:00
Felix Roos 341546508f Merge pull request #728 from tidalcycles/fix-sample-url-special-chars
fix: hashes in urls
2023-10-08 13:25:57 +02:00
Felix Roos 444d583a49 fix: hashes in urls 2023-10-08 13:23:13 +02:00
Felix Roos 130ad4451b add compressor + postgain 2023-10-08 00:30:12 +02:00
vmilovidov d24cf8e7ec Merge branch 'main' into reverb 2023-10-07 19:50:05 +04:00
Vasilii Milovidov 2d750a14b9 fix: conflicts 2023-10-07 19:48:07 +04:00
Vasilii Milovidov b25b9d815b fix: conflicts 2023-10-07 19:30:07 +04:00
Felix Roos daf965f119 Merge pull request #727 from tidalcycles/fix-n-scale
consume n with scale
2023-10-07 15:48:06 +02:00
Felix Roos 296cd83a55 snapshot 2023-10-07 15:45:44 +02:00
Felix Roos b297888eb4 consume n with scale 2023-10-07 15:40:08 +02:00
Felix Roos e2569ed6dd Merge pull request #726 from tidalcycles/reverb-perf-pitfall
fix: reverb regenerate loophole
2023-10-07 00:27:21 +02:00
Felix Roos 4718bfac25 fix: reverb regenerate loophole 2023-10-07 00:22:55 +02:00
Vasilii Milovidov 2f0798de32 fix: formatting 2023-10-05 13:17:17 +04:00
vmilovidov 11b0a00593 Merge branch 'main' into reverb 2023-10-05 12:16:55 +04:00
Vasilii Milovidov 1d4eb59e94 fix: reverbGen.mjs 2023-10-05 04:10:35 +04:00
Vasilii Milovidov d6c8838fe2 Integrate with the new impulse generation functionality 2023-10-05 03:49:50 +04:00
Felix Roos 0b888ac54d Merge pull request #718 from Bubobubobubobubo/reverb
Better convolution reverb by generating impulse responses
2023-10-05 00:04:17 +02:00
Felix Roos 75099abbc1 remove unused reverb method 2023-10-05 00:03:02 +02:00
Felix Roos 3c4f835d8b consistent naming + simplify 2023-10-05 00:00:47 +02:00
Felix Roos ce842f7561 simplify createReverb 2023-10-04 23:56:00 +02:00
Felix Roos 508af7eb72 update internal reverb param names 2023-10-04 23:48:53 +02:00
Felix Roos a4386a617a Merge branch 'main' into reverb 2023-10-04 22:10:58 +02:00
Felix Roos 767ba713a6 Merge pull request #723 from tidalcycles/slider-afterthoughts
Slider afterthoughts
2023-10-04 10:31:52 +02:00
Felix Roos 020e85906d fix: slider crash on some platforms 2023-10-04 09:42:10 +02:00
Felix Roos d1ffdd57a5 Merge pull request #713 from Bubobubobubobubo/noise
Add 'white', 'pink' and 'brown' oscillators + refactor synth
2023-10-03 16:39:06 +02:00
Felix Roos 9c9323e040 snapshot 2023-10-03 12:42:56 +02:00
Felix Roos 376cf09565 rename zzfx noise to znoise 2023-10-03 12:41:57 +02:00
Felix Roos 047129223e cache noise 2023-10-03 12:25:47 +02:00
Felix Roos 4b64168faa fix: imports 2023-10-03 12:20:28 +02:00
Felix Roos 2bc6d08410 proper dry wet + pull out noise to extra file 2023-10-03 12:19:30 +02:00
Felix Roos 484bb6b11f refactor synth
- separate waveform / noise oscillators
- pull noise out of getOscillator
- put fm into getOscillator
- simplify overall value plumbing
2023-10-03 10:03:09 +02:00
Felix Roos a0884e2a03 add noise heading + hihat example 2023-10-03 09:09:49 +02:00
Felix Roos 1e352fdf80 codeformat 2023-10-03 08:51:35 +02:00
Felix Roos 83dfbb84c2 Merge branch 'main' into noise 2023-10-03 08:50:57 +02:00
Felix Roos 9043064543 snapshot 2023-10-03 08:36:52 +02:00
Felix Roos a3649148c1 more logical naming + update docs 2023-10-03 08:35:15 +02:00
Felix Roos 28966739f6 feat: add step as slider param 2023-10-02 20:44:51 +02:00
Vasilii Milovidov 13cb32903a Prepare to merge with PR #718 2023-10-02 12:13:44 +04:00
Felix Roos dcd75e0384 Merge branch 'main' into reverb 2023-10-01 23:48:48 +02:00
Felix Roos dfdd9e02ca eslint ignore reverbGen + snapshot 2023-10-01 23:22:32 +02:00
Felix Roos 275796c241 fix: reverbs[orbit] is undefined 2023-10-01 23:21:02 +02:00
Felix Roos 6ca99e33ab codeformat 2023-10-01 23:20:05 +02:00
Raphael Forment 1909caf769 Connecting new reverb documentation 2023-10-01 14:50:29 +02:00
Raphael Forment 2d07eeb518 Connecting all parameters to convolution generator 2023-10-01 14:44:34 +02:00
Felix Roos 1c0da7cd49 Merge branch 'main' of https://github.com/tidalcycles/strudel 2023-10-01 14:20:54 +02:00
Alex McLean fd316c81c0 support mininotation '..' range operator, fixes #715 (#716)
* support mininotation .. range operator, fixes #715

* remove logs
2023-10-01 13:20:49 +01:00
Felix Roos edbd437d7b hotfix: add missing dependency 2023-10-01 14:20:30 +02:00
Felix Roos 9be1f9c18b Merge pull request #714 from tidalcycles/ui-widgets
widgets
2023-10-01 14:15:09 +02:00
Felix Roos 96f06d8026 fix: import 2023-10-01 14:09:07 +02:00
Felix Roos 935d8e8aea fix: comment 2023-10-01 14:08:41 +02:00
Felix Roos 21b99b3810 remove comment 2023-10-01 14:07:48 +02:00
Felix Roos c051a1249d remove checkbox 2023-10-01 14:06:32 +02:00
Felix Roos 564697e175 add extra sliderWithID function
+ add warning to slider function
2023-10-01 14:05:16 +02:00
Felix Roos d4bf358eae use raw css instead of tailwind 2023-10-01 13:56:57 +02:00
Felix Roos f84d5ba3a0 add back some margin 2023-10-01 13:44:41 +02:00
Felix Roos b550ff038c simplify: use native events 2023-10-01 13:42:29 +02:00
Vasilii Milovidov ac9c629c0b cleanup 2023-10-01 15:36:52 +04:00
Vasilii Milovidov 755e24315e use sample as an impulse response for the reverb 2023-10-01 15:31:10 +04:00
Felix Roos c6ecd31ea1 improve mouse tracking 2023-10-01 13:27:44 +02:00
Raphael Forment e600b91a85 bugfixes for parameter passing 2023-10-01 12:02:17 +02:00
Raphael Forment abff279707 Document reverb controls 2023-10-01 11:52:24 +02:00
Vasilii Milovidov fd18508266 wip: use sample as an impulse response for the reverb 2023-10-01 05:15:47 +04:00
Felix Roos d7bc309eeb fix: import 2023-10-01 00:36:34 +02:00
Felix Roos 33c40e5ef8 fix some odd number / string problems 2023-10-01 00:33:10 +02:00
Felix Roos 062d926900 make sliders work! 2023-10-01 00:24:31 +02:00
Raphael Forment 0ad0046a76 Replacing old reverb by better convolution 2023-09-30 22:04:22 +02:00
Felix Roos b36cee93f7 add slider function to scope 2023-09-30 21:22:49 +02:00
Felix Roos 2731e70fb7 use loc as slider id 2023-09-30 21:03:28 +02:00
Felix Roos 276cf858fc match slider as function 2023-09-30 20:39:03 +02:00
Raphael Forment b2acff40c4 Add documentation about noise sources 2023-09-30 15:17:22 +02:00
Raphael Forment e3333e716f Cap noise amount to 1 2023-09-30 15:08:09 +02:00
Raphael Forment bb7b8c2fab Fix noise parameter and FM parameters compatibility 2023-09-30 14:59:43 +02:00
Raphael Forment 389c7be264 Add noise parameter for base oscillators 2023-09-30 14:39:44 +02:00
Raphael Forment c2481e460b Add pink, white and brown oscillators 2023-09-30 14:07:33 +02:00
Felix Roos c93e4a951a match number.slider 2023-09-29 12:58:16 +02:00
Felix Roos aa094bf930 checkbox + number slider 2023-09-29 10:40:00 +02:00
Felix Roos 8a741952df Merge pull request #699 from tidalcycles/midi-in
Midi in
2023-09-28 11:03:09 +02:00
Felix Roos 0dcc55ee16 prevent error 2023-09-28 10:48:31 +02:00
Felix Roos 6c3a3b9e29 dedupe 2023-09-28 10:40:44 +02:00
Felix Roos e4eff8c837 Merge remote-tracking branch 'origin/main' into midi-in 2023-09-28 10:40:24 +02:00
Felix Roos 527b895e3c Merge pull request #710 from tidalcycles/midi-clock
add midi clock support
2023-09-27 22:53:49 +02:00
Felix Roos 4eb0a7b7c0 send start with accurate timing 2023-09-27 22:42:35 +02:00
Felix Roos f11462bf41 sync start / stop automatically too 2023-09-27 22:28:52 +02:00
Felix Roos dea1c31701 use midicmd instead of clock 2023-09-27 22:10:21 +02:00
Felix Roos 68ab43b3ab support midi clock via "clock" control
(not on desktop yet)
2023-09-27 21:26:24 +02:00
Felix Roos cf72e3bba5 fix: add conditional imports to eval scope
+ fire postMessage on start
2023-09-27 21:25:30 +02:00
Felix Roos 62743edf45 bump superdough to 0.9.9 2023-09-25 23:57:19 +02:00
Felix Roos eec3752b5a cleanup 2023-09-25 23:57:09 +02:00
Felix Roos 006fd6c733 Merge pull request #707 from tidalcycles/superdough-worklet
add dough function for raw dsp
2023-09-25 23:06:30 +02:00
Felix Roos 7078e20200 less garbage 2023-09-25 22:56:44 +02:00
Felix Roos 52c01abbe9 encapsulate .dough 2023-09-25 22:39:03 +02:00
Felix Roos 6e26f39751 add dough function for raw dsp 2023-09-25 22:34:31 +02:00
Raphael Forment 08aab9d4d8 Adding vibrato to Superdough sampler
Modulating the `playbackRate` to simulate a vibrato!
2023-09-20 19:44:32 +02:00
Felix Roos dc254bd562 upstream changes 2023-09-17 17:28:25 +02:00
Felix Roos 6c3173f45b Merge branch 'main' into patterns-tab 2023-09-17 17:28:18 +02:00
Felix Roos 30cba7b935 Merge branch 'main' into midi-in 2023-09-17 17:26:42 +02:00
Felix Roos 9e27c0fe2c Merge pull request #705 from vasilymilovidov/main
Update tauri.yml workflow file
2023-09-17 15:53:27 +02:00
vmilovidov 05c09eff19 Update tauri.yml workflow file 2023-09-17 13:26:58 +00:00
vmilovidov 258eb88684 Update tauri.yml workflow 2023-09-17 13:14:13 +00:00
Felix Roos 9c73ef770f snapshot 2023-09-17 13:37:16 +02:00
Felix Roos de9a52366f Publish
- @strudel/codemirror@0.9.0
 - @strudel.cycles/core@0.9.0
 - @strudel.cycles/csound@0.9.0
 - @strudel.cycles/midi@0.9.0
 - @strudel.cycles/mini@0.9.0
 - @strudel.cycles/osc@0.9.0
 - @strudel.cycles/react@0.9.0
 - @strudel.cycles/serial@0.9.0
 - @strudel.cycles/soundfonts@0.9.0
 - superdough@0.9.8
 - @strudel.cycles/tonal@0.9.0
 - @strudel.cycles/transpiler@0.9.0
 - @strudel/web@0.9.0
 - @strudel.cycles/webaudio@0.9.0
 - @strudel.cycles/xen@0.9.0
2023-09-17 12:35:03 +02:00
Felix Roos 57265b9e33 add filter envelopes here and there
+ comment out outroMusic (lame)
2023-09-17 12:34:01 +02:00
Felix Roos b7ef2d97e2 make desktopbridge private for now 2023-09-17 11:50:18 +02:00
Felix Roos 4fb364195c snapshot 2023-09-17 11:18:20 +02:00
Felix Roos 578bede46b fix: tune n -> note 2023-09-17 11:17:37 +02:00
Felix Roos 38a51324b2 Merge pull request #693 from Bubobubobubobubo/vibrato
Adding vibrato to base oscillators
2023-09-17 11:05:05 +02:00
Felix Roos 0e7c9a4001 add vib examples for : notation 2023-09-17 11:01:12 +02:00
Felix Roos 32fee6313b move stuff back 2023-09-17 10:44:15 +02:00
Felix Roos c6a74c040e snapshot 2023-09-17 10:42:51 +02:00
Felix Roos a97384cec1 format 2023-09-17 10:42:21 +02:00
Felix Roos f052adb93a simplify examples 2023-09-17 10:41:22 +02:00
Felix Roos c2560e0cf8 set vib default to .5 2023-09-17 10:41:13 +02:00
Felix Roos cd6d1fb2d2 fix: headings 2023-09-17 10:41:02 +02:00
Felix Roos c354ee32e3 simplify vibrato logic 2023-09-17 10:15:33 +02:00
Felix Roos 5c5df74860 fix: control naming 2023-09-17 10:15:02 +02:00
Felix Roos 887fb6a84c Merge remote-tracking branch 'upstream/main' into vibrato 2023-09-17 09:46:12 +02:00
Felix Roos 80ea9e8de4 Merge pull request #698 from Bubobubobubobubo/sampler
Adding loop points and thus wavetable synthesis
2023-09-17 08:27:36 +02:00
Felix Roos 3879b01ddd snapshots 2023-09-17 08:04:02 +02:00
Felix Roos 4490681fa3 add note about wt_ 2023-09-17 08:03:09 +02:00
Felix Roos b98e24fabf docs: fit + splice 2023-09-17 08:02:02 +02:00
Felix Roos 2deafe214a update loop examples 2023-09-17 07:59:55 +02:00
Felix Roos d0258756e5 Merge remote-tracking branch 'upstream/main' into sampler 2023-09-17 07:31:21 +02:00
Felix Roos 4fecad16e4 superdough 0.9.7 2023-09-16 02:21:10 +02:00
Felix Roos a82eeb44c0 update snapshot 2023-09-16 02:08:25 +02:00
Felix Roos 7ec5ab0c20 fix: tune 2023-09-16 02:05:49 +02:00
Felix Roos 872e10fc95 Merge pull request #692 from Bubobubobubobubo/filters
Adding filter envelopes and filter order selection
2023-09-16 02:03:49 +02:00
Felix Roos e3b7d0f84d drop some acid in there 2023-09-16 02:01:46 +02:00
Felix Roos e0c424eb92 update snapshots 2023-09-16 01:50:45 +02:00
Felix Roos 536427310d add some filter envelopes here and there 2023-09-16 01:50:23 +02:00
Felix Roos a7eb0bb04a snapshot 2023-09-16 01:34:00 +02:00
Felix Roos af6a5b85f5 keep only lp envelopes as examples 2023-09-16 01:33:34 +02:00
Felix Roos b96e8093a0 doc: fenv 2023-09-16 01:33:17 +02:00
Felix Roos 989dc0aabe fix: filters without envelopes 2023-09-16 01:33:09 +02:00
Felix Roos 735f892a08 fix: snapshots 2023-09-16 01:14:53 +02:00
Felix Roos e959c275fd add fanchor 2023-09-16 01:14:14 +02:00
Felix Roos 7dbcc90450 fix: docs after fenv change 2023-09-16 01:07:10 +02:00
Felix Roos 7f86eac8f1 simplify 2023-09-16 00:51:36 +02:00
Felix Roos 40de717cc9 fix: don't add frequency 2023-09-16 00:46:50 +02:00
Felix Roos df211c994d anchored fenv, more logical with negative values
- defaulting to .5 for now...
2023-09-16 00:44:03 +02:00
Felix Roos ee314e9b03 snapshot 2023-09-15 23:38:37 +02:00
Felix Roos 9049a8b964 simplify fenv 2023-09-15 23:37:36 +02:00
Felix Roos 88c029202c simplify fenv examples 2023-09-15 23:37:27 +02:00
Felix Roos 9142fb753a cleaner default filter envelope
- fixes some unexpected envelope glitches
2023-09-15 23:36:55 +02:00
Felix Roos 4688c0bf10 format 2023-09-15 23:13:49 +02:00
Felix Roos 7e55258bbf update snapshots 2023-09-15 23:13:30 +02:00
Felix Roos 828e475921 support negative fenv 2023-09-15 23:12:51 +02:00
Felix Roos 9d5f919023 add all filter envelope examples to doc 2023-09-15 23:12:39 +02:00
Felix Roos b8932390f7 update snapshot 2023-09-15 21:44:24 +02:00
Felix Roos 445881992e slow down examples + simplify 2023-09-15 21:43:03 +02:00
Felix Roos 30d96dcb65 remove log 2023-09-14 16:28:47 +02:00
Felix Roos 3a69fd50bb fix: linting errors 2023-09-14 09:39:31 +02:00
Felix Roos 0f72729f0d midi cc input poc 2023-09-14 09:36:06 +02:00
Felix Roos 0a8874180c generalize getDevice + begin midiIn implementation 2023-09-13 13:48:33 +02:00
Felix Roos a6501474bb Merge branch 'fix-eval-scope' into midi-in 2023-09-13 13:00:52 +02:00
Felix Roos 4cb93ddcde fix: eval scope 2023-09-13 12:59:51 +02:00
Raphael Forment 7f1918ae8c Merge branch 'sampler' of github.com:Bubobubobubobubo/strudel into sampler 2023-09-11 00:56:50 +02:00
Raphael Forment 78adaaedef fixing minor bugs and adding description 2023-09-11 00:56:43 +02:00
Felix Roos 4a65113bff do not panic when no description 2023-09-11 00:52:49 +02:00
Raphael Forment 843d9d52c3 add documentation but it crashes 2023-09-11 00:46:31 +02:00
Raphael Forment 7a74189771 document wavetable synthesis 2023-09-11 00:41:55 +02:00
Raphael Forment 6de04f7781 turn loop on for samples starting with wt_ 2023-09-10 23:29:09 +02:00
Felix Roos ba27f2ba28 fix: looped samples pitch 2023-09-10 21:05:57 +02:00
Felix Roos f09b89ed63 fix: duration for loops 2023-09-10 20:55:59 +02:00
Raphael Forment bac8594c5f beginning documentation work (breaks) 2023-09-10 20:36:09 +02:00
Raphael Forment 3582ae9163 adding loopBegin and loopEnd 2023-09-10 18:34:21 +02:00
Raphael Forment 7a95bafa54 Updating documentation 2023-09-10 09:59:18 +02:00
Raphael Forment 1383af6208 documenting filters more + tests 2023-09-10 09:42:29 +02:00
Raphael Forment bea9a3c2dc replacing fenv by lpenv, hpenv, bpenv 2023-09-10 09:28:07 +02:00
Raphael Forment 78ccec5d7b adding test run 2023-09-10 09:14:41 +02:00
Felix Roos 534e3f7f81 add snapshots 2023-09-10 00:48:04 +02:00
Felix Roos 6a427d6f89 Merge pull request #697 from daslyfe/add_logging_from_tauri
Add logging from tauri
2023-09-09 11:19:57 +02:00
Jade Rowland b4297580a7 changed warning to error 2023-09-09 01:34:35 -04:00
Jade Rowland 26b0e2ae43 its working 2023-09-09 01:27:49 -04:00
Jade Rowland e75ac7b3c0 working 2023-09-09 01:20:08 -04:00
Raphael Forment 74442b0d76 documenting vibrato and removing broken slide/pitchJump mechanism 2023-09-08 13:43:43 +02:00
Raphael Forment 3431803980 documenting vib and vibmod 2023-09-08 13:08:00 +02:00
Raphael Forment c5fb247de6 Documentation for filter envelope 2023-09-08 12:38:39 +02:00
Felix Roos 18640d59da acid party 2023-09-08 03:00:49 +02:00
Felix Roos 48753b2539 fix last crack? 2023-09-08 02:53:08 +02:00
Felix Roos 606dcc8cc3 use fenv to scale above base cutoff? 2023-09-08 02:27:28 +02:00
Felix Roos 9e4c548c69 fix: filter clicks 2023-09-08 02:06:03 +02:00
Felix Roos 75a974643b add missing controls 2023-09-08 01:41:11 +02:00
Felix Roos e2711ba911 fix: filter envelopes + simplify 2023-09-08 01:40:10 +02:00
Raphael Forment 7605198774 parameter renaming 2023-09-05 11:27:42 +02:00
Raphael Forment fc9525e7d8 saner vibrato default 2023-09-05 11:24:21 +02:00
Raphael Forment e597b6473d remove test console log statement 2023-09-05 10:44:41 +02:00
Raphael Forment 16c8dcf788 stable version 2023-09-05 09:56:49 +02:00
Raphael Forment 37842d4fbd Revert "replace odd envelope"
This reverts commit 4319df0cb6.
2023-09-05 09:01:04 +02:00
Felix Roos 133a1d2e8f Merge pull request #694 from daslyfe/tauri_osc_support
Direct OSC Support in Tauri
2023-09-05 00:33:54 +02:00
Jade Rowland 15c15a9c36 remove unused import 2023-09-04 17:09:54 -04:00
Jade Rowland d233d50de3 dont panic if message fails to send 2023-09-04 17:07:50 -04:00
Jade Rowland a9d8e7ca82 cleaning up 2023-09-04 15:33:44 -04:00
Jade Rowland 4001cc9531 cleaning up 2023-09-04 15:33:28 -04:00
Raphael Forment 4319df0cb6 replace odd envelope 2023-09-04 21:24:42 +02:00
Raphael Forment 5be7898522 New technique using ADSR envelope 2023-09-04 21:17:16 +02:00
Jade Rowland 009760c31a correct bit calcuations 2023-09-04 15:00:43 -04:00
Jade Rowland 77349526e4 timetag mishaps 2023-09-04 14:21:30 -04:00
Felix Roos 3ba195c2d9 add new controls
+ rename slide_speed > slidespeed
2023-09-04 18:38:05 +02:00
Raphael Forment 60f5032b12 Implement pitch slide 2023-09-04 06:25:49 +02:00
Raphael Forment fdc201a799 Adding vibrato to synth oscillator 2023-09-04 06:03:05 +02:00
Raphael Forment ec8616a515 Envelope filter and filter order 2023-09-04 04:56:45 +02:00
Jade Rowland 349d11e76d different time strats 2023-09-03 17:36:21 -04:00
Jade Rowland 62e3774ff7 its working 2023-09-03 16:28:52 -04:00
Felix Roos abaeb52b7c Merge pull request #690 from vasilymilovidov/main
fix MIDI CC messages
2023-09-03 22:19:22 +02:00
Jade Rowland 60e600c381 setting up 2023-09-03 13:23:13 -04:00
Vasilii Milovidov 97f84ee87f fix MIDI CC messages 2023-09-03 15:54:34 +04:00
Felix Roos c5738aeed9 Merge pull request #688 from daslyfe/fix_tauri_cpu_midi
add sleep timer + improve message iterating
2023-09-03 10:22:15 +02:00
Jade Rowland 192adccb10 add sleep timer + improve message iterating 2023-09-02 20:59:00 -04:00
Felix Roos defcacb59b bump superdough to 0.9.6 2023-08-31 13:09:16 +02:00
Felix Roos e4ea786956 Merge pull request #684 from Bubobubobubobubo/zzfx
ZZFX Synth support
2023-08-31 13:00:30 +02:00
Felix Roos c9d98bf4d7 fix: tests 2023-08-31 12:58:32 +02:00
Felix Roos 8dd08c360f improve synth docs 2023-08-31 12:56:18 +02:00
Felix Roos d6c4bb0e4e Merge remote-tracking branch 'upstream/main' into zzfx 2023-08-31 12:38:19 +02:00
Felix Roos c54916cdfd Merge pull request #683 from Bubobubobubobubo/betterfmsynth
Wave Selection and Global Envelope on the FM Synth Modulator
2023-08-31 12:36:36 +02:00
Felix Roos e29cf6fcc1 update snapshot 2023-08-31 12:34:49 +02:00
Felix Roos 5b3cd166b0 more clear example 2023-08-31 12:34:16 +02:00
Felix Roos a7246c6518 snapshots 2023-08-31 12:30:01 +02:00
Felix Roos b48fd78cf0 fm envelope docs 2023-08-31 12:29:29 +02:00
Felix Roos 66c895ee3c fix: bad import 2023-08-31 11:52:49 +02:00
Felix Roos 37c450dd83 Merge remote-tracking branch 'upstream/main' into betterfmsynth 2023-08-31 11:52:41 +02:00
Felix Roos 4c744da3e2 add zzfx sound + zzfx control to override params 2023-08-31 10:52:36 +02:00
Felix Roos 388e7b3c2f add doc 2023-08-31 09:46:36 +02:00
Felix Roos 6ec5377381 add lfo alias for repeatTime 2023-08-31 09:46:30 +02:00
Felix Roos 24ec47e4ff fix: comments 2023-08-31 07:58:31 +02:00
Felix Roos 4a122523d9 fix: import 2023-08-31 07:55:09 +02:00
Felix Roos 1241911ec0 rename more stuff + pull out fork 2023-08-31 07:53:41 +02:00
Felix Roos 0f54bb1938 rename some params + use correct duration 2023-08-31 06:57:08 +02:00
Felix Roos a3b55aa5cc Merge pull request #685 from daslyfe/desktop_midi_bridge
Create Midi Integration for Tauri Desktop app
2023-08-31 05:52:17 +02:00
Felix Roos 4fa02a483b Merge pull request #681 from tidalcycles/protracker-font
teletext theme + fonts
2023-08-31 05:32:15 +02:00
Felix Roos a786c642f1 remove weird flags 2023-08-31 05:25:18 +02:00
Felix Roos 1bade7bee8 urgh npm 2023-08-31 05:23:08 +02:00
Felix Roos d399df8798 Merge pull request #674 from tidalcycles/waveformn
control osc partial count with n
2023-08-31 05:20:55 +02:00
Felix Roos 749b11a5ea fix: history 2023-08-31 05:12:33 +02:00
Felix Roos 328af5f560 fix: move desktopbridge dependency to website 2023-08-31 05:10:17 +02:00
Felix Roos 876f97e9a2 fix: exp envelope allow 0 without blowup 2023-08-31 04:35:35 +02:00
Felix Roos 26d7a32f11 remove comments 2023-08-31 04:26:14 +02:00
Felix Roos 3057773009 keep sine as fm default 2023-08-31 04:25:40 +02:00
Felix Roos 6ca89cb907 keep sine as mod default 2023-08-31 04:25:12 +02:00
Felix Roos 88b5b9b21c fix: history 2023-08-31 04:24:44 +02:00
Felix Roos 6bcf8b91cc fix: getExpEnvelope full adsr 2023-08-31 04:22:54 +02:00
Felix Roos 7cf7ebc555 fix: condition flip 2023-08-31 04:17:49 +02:00
Felix Roos ee0aaca2b0 only use fm envelope when needed 2023-08-31 04:13:41 +02:00
Felix Roos b1b084452c fix: format 2023-08-31 03:56:31 +02:00
Felix Roos 213b1a2dae pull out debugging fn 2023-08-31 03:53:52 +02:00
Felix Roos b991cfc493 fix: use custom version of ZZFX
- ZZFX audio context broke tests
- only needed buildSamples function
2023-08-31 03:50:38 +02:00
Felix Roos 90cdea3656 fix: double registering 2023-08-30 15:32:45 +02:00
Felix Roos 1463f27a0f move zzfx stuff to separate file 2023-08-30 15:27:07 +02:00
Felix Roos afb8ab44cf more zzfx wiring 2023-08-30 15:25:23 +02:00
Jade Rowland 282f36c47c fix lock file 2023-08-30 09:17:12 -04:00
Raphael Forment c3f27d1ad9 Boilerplate for ZZFX Synth support 2023-08-30 14:32:20 +02:00
Jade Rowland ad230a8dc7 remove console statement 2023-08-30 08:32:13 -04:00
Jade Rowland c29c4c0a8b configuring package, wiring everything together 2023-08-30 08:24:02 -04:00
Jade Rowland 284f5615cc bridge functionality for midi 2023-08-29 18:14:02 -04:00
Raphael Forment c625096f59 removing comments 2023-08-29 17:29:50 +02:00
Raphael Forment c3cd5d08c9 adding linear and exponential envelope for fm synthesis 2023-08-29 17:25:27 +02:00
Raphael Forment c87c3c6672 Revert "envelopes on fmsynth"
This reverts commit 8fc7688585.
2023-08-29 16:31:47 +02:00
Raphael Forment 8fc7688585 envelopes on fmsynth 2023-08-29 13:46:43 +02:00
Raphael Forment 94bcfb11de removing rogue console.log 2023-08-29 13:16:39 +02:00
Raphael Forment ebeaac3c5f adding fm wave choice 2023-08-29 12:54:17 +02:00
Felix Roos 942ffc038d add font credit 2023-08-29 00:57:41 +02:00
Felix Roos 9de344e48d delete protracker font 2023-08-29 00:45:16 +02:00
Felix Roos 5efea045d2 delete protracker theme 2023-08-29 00:30:16 +02:00
Felix Roos 6bd3274a4b remove protracker theme + font (not good) 2023-08-29 00:27:20 +02:00
Felix Roos a179313db2 teletext: add panel bg 2023-08-29 00:19:57 +02:00
Felix Roos 289376840e add mode7 font
+ can now inject custom theme styles
2023-08-28 23:52:24 +02:00
Felix Roos 0e3d84e5ca add teletext theme + font 2023-08-28 19:21:17 +02:00
Felix Roos cb643f8fd9 add protracker theme
+ fix: make sure all text has a bg
2023-08-28 18:54:33 +02:00
Felix Roos 1faa81099c add protracker3 font 2023-08-28 14:50:06 +02:00
Felix Roos 2dc079b950 Merge pull request #680 from tidalcycles/emoji-support
add emoji support
2023-08-27 22:18:06 +02:00
Felix Roos f6cf740507 add emoji support 2023-08-27 22:11:22 +02:00
Felix Roos 338c866d83 Merge pull request #679 from tidalcycles/pianoroll-improvements
Pianoroll improvements
2023-08-27 16:12:32 +02:00
Felix Roos 038e6c312b dedupe .pianoroll 2023-08-27 16:05:58 +02:00
Felix Roos 6f6def34f7 fix: improve performance of setting patterning 2023-08-27 15:35:44 +02:00
Felix Roos 88651149d3 fix: don't import emoji pkg 2023-08-27 15:28:46 +02:00
Felix Roos e301090704 pianoroll improvements:
- add label / activeLabel controls
- add new pianoroll options:
  - fill
  - fillActive
  - strokeActive
  - stroke
  - hideInactive
  - colorizeInactive
  - fontFamily
- add wordfall method
- fix: some haps were drawn with wrong length
- pianoroll labels now use set fontFamily
- hide fold gutter
2023-08-27 15:27:30 +02:00
Felix Roos d0f8a612ad Merge pull request #677 from tidalcycles/scope
Scope
2023-08-26 21:22:16 +02:00
Felix Roos a7728e3d81 comment new controls 2023-08-26 21:16:46 +02:00
Felix Roos 4dadc18a3a fix: import 2023-08-26 21:12:02 +02:00
Felix Roos 43efe6921d move scope to webaudio package 2023-08-26 21:11:24 +02:00
Felix Roos 2e31c8695a use Float32 for higher precision 2023-08-25 16:29:41 +02:00
Felix Roos 988bd8ccdc rename stuff 2023-08-25 12:40:04 +02:00
Felix Roos 965794712e fscope + scaling options 2023-08-25 12:39:47 +02:00
Felix Roos 68ea086e2a improve canvas quality on retina 2023-08-25 12:39:38 +02:00
Felix Roos 7370f41fa0 basic scope feature 2023-08-25 09:45:30 +02:00
Felix Roos 5cbe30095b control osc partial count with n 2023-08-24 12:21:29 +02:00
Felix Roos c75c3f1ab1 basic pattern add function 2023-08-24 11:55:21 +02:00
Felix Roos 281ad5fac9 add nanFallback for better errors 2023-08-24 08:50:42 +02:00
Felix Roos eb0301d74e remove annoying logs 2023-08-24 08:50:18 +02:00
Felix Roos 4a76757dd2 Merge branch 'main' into patterns-tab 2023-08-23 22:56:12 +02:00
Felix Roos 1855dae35e add patterns tab with examples 2023-08-23 22:51:36 +02:00
Felix Roos f20c5a1bcb Merge pull request #668 from daslyfe/midi_time_fixes
Midi time fixes
2023-08-23 21:50:50 +02:00
Felix Roos 02979926fd bump superdough 2023-08-20 23:50:38 +02:00
Felix Roos b08337af45 Merge pull request #669 from tidalcycles/fm
basic fm
2023-08-20 23:19:07 +02:00
Felix Roos 980c1e4812 simplify 2023-08-20 22:45:05 +02:00
Felix Roos f43dd8db1b add doc 2023-08-20 22:41:49 +02:00
Felix Roos badda165fe add snapshot 2023-08-20 22:39:46 +02:00
Felix Roos f7d17875c0 fix: lint 2023-08-20 22:36:44 +02:00
Felix Roos 0c124bcca3 basic fm 2023-08-20 22:32:27 +02:00
Jade Rowland 3eb63f1730 round duration down 2023-08-19 15:10:53 -04:00
Jade Rowland abb0b3b4c0 dont round duration 2023-08-19 15:09:46 -04:00
Jade Rowland 42662748d3 cleaning up changes 2023-08-19 15:06:55 -04:00
Jade Rowland b5b866a894 time clock improvements 2023-08-19 01:08:41 -04:00
Felix Roos 4e7e715f10 rename footer -> panel 2023-08-19 00:20:46 +02:00
Felix Roos 5be1004292 encapsulate panel tabs 2023-08-19 00:19:32 +02:00
Felix Roos 01cccc6462 hotfix: panel z-index < autocomplete 2023-08-19 00:06:44 +02:00
Felix Roos 9287b8ea42 Merge pull request #667 from tidalcycles/toggle-sidebar
togglable panel position
2023-08-18 23:56:20 +02:00
Felix Roos 5fabc5c7f9 let to const 2023-08-18 23:53:37 +02:00
Felix Roos 61dc6f980d ignore tauri dist for format-check 2023-08-18 23:48:00 +02:00
Felix Roos 84328cfb90 fix: format 2023-08-18 23:46:26 +02:00
Felix Roos 37a35022f5 fix panel scroll
+ move to bottom when minimized
2023-08-18 23:45:55 +02:00
Felix Roos 3afe540111 add hint for zen mode 2023-08-18 23:32:30 +02:00
Felix Roos 35687b1ee0 fix reference style for right panel 2023-08-18 23:32:22 +02:00
Felix Roos 195e6b61f9 fix settings style for right panel 2023-08-18 23:23:12 +02:00
Felix Roos dabc0331cb fix panel scroll 2023-08-18 23:19:19 +02:00
Felix Roos 824abb0406 Merge pull request #666 from daslyfe/osc_fixes
fix osc bundle timestamp glitches caused by drifting clock
2023-08-18 15:59:20 +02:00
Felix Roos f6789aaace togglable panel position 2023-08-18 15:58:51 +02:00
Jade Rowland 10bce85561 fix osc bundle timestamp glitches caused by drifting clock 2023-08-17 18:01:41 -04:00
Felix Roos cd0f1b6c5c bump: superdough 0.9.4 2023-08-17 11:42:24 +02:00
Felix Roos 834bb7d777 Merge pull request #664 from tidalcycles/superdough
superdough: encapsulates web audio output
2023-08-17 11:36:07 +02:00
Felix Roos 5c1d7baf72 superdough readme doc 2023-08-17 11:23:17 +02:00
Felix Roos 8bdbc9ec4c superdough: add logger 2023-08-17 10:08:55 +02:00
Felix Roos 0c6a0720af bump superdough to 0.9.3 2023-08-11 12:35:18 +02:00
Felix Roos c6095fd92a add disableWorklets option to initAudio 2023-08-11 12:35:00 +02:00
Felix Roos 7d0fb0de83 Revert "rename: superdough.mjs > webaudio.mjs"
This reverts commit 75281afe05.
2023-08-11 12:22:03 +02:00
Felix Roos 75281afe05 rename: superdough.mjs > webaudio.mjs
(to keep history?)
2023-08-11 12:20:36 +02:00
Felix Roos 738e714f45 use superdough in webaudio package 2023-08-11 12:13:24 +02:00
Felix Roos 898bfaeecf bump to 0.9.2 2023-08-11 11:13:31 +02:00
Felix Roos 7f44d9cdd2 add link to codesandbox 2023-08-11 11:09:33 +02:00
Felix Roos 8d9be21c8a better code example 2023-08-11 10:56:57 +02:00
Felix Roos 82cb4c8c11 fix: still had strudel core imports 2023-08-11 10:51:59 +02:00
Felix Roos 2778e4d697 fix: build entry file 2023-08-11 10:43:59 +02:00
Felix Roos 30fe2dd502 add superdough package 2023-08-11 10:42:59 +02:00
gogins 1170ff58ee Fix for #1. 2023-08-10 20:26:37 -04:00
Felix Roos 2483bf812f Merge pull request #660 from tidalcycles/fix-multiple-triggers
fix: always run previous trigger
2023-08-11 00:06:21 +02:00
Felix Roos 7a999de602 fix: always run previous trigger
+ make dominantTrigger more dominant
2023-08-11 00:04:09 +02:00
Felix Roos 1929c27225 Merge pull request #659 from tidalcycles/fix-console-welcome
fix: welcome message for latestCode
2023-08-10 23:54:58 +02:00
Felix Roos 0cf5c9c7d6 fix: welcome message for latestCode 2023-08-10 23:51:04 +02:00
Felix Roos c20b691683 Merge pull request #657 from daslyfe/main
[Bug Fix] Midi: Don't treat note 0 as false
2023-08-07 07:45:26 +02:00
Jade Rowland 5c2101de1a [Bug Fix] Midi: Don't treat note 0 as false 2023-07-29 13:34:02 -04:00
Felix Roos 2ec2e81511 Merge pull request #656 from daslyfe/main
[Bug Fix] Account for numeral notation when converting to midi
2023-07-29 09:06:17 +02:00
Jade Rowland ac3d8b832c [Bug Fix] Account for numeral notation when converting to midi 2023-07-29 01:29:05 -04:00
Felix Roos ad174957e8 Merge pull request #653 from tidalcycles/ireal-voicings
ireal voicings
2023-07-23 22:18:48 +02:00
Felix Roos 9b3fa83516 add common chord symbol aliases 2023-07-23 22:05:42 +02:00
Felix Roos 52b8d9d361 add octaves control for arpeggios 2023-07-23 21:18:34 +02:00
Felix Roos d231ded7a2 fix: ^7 voicings 2023-07-23 21:18:18 +02:00
Felix Roos 5f57951e3d fix: add empty string as major alias 2023-07-23 14:10:38 +02:00
Felix Roos b1a4788442 a few more voicings 2023-07-23 14:06:25 +02:00
Felix Roos 6377378a3d sort by topnote and then by bottom note
(easier to track diffs)
2023-07-23 13:31:47 +02:00
Felix Roos 45b91cdea5 fix: major chords 2023-07-23 09:57:34 +02:00
Felix Roos d5647c6760 sort voicings by top note 2023-07-23 09:51:21 +02:00
Felix Roos f419559bde Merge remote-tracking branch 'origin/main' into ireal-voicings 2023-07-22 16:22:49 +02:00
Felix Roos 4cfaa39419 fix: flip subtraction 2023-07-22 13:54:43 +02:00
Felix Roos d6b1762adf Merge pull request #652 from tidalcycles/understand-pitch
Understand pitch
2023-07-22 09:30:21 +02:00
Felix Roos 45c3293385 format 2023-07-22 09:28:51 +02:00
Felix Roos 92d574605e small fixes 2023-07-22 09:26:34 +02:00
Felix Roos cec7b90631 finish pitch page 2023-07-22 09:19:13 +02:00
Felix Roos aa3cb35f09 better exponent display 2023-07-21 18:42:47 +02:00
Felix Roos 7373138e3d improve pitch page 2023-07-21 17:46:45 +02:00
Felix Roos 2d8176f213 begin pitch page 2023-07-21 14:40:47 +02:00
Felix Roos 8589d72aee fix: console error 2023-07-21 14:40:40 +02:00
Felix Roos 626b50087a Merge branch 'main' into docs 2023-07-21 10:02:02 +02:00
Felix Roos 1e62554dfb add links 2023-07-20 23:43:53 +02:00
Felix Roos bcf800482b fix: chord typo + export only voicings 2023-07-20 23:43:08 +02:00
Felix Roos 08f94d2122 add ireal voicings 2023-07-20 22:53:02 +02:00
Felix Roos 559cfd11db Merge pull request #651 from tidalcycles/update-vitest
update vitest
2023-07-17 23:42:59 +02:00
Felix Roos ce820c2314 update vitest 2023-07-17 23:37:51 +02:00
Felix Roos 8583ed0e5c Merge pull request #647 from tidalcycles/tonleiter
stateless voicings + tonleiter lib
2023-07-17 23:34:33 +02:00
Felix Roos f2c16a06a1 fix: note2oct 2023-07-17 23:10:13 +02:00
Felix Roos 584d469a73 Merge pull request #650 from bwagner/tonleiter
FIXES: TODO in rotateChroma
2023-07-17 17:57:16 +02:00
Bernhard Wagner 4298e582fb FIXES: note2pc TODOs 2023-07-14 14:38:26 +02:00
Bernhard Wagner a3fdfbbc16 FIXES: weird gain difference 2023-07-14 14:04:35 +02:00
Bernhard Wagner b8929a0d18 FIXES: prettier formatting 2023-07-14 13:56:36 +02:00
Bernhard Wagner 0fa5832b63 FIXES: TODO in rotateChroma 2023-07-14 13:45:27 +02:00
Felix Roos bbb29ebd7c fix: duck mode with n
+ detect chord obj in rootNotes
2023-07-13 12:52:57 +02:00
Felix Roos 0fd9ac6da3 feat: support strings in voicing function 2023-07-13 12:13:00 +02:00
Felix Roos e53098b179 fix: tests 2023-07-13 11:58:24 +02:00
Felix Roos 78dcab2778 fix: control interference 2023-07-13 11:24:57 +02:00
Felix Roos e05f74cef1 docs + rename under -> duck, quak quak 2023-07-13 10:49:08 +02:00
Felix Roos 3d8724c90d snapshot 2023-07-13 01:11:31 +02:00
Felix Roos ffeda19ce5 snapshots + fix default anchor for lefthand 2023-07-13 01:09:53 +02:00
Felix Roos 70fe8f14e3 refactor: voicings -> voicing in tunes 2023-07-13 01:09:29 +02:00
Felix Roos a639d9f49f fix: remove log 2023-07-13 00:25:24 +02:00
Felix Roos e5251422fe revert changing existing addVoicings
+ add registerVoicings for the new logic
2023-07-13 00:20:28 +02:00
Felix Roos d8f80c058d can now set mode and anchor on voicing dictionary 2023-07-12 23:47:13 +02:00
Felix Roos 4cf3655c08 voicing modes: below, under, above 2023-07-12 23:32:27 +02:00
Felix Roos 58fc786462 noteToMidi: adjustable default octave
+ pull out static objects
2023-07-12 23:32:02 +02:00
Felix Roos 81b142704c change call signature of renderVoicing
+ pull logic in from voicings function
2023-07-12 22:55:34 +02:00
Felix Roos b0cbeda796 fix: support existing voicing dicts in new logic
+ rename voiceBelow to renderVoicing
2023-07-12 22:38:44 +02:00
Felix Roos 0b3a8a5f65 - make dictionary a control
- standalone voicing function
- simplify voicing control names
2023-07-11 22:49:34 +02:00
Felix Roos d7d8d2a3e6 Merge pull request #645 from tidalcycles/slice
slice: list mode
2023-07-10 19:07:45 +02:00
Felix Roos d5c0309885 feat: support n for voicing scales
+ simplify voicing logic
2023-07-09 22:11:40 +02:00
Felix Roos 36fa9d81fb fix: pianoroll isActive still used whole.end 2023-07-09 18:51:26 +02:00
Felix Roos 35f5a5d11a feat: add voiceOffset (2) 2023-07-09 16:53:41 +02:00
Felix Roos d1fe50e271 feat: add voiceOffset 2023-07-09 16:53:29 +02:00
Felix Roos 2d08b31f9a fix: tests 2023-07-08 16:14:25 +02:00
Felix Roos 27643f4a48 doc: slice 2023-07-08 16:12:21 +02:00
Felix Roos 110e179e9e wip: new voicing function 2023-07-08 12:41:17 +02:00
Felix Roos fe6d99d4f1 slice array notation 2023-07-07 21:48:19 +02:00
Felix Roos 06fbcbe24b docs: add slice effect 2023-07-07 21:48:03 +02:00
Felix Roos f40b57ee48 hotfix: remove log 2023-07-06 09:59:20 +02:00
Felix Roos 9438c69bed comment 2023-07-06 09:58:57 +02:00
Felix Roos 70d6f3000a move tonleiter 2023-07-06 09:58:48 +02:00
Felix Roos d47fd0cf18 Merge pull request #639 from tidalcycles/delete-old-packages
Delete old packages
2023-07-04 23:50:30 +02:00
Felix Roos 40117fbe54 package-lock 2023-07-04 23:47:37 +02:00
Felix Roos 7466d8a1de delete webdirt 2023-07-04 23:44:36 +02:00
Felix Roos ce09443e48 delete tone 2023-07-04 23:43:49 +02:00
Felix Roos 1718dbe94e delete eval package 2023-07-04 23:41:29 +02:00
Felix Roos 69894db206 Merge pull request #634 from tidalcycles/highlight-ids
Adaptive Highlighting
2023-07-04 23:38:41 +02:00
Felix Roos 6e4c873248 remove tests from soon removed package 2023-07-04 22:17:44 +02:00
Felix Roos 64693ffd26 fix: remove test flag 2023-07-04 22:16:02 +02:00
Felix Roos 66f8ca72c1 refactor: remove old location methods
docs: update repl chapter to reflect new transpiler behavior
2023-07-04 22:13:40 +02:00
Felix Roos c82f7bd8fe Merge pull request #636 from mindofmatthew/highlight-ids
More work on highlight IDs
2023-07-04 21:55:57 +02:00
Felix Roos 34176ab5f8 refactor:
- dedupe flash / highlighting logic
- codemirror logic now lives only in codemirror package
- remove old highlighting logic
- use codemirror package in react package
- cleanup CodeMirror6.jsx
- pull setMiniLocations into useHighlighting
- migrate MiniRepl, nano-repl + Repl to new highlighting
2023-07-04 21:49:39 +02:00
Felix Roos 7f12ce9b45 fix: format 2023-07-04 18:47:44 +02:00
Felix Roos 9e1b9f7f5c Merge remote-tracking branch 'upstream/main' into highlight-ids 2023-07-04 18:46:05 +02:00
Felix Roos 23e949de1c Merge pull request #637 from tidalcycles/snapshots-sort-haps-by-part
snapshot tests: sort haps by part
2023-07-04 18:44:47 +02:00
Felix Roos 00bd60a855 snapshot tests: sort haps by part 2023-07-04 18:43:26 +02:00
Felix Roos dacd9afac0 comment out opacity logic for now 2023-07-04 18:34:22 +02:00
Felix Roos 3fc5bb31d0 fix: do not recreate haps mapping on update 2023-07-04 18:22:22 +02:00
Felix Roos 78770888a5 remove mock positions 2023-07-04 18:16:58 +02:00
Matthew Kaney f5b092acf2 Split up highlighting logic and add progress flash 2023-07-03 17:06:39 -04:00
Matthew Kaney ba9562f000 Remove highlights when code stops 2023-07-03 10:52:06 -04:00
Matthew Kaney aded178ab7 Pass mininotation locations into highlight state 2023-07-03 03:55:49 -04:00
Felix Roos 0b5d905120 fix: adaptive highlighting
- transpiler now uses m function with globalOffset
- patternifyAST now accepts global offset
- patternifyAST now calls .withLoc with global leaf location
- .withLoc replaces .withLocation + .withMiniLocation
- simple locs (offsets) are now used everywhere
- some tests fail, seems some haps have reordered...
- wip: Repl still uses hardcoded updateMiniLocations
- todo: find way to call updateMiniLocations dynamically
2023-07-03 05:15:32 +02:00
Felix Roos 08abec8fd5 fix: init phase 2023-07-02 18:37:56 +02:00
Felix Roos 63c23736ad wip: adaptive highlighting 2023-07-02 18:33:44 +02:00
Felix Roos f7bd373ce6 update package-lock 2023-07-02 14:17:15 +02:00
Felix Roos 8e717d2ea1 - transpiler now always returns an object
- emit transpiler metadata from evaluate / afterEval
- currently logging miniLocations from Repl.jsx
2023-07-02 14:15:54 +02:00
Felix Roos 5f271ed127 add emitMiniLocations flag to transpiler 2023-07-02 13:42:41 +02:00
Felix Roos d686b65dbe add 2 more tests 2023-07-01 23:55:41 +02:00
Felix Roos c7e882e001 mini: leaf location retrieval
- add onEnter callback for patternifyAST
- add leaf node location helpers
- add tests
2023-07-01 23:52:31 +02:00
Felix Roos f07859996e Merge pull request #631 from tidalcycles/fix-canvas-resize
fix: update canvas size on window resize
2023-06-30 22:47:39 +02:00
Felix Roos fbc73bc78a Merge pull request #630 from tidalcycles/out-of-range-error
fix: out of range error
2023-06-30 22:45:41 +02:00
Felix Roos bd8ad1ed1b fix: out of range error due to rerender 2023-06-30 22:40:02 +02:00
Felix Roos dc2ff83fa5 do not flash when empty 2023-06-30 22:38:14 +02:00
Felix Roos 13545d147b optimize rendering 2023-06-30 22:37:55 +02:00
Felix Roos 1b85aa713b fix: update canvas size on window resize 2023-06-30 16:03:56 +02:00
Felix Roos 90a58858ca Publish
- @strudel/codemirror@0.8.4
 - @strudel.cycles/core@0.8.2
 - @strudel.cycles/csound@0.8.0
 - @strudel.cycles/eval@0.8.0
 - @strudel.cycles/midi@0.8.0
 - @strudel.cycles/mini@0.8.2
 - @strudel.cycles/osc@0.8.0
 - @strudel.cycles/react@0.8.0
 - @strudel.cycles/serial@0.8.0
 - @strudel.cycles/soundfonts@0.8.2
 - @strudel.cycles/tonal@0.8.2
 - @strudel.cycles/tone@0.8.0
 - @strudel.cycles/transpiler@0.8.2
 - @strudel/web@0.8.3
 - @strudel.cycles/webaudio@0.8.2
 - @strudel.cycles/webdirt@0.8.0
 - @strudel.cycles/xen@0.8.0
2023-06-30 08:17:19 +02:00
Felix Roos 8149b85a55 Merge pull request #627 from tidalcycles/fix-clock-drift
fix: midi clock drift
2023-06-30 08:14:40 +02:00
Felix Roos e79b6c514a Merge pull request #621 from tidalcycles/tauri-fs
desktop: play samples from disk
2023-06-29 22:02:27 +02:00
Felix Roos aaa894d74b Merge pull request #620 from tidalcycles/loopAt
cps dependent functions
2023-06-29 21:59:42 +02:00
Felix Roos b55721f16f fix: midi clock drift 2023-06-29 21:58:15 +02:00
Felix Roos b39d948d71 fix: build 2023-06-29 12:32:59 +02:00
Felix Roos 0fee279e3d rename fay to fit 2023-06-29 12:05:31 +02:00
Felix Roos c7d8a9cb82 fix: playFile import 2023-06-29 12:05:09 +02:00
Felix Roos b50075f102 feat: can now load disk samples via samples
+ encapsulate file logic from FilesTab
2023-06-29 10:47:20 +02:00
Felix Roos fb3ca9f960 feat: register fn for sample prefix handling 2023-06-29 10:46:32 +02:00
Felix Roos 058b971870 can now play samples from file system
- ui still wip
2023-06-29 02:02:00 +02:00
Felix Roos 610ea414c1 expose tauri fs api 2023-06-29 02:01:22 +02:00
Felix Roos cc6997baec - encapsulate sample map handling
- add resolveUrl param
2023-06-29 02:00:59 +02:00
Felix Roos d126c28b85 fix: loopAt with cps 1 for fallback 2023-06-28 22:25:49 +02:00
Felix Roos c1649b9dc0 - fix: loopAt for non default cps value
- add fay to repitch samples to fit hap duration
- add setcpm function
2023-06-28 22:13:05 +02:00
Felix Roos b0a8d12112 Merge pull request #520 from paikwiki/patch-1
Fix typo on packages.mdx
2023-06-26 22:45:04 +02:00
Felix Roos b5160d38cb another dummy commit 2023-06-26 22:43:14 +02:00
Felix Roos 360e9b5936 dummy commit 2023-06-26 22:41:47 +02:00
Felix Roos 85a6cd828e Merge pull request #606 from tidalcycles/setting-patterning
patterning ui settings
2023-06-26 22:35:02 +02:00
Felix Roos e698f19a64 Merge pull request #614 from tidalcycles/spirals
add spiral viz
2023-06-26 22:32:46 +02:00
Felix Roos 83c1b580dd Merge pull request #613 from vasilymilovidov/tauri
tauri test
2023-06-26 22:17:46 +02:00
vvm 9273e1f8ed fix tauri icons 2023-06-26 13:13:22 +04:00
vvm 5287825279 tauri workflow fixes 2023-06-26 11:27:21 +04:00
vvm 5567959afd add tauri github workflow 2023-06-26 01:58:16 +04:00
Felix Roos eaab36b051 add spiral viz 2023-06-25 14:23:18 +02:00
vvm 9a4f3af580 add README 2023-06-24 02:34:02 +04:00
vvm b83664dfce add build optimizations 2023-06-24 02:32:57 +04:00
vvm 349f7ae965 init 2023-06-23 21:14:55 +04:00
vvm 6f41716ab5 init 2023-06-23 21:06:10 +04:00
Felix Roos abeb62dea8 Merge pull request #612 from tidalcycles/fix-links
fix: doc links
2023-06-23 09:59:43 +02:00
Felix Roos 7cfed80443 Merge pull request #598 from tidalcycles/clip-support-floats
clip now works like legato in tidal
2023-06-23 09:55:18 +02:00
Felix Roos 36aa7d9b25 Merge pull request #607 from tidalcycles/doc-fixes
tonal fixes
2023-06-18 10:36:17 +02:00
Felix Roos 2a449ad3c0 rename tonal api -> tonal functions 2023-06-18 10:32:51 +02:00
Felix Roos a71c5957cc fix: better fix 2023-06-16 14:23:39 +02:00
Felix Roos eef6c7d55e quick fix: typo 2023-06-16 14:20:49 +02:00
Felix Roos 3872322da1 allow patterning theme + font settings 2023-06-16 13:45:13 +02:00
Felix Roos f1e850a62a fix: doc links 2023-06-16 09:20:29 +02:00
Felix Roos 8d9278419d fix: flatten scale lists 2023-06-15 20:19:31 +02:00
Felix Roos 0862827a51 Merge pull request #581 from roipoussiere/line_wrap
editor: enable line wrapping
2023-06-15 12:51:40 +02:00
Roipoussiere f37a220a05 add checkbox in settings to enable line wrapping 2023-06-15 11:52:29 +02:00
Felix Roos aa51c2b6dd Merge remote-tracking branch 'upstream/main' into line_wrap 2023-06-15 10:59:52 +02:00
Felix Roos 92da70a7ae Merge remote-tracking branch 'origin/main' into clip-support-floats 2023-06-15 10:46:10 +02:00
Felix Roos a55862fc25 Merge pull request #602 from tidalcycles/ratio-function
add ratio function
2023-06-15 10:22:46 +02:00
Felix Roos 09b14a5702 add ratio function 2023-06-14 23:19:04 +02:00
Felix Roos 260b831815 refactor: legato -> clip 2023-06-14 00:22:55 +02:00
Felix Roos 665cf6ac65 Merge pull request #588 from roipoussiere/enable_autocomplete
enable auto-completion
2023-06-12 23:24:28 +02:00
Felix Roos 5e90021698 update snapshot 2023-06-12 23:12:40 +02:00
Felix Roos 16aeb7e12c docs: update clip entry 2023-06-12 23:11:07 +02:00
Felix Roos b4cbec173b only accept undefined for clip 2023-06-12 22:58:25 +02:00
Felix Roos 8c9e06c329 - clip now works like legato in tidal
- supports floats
- hap.duration now respects clip value
- hap.endClipped is now end*clip
- visualizations show clipped length
- clip(0) will now be silence
2023-06-12 22:39:32 +02:00
Felix Roos e4a35fdd72 Merge pull request #597 from tidalcycles/cursor-fix
improve cursor
2023-06-11 22:04:17 +02:00
Felix Roos 370d82e66c + disable cursor blink
+ make cursor thicker
2023-06-11 20:21:11 +02:00
Felix Roos 876e851517 Merge pull request #570 from dariacotocu/branch-daria
Solmization added
2023-06-11 20:00:45 +02:00
Felix Roos 190fe37a9f move solmization logic from midi2note to sol2note 2023-06-11 19:55:24 +02:00
Felix Roos 623661f8d2 Merge remote-tracking branch 'upstream/main' into branch-daria 2023-06-11 19:54:55 +02:00
Felix Roos f31bc3f8c5 Merge pull request #591 from tidalcycles/fix-fast0
fix: division by zero
2023-06-11 19:45:00 +02:00
Felix Roos 12fc48544c Merge pull request #596 from tidalcycles/fix-option-dot
Fix option dot
2023-06-11 19:44:40 +02:00
Felix Roos 3b4e44a9fd fix: main repl option-dot on mac 2023-06-11 13:55:11 +02:00
Felix Roos 7850fb727e fix: allow f for flat notes like tidal 2023-06-11 13:23:45 +02:00
Felix Roos 9b3122837e fix: division by zero 2023-06-11 13:15:52 +02:00
Felix Roos d4c59cc73b fix:typo + remove notes 2023-06-11 11:21:19 +02:00
Felix Roos fe36bf54b2 Merge commit '4d8308a763a632cc4dd93ed2a2ab129eb957af72' 2023-06-09 21:39:14 +02:00
Felix Roos 4d8308a763 fix: link goes to wrong language 2023-06-09 21:33:32 +02:00
Felix Roos 11f26c1e2c Merge pull request #587 from tidalcycles/workshop-new
New Workshop
2023-06-09 21:02:11 +02:00
Felix Roos e10104d401 bring de improvements to en workshop 2023-06-09 20:59:40 +02:00
Roipoussiere 5e09c3c318 add autocompletion extension from useMemo 2023-06-09 18:28:16 +02:00
Felix Roos 576b88221d Merge remote-tracking branch 'origin/main' into workshop-new 2023-06-09 18:00:16 +02:00
Felix Roos 7dc2a0091b more detail 2023-06-09 17:59:08 +02:00
Felix Roos 89a4a85589 more friendly heading 2023-06-09 17:58:05 +02:00
Felix Roos a3baf07a5c Merge pull request #580 from roipoussiere/music_metadata
Music metadata
2023-06-09 17:31:58 +02:00
Roipoussiere 8e6909478c autocompletion: lint 2023-06-09 16:42:31 +02:00
Roipoussiere 2d2d0cabb3 Add option in settings to enable autocompletion 2023-06-09 16:38:48 +02:00
Roipoussiere 6f04a1b8fa autocomplete: add vanilla js completion 2023-06-09 14:52:07 +02:00
Roipoussiere a9ad3a56ad autocomplete: avoid tabs overlapping 2023-06-09 14:30:20 +02:00
Roipoussiere 3069b14e9c enable autocompletion 2023-06-09 13:41:40 +02:00
Felix Roos ae868c6372 hide gutter in mini repl 2023-06-09 00:46:04 +02:00
Felix Roos c287ff554c optimize sounds chapter after teach test 2023-06-09 00:26:40 +02:00
Felix Roos 3ccbd35fad add label support to pianoroll 2023-06-09 00:25:54 +02:00
Felix Roos 51cc69208f fix: repl link to docs was old 2023-06-09 00:25:14 +02:00
Felix Roos 1fec2f7a46 fix: build 2023-06-08 21:31:32 +02:00
Felix Roos ffffdd2d7d fix: format 2023-06-08 20:55:26 +02:00
Felix Roos f8c3e3d5aa add missing sounds by hand 2023-06-08 20:43:45 +02:00
Felix Roos eccce6fa84 remove dirt samples
+ load a small selection for workshop instead
2023-06-08 17:48:54 +02:00
Felix Roos 44be6cee2c Merge pull request #585 from srenatus/typo
learn/tonal: fix typo in "scaleTran[s]pose"
2023-06-08 09:33:34 +02:00
Stephan Renatus 799afd511a learn/tonal: fix typo in "scaleTran[s]pose" 2023-06-08 08:17:38 +02:00
Felix Roos 37c4541468 translate link 2023-06-07 21:50:26 +02:00
Felix Roos 119a66acd0 - translate getting-started
- fix de links
- link english docs / german workshop
2023-06-07 21:49:57 +02:00
Felix Roos 105193a452 replace tutorial with workshop
+ move parts of tutorial to more
+ move more before Pattern Functions
2023-06-07 21:22:01 +02:00
Felix Roos 02d793e9e0 Merge remote-tracking branch 'origin/main' into workshop-new 2023-06-07 20:19:34 +02:00
Felix Roos 90647a8ba8 Merge pull request #582 from roipoussiere/line_numbers
repl: add option to display line numbers
2023-06-07 20:19:11 +02:00
Felix Roos 06950a6bd8 translate rest of workshop to german 2023-06-07 16:50:54 +02:00
Roipoussiere 0c2147d9c5 repl: add option to display line numbers 2023-06-07 15:34:57 +02:00
Roipoussiere 51e8174689 metadata: add quotes syntax for titles 2023-06-07 12:26:23 +02:00
Roipoussiere 185318a70c metadata: fix typos 2023-06-07 11:02:38 +02:00
Felix Roos a88759ba94 translate notes chapter 2023-06-06 22:43:51 +02:00
Roipoussiere 96ac054392 metadata: improve doc 2023-06-06 21:34:53 +02:00
Roipoussiere bd7f4dd73f metadata: add tests 2023-06-06 21:34:53 +02:00
Roipoussiere 2e22152089 metadata: allow several values and one-liners 2023-06-06 21:34:53 +02:00
Roipoussiere 98a89aea11 lint: metadata parsing 2023-06-06 21:34:53 +02:00
Roipoussiere 372e33c066 doc: add section about metadata 2023-06-06 21:34:53 +02:00
Roipoussiere 52641db590 load titles from metadata in examples page 2023-06-06 21:34:53 +02:00
Roipoussiere f9ad5f0d01 add tunes metadata 2023-06-06 21:34:53 +02:00
Roipoussiere 3db1c7a521 swatch: look for song titles in code metadata 2023-06-06 21:34:53 +02:00
Roipoussiere b6d1f96930 editor: enable line wrapping 2023-06-06 13:29:55 +02:00
Felix Roos 61a9b01062 started german translation of workshop 2023-06-05 23:48:04 +02:00
Felix Roos f0faf5b42e Merge remote-tracking branch 'origin/main' into workshop-new 2023-06-05 22:48:50 +02:00
Felix Roos 11733d5e05 Merge pull request #563 from tidalcycles/vanilla-highlighting
Vanilla JS Refactoring
2023-06-05 21:35:49 +02:00
Felix Roos c4a38d9008 + pattern effects chapter
+ recap page
+ only load mini repls when visible
2023-05-30 06:16:02 +02:00
Felix Roos 0edd7e14b7 add compound adsr + ds controls 2023-05-29 12:39:36 +02:00
Felix Roos 8b7bb7b6ae add adsr section to effects chapter 2023-05-29 12:39:17 +02:00
Felix Roos 39d5955e58 add function recap to sounds chapter 2023-05-29 12:39:05 +02:00
Felix Roos 536327f403 effects chapter mostly finished 2023-05-29 02:18:36 +02:00
Felix Roos 8679dc63be pianoroll: also reflect gain in transparency 2023-05-29 02:18:27 +02:00
Felix Roos 1e9979ae18 start fleshing out effects chapter 2023-05-28 12:42:24 +02:00
Felix Roos d2dffe3186 MiniRepl: consume font settings 2023-05-28 12:42:15 +02:00
Felix Roos 9971867e2f clamp function 2023-05-28 12:41:53 +02:00
Felix Roos 8c93e578a0 clamp delayfeedback 2023-05-28 12:41:46 +02:00
Felix Roos 1ba5d2e1ca finish notes chapter 2023-05-27 21:52:44 +02:00
Felix Roos ed792fc0d4 continue notes chapter 2023-05-27 16:29:05 +02:00
Felix Roos 4e575c44b3 begin first notes page 2023-05-27 13:31:18 +02:00
Felix Roos fc06181217 - add claviature flag to minirepl
- bring back option+dot on macos
- consume more editor settings in minirepl
2023-05-27 13:30:57 +02:00
Felix Roos 0d6fcf78d8 hide mini repl headers + improve workshop 2023-05-26 16:05:53 +02:00
Felix Roos 82225f0b81 started workshop pages 2023-05-26 14:12:53 +02:00
Felix Roos 2177e13b49 Merge branch 'vanilla-highlighting' into workshop 2023-05-25 21:38:34 +02:00
Daria Cotocu b63f4eb503 Update solmization.test.js 2023-05-24 18:58:11 +01:00
Daria Cotocu cd7bc09f9c Update solmization.test.js 2023-05-24 18:43:24 +01:00
Daria Cotocu ccf775e976 Format code 2023-05-24 17:57:05 +01:00
Daria Cotocu 811346e83d Solmization added 2023-05-24 17:24:34 +01:00
Felix Roos d3240a75d0 fix: dupe style.css to Repl.css
for some reason they were missing after update
+ darken line backgrounds
+ change preview port to keep workbox out of dev server
2023-05-12 11:56:50 +02:00
Felix Roos d93e396ce5 fix: nano-repl 2023-05-12 10:21:05 +02:00
Felix Roos d74cc234c4 fix: thinner outline for highlights with .color 2023-05-12 10:06:55 +02:00
Felix Roos 0fda83d8de bump soundfonts 2023-05-12 10:00:55 +02:00
Felix Roos a1ec8545fb format 2023-05-10 13:03:06 +02:00
Felix Roos 087f574355 update web readme + add more html examples 2023-05-10 12:49:45 +02:00
Felix Roos 1de784b817 add headless-serverless-buildless example 2023-05-10 12:20:27 +02:00
Felix Roos db79c05d9a bump web pkg dependencies 2023-05-10 12:11:51 +02:00
Felix Roos 1fdb1f0da6 bump webaudio package 2023-05-10 12:09:20 +02:00
Felix Roos e2bfaa6233 remove soundfonts from web package for now 2023-05-10 12:06:16 +02:00
Felix Roos 6089849d35 rename init to initStrudel + add to window 2023-05-10 11:53:26 +02:00
Felix Roos 6e02bf59e9 Revert "refactor: remove old draw logic"
This reverts commit 95719654f3.
2023-05-10 11:44:55 +02:00
Felix Roos 12228c56d9 improve api for web package 2023-05-07 22:36:26 +02:00
Felix Roos 3b631cb6af add @strudel/web umbrella package + example 2023-05-07 11:56:35 +02:00
Felix Roos b27a58df7e bump more packages to 0.8.0 2023-05-05 23:58:47 +02:00
Felix Roos 308f139193 bump codemirror again to get new core version 2023-05-05 23:52:55 +02:00
Felix Roos 692fc4e11d revert rename core package 2023-05-05 23:52:04 +02:00
Felix Roos b52f65c4d7 rename core package + bump to 0.8.0 2023-05-05 23:50:06 +02:00
Felix Roos 299275e368 lockfile 2023-05-05 23:47:15 +02:00
Felix Roos bb71c519db bump codemirror package 2023-05-05 23:46:42 +02:00
Felix Roos 9ec7109dc8 + simplify vanilla setup drastically
+ move repl + drawer boilerplate inside StrudelMirror
2023-05-05 23:43:07 +02:00
Felix Roos 5b67fccb1b vanilla-repl-cm6: draw first frame 2023-05-05 16:17:22 +02:00
Felix Roos 9807c4b7a1 move Framer + Drawer to core
... from vite-vanilla-repl-cm6
2023-05-05 16:06:11 +02:00
Felix Roos 9039600f6d bump codemirror to 0.8.1 2023-05-05 15:31:19 +02:00
Felix Roos b5b0156e08 fix: codemirror reeval 2023-05-05 15:31:04 +02:00
Felix Roos 352e647d37 add build script for codemirror package 2023-05-05 15:15:45 +02:00
Felix Roos e6b66f2525 lockfile 2023-05-05 15:14:46 +02:00
Felix Roos f5075906e2 add codemirror package
+ use it in vite-vanilla-repl-cm6
2023-05-05 15:13:17 +02:00
Felix Roos a6f57bced8 prettier 2023-05-05 12:00:13 +02:00
Felix Roos d35bf9591c vanilla-repl-cm6: better theme 2023-05-05 11:54:09 +02:00
Felix Roos d96f3f9dd4 vanilla-repl-cm6: style + codesplitting 2023-05-05 11:09:44 +02:00
Felix Roos 1f4c2f8c5a draw scheduler in vanilla js 2023-05-05 10:52:21 +02:00
Felix Roos 95719654f3 refactor: remove old draw logic
+ pianoroll now uses .onPaint
2023-05-05 09:52:07 +02:00
Felix Roos 4b921c47f5 vanilla-repl-cm6: add flash effect 2023-05-05 09:11:40 +02:00
Felix Roos f069f53fae vanilla-repl-cm6: add keybindings 2023-05-05 09:06:27 +02:00
Felix Roos 1494cc38fc add vite-vanilla-repl-cm6 2023-05-05 08:55:43 +02:00
Felix Roos a035412956 Merge pull request #559 from tidalcycles/patchday
Patchday
2023-05-05 08:34:36 +02:00
Felix Roos 08662ea831 Merge pull request #557 from tidalcycles/some-voicings
add basic triads and guidetone voicings
2023-05-02 21:48:32 +02:00
Felix Roos d97103268b add basic triads and guidetone voicings 2023-05-02 21:40:20 +02:00
Felix Roos a959e2e34d update remaining packages 2023-04-30 08:30:29 +02:00
Felix Roos 602bfbdd79 update a bunch of minor versions 2023-04-30 08:20:51 +02:00
Felix Roos 0785bdd37a update lerna 2023-04-30 08:04:56 +02:00
Felix Roos 8b62b6e1b1 update codemirror + tailwindcss 2023-04-30 08:02:06 +02:00
Felix Roos d1c8ebd15b remove c8 2023-04-30 07:55:23 +02:00
Felix Roos 13088e4001 - remove gh-pages
- update peggy
- rebuild parser
2023-04-30 07:48:08 +02:00
Felix Roos 5c6fa1c82b update vite to v4 2023-04-29 08:10:12 +02:00
Felix Roos fd81867e7b fix: controls import broke on ssr 2023-04-29 07:45:21 +02:00
Felix Roos 78293e64dd lockfile 2023-04-29 07:45:09 +02:00
Felix Roos 930fc10aec bump some minor versions 2023-04-29 07:45:04 +02:00
Felix Roos 0b2a4fda44 update supabase-js 2023-04-29 07:24:03 +02:00
Felix Roos efdce6d4cd update astro 2023-04-29 06:55:34 +02:00
Felix Roos c0b0ea4493 remove preact 2023-04-29 06:25:19 +02:00
Felix Roos 0fcec0a0ca upgrade jsdoc 2023-04-28 13:05:50 +02:00
Felix Roos c0701d8a35 Merge remote-tracking branch 'origin/main' into patchday 2023-04-28 12:50:20 +02:00
Felix Roos ae51092044 Merge pull request #556 from tidalcycles/fix-prebake
fix: make soundfonts import dynamic
2023-04-28 12:46:56 +02:00
Felix Roos b7fcccb8db fix: make soundfonts import dynamic
- it broke the whole docs page
2023-04-28 12:42:07 +02:00
Felix Roos b21a52f5f3 update @vite-pwa/astro 2023-04-28 12:23:10 +02:00
Felix Roos 2bdcfe13e6 update @vitest/ui 2023-04-28 12:20:35 +02:00
Felix Roos 12a97ec429 update nanostores 2023-04-28 12:18:45 +02:00
Felix Roos 99298ce9f2 update vite-plugin-pwa 2023-04-28 12:14:07 +02:00
Felix Roos a0ed25d373 use vitests@^0.28.0 in packages 2023-04-28 12:12:05 +02:00
Felix Roos dc6c29c668 update vitest to ^0.28.0 2023-04-28 12:08:48 +02:00
Felix Roos 3a85f28b5c install with pnpm 8.3.1 2023-04-28 10:33:47 +02:00
Felix Roos 95c44b1ce2 Merge pull request #553 from tidalcycles/highlighting-colors
fix: colorable highlighting
2023-04-22 15:43:22 +02:00
Felix Roos b88e0ecb78 fix: colorable highlighting 2023-04-22 15:25:00 +02:00
Felix Roos c26f6b72d9 Merge pull request #550 from tidalcycles/fix-soundfont-loading
fix: load soundfonts in prebake
2023-04-06 00:11:02 +02:00
Felix Roos 6cd3cc96a3 fix: do not prebake in tests
+ pull piano function to separate file for tests
2023-04-06 00:08:23 +02:00
Felix Roos c138cf0b76 fix: load soundfonts in prebake 2023-04-06 00:00:49 +02:00
Felix Roos 8edb086178 Merge pull request #548 from tidalcycles/stop-pause
fix: reset time on stop
2023-03-29 22:23:07 +02:00
Felix Roos 0f74b5a4b1 Merge pull request #547 from tidalcycles/fix-mini-whitespace
fix: allow whitespace at the end of a mini pattern
2023-03-29 22:16:37 +02:00
Felix Roos 6de2feff05 fix: reset time on stop 2023-03-29 22:05:13 +02:00
Felix Roos a9811ee955 fix: allow whitespace at the end of a mini pattern
- fixes #546
2023-03-29 21:57:55 +02:00
Felix Roos 98b6c11a82 Merge pull request #544 from tidalcycles/fonts
add firacode font
2023-03-24 22:10:55 +01:00
Felix Roos 3df2929d12 dummy commit (github cert error :-/) 2023-03-24 22:06:40 +01:00
Felix Roos 30d1f423cb fix: remove loading state on eval error 2023-03-24 21:50:50 +01:00
Felix Roos e0c5566f35 add 2 FiraCode fonts 2023-03-24 21:23:37 +01:00
Felix Roos c5a2ae47d7 Merge pull request #542 from tidalcycles/loading-animation
feat: add loader bar to animate loading state
2023-03-24 12:54:20 +01:00
Felix Roos 17654b885b feat: add loader bar to animate loading state 2023-03-24 12:41:00 +01:00
Felix Roos acaf0ca0af Merge pull request #539 from tidalcycles/setcps-reset-only-on-shuffle
do not reset cps before eval #517
2023-03-23 22:39:26 +01:00
Felix Roos 6a201be1fd Merge remote-tracking branch 'origin/main' into setcps-reset-only-on-shuffle 2023-03-23 22:35:57 +01:00
Felix Roos 8617b9164e do not reset cps before eval #517 2023-03-23 22:34:25 +01:00
Felix Roos 991e5f1b3c Merge pull request #538 from tidalcycles/improve-loading
improve initial loading + wait before eval
2023-03-23 22:27:31 +01:00
Felix Roos 55c533c947 improve initial loading + wait before eval 2023-03-23 21:56:20 +01:00
Felix Roos d17543d5d9 Merge pull request #537 from tidalcycles/fix-keypress-period
fix period key for dvorak + remove duplicated code
2023-03-23 21:40:19 +01:00
Felix Roos 73169563c4 fix period key for dvorak + remove duplicated code 2023-03-23 21:37:38 +01:00
Felix Roos d351cb9f7f Merge pull request #535 from tidalcycles/update-lerna
Update lerna
2023-03-23 11:44:56 +01:00
Felix Roos 251be60630 update package publishing guide 2023-03-23 11:39:33 +01:00
Felix Roos 18d7222804 Publish
- @strudel.cycles/core@0.7.2
 - @strudel.cycles/csound@0.7.1
 - @strudel.cycles/eval@0.7.1
 - @strudel.cycles/midi@0.7.1
 - @strudel.cycles/mini@0.7.2
 - @strudel.cycles/osc@0.7.1
 - @strudel.cycles/react@0.7.1
 - @strudel.cycles/serial@0.7.1
 - @strudel.cycles/soundfonts@0.7.1
 - @strudel.cycles/tonal@0.7.1
 - @strudel.cycles/tone@0.7.1
 - @strudel.cycles/transpiler@0.7.1
 - @strudel.cycles/webaudio@0.7.1
 - @strudel.cycles/webdirt@0.7.1
 - @strudel.cycles/xen@0.7.1
2023-03-23 11:34:07 +01:00
Felix Roos ff1c37d361 bump core + mini to 0.7.1 2023-03-23 11:26:23 +01:00
Felix Roos 3abe6db3de Publish
- @strudel.cycles/core@0.7.0
 - @strudel.cycles/csound@0.7.0
 - @strudel.cycles/eval@0.7.0
 - @strudel.cycles/midi@0.7.0
 - @strudel.cycles/mini@0.7.0
 - @strudel.cycles/osc@0.7.0
 - @strudel.cycles/react@0.7.0
 - @strudel.cycles/serial@0.7.0
 - @strudel.cycles/soundfonts@0.7.0
 - @strudel.cycles/tonal@0.7.0
 - @strudel.cycles/tone@0.7.0
 - @strudel.cycles/transpiler@0.7.0
 - @strudel.cycles/webaudio@0.7.0
 - @strudel.cycles/webdirt@0.7.0
 - @strudel.cycles/xen@0.7.0
2023-03-23 11:21:02 +01:00
Felix Roos b9ca9d3b06 update lerna 2023-03-23 11:17:21 +01:00
Felix Roos 9bbc04843d Merge pull request #534 from tidalcycles/soundfont-freq-support
feat: add freq support to gm soundfonts
2023-03-23 10:21:55 +01:00
Felix Roos ddf61a6438 Merge pull request #531 from ijc8/main
Maintain random seed state in parser, not globally
2023-03-23 10:18:58 +01:00
Felix Roos ba35a81e9b - feat: add freq support to gm soundfonts
- refactor: toMidi -> noteToMidi
- refactor: fromMidi -> midiToFreq
2023-03-23 10:18:24 +01:00
Felix Roos 13133583ca Merge pull request #527 from bwagner/main
FIXES: alias pm for polymeter
2023-03-21 22:35:17 +01:00
Felix Roos e91b981740 Merge pull request #529 from revolunet/patch-1
fix(footer): fix link to tidalcycles
2023-03-21 22:29:06 +01:00
Bernhard Wagner 1458ee64ec FIXES: alias pm for polymeter 2023-03-21 21:20:57 +01:00
Ian Clester 4e2a5e1663 Add pairwise independence test, tweak randOffset 2023-03-20 22:27:35 -04:00
Ian Clester c98b0e9687 Format code with prettier 2023-03-20 19:19:42 -04:00
Ian Clester 4e25990de9 Uncomment test for random choice operator (|) 2023-03-20 17:46:57 -04:00
Ian Clester 4b51f1a3fc Sync up ? with degrade() 2023-03-20 15:26:27 -04:00
Ian Clester 5490b01004 Maintain random seed state in parser, not globally 2023-03-20 14:59:43 -04:00
Julien Bouquillon 43176e1f1d fix(footer): fix link to tidalcycles 2023-03-20 01:38:21 +01:00
Bernhard Wagner fffd3c07ca FIXES: alias pm for polymeter
(return statement was missing)
2023-03-18 22:12:12 +01:00
Felix Roos 952bd38e70 Merge pull request #525 from bwagner/patch-4
Update intro.mdx
2023-03-18 20:25:21 +01:00
Felix Roos 8589f5cc89 Merge pull request #524 from bwagner/patch-3
Update samples.mdx
2023-03-18 20:24:38 +01:00
Bernhard Wagner ec594d52f8 Update intro.mdx
shortly -> concisely
2023-03-18 19:31:57 +01:00
Bernhard Wagner 848cbf9c60 Update samples.mdx
fixes few typos and the former `samples` tab is now `sounds`
2023-03-18 15:37:59 +01:00
Felix Roos e02be7dd9a Merge pull request #521 from tidalcycles/fix-envelope
fix: envelopes in chrome
2023-03-17 09:03:10 +01:00
Felix Roos 33d35e47a6 fix: envelope in chrome 2023-03-17 08:56:05 +01:00
Felix Roos 18d62b32c2 Merge pull request #516 from tidalcycles/source-nodes
registerSound API + improved sounds tab + regroup soundfonts
2023-03-16 16:13:30 +01:00
Felix Roos 58ed51b49c snapshot 2023-03-16 15:49:56 +01:00
Felix Roos 9f9fe529e4 fix only tune that uses soundfonts 2023-03-16 15:49:08 +01:00
Felix Roos aad721890a pass duration to source callback 2023-03-16 15:48:59 +01:00
Felix Roos e63a5d10c8 regroup sounds
- extra tab for drum-machines
- combine synths and soundfonts
2023-03-16 15:21:16 +01:00
Felix Roos 15681262de use only _ for easier copying via double click 2023-03-16 15:19:38 +01:00
Felix Roos b5d3aa81f9 format 2023-03-16 12:25:08 +01:00
Felix Roos a688061616 group soundfonts into readable names 2023-03-16 12:23:58 +01:00
Felix Roos f788d347ec add envelope to soundfonts 2023-03-15 23:02:05 +01:00
Felix Roos a33ce67dd4 fix: endless preview 2023-03-15 23:01:56 +01:00
Felix Roos 8a22c5627a fix: cut glitches due to envelope release trouble 2023-03-15 22:42:03 +01:00
Felix Roos 7b529a30f4 style sounds tab 2023-03-14 22:54:12 +01:00
Felix Roos 4910b34f26 Merge pull request #518 from tidalcycles/fonts
add 2 illegible fonts
2023-03-14 21:54:52 +01:00
paikwiki 74ad521fc9 Fix typo on packages.mdx
I found a broken link.

Because it omits protocol, page move to wrong page(https://strudel.tidalcycles.org/github.com/tidalcycles/strudel)

I add protocol(https://) on that link.
2023-03-14 13:01:40 +09:00
Felix Roos 6a73b43e3a add 2 illegible fonts 2023-03-12 21:16:46 +01:00
Felix Roos b59b26460d soundfont list curation part 2 2023-03-12 20:48:29 +01:00
Felix Roos aa324ae25d start curating the soundfont list 2023-03-10 11:33:55 +01:00
Felix Roos ff412f6396 level down soundfonts
+ do not load in prebake (breaks static rendering)
+ instead load on import
2023-03-09 23:19:19 +01:00
Felix Roos ac148b2f32 register soundfonts as sounds too 2023-03-09 22:48:40 +01:00
Felix Roos 6f5d096e6d rename setSound to registerSound 2023-03-09 21:32:40 +01:00
Felix Roos ff1e6714c6 document setSound api 2023-03-09 21:27:24 +01:00
Felix Roos 41d82eaadf add cleanup to sound tab 2023-03-09 10:53:35 +01:00
Felix Roos be6b011204 proper audio node cleanup
+ cleanup onTriggerSample
2023-03-09 10:46:45 +01:00
Felix Roos 65e48c05f0 sounds onset and offset can be triggered independently
+ sounds tab now supports mousedown / mouseup to listen
2023-03-09 08:35:20 +01:00
Felix Roos cee08ea67d sounds list can now filter out defaults 2023-03-08 00:33:21 +01:00
Felix Roos 35ef26c013 can now pass meta data to setSound
+ added types for synth and sample
+ list sample count for samples in sounds tab (as before)
2023-03-07 21:43:01 +01:00
Felix Roos b08a0b8102 use nanostore for soundmap
+ rename tab samples to sounds
+ listed sounds are now reactive
2023-03-06 23:11:09 +01:00
Felix Roos 220342154b Merge pull request #474 from bwagner/main
Update README.md
2023-03-06 22:55:00 +01:00
Bernhard Wagner ef7182cd76 Merge branch 'tidalcycles:main' into main 2023-03-06 20:15:16 +01:00
Felix Roos 6059c69995 first draft of soundMap to register keys for s
+ refactor sampler to use it
+ refactor synth to use it
+ add 'source' control
+ wip: samples tab
+ wip: webadirt ?
+ wip: soundfonts
2023-03-05 23:27:37 +01:00
Felix Roos 892d8ba152 Merge pull request #508 from tidalcycles/arrange
add arrange function
2023-03-05 14:52:30 +01:00
Felix Roos da11069f75 Merge pull request #514 from tidalcycles/react-update
update react to 18
2023-03-05 14:29:08 +01:00
Alex McLean bf72908dc9 Support list syntax in mininotation (#512)
fixes #504

* support list syntax in mininotation
* support compound controls
* remove redundant : splitting of s/n and note/n from webaudio
* patternable scale names
2023-03-04 18:06:18 +00:00
Felix Roos 81ab5c78e2 update react to 18 2023-03-03 20:38:20 +01:00
Felix Roos de503c7d63 add snapshot 2023-03-03 20:30:35 +01:00
Felix Roos 487ccb90a1 add arrange function 2023-03-03 20:17:23 +01:00
Felix Roos 4bfeaa47bf Merge pull request #502 from tidalcycles/scale-space-alternative
can now use : as a replacement for space in scales
2023-03-03 12:40:23 +01:00
Felix Roos 9a4d8036a6 add test 2023-03-03 12:38:11 +01:00
Felix Roos a50bd6375d use : instead of _ 2023-03-03 12:37:25 +01:00
Felix Roos 14508e91a9 can now use _ as a replacement for space in scales 2023-03-02 20:39:06 +01:00
Alex McLean 2d5064bd5b Reinstate slice and splice (#500)
Reinstate slice/splice, fixing up "unit" param using new global cps
2023-03-02 14:44:41 +00:00
Felix Roos fdc4819e39 Merge pull request #501 from tidalcycles/nano-repl-highlighting-fix
fix: nano-repl highlighting
2023-03-02 14:49:30 +01:00
Felix Roos efddbb616b fix: nano-repl highlighting 2023-03-02 14:47:15 +01:00
Alex McLean db4d0f26a8 Add control aliases (#497)
* add and simplify control aliases, fixes #496
* roomsize now alias of room
* simplify webaudio param handling
---------

Co-authored-by: Felix Roos <flix91@gmail.com>
2023-03-02 13:17:12 +00:00
Felix Roos 06cffbc31b add readme to nano repl 2023-03-01 12:57:33 +01:00
Felix Roos 3cfb0f4c76 Merge pull request #493 from tidalcycles/cps
implement cps in scheduler
2023-03-01 09:27:26 +01:00
Felix Roos 436ba067bc reset cps before eval 2023-03-01 09:23:01 +01:00
Felix Roos f8724bf47e comment out cps ui 2023-03-01 00:05:23 +01:00
Felix Roos 1f7e293204 add setcps to global scope 2023-02-28 23:56:11 +01:00
Felix Roos 86d2652258 pass cps to hap trigger 2023-02-28 23:54:56 +01:00
Felix Roos f5c0cc2e2d no need to warn if evalScope is called more often 2023-02-28 23:54:40 +01:00
Felix Roos 4463d4a417 Update README.md 2023-02-28 23:25:40 +01:00
Felix Roos df35a5c9b1 Merge pull request #491 from tidalcycles/refactor-react
react style fixes
2023-02-28 23:06:29 +01:00
Felix Roos dda93b3c13 Update @strudel.cycles/react to 0.6.4 2023-02-28 23:02:52 +01:00
Felix Roos 5de40b6bf5 fix disabled button take 2 2023-02-28 23:02:28 +01:00
Felix Roos dcbe799d25 Merge pull request #490 from tidalcycles/refactor-react
refactor react package
2023-02-28 22:57:19 +01:00
Felix Roos a5641aef03 Update @strudel.cycles/react to 0.6.3 2023-02-28 22:52:57 +01:00
Felix Roos 668f97a4c8 refactor react package for publishing 2023-02-28 22:48:50 +01:00
Felix Roos e9d577496b fix disabled button 2023-02-28 22:48:06 +01:00
Felix Roos 66fba947ac Update @strudel.cycles/react to 0.6.2 2023-02-28 22:40:52 +01:00
Felix Roos 18c7e02609 fix: minirepl styles for package 2023-02-28 22:40:18 +01:00
Felix Roos 7e1351507a add variables to react tailwind config 2023-02-28 22:17:24 +01:00
Felix Roos 032acbd27c comment out autocomplete 2023-02-28 22:11:17 +01:00
Felix Roos 8b51f0fbd2 Update @strudel.cycles/react to 0.6.1 2023-02-28 21:57:03 +01:00
Felix Roos ead5942ef0 implement cps + add baasic tempo control ui 2023-02-28 13:00:35 +01:00
Felix Roos cfe369d9fe Merge pull request #488 from tidalcycles/algolia
add algolia creds + optimize sidebar for crawling
2023-02-27 23:47:34 +01:00
Felix Roos 2750a3c130 fix pseudo relative links 2023-02-27 22:59:50 +01:00
Felix Roos a7f6d6ecac add algolia config 2023-02-27 22:59:38 +01:00
Felix Roos 3680282450 Merge pull request #485 from tidalcycles/app-height-fix
fix app height
2023-02-27 19:28:09 +01:00
Felix Roos 3b3435c999 change 1px 2023-02-27 19:24:49 +01:00
Felix Roos e2ae6278c2 Merge pull request #484 from tidalcycles/revert-wip-390
Revert "Another attempt at composable functions - WIP (#390)"
2023-02-27 16:04:20 +01:00
Alex McLean 37d6723e3c Update mini-notation.mdx (#365)
`x!n` is no longer an alias for `[x*n]@n` and the behaviour is a bit different. Probably best to remove this line in case it confuses someone?
2023-02-27 14:45:19 +00:00
Felix Roos 961bbf6f55 Revert "Another attempt at composable functions - WIP (#390)"
This reverts commit cbae355896.
2023-02-27 15:20:49 +01:00
Felix Roos fc71d349ed Merge pull request #482 from tidalcycles/docs
docs: packages + offline
2023-02-27 12:52:09 +01:00
Felix Roos 97c8ab0f71 fix format 2023-02-27 12:49:23 +01:00
Felix Roos 28534ea547 add screenshots 2023-02-27 12:47:38 +01:00
Felix Roos 1a75b79a33 better offline docs
fixes https://github.com/tidalcycles/strudel/issues/424
2023-02-27 12:34:17 +01:00
Felix Roos 75dfb0af35 add dependencygraph 2023-02-27 11:12:21 +01:00
Felix Roos 073fa09648 packages doc 2023-02-27 11:10:47 +01:00
Felix Roos 3015e7b203 Merge pull request #480 from tidalcycles/fix-array-args
Fix array args
2023-02-25 14:26:49 +01:00
Felix Roos 7ac0cdc0f9 fix: lint error 2023-02-25 14:18:23 +01:00
Felix Roos 49234183a3 Merge remote-tracking branch 'origin/main' into fix-array-args 2023-02-25 14:13:55 +01:00
Felix Roos ed7763df92 fix: reify after sequence to preserve array
ref https://github.com/tidalcycles/strudel/issues/383#issuecomment-1399514090
2023-02-25 14:13:39 +01:00
Felix Roos b818a02f76 Merge pull request #478 from tidalcycles/midi-fleshout
midi cc support
2023-02-25 12:33:22 +01:00
Felix Roos 886f8449fd add midichan + docs 2023-02-25 12:23:01 +01:00
Felix Roos 5de6643604 midi: support ccn and ccv 2023-02-24 10:15:21 +01:00
Felix Roos 6283273d81 add helper hap.ensureObjectValue 2023-02-24 10:15:06 +01:00
Bernhard Wagner 5506d18bc5 Update README.md
npm -> pnpm
2023-02-23 18:28:11 +01:00
Felix Roos c8f8f02a46 Merge pull request #473 from tidalcycles/fix-hashes
fix: hash links
2023-02-23 00:11:04 +01:00
Felix Roos 4c5d6f1d6c fix: hash links 2023-02-23 00:04:53 +01:00
Felix Roos f349e36345 Merge pull request #467 from tidalcycles/vim-mode
settings tab with vim / emacs modes + additional themes and fonts
2023-02-22 22:54:39 +01:00
Felix Roos 1574c4ab13 Merge pull request #471 from bwagner/patch-1
Update input-output.mdx
2023-02-22 22:53:22 +01:00
Felix Roos 0dc9bc3ab6 Merge pull request #464 from bwagner/main
FIXES: freqs instead of pitches
2023-02-22 22:52:49 +01:00
Felix Roos 0006d57a4a move isZen to nanostore
+ correctly parse non strings in store
2023-02-22 22:47:33 +01:00
Felix Roos 70f7e73b9a store footer tab + latest code in nanostore 2023-02-22 22:23:54 +01:00
Felix Roos b67b049802 refactor settings to nanostores 2023-02-22 22:04:39 +01:00
Felix Roos ff99dbcd22 customizable font family 2023-02-22 20:28:22 +01:00
Felix Roos 0198697737 Merge pull request #472 from tidalcycles/osc-fix
fix: osc should not return a promise
2023-02-22 20:01:00 +01:00
Felix Roos a742a71f67 fix: osc should not return a promise 2023-02-22 19:50:37 +01:00
Felix Roos 8f6c1531fa more contrast for blackscreen theme 2023-02-22 19:45:06 +01:00
Bernhard Wagner d9f56f11cb Merge pull request #1 from tidalcycles/main
a
2023-02-22 17:15:00 +01:00
Bernhard Wagner 7ff877464f Update input-output.mdx
npm -> pnpm
2023-02-22 17:06:15 +01:00
Alex McLean 7c367eb1e8 slice and splice (#466)
Implements `slice` and `splice` from tidal, intended for beat slicing
2023-02-22 11:51:31 +00:00
Felix Roos 20848aac09 fix store import 2023-02-19 23:28:46 +01:00
Felix Roos 7716574076 use terminal font for console + samples 2023-02-19 23:28:33 +01:00
Felix Roos 89cd0c769b fix bluescreen line bg 2023-02-19 23:27:56 +01:00
Felix Roos a21b3d788f add settings reset button 2023-02-19 22:32:28 +01:00
Felix Roos 7994ba8b38 get rid of all hard coded colors 2023-02-19 22:18:32 +01:00
Felix Roos 81b4cb2f16 more themes + fonts 2023-02-19 22:18:12 +01:00
Felix Roos 14af1df6a3 define font + fix app height 2023-02-19 20:04:30 +01:00
Felix Roos ac3bd7d7db rename algoboy theme + add font 2023-02-19 20:04:19 +01:00
Felix Roos 632e8e9634 use css var for highlighting color 2023-02-19 20:03:12 +01:00
Felix Roos 1e3f09f69b add some custom themes 2023-02-19 18:53:35 +01:00
Felix Roos f3f18ffca7 fix app height for ios 2023-02-19 13:50:08 +01:00
Felix Roos ceb3aa0627 add emacs mode + fontSize slider 2023-02-19 13:49:55 +01:00
Felix Roos 014555fe5d add vim toggle to settings
+ added persistent global state store
+ refactored themes to use the new store
2023-02-19 01:51:31 +01:00
Alex McLean fdb76867a7 weave and weaveWith (#465)
Added weave and weaveWith from tidal
2023-02-18 00:00:18 +00:00
Felix Roos 57157fde9c Merge branch 'main' into docs 2023-02-17 21:53:02 +01:00
Felix Roos 4a3540cf2b encapsulate footer components 2023-02-17 21:48:45 +01:00
Felix Roos 540bd938f2 remove unused Footer
+ fix AvatarList (still unused)
2023-02-17 21:48:34 +01:00
Bernhard Wagner c6fbebd996 FIXES: freqs instead of pitches 2023-02-17 19:05:09 +01:00
Felix Roos 18d3a7e23a add vim extension (hard coded) 2023-02-17 10:41:49 +01:00
Alex McLean cbae355896 Another attempt at composable functions - WIP (#390)
Summary of changes:

- Made unary functions composable, including controls. So e.g. s("bd sd").every(3,fast(2).iter(4).n(4)) works the same as s("bd sd").every(3,x => x.fast(2).iter(4).n(4))
- Made operators/alignments composable too, so s("bd sd").every(3, set.squeeze.n(3, 4)) works
- Patterns are not treated as functions, so s("bd sd").every(3, n(5)) is an annoying runtime error. s("bd sd").every(3, set.n(5)) does work though.

Other minor changes:

- standardised alignment 'squeezeOut' as lowercase 'squeezeout'
- made firstCycleValues turn haps sorted in order of 'part'
2023-02-16 23:15:21 +00:00
Felix Roos 924e8a764a Merge pull request #461 from bwagner/main
FIXES: Warning about jsxBracketSameLine deprecation
2023-02-16 20:38:45 +01:00
Bernhard Wagner 40e629cb0e ADDS: Continuation to Testing 2023-02-16 15:24:44 +01:00
Bernhard Wagner 99ec261f79 ADDS: Continuation to Docs 2023-02-16 15:23:34 +01:00
Bernhard Wagner 9daea5bbc2 ADDS: Continuation to REPL 2023-02-16 15:22:35 +01:00
Bernhard Wagner 4704c03d48 ADDS: Continuation to Strudel vs Tidal 2023-02-16 15:21:25 +01:00
Bernhard Wagner 9dbf52bedb ADDS: Continuation to Pattern Alignment 2023-02-16 15:20:26 +01:00
Bernhard Wagner cfd04ab7fa ADDS: Continuation to Patterns 2023-02-16 15:19:14 +01:00
Bernhard Wagner 33dbf75e3b ADDS: Continuation to Offline 2023-02-16 15:18:32 +01:00
Bernhard Wagner 8ffaeeb171 ADDS: Continuation to MIDI and OSC 2023-02-16 15:16:51 +01:00
Bernhard Wagner 451828e5d4 ADDS: Continuation to Tonal Modifiers 2023-02-16 15:15:54 +01:00
Bernhard Wagner 176877f2b8 ADDS: Continuation to Accumulation Modifiers 2023-02-16 15:14:38 +01:00
Bernhard Wagner 61b0d08b5f ADDS: Continuation to Conditional Modifiers 2023-02-16 15:12:37 +01:00
Bernhard Wagner f50a6ce1ae ADDS: Continuation to Signals 2023-02-16 15:11:28 +01:00
Bernhard Wagner 8549d6ea8b ADDS: Continuation to Control Parameters 2023-02-16 15:09:37 +01:00
Bernhard Wagner 90a90a87a5 ADDS: Continuation to Time Modifiers 2023-02-16 15:08:45 +01:00
Bernhard Wagner 760bdea521 ADDS: Continuation to Pattern Constructors 2023-02-16 15:07:03 +01:00
Bernhard Wagner 0fd783e83f ADDS: Continuation to Functional JavaScript API 2023-02-16 15:03:58 +01:00
Bernhard Wagner 42caa9058b ADDS: Continuation to Synths 2023-02-16 15:00:17 +01:00
Bernhard Wagner 9ab315ac2c ADDS: Continuation to Samples 2023-02-16 14:58:02 +01:00
Bernhard Wagner a08ad07537 ADDS: Continuation to Csound 2023-02-16 14:55:01 +01:00
Bernhard Wagner c6ce763f7c FIXES: Warning about jsxBracketSameLine deprecation 2023-02-16 14:46:33 +01:00
Felix Roos 70d1eb17a7 Merge branch 'main' into vim-mode 2023-02-16 11:41:01 +01:00
Felix Roos 0393205eda Merge pull request #438 from bwagner/patch-8
Update synths.mdx
2023-02-14 22:11:02 +01:00
Bernhard Wagner 5c05a5a63e Update synths.mdx
in future -> in the future
ADDS: Continuation to Audio Effects.
2023-02-14 22:08:40 +01:00
Felix Roos b01d9f849b Merge pull request #437 from bwagner/patch-5
Update mini-notation.mdx
2023-02-14 19:54:41 +01:00
Felix Roos 0ab904275c Merge pull request #436 from bwagner/patch-4
Update code.mdx
2023-02-14 19:54:24 +01:00
Bernhard Wagner 5f82a86801 Update mini-notation.mdx
descreases -> decreases
twice a cycle -> twice per cycle
2023-02-14 19:40:03 +01:00
Bernhard Wagner 13a5d8de86 Update code.mdx
The code example says "sine", but the description says "sawtooth".
2023-02-14 19:08:47 +01:00
Felix Roos f024b71808 Update CONTRIBUTING.md
add more infos on code style, eslint and tests
2023-02-14 18:16:39 +01:00
Felix Roos cd35a17904 Merge pull request #433 from tidalcycles/fix-anchors
Fix anchors
2023-02-13 00:43:29 +01:00
Felix Roos be3f68ed06 fix comment 2023-02-13 00:42:16 +01:00
Felix Roos 64b8fd9584 fix: right sidebar anchors earlier 2023-02-13 00:41:42 +01:00
Felix Roos b001d1d0f1 update lockfile 2023-02-13 00:37:20 +01:00
Felix Roos 64ad75c79e fix: anchor links
fixes https://github.com/tidalcycles/strudel/issues/432
+ fix style regression in mini repl
2023-02-13 00:35:40 +01:00
Felix Roos 12eb361d69 remove slash before anchor link 2023-02-12 20:13:59 +01:00
Felix Roos dd51bd0a2f Merge pull request #427 from tidalcycles/docs
autocomplete preparations
2023-02-11 21:02:11 +01:00
Felix Roos 0fb478a7c8 no autocomplete until upstream merge 2023-02-11 20:55:35 +01:00
Felix Roos 9694ecf55b autocomplete dark / light 2023-02-11 13:02:04 +01:00
Felix Roos fe80478b8a Merge remote-tracking branch 'origin/main' into docs 2023-02-10 23:18:04 +01:00
Felix Roos a253c26bee Merge pull request #431 from tidalcycles/themes
Themes
2023-02-10 23:14:47 +01:00
Felix Roos a500f983f5 Merge branch 'main' into themes 2023-02-10 22:59:52 +01:00
Felix Roos 3579b6f8f3 dynamic highlight color
+ refactor hooks
2023-02-10 22:52:34 +01:00
Felix Roos 14cb954213 themed minirepl
+ add strudelTheme
+ add lineBackground with opacity
+ add some missing light flags
+ add fallback css variables for non js context
2023-02-10 21:42:27 +01:00
Felix Roos 6170eef441 format 2023-02-10 20:09:23 +01:00
Felix Roos ddb9af4d57 themify rest of layout (except minirepls) 2023-02-10 20:07:36 +01:00
Felix Roos 6db2c0bf93 only invert prose for dark themes 2023-02-10 18:34:02 +01:00
Felix Roos 46f70e6a5e persisted theme + add all settings 2023-02-10 12:54:15 +01:00
Felix Roos 0b994a1b0f switchable css variables for theming 2023-02-10 11:32:36 +01:00
Felix Roos 0326244956 update themes 2023-02-10 09:25:58 +01:00
Felix Roos ea1b2252fc remove unused descriptions
+ fix some titles
+ comment out unfinished packages page
+ start offline page
2023-02-09 21:42:48 +01:00
Felix Roos 0da25ea7cc Merge pull request #429 from tidalcycles/minirepl-keyboard-support
minirepl: add keyboard shortcuts
2023-02-09 19:22:56 +01:00
Felix Roos 3209afa4ff minirepl: add keyboard shortcuts 2023-02-09 19:20:44 +01:00
Felix Roos 33e2631e5d update snapshot 2023-02-09 18:48:34 +01:00
Felix Roos f02a41b675 fix param description 2023-02-09 18:44:41 +01:00
Felix Roos f497d7b212 reactify autocomplete info 2023-02-09 18:37:29 +01:00
Felix Roos 0f18f5eb81 remove logs 2023-02-09 14:16:37 +01:00
Felix Roos 8da81104aa doc: note 2023-02-09 12:42:37 +01:00
Felix Roos 97cbdc6b0f use jsdoc in autocomplete, still not context aware
+ add noAutocomplete flags
+ add superdirtOnly flags
2023-02-09 12:19:38 +01:00
Felix Roos 7f53f4e36b Merge branch 'main' into docs 2023-02-09 08:57:20 +01:00
Felix Roos c350f262e6 Merge pull request #425 from tidalcycles/pwa
add cdn.freesound to cache list
2023-02-09 08:56:42 +01:00
Felix Roos 3e727893bf basic theme picker 2023-02-08 23:43:02 +01:00
Felix Roos 2a2c7437e4 add cdn.freesound to cache list 2023-02-08 21:18:03 +01:00
Felix Roos 4f0885d3af Merge branch 'main' into themes 2023-02-08 20:49:20 +01:00
Felix Roos 5656cd2fc6 Merge pull request #421 from tidalcycles/pwa
add more offline caching
2023-02-08 20:36:00 +01:00
Felix Roos b6e42876ad fix cache rule + disable service worker in dev 2023-02-08 20:32:03 +01:00
Felix Roos 3671344867 add freesound + shabda to offline cache rule 2023-02-08 20:26:44 +01:00
Felix Roos 30b149053c basic theme switcher 2023-02-08 18:54:34 +01:00
Felix Roos cdd40df9d3 disable sw in dev 2023-02-08 18:54:19 +01:00
Felix Roos 9d661808ba Merge pull request #419 from tidalcycles/pwa
add caching strategy for missing file types + cache all samples loaded from github
2023-02-07 22:08:01 +01:00
Felix Roos 6a5d849b3c add caching strategy for missing file types
+ cache all samples loaded from github
2023-02-07 21:50:08 +01:00
Felix Roos 25bbd73a90 Merge pull request #417 from tidalcycles/pwa
PWA with offline support
2023-02-06 23:29:56 +01:00
Felix Roos 3d27a5f8c7 format 2023-02-06 21:06:33 +01:00
Felix Roos 44ef372399 update og meta data 2023-02-06 21:05:28 +01:00
Felix Roos fd09dff381 basic pwa setup 2023-02-06 20:57:34 +01:00
Felix Roos 10580a0bec change rocket to strudel 2023-02-06 20:21:09 +01:00
Felix Roos f3f87b0a46 dont lint json 2023-02-06 20:20:45 +01:00
Felix Roos ac606bcf71 Update README.md 2023-02-05 23:16:38 +01:00
alex bb50df07e7 iclc reviews 2023-02-05 21:01:02 +00:00
Felix Roos f7ac033e1c Merge pull request #411 from tidalcycles/docs
improve samples doc
2023-02-05 17:27:32 +01:00
Felix Roos a1043352c1 Merge pull request #413 from tidalcycles/remove-google
google gtfo
2023-02-05 17:27:09 +01:00
Felix Roos e15fecf6cf google gtfo 2023-02-05 17:19:32 +01:00
Felix Roos 3e99f345ef better headings 2023-02-05 16:40:29 +01:00
Felix Roos 0a77770ef3 remove double directive 2023-02-05 16:37:00 +01:00
Felix Roos 379b8392dd add snapshot 2023-02-05 16:32:51 +01:00
Felix Roos 0fdae70461 improve samples doc 2023-02-05 16:28:43 +01:00
Felix Roos 087423c754 Merge pull request #409 from tidalcycles/docs
improve effects doc
2023-02-05 16:27:59 +01:00
Felix Roos ce64c98fb7 add adsr image link 2023-02-05 15:08:17 +01:00
Felix Roos e11a8a9dbb Merge pull request #410 from bwagner/patch-3
Update effects.mdx
2023-02-05 14:56:03 +01:00
Bernhard Wagner ef4a68a24d Update effects.mdx
Wether -> Whether
2023-02-05 14:54:27 +01:00
Felix Roos 0ec65c85d3 fix examples + snapshots 2023-02-05 14:52:01 +01:00
Felix Roos 74326f226d format 2023-02-05 14:42:08 +01:00
Felix Roos 554e0d7a39 remove envelope section from synths page 2023-02-05 14:38:47 +01:00
Felix Roos 1b99ac92dd categorize effects + add envelope doc
+ use short, more logical filter params as default
2023-02-05 14:34:59 +01:00
Felix Roos ff0b77908a Merge branch 'main' into docs 2023-02-05 14:34:16 +01:00
Felix Roos 83d19638ba Merge pull request #407 from tidalcycles/shabda-doc
add shabda doc
2023-02-03 19:54:47 +01:00
Felix Roos a7d484b1a8 add shabda doc 2023-02-03 19:53:01 +01:00
Felix Roos d87beb37b8 Merge pull request #405 from tidalcycles/fix-share-on-subpath
fix: share url on subpath
2023-02-02 21:45:56 +01:00
Felix Roos dcdb383960 fix: share url on subpath
fixes https://github.com/tidalcycles/strudel/issues/389
2023-02-02 21:43:24 +01:00
Felix Roos 478a7e95ea Merge pull request #404 from tidalcycles/csound-update
update csound + fix sound output
2023-02-02 21:35:45 +01:00
Felix Roos f7b3b582cc update csound + fix sound output
see https://github.com/csound/csound/issues/1690#issuecomment-1414301145
2023-02-02 21:31:44 +01:00
Felix Roos d1719dc277 Merge pull request #403 from tidalcycles/downgrade-csound
pin @csound/browser to 6.18.3 + bump
2023-02-02 19:53:36 +01:00
Felix Roos 9d8c812aa3 pin @csound/browser to 6.18.3 + bump 2023-02-02 19:51:16 +01:00
Felix Roos 2e390acce9 hotfix: deploy workflow install command 2023-02-01 23:04:13 +01:00
Felix Roos e04797d891 Merge pull request #400 from tidalcycles/awaitable-audio-init
release webaudio
2023-02-01 22:47:26 +01:00
Felix Roos fb6195b081 bump webaudio 2023-02-01 22:45:53 +01:00
Felix Roos c6491a3ccd Merge pull request #399 from tidalcycles/awaitable-audio-init
can now await initAudio + initAudioOnFirstClick
2023-02-01 22:45:16 +01:00
Felix Roos 014ae2107e can now await initAudio + initAudioOnFirstClick 2023-02-01 22:42:25 +01:00
Felix Roos 1457eb9d19 Merge pull request #398 from tidalcycles/fix-minirepl-styles
fix: minirepl styles
2023-02-01 22:32:18 +01:00
Felix Roos 6f5f8cc7d8 fix: minirepl styles 2023-02-01 22:30:24 +01:00
Felix Roos 9ec3fee455 Merge pull request #396 from tidalcycles/pnpm
proper builds + use pnpm workspaces
2023-02-01 22:17:18 +01:00
Felix Roos 2d52168c26 trash obsolete package-lock files 2023-02-01 20:43:16 +01:00
Felix Roos aa5dd7920f organize tasks 2023-02-01 20:38:56 +01:00
Felix Roos d60956e82a update contribution guide to pnpm
+ update root tasks
2023-02-01 20:33:13 +01:00
Alex McLean 91fd3fb5ca add missing snapshots 2023-02-01 15:51:42 +00:00
Alex McLean 46f3b662a7 add pattern methods hurry, press and pressBy (#397) 2023-02-01 15:49:55 +00:00
Felix Roos 54a61dcdae overhaul the remaining readmes 2023-02-01 16:29:18 +01:00
Felix Roos b58f5232c7 add nano-repl as workspace 2023-02-01 16:09:50 +01:00
Felix Roos 9a5bda862c update examples 2023-02-01 16:09:33 +01:00
Felix Roos 7f67adb639 bump eval 2023-02-01 15:49:05 +01:00
Felix Roos 48fd943622 fix: eval dependency + add deprecation note 2023-02-01 15:40:57 +01:00
Felix Roos 08350d00be remove sc prefix to fix build 2023-02-01 15:35:21 +01:00
Felix Roos 84bf4a2686 add pretest 2023-01-30 22:53:53 +01:00
Felix Roos 2823456e96 update lockfile 2023-01-30 22:50:44 +01:00
Felix Roos a373629fc2 fix: gh actions use pnpm 2023-01-30 22:48:24 +01:00
Felix Roos 0aa2f72a3a update core examples 2023-01-29 23:27:35 +01:00
Felix Roos c032f6dde1 add prepublishOnly everywhere 2023-01-29 00:14:07 +01:00
Felix Roos f448d8f334 rename website package 2023-01-29 00:08:29 +01:00
Felix Roos a5d4a43753 xen build 2023-01-28 23:19:33 +01:00
Felix Roos 52e01321ec webdirt build 2023-01-28 23:18:25 +01:00
Felix Roos 19692e0122 webaudio build 2023-01-28 23:14:56 +01:00
Felix Roos cd1da3cb81 transpiler build 2023-01-28 23:12:00 +01:00
Felix Roos ffaa8f4ab3 tone build 2023-01-28 23:09:25 +01:00
Felix Roos f3da9d680d bump 2023-01-28 23:07:55 +01:00
Felix Roos 6118bd24f2 tonal build 2023-01-28 23:06:59 +01:00
Felix Roos fddbb2e2ac soundfonts build 2023-01-28 23:04:30 +01:00
Felix Roos cb7156b091 serial build 2023-01-28 23:01:20 +01:00
Felix Roos b5914a3f12 react build 2023-01-28 22:58:40 +01:00
Felix Roos 348d576ff3 remove dist folder 2023-01-28 22:49:13 +01:00
Felix Roos 7507654749 osc build 2023-01-28 22:40:10 +01:00
Felix Roos c25aad0c4a midi build 2023-01-28 22:35:08 +01:00
Felix Roos 4aa32415cd eval build 2023-01-28 22:32:48 +01:00
Felix Roos cde23bbf98 csound build 2023-01-28 22:27:18 +01:00
Felix Roos 555fe0b629 bump mini 2023-01-28 22:16:33 +01:00
Felix Roos be44c28fd3 add mini build 2023-01-28 22:16:04 +01:00
Felix Roos 657091307e remove unused deps 2023-01-28 22:12:11 +01:00
Felix Roos 458dc6e07d add core build 2023-01-28 22:05:11 +01:00
Felix Roos cfaecf9fcb migrate lerna to pnpm
https://lerna.js.org/docs/recipes/using-pnpm-with-lerna
2023-01-28 22:01:35 +01:00
Felix Roos 902f722d4c add import linting + fix checks 2023-01-28 21:00:42 +01:00
Felix Roos ea2d8b2773 use workspace protocol everywhere 2023-01-28 20:37:56 +01:00
Felix Roos b319754dc3 fix website build 2023-01-28 20:31:23 +01:00
Felix Roos 35f2040717 use pnpm workspaces 2023-01-28 20:14:26 +01:00
Felix Roos 4121fc926e write more about packages / monorepo setup 2023-01-28 17:59:59 +01:00
Felix Roos fd9ab987e6 Merge branch 'main' into docs 2023-01-28 14:23:01 +01:00
Felix Roos 6c3a235b08 Merge pull request #379 from urswilke/add-tidal-drum-patterns-to-examples
Add tidal-drum-patterns to examples
2023-01-27 14:40:40 +01:00
Felix Roos 07cb861385 Merge pull request #388 from tidalcycles/ribbon
add ribbon + test + docs
2023-01-27 14:39:56 +01:00
Alex McLean 217e348fc3 Notes are not essential :) (#393)
* Notes are not essential :)

* Update notes.mdx
2023-01-27 11:10:37 +00:00
Felix Roos ad917afba4 Merge pull request #391 from tidalcycles/docs
document csound
2023-01-21 17:18:12 +01:00
Felix Roos 9539c6d317 fix: left sidebar scroll 2023-01-21 17:14:18 +01:00
Felix Roos e946e1e01e add csound docs 2023-01-21 17:05:57 +01:00
Felix Roos fea1e71a99 Merge remote-tracking branch 'origin/main' into docs 2023-01-21 15:57:54 +01:00
Felix Roos 9731eb8c5b add ribbon + test + docs 2023-01-19 12:25:12 +01:00
Felix Roos e058ae54ef Merge pull request #387 from tidalcycles/rename-a-to-angle
Rename a to angle
2023-01-19 12:04:50 +01:00
Felix Roos ba6714f384 add draw examples 2023-01-19 12:00:00 +01:00
Felix Roos 0a0a761e23 rename a to angle 2023-01-19 11:59:43 +01:00
Felix Roos 88e8368022 Merge pull request #386 from tidalcycles/run
add run + test + docs
2023-01-19 11:49:38 +01:00
Felix Roos 468ccc6288 add run + test + docs 2023-01-19 11:47:11 +01:00
Felix Roos 77e0237148 Merge pull request #385 from tidalcycles/docs-use-note-instead-of-n
docs: use note instead of n to mitigate confusion
2023-01-19 11:32:55 +01:00
Felix Roos ffdfb07f72 docs: use note instead of n to mitigate confusion 2023-01-19 11:27:54 +01:00
Felix Roos 203ed88024 Merge pull request #384 from tidalcycles/update-my-patterns-readme
update my-patterns instructions
2023-01-18 17:10:08 +01:00
Felix Roos 9923bcd16f update my-patterns instructions 2023-01-18 17:01:27 +01:00
urswilke 0179ec051f Revert "run: npm test"
This reverts commit 00709539e9bdfbc1404e984f28453f0a54b5638e.
2023-01-16 23:19:46 +01:00
urswilke 05b6353355 move drum patterns in a new file 2023-01-16 23:11:17 +01:00
urswilke 47c6ed8829 Revert "import patterns created by new method in:"
This reverts commit b266e975755e035b85c0869a30219c80a84db856.
2023-01-16 23:06:43 +01:00
urswilke ff9ebd64e3 run: npm test 2023-01-16 22:41:12 +01:00
urswilke cd2b098b81 import patterns created by new method in:
https://github.com/urswilke/read_beats/commit/ecd8c03b5e29544819831459f4b4ac48d954640f
2023-01-16 22:41:12 +01:00
Felix Roos 7000a4cead Merge pull request #377 from tidalcycles/draw-fixes
Draw fixes
2023-01-15 23:19:42 +01:00
Felix Roos 5aa983b45b do less work when not drawing 2023-01-15 23:11:49 +01:00
Felix Roos 800989419b catch all query errors by default 2023-01-15 22:50:56 +01:00
Felix Roos 362679954a Merge pull request #372 from tidalcycles/local-draw
improve new draw logic
2023-01-14 11:07:07 +01:00
Felix Roos 2732d64beb fix: another dependency array 2023-01-14 10:58:30 +01:00
Felix Roos 88684d6d9e fix dependency array 2023-01-14 10:48:52 +01:00
Felix Roos 9afddf0850 fix sentence 2023-01-14 01:30:56 +01:00
Felix Roos a2d7d6e81f fix: mini repl could eval before modules are ready 2023-01-14 01:27:22 +01:00
Felix Roos 49bcb5e19f fix minor bugs 2023-01-13 16:35:24 +01:00
Felix Roos 3744ea6218 fix: warnings 2023-01-13 15:17:23 +01:00
Felix Roos b2c6d87633 MiniRepl: add punchcard flag for implicit vis
+ reintroduce editPattern
+ add punchcards to mini-notation.mdx
2023-01-13 15:13:39 +01:00
Felix Roos e4f538b674 fix option handling 2023-01-13 13:00:11 +01:00
Felix Roos ea0e0b4396 reset canvas when pattern changes
+ rename noteroll -> punchcard
2023-01-13 12:57:35 +01:00
Felix Roos 1ac784dc7a localize draw logic 2023-01-13 12:03:34 +01:00
Felix Roos d980c9ca4c Merge branch 'main' into docs 2023-01-13 01:52:36 +01:00
Felix Roos 6a2a60df0d hotfix: tests 2023-01-12 17:43:20 +01:00
Felix Roos ee9b89b6d5 add more synonyms 2023-01-12 17:40:58 +01:00
Felix Roos 68cc109933 burn down that undocumented list 2023-01-12 17:25:01 +01:00
Felix Roos 1015bb0fdc Merge pull request #369 from tidalcycles/docs
document more functions + change arp join
2023-01-12 14:40:58 +01:00
Felix Roos 7da94dd109 reformat headings
+ add another note about single quotes
2023-01-12 14:22:41 +01:00
Felix Roos 171808cf2c add note about single quote strings 2023-01-12 14:19:18 +01:00
Felix Roos 78d14cdfea automatically print synonyms in doc 2023-01-12 13:10:22 +01:00
Felix Roos 19982a2ffb remove unused package 2023-01-12 13:00:22 +01:00
Felix Roos 79904560fc fix: snapshot 2023-01-12 12:48:05 +01:00
Felix Roos 28aee1c58d fix polymeter doc 2023-01-12 12:43:41 +01:00
Felix Roos d4512f360b fix: double slash 2023-01-12 12:40:20 +01:00
Felix Roos 48d0ffe868 add script that finds all undocumented exports 2023-01-12 12:35:04 +01:00
Felix Roos 62af12f3b9 remove experimental class properties 2023-01-12 12:32:27 +01:00
Felix Roos efa4bfef2f fix snapshot 2023-01-12 02:23:06 +01:00
Felix Roos fc3ead4c01 Merge branch 'main' into docs 2023-01-12 02:20:16 +01:00
Felix Roos ca9c813b40 format 2023-01-12 02:18:09 +01:00
Felix Roos e3b0f47c40 hide internals for now 2023-01-12 02:15:42 +01:00
Felix Roos bf13e42092 update snap 2023-01-12 01:57:14 +01:00
Felix Roos 4345fda9bc more doc 2023-01-12 01:56:46 +01:00
Felix Roos 4059e9faa9 more doc 2023-01-12 00:10:58 +01:00
Felix Roos 95fcce1bcf fix: snapshot 2023-01-11 23:38:40 +01:00
Felix Roos 86cde9716a arpWith example 2023-01-11 23:37:59 +01:00
Felix Roos 6e315a50ed breaking: arp use innerJoin instead of squeezeJoin 2023-01-11 23:28:17 +01:00
Felix Roos 500c0b6534 doc: arp + arpWith 2023-01-11 23:26:03 +01:00
Felix Roos db75dca118 doc: split accumulation and conditions 2023-01-11 23:05:17 +01:00
Felix Roos d5f37e2cbe add internals doc 2023-01-11 22:48:47 +01:00
Felix Roos a120a9895b fix: right sidebar width 2023-01-11 22:48:33 +01:00
Felix Roos e9c1db020f hotfix: remove mocked .out 2023-01-11 22:11:22 +01:00
alex 08cd319a0b Revert "Merge branch 'main' into main"
This reverts commit 896ec69329, reversing
changes made to 32e64bbb6e.
2023-01-10 19:45:23 +00:00
Alex McLean 896ec69329 Merge branch 'main' into main 2023-01-10 18:23:45 +00:00
Alex McLean 32e64bbb6e Typo 2023-01-09 23:49:16 +00:00
Felix Roos 0974540e5f fix: typo 2023-01-10 00:21:54 +01:00
Felix Roos e06963e616 Merge pull request #364 from urswilke/patch-2
add https to url
2023-01-10 00:03:46 +01:00
Felix Roos a675815529 hotfix: preview command + build peg without logs 2023-01-09 23:55:45 +01:00
alex 3d48135b32 09 2023-01-09 22:47:25 +00:00
urswilke 8f09e7f097 add https to url 2023-01-09 23:44:49 +01:00
Felix Roos e8b09f1124 Merge pull request #360 from tidalcycles/docs
doc structuring
2023-01-09 23:37:34 +01:00
Felix Roos 57ba353594 snaps 2023-01-09 23:31:30 +01:00
Felix Roos b695e090cd docs: control params 2023-01-09 23:27:30 +01:00
Felix Roos 69ecb7b54f support logs in mini repl
+ pass hap to logger
+ add editPattern hook to repl + useStrudel
+ do not throw when webaudio gets plain values
2023-01-09 23:26:20 +01:00
Alex McLean f57fe182ed Support for multiple mininotation operators WIP (#350)
* support for multiple operators
* fix false test failures by sorting by part
* snapshot
2023-01-09 22:23:27 +00:00
Felix Roos 10ee11c886 docs: improve time modifiers page
+ polymeter + euclidRot
+ rename Factories to Pattern Constructors
2023-01-09 20:39:00 +01:00
Alex McLean 45842b1f05 Fix .out(), renaming webaudio's out() to webaudio() (#361)
* breaking test for out()

* rename webaudio's out() to webaudio(), fixes #359
2023-01-08 23:40:15 +00:00
Felix Roos 9ca5f9ad48 some corrections
+ n should not be recommended for notes as it does not work for samples
2023-01-09 00:19:29 +01:00
Felix Roos bb00036a30 further sidebar reorganizing 2023-01-09 00:17:57 +01:00
Felix Roos 4a2a540500 Update README.md 2023-01-08 23:55:07 +01:00
Felix Roos 09217216dc format 2023-01-08 23:48:32 +01:00
Felix Roos 22a64c4931 update snapshots 2023-01-08 23:46:39 +01:00
Felix Roos 93f520b941 Merge remote-tracking branch 'origin/main' into docs 2023-01-08 23:44:27 +01:00
alex c84714dc3a 08 2023-01-08 13:25:22 +00:00
alex a7aa09a13e 07 2023-01-07 23:15:50 +00:00
alex efa1cdfcb2 07 2023-01-07 23:12:19 +00:00
Felix Roos 70695daae8 remove quotes around inline code snippets 2023-01-07 22:12:53 +01:00
Felix Roos 62fdba0600 pull apart functional docs 2023-01-07 22:12:35 +01:00
Felix Roos 5733e00908 add hideDescription flag to JsDoc 2023-01-07 22:11:47 +01:00
alex e56abaefd7 06 2023-01-07 00:02:39 +00:00
Felix Roos c71e893e8e Merge pull request #356 from tidalcycles/docs
docs: tidal comparison + add global fx + add missing sampler fx
2023-01-06 22:02:31 +01:00
Felix Roos 3992356517 casing 2023-01-06 21:58:35 +01:00
Felix Roos dbb84ef129 write more tidal comparison 2023-01-06 21:56:17 +01:00
Felix Roos 8781fa2e33 add filter synonyms 2023-01-06 21:37:31 +01:00
Felix Roos 605a1365d3 update snapshots 2023-01-06 21:15:32 +01:00
Felix Roos ebb1bbc966 improve effects doc 2023-01-06 21:14:19 +01:00
Felix Roos d4518f7a6e began tidal comparison page 2023-01-06 12:50:35 +01:00
Alex McLean 68c9008019 Fix Bjorklund (#343)
* port Rohan Drape's Bjorklund implementation, add Toussaint's tests
* fix euclidLegato, simplifying a bit now that bjork results should always begin with an 'on'
* migrate euclid numbers in tunes
- 3,4 +1
- 5,8 -1
- 6,8 +3

Co-authored-by: Felix Roos <flix91@gmail.com>
2023-01-06 11:31:32 +00:00
Felix Roos cafde1e910 Merge branch 'main' into docs 2023-01-06 11:49:49 +01:00
alex 41f5f3fe6e 05 2023-01-05 23:58:48 +00:00
alex cf12ecfa34 04 2023-01-04 23:36:40 +00:00
Felix Roos 4fa668927f Merge pull request #345 from tidalcycles/fix-prebake-base-path
Fix prebake base path
2023-01-04 20:29:35 +01:00
Felix Roos 24d2b5b4bd Merge pull request #347 from tidalcycles/fix-midi
fixes #346
2023-01-04 19:55:48 +01:00
Felix Roos 4da2e003e1 fixes #346 2023-01-04 19:52:51 +01:00
Felix Roos 205debde9c more links to fix 2023-01-03 23:40:40 +01:00
Felix Roos ba6c7b0901 fix examples route 2023-01-03 23:32:37 +01:00
Felix Roos 8e5d02fd25 do not include url in base pth 2023-01-03 23:32:28 +01:00
Felix Roos 11d3251c67 add base path + use relative links 2023-01-03 23:02:41 +01:00
alex 9ec5787b4d 03 2023-01-03 21:26:56 +00:00
Felix Roos 027c669ad7 make prebake relative to BASE_URL 2023-01-03 22:17:44 +01:00
Alex McLean 405c12ba3f deploy on push 2023-01-03 10:47:20 +00:00
Alex McLean 64fd53a8e5 tweak 2023-01-03 10:43:54 +00:00
alex 069d63e3cf 02 2023-01-02 23:33:48 +00:00
Alex McLean 66049e0e25 Merge pull request #2 from tidalcycles/main
downstream
2023-01-02 21:07:18 +00:00
Alex McLean db7ef01dbb Patternify euclid, fast, slow and polymeter step parameters in mininotation (#341)
* patternify the mininotation bjorklund, and fast (*) slow (/) and pattern step (%) parameters
* simplify replicate (!), should be closer to tidal now
* highlight atoms rather than elements
* tests
2023-01-02 20:28:07 +00:00
Felix Roos 1a6b649fd6 Merge pull request #340 from tidalcycles/animate
more animate functions + mini repl fix
2023-01-02 00:30:16 +01:00
Felix Roos 548619775e rename .. 2023-01-02 00:28:38 +01:00
Felix Roos 4b79a75f39 fix: mini repls were broken 2023-01-02 00:24:33 +01:00
Felix Roos 28912fff97 animate: rescale + move + zoom 2023-01-01 18:47:45 +01:00
alex 98a83ddcc0 01c 2023-01-01 17:22:16 +00:00
alex e9d965ce7a 01b 2023-01-01 14:22:19 +00:00
alex b7624813cc custom domain 2023-01-01 11:49:20 +00:00
Alex McLean 734e451bd9 Merge pull request #1 from tidalcycles/main
pull from upstream
2023-01-01 11:42:58 +00:00
Alex McLean 7a96436085 move /my-patterns to /swatch (#338) 2023-01-01 11:34:11 +00:00
Felix Roos 670af8fb1b Merge pull request #337 from tidalcycles/animate
animation options
2023-01-01 12:22:55 +01:00
Felix Roos 0abd062e5c fix: smear 0 special case 2023-01-01 12:18:46 +01:00
Felix Roos 1286468d5a animation options
+ do not sync by default
2023-01-01 12:11:39 +01:00
alex 0f3da5be4a 01 2023-01-01 10:05:58 +00:00
Alex McLean 9170269e06 Update README.md 2023-01-01 00:34:53 +00:00
Alex McLean 8bb460701f Tidy parser, implement polymeters (#336)
* rename parser stuff to be more explicit and fit with tidal concepts. qualify all strudel function calls
* Add {,}%n polymeter support, with a few tests
2022-12-31 21:42:49 +00:00
Felix Roos c0a7173ca4 Merge pull request #335 from tidalcycles/animate
animate mvp
2022-12-31 16:51:53 +01:00
Felix Roos 949e15d8c6 controllable smear + sync flag 2022-12-31 16:41:13 +01:00
Felix Roos 0caedeb481 animate mvp 2022-12-31 16:23:45 +01:00
Felix Roos 83ca8d95be Merge pull request #334 from tidalcycles/docs
testing + docs docs
2022-12-30 20:16:09 +01:00
Felix Roos 8483868783 docs: testing + docs 2022-12-30 19:54:02 +01:00
Felix Roos 6961388545 Merge branch 'main' into docs 2022-12-30 17:43:54 +01:00
Felix Roos 8ef1ae5202 Merge pull request #333 from tidalcycles/embed-route
Embed mode improvements
2022-12-29 21:11:15 +01:00
Felix Roos 26b8f93cea roll back hh rhythm 2022-12-29 21:08:11 +01:00
Felix Roos a576523976 simplify meltingsubmarine tune 2022-12-29 21:02:04 +01:00
Felix Roos cf21c4085b simplify embedded mode 2022-12-29 21:01:28 +01:00
Felix Roos 204f655d6d Merge pull request #332 from tidalcycles/fix-mini-multiply-floats
fix: can now multiply floats in mini notation
2022-12-29 14:06:19 +01:00
Felix Roos fb14865785 fix: can now multiply floats in mini notation
- fixes #314
2022-12-29 14:02:50 +01:00
Felix Roos 5cd052cc59 Merge pull request #331 from tidalcycles/my-patterns
improve displaying 's' in pianoroll
2022-12-29 13:50:07 +01:00
Felix Roos af49c4117c add color to some tunes 2022-12-29 13:25:20 +01:00
Felix Roos dd736130a0 improve pianoroll value mapping 2022-12-29 13:03:28 +01:00
Felix Roos cee8bda676 Merge pull request #330 from tidalcycles/my-patterns
my-patterns: fix paths + update readme
2022-12-28 17:35:35 +01:00
Felix Roos 6420a72ceb fix paths + update readme 2022-12-28 17:33:14 +01:00
Felix Roos 380e7c7899 Merge pull request #329 from tidalcycles/my-patterns
my-patterns build + deploy
2022-12-28 17:11:40 +01:00
Felix Roos 16b4058a8b fix build + simplify logic + add deploy note 2022-12-28 17:09:18 +01:00
Felix Roos e3fba0257f Merge pull request #328 from tidalcycles/my-patterns
add my-patterns
2022-12-28 15:43:31 +01:00
Felix Roos cb8b65f6f3 add my-patterns 2022-12-28 15:39:42 +01:00
Felix Roos 3944a8ed54 Merge pull request #327 from tidalcycles/docs
add examples route
2022-12-28 14:47:13 +01:00
Felix Roos 2ceafe6379 Merge pull request #326 from tidalcycles/eval-fix-node
fix: workaround Object.assign globalThis
2022-12-28 14:44:30 +01:00
Felix Roos 9f058bd88a add examples page with prerendered swatches 2022-12-28 14:40:53 +01:00
Felix Roos 1dd0ff13d8 Merge remote-tracking branch 'origin/eval-fix-node' into docs 2022-12-28 14:02:55 +01:00
Felix Roos 6061f10230 fix: workaround Object.assign globalThis
- see comment
2022-12-28 13:57:27 +01:00
Felix Roos ea59fafb52 Merge pull request #324 from tidalcycles/docs
mini repl improvements
2022-12-26 23:29:47 +01:00
Felix Roos 2ff71126de add withCanvas 2022-12-26 23:25:57 +01:00
Felix Roos 6d522e1743 Merge remote-tracking branch 'origin/main' into docs 2022-12-26 23:13:51 +01:00
Felix Roos b37f3c819d remove color magic for now 2022-12-26 23:12:16 +01:00
Felix Roos 1b41994e5f codeformat 2022-12-26 23:01:18 +01:00
Felix Roos 4fd4b0d713 Merge pull request #323 from tidalcycles/notes-without-octave
support notes without octave
2022-12-26 23:00:34 +01:00
Felix Roos 7b43ed702e only start animation loop when canvas is visible
+ add some placeholder files
2022-12-26 22:59:41 +01:00
Felix Roos 56cd77942b remove old graphic 2022-12-26 22:50:10 +01:00
Felix Roos 37dc723b4b react package build... 2022-12-26 22:44:23 +01:00
Felix Roos d7ea37c917 add technical manual to docs 2022-12-26 22:43:02 +01:00
Felix Roos c1d2bf9b9f fix anchor links 2022-12-26 22:16:46 +01:00
Felix Roos 36f837730a better color support 2022-12-26 22:13:41 +01:00
Felix Roos b8f0a1dd82 fix format 2022-12-26 21:04:15 +01:00
Felix Roos 2d1b62a978 begin reimplementing draw logic for parallel use 2022-12-26 20:58:57 +01:00
Felix Roos 0792d0d59d add scheduler.now to get phase starting from 0 2022-12-26 20:55:21 +01:00
Felix Roos 8c6da1a658 Merge branch 'main' into docs 2022-12-26 13:31:06 +01:00
Felix Roos 26be10f937 hotfix: css + sn -> sd 2022-12-26 12:43:08 +01:00
Felix Roos ef4d9a13ed Merge pull request #320 from jarmitage/main
tutorial updates
2022-12-26 12:37:36 +01:00
Jack Armitage 320d987ede wut 2022-12-26 11:32:55 +00:00
Jack Armitage 51a4c4d13b codeformat 2022-12-26 11:30:01 +00:00
Felix Roos aaf3ae5f9c microrhythm experiment 2022-12-26 11:25:27 +01:00
Jack Armitage 858f4f74b3 tutorial updates 2022-12-25 16:21:18 +00:00
Felix Roos 3feed90039 translate parts of tidal "How-tos" 2022-12-24 00:14:26 +01:00
Felix Roos b46330fc7a proper setup minirepl 2022-12-24 00:12:54 +01:00
Felix Roos 5ca7ce1f75 Merge commit 'd1d9b37ec764dd7377754d88e72996ef887beb82' into docs 2022-12-23 23:06:54 +01:00
Felix Roos d1d9b37ec7 supper notes without octave 2022-12-23 23:01:07 +01:00
Felix Roos 823115c4ec Merge pull request #318 from tidalcycles/reference-tab-sort
Reference tab sort
2022-12-23 18:26:30 +01:00
Felix Roos 8fe3fda27f update snapshots 2022-12-23 18:24:40 +01:00
Felix Roos 63fffd7493 docs: envelope functions 2022-12-23 17:57:01 +01:00
Felix Roos 243a350e2b fix: #317 2022-12-23 17:32:25 +01:00
Felix Roos 8c09e7ba36 hotfix: go to repl link 2022-12-23 01:05:17 +01:00
Felix Roos d89502f91f hotfix: make sure jsdoc is built before build 2022-12-23 01:01:45 +01:00
Felix Roos 847602f933 hotfix: add missing npm ci 2022-12-23 00:58:48 +01:00
Felix Roos 8fcf8fe39c Revert "hotfix: build task for ci"
This reverts commit d59eec9296.
2022-12-23 00:57:59 +01:00
Felix Roos d59eec9296 hotfix: build task for ci 2022-12-23 00:54:43 +01:00
Felix Roos b9122ebc34 Merge pull request #315 from tidalcycles/astro-build
Astro build
2022-12-23 00:49:56 +01:00
Felix Roos 38e066ee49 fix import 2022-12-23 00:47:33 +01:00
Felix Roos 232a04a1a2 docs: mobile nav 2022-12-23 00:41:47 +01:00
Felix Roos dcb145635c add tutorial redirect
+ place learn link last in repl header
+ fix all old links to /tutorial
2022-12-22 23:47:11 +01:00
Felix Roos c9b73c68a6 fix pretest task 2022-12-22 23:32:19 +01:00
Felix Roos 08f7925ea9 delete now obsolete repl + tutorial folders 2022-12-22 23:28:34 +01:00
Felix Roos ed79ec7940 copy potentially useful files from old tutorial 2022-12-22 23:22:48 +01:00
Felix Roos 869a44dd04 autolink headings 2022-12-22 23:19:38 +01:00
Felix Roos 6a9e9ebc4c responsiveness 2022-12-22 23:07:14 +01:00
Felix Roos f18a2a11fa make repl and doc styles more similar 2022-12-22 22:49:41 +01:00
Felix Roos 9aaaa755c7 fix import + update build task 2022-12-22 17:23:35 +01:00
Felix Roos 818cd9044b integrate repl into astro website
+ update build and setup tasks + workflow
+ move repl test folder to root
+ move docs and repl to website/src
2022-12-22 17:20:51 +01:00
Felix Roos 006ca12b6d rename folder 2022-12-22 15:36:24 +01:00
Felix Roos b5f9ab7c20 slight layout fixes 2022-12-20 22:47:49 +01:00
Felix Roos 0981f95f16 style left sidebar 2022-12-20 22:26:12 +01:00
Felix Roos f64ef32eaa more styling 2022-12-20 22:19:30 +01:00
Felix Roos 7a19659c9e remove theme.css + cooler bg 2022-12-20 21:57:41 +01:00
Felix Roos b1202fcd55 split tutorial into multiple pages
+ improve layout a bit
2022-12-20 21:38:08 +01:00
Felix Roos b8f991eddb simplify writing mdx files 2022-12-20 20:42:42 +01:00
Felix Roos d0013f55a2 format 2022-12-20 19:50:32 +01:00
Felix Roos 7efaff4f6f basic style for toc + further cleanup 2022-12-20 19:47:28 +01:00
Felix Roos bc7a84e462 basic astro docs 2022-12-19 23:23:31 +01:00
Felix Roos 61657bd1b1 Merge pull request #307 from tidalcycles/obj-support-scale
object support for .scale
2022-12-19 21:02:37 +01:00
Felix Roos fc63f4f89c Merge pull request #312 from tidalcycles/jsdoc-component
Jsdoc component
2022-12-19 21:02:21 +01:00
Felix Roos 2c44c252d7 fixed namespaced anchor links 2022-12-19 20:59:47 +01:00
Felix Roos 613fc6e3ef fix anchor icon color 2022-12-19 20:57:42 +01:00
Felix Roos 0a9604d10e throw out nunjucks 2022-12-19 20:48:57 +01:00
Felix Roos 1cabedc65e Merge pull request #311 from tidalcycles/fix-clipboard
fix: copy share link to clipboard was broken for some browers
2022-12-19 20:31:46 +01:00
Felix Roos 4e5a0d9e02 fix: #309 2022-12-19 20:30:01 +01:00
Alex McLean bf373d894d ICLC2023 paper (#306)
Paper submission for the international conference on live coding
2022-12-19 11:11:24 +00:00
Felix Roos e6bbad84c1 Merge pull request #308 from tidalcycles/pianoroll-freq-support
support freq in pianoroll
2022-12-15 21:23:22 +01:00
Felix Roos 4de477d46c support freq in pianoroll 2022-12-15 21:21:20 +01:00
Felix Roos 264cab3c9b add scale test 2022-12-15 20:35:10 +01:00
Felix Roos 7f9ef59bea Merge branch 'main' into obj-support-scale 2022-12-15 17:49:24 +01:00
Felix Roos 8ebbef4cbb fix core deps after release trouble 2022-12-13 22:46:35 +01:00
Felix Roos 0c98a84242 bump root to 0.5.0 2022-12-13 22:38:58 +01:00
Felix Roos 2bbdd21b2f Publish
- @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
2022-12-13 22:38:08 +01:00
Felix Roos 794cfe949b bump already published packages 2022-12-13 22:36:13 +01:00
Felix Roos 6a5010a2d6 bump csound 2022-12-13 22:28:16 +01:00
Felix Roos 61559fee9d Revert "Publish"
This reverts commit 2118a20408.
2022-12-13 22:24:12 +01:00
Felix Roos 2118a20408 Publish
- @strudel.cycles/core@0.5.0
 - @strudel.cycles/csound@0.4.0
 - @strudel.cycles/eval@0.5.0
 - @strudel.cycles/midi@0.5.0
 - @strudel.cycles/mini@0.5.0
 - @strudel.cycles/osc@0.4.0
 - @strudel.cycles/react@0.5.0
 - @strudel.cycles/serial@0.3.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
2022-12-13 22:22:27 +01:00
Felix Roos b0bc20cb83 hotfix: code format
- PR was issued before prettier check, now ci fails
2022-12-13 22:10:09 +01:00
Felix Roos 2cd77b075b Merge pull request #303 from gogins/main
Updated csoundm to use the register facility .
2022-12-13 22:07:27 +01:00
Felix Roos 03450c6085 Merge pull request #305 from tidalcycles/estlint-prettier-check
add lint + prettier check before test
2022-12-13 21:57:03 +01:00
Felix Roos 5d3c522da2 run prettier + lint separately (improves output) 2022-12-13 21:53:45 +01:00
Felix Roos bf1ba6efc0 code format 2022-12-13 21:32:03 +01:00
Felix Roos 67ad82d52e add lint + prettier check before test 2022-12-13 21:27:16 +01:00
Felix Roos f437d976f8 Merge pull request #301 from tidalcycles/support-freq-in-sampler
add freq support to sampler
2022-12-13 21:21:43 +01:00
gogins c94443faaa Updated csoundm to use . 2022-12-12 20:54:03 -05:00
Felix Roos c6d57f6a56 fix non note samples 2022-12-12 20:53:11 +01:00
Felix Roos 09b06da403 fix error message 2022-12-12 20:45:15 +01:00
Felix Roos df73ce8a60 add freq support to sampler 2022-12-12 20:41:09 +01:00
Felix Roos 8b22c2e04f Merge pull request #300 from tidalcycles/fix-trim
fix whitespace trimming
2022-12-12 00:48:41 +01:00
Felix Roos b4f4d6cea2 fix whitespace trimming 2022-12-12 00:45:47 +01:00
Felix Roos cdf7b2acf1 Merge branch 'main' of https://github.com/tidalcycles/strudel 2022-12-12 00:23:22 +01:00
Felix Roos 94651731a5 hotfix: uncomment essential line :) 2022-12-12 00:23:03 +01:00
Alex McLean 56424d29a3 .defragmentHaps() (#299) 2022-12-11 23:21:53 +00:00
Felix Roos c5083b2aef Merge pull request #298 from tidalcycles/dont-highlight-whitespace
remove whitespace from highlighted region
2022-12-11 23:17:48 +01:00
Felix Roos 1b06795ffe remove whitespace from highlighted region 2022-12-11 23:14:47 +01:00
Felix Roos 6679cd60ce scale now supports running on object values with n 2022-12-11 22:45:36 +01:00
Felix Roos 843a3c16ba Merge pull request #297 from tidalcycles/package-update
update vitest
2022-12-11 22:03:26 +01:00
Felix Roos df40204a57 update vitest 2022-12-11 21:58:58 +01:00
Felix Roos 210910eb6e hotfix: lastOf was undefined 2022-12-11 21:56:05 +01:00
Felix Roos ef427758da Merge pull request #287 from tidalcycles/numeral-union
can now add bare numbers to numeral object props
2022-12-11 21:44:16 +01:00
Felix Roos def6bbf683 add test 2022-12-11 21:43:05 +01:00
Felix Roos 5f37a4a21c Merge pull request #295 from tidalcycles/refactor-bootstrap
Move stuff to new register function
2022-12-11 21:27:58 +01:00
Felix Roos dc869987f9 Merge pull request #296 from tidalcycles/prettier-task
add prettier task
2022-12-11 20:07:12 +01:00
Felix Roos b98d2201e5 add prettier task 2022-12-11 19:37:36 +01:00
Felix Roos 8dd6440bb8 update snapshots 2022-12-11 13:46:22 +01:00
Felix Roos a2d83c48eb comment out pipe operator test 2022-12-11 13:28:54 +01:00
Felix Roos a0ae8f4a07 "fix" voice leading 2022-12-11 13:28:24 +01:00
Felix Roos 719dcbcd4d fix some tests 2022-12-11 12:06:00 +01:00
Felix Roos caa207e868 dont use random seedState for now 2022-12-11 11:55:14 +01:00
Felix Roos 306004ecd2 make mini "?" behave like .degradeBy + add comment 2022-12-11 00:13:30 +01:00
Felix Roos bcac3c5b84 fix typo 2022-12-11 00:08:13 +01:00
Felix Roos ccc90108df snapshots 2022-12-10 22:59:39 +01:00
Felix Roos b9781915a4 remove bootstrap + Pattern.patternify 2022-12-10 22:58:07 +01:00
Felix Roos 1890e65b75 refactor speak 2022-12-10 22:56:08 +01:00
Felix Roos 2f4da3ed52 refactor csound 2022-12-10 22:47:24 +01:00
Felix Roos 27a6ac0c0b refactor xen and tone packages 2022-12-10 22:39:51 +01:00
Felix Roos b81a66f07e refactor uses of voicings
+ fix usages of scaleTranspose
2022-12-10 21:47:58 +01:00
Felix Roos bc43fc9585 refactor tonal functions to 'register' 2022-12-10 21:34:38 +01:00
Felix Roos 4f7c013c78 refactor most signal functions 2022-12-10 21:03:36 +01:00
Felix Roos 09b15a07c6 use register for degradeBy / undegradeBy 2022-12-10 19:25:51 +01:00
Alex McLean 4340f024d3 Reorganise pattern.mjs with a 'toplevel first' regime (#286)
'toplevel first' regime
* loopAt has its optional cps parameter removed, with loopAtCps added for supporting that usage.
* rename bitlevel operations e.g. _and -> band

Co-authored-by: Felix Roos <flix91@gmail.com>
2022-12-10 14:39:03 +00:00
Alex McLean 98e9780819 Fancy hap show, include part in snapshots (#291)
* fix _mod import

* prettier hap show, use both whole and parts in snapshots, rebuild snapshots
2022-12-10 10:56:16 +00:00
Felix Roos a45d63595f delete bare value before numeral union 2022-12-09 11:00:28 +01:00
Felix Roos 5fbd1453b4 can now add bare numbers to numeral object props 2022-12-09 10:40:31 +01:00
Alex McLean f827201ee0 Switch 'operators' from .whatHow to .what.how, and make sure there are toplevel curried functions for all of them. Rename util.mod to util._mod, to make room for toplevel 'operator' of that name. (#285) 2022-12-07 19:07:55 +00:00
Felix Roos 485a96962a Merge pull request #281 from tidalcycles/arp
implement collect + arp function
2022-12-04 12:51:01 +01:00
Felix Roos 98a104f731 update snapshot 2022-12-04 11:58:19 +01:00
Felix Roos ff987f14d7 add arp example tune 2022-12-04 11:57:40 +01:00
Felix Roos 4dd08268dc implement collect + arp function 2022-12-04 11:38:11 +01:00
Felix Roos c18a13d4fc Merge pull request #278 from tidalcycles/do-not-recompile-orc
do not recompile orc
2022-12-02 13:38:27 +01:00
Felix Roos 7a79995727 do not recompile orc 2022-12-02 13:34:05 +01:00
Felix Roos 01eca562c5 Merge pull request #275 from tidalcycles/csound
add basic csound output
2022-12-02 12:49:26 +01:00
Felix Roos f491d0c0c4 fix loadOrc in tests 2022-12-02 12:22:32 +01:00
Felix Roos edf2287e13 Merge remote-tracking branch 'origin/main' into csound 2022-12-02 12:20:12 +01:00
Felix Roos fcaab633c1 Merge pull request #277 from tidalcycles/tune-licenses
add licenses / credits to all tunes + remove some
2022-12-02 12:18:41 +01:00
Felix Roos 33b6579b5d update snapshots 2022-12-02 12:17:15 +01:00
Felix Roos 72a8e4bc22 add licenses / credits to all tunes + remove some 2022-12-02 12:11:28 +01:00
Felix Roos c67b02b7b0 update tunes 2022-12-02 12:09:58 +01:00
Felix Roos 486cd00384 added loadOrc + removed livecode.orc by default 2022-12-02 12:09:21 +01:00
Alex McLean caea7bb39d Support sending CRC16 bytes with serial messages (#276)
Optionally add a crc16 checksum.
Optionally support sending names in name/value pairs as single characters
2022-12-02 10:45:01 +00:00
Felix Roos e8fb7ee683 now passing controls as string keymap 2022-12-02 11:38:47 +01:00
Felix Roos e4ee4211c8 delete strudel unrealted example 2022-12-01 15:10:22 +01:00
Felix Roos 3fa3ebee14 Merge remote-tracking branch 'origin/main' into csound 2022-12-01 15:05:23 +01:00
Felix Roos 8e531f400e allow defining csound on the window 2022-12-01 15:00:16 +01:00
Felix Roos 5727c0dc8a clean up tunes + also load presets.orc 2022-12-01 14:56:50 +01:00
Felix Roos f599088cdf cleanup 2022-12-01 14:44:53 +01:00
Felix Roos d78da55f54 lazy init + add livecode.org 2022-12-01 14:36:00 +01:00
Felix Roos 9052ff71e6 get rid of csound warning on reevaluation:
- only compile on init, use evalCode after
- pull presets into csd file
- use custom logging
2022-12-01 12:34:26 +01:00
Felix Roos 713da887ca Merge branch 'tonal-update' into csound 2022-12-01 12:32:05 +01:00
Felix Roos ad5950697e Merge pull request #273 from tidalcycles/fix-tutorial-bugs
release version bumps
2022-11-29 23:41:39 +01:00
Felix Roos 85d0d06cab Merge branch 'main' into fix-tutorial-bugs 2022-11-29 23:37:35 +01:00
Felix Roos be6ec558e3 Merge pull request #271 from tidalcycles/eslint
add eslint
2022-11-29 23:34:50 +01:00
Felix Roos dd2f60810a Merge pull request #272 from tidalcycles/tonal-update
tonal update with fixed memory leak
2022-11-29 23:34:26 +01:00
Felix Roos 6c0b86d8f4 update tonal, fixes #269 2022-11-29 23:31:23 +01:00
Felix Roos 517ada6dbf tiny time improvement 2022-11-29 23:02:09 +01:00
Felix Roos 0a098e3008 mock csound 2022-11-29 22:04:46 +01:00
Felix Roos c40078ffc9 improve csound bindings:
- better timing
- can now pass instrument to .csound(...)
- can now write instruments with csound(...)
2022-11-29 21:59:22 +01:00
Felix Roos 729e0afdbe fix typo 2022-11-29 00:10:21 +01:00
Felix Roos eab86840d3 baasic csound output 2022-11-29 00:05:51 +01:00
Felix Roos 43aa2247f1 baasic csound output 2022-11-29 00:05:36 +01:00
Felix Roos afe17a507e update tonal: not working... 2022-11-28 23:00:15 +01:00
Felix Roos e621020474 continue tutorial 2022-11-28 21:33:17 +01:00
Felix Roos ac2aa7f288 add csound minimal example 2022-11-28 20:48:52 +01:00
Felix Roos 805bd7e930 simplify without-audio example 2022-11-24 20:56:09 +01:00
Felix Roos f9bf2122b7 add without-audio example 2022-11-24 20:13:54 +01:00
Felix Roos 4e3e533e13 repl: optional eval callbacks 2022-11-24 20:13:04 +01:00
Felix Roos 611c429912 lint before test 2022-11-24 15:31:47 +01:00
Felix Roos e2898ee5bf add eslint + fix lint errors 2022-11-24 15:30:11 +01:00
Alex McLean e1a532500e Tidying up core (#256)
* remove _ prefixes except for functions to be patternified
* categorise pattern methods
* experimental support for `.add.squeeze` and friends as alternative to `.addSqueeze`
* `every` is now an alias for `firstOf` with additional `lastOf` (which every will become an alias for next)
2022-11-22 08:51:25 +00:00
Felix Roos 4cf412b93d Merge pull request #266 from tidalcycles/faster-fast
fix performance bottleneck
2022-11-21 22:15:48 +01:00
Felix Roos 54c9c434e0 fix examples snapshot 2022-11-21 22:09:26 +01:00
Felix Roos de19f3e5fe fix tune snapshots 2022-11-21 22:08:17 +01:00
Felix Roos 8304993481 fix: #194 2022-11-21 21:59:08 +01:00
Felix Roos 4c838aeaca hotfix: weird audion bug 2022-11-17 11:13:49 +01:00
Felix Roos 4ec1145dce Publish
- @strudel.cycles/core@0.4.1
 - @strudel.cycles/eval@0.4.1
 - @strudel.cycles/midi@0.4.1
 - @strudel.cycles/mini@0.4.1
 - @strudel.cycles/osc@0.3.1
 - @strudel.cycles/react@0.4.2
 - @strudel.cycles/soundfonts@0.4.2
 - @strudel.cycles/tonal@0.4.1
 - @strudel.cycles/tone@0.4.1
 - @strudel.cycles/transpiler@0.4.1
 - @strudel.cycles/webaudio@0.4.2
 - @strudel.cycles/webdirt@0.4.1
 - @strudel.cycles/xen@0.4.1
2022-11-17 11:09:54 +01:00
Felix Roos 547d925065 Merge pull request #263 from tidalcycles/fix-tutorial-bugs
fix tutorial bugs
2022-11-17 11:08:37 +01:00
Felix Roos 874633051b fix: snapshot 2022-11-17 10:56:46 +01:00
Felix Roos 2293f1ba15 fix: worklets now work in the tutorial again 2022-11-17 10:52:07 +01:00
Felix Roos 483c3f61b5 midi now works in the tutorial 2022-11-17 10:49:44 +01:00
Felix Roos 83263968f2 fix: rootNotes example 2022-11-17 10:41:32 +01:00
Felix Roos f279c61792 fix: each example 2022-11-17 10:19:04 +01:00
Felix Roos 9717c696d8 add s for sharp (fixes notes example) 2022-11-17 10:16:29 +01:00
Felix Roos 94a594c777 fix sample examples 2022-11-17 10:15:59 +01:00
Felix Roos f1ae8a17cf fix: could play multiple mini repl at once 2022-11-17 10:07:19 +01:00
Felix Roos add9c43827 Merge pull request #254 from tidalcycles/binaries
Binaries
2022-11-16 13:15:28 +01:00
Felix Roos d3f6a5c296 package-lock 2022-11-16 13:13:50 +01:00
Felix Roos 4aea78b7c0 Merge branch 'main' into binaries 2022-11-16 13:13:11 +01:00
Felix Roos 4313fe670d hotfix: fix share #261 2022-11-13 21:32:46 +01:00
Felix Roos 2e8a1b67ea hotfix: fix prebuild 2022-11-13 20:53:28 +01:00
Felix Roos e73044c533 Publish
- @strudel.cycles/react@0.4.1
 - @strudel.cycles/soundfonts@0.4.1
 - @strudel.cycles/webaudio@0.4.1
2022-11-13 20:48:52 +01:00
Felix Roos 418f09e364 hotfix: remove webaudio build for now 2022-11-13 20:48:32 +01:00
Felix Roos 08f207a396 package-lock 2022-11-13 20:44:05 +01:00
Felix Roos 4f57060708 Publish
- @strudel.cycles/core@0.4.0
 - @strudel.cycles/eval@0.4.0
 - @strudel.cycles/midi@0.4.0
 - @strudel.cycles/mini@0.4.0
 - @strudel.cycles/osc@0.3.0
 - @strudel.cycles/react@0.4.0
 - @strudel.cycles/serial@0.2.0
 - @strudel.cycles/soundfonts@0.4.0
 - @strudel.cycles/tonal@0.4.0
 - @strudel.cycles/tone@0.4.0
 - @strudel.cycles/transpiler@0.4.0
 - @strudel.cycles/webaudio@0.4.0
 - @strudel.cycles/webdirt@0.4.0
 - @strudel.cycles/xen@0.4.0
2022-11-13 20:43:00 +01:00
Felix Roos 1507724ecd hotfix: webaudio main file 2022-11-13 20:42:17 +01:00
Felix Roos 4bc2f64b24 Merge pull request #255 from tidalcycles/repl-refactoring
Repl refactoring
2022-11-13 20:20:32 +01:00
Felix Roos 839ba31dfb remove refactoring notes 2022-11-13 18:49:16 +01:00
Felix Roos 2341452d91 fix: highlighting error 2022-11-13 18:44:00 +01:00
Felix Roos 7ab263b514 floating error message 2022-11-13 17:11:14 +01:00
Felix Roos 45b5b5960f remove hideHeader function 2022-11-13 16:54:45 +01:00
Felix Roos 1b8ec1f01c secret zen mode 2022-11-13 15:47:11 +01:00
Felix Roos c92cb1c096 better draw cleanup + began reference tab 2022-11-13 14:50:48 +01:00
Felix Roos 8f31fbe275 proper draw cleanup 2022-11-13 13:58:36 +01:00
Felix Roos aa76419eda fix activeFooter state 2022-11-13 12:25:30 +01:00
Felix Roos 21503c0c38 separate header + footer components 2022-11-13 12:12:19 +01:00
Felix Roos d957b19f55 fix first highlights 2022-11-13 02:00:09 +01:00
Felix Roos 122c4242ce use new transpiler in test runtime 2022-11-13 01:43:54 +01:00
Felix Roos e769ed2fd8 move draw stuff from tone to core + fix getPhase 2022-11-13 01:42:00 +01:00
Felix Roos c722904831 prevent flicker 2022-11-13 00:30:48 +01:00
Felix Roos c93faa9564 show intro only when coming to root url 2022-11-13 00:30:18 +01:00
Felix Roos ce6495a46d unfriend intro readers 2022-11-12 23:38:02 +01:00
Felix Roos 04f2b905af basic intro tab 2022-11-12 21:28:07 +01:00
Felix Roos b668a2c0d2 refactor onTrigger 2022-11-12 20:17:57 +01:00
Felix Roos 5fc8f10602 basic samples tab 2022-11-12 20:17:01 +01:00
Felix Roos a27f399a9e tabbed footer 2022-11-12 17:50:10 +01:00
Felix Roos ff5d14fb63 can now have multiple triggers
+ Pattern.log now makes sense
2022-11-12 16:52:00 +01:00
Felix Roos 27fb2d2d5b remove onLog callbacks 2022-11-12 12:07:02 +01:00
Felix Roos 0b9d59bf0e logger works now outside of react
+ dynamic sample loading logs
+ remove old sampler code
2022-11-12 11:50:39 +01:00
Felix Roos 23e059a065 scheduler error handling + style 2022-11-11 23:35:46 +01:00
Felix Roos 45c7b29a96 big style update + new log system 2022-11-11 22:46:20 +01:00
Felix Roos 3e6c3fda60 update todos 2022-11-10 22:30:12 +01:00
Felix Roos 1a1363ef77 scheduler error handling 2022-11-10 22:25:58 +01:00
Felix Roos b5c51e231b lazy midi init + remove useWebMidi hook 2022-11-10 22:25:28 +01:00
Felix Roos 22711dd7be remove log 2022-11-10 22:05:08 +01:00
Felix Roos 1ba4d3d5d1 only connect via osc when .osc is called 2022-11-10 22:04:22 +01:00
Felix Roos 823ab73585 cleaner error when midi is unsupported 2022-11-10 22:04:02 +01:00
Felix Roos 66c444efac add sourcemaps 2022-11-10 22:03:34 +01:00
Felix Roos b688b8921a init audio on first click to remove warning 2022-11-10 22:03:23 +01:00
Felix Roos 00550ddab5 pass all params to onTrigger 2022-11-10 22:02:08 +01:00
Felix Roos 42fedec088 fix logger 2022-11-10 22:01:55 +01:00
Felix Roos ff3bc0e8c2 fix core log 2022-11-10 22:01:49 +01:00
Felix Roos dde7dff870 fix: hash urls 2022-11-10 21:11:25 +01:00
Felix Roos 25ffc9cf96 add logger 2022-11-10 21:10:33 +01:00
Felix Roos eca92cf5b5 fix: web midi 2022-11-10 18:12:38 +01:00
Felix Roos 372bdf8be7 fix: highlighting sync 2022-11-10 17:15:10 +01:00
Felix Roos c7c90b0647 fix mini repl + improve repl api 2022-11-10 16:36:51 +01:00
Felix Roos 14c2da4fa2 started refac repl to new scheduler + transpiler 2022-11-10 12:07:36 +01:00
Felix Roos 64275cfd22 revert server changes 2022-11-10 10:12:52 +01:00
Felix Roos f0b099d9f7 Merge remote-tracking branch 'origin/main' into binaries 2022-11-10 10:11:47 +01:00
Felix Roos c99d957bc8 Merge pull request #250 from tidalcycles/webaudio-build
Webaudio build
2022-11-08 23:35:10 +01:00
Felix Roos 51b14d55ec fix webaudio main file + add buildless repl 2022-11-08 23:29:27 +01:00
Felix Roos f92d9994df Publish
- @strudel.cycles/soundfonts@0.3.3
 - @strudel.cycles/webaudio@0.3.3
2022-11-08 23:17:43 +01:00
Felix Roos 431e1b87bd add webaudio cjs + esm build task 2022-11-08 23:16:24 +01:00
Felix Roos 3ec2fc6030 Publish
- @strudel.cycles/midi@0.3.3
 - @strudel.cycles/mini@0.3.3
 - @strudel.cycles/react@0.3.3
 - @strudel.cycles/tonal@0.3.3
 - @strudel.cycles/tone@0.3.3
2022-11-08 22:52:46 +01:00
Felix Roos 99f416bf6b hotfix: fix chord-voicings dependency 2022-11-08 22:51:28 +01:00
Felix Roos ad3a324719 Merge branch 'in-source-doc' into binaries 2022-05-25 21:55:53 +02:00
Felix Roos 8c9e178206 add build script for binaries 2022-05-25 21:24:05 +02:00
694 changed files with 80925 additions and 80385 deletions
+24
View File
@@ -0,0 +1,24 @@
krill-parser.js
krill.pegjs
.eslintrc.json
server.js
tidal-sniffer.js
*.jsx
tunejs.js
out/**
postcss.config.js
postcss.config.cjs
tailwind.config.js
tailwind.config.cjs
vite.config.js
/**/dist/**/*
!**/*.mjs
**/*.tsx
**/*.ts
**/*.json
**/dev-dist
**/dist
/src-tauri/target/**/*
reverbGen.mjs
hydra.mjs
jsdoc-synonyms.js
+17
View File
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["eslint:recommended"],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["import"],
"rules": {
"no-unused-vars": ["warn", { "destructuredArrayIgnorePattern": ".", "ignoreRestSiblings": false }],
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}]
}
}
+9 -6
View File
@@ -21,16 +21,19 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.11.0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
node-version: 20
cache: "pnpm"
- name: Install Dependencies
run: npm ci && cd repl && npm ci && cd ../tutorial && npm ci
run: pnpm install
- name: Build
run: npm run build
run: pnpm build
- name: Setup Pages
uses: actions/configure-pages@v2
@@ -39,7 +42,7 @@ jobs:
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: "./out"
path: "./website/dist"
- name: Deploy to GitHub Pages
id: deployment
+62
View File
@@ -0,0 +1,62 @@
name: Tauri Builder
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
release:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
rust_target: x86_64-unknown-linux-gnu
- os: macos-latest
rust_target: x86_64-apple-darwin
- os: macos-latest
rust_target: aarch64-apple-darwin
- os: windows-latest
rust_target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- name: Node.js setup
uses: actions/setup-node@v3
with:
node-version: latest
# node-version-file: '.nvmrc'
- name: Install Rust (Stable)
run:
curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf libasound2-dev
- name: Install app dependencies from lockfile and build web
run: pnpm install
- name: Build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# tauri-action replaces \_\_VERSION\_\_ with the app version
tagName: ${{ github.ref_name }}
releaseName: "Strudel v__VERSION__"
releaseBody: |
See the assets to download this version and install.
releaseDraft: true
prerelease: false
+13 -8
View File
@@ -7,13 +7,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
node-version: [20]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm test
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.11.0
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install
- run: pnpm run format-check
- run: pnpm run lint
- run: pnpm test
+90 -1
View File
@@ -37,4 +37,93 @@ talk/public/EmuSP12
talk/public/samples
server/samples/old
repl/stats.html
coverage
coverage
public/icons/apple-splash-*
dev-dist
Dirt-Samples
tidal-drum-machines
webaudiofontdata
src-tauri/target
# BEGIN JetBrains -> END JetBrains
# for JetBrains IDE users, e.g. WebStorm. Source: https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# END JetBrains -> BEGIN JetBrains
+13
View File
@@ -0,0 +1,13 @@
*.md
*.json
*.yml
*.
**/out
**/dist
packages/mini/krill-parser.js
packages/xen/tunejs.js
paper
pnpm-lock.yaml
pnpm-workspace.yaml
**/dev-dist
website/.astro
+14 -15
View File
@@ -1,16 +1,15 @@
{
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
}
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
}
+2 -1
View File
@@ -5,5 +5,6 @@
],
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///home/felix/projects/strudel/.github/workflows/deploy.yml"
}
},
"testing.automaticallyOpenPeekView": "never"
}
+47 -19
View File
@@ -12,8 +12,8 @@ To get in touch with the contributors, either
## Ask a Question
If you have any questions about strudel, make sure you've read the
[tutorial](https://strudel.tidalcycles.org/tutorial/) to find out if it answers your question.
If you have any questions about strudel, make sure you've glanced through the
[docs](https://strudel.cc/learn/) to find out if it answers your question.
If not, use one of the Communication Channels above!
Don't be afraid to ask! Your question might be of great value for other people too.
@@ -29,12 +29,10 @@ If you made some music with strudel, you can give back some love and share what
Your creation could also be part of the random selection in the REPL if you want.
Use one of the Communication Channels listed above.
## Improve the Tutorial
## Improve the Docs
If you find some weak spots in the [tutorial](https://strudel.tidalcycles.org/),
you are welcome to improve them by editing [this file](https://github.com/tidalcycles/strudel/blob/main/tutorial/tutorial.mdx).
This will even work without setting up a development environment, only a github account is required.
If you find some weak spots in the [docs](https://strudel.cc/workshop/getting-started/),
you can edit each file directly on github via the "Edit this page" link located in the right sidebar.
## Propose a Feature
@@ -60,23 +58,22 @@ To fix a bug that has been reported,
## Write Tests
There are still many tests that have not been written yet! Reading and writing tests is a great opportunity to get familiar with the codebase.
You can find the tests in each package in the `test` folder. To run all tests, run `npm test` from the root folder.
You can find the tests in each package in the `test` folder. To run all tests, run `pnpm test` from the root folder.
## Project Setup
To get the project up and running for development, make sure you have installed:
- git
- node, preferably v16
- [git](https://git-scm.com/)
- [node](https://nodejs.org/en/) >= 18
- [pnpm](https://pnpm.io/) (`curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=8.11.0 sh -`)
then, do the following:
```sh
git clone https://github.com/tidalcycles/strudel.git && cd strudel
npm i # install at root to symlink packages
npx lerna bootstrap # install all dependencies in packages
cd repl && npm i # install repl dependencies
npm run start # start repl
pnpm i # install at root to symlink packages
pnpm start # start repl
```
Those commands might look slightly different for your OS.
@@ -85,6 +82,10 @@ Please report any problems you've had with the setup instructions!
## Code Style
To make sure the code changes only where it should, we are using prettier to unify the code style.
- You can format all files at once by running `pnpm codeformat` from the project root
- Run `pnpm format-check` from the project root to check if all files are well formatted
If you use VSCode, you can
1. install [the prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
@@ -92,12 +93,29 @@ If you use VSCode, you can
3. Choose "Configure Default Formatter..."
4. Select prettier
## ESLint
To prevent unwanted runtime errors, this project uses [eslint](https://eslint.org/).
- You can check for lint errors by running `pnpm lint`
There are also eslint extensions / plugins for most editors.
## Running Tests
- Run all tests with `pnpm test`
- Run all tests with UI using `pnpm test-ui`
## Running all CI Checks
When opening a PR, the CI runner will automatically check the code style and eslint, as well as run all tests.
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 `npm i` on the root folder, [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) will symlink all packages
in the `node_modules` folder. This will allow any js file to import `@strudel.cycles/<package-name>` to get the local version,
which allows developing multiple packages at the same time
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/<package-name>` to get the local version,
allowing to develop multiple packages at the same time.
## Package Publishing
@@ -105,15 +123,25 @@ To publish all packages that have been changed since the last release, run:
```sh
npm login
npx lerna publish
# this will increment all the versions in package.json files of non private packages to selected versions
npx lerna version --no-private
# publish all packages inside /packages using pnpm! don't use lerna to publish!!
pnpm --filter "./packages/**" publish --dry-run
# the last command was only a dry-run, make sure everything looks ok, if yes, run the same command without flag
```
To manually publish a single package, increase the version in the `package.json`, then run `pnpm publish`.
Important: Always publish with `pnpm`, as `npm` does not support overriding main files in `publishConfig`, which is done in all the packages.
### New Packages
To add a new package, you have to publish it manually the first time, using:
```sh
cd packages/<package-name> && npm publish --access public
cd packages/<package-name> && pnpm publish --access public
```
## Have Fun
+7 -7
View File
@@ -4,17 +4,18 @@
An experiment in making a [Tidal](https://github.com/tidalcycles/tidal/) using web technologies. This software is slowly stabilising, but please continue to tread carefully.
- Try it here: <https://strudel.tidalcycles.org/>
- Tutorial: <https://strudel.tidalcycles.org/tutorial/>
- Try it here: <https://strudel.cc>
- Docs: <https://strudel.cc/learn>
- Technical Blog Post: <https://loophole-letters.vercel.app/strudel>
- 1 Year of Strudel Blog Post: <https://loophole-letters.vercel.app/strudel1year>
## Running Locally
After cloning the project, you can run the REPL locally:
```bash
npm run setup
npm run repl
pnpm run setup
pnpm run repl
```
## Using Strudel In Your Project
@@ -23,13 +24,12 @@ There are multiple npm packages you can use to use strudel, or only parts of it,
- [`core`](./packages/core/): tidal pattern engine
- [`mini`](./packages/mini): mini notation parser + core binding
- [`eval`](./packages/eval): user code evaluator. syntax sugar + highlighting
- [`tone`](./packages/tone): bindings for Tone.js instruments and effects
- [`transpiler`](./packages/transpiler): user code transpiler
- [`webaudio`](./packages/webaudio): webaudio output
- [`osc`](./packages/osc): bindings to communicate via OSC
- [`midi`](./packages/midi): webmidi bindings
- [`serial`](./packages/serial): webserial bindings
- [`tonal`](./packages/tonal): tonal functions
- [`xen`](./packages/xen): microtonal / xenharmonic functions
- ... [and there are more](./packages/)
Click on the package names to find out more about each one.
-1806
View File
File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 150 KiB

+3
View File
@@ -0,0 +1,3 @@
# examples
This folder contains usage examples for different scenarios.
+5
View File
@@ -0,0 +1,5 @@
# buildless examples
These examples show you how strudel can be used in a regular html file, without the need for a build tool.
Most examples are using [skypack](https://www.skypack.dev/)
@@ -1,13 +1,13 @@
<input
type="text"
id="text"
value="cat('a', 'b')"
value="seq('a', ['b', 'c'])"
style="width: 100%; font-size: 2em; outline: none; margin-bottom: 10px"
spellcheck="false"
/>
<div id="output"></div>
<script type="module">
const strudel = await import('https://cdn.skypack.dev/@strudel.cycles/core@0.0.2');
const strudel = await import('https://cdn.skypack.dev/@strudel/core@0.6.8');
Object.assign(window, strudel); // assign all strudel functions to global scope to use with eval
const input = document.getElementById('text');
const getEvents = () => {
@@ -2,13 +2,13 @@
<input
type="text"
id="text"
value="cat('orange', 'indigo')"
value="seq('tomato', 'indigo', ['white', 'steelblue']).fast(4)"
style="width: 100%; font-size: 2em; background: black; color: white; outline: none; position: absolute; top: 0"
spellcheck="false"
/>
<canvas id="canvas"></canvas>
<script type="module">
const strudel = await import('https://cdn.skypack.dev/@strudel.cycles/core@0.0.2');
const strudel = await import('https://cdn.skypack.dev/@strudel/core@0.6.8');
// this adds all strudel functions to the global scope, to be used by eval
Object.assign(window, strudel);
// setup elements
+10
View File
@@ -0,0 +1,10 @@
<!doctype html>
<button id="play">play</button>
<button id="stop">stop</button>
<script type="module">
import { initStrudel } from 'https://cdn.skypack.dev/@strudel/web@0.8.2';
initStrudel();
document.getElementById('play').addEventListener('click', () => evaluate('note("c a f e").jux(rev)'));
document.getElementById('play').addEventListener('stop', () => hush());
</script>
@@ -0,0 +1,16 @@
<!doctype html>
<button id="a">A</button>
<button id="b">B</button>
<button id="c">C</button>
<button id="stop">stop</button>
<script type="module">
import { initStrudel } from 'https://cdn.skypack.dev/@strudel/web@0.8.2';
initStrudel({
prebake: () => samples('github:tidalcycles/Dirt-Samples/master'),
});
const click = (id, action) => document.getElementById(id).addEventListener('click', action);
click('a', () => evaluate(`s('bd,jvbass(3,8)').jux(rev)`));
click('b', () => s('bd*2,hh(3,4),jvbass(5,8,1)').jux(rev).play());
click('c', () => s('bd*2,hh(3,4),jvbass:[0 4](5,8,1)').jux(rev).stack(s('~ sd')).play());
click('stop', () => hush());
</script>
+89
View File
@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Buildless Vanilla Strudel REPL</title>
</head>
<body style="margin: 0; background: #222">
<div style="display: grid; height: 100vh; grid-template-rows: 32px auto">
<button id="start" style="width: 100vw; height: 32px">evaluate</button>
<textarea
id="text"
style="font-size: 2em; border: 0; color: white; background: transparent; outline: none; padding: 20px"
spellcheck="false"
></textarea>
</div>
<div id="output"></div>
<script type="module">
import { controls, repl, evalScope } from 'https://cdn.skypack.dev/@strudel/core@0.11.0';
import { mini } from 'https://cdn.skypack.dev/@strudel/mini@0.11.0';
import { transpiler } from 'https://cdn.skypack.dev/@strudel/transpiler@0.11.0';
import {
getAudioContext,
webaudioOutput,
initAudioOnFirstClick,
registerSynthSounds,
} from 'https://cdn.skypack.dev/@strudel/webaudio@0.11.0';
const ctx = getAudioContext();
const input = document.getElementById('text');
input.innerHTML = getTune();
const loadModules = evalScope(
controls,
import('https://cdn.skypack.dev/@strudel/core@0.11.0'),
import('https://cdn.skypack.dev/@strudel/mini@0.11.0'),
import('https://cdn.skypack.dev/@strudel/tonal@0.11.0'),
import('https://cdn.skypack.dev/@strudel/webaudio@0.11.0'),
);
const initAudio = Promise.all([initAudioOnFirstClick(), registerSynthSounds()]);
const { evaluate } = repl({
defaultOutput: webaudioOutput,
getTime: () => ctx.currentTime,
transpiler,
});
document.getElementById('start').addEventListener('click', async () => {
await loadModules;
await initAudio;
evaluate(input.value);
});
function getTune() {
return `await samples('github:tidalcycles/Dirt-Samples/master')
stack(
// amen
n("0 1 2 3 4 5 6 7")
.sometimes(x=>x.ply(2))
.rarely(x=>x.speed("2 | -2"))
.sometimesBy(.4, x=>x.delay(".5"))
.s("amencutup")
.slow(2)
.room(.5)
,
// bass
sine.add(saw.slow(4)).range(0,7).segment(8)
.superimpose(x=>x.add(.1))
.scale('G0 minor').note()
.s("sawtooth").decay(.1).sustain(0)
.gain(.4).cutoff(perlin.range(300,3000).slow(8)).resonance(10)
.degradeBy("0 0.1 .5 .1")
.rarely(add(note("12")))
,
// chord
note("Bb3,D4".superimpose(x=>x.add(.2)))
.s('sawtooth').cutoff(1000).struct("<~@3 [~ x]>")
.decay(.05).sustain(.0).delay(.8).delaytime(.125).room(.8)
,
// alien
s("breath").room(1).shape(.6).chop(16).rev().mask("<x ~@7>")
,
n("0 1").s("east").delay(.5).degradeBy(.8).speed(rand.range(.5,1.5))
).reset("<x@7 x(5,8)>")`;
}
</script>
</body>
</html>
@@ -1,4 +1,4 @@
<script src="https://unpkg.com/@strudel.cycles/embed@latest"></script>
<script src="https://unpkg.com/@strudel/embed@0.11.0"></script>
<!-- <script src="./embed.js"></script> -->
<strudel-repl>
<!--
@@ -0,0 +1,31 @@
<script src="https://unpkg.com/@strudel/repl@0.9.4"></script>
<strudel-editor>
<!--
// @date 23-08-15
// "golf rolf" @by froos @license CC BY-NC-SA 4.0
setcps(1)
stack(
s("bd*2, ~ rim*<1!3 2>, hh*4").bank('RolandTR909')
.off(-1/8, set(speed("1.5").gain(.25)))
.mask("<0!16 1!64>")
,
note("g1(3,8)")
.s("gm_synth_bass_2:<0 2>")
.delay(".8:.25:.25")
.clip("<.5!16 2!32>")
.off(1/8, add(note("12?0.7")))
.lpf(sine.range(500,2000).slow(32)).lpq(8)
.add(note("0,.05"))
.mask("<0!8 1!32>")
,
n("<0 1 2 3 4>*8").scale('G4 minor')
.s("gm_lead_6_voice")
.clip(sine.range(.2,.8).slow(8))
.jux(rev)
.room(2)
.sometimes(add(note("12")))
.lpf(perlin.range(200,20000).slow(4))
).reset("<x@15 x(5,8)>")
-->
</strudel-editor>
@@ -8,7 +8,7 @@ pnpm-debug.log*
lerna-debug.log*
node_modules
!dist
dist
dist-ssr
*.local
+8
View File
@@ -0,0 +1,8 @@
# codemirror-repl example
This folder demonstrates how to set up a full strudel repl with the `@strudel/codemirror` package. Run it using:
```sh
pnpm i
pnpm dev
```
+22
View File
@@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite Vanilla Strudel REPL</title>
</head>
<body>
<main>
<nav>
<button id="play">eval</button>
<button id="stop">stop</button>
</nav>
<div class="container">
<div id="editor"></div>
<div id="output"></div>
</div>
<canvas id="roll"></canvas>
</main>
<script type="module" src="./main.js"></script>
</body>
</html>
+39
View File
@@ -0,0 +1,39 @@
import { StrudelMirror } from '@strudel/codemirror';
import { funk42 } from './tunes';
import { drawPianoroll, evalScope, controls } from '@strudel/core';
import './style.css';
import { initAudioOnFirstClick } from '@strudel/webaudio';
import { transpiler } from '@strudel/transpiler';
import { getAudioContext, webaudioOutput, registerSynthSounds } from '@strudel/webaudio';
import { registerSoundfonts } from '@strudel/soundfonts';
// init canvas
const canvas = document.getElementById('roll');
canvas.width = canvas.width * 2;
canvas.height = canvas.height * 2;
const drawContext = canvas.getContext('2d');
const drawTime = [-2, 2]; // time window of drawn haps
const editor = new StrudelMirror({
defaultOutput: webaudioOutput,
getTime: () => getAudioContext().currentTime,
transpiler,
root: document.getElementById('editor'),
initialCode: funk42,
drawTime,
onDraw: (haps, time) => drawPianoroll({ haps, time, ctx: drawContext, drawTime, fold: 0 }),
prebake: async () => {
initAudioOnFirstClick(); // needed to make the browser happy (don't await this here..)
const loadModules = evalScope(
controls,
import('@strudel/core'),
import('@strudel/mini'),
import('@strudel/tonal'),
import('@strudel/webaudio'),
);
await Promise.all([loadModules, registerSynthSounds(), registerSoundfonts()]);
},
});
document.getElementById('play').addEventListener('click', () => editor.evaluate());
document.getElementById('stop').addEventListener('click', () => editor.stop());
+23
View File
@@ -0,0 +1,23 @@
{
"name": "vite-vanilla-repl-cm6",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"vite": "^5.0.10"
},
"dependencies": {
"@strudel/codemirror": "workspace:*",
"@strudel/core": "workspace:*",
"@strudel/mini": "workspace:*",
"@strudel/soundfonts": "workspace:*",
"@strudel/tonal": "workspace:*",
"@strudel/transpiler": "workspace:*",
"@strudel/webaudio": "workspace:*"
}
}
+31
View File
@@ -0,0 +1,31 @@
body,
html {
margin: 0;
height: 100%;
background: #282c34;
}
main {
height: 100%;
display: flex;
flex-direction: column;
}
.container {
flex-grow: 1;
max-height: 100%;
position: relative;
overflow: auto;
}
#editor {
overflow: auto;
}
.cm-editor {
height: 100%;
}
#roll {
height: 300px;
}
+112
View File
@@ -0,0 +1,112 @@
export const bumpStreet = `// froos - "22 bump street", licensed with CC BY-NC-SA 4.0
await samples('github:felixroos/samples/main')
await samples('https://strudel.cc/tidal-drum-machines.json', 'github:ritchse/tidal-drum-machines/main/machines/')
"<[0,<6 7 9>,13,<17 20 22 26>]!2>/2"
// make it 22 edo
.fmap(v => Math.pow(2,v/22))
// mess with the base frequency
.mul("<300 [300@3 200]>/8").freq()
.layer(
// chords
x=>x.div(freq(2)).s("flute").euclidLegato("<3 2>",8)
.shape(.4).lpf(sine.range(800,4000).slow(8)),
// adlibs
x=>x.arp("{0 3 2 [1 3]}%1.5")
.s('xylo').mul(freq(2))
.delay(.5).delayfeedback(.4).juxBy(.5, rev)
.hpf(sine.range(200,3000).slow(8)),
// bass
x=>x.arp("[0 [2 1?]](5,8)").s('sawtooth').div(freq(4))
.lpf(sine.range(400,2000).slow(8)).lpq(8).shape(.4)
.off(1/8, x=>x.mul(freq(2)).degradeBy(.5)).gain(.3)
).clip(1).release(.2)
.stack(
// drums
s("bd sd:<2 1>, [~ hh]*2, [~ rim]").bank('RolandTR909')
.off(1/8, x=>x.speed(2).gain(.4)).sometimes(ply(2)).gain(.8)
.mask("<0@4 1@12>/4")
.reset("<x@15 [x(3,8) x*[4 8]]>")
// wait for it...
).fast(2/3)
//.crush(6) // remove "//" if you dare`;
export const trafficFlam = `// froos - "traffic flam", licensed with CC BY-NC-SA 4.0
await samples('github:felixroos/samples/main')
await samples('https://strudel.cc/tidal-drum-machines.json', 'github:ritchse/tidal-drum-machines/main/machines/')
addVoicings('hip', {
m11: ['2M 3m 4P 7m'],
'^7#11': ['3M 4A 5P 7M'],
}, ['C4', 'C6'])
stack(
stack(
"<Bbm11 A^7#11>/2".voicings('hip').note()
.s("gm_epiano1:2")
.arp("[<[0 1 2 3] [3 2 1 0]> ~@5]/2")
.release(2).late(.25).lpf(2000),
"<Bb1 A1>/2".note().s('gm_acoustic_bass'),
n("<0 2 3>(3,8)".off(1/8, add(4)))
.scale("<Bb4:minor A4:lydian>/2")
.s('gm_electric_guitar_jazz')
.decay(sine.range(.05, .2).slow(32)).sustain(0)
.delay(.5).lpf(sine.range(100,5000).slow(64))
.gain(.7).room(.5).pan(sine.range(0,1).slow(11))
).add(perlin.range(0,.25).note()),
stack(
s("bd:1(3,8) rim").bank('RolandTR707').slow(2).room("<0 <.1 .6>>")
.when("<0@7 1>",x=>x.echoWith(3, .0625, (x,i) => x.speed(1+i*.24))),
s("rim*4").end(.05).bank('RolandTR808').speed(.8).room(.2)
)
)
.late("[0 .05]*2").late(12)
`;
export const funk42 = `// froos - how to funk in 42 lines of code
// adapted from "how to funk in two minutes" by marc rebillet https://www.youtube.com/watch?v=3vBwRfQbXkg
// thanks to peach for the transcription: https://www.youtube.com/watch?v=8eiPXvIgda4
await samples('github:felixroos/samples/main')
await samples('https://strudel.cc/tidal-drum-machines.json', 'github:ritchse/tidal-drum-machines/main/machines/')
setcps(.5)
let drums = stack(
s("bd*2, ~ sd").bank('RolandTR707').room("0 .1"),
s("hh*4").begin(.2).release(.02).end(.25).release(.02)
.gain(.3).bank('RolandTR707').late(.02).room(.5),
//s("shaker_small").struct("[x x*2]*2").speed(".8,.9").release(.02)
).fast(2)
let wurli = note(\`<
[[a2,g3,[b3 c4],e4] ~ [g3,c4,e4](3,8)@4 ~@2]!3
[[e2,e3,a3,b3,e4]@3 [e2,e3,ab3,b3,e4]@5]>\`)
.s("gm_epiano1:5").decay(.2).sustain("<[1 0@7]!3 1>")
.gain("<[.8@2 .4@14]!3 .7>").room(.3)
let organ = note("<[~@3 [a3,d4,f#4]@2 [[a3,c4,e4]@2 ~] ~@2]!3 ~>".add(12))
.s("gm_percussive_organ:2").gain(.6).lpf(1800).pan(.2).room(.3);
let clav = note(\`<
[~@3 a2 [g3,[b3 c4],e4]@2 ~ a2 [g3,b3,e4] ~@2 [g3,c4,e4] ~@4]!3
[~@3 e3 [[a3 b3],c3,e3]@2 ~ e2 [e3,a3]@3 [b3,e3] ~@2 [b3,e3]@2]>\`)
.s("gm_clavinet:1").decay("<.25!3 [.25 .4]>").sustain(0)
.gain(.7).pan(.8).room(.2);
let bass = note(\`<
[a1 [~ [g2 a2]] [g1 g#1] [a1 [g2 a2]]]
[a1 [~ [g2 a2]] [e3 d3] [c3 [g3 a3]]]
[a1 [~ [g2 a2]] [g1 g#1] [a1 [g2 a2]]]
[e2@6 e1@5 e1 [[d2 e3] g1]@4]
>\`).s("gm_electric_bass_pick:1").release(.1)
stack(
drums
,wurli
,organ
,clav
,bass
)`;
@@ -8,11 +8,10 @@ pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
!dist
# Editor directories and files
.vscode/*
!.vscode/extensions.json
+13
View File
@@ -0,0 +1,13 @@
# headless-repl demo
This demo shows how to use strudel in "headless mode".
Buttons A / B / C will switch between different patterns.
It showcases the usage of the `@strudel/web` package, using [vite](https://vitejs.dev/) as the dev server.
## Running
```sh
pnpm i && cd examples/headless-repl
pnpm dev
# open http://localhost:5173/
```
+28
View File
@@ -0,0 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="https://strudel.cc/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@strudel/web REPL Example</title>
</head>
<body>
<div id="app"></div>
<button id="a">A</button>
<button id="b">B</button>
<button id="c">C</button>
<button id="stop">stop</button>
<script type="module">
import { initStrudel } from '@strudel/web';
initStrudel({
prebake: () => samples('github:tidalcycles/Dirt-Samples/master'),
});
const click = (id, action) => document.getElementById(id).addEventListener('click', action);
click('a', () => evaluate(`s('bd,jvbass(3,8)').jux(rev)`));
click('b', () => s('bd*2,hh(3,4),jvbass(5,8,1)').jux(rev).play());
click('c', () => s('bd*2,hh(3,4),jvbass:[0 4](5,8,1)').jux(rev).stack(s('~ sd')).play());
click('stop', () => hush());
</script>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
{
"name": "repl-example",
"private": true,
"version": "0.0.0",
"type": "module",
"license": "AGPL-3.0-or-later",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"vite": "^5.0.10"
},
"dependencies": {
"@strudel/web": "workspace:*"
}
}
+1
View File
@@ -0,0 +1 @@
dist
+10
View File
@@ -0,0 +1,10 @@
# minimal repl
This folder demonstrates how to set up a minimal strudel repl using vite and vanilla JS. Run it using:
```sh
npm i
npm run dev
```
If you're looking for a more feature rich alternative, have a look at the [../codemirror-repl](codemirror-repl example)
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
+28
View File
@@ -0,0 +1,28 @@
import { controls, repl, evalScope } from '@strudel/core';
import { getAudioContext, webaudioOutput, initAudioOnFirstClick } from '@strudel/webaudio';
import { transpiler } from '@strudel/transpiler';
import tune from './tune.mjs';
const ctx = getAudioContext();
const input = document.getElementById('text');
input.innerHTML = tune;
initAudioOnFirstClick();
evalScope(
controls,
import('@strudel/core'),
import('@strudel/mini'),
import('@strudel/webaudio'),
import('@strudel/tonal'),
);
const { evaluate } = repl({
defaultOutput: webaudioOutput,
getTime: () => ctx.currentTime,
transpiler,
});
document.getElementById('start').addEventListener('click', () => {
ctx.resume();
console.log('eval', input.value);
evaluate(input.value);
});
@@ -10,6 +10,13 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^3.2.0"
"vite": "^5.0.10"
},
"dependencies": {
"@strudel/core": "workspace:*",
"@strudel/mini": "workspace:*",
"@strudel/transpiler": "workspace:*",
"@strudel/webaudio": "workspace:*",
"@strudel/tonal": "workspace:*"
}
}
@@ -1,4 +1,4 @@
/* export default `await samples('github:tidalcycles/Dirt-Samples/master')
export default `await samples('github:tidalcycles/Dirt-Samples/master')
stack(
// amen
@@ -29,11 +29,3 @@ stack(
,
n("0 1").s("east").delay(.5).degradeBy(.8).speed(rand.range(.5,1.5))
).reset("<x@7 x(5,8)>")`;
*/
export default `stack(
n("c3 [eb3,g3]")
.delay("<0 .5>")
.delaytime(".16 | .33")
.delayfeedback(".6 | .8")
).sometimes(x=>x.speed("-1"))`;
@@ -22,6 +22,3 @@ dist-ssr
*.njsproj
*.sln
*.sw?
oldtunes.mjs
public/samples/EMU World/
+11
View File
@@ -0,0 +1,11 @@
# superdough demo
This demo shows how to use [superdough](https://www.npmjs.com/package/superdough) with [vite](https://vitejs.dev/).
## Running
```sh
pnpm i && cd examples/headless-repl
pnpm dev
# open http://localhost:5173/
```
+38
View File
@@ -0,0 +1,38 @@
<!doctype html>
<html>
<head>
<title>Superdough Example</title>
<meta charset="UTF-8" />
</head>
<body>
<button id="play">PLAAAAAAAY</button>
<script type="module">
import { superdough, samples, initAudioOnFirstClick, registerSynthSounds } from 'superdough';
const init = Promise.all([
initAudioOnFirstClick(),
samples('github:tidalcycles/Dirt-Samples/master'),
registerSynthSounds(),
]);
const loop = (t = 0) => {
// superdough(value, time, duration)
superdough({ s: 'bd', delay: 0.5 }, t);
superdough({ note: 'g1', s: 'sawtooth', cutoff: 600, resonance: 8 }, t, 0.125);
superdough({ note: 'g2', s: 'sawtooth', cutoff: 600, resonance: 8 }, t + 0.25, 0.125);
superdough({ s: 'hh' }, t + 0.25);
superdough({ s: 'sd', room: 0.5 }, t + 0.5);
superdough({ s: 'hh' }, t + 0.75);
};
document.getElementById('play').addEventListener('click', async () => {
await init;
let t = 0.1;
while (t < 16) {
loop(t++);
}
});
</script>
</body>
</html>
+17
View File
@@ -0,0 +1,17 @@
{
"name": "superdough-example",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"superdough": "workspace:*"
},
"devDependencies": {
"vite": "^5.0.10"
}
}
+15
View File
@@ -0,0 +1,15 @@
// this barrel export is currently only used to find undocumented exports
export * from './packages/core/index.mjs';
export * from './packages/csound/index.mjs';
export * from './packages/embed/index.mjs';
export * from './packages/desktopbridge/index.mjs';
export * from './packages/midi/index.mjs';
export * from './packages/mini/index.mjs';
export * from './packages/osc/index.mjs';
export * from './packages/react/index.mjs';
export * from './packages/serial/index.mjs';
export * from './packages/soundfonts/index.mjs';
export * from './packages/tonal/index.mjs';
export * from './packages/transpiler/index.mjs';
export * from './packages/webaudio/index.mjs';
export * from './packages/xen/index.mjs';
@@ -1,12 +1,17 @@
/*
postcss.config.js - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/repl/postcss.config.js>
jsdoc-synonyms.js - Add support for @synonym tag
Copyright (C) 2023 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/midi/midi.mjs>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
function defineTags(dictionary) {
dictionary.defineTag('synonyms', {
mustHaveValue: true,
onTagged: function (doclet, tag) {
doclet.synonyms_text = tag.value;
doclet.synonyms = doclet.synonyms_text.split(/[ ,]+/);
},
});
}
module.exports = { defineTags: defineTags };
@@ -1,9 +1,9 @@
{
"source": {
"includePattern": ".+\\.(js(doc|x)?|mjs)$",
"excludePattern": "node_modules|shift-parser|shift-reducer|shift-traverser"
"excludePattern": "node_modules|shift-parser|shift-reducer|shift-traverser|dist"
},
"plugins": ["plugins/markdown"],
"plugins": ["plugins/markdown", "jsdoc/jsdoc-synonyms"],
"opts": {
"destination": "./out/",
"recurse": true
+84
View File
@@ -0,0 +1,84 @@
import { readFile } from 'node:fs/promises';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';
import { parse } from 'acorn';
import dependencyTree from 'dependency-tree';
const __dirname = dirname(fileURLToPath(import.meta.url));
function getExports(code) {
// parse it with acorn
let ast;
try {
ast = parse(code, {
ecmaVersion: 11,
sourceType: 'module',
});
} catch (err) {
return [`acorn parse error: ${err.name}: ${err.messsage}`];
}
// find all names exported in the file
return ast.body
.filter((node) => node?.type === 'ExportNamedDeclaration')
.map((node) => {
const { declaration } = node;
if (!declaration) {
// e.g. "export { Fraction, controls }"
return [];
}
switch (declaration.type) {
case 'VariableDeclaration':
return declaration.declarations
.map((d) => {
switch (d.id.type) {
case 'Identifier':
return d.id.name;
case 'ObjectPattern':
return d.id.properties.map((p) => p.value.name);
default:
return 'unknown declaration: ' + declaration;
}
})
.flat();
default:
// FunctionDeclaration, ClassDeclaration
return declaration.id.name;
}
})
.flat();
}
function isDocumented(name, docs) {
return docs.find(
(d) => d.name === name || d.tags?.find((t) => t.title === 'synonyms' && t.value.split(', ').includes(name)),
);
}
async function getUndocumented(path, docs) {
try {
// load the code of pattern.mjs as a string
const code = await readFile(path, 'utf8');
return getExports(code).filter((name) => !isDocumented(name, docs));
} catch (err) {
return [`parse error: ${err.name}: ${err.message}`];
}
}
// read doc.json file
const { docs } = JSON.parse(await readFile(resolve(__dirname, '..', 'doc.json'), 'utf8'));
const paths = dependencyTree.toList({
filename: 'index.mjs',
// filename: 'packages/core/index.mjs',
directory: resolve(__dirname),
filter: (path) => !path.includes('node_modules'),
});
// const paths = ['../packages/core/pattern.mjs', '../packages/core/hap.mjs'].map((rel) => resolve(__dirname, rel));
const undocumented = Object.fromEntries(
await Promise.all(
paths.map(async (path) => [path.replace(resolve(__dirname, '..'), ''), await getUndocumented(path, docs)]),
),
);
console.log(JSON.stringify(undocumented, null, 2));
+4 -4
View File
@@ -1,6 +1,6 @@
{
"packages": [
"packages/*"
],
"version": "independent"
"packages": ["packages/*"],
"version": "independent",
"npmClient": "pnpm",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
+59
View File
@@ -0,0 +1,59 @@
# my-patterns
This directory can be used to save your own patterns, which then get
made into a pattern swatch.
Example: <https://felixroos.github.io/strudel/swatch/>
## deploy
### 1. fork the [strudel repo on github](https://github.com/tidalcycles/strudel.git)
### 2. clone your fork to your machine `git clone https://github.com/<your-username>/strudel.git strudel && cd strudel`
### 3. create a separate branch like `git branch patternuary && git checkout patternuary`
### 4. save one or more .txt files in the my-patterns folder
### 5. edit `website/public/CNAME` to contain `<your-username>.github.io/strudel`
### 6. edit `website/astro.config.mjs` to use site: `https://<your-username>.github.io` and base `/strudel`, like this
```js
const site = 'https://<your-username>.github.io';
const base = '/strudel';
```
### 7. commit & push the changes
```sh
git add . && git commit -m "site config" && git push --set-upstream origin
```
### 8. deploy to github pages
- go to settings -> pages and select "Github Actions" as source
- go to settings -> environments -> github-pages and press the edit button next to `main` and type in `patternuary` (under "Deployment branches")
- go to Actions -> `Build and Deploy` and click `Run workflow` with branch `patternuary`
### 9. view your patterns at `<your-username>.github.io/strudel/swatch/`
Alternatively, github pages allows you to use a custom domain, like https://mycooldomain.org/swatch/. [See their documentation for details](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site).
### 10. optional: automatic deployment
If you want to automatically deploy your site on push, go to `deploy.yml` and change `workflow_dispatch` to `push`.
## running locally
- install dependencies with `npm run setup`
- run dev server with `npm run repl` and open `http://localhost:4321/strudel/swatch/`
## tests fail?
Your tests might fail if the code does not follow prettiers format.
In that case, run `npm run codeformat`. To disable that, remove `npm run format-check` from `test.yml`
## updating your fork
To update your fork, you can pull the main branch and merge it into your `patternuary` branch.
-22536
View File
File diff suppressed because it is too large Load Diff
+44 -27
View File
@@ -1,27 +1,32 @@
{
"name": "@strudel.cycles/monorepo",
"version": "0.0.4",
"name": "@strudel/monorepo",
"version": "0.5.0",
"private": true,
"description": "Port of tidalcycles to javascript",
"scripts": {
"pretest": "cd tutorial && npm run jsdoc-json",
"test": "vitest run --version",
"test-ui": "vitest --ui",
"test-coverage": "vitest --coverage",
"bootstrap": "lerna bootstrap",
"setup": "npm i && npm run bootstrap && cd repl && npm i && cd ../tutorial && npm i",
"snapshot": "cd repl && npm run snapshot",
"repl": "cd repl && npm run dev",
"setup": "pnpm i",
"pretest": "npm run jsdoc-json",
"prebuild": "npm run jsdoc-json",
"prestart": "npm run jsdoc-json",
"test": "npm run pretest && vitest run --version",
"test-ui": "npm run pretest && vitest --ui",
"test-coverage": "npm run pretest && vitest --coverage",
"snapshot": "npm run pretest && vitest run -u --silent",
"repl": "npm run prestart && cd website && npm run dev",
"start": "npm run prestart && cd website && npm run dev",
"dev": "npm run prestart && cd website && npm run dev",
"build": "npm run prebuild && cd website && npm run build",
"preview": "cd website && npm run preview",
"osc": "cd packages/osc && npm run server",
"build": "rm -rf out && cd repl && npm run build && cd ../tutorial && npm run build",
"preview": "npx serve ./out",
"deploy": "NODE_DEBUG=gh-pages gh-pages -d out",
"jsdoc": "jsdoc packages/ -c jsdoc.config.json",
"jsdoc-json": "jsdoc packages/ --template ./node_modules/jsdoc-json --destination doc.json -c jsdoc.config.json"
"jsdoc": "jsdoc packages/ -c jsdoc/jsdoc.config.json",
"jsdoc-json": "jsdoc packages/ --template ./node_modules/jsdoc-json --destination doc.json -c jsdoc/jsdoc.config.json",
"lint": "eslint . --ext mjs,js --quiet",
"codeformat": "prettier --write .",
"format-check": "prettier --check .",
"report-undocumented": "npm run jsdoc-json && node jsdoc/undocumented.mjs > undocumented.json",
"check": "npm run format-check && npm run lint && npm run test",
"iclc": "cd paper && pandoc --template=pandoc/iclc.html --citeproc --number-sections iclc2023.md -o iclc2023.html && pandoc --template=pandoc/iclc.latex --citeproc --number-sections iclc2023.md -o iclc2023.pdf"
},
"workspaces": [
"packages/*"
],
"repository": {
"type": "git",
"url": "git+https://github.com/tidalcycles/strudel.git"
@@ -38,17 +43,29 @@
"bugs": {
"url": "https://github.com/tidalcycles/strudel/issues"
},
"homepage": "https://strudel.tidalcycles.org",
"homepage": "https://strudel.cc",
"dependencies": {
"@strudel/core": "workspace:*",
"@strudel/mini": "workspace:*",
"@strudel/tonal": "workspace:*",
"@strudel/transpiler": "workspace:*",
"@strudel/webaudio": "workspace:*",
"@strudel/xen": "workspace:*"
},
"devDependencies": {
"@vitest/ui": "^0.21.1",
"c8": "^7.12.0",
"dependency-tree": "^10.0.9",
"@tauri-apps/cli": "^1.5.9",
"@vitest/ui": "^1.1.0",
"canvas": "^2.11.2",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
"events": "^3.3.0",
"gh-pages": "^4.0.0",
"jsdoc": "^3.6.10",
"jsdoc": "^4.0.2",
"jsdoc-json": "^2.0.2",
"jsdoc-to-markdown": "^7.1.1",
"lerna": "^4.0.0",
"rollup-plugin-visualizer": "^5.8.1",
"vitest": "^0.21.1"
"jsdoc-to-markdown": "^8.0.0",
"lerna": "^8.0.1",
"prettier": "^3.1.1",
"rollup-plugin-visualizer": "^5.12.0",
"vitest": "^1.1.0"
}
}
+1 -11
View File
@@ -1,15 +1,5 @@
# Packages
Each folder represents one of the @strudel.cycles/* packages [published to npm](https://www.npmjs.com/org/strudel.cycles).
Each folder represents one of the @strudel/* packages [published to npm](https://www.npmjs.com/org/strudel).
To understand how those pieces connect, refer to the [Technical Manual](https://github.com/tidalcycles/strudel/wiki/Technical-Manual) or the individual READMEs.
This is a graphical view of all the packages: [full screen](https://raw.githubusercontent.com/tidalcycles/strudel/main/dependencies.svg)
![dependencies](https://raw.githubusercontent.com/tidalcycles/strudel/main/dependencies.svg)
Generated with
```sh
npx depcruise --include-only "^packages" -X "node_modules" --output-type dot packages | dot -T svg > dependencygraph.svg
```
+3
View File
@@ -0,0 +1,3 @@
# @strudel/codemirror
This package contains helpers and extensions to use codemirror6. See [vite-vanilla-repl-cm6](../core/examples/vite-vanilla-repl-cm6/main.js) as an example of using it.
+84
View File
@@ -0,0 +1,84 @@
import jsdoc from '../../doc.json';
// import { javascriptLanguage } from '@codemirror/lang-javascript';
import { autocompletion } from '@codemirror/autocomplete';
import { h } from './html';
function plaintext(str) {
const div = document.createElement('div');
div.innerText = str;
return div.innerHTML;
}
const getDocLabel = (doc) => doc.name || doc.longname;
const getInnerText = (html) => {
var div = document.createElement('div');
div.innerHTML = html;
return div.textContent || div.innerText || '';
};
export function Autocomplete({ doc, label }) {
return h`<div class="prose dark:prose-invert max-h-[400px] overflow-auto p-2">
<h1 class="pt-0 mt-0">${label || getDocLabel(doc)}</h1>
${doc.description}
<ul>
${doc.params?.map(
({ name, type, description }) =>
`<li>${name} : ${type.names?.join(' | ')} ${description ? ` - ${getInnerText(description)}` : ''}</li>`,
)}
</ul>
<div>
${doc.examples?.map((example) => `<div><pre>${plaintext(example)}</pre></div>`)}
</div>
</div>`[0];
/*
<pre
className="cursor-pointer"
onMouseDown={(e) => {
console.log('ola!');
navigator.clipboard.writeText(example);
e.stopPropagation();
}}
>
{example}
</pre>
*/
}
const jsdocCompletions = jsdoc.docs
.filter(
(doc) =>
getDocLabel(doc) &&
!getDocLabel(doc).startsWith('_') &&
!['package'].includes(doc.kind) &&
!['superdirtOnly', 'noAutocomplete'].some((tag) => doc.tags?.find((t) => t.originalTitle === tag)),
)
// https://codemirror.net/docs/ref/#autocomplete.Completion
.map((doc) /*: Completion */ => ({
label: getDocLabel(doc),
// detail: 'xxx', // An optional short piece of information to show (with a different style) after the label.
info: () => Autocomplete({ doc }),
type: 'function', // https://codemirror.net/docs/ref/#autocomplete.Completion.type
}));
export const strudelAutocomplete = (context /* : CompletionContext */) => {
let word = context.matchBefore(/\w*/);
if (word.from == word.to && !context.explicit) return null;
return {
from: word.from,
options: jsdocCompletions,
/* options: [
{ label: 'match', type: 'keyword' },
{ label: 'hello', type: 'variable', info: '(World)' },
{ label: 'magic', type: 'text', apply: '⠁⭒*.✩.*⭒⠁', detail: 'macro' },
], */
};
};
export function isAutoCompletionEnabled(on) {
return on
? [
autocompletion({ override: [strudelAutocomplete] }),
//javascriptLanguage.data.of({ autocomplete: strudelAutocomplete }),
]
: []; // autocompletion({ override: [] })
}
+339
View File
@@ -0,0 +1,339 @@
import { closeBrackets } from '@codemirror/autocomplete';
// import { search, highlightSelectionMatches } from '@codemirror/search';
import { history } from '@codemirror/commands';
import { javascript } from '@codemirror/lang-javascript';
import { defaultHighlightStyle, syntaxHighlighting } from '@codemirror/language';
import { Compartment, EditorState, Prec } from '@codemirror/state';
import {
EditorView,
highlightActiveLineGutter,
highlightActiveLine,
keymap,
lineNumbers,
drawSelection,
} from '@codemirror/view';
import { Pattern, Drawer, repl, cleanupDraw } from '@strudel/core';
import { isAutoCompletionEnabled } from './autocomplete.mjs';
import { isTooltipEnabled } from './tooltip.mjs';
import { flash, isFlashEnabled } from './flash.mjs';
import { highlightMiniLocations, isPatternHighlightingEnabled, updateMiniLocations } from './highlight.mjs';
import { keybindings } from './keybindings.mjs';
import { initTheme, activateTheme, theme } from './themes.mjs';
import { updateWidgets, sliderPlugin } from './slider.mjs';
import { persistentAtom } from '@nanostores/persistent';
const extensions = {
isLineWrappingEnabled: (on) => (on ? EditorView.lineWrapping : []),
isLineNumbersDisplayed: (on) => (on ? lineNumbers() : []),
theme,
isAutoCompletionEnabled,
isTooltipEnabled,
isPatternHighlightingEnabled,
isActiveLineHighlighted: (on) => (on ? [highlightActiveLine(), highlightActiveLineGutter()] : []),
isFlashEnabled,
keybindings,
};
const compartments = Object.fromEntries(Object.keys(extensions).map((key) => [key, new Compartment()]));
export const defaultSettings = {
keybindings: 'codemirror',
isLineNumbersDisplayed: true,
isActiveLineHighlighted: false,
isAutoCompletionEnabled: false,
isPatternHighlightingEnabled: true,
isFlashEnabled: true,
isTooltipEnabled: false,
isLineWrappingEnabled: false,
theme: 'strudelTheme',
fontFamily: 'monospace',
fontSize: 18,
};
export const codemirrorSettings = persistentAtom('codemirror-settings', defaultSettings, {
encode: JSON.stringify,
decode: JSON.parse,
});
// https://codemirror.net/docs/guide/
export function initEditor({ initialCode = '', onChange, onEvaluate, onStop, root }) {
const settings = codemirrorSettings.get();
const initialSettings = Object.keys(compartments).map((key) =>
compartments[key].of(extensions[key](parseBooleans(settings[key]))),
);
initTheme(settings.theme);
let state = EditorState.create({
doc: initialCode,
extensions: [
/* search(),
highlightSelectionMatches(), */
...initialSettings,
javascript(),
sliderPlugin,
// indentOnInput(), // works without. already brought with javascript extension?
// bracketMatching(), // does not do anything
closeBrackets(),
syntaxHighlighting(defaultHighlightStyle),
history(),
EditorView.updateListener.of((v) => onChange(v)),
drawSelection({ cursorBlinkRate: 0 }),
Prec.highest(
keymap.of([
{
key: 'Ctrl-Enter',
run: () => onEvaluate?.(),
},
{
key: 'Alt-Enter',
run: () => onEvaluate?.(),
},
{
key: 'Ctrl-.',
run: () => onStop?.(),
},
{
key: 'Alt-.',
run: (_, e) => {
e.preventDefault();
onStop?.();
},
},
/* {
key: 'Ctrl-Shift-.',
run: () => (onPanic ? onPanic() : onStop?.()),
},
{
key: 'Ctrl-Shift-Enter',
run: () => (onReEvaluate ? onReEvaluate() : onEvaluate?.()),
}, */
]),
),
],
});
return new EditorView({
state,
parent: root,
});
}
export class StrudelMirror {
constructor(options) {
const {
root,
id,
initialCode = '',
onDraw,
drawTime = [0, 0],
autodraw,
prebake,
bgFill = true,
...replOptions
} = options;
this.code = initialCode;
this.root = root;
this.miniLocations = [];
this.widgets = [];
this.painters = [];
this.drawTime = drawTime;
this.onDraw = onDraw;
const self = this;
this.id = id || s4();
this.drawer = new Drawer((haps, time) => {
const currentFrame = haps.filter((hap) => time >= hap.whole.begin && time <= hap.endClipped);
this.highlight(currentFrame, time);
this.onDraw?.(haps, time, currentFrame, this.painters);
}, drawTime);
// this approach does not work with multiple repls on screen
// TODO: refactor onPaint usages + find fix, maybe remove painters here?
Pattern.prototype.onPaint = function (onPaint) {
self.painters.push(onPaint);
return this;
};
this.prebaked = prebake();
autodraw && this.drawFirstFrame();
this.repl = repl({
...replOptions,
onToggle: (started) => {
replOptions?.onToggle?.(started);
if (started) {
this.adjustDrawTime();
this.drawer.start(this.repl.scheduler);
// stop other repls when this one is started
document.dispatchEvent(
new CustomEvent('start-repl', {
detail: this.id,
}),
);
} else {
this.drawer.stop();
updateMiniLocations(this.editor, []);
cleanupDraw(false);
}
},
beforeEval: async () => {
cleanupDraw();
this.painters = [];
await this.prebaked;
await replOptions?.beforeEval?.();
},
afterEval: (options) => {
// remember for when highlighting is toggled on
this.miniLocations = options.meta?.miniLocations;
this.widgets = options.meta?.widgets;
updateWidgets(this.editor, this.widgets);
updateMiniLocations(this.editor, this.miniLocations);
replOptions?.afterEval?.(options);
this.adjustDrawTime();
this.drawer.invalidate();
},
});
this.editor = initEditor({
root,
initialCode,
onChange: (v) => {
if (v.docChanged) {
this.code = v.state.doc.toString();
this.repl.setCode?.(this.code);
}
},
onEvaluate: () => this.evaluate(),
onStop: () => this.stop(),
});
const cmEditor = this.root.querySelector('.cm-editor');
if (cmEditor) {
this.root.style.display = 'block';
if (bgFill) {
this.root.style.backgroundColor = 'var(--background)';
}
cmEditor.style.backgroundColor = 'transparent';
}
const settings = codemirrorSettings.get();
this.setFontSize(settings.fontSize);
this.setFontFamily(settings.fontFamily);
// stop this repl when another repl is started
this.onStartRepl = (e) => {
if (e.detail !== this.id) {
this.stop();
}
};
document.addEventListener('start-repl', this.onStartRepl);
}
// adjusts draw time depending on if there are painters
adjustDrawTime() {
// when no painters are set, [0,0] is enough (just highlighting)
this.drawer.setDrawTime(this.painters.length ? this.drawTime : [0, 0]);
}
async drawFirstFrame() {
if (!this.onDraw) {
return;
}
// draw first frame instantly
await this.prebaked;
try {
await this.repl.evaluate(this.code, false);
this.drawer.invalidate(this.repl.scheduler, -0.001);
// draw at -0.001 to avoid haps at 0 to be visualized as active
this.onDraw?.(this.drawer.visibleHaps, -0.001, [], this.painters);
} catch (err) {
console.warn('first frame could not be painted');
}
}
async evaluate() {
this.flash();
await this.repl.evaluate(this.code);
}
async stop() {
this.repl.scheduler.stop();
}
async toggle() {
if (this.repl.scheduler.started) {
this.repl.stop();
} else {
this.evaluate();
}
}
flash(ms) {
flash(this.editor, ms);
}
highlight(haps, time) {
highlightMiniLocations(this.editor, time, haps);
}
setFontSize(size) {
this.root.style.fontSize = size + 'px';
}
setFontFamily(family) {
this.root.style.fontFamily = family;
const scroller = this.root.querySelector('.cm-scroller');
if (scroller) {
scroller.style.fontFamily = family;
}
}
reconfigureExtension(key, value) {
if (!extensions[key]) {
console.warn(`extension ${key} is not known`);
return;
}
value = parseBooleans(value);
const newValue = extensions[key](value, this);
this.editor.dispatch({
effects: compartments[key].reconfigure(newValue),
});
if (key === 'theme') {
activateTheme(value);
}
}
setLineWrappingEnabled(enabled) {
this.reconfigureExtension('isLineWrappingEnabled', enabled);
}
setLineNumbersDisplayed(enabled) {
this.reconfigureExtension('isLineNumbersDisplayed', enabled);
}
setTheme(theme) {
this.reconfigureExtension('theme', theme);
}
setAutocompletionEnabled(enabled) {
this.reconfigureExtension('isAutoCompletionEnabled', enabled);
}
updateSettings(settings) {
this.setFontSize(settings.fontSize);
this.setFontFamily(settings.fontFamily);
for (let key in extensions) {
this.reconfigureExtension(key, settings[key]);
}
const updated = { ...codemirrorSettings.get(), ...settings };
codemirrorSettings.set(updated);
}
changeSetting(key, value) {
if (extensions[key]) {
this.reconfigureExtension(key, value);
return;
} else if (key === 'fontFamily') {
this.setFontFamily(value);
} else if (key === 'fontSize') {
this.setFontSize(value);
}
}
setCode(code) {
const changes = { from: 0, to: this.editor.state.doc.length, insert: code };
this.editor.dispatch({ changes });
}
clear() {
this.onStartRepl && document.removeEventListener('start-repl', this.onStartRepl);
}
}
function parseBooleans(value) {
return { true: true, false: false }[value] ?? value;
}
// helper function to generate repl ids
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
+37
View File
@@ -0,0 +1,37 @@
import { StateEffect, StateField } from '@codemirror/state';
import { Decoration, EditorView } from '@codemirror/view';
export const setFlash = StateEffect.define();
export const flashField = StateField.define({
create() {
return Decoration.none;
},
update(flash, tr) {
try {
for (let e of tr.effects) {
if (e.is(setFlash)) {
if (e.value && tr.newDoc.length > 0) {
const mark = Decoration.mark({ attributes: { style: `background-color: #FFCA2880` } });
flash = Decoration.set([mark.range(0, tr.newDoc.length)]);
} else {
flash = Decoration.set([]);
}
}
}
return flash;
} catch (err) {
console.warn('flash error', err);
return flash;
}
},
provide: (f) => EditorView.decorations.from(f),
});
export const flash = (view, ms = 200) => {
view.dispatch({ effects: setFlash.of(true) });
setTimeout(() => {
view.dispatch({ effects: setFlash.of(false) });
}, ms);
};
export const isFlashEnabled = (on) => (on ? flashField : []);
+137
View File
@@ -0,0 +1,137 @@
import { RangeSetBuilder, StateEffect, StateField } from '@codemirror/state';
import { Decoration, EditorView } from '@codemirror/view';
export const setMiniLocations = StateEffect.define();
export const showMiniLocations = StateEffect.define();
export const updateMiniLocations = (view, locations) => {
view.dispatch({ effects: setMiniLocations.of(locations) });
};
export const highlightMiniLocations = (view, atTime, haps) => {
view.dispatch({ effects: showMiniLocations.of({ atTime, haps }) });
};
const miniLocations = StateField.define({
create() {
return Decoration.none;
},
update(locations, tr) {
if (tr.docChanged) {
locations = locations.map(tr.changes);
}
for (let e of tr.effects) {
if (e.is(setMiniLocations)) {
// this is called on eval, with the mini locations obtained from the transpiler
// codemirror will automatically remap the marks when the document is edited
// create a mark for each mini location, adding the range to the spec to find it later
const marks = e.value
.filter(([from]) => from < tr.newDoc.length)
.map(([from, to]) => [from, Math.min(to, tr.newDoc.length)])
.map(
(range) =>
Decoration.mark({
id: range.join(':'),
// this green is only to verify that the decoration moves when the document is edited
// it will be removed later, so the mark is not visible by default
attributes: { style: `background-color: #00CA2880` },
}).range(...range), // -> Decoration
);
locations = Decoration.set(marks, true); // -> DecorationSet === RangeSet<Decoration>
}
}
return locations;
},
});
const visibleMiniLocations = StateField.define({
create() {
return { atTime: 0, haps: new Map() };
},
update(visible, tr) {
for (let e of tr.effects) {
if (e.is(showMiniLocations)) {
// this is called every frame to show the locations that are currently active
// we can NOT create new marks because the context.locations haven't changed since eval time
// this is why we need to find a way to update the existing decorations, showing the ones that have an active range
const haps = new Map();
for (let hap of e.value.haps) {
if (!hap.context?.locations || !hap.whole) {
continue;
}
for (let { start, end } of hap.context.locations) {
let id = `${start}:${end}`;
if (!haps.has(id) || haps.get(id).whole.begin.lt(hap.whole.begin)) {
haps.set(id, hap);
}
}
}
visible = { atTime: e.value.atTime, haps };
}
}
return visible;
},
});
// // Derive the set of decorations from the miniLocations and visibleLocations
const miniLocationHighlights = EditorView.decorations.compute([miniLocations, visibleMiniLocations], (state) => {
const iterator = state.field(miniLocations).iter();
const { haps } = state.field(visibleMiniLocations);
const builder = new RangeSetBuilder();
while (iterator.value) {
const {
from,
to,
value: {
spec: { id },
},
} = iterator;
if (haps.has(id)) {
const hap = haps.get(id);
const color = hap.context.color ?? 'var(--foreground)';
// Get explicit channels for color values
/*
const swatch = document.createElement('div');
swatch.style.color = color;
document.body.appendChild(swatch);
let channels = getComputedStyle(swatch)
.color.match(/^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(?:,\s*(\d*(?:\.\d+)?))?\)$/)
.slice(1)
.map((c) => parseFloat(c || 1));
document.body.removeChild(swatch);
// Get percentage of event
const percent = 1 - (atTime - hap.whole.begin) / hap.whole.duration;
channels[3] *= percent;
*/
builder.add(
from,
to,
Decoration.mark({
// attributes: { style: `outline: solid 2px rgba(${channels.join(', ')})` },
attributes: { style: `outline: solid 2px ${color}` },
}),
);
}
iterator.next();
}
return builder.finish();
});
export const highlightExtension = [miniLocations, visibleMiniLocations, miniLocationHighlights];
export const isPatternHighlightingEnabled = (on, config) => {
on &&
config &&
setTimeout(() => {
updateMiniLocations(config.editor, config.miniLocations);
}, 100);
return on ? highlightExtension : [];
};
+17
View File
@@ -0,0 +1,17 @@
const parser = typeof DOMParser !== 'undefined' ? new DOMParser() : null;
export let html = (string) => {
return parser?.parseFromString(string, 'text/html').querySelectorAll('*');
};
let parseChunk = (chunk) => {
if (Array.isArray(chunk)) return chunk.flat().join('');
if (chunk === undefined) return '';
return chunk;
};
export let h = (strings, ...vars) => {
let string = '';
for (let i in strings) {
string += parseChunk(strings[i]);
string += parseChunk(vars[i]);
}
return html(string);
};
+5
View File
@@ -0,0 +1,5 @@
export * from './codemirror.mjs';
export * from './highlight.mjs';
export * from './flash.mjs';
export * from './slider.mjs';
export * from './themes.mjs';
+31
View File
@@ -0,0 +1,31 @@
import { Prec } from '@codemirror/state';
import { keymap, ViewPlugin } from '@codemirror/view';
// import { searchKeymap } from '@codemirror/search';
import { emacs } from '@replit/codemirror-emacs';
import { vim } from '@replit/codemirror-vim';
import { vscodeKeymap } from '@replit/codemirror-vscode-keymap';
import { defaultKeymap, historyKeymap } from '@codemirror/commands';
const vscodePlugin = ViewPlugin.fromClass(
class {
constructor() {}
},
{
provide: () => {
return Prec.highest(keymap.of([...vscodeKeymap]));
},
},
);
const vscodeExtension = (options) => [vscodePlugin].concat(options ?? []);
const keymaps = {
vim,
emacs,
vscode: vscodeExtension,
};
export function keybindings(name) {
const active = keymaps[name];
return [keymap.of(defaultKeymap), keymap.of(historyKeymap), active ? active() : []];
// keymap.of(searchKeymap),
}
+56
View File
@@ -0,0 +1,56 @@
{
"name": "@strudel/codemirror",
"version": "1.0.0",
"description": "Codemirror Extensions for Strudel",
"main": "index.mjs",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs"
},
"scripts": {
"build": "vite build",
"prepublishOnly": "npm run build"
},
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/tidalcycles/strudel.git"
},
"keywords": [
"tidalcycles",
"strudel",
"pattern",
"livecoding",
"algorave"
],
"author": "Felix Roos <flix91@gmail.com>",
"contributors": [
"Alex McLean <alex@slab.org>"
],
"license": "AGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/tidalcycles/strudel/issues"
},
"homepage": "https://github.com/tidalcycles/strudel#readme",
"dependencies": {
"@codemirror/autocomplete": "^6.11.1",
"@codemirror/commands": "^6.3.3",
"@codemirror/lang-javascript": "^6.2.1",
"@codemirror/language": "^6.10.0",
"@codemirror/search": "^6.5.5",
"@codemirror/state": "^6.4.0",
"@codemirror/view": "^6.23.0",
"@lezer/highlight": "^1.2.0",
"@nanostores/persistent": "^0.9.1",
"@replit/codemirror-emacs": "^6.0.1",
"@replit/codemirror-vim": "^6.1.0",
"@replit/codemirror-vscode-keymap": "^6.0.2",
"@strudel/core": "workspace:*",
"@uiw/codemirror-themes": "^4.21.21",
"@uiw/codemirror-themes-all": "^4.21.21",
"nanostores": "^0.9.5"
},
"devDependencies": {
"vite": "^5.0.10"
}
}
+144
View File
@@ -0,0 +1,144 @@
import { ref, pure } from '@strudel/core';
import { WidgetType, ViewPlugin, Decoration } from '@codemirror/view';
import { StateEffect, StateField } from '@codemirror/state';
export let sliderValues = {};
const getSliderID = (from) => `slider_${from}`;
export class SliderWidget extends WidgetType {
constructor(value, min, max, from, to, step, view) {
super();
this.value = value;
this.min = min;
this.max = max;
this.from = from;
this.originalFrom = from;
this.to = to;
this.step = step;
this.view = view;
}
eq() {
return false;
}
toDOM() {
let wrap = document.createElement('span');
wrap.setAttribute('aria-hidden', 'true');
wrap.className = 'cm-slider'; // inline-flex items-center
let slider = wrap.appendChild(document.createElement('input'));
slider.type = 'range';
slider.min = this.min;
slider.max = this.max;
slider.step = this.step ?? (this.max - this.min) / 1000;
slider.originalValue = this.value;
// to make sure the code stays in sync, let's save the original value
// becuase .value automatically clamps values so it'll desync with the code
slider.value = slider.originalValue;
slider.from = this.from;
slider.originalFrom = this.originalFrom;
slider.to = this.to;
slider.style = 'width:64px;margin-right:4px;transform:translateY(4px)';
this.slider = slider;
slider.addEventListener('input', (e) => {
const next = e.target.value;
let insert = next;
//let insert = next.toFixed(2);
const to = slider.from + slider.originalValue.length;
let change = { from: slider.from, to, insert };
slider.originalValue = insert;
slider.value = insert;
this.view.dispatch({ changes: change });
const id = getSliderID(slider.originalFrom); // matches id generated in transpiler
window.postMessage({ type: 'cm-slider', value: Number(next), id });
});
return wrap;
}
ignoreEvent(e) {
return true;
}
}
export const setWidgets = StateEffect.define();
export const updateWidgets = (view, widgets) => {
view.dispatch({ effects: setWidgets.of(widgets) });
};
function getWidgets(widgetConfigs, view) {
return widgetConfigs.map(({ from, to, value, min, max, step }) => {
return Decoration.widget({
widget: new SliderWidget(value, min, max, from, to, step, view),
side: 0,
}).range(from /* , to */);
});
}
export const sliderPlugin = ViewPlugin.fromClass(
class {
decorations; //: DecorationSet
constructor(view /* : EditorView */) {
this.decorations = Decoration.set([]);
}
update(update /* : ViewUpdate */) {
update.transactions.forEach((tr) => {
if (tr.docChanged) {
this.decorations = this.decorations.map(tr.changes);
const iterator = this.decorations.iter();
while (iterator.value) {
// when the widgets are moved, we need to tell the dom node the current position
// this is important because the updateSliderValue function has to work with the dom node
if (iterator.value?.widget?.slider) {
iterator.value.widget.slider.from = iterator.from;
iterator.value.widget.slider.to = iterator.to;
}
iterator.next();
}
}
for (let e of tr.effects) {
if (e.is(setWidgets)) {
this.decorations = Decoration.set(getWidgets(e.value, update.view));
}
}
});
}
},
{
decorations: (v) => v.decorations,
},
);
/**
* Displays a slider widget to allow the user manipulate a value
*
* @name slider
* @param {number} value Initial value
* @param {number} min Minimum value - optional, defaults to 0
* @param {number} max Maximum value - optional, defaults to 1
* @param {number} step Step size - optional
*/
export let slider = (value) => {
console.warn('slider will only work when the transpiler is used... passing value as is');
return pure(value);
};
// function transpiled from slider = (value, min, max)
export let sliderWithID = (id, value, min, max) => {
sliderValues[id] = value; // sync state at eval time (code -> state)
return ref(() => sliderValues[id]); // use state at query time
};
// update state when sliders are moved
if (typeof window !== 'undefined') {
window.addEventListener('message', (e) => {
if (e.data.type === 'cm-slider') {
if (sliderValues[e.data.id] !== undefined) {
// update state when slider is moved
sliderValues[e.data.id] = e.data.value;
} else {
console.warn(`slider with id "${e.data.id}" is not registered. Only ${Object.keys(sliderValues)}`);
}
}
});
}
+527
View File
@@ -0,0 +1,527 @@
import {
abcdef,
androidstudio,
atomone,
aura,
bespin,
darcula,
dracula,
duotoneDark,
eclipse,
githubDark,
gruvboxDark,
materialDark,
nord,
okaidia,
solarizedDark,
sublime,
tokyoNight,
tokyoNightStorm,
vscodeDark,
xcodeDark,
bbedit,
duotoneLight,
githubLight,
gruvboxLight,
materialLight,
noctisLilac,
solarizedLight,
tokyoNightDay,
xcodeLight,
} from '@uiw/codemirror-themes-all';
import strudelTheme from './themes/strudel-theme';
import bluescreen, { settings as bluescreenSettings } from './themes/bluescreen';
import blackscreen, { settings as blackscreenSettings } from './themes/blackscreen';
import whitescreen, { settings as whitescreenSettings } from './themes/whitescreen';
import teletext, { settings as teletextSettings } from './themes/teletext';
import algoboy, { settings as algoboySettings } from './themes/algoboy';
import terminal, { settings as terminalSettings } from './themes/terminal';
export const themes = {
strudelTheme,
bluescreen,
blackscreen,
whitescreen,
teletext,
algoboy,
terminal,
abcdef,
androidstudio,
atomone,
aura,
bespin,
darcula,
dracula,
duotoneDark,
eclipse,
githubDark,
gruvboxDark,
materialDark,
nord,
okaidia,
solarizedDark,
sublime,
tokyoNight,
tokyoNightStorm,
vscodeDark,
xcodeDark,
bbedit,
duotoneLight,
githubLight,
gruvboxLight,
materialLight,
noctisLilac,
solarizedLight,
tokyoNightDay,
xcodeLight,
};
// lineBackground is background with 50% opacity, to make sure the selection below is visible
export const settings = {
strudelTheme: {
background: '#222',
lineBackground: '#22222299',
foreground: '#fff',
// foreground: '#75baff',
caret: '#ffcc00',
selection: 'rgba(128, 203, 196, 0.5)',
selectionMatch: '#036dd626',
// lineHighlight: '#8a91991a', // original
lineHighlight: '#00000050',
gutterBackground: 'transparent',
// gutterForeground: '#8a919966',
gutterForeground: '#8a919966',
},
bluescreen: bluescreenSettings,
blackscreen: blackscreenSettings,
whitescreen: whitescreenSettings,
teletext: teletextSettings,
algoboy: algoboySettings,
terminal: terminalSettings,
abcdef: {
background: '#0f0f0f',
lineBackground: '#0f0f0f99',
foreground: '#defdef',
caret: '#00FF00',
selection: '#515151',
selectionMatch: '#515151',
gutterBackground: '#555',
gutterForeground: '#FFFFFF',
lineHighlight: '#314151',
},
androidstudio: {
background: '#282b2e',
lineBackground: '#282b2e99',
foreground: '#a9b7c6',
caret: '#00FF00',
selection: '#343739',
selectionMatch: '#343739',
lineHighlight: '#343739',
},
atomone: {
background: '#272C35',
lineBackground: '#272C3599',
foreground: '#9d9b97',
caret: '#797977',
selection: '#ffffff30',
selectionMatch: '#2B323D',
gutterBackground: '#272C35',
gutterForeground: '#465063',
gutterBorder: 'transparent',
lineHighlight: '#2B323D',
},
aura: {
background: '#21202e',
lineBackground: '#21202e99',
foreground: '#edecee',
caret: '#a277ff',
selection: '#3d375e7f',
selectionMatch: '#3d375e7f',
gutterBackground: '#21202e',
gutterForeground: '#edecee',
gutterBorder: 'transparent',
lineHighlight: '#a394f033',
},
bbedit: {
light: true,
background: '#FFFFFF',
lineBackground: '#FFFFFF99',
foreground: '#000000',
caret: '#FBAC52',
selection: '#FFD420',
selectionMatch: '#FFD420',
gutterBackground: '#f5f5f5',
gutterForeground: '#4D4D4C',
gutterBorder: 'transparent',
lineHighlight: '#00000012',
},
bespin: {
background: '#28211c',
lineBackground: '#28211c99',
foreground: '#9d9b97',
caret: '#797977',
selection: '#36312e',
selectionMatch: '#4f382b',
gutterBackground: '#28211c',
gutterForeground: '#666666',
lineHighlight: 'rgba(255, 255, 255, 0.1)',
},
darcula: {
background: '#2B2B2B',
lineBackground: '#2B2B2B99',
foreground: '#f8f8f2',
caret: '#FFFFFF',
selection: 'rgba(255, 255, 255, 0.1)',
selectionMatch: 'rgba(255, 255, 255, 0.2)',
gutterBackground: 'rgba(255, 255, 255, 0.1)',
gutterForeground: '#999',
gutterBorder: 'transparent',
lineHighlight: 'rgba(255, 255, 255, 0.1)',
},
dracula: {
background: '#282a36',
lineBackground: '#282a3699',
foreground: '#f8f8f2',
caret: '#f8f8f0',
selection: 'rgba(255, 255, 255, 0.1)',
selectionMatch: 'rgba(255, 255, 255, 0.2)',
gutterBackground: '#282a36',
gutterForeground: '#6D8A88',
gutterBorder: 'transparent',
lineHighlight: 'rgba(255, 255, 255, 0.1)',
},
duotoneLight: {
light: true,
background: '#faf8f5',
lineBackground: '#faf8f599',
foreground: '#b29762',
caret: '#93abdc',
selection: '#e3dcce',
selectionMatch: '#e3dcce',
gutterBackground: '#faf8f5',
gutterForeground: '#cdc4b1',
gutterBorder: 'transparent',
lineHighlight: '#EFEFEF',
},
duotoneDark: {
background: '#2a2734',
lineBackground: '#2a273499',
foreground: '#6c6783',
caret: '#ffad5c',
selection: 'rgba(255, 255, 255, 0.1)',
gutterBackground: '#2a2734',
gutterForeground: '#545167',
lineHighlight: '#36334280',
},
eclipse: {
light: true,
background: '#fff',
lineBackground: '#ffffff99',
foreground: '#000',
caret: '#FFFFFF',
selection: '#d7d4f0',
selectionMatch: '#d7d4f0',
gutterBackground: '#f7f7f7',
gutterForeground: '#999',
lineHighlight: '#e8f2ff',
gutterBorder: 'transparent',
},
githubLight: {
light: true,
background: '#fff',
lineBackground: '#ffffff99',
foreground: '#24292e',
selection: '#BBDFFF',
selectionMatch: '#BBDFFF',
gutterBackground: '#fff',
gutterForeground: '#6e7781',
},
githubDark: {
background: '#0d1117',
lineBackground: '#0d111799',
foreground: '#c9d1d9',
caret: '#c9d1d9',
selection: '#003d73',
selectionMatch: '#003d73',
lineHighlight: '#36334280',
},
gruvboxDark: {
background: '#282828',
lineBackground: '#28282899',
foreground: '#ebdbb2',
caret: '#ebdbb2',
selection: '#bdae93',
selectionMatch: '#bdae93',
lineHighlight: '#3c3836',
gutterBackground: '#282828',
gutterForeground: '#7c6f64',
},
gruvboxLight: {
light: true,
background: '#fbf1c7',
lineBackground: '#fbf1c799',
foreground: '#3c3836',
caret: '#af3a03',
selection: '#ebdbb2',
selectionMatch: '#bdae93',
lineHighlight: '#ebdbb2',
gutterBackground: '#ebdbb2',
gutterForeground: '#665c54',
gutterBorder: 'transparent',
},
materialDark: {
background: '#2e3235',
lineBackground: '#2e323599',
foreground: '#bdbdbd',
caret: '#a0a4ae',
selection: '#d7d4f0',
selectionMatch: '#d7d4f0',
gutterBackground: '#2e3235',
gutterForeground: '#999',
gutterActiveForeground: '#4f5b66',
lineHighlight: '#545b61',
},
materialLight: {
light: true,
background: '#FAFAFA',
lineBackground: '#FAFAFA99',
foreground: '#90A4AE',
caret: '#272727',
selection: '#80CBC440',
selectionMatch: '#FAFAFA',
gutterBackground: '#FAFAFA',
gutterForeground: '#90A4AE',
gutterBorder: 'transparent',
lineHighlight: '#CCD7DA50',
},
noctisLilac: {
light: true,
background: '#f2f1f8',
lineBackground: '#f2f1f899',
foreground: '#0c006b',
caret: '#5c49e9',
selection: '#d5d1f2',
selectionMatch: '#d5d1f2',
gutterBackground: '#f2f1f8',
gutterForeground: '#0c006b70',
lineHighlight: '#e1def3',
},
nord: {
background: '#2e3440',
lineBackground: '#2e344099',
foreground: '#FFFFFF',
caret: '#FFFFFF',
selection: '#3b4252',
selectionMatch: '#e5e9f0',
gutterBackground: '#2e3440',
gutterForeground: '#4c566a',
gutterActiveForeground: '#d8dee9',
lineHighlight: '#4c566a',
},
okaidia: {
background: '#272822',
lineBackground: '#27282299',
foreground: '#FFFFFF',
caret: '#FFFFFF',
selection: '#49483E',
selectionMatch: '#49483E',
gutterBackground: '#272822',
gutterForeground: '#FFFFFF70',
lineHighlight: '#00000059',
},
solarizedLight: {
light: true,
background: '#fdf6e3',
lineBackground: '#fdf6e399',
foreground: '#657b83',
caret: '#586e75',
selection: '#dfd9c8',
selectionMatch: '#dfd9c8',
gutterBackground: '#00000010',
gutterForeground: '#657b83',
lineHighlight: '#dfd9c8',
},
solarizedDark: {
background: '#002b36',
lineBackground: '#002b3699',
foreground: '#93a1a1',
caret: '#839496',
selection: '#173541',
selectionMatch: '#aafe661a',
gutterBackground: '#00252f',
gutterForeground: '#839496',
lineHighlight: '#173541',
},
sublime: {
background: '#303841',
lineBackground: '#30384199',
foreground: '#FFFFFF',
caret: '#FBAC52',
selection: '#4C5964',
selectionMatch: '#3A546E',
gutterBackground: '#303841',
gutterForeground: '#FFFFFF70',
lineHighlight: '#00000059',
},
tokyoNightDay: {
light: true,
background: '#e1e2e7',
lineBackground: '#e1e2e799',
foreground: '#3760bf',
caret: '#3760bf',
selection: '#99a7df',
selectionMatch: '#99a7df',
gutterBackground: '#e1e2e7',
gutterForeground: '#3760bf',
gutterBorder: 'transparent',
lineHighlight: '#5f5faf11',
},
tokyoNightStorm: {
background: '#24283b',
lineBackground: '#24283b99',
foreground: '#7982a9',
caret: '#c0caf5',
selection: '#6f7bb630',
selectionMatch: '#1f2335',
gutterBackground: '#24283b',
gutterForeground: '#7982a9',
gutterBorder: 'transparent',
lineHighlight: '#292e42',
},
tokyoNight: {
background: '#1a1b26',
lineBackground: '#1a1b2699',
foreground: '#787c99',
caret: '#c0caf5',
selection: '#515c7e40',
selectionMatch: '#16161e',
gutterBackground: '#1a1b26',
gutterForeground: '#787c99',
gutterBorder: 'transparent',
lineHighlight: '#1e202e',
},
vscodeDark: {
background: '#1e1e1e',
lineBackground: '#1e1e1e99',
foreground: '#9cdcfe',
caret: '#c6c6c6',
selection: '#6199ff2f',
selectionMatch: '#72a1ff59',
lineHighlight: '#ffffff0f',
gutterBackground: '#1e1e1e',
gutterForeground: '#838383',
gutterActiveForeground: '#fff',
},
xcodeLight: {
light: true,
background: '#fff',
lineBackground: '#ffffff99',
foreground: '#3D3D3D',
selection: '#BBDFFF',
selectionMatch: '#BBDFFF',
gutterBackground: '#fff',
gutterForeground: '#AFAFAF',
lineHighlight: '#EDF4FF',
},
xcodeDark: {
background: '#292A30',
lineBackground: '#292A3099',
foreground: '#CECFD0',
caret: '#fff',
selection: '#727377',
selectionMatch: '#727377',
lineHighlight: '#2F3239',
},
};
function getColors(str) {
const colorRegex = /#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})/g;
const colors = [];
let match;
while ((match = colorRegex.exec(str)) !== null) {
const color = match[0];
if (!colors.includes(color)) {
colors.push(color);
}
}
return colors;
}
// TODO: remove
export function themeColors(theme) {
return getColors(stringifySafe(theme));
}
function getCircularReplacer() {
const seen = new WeakSet();
return (key, value) => {
if (typeof value === 'object' && value !== null) {
if (seen.has(value)) {
return;
}
seen.add(value);
}
return value;
};
}
function stringifySafe(json) {
return JSON.stringify(json, getCircularReplacer());
}
export const theme = (theme) => themes[theme] || themes.strudelTheme;
// css style injection helpers
export function injectStyle(rule) {
const newStyle = document.createElement('style');
document.head.appendChild(newStyle);
const styleSheet = newStyle.sheet;
const ruleIndex = styleSheet.insertRule(rule, 0);
return () => styleSheet.deleteRule(ruleIndex);
}
let currentTheme,
resetThemeStyle,
themeStyle,
styleID = 'strudel-theme-vars';
export function initTheme(theme) {
if (!document.getElementById(styleID)) {
themeStyle = document.createElement('style');
themeStyle.id = styleID;
document.head.append(themeStyle);
}
activateTheme(theme);
}
export function activateTheme(name) {
if (currentTheme === name) {
return;
}
currentTheme = name;
if (!settings[name]) {
console.warn('theme', name, 'has no settings.. defaulting to strudelTheme settings');
}
const themeSettings = settings[name] || settings.strudelTheme;
// set css variables
themeStyle.innerHTML = `:root {
${Object.entries(themeSettings)
// important to override fallback
.map(([key, value]) => `--${key}: ${value} !important;`)
.join('\n')}
}`;
// tailwind dark mode
if (themeSettings.light) {
document.documentElement.classList.remove('dark');
} else {
document.documentElement.classList.add('dark');
}
resetThemeStyle?.();
resetThemeStyle = undefined;
if (themeSettings.customStyle) {
resetThemeStyle = injectStyle(themeSettings.customStyle);
}
}
+41
View File
@@ -0,0 +1,41 @@
import { tags as t } from '@lezer/highlight';
import { createTheme } from '@uiw/codemirror-themes';
export const settings = {
background: '#9bbc0f',
foreground: '#0f380f', // whats that?
caret: '#0f380f',
selection: '#306230',
selectionMatch: '#ffffff26',
lineHighlight: '#8bac0f',
lineBackground: '#9bbc0f50',
//lineBackground: 'transparent',
gutterBackground: 'transparent',
gutterForeground: '#0f380f',
light: true,
customStyle: '.cm-line { line-height: 1 }',
};
export default createTheme({
theme: 'light',
settings,
styles: [
{ tag: t.keyword, color: '#0f380f' },
{ tag: t.operator, color: '#0f380f' },
{ tag: t.special(t.variableName), color: '#0f380f' },
{ tag: t.typeName, color: '#0f380f' },
{ tag: t.atom, color: '#0f380f' },
{ tag: t.number, color: '#0f380f' },
{ tag: t.definition(t.variableName), color: '#0f380f' },
{ tag: t.string, color: '#0f380f' },
{ tag: t.special(t.string), color: '#0f380f' },
{ tag: t.comment, color: '#0f380f' },
{ tag: t.variableName, color: '#0f380f' },
{ tag: t.tagName, color: '#0f380f' },
{ tag: t.bracket, color: '#0f380f' },
{ tag: t.meta, color: '#0f380f' },
{ tag: t.attributeName, color: '#0f380f' },
{ tag: t.propertyName, color: '#0f380f' },
{ tag: t.className, color: '#0f380f' },
{ tag: t.invalid, color: '#0f380f' },
{ tag: [t.unit, t.punctuation], color: '#0f380f' },
],
});
+38
View File
@@ -0,0 +1,38 @@
import { tags as t } from '@lezer/highlight';
import { createTheme } from '@uiw/codemirror-themes';
export const settings = {
background: 'black',
foreground: 'white', // whats that?
caret: 'white',
selection: '#ffffff20',
selectionMatch: '#036dd626',
lineHighlight: '#ffffff10',
lineBackground: '#00000050',
gutterBackground: 'transparent',
gutterForeground: '#8a919966',
};
export default createTheme({
theme: 'dark',
settings,
styles: [
{ tag: t.keyword, color: 'white' },
{ tag: t.operator, color: 'white' },
{ tag: t.special(t.variableName), color: 'white' },
{ tag: t.typeName, color: 'white' },
{ tag: t.atom, color: 'white' },
{ tag: t.number, color: 'white' },
{ tag: t.definition(t.variableName), color: 'white' },
{ tag: t.string, color: 'white' },
{ tag: t.special(t.string), color: 'white' },
{ tag: t.comment, color: 'white' },
{ tag: t.variableName, color: 'white' },
{ tag: t.tagName, color: 'white' },
{ tag: t.bracket, color: 'white' },
{ tag: t.meta, color: 'white' },
{ tag: t.attributeName, color: 'white' },
{ tag: t.propertyName, color: 'white' },
{ tag: t.className, color: 'white' },
{ tag: t.invalid, color: 'white' },
{ tag: [t.unit, t.punctuation], color: 'white' },
],
});
+41
View File
@@ -0,0 +1,41 @@
import { tags as t } from '@lezer/highlight';
import { createTheme } from '@uiw/codemirror-themes';
export const settings = {
background: '#051DB5',
lineBackground: '#051DB550',
foreground: 'white', // whats that?
caret: 'white',
selection: 'rgba(128, 203, 196, 0.5)',
selectionMatch: '#036dd626',
// lineHighlight: '#8a91991a', // original
lineHighlight: '#00000050',
gutterBackground: 'transparent',
// gutterForeground: '#8a919966',
gutterForeground: '#8a919966',
};
export default createTheme({
theme: 'dark',
settings,
styles: [
{ tag: t.keyword, color: 'white' },
{ tag: t.operator, color: 'white' },
{ tag: t.special(t.variableName), color: 'white' },
{ tag: t.typeName, color: 'white' },
{ tag: t.atom, color: 'white' },
{ tag: t.number, color: 'white' },
{ tag: t.definition(t.variableName), color: 'white' },
{ tag: t.string, color: 'white' },
{ tag: t.special(t.string), color: 'white' },
{ tag: t.comment, color: 'white' },
{ tag: t.variableName, color: 'white' },
{ tag: t.tagName, color: 'white' },
{ tag: t.bracket, color: 'white' },
{ tag: t.meta, color: 'white' },
{ tag: t.attributeName, color: 'white' },
{ tag: t.propertyName, color: 'white' },
{ tag: t.className, color: 'white' },
{ tag: t.invalid, color: 'white' },
{ tag: [t.unit, t.punctuation], color: 'white' },
],
});
@@ -8,29 +8,38 @@ export default createTheme({
caret: '#ffcc00',
selection: 'rgba(128, 203, 196, 0.5)',
selectionMatch: '#036dd626',
lineHighlight: '#8a91991a',
// lineHighlight: '#8a91991a', // original
lineHighlight: '#00000050',
gutterBackground: 'transparent',
// gutterForeground: '#8a919966',
gutterForeground: '#676e95',
gutterForeground: '#8a919966',
},
styles: [
{ tag: t.keyword, color: '#c792ea' },
{ tag: t.operator, color: '#89ddff' },
{ tag: t.special(t.variableName), color: '#eeffff' },
{ tag: t.typeName, color: '#f07178' },
// { tag: t.typeName, color: '#f07178' }, // original
{ tag: t.typeName, color: '#c3e88d' },
{ tag: t.atom, color: '#f78c6c' },
{ tag: t.number, color: '#ff5370' },
// { tag: t.number, color: '#ff5370' }, // original
{ tag: t.number, color: '#c3e88d' },
{ tag: t.definition(t.variableName), color: '#82aaff' },
{ tag: t.string, color: '#c3e88d' },
{ tag: t.special(t.string), color: '#f07178' },
// { tag: t.special(t.string), color: '#f07178' }, // original
{ tag: t.special(t.string), color: '#c3e88d' },
{ tag: t.comment, color: '#7d8799' },
{ tag: t.variableName, color: '#f07178' },
{ tag: t.tagName, color: '#ff5370' },
{ tag: t.bracket, color: '#a2a1a4' },
// { tag: t.variableName, color: '#f07178' }, // original
{ tag: t.variableName, color: '#c792ea' },
// { tag: t.tagName, color: '#ff5370' }, // original
{ tag: t.tagName, color: '#c3e88d' },
{ tag: t.bracket, color: '#525154' },
// { tag: t.bracket, color: '#a2a1a4' }, // original
{ tag: t.meta, color: '#ffcb6b' },
{ tag: t.attributeName, color: '#c792ea' },
{ tag: t.propertyName, color: '#c792ea' },
{ tag: t.className, color: '#decb6b' },
{ tag: t.invalid, color: '#ffffff' },
{ tag: [t.unit, t.punctuation], color: '#82aaff' },
],
});
+50
View File
@@ -0,0 +1,50 @@
import { tags as t } from '@lezer/highlight';
import { createTheme } from '@uiw/codemirror-themes';
let colorA = '#6edee4';
//let colorB = 'magenta';
let colorB = 'white';
let colorC = 'red';
let colorD = '#f8fc55';
export const settings = {
background: '#000000',
foreground: colorA, // whats that?
caret: colorC,
selection: colorD,
selectionMatch: colorA,
lineHighlight: '#6edee440', // panel bg
lineBackground: '#00000040',
gutterBackground: 'transparent',
gutterForeground: '#8a919966',
customStyle: '.cm-line { line-height: 1 }',
};
let punctuation = colorD;
let mini = colorB;
export default createTheme({
theme: 'dark',
settings,
styles: [
{ tag: t.keyword, color: colorA },
{ tag: t.operator, color: mini },
{ tag: t.special(t.variableName), color: colorA },
{ tag: t.typeName, color: colorA },
{ tag: t.atom, color: colorA },
{ tag: t.number, color: mini },
{ tag: t.definition(t.variableName), color: colorA },
{ tag: t.string, color: mini },
{ tag: t.special(t.string), color: mini },
{ tag: t.comment, color: punctuation },
{ tag: t.variableName, color: colorA },
{ tag: t.tagName, color: colorA },
{ tag: t.bracket, color: punctuation },
{ tag: t.meta, color: colorA },
{ tag: t.attributeName, color: colorA },
{ tag: t.propertyName, color: colorA }, // methods
{ tag: t.className, color: colorA },
{ tag: t.invalid, color: colorC },
{ tag: [t.unit, t.punctuation], color: punctuation },
],
});
+36
View File
@@ -0,0 +1,36 @@
import { tags as t } from '@lezer/highlight';
import { createTheme } from '@uiw/codemirror-themes';
export const settings = {
background: 'black',
foreground: '#41FF00', // whats that?
caret: '#41FF00',
selection: '#ffffff20',
selectionMatch: '#036dd626',
lineHighlight: '#ffffff10',
gutterBackground: 'transparent',
gutterForeground: '#8a919966',
};
export default createTheme({
theme: 'dark',
settings,
styles: [
{ tag: t.keyword, color: '#41FF00' },
{ tag: t.operator, color: '#41FF00' },
{ tag: t.special(t.variableName), color: '#41FF00' },
{ tag: t.typeName, color: '#41FF00' },
{ tag: t.atom, color: '#41FF00' },
{ tag: t.number, color: '#41FF00' },
{ tag: t.definition(t.variableName), color: '#41FF00' },
{ tag: t.string, color: '#41FF00' },
{ tag: t.special(t.string), color: '#41FF00' },
{ tag: t.comment, color: '#41FF00' },
{ tag: t.variableName, color: '#41FF00' },
{ tag: t.tagName, color: '#41FF00' },
{ tag: t.bracket, color: '#41FF00' },
{ tag: t.meta, color: '#41FF00' },
{ tag: t.attributeName, color: '#41FF00' },
{ tag: t.propertyName, color: '#41FF00' },
{ tag: t.className, color: '#41FF00' },
{ tag: t.invalid, color: '#41FF00' },
],
});
+38
View File
@@ -0,0 +1,38 @@
import { tags as t } from '@lezer/highlight';
import { createTheme } from '@uiw/codemirror-themes';
export const settings = {
background: 'white',
foreground: 'black', // whats that?
caret: 'black',
selection: 'rgba(128, 203, 196, 0.5)',
selectionMatch: '#ffffff26',
lineHighlight: '#cccccc50',
lineBackground: '#ffffff50',
gutterBackground: 'transparent',
gutterForeground: 'black',
light: true,
};
export default createTheme({
theme: 'light',
settings,
styles: [
{ tag: t.keyword, color: 'black' },
{ tag: t.operator, color: 'black' },
{ tag: t.special(t.variableName), color: 'black' },
{ tag: t.typeName, color: 'black' },
{ tag: t.atom, color: 'black' },
{ tag: t.number, color: 'black' },
{ tag: t.definition(t.variableName), color: 'black' },
{ tag: t.string, color: 'black' },
{ tag: t.special(t.string), color: 'black' },
{ tag: t.comment, color: 'black' },
{ tag: t.variableName, color: 'black' },
{ tag: t.tagName, color: 'black' },
{ tag: t.bracket, color: 'black' },
{ tag: t.meta, color: 'black' },
{ tag: t.attributeName, color: 'black' },
{ tag: t.propertyName, color: 'black' },
{ tag: t.className, color: 'black' },
{ tag: t.invalid, color: 'black' },
],
});
+78
View File
@@ -0,0 +1,78 @@
import { hoverTooltip } from '@codemirror/view';
import jsdoc from '../../doc.json';
import { Autocomplete } from './autocomplete.mjs';
const getDocLabel = (doc) => doc.name || doc.longname;
let ctrlDown = false;
if (typeof window !== 'undefined') {
// Record Control key event to trigger or block the tooltip depending on the state
window.addEventListener(
'keyup',
function (e) {
if (e.key == 'Control') {
ctrlDown = false;
}
},
true,
);
window.addEventListener(
'keydown',
function (e) {
if (e.key == 'Control') {
ctrlDown = true;
}
},
true,
);
}
export const strudelTooltip = hoverTooltip(
(view, pos, side) => {
// Word selection from CodeMirror Hover Tooltip example https://codemirror.net/examples/tooltip/#hover-tooltips
if (!ctrlDown) {
return null;
}
let { from, to, text } = view.state.doc.lineAt(pos);
let start = pos,
end = pos;
while (start > from && /\w/.test(text[start - from - 1])) {
start--;
}
while (end < to && /\w/.test(text[end - from])) {
end++;
}
if ((start == pos && side < 0) || (end == pos && side > 0)) {
return null;
}
let word = text.slice(start - from, end - from);
// Get entry from Strudel documentation
let entry = jsdoc.docs.filter((doc) => getDocLabel(doc) === word)[0];
if (!entry) {
// Try for synonyms
entry = jsdoc.docs.filter((doc) => doc.synonyms && doc.synonyms.includes(word))[0];
if (!entry) {
return null;
}
}
return {
pos: start,
end,
above: false,
arrow: true,
create(view) {
let dom = document.createElement('div');
dom.className = 'strudel-tooltip';
const ac = Autocomplete({ doc: entry, label: word });
dom.appendChild(ac);
return { dom };
},
};
},
{ hoverTime: 10 },
);
export const isTooltipEnabled = (on) => (on ? strudelTooltip : []);
+19
View File
@@ -0,0 +1,19 @@
import { defineConfig } from 'vite';
import { dependencies } from './package.json';
import { resolve } from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
build: {
lib: {
entry: resolve(__dirname, 'index.mjs'),
formats: ['es', 'cjs'],
fileName: (ext) => ({ es: 'index.mjs', cjs: 'index.js' })[ext],
},
rollupOptions: {
external: [...Object.keys(dependencies)],
},
target: 'esnext',
},
});
+7 -6
View File
@@ -1,17 +1,17 @@
# @strudel.cycles/core
# @strudel/core
This package contains the bare essence of strudel.
## Install
```sh
npm i @strudel.cycles/core --save
npm i @strudel/core --save
```
## Example
```js
import { sequence } from '@strudel.cycles/core';
import { sequence } from '@strudel/core';
const pattern = sequence('a', ['b', 'c']);
@@ -33,6 +33,7 @@ b: 3/2 - 7/4
c: 7/4 - 2
```
- [play with @strudel.cycles/core on codesandbox](https://codesandbox.io/s/strudel-core-test-qmz6qr?file=/src/index.js).
- [open color pattern example](https://raw.githack.com/tidalcycles/strudel/package-examples/packages/core/examples/canvas.html)
- [open minimal repl example](https://raw.githack.com/tidalcycles/strudel/package-examples/packages/core/examples/metro.html)
- [play with @strudel/core on codesandbox](https://codesandbox.io/s/strudel-core-test-forked-9ywhv7?file=/src/index.js).
- [open color pattern example](https://raw.githack.com/tidalcycles/strudel/main/packages/core/examples/canvas.html)
- [open minimal repl example](https://raw.githack.com/tidalcycles/strudel/main/packages/core/examples/vanilla.html)
- [open minimal vite example](./examples/vite-vanilla-repl/)
+68
View File
@@ -0,0 +1,68 @@
import { Pattern, getDrawContext, silence, register, pure } from './index.mjs';
import controls from './controls.mjs'; // do not import from index.mjs as it breaks for some reason..
const { createParams } = controls;
let clearColor = '#22222210';
Pattern.prototype.animate = function ({ callback, sync = false, smear = 0.5 } = {}) {
window.frame && cancelAnimationFrame(window.frame);
const ctx = getDrawContext();
const { clientWidth: ww, clientHeight: wh } = ctx.canvas;
let smearPart = smear === 0 ? '99' : Number((1 - smear) * 100).toFixed(0);
smearPart = smearPart.length === 1 ? `0${smearPart}` : smearPart;
clearColor = `#200010${smearPart}`;
const render = (t) => {
let frame;
/* if (sync) {
t = scheduler.now();
frame = this.queryArc(t, t);
} else { */
t = Math.round(t);
frame = this.slow(1000).queryArc(t, t);
// }
ctx.fillStyle = clearColor;
ctx.fillRect(0, 0, ww, wh);
frame.forEach((f) => {
let { x, y, w, h, s, r, angle = 0, fill = 'darkseagreen' } = f.value;
w *= ww;
h *= wh;
if (r !== undefined && angle !== undefined) {
const radians = angle * 2 * Math.PI;
const [cx, cy] = [(ww - w) / 2, (wh - h) / 2];
x = cx + Math.cos(radians) * r * cx;
y = cy + Math.sin(radians) * r * cy;
} else {
x *= ww - w;
y *= wh - h;
}
const val = { ...f.value, x, y, w, h };
ctx.fillStyle = fill;
if (s === 'rect') {
ctx.fillRect(x, y, w, h);
} else if (s === 'ellipse') {
ctx.beginPath();
ctx.ellipse(x + w / 2, y + h / 2, w / 2, h / 2, 0, 0, 2 * Math.PI);
ctx.fill();
}
callback && callback(ctx, val, f);
});
window.frame = requestAnimationFrame(render);
};
window.frame = requestAnimationFrame(render);
return silence;
};
export const { x, y, w, h, angle, r, fill, smear } = createParams('x', 'y', 'w', 'h', 'angle', 'r', 'fill', 'smear');
export const rescale = register('rescale', function (f, pat) {
return pat.mul(x(f).w(f).y(f).h(f));
});
export const moveXY = register('moveXY', function (dx, dy, pat) {
return pat.add(x(dx).y(dy));
});
export const zoomIn = register('zoomIn', function (f, pat) {
const d = pure(1).sub(f).div(2);
return pat.rescale(f).move(d, d);
});
+175
View File
@@ -0,0 +1,175 @@
export const colorMap = {
aliceblue: '#f0f8ff',
antiquewhite: '#faebd7',
aqua: '#00ffff',
aquamarine: '#7fffd4',
azure: '#f0ffff',
beige: '#f5f5dc',
bisque: '#ffe4c4',
black: '#000000',
blanchedalmond: '#ffebcd',
blue: '#0000ff',
blueviolet: '#8a2be2',
brown: '#a52a2a',
burlywood: '#deb887',
cadetblue: '#5f9ea0',
chartreuse: '#7fff00',
chocolate: '#d2691e',
coral: '#ff7f50',
cornflowerblue: '#6495ed',
cornsilk: '#fff8dc',
crimson: '#dc143c',
cyan: '#00ffff',
darkblue: '#00008b',
darkcyan: '#008b8b',
darkgoldenrod: '#b8860b',
darkgray: '#a9a9a9',
darkgreen: '#006400',
darkgrey: '#a9a9a9',
darkkhaki: '#bdb76b',
darkmagenta: '#8b008b',
darkolivegreen: '#556b2f',
darkorange: '#ff8c00',
darkorchid: '#9932cc',
darkred: '#8b0000',
darksalmon: '#e9967a',
darkseagreen: '#8fbc8f',
darkslateblue: '#483d8b',
darkslategray: '#2f4f4f',
darkslategrey: '#2f4f4f',
darkturquoise: '#00ced1',
darkviolet: '#9400d3',
deeppink: '#ff1493',
deepskyblue: '#00bfff',
dimgray: '#696969',
dimgrey: '#696969',
dodgerblue: '#1e90ff',
firebrick: '#b22222',
floralwhite: '#fffaf0',
forestgreen: '#228b22',
fuchsia: '#ff00ff',
gainsboro: '#dcdcdc',
ghostwhite: '#f8f8ff',
gold: '#ffd700',
goldenrod: '#daa520',
gray: '#808080',
green: '#008000',
greenyellow: '#adff2f',
grey: '#808080',
honeydew: '#f0fff0',
hotpink: '#ff69b4',
indianred: '#cd5c5c',
indigo: '#4b0082',
ivory: '#fffff0',
khaki: '#f0e68c',
lavender: '#e6e6fa',
lavenderblush: '#fff0f5',
lawngreen: '#7cfc00',
lemonchiffon: '#fffacd',
lightblue: '#add8e6',
lightcoral: '#f08080',
lightcyan: '#e0ffff',
lightgoldenrodyellow: '#fafad2',
lightgray: '#d3d3d3',
lightgreen: '#90ee90',
lightgrey: '#d3d3d3',
lightpink: '#ffb6c1',
lightsalmon: '#ffa07a',
lightseagreen: '#20b2aa',
lightskyblue: '#87cefa',
lightslategray: '#778899',
lightslategrey: '#778899',
lightsteelblue: '#b0c4de',
lightyellow: '#ffffe0',
lime: '#00ff00',
limegreen: '#32cd32',
linen: '#faf0e6',
magenta: '#ff00ff',
maroon: '#800000',
mediumaquamarine: '#66cdaa',
mediumblue: '#0000cd',
mediumorchid: '#ba55d3',
mediumpurple: '#9370db',
mediumseagreen: '#3cb371',
mediumslateblue: '#7b68ee',
mediumspringgreen: '#00fa9a',
mediumturquoise: '#48d1cc',
mediumvioletred: '#c71585',
midnightblue: '#191970',
mintcream: '#f5fffa',
mistyrose: '#ffe4e1',
moccasin: '#ffe4b5',
navajowhite: '#ffdead',
navy: '#000080',
oldlace: '#fdf5e6',
olive: '#808000',
olivedrab: '#6b8e23',
orange: '#ffa500',
orangered: '#ff4500',
orchid: '#da70d6',
palegoldenrod: '#eee8aa',
palegreen: '#98fb98',
paleturquoise: '#afeeee',
palevioletred: '#db7093',
papayawhip: '#ffefd5',
peachpuff: '#ffdab9',
peru: '#cd853f',
pink: '#ffc0cb',
plum: '#dda0dd',
powderblue: '#b0e0e6',
purple: '#800080',
red: '#ff0000',
rosybrown: '#bc8f8f',
royalblue: '#4169e1',
saddlebrown: '#8b4513',
salmon: '#fa8072',
sandybrown: '#f4a460',
seagreen: '#2e8b57',
seashell: '#fff5ee',
sienna: '#a0522d',
silver: '#c0c0c0',
skyblue: '#87ceeb',
slateblue: '#6a5acd',
slategray: '#708090',
slategrey: '#708090',
snow: '#fffafa',
springgreen: '#00ff7f',
steelblue: '#4682b4',
tan: '#d2b48c',
teal: '#008080',
thistle: '#d8bfd8',
tomato: '#ff6347',
turquoise: '#40e0d0',
violet: '#ee82ee',
wheat: '#f5deb3',
white: '#ffffff',
whitesmoke: '#f5f5f5',
yellow: '#ffff00',
yellowgreen: '#9acd32',
};
export function convertColorToNumber(color) {
// Convert color to lowercase for easier matching
color = color.toLowerCase();
// If the color is a hex code, convert it to a number
if (color[0] === '#') {
return convertHexToNumber(color);
}
// If the color is a named color, return the corresponding number
if (colorMap[color] !== undefined) {
return convertHexToNumber(colorMap[color]);
}
// If the color is not recognized, return null
return -1;
}
export function convertHexToNumber(hex) {
// Remove the leading '#' from the hex code
hex = hex.slice(1);
// Convert the hex code to a number
return parseInt(hex, 16);
}
+1085 -384
View File
File diff suppressed because it is too large Load Diff
+59 -30
View File
@@ -5,65 +5,90 @@ This program is free software: you can redistribute it and/or modify it under th
*/
import createClock from './zyklus.mjs';
import { logger } from './logger.mjs';
export class Cyclist {
worker;
pattern;
started = false;
cps = 1; // TODO
getTime;
phase = 0;
constructor({ interval, onTrigger, onError, getTime, latency = 0.1 }) {
this.getTime = getTime;
const round = (x) => Math.round(x * 1000) / 1000;
constructor({ interval, onTrigger, onToggle, onError, getTime, latency = 0.1 }) {
this.started = false;
this.cps = 0.5;
this.num_ticks_since_cps_change = 0;
this.lastTick = 0; // absolute time when last tick (clock callback) happened
this.lastBegin = 0; // query begin of last tick
this.lastEnd = 0; // query end of last tick
this.getTime = getTime; // get absolute time
this.num_cycles_since_last_cps_change = 0;
this.onToggle = onToggle;
this.latency = latency; // fixed trigger time offset
this.clock = createClock(
getTime,
// called slightly before each cycle
(phase, duration, tick) => {
if (tick === 0) {
this.origin = phase;
}
const begin = round(phase - this.origin);
this.phase = begin - latency;
const end = round(begin + duration);
const time = getTime();
if (this.num_ticks_since_cps_change === 0) {
this.num_cycles_since_last_cps_change = this.lastEnd;
}
this.num_ticks_since_cps_change++;
try {
const haps = this.pattern.queryArc(begin, end); // get Haps
// console.log('haps', haps.map((hap) => hap.value.n).join(' '));
const time = getTime();
const begin = this.lastEnd;
this.lastBegin = begin;
//convert ticks to cycles, so you can query the pattern for events
const eventLength = duration * this.cps;
const end = this.num_cycles_since_last_cps_change + this.num_ticks_since_cps_change * eventLength;
this.lastEnd = end;
// query the pattern for events
const haps = this.pattern.queryArc(begin, end, { _cps: this.cps });
const tickdeadline = phase - time; // time left until the phase is a whole number
this.lastTick = time + tickdeadline;
haps.forEach((hap) => {
// console.log('hap', hap.value.n, hap.part.begin);
if (hap.part.begin.equals(hap.whole.begin)) {
const deadline = hap.whole.begin + this.origin - time + latency;
const duration = hap.duration * 1;
onTrigger?.(hap, deadline, duration);
const deadline = (hap.whole.begin - begin) / this.cps + tickdeadline + latency;
const duration = hap.duration / this.cps;
onTrigger?.(hap, deadline, duration, this.cps);
}
});
} catch (e) {
console.warn('scheduler error', e);
logger(`[cyclist] error: ${e.message}`);
onError?.(e);
}
}, // called slightly before each cycle
},
interval, // duration of each cycle
);
}
getPhase() {
return this.phase;
now() {
const secondsSinceLastTick = this.getTime() - this.lastTick - this.clock.duration;
return this.lastBegin + secondsSinceLastTick * this.cps; // + this.clock.minLatency;
}
setStarted(v) {
this.started = v;
this.onToggle?.(v);
}
start() {
this.num_ticks_since_cps_change = 0;
this.num_cycles_since_last_cps_change = 0;
if (!this.pattern) {
throw new Error('Scheduler: no pattern set! call .setPattern first.');
}
logger('[cyclist] start');
this.clock.start();
this.started = true;
this.setStarted(true);
}
pause() {
this.clock.stop();
delete this.origin;
this.started = false;
logger('[cyclist] pause');
this.clock.pause();
this.setStarted(false);
}
stop() {
delete this.origin;
logger('[cyclist] stop');
this.clock.stop();
this.started = false;
this.lastEnd = 0;
this.setStarted(false);
}
setPattern(pat, autostart = false) {
this.pattern = pat;
@@ -71,8 +96,12 @@ export class Cyclist {
this.start();
}
}
setCps(cps = 1) {
setCps(cps = 0.5) {
if (this.cps === cps) {
return;
}
this.cps = cps;
this.num_ticks_since_cps_change = 0;
}
log(begin, end, haps) {
const onsets = haps.filter((h) => h.hasOnset());
+177
View File
@@ -0,0 +1,177 @@
/*
draw.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/draw.mjs>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Pattern, getTime, State, TimeSpan } from './index.mjs';
export const getDrawContext = (id = 'test-canvas') => {
let canvas = document.querySelector('#' + id);
if (!canvas) {
const scale = 2; // 2 = crisp on retina screens
canvas = document.createElement('canvas');
canvas.id = id;
canvas.width = window.innerWidth * scale;
canvas.height = window.innerHeight * scale;
canvas.style = 'pointer-events:none;width:100%;height:100%;position:fixed;top:0;left:0';
document.body.prepend(canvas);
let timeout;
window.addEventListener('resize', () => {
timeout && clearTimeout(timeout);
timeout = setTimeout(() => {
canvas.width = window.innerWidth * scale;
canvas.height = window.innerHeight * scale;
}, 200);
});
}
return canvas.getContext('2d');
};
Pattern.prototype.draw = function (callback, { from, to, onQuery } = {}) {
if (typeof window === 'undefined') {
return this;
}
if (window.strudelAnimation) {
cancelAnimationFrame(window.strudelAnimation);
}
const ctx = getDrawContext();
let cycle,
events = [];
const animate = (time) => {
const t = getTime();
if (from !== undefined && to !== undefined) {
const currentCycle = Math.floor(t);
if (cycle !== currentCycle) {
cycle = currentCycle;
const begin = currentCycle + from;
const end = currentCycle + to;
setTimeout(() => {
events = this.query(new State(new TimeSpan(begin, end)))
.filter(Boolean)
.filter((event) => event.part.begin.equals(event.whole.begin));
onQuery?.(events);
}, 0);
}
}
callback(ctx, events, t, time);
window.strudelAnimation = requestAnimationFrame(animate);
};
requestAnimationFrame(animate);
return this;
};
export const cleanupDraw = (clearScreen = true) => {
const ctx = getDrawContext();
clearScreen && ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.width);
if (window.strudelAnimation) {
cancelAnimationFrame(window.strudelAnimation);
}
if (window.strudelScheduler) {
clearInterval(window.strudelScheduler);
}
};
Pattern.prototype.onPaint = function (onPaint) {
// this is evil! TODO: add pattern.context
this.context = { onPaint };
return this;
};
// const round = (x) => Math.round(x * 1000) / 1000;
// encapsulates starting and stopping animation frames
export class Framer {
constructor(onFrame, onError) {
this.onFrame = onFrame;
this.onError = onError;
}
start() {
const self = this;
let frame = requestAnimationFrame(function updateHighlights(time) {
try {
self.onFrame(time);
} catch (err) {
self.onError(err);
}
frame = requestAnimationFrame(updateHighlights);
});
self.cancel = () => {
cancelAnimationFrame(frame);
};
}
stop() {
if (this.cancel) {
this.cancel();
}
}
}
// syncs animation frames to a cyclist scheduler
// see vite-vanilla-repl-cm6 for an example
export class Drawer {
constructor(onDraw, drawTime) {
this.visibleHaps = [];
this.lastFrame = null;
this.drawTime = drawTime;
this.framer = new Framer(
() => {
if (!this.scheduler) {
console.warn('Drawer: no scheduler');
return;
}
const lookbehind = Math.abs(this.drawTime[0]);
const lookahead = this.drawTime[1];
// calculate current frame time (think right side of screen for pianoroll)
const phase = this.scheduler.now() + lookahead;
// first frame just captures the phase
if (this.lastFrame === null) {
this.lastFrame = phase;
return;
}
// query haps from last frame till now. take last 100ms max
const haps = this.scheduler.pattern.queryArc(Math.max(this.lastFrame, phase - 1 / 10), phase);
this.lastFrame = phase;
this.visibleHaps = (this.visibleHaps || [])
// filter out haps that are too far in the past (think left edge of screen for pianoroll)
.filter((h) => h.whole?.end >= phase - lookbehind - lookahead)
// add new haps with onset (think right edge bars scrolling in)
.concat(haps.filter((h) => h.hasOnset()));
const time = phase - lookahead;
onDraw(this.visibleHaps, time, this);
},
(err) => {
console.warn('draw error', err);
},
);
}
setDrawTime(drawTime) {
this.drawTime = drawTime;
}
invalidate(scheduler = this.scheduler, t) {
if (!scheduler) {
return;
}
// TODO: scheduler.now() seems to move even when it's stopped, this hints at a bug...
t = t ?? scheduler.now();
this.scheduler = scheduler;
let [_, lookahead] = this.drawTime;
const [begin, end] = [Math.max(t, 0), t + lookahead + 0.1];
// remove all future haps
this.visibleHaps = this.visibleHaps.filter((h) => h.whole.begin < t);
// query future haps
const futureHaps = scheduler.pattern.queryArc(begin, end); // +0.1 = workaround for weird holes in query..
// append future haps
this.visibleHaps = this.visibleHaps.concat(futureHaps);
}
start(scheduler) {
this.scheduler = scheduler;
this.invalidate();
this.framer.start();
}
stop() {
if (this.framer) {
this.framer.stop();
}
}
}
+111 -30
View File
@@ -1,47 +1,91 @@
/*
euclid.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/euclid.mjs>
euclid.mjs - Bjorklund/Euclidean/Diaspora rhythms
Copyright (C) 2023 Rohan Drape and strudel contributors
See <https://github.com/tidalcycles/strudel/blob/main/packages/core/euclid.mjs> for authors of this file.
The Bjorklund algorithm implementation is ported from the Haskell Music Theory Haskell module by Rohan Drape -
https://rohandrape.net/?t=hmt
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Pattern, timeCat } from './pattern.mjs';
import bjork from 'bjork';
import { rotate } from './util.mjs';
import { Pattern, timeCat, register, silence } from './pattern.mjs';
import { rotate, flatten, splitAt, zipWith } from './util.mjs';
import Fraction from './fraction.mjs';
const euclid = (pulses, steps, rotation = 0) => {
const b = bjork(steps, pulses);
if (rotation) {
return rotate(b, -rotation);
}
return b;
const left = function (n, x) {
const [ons, offs] = n;
const [xs, ys] = x;
const [_xs, __xs] = splitAt(offs, xs);
return [
[offs, ons - offs],
[zipWith((a, b) => a.concat(b), _xs, ys), __xs],
];
};
const right = function (n, x) {
const [ons, offs] = n;
const [xs, ys] = x;
const [_ys, __ys] = splitAt(ons, ys);
const result = [
[ons, offs - ons],
[zipWith((a, b) => a.concat(b), xs, _ys), __ys],
];
return result;
};
const _bjork = function (n, x) {
const [ons, offs] = n;
return Math.min(ons, offs) <= 1 ? [n, x] : _bjork(...(ons > offs ? left(n, x) : right(n, x)));
};
export const bjork = function (ons, steps) {
const offs = steps - ons;
const x = Array(ons).fill([1]);
const y = Array(offs).fill([0]);
const result = _bjork([ons, offs], [x, y]);
return flatten(result[1][0]).concat(flatten(result[1][1]));
};
/**
* Changes the structure of the pattern to form an euclidean rhythm.
* Euclidian rhythms are rhythms obtained using the greatest common divisor of two numbers.
* They were described in 2004 by Godfried Toussaint, a canadian computer scientist.
* Euclidian rhythms are really useful for computer/algorithmic music because they can accurately
* describe a large number of rhythms used in the most important music world traditions.
* Euclidian rhythms are rhythms obtained using the greatest common
* divisor of two numbers. They were described in 2004 by Godfried
* Toussaint, a canadian computer scientist. Euclidian rhythms are
* really useful for computer/algorithmic music because they can
* describe a large number of rhythms with a couple of numbers.
*
* @memberof Pattern
* @name euclid
* @param {number} pulses the number of onsets / beats
* @param {number} steps the number of steps to fill
* @param {number} rotation (optional) offset in steps
* @returns Pattern
* @example
* // The Cuban tresillo pattern.
* note("c3").euclid(3,8)
*/
/**
* Like `euclid`, but has an additional parameter for 'rotating' the resulting sequence.
* @memberof Pattern
* @name euclidRot
* @param {number} pulses the number of onsets / beats
* @param {number} steps the number of steps to fill
* @param {number} rotation offset in steps
* @returns Pattern
* @example
* // A Samba rhythm necklace from Brazil
* note("c3").euclidRot(3,16,14)
*/
/**
* @example // A thirteenth century Persian rhythm called Khafif-e-ramal.
* note("c3").euclid(2,5)
* @example // The archetypal pattern of the Cumbia from Colombia, as well as a Calypso rhythm from Trinidad.
* note("c3").euclid(3,4)
* @example // Another thirteenth century Persian rhythm by the name of Khafif-e-ramal, as well as a Rumanian folk-dance rhythm.
* note("c3").euclid(3,5,2)
* note("c3").euclidRot(3,5,2)
* @example // A Ruchenitza rhythm used in a Bulgarian folk-dance.
* note("c3").euclid(3,7)
* @example // The Cuban tresillo pattern.
@@ -71,34 +115,71 @@ const euclid = (pulses, steps, rotation = 0) => {
* @example // A common West African bell pattern.
* note("c3").euclid(7,12)
* @example // A Samba rhythm necklace from Brazil.
* note("c3").euclid(7,16,14)
* note("c3").euclidRot(7,16,14)
* @example // A rhythm necklace used in the Central African Republic.
* note("c3").euclid(9,16)
* @example // A rhythm necklace of the Aka Pygmies of Central Africa.
* note("c3").euclid(11,24,14)
* note("c3").euclidRot(11,24,14)
* @example // Another rhythm necklace of the Aka Pygmies of the upper Sangha.
* note("c3").euclid(13,24,5)
* note("c3").euclidRot(13,24,5)
*/
Pattern.prototype.euclid = function (pulses, steps, rotation = 0) {
return this.struct(euclid(pulses, steps, rotation));
const _euclidRot = function (pulses, steps, rotation) {
const b = bjork(pulses, steps);
if (rotation) {
return rotate(b, -rotation);
}
return b;
};
export const euclid = register('euclid', function (pulses, steps, pat) {
return pat.struct(_euclidRot(pulses, steps, 0));
});
export const { euclidrot, euclidRot } = register(['euclidrot', 'euclidRot'], function (pulses, steps, rotation, pat) {
return pat.struct(_euclidRot(pulses, steps, rotation));
});
/**
* Similar to `.euclid`, but each pulse is held until the next pulse, so there will be no gaps.
* Similar to `euclid`, but each pulse is held until the next pulse,
* so there will be no gaps.
* @name euclidLegato
* @memberof Pattern
* @param {number} pulses the number of onsets / beats
* @param {number} steps the number of steps to fill
* @example
* n("g2").decay(.1).sustain(.3).euclidLegato(3,8)
* note("c3").euclidLegato(3,8)
*/
Pattern.prototype.euclidLegato = function (pulses, steps, rotation = 0) {
const bin_pat = euclid(pulses, steps, rotation);
const firstOne = bin_pat.indexOf(1);
const gapless = rotate(bin_pat, firstOne)
const _euclidLegato = function (pulses, steps, rotation, pat) {
if (pulses < 1) {
return silence;
}
const bin_pat = _euclidRot(pulses, steps, rotation);
const gapless = bin_pat
.join('')
.split('1')
.slice(1)
.map((s) => [s.length + 1, true]);
return this.struct(timeCat(...gapless)).late(Fraction(firstOne).div(steps));
return pat.struct(timeCat(...gapless));
};
export default euclid;
export const euclidLegato = register(['euclidLegato'], function (pulses, steps, pat) {
return _euclidLegato(pulses, steps, 0, pat);
});
/**
* Similar to `euclid`, but each pulse is held until the next pulse,
* so there will be no gaps, and has an additional parameter for 'rotating'
* the resulting sequence
* @name euclidLegatoRot
* @memberof Pattern
* @param {number} pulses the number of onsets / beats
* @param {number} steps the number of steps to fill
* @param {number} rotation offset in steps
* @example
* note("c3").euclidLegatoRot(3,5,2)
*/
export const euclidLegatoRot = register(['euclidLegatoRot'], function (pulses, steps, rotation, pat) {
return _euclidLegato(pulses, steps, rotation, pat);
});
+16 -20
View File
@@ -1,19 +1,12 @@
/*
evaluate.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/eval/evaluate.mjs>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/evaluate.mjs>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import * as strudel from '@strudel.cycles/core';
import { isPattern } from './index.mjs';
const { isPattern, Pattern } = strudel;
let scoped = false;
export const evalScope = async (...args) => {
if (scoped) {
console.warn('evalScope was called more than once.');
}
scoped = true;
const results = await Promise.allSettled(args);
const modules = results.filter((result) => result.status === 'fulfilled').map((r) => r.value);
results.forEach((result, i) => {
@@ -21,7 +14,14 @@ export const evalScope = async (...args) => {
console.warn(`evalScope: module with index ${i} could not be loaded:`, result.reason);
}
});
Object.assign(globalThis, ...modules, Pattern.prototype.bootstrap());
// Object.assign(globalThis, ...modules);
// below is a fix for above commented out line
// same error as https://github.com/vitest-dev/vitest/issues/1807 when running this on astro server
modules.forEach((module) => {
Object.entries(module).forEach(([name, value]) => {
globalThis[name] = value;
});
});
};
function safeEval(str, options = {}) {
@@ -37,19 +37,15 @@ function safeEval(str, options = {}) {
}
export const evaluate = async (code, transpiler) => {
if (!scoped) {
await evalScope(); // at least scope Pattern.prototype.boostrap
}
let meta = {};
if (transpiler) {
code = transpiler(code); // transform syntactically correct js code to semantically usable code
// transform syntactically correct js code to semantically usable code
const transpiled = transpiler(code);
code = transpiled.output;
meta = transpiled;
}
// if no transpiler is given, we expect a single instruction (!wrapExpression)
const options = { wrapExpression: !!transpiler };
let evaluated = await safeEval(code, options);
if (!isPattern(evaluated)) {
console.log('evaluated', evaluated);
const message = `got "${typeof evaluated}" instead of pattern`;
throw new Error(message + (typeof evaluated === 'function' ? ', did you forget to call a function?' : '.'));
}
return { mode: 'javascript', pattern: evaluated };
return { mode: 'javascript', pattern: evaluated, meta };
};
-90
View File
@@ -1,90 +0,0 @@
<div style="position: absolute; bottom: 0; right: 0; padding: 4px; width: 100vw; display: flex">
<button id="start" style="font-size: 2em">start</button>
<button id="stop" style="font-size: 2em">stop</button>
<button id="slower" style="font-size: 2em">slower</button>
<button id="faster" style="font-size: 2em">faster</button>
</div>
<textarea
style="font-size: 2em; background: #052b49; color: #fff; height: 100%; width: 100%; outline: none; border: 0"
id="text"
spellcheck="false"
>
Loading...</textarea
>
<script type="module">
document.body.style = 'margin: 0';
import * as strudel from '@strudel.cycles/core';
const { cat, State, TimeSpan, Scheduler, getPlayableNoteValue, getFreq } = strudel;
Object.assign(window, strudel); // add strudel to eval scope
const ctx = new AudioContext();
const scheduler = new Scheduler({
// audioContext: getAudioContext(),
interval: 0.1,
onTrigger: (hap, time, duration) => {
const freq = getFrequency(hap);
const osc = ctx.createOscillator();
const gain = 0.2;
osc.frequency.value = freq;
osc.type = 'triangle';
const onset = ctx.currentTime + time;
const offset = onset + duration;
const attack = 0.05;
const release = 0.05;
osc.start(onset);
osc.stop(offset + release);
const g = ctx.createGain();
g.gain.setValueAtTime(gain, onset);
g.gain.linearRampToValueAtTime(gain, onset + attack);
g.gain.setValueAtTime(gain, offset - release);
g.gain.linearRampToValueAtTime(0, offset);
osc.connect(g);
g.connect(ctx.destination);
},
});
let initialCode = `stack('c4','e4',cat('g4','a4','b4','a4'))
.add(cat(0,1,2,3,4,3,2,1).slow(8))
.fast(2)
.cps(tri.range(1,8).slow(32))`;
try {
const base64 = decodeURIComponent(window.location.href.split('#')[1]);
initialCode = atob(base64);
} catch (err) {
console.warn('failed to decode', err);
}
const input = document.getElementById('text');
input.value = initialCode;
const evaluate = () => {
try {
const pattern = eval(input.value);
scheduler.setPattern(pattern);
window.location.hash = '#' + encodeURIComponent(btoa(input.value)); // update url hash
} catch (err) {
console.warn(err);
}
};
evaluate();
input.addEventListener('input', () => evaluate());
document.getElementById('start').addEventListener('click', async () => {
await ctx.resume();
scheduler.start();
});
document.getElementById('stop').addEventListener('click', () => scheduler.stop());
document.getElementById('slower').addEventListener('click', () => scheduler.setCps(scheduler.cps - 0.1));
document.getElementById('faster').addEventListener('click', () => scheduler.setCps(scheduler.cps + 0.1));
</script>
<!--
sequence(1,2).mul(55/2) // frequencies
.mul(slowcat(1,2))
.mul(slowcat(1,3/2,4/3,5/3).slow(8))
.fast(3)
.freq()
.velocity(.5)
.s('sawtooth')
.cutoff(800)
.out()
-->
-44
View File
@@ -1,44 +0,0 @@
<input
type="text"
id="text"
value="seq('c3','eb3','g3').note().s('sawtooth').out()"
style="width: 100%; font-size: 2em; outline: none; margin-bottom: 10px"
spellcheck="false"
/>
<button id="start">play</button>
<div id="output"></div>
<script type="module">
const strudel = await import('https://cdn.skypack.dev/@strudel.cycles/core@latest');
const controls = await import('https://cdn.skypack.dev/@strudel.cycles/core@latest/controls.mjs');
const { getAudioContext, Scheduler } = await import('https://cdn.skypack.dev/@strudel.cycles/webaudio@latest');
let scheduler;
const audioContext = getAudioContext();
const latency = 0.2;
Object.assign(window, strudel);
Object.assign(window, controls.default);
scheduler = new Scheduler({
audioContext,
interval: 0.1,
latency,
onEvent: (hap) => {
if (!hap.context.onTrigger) {
console.warn('no output chosen. use one of .out() .webdirt() .osc()');
}
},
});
let started;
document.getElementById('start').addEventListener('click', async () => {
const code = document.getElementById('text').value;
const pattern = eval(code);
const events = pattern._firstCycleValues;
console.log(code, '->', events);
scheduler.setPattern(pattern);
if (!started) {
scheduler.start();
started = true;
}
});
</script>
@@ -1 +0,0 @@
!dist
@@ -1,10 +0,0 @@
# vite-vanilla-repl
This folder demonstrates how to set up a strudel repl using vite and vanilla JS. Run it using:
```sh
npm i
npm run dev
```
or view it [live on githack](https://rawcdn.githack.com/tidalcycles/strudel/5fb36acb046ead7cd6ad3cd10f532e7f585f536a/packages/core/examples/vite-vanilla-repl/dist/index.html)
@@ -1 +0,0 @@
import{b as s,h as i,m,a as n,c as p,p as t}from"./index.4cbc0a10.js";export{s as SyntaxError,i as h,m as mini,n as minify,p as parse,t as patternifyAST};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
import{g as s,f as d,i as t,n as r,l as u,j as o,d as f,k as p,r as g,s as i,w as l,e as m}from"./index.4cbc0a10.js";export{s as getAudioContext,d as getCachedBuffer,t as getLoadedBuffer,r as getLoadedSamples,u as loadBuffer,o as loadGithubSamples,f as panic,p as resetLoadedSamples,g as reverseBuffer,i as samples,l as webaudioOutput,m as webaudioOutputTrigger};
@@ -1,36 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite Vanilla Strudel REPL</title>
<script type="module" crossorigin src="/tidalcycles/strudel/use-acorn/packages/core/examples/vite-vanilla-repl/dist/assets/index.4cbc0a10.js"></script>
</head>
<body style="margin: 0; background: #222">
<div style="display: grid; height: 100vh">
<textarea
id="text"
style="font-size: 2em; border: 0; color: white; background: transparent; outline: none; padding: 20px"
spellcheck="false"
></textarea>
</div>
<button
id="start"
style="
position: absolute;
border-radius: 10px;
top: 20px;
right: 20px;
padding: 20px;
border: 2px solid white;
background: transparent;
color: white;
cursor: pointer;
"
>
evaluate
</button>
<div id="output"></div>
</body>
</html>
@@ -1,29 +0,0 @@
import { controls, repl, evalScope, setStringParser } from '@strudel.cycles/core';
import { mini } from '@strudel.cycles/mini';
import { getAudioContext, webaudioOutput } from '@strudel.cycles/webaudio';
// import { transpiler } from '@strudel.cycles/transpiler';
import tune from './tune.mjs';
const ctx = getAudioContext();
const input = document.getElementById('text');
input.innerHTML = tune;
evalScope(
controls,
import('@strudel.cycles/core'),
import('@strudel.cycles/mini'),
import('@strudel.cycles/webaudio'),
import('@strudel.cycles/tonal'),
);
setStringParser(mini)
const { evaluate } = repl({
defaultOutput: webaudioOutput,
getTime: () => ctx.currentTime,
// transpiler,
});
document.getElementById('start').addEventListener('click', () => {
ctx.resume();
evaluate(input.value);
});
-885
View File
@@ -1,885 +0,0 @@
{
"name": "vite-vanilla-repl",
"version": "0.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "vite-vanilla-repl",
"version": "0.0.0",
"devDependencies": {
"vite": "^3.2.0"
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.13.tgz",
"integrity": "sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.13.tgz",
"integrity": "sha512-+BoyIm4I8uJmH/QDIH0fu7MG0AEx9OXEDXnqptXCwKOlOqZiS4iraH1Nr7/ObLMokW3sOCeBNyD68ATcV9b9Ag==",
"cpu": [
"loong64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.13.tgz",
"integrity": "sha512-Cu3SC84oyzzhrK/YyN4iEVy2jZu5t2fz66HEOShHURcjSkOSAVL8C/gfUT+lDJxkVHpg8GZ10DD0rMHRPqMFaQ==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/android-arm": "0.15.13",
"@esbuild/linux-loong64": "0.15.13",
"esbuild-android-64": "0.15.13",
"esbuild-android-arm64": "0.15.13",
"esbuild-darwin-64": "0.15.13",
"esbuild-darwin-arm64": "0.15.13",
"esbuild-freebsd-64": "0.15.13",
"esbuild-freebsd-arm64": "0.15.13",
"esbuild-linux-32": "0.15.13",
"esbuild-linux-64": "0.15.13",
"esbuild-linux-arm": "0.15.13",
"esbuild-linux-arm64": "0.15.13",
"esbuild-linux-mips64le": "0.15.13",
"esbuild-linux-ppc64le": "0.15.13",
"esbuild-linux-riscv64": "0.15.13",
"esbuild-linux-s390x": "0.15.13",
"esbuild-netbsd-64": "0.15.13",
"esbuild-openbsd-64": "0.15.13",
"esbuild-sunos-64": "0.15.13",
"esbuild-windows-32": "0.15.13",
"esbuild-windows-64": "0.15.13",
"esbuild-windows-arm64": "0.15.13"
}
},
"node_modules/esbuild-android-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.13.tgz",
"integrity": "sha512-yRorukXBlokwTip+Sy4MYskLhJsO0Kn0/Fj43s1krVblfwP+hMD37a4Wmg139GEsMLl+vh8WXp2mq/cTA9J97g==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-android-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.13.tgz",
"integrity": "sha512-TKzyymLD6PiVeyYa4c5wdPw87BeAiTXNtK6amWUcXZxkV51gOk5u5qzmDaYSwiWeecSNHamFsaFjLoi32QR5/w==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-darwin-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.13.tgz",
"integrity": "sha512-WAx7c2DaOS6CrRcoYCgXgkXDliLnFv3pQLV6GeW1YcGEZq2Gnl8s9Pg7ahValZkpOa0iE/ojRVQ87sbUhF1Cbg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-darwin-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.13.tgz",
"integrity": "sha512-U6jFsPfSSxC3V1CLiQqwvDuj3GGrtQNB3P3nNC3+q99EKf94UGpsG9l4CQ83zBs1NHrk1rtCSYT0+KfK5LsD8A==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-freebsd-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.13.tgz",
"integrity": "sha512-whItJgDiOXaDG/idy75qqevIpZjnReZkMGCgQaBWZuKHoElDJC1rh7MpoUgupMcdfOd+PgdEwNQW9DAE6i8wyA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-freebsd-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.13.tgz",
"integrity": "sha512-6pCSWt8mLUbPtygv7cufV0sZLeylaMwS5Fznj6Rsx9G2AJJsAjQ9ifA+0rQEIg7DwJmi9it+WjzNTEAzzdoM3Q==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-32": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.13.tgz",
"integrity": "sha512-VbZdWOEdrJiYApm2kkxoTOgsoCO1krBZ3quHdYk3g3ivWaMwNIVPIfEE0f0XQQ0u5pJtBsnk2/7OPiCFIPOe/w==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.13.tgz",
"integrity": "sha512-rXmnArVNio6yANSqDQlIO4WiP+Cv7+9EuAHNnag7rByAqFVuRusLbGi2697A5dFPNXoO//IiogVwi3AdcfPC6A==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-arm": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.13.tgz",
"integrity": "sha512-Ac6LpfmJO8WhCMQmO253xX2IU2B3wPDbl4IvR0hnqcPrdfCaUa2j/lLMGTjmQ4W5JsJIdHEdW12dG8lFS0MbxQ==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.13.tgz",
"integrity": "sha512-alEMGU4Z+d17U7KQQw2IV8tQycO6T+rOrgW8OS22Ua25x6kHxoG6Ngry6Aq6uranC+pNWNMB6aHFPh7aTQdORQ==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-mips64le": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.13.tgz",
"integrity": "sha512-47PgmyYEu+yN5rD/MbwS6DxP2FSGPo4Uxg5LwIdxTiyGC2XKwHhHyW7YYEDlSuXLQXEdTO7mYe8zQ74czP7W8A==",
"cpu": [
"mips64el"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-ppc64le": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.13.tgz",
"integrity": "sha512-z6n28h2+PC1Ayle9DjKoBRcx/4cxHoOa2e689e2aDJSaKug3jXcQw7mM+GLg+9ydYoNzj8QxNL8ihOv/OnezhA==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-riscv64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.13.tgz",
"integrity": "sha512-+Lu4zuuXuQhgLUGyZloWCqTslcCAjMZH1k3Xc9MSEJEpEFdpsSU0sRDXAnk18FKOfEjhu4YMGaykx9xjtpA6ow==",
"cpu": [
"riscv64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-s390x": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.13.tgz",
"integrity": "sha512-BMeXRljruf7J0TMxD5CIXS65y7puiZkAh+s4XFV9qy16SxOuMhxhVIXYLnbdfLrsYGFzx7U9mcdpFWkkvy/Uag==",
"cpu": [
"s390x"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-netbsd-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.13.tgz",
"integrity": "sha512-EHj9QZOTel581JPj7UO3xYbltFTYnHy+SIqJVq6yd3KkCrsHRbapiPb0Lx3EOOtybBEE9EyqbmfW1NlSDsSzvQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-openbsd-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.13.tgz",
"integrity": "sha512-nkuDlIjF/sfUhfx8SKq0+U+Fgx5K9JcPq1mUodnxI0x4kBdCv46rOGWbuJ6eof2n3wdoCLccOoJAbg9ba/bT2w==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-sunos-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.13.tgz",
"integrity": "sha512-jVeu2GfxZQ++6lRdY43CS0Tm/r4WuQQ0Pdsrxbw+aOrHQPHV0+LNOLnvbN28M7BSUGnJnHkHm2HozGgNGyeIRw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-32": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.13.tgz",
"integrity": "sha512-XoF2iBf0wnqo16SDq+aDGi/+QbaLFpkiRarPVssMh9KYbFNCqPLlGAWwDvxEVz+ywX6Si37J2AKm+AXq1kC0JA==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.13.tgz",
"integrity": "sha512-Et6htEfGycjDrtqb2ng6nT+baesZPYQIW+HUEHK4D1ncggNrDNk3yoboYQ5KtiVrw/JaDMNttz8rrPubV/fvPQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.13.tgz",
"integrity": "sha512-3bv7tqntThQC9SWLRouMDmZnlOukBhOCTlkzNqzGCmrkCJI7io5LLjwJBOVY6kOUlIvdxbooNZwjtBvj+7uuVg==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"dependencies": {
"function-bind": "^1.1.1"
},
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/is-core-module": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
"integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
"dev": true,
"dependencies": {
"has": "^1.0.3"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"dev": true,
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
"dev": true
},
"node_modules/postcss": {
"version": "8.4.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
"integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
}
],
"dependencies": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/resolve": {
"version": "1.22.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
"dev": true,
"dependencies": {
"is-core-module": "^2.9.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
"bin": {
"resolve": "bin/resolve"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/rollup": {
"version": "2.79.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
"integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
},
"engines": {
"node": ">=10.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
"dev": true,
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/vite": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.2.tgz",
"integrity": "sha512-pLrhatFFOWO9kS19bQ658CnRYzv0WLbsPih6R+iFeEEhDOuYgYCX2rztUViMz/uy/V8cLCJvLFeiOK7RJEzHcw==",
"dev": true,
"dependencies": {
"esbuild": "^0.15.9",
"postcss": "^8.4.18",
"resolve": "^1.22.1",
"rollup": "^2.79.1"
},
"bin": {
"vite": "bin/vite.js"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
},
"peerDependencies": {
"less": "*",
"sass": "*",
"stylus": "*",
"sugarss": "*",
"terser": "^5.4.0"
},
"peerDependenciesMeta": {
"less": {
"optional": true
},
"sass": {
"optional": true
},
"stylus": {
"optional": true
},
"sugarss": {
"optional": true
},
"terser": {
"optional": true
}
}
}
},
"dependencies": {
"@esbuild/android-arm": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.13.tgz",
"integrity": "sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw==",
"dev": true,
"optional": true
},
"@esbuild/linux-loong64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.13.tgz",
"integrity": "sha512-+BoyIm4I8uJmH/QDIH0fu7MG0AEx9OXEDXnqptXCwKOlOqZiS4iraH1Nr7/ObLMokW3sOCeBNyD68ATcV9b9Ag==",
"dev": true,
"optional": true
},
"esbuild": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.13.tgz",
"integrity": "sha512-Cu3SC84oyzzhrK/YyN4iEVy2jZu5t2fz66HEOShHURcjSkOSAVL8C/gfUT+lDJxkVHpg8GZ10DD0rMHRPqMFaQ==",
"dev": true,
"requires": {
"@esbuild/android-arm": "0.15.13",
"@esbuild/linux-loong64": "0.15.13",
"esbuild-android-64": "0.15.13",
"esbuild-android-arm64": "0.15.13",
"esbuild-darwin-64": "0.15.13",
"esbuild-darwin-arm64": "0.15.13",
"esbuild-freebsd-64": "0.15.13",
"esbuild-freebsd-arm64": "0.15.13",
"esbuild-linux-32": "0.15.13",
"esbuild-linux-64": "0.15.13",
"esbuild-linux-arm": "0.15.13",
"esbuild-linux-arm64": "0.15.13",
"esbuild-linux-mips64le": "0.15.13",
"esbuild-linux-ppc64le": "0.15.13",
"esbuild-linux-riscv64": "0.15.13",
"esbuild-linux-s390x": "0.15.13",
"esbuild-netbsd-64": "0.15.13",
"esbuild-openbsd-64": "0.15.13",
"esbuild-sunos-64": "0.15.13",
"esbuild-windows-32": "0.15.13",
"esbuild-windows-64": "0.15.13",
"esbuild-windows-arm64": "0.15.13"
}
},
"esbuild-android-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.13.tgz",
"integrity": "sha512-yRorukXBlokwTip+Sy4MYskLhJsO0Kn0/Fj43s1krVblfwP+hMD37a4Wmg139GEsMLl+vh8WXp2mq/cTA9J97g==",
"dev": true,
"optional": true
},
"esbuild-android-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.13.tgz",
"integrity": "sha512-TKzyymLD6PiVeyYa4c5wdPw87BeAiTXNtK6amWUcXZxkV51gOk5u5qzmDaYSwiWeecSNHamFsaFjLoi32QR5/w==",
"dev": true,
"optional": true
},
"esbuild-darwin-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.13.tgz",
"integrity": "sha512-WAx7c2DaOS6CrRcoYCgXgkXDliLnFv3pQLV6GeW1YcGEZq2Gnl8s9Pg7ahValZkpOa0iE/ojRVQ87sbUhF1Cbg==",
"dev": true,
"optional": true
},
"esbuild-darwin-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.13.tgz",
"integrity": "sha512-U6jFsPfSSxC3V1CLiQqwvDuj3GGrtQNB3P3nNC3+q99EKf94UGpsG9l4CQ83zBs1NHrk1rtCSYT0+KfK5LsD8A==",
"dev": true,
"optional": true
},
"esbuild-freebsd-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.13.tgz",
"integrity": "sha512-whItJgDiOXaDG/idy75qqevIpZjnReZkMGCgQaBWZuKHoElDJC1rh7MpoUgupMcdfOd+PgdEwNQW9DAE6i8wyA==",
"dev": true,
"optional": true
},
"esbuild-freebsd-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.13.tgz",
"integrity": "sha512-6pCSWt8mLUbPtygv7cufV0sZLeylaMwS5Fznj6Rsx9G2AJJsAjQ9ifA+0rQEIg7DwJmi9it+WjzNTEAzzdoM3Q==",
"dev": true,
"optional": true
},
"esbuild-linux-32": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.13.tgz",
"integrity": "sha512-VbZdWOEdrJiYApm2kkxoTOgsoCO1krBZ3quHdYk3g3ivWaMwNIVPIfEE0f0XQQ0u5pJtBsnk2/7OPiCFIPOe/w==",
"dev": true,
"optional": true
},
"esbuild-linux-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.13.tgz",
"integrity": "sha512-rXmnArVNio6yANSqDQlIO4WiP+Cv7+9EuAHNnag7rByAqFVuRusLbGi2697A5dFPNXoO//IiogVwi3AdcfPC6A==",
"dev": true,
"optional": true
},
"esbuild-linux-arm": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.13.tgz",
"integrity": "sha512-Ac6LpfmJO8WhCMQmO253xX2IU2B3wPDbl4IvR0hnqcPrdfCaUa2j/lLMGTjmQ4W5JsJIdHEdW12dG8lFS0MbxQ==",
"dev": true,
"optional": true
},
"esbuild-linux-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.13.tgz",
"integrity": "sha512-alEMGU4Z+d17U7KQQw2IV8tQycO6T+rOrgW8OS22Ua25x6kHxoG6Ngry6Aq6uranC+pNWNMB6aHFPh7aTQdORQ==",
"dev": true,
"optional": true
},
"esbuild-linux-mips64le": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.13.tgz",
"integrity": "sha512-47PgmyYEu+yN5rD/MbwS6DxP2FSGPo4Uxg5LwIdxTiyGC2XKwHhHyW7YYEDlSuXLQXEdTO7mYe8zQ74czP7W8A==",
"dev": true,
"optional": true
},
"esbuild-linux-ppc64le": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.13.tgz",
"integrity": "sha512-z6n28h2+PC1Ayle9DjKoBRcx/4cxHoOa2e689e2aDJSaKug3jXcQw7mM+GLg+9ydYoNzj8QxNL8ihOv/OnezhA==",
"dev": true,
"optional": true
},
"esbuild-linux-riscv64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.13.tgz",
"integrity": "sha512-+Lu4zuuXuQhgLUGyZloWCqTslcCAjMZH1k3Xc9MSEJEpEFdpsSU0sRDXAnk18FKOfEjhu4YMGaykx9xjtpA6ow==",
"dev": true,
"optional": true
},
"esbuild-linux-s390x": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.13.tgz",
"integrity": "sha512-BMeXRljruf7J0TMxD5CIXS65y7puiZkAh+s4XFV9qy16SxOuMhxhVIXYLnbdfLrsYGFzx7U9mcdpFWkkvy/Uag==",
"dev": true,
"optional": true
},
"esbuild-netbsd-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.13.tgz",
"integrity": "sha512-EHj9QZOTel581JPj7UO3xYbltFTYnHy+SIqJVq6yd3KkCrsHRbapiPb0Lx3EOOtybBEE9EyqbmfW1NlSDsSzvQ==",
"dev": true,
"optional": true
},
"esbuild-openbsd-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.13.tgz",
"integrity": "sha512-nkuDlIjF/sfUhfx8SKq0+U+Fgx5K9JcPq1mUodnxI0x4kBdCv46rOGWbuJ6eof2n3wdoCLccOoJAbg9ba/bT2w==",
"dev": true,
"optional": true
},
"esbuild-sunos-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.13.tgz",
"integrity": "sha512-jVeu2GfxZQ++6lRdY43CS0Tm/r4WuQQ0Pdsrxbw+aOrHQPHV0+LNOLnvbN28M7BSUGnJnHkHm2HozGgNGyeIRw==",
"dev": true,
"optional": true
},
"esbuild-windows-32": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.13.tgz",
"integrity": "sha512-XoF2iBf0wnqo16SDq+aDGi/+QbaLFpkiRarPVssMh9KYbFNCqPLlGAWwDvxEVz+ywX6Si37J2AKm+AXq1kC0JA==",
"dev": true,
"optional": true
},
"esbuild-windows-64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.13.tgz",
"integrity": "sha512-Et6htEfGycjDrtqb2ng6nT+baesZPYQIW+HUEHK4D1ncggNrDNk3yoboYQ5KtiVrw/JaDMNttz8rrPubV/fvPQ==",
"dev": true,
"optional": true
},
"esbuild-windows-arm64": {
"version": "0.15.13",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.13.tgz",
"integrity": "sha512-3bv7tqntThQC9SWLRouMDmZnlOukBhOCTlkzNqzGCmrkCJI7io5LLjwJBOVY6kOUlIvdxbooNZwjtBvj+7uuVg==",
"dev": true,
"optional": true
},
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"optional": true
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": {
"function-bind": "^1.1.1"
}
},
"is-core-module": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
"integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
"dev": true,
"requires": {
"has": "^1.0.3"
}
},
"nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"dev": true
},
"path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
"dev": true
},
"postcss": {
"version": "8.4.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
"integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==",
"dev": true,
"requires": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
}
},
"resolve": {
"version": "1.22.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
"dev": true,
"requires": {
"is-core-module": "^2.9.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
}
},
"rollup": {
"version": "2.79.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
"integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
"dev": true,
"requires": {
"fsevents": "~2.3.2"
}
},
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"dev": true
},
"supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
"dev": true
},
"vite": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.2.tgz",
"integrity": "sha512-pLrhatFFOWO9kS19bQ658CnRYzv0WLbsPih6R+iFeEEhDOuYgYCX2rztUViMz/uy/V8cLCJvLFeiOK7RJEzHcw==",
"dev": true,
"requires": {
"esbuild": "^0.15.9",
"fsevents": "~2.3.2",
"postcss": "^8.4.18",
"resolve": "^1.22.1",
"rollup": "^2.79.1"
}
}
}
}
+3 -2
View File
@@ -55,7 +55,8 @@ Fraction.prototype.min = function (other) {
return this.lt(other) ? this : other;
};
Fraction.prototype.show = function () {
Fraction.prototype.show = function (/* excludeWhole = false */) {
// return this.toFraction(excludeWhole);
return this.s * this.n + '/' + this.d;
};
@@ -73,7 +74,7 @@ const fraction = (n) => {
-> those farey sequences turn out to make pattern querying ~20 times slower! always use strings!
-> still, some optimizations could be done: .mul .div .add .sub calls still use numbers
*/
n = String(n);
// n = String(n); // this is actually faster but imprecise...
}
return Fraction(n);
};
-12
View File
@@ -1,12 +0,0 @@
/*
gist.js - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/gist.js>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// this is a shortcut to eval code from a gist
// why? to be able to shorten strudel code + e.g. be able to change instruments after links have been generated
export default (route, cache = true) =>
fetch(`https://gist.githubusercontent.com/${route}?cachebust=${cache ? '' : Date.now()}`)
.then((res) => res.text())
.then((code) => eval(code));
+51 -7
View File
@@ -32,7 +32,11 @@ export class Hap {
}
get duration() {
return this.whole.end.sub(this.whole.begin);
return this.whole.end.sub(this.whole.begin).mul(typeof this.value?.clip === 'number' ? this.value?.clip : 1);
}
get endClipped() {
return this.whole.begin.add(this.duration);
}
wholeOrPart() {
@@ -79,15 +83,42 @@ export class Hap {
);
}
show() {
return (
'(' + (this.whole == undefined ? '~' : this.whole.show()) + ', ' + this.part.show() + ', ' + this.value + ')'
);
show(compact = false) {
const value =
typeof this.value === 'object'
? compact
? JSON.stringify(this.value).slice(1, -1).replaceAll('"', '').replaceAll(',', ' ')
: JSON.stringify(this.value)
: this.value;
var spans = '';
if (this.whole == undefined) {
spans = '~' + this.part.show;
} else {
var is_whole = this.whole.begin.equals(this.part.begin) && this.whole.end.equals(this.part.end);
if (!this.whole.begin.equals(this.part.begin)) {
spans = this.whole.begin.show() + ' ⇜ ';
}
if (!is_whole) {
spans += '(';
}
spans += this.part.show();
if (!is_whole) {
spans += ')';
}
if (!this.whole.end.equals(this.part.end)) {
spans += ' ⇝ ' + this.whole.end.show();
}
}
return '[ ' + spans + ' | ' + value + ' ]';
}
showWhole() {
showWhole(compact = false) {
return `${this.whole == undefined ? '~' : this.whole.show()}: ${
typeof this.value === 'object' ? JSON.stringify(this.value) : this.value
typeof this.value === 'object'
? compact
? JSON.stringify(this.value).slice(1, -1).replaceAll('"', '').replaceAll(',', ' ')
: JSON.stringify(this.value)
: this.value
}`;
}
@@ -99,6 +130,19 @@ export class Hap {
setContext(context) {
return new Hap(this.whole, this.part, this.value, context);
}
ensureObjectValue() {
/* if (isNote(hap.value)) {
// supports primitive hap values that look like notes
hap.value = { note: hap.value };
} */
if (typeof this.value !== 'object') {
throw new Error(
`expected hap.value to be an object, but got "${this.value}". Hint: append .note() or .s() to the end`,
'error',
);
}
}
}
export default Hap;
+12 -7
View File
@@ -7,6 +7,7 @@ This program is free software: you can redistribute it and/or modify it under th
import controls from './controls.mjs';
export * from './euclid.mjs';
import Fraction from './fraction.mjs';
import { logger } from './logger.mjs';
export { Fraction, controls };
export * from './hap.mjs';
export * from './pattern.mjs';
@@ -17,20 +18,24 @@ export * from './util.mjs';
export * from './speak.mjs';
export * from './evaluate.mjs';
export * from './repl.mjs';
export * from './cyclist.mjs';
export * from './logger.mjs';
export * from './time.mjs';
export * from './draw.mjs';
export * from './animate.mjs';
export * from './pianoroll.mjs';
export * from './spiral.mjs';
export * from './ui.mjs';
export { default as drawLine } from './drawLine.mjs';
export { default as gist } from './gist.js';
// below won't work with runtime.mjs (json import fails)
/* import * as p from './package.json';
export const version = p.version; */
console.log(
'%c // 🌀 @strudel.cycles/core loaded 🌀', // keep "//" for runnable snapshot source..
'background-color: black;color:white;padding:4px;border-radius:15px',
);
logger('🌀 @strudel/core loaded 🌀');
if (globalThis._strudelLoaded) {
console.warn(
`@strudel.cycles/core was loaded more than once...
`@strudel/core was loaded more than once...
This might happen when you have multiple versions of strudel installed.
Please check with "npm ls @strudel.cycles/core".`,
Please check with "npm ls @strudel/core".`,
);
}
globalThis._strudelLoaded = true;
+18
View File
@@ -0,0 +1,18 @@
export const logKey = 'strudel.log';
export function logger(message, type, data = {}) {
console.log(`%c${message}`, 'background-color: black;color:white;border-radius:15px');
if (typeof document !== 'undefined' && typeof CustomEvent !== 'undefined') {
document.dispatchEvent(
new CustomEvent(logKey, {
detail: {
message,
type,
data,
},
}),
);
}
}
logger.key = logKey;
-1639
View File
File diff suppressed because it is too large Load Diff
+16 -7
View File
@@ -1,11 +1,17 @@
{
"name": "@strudel.cycles/core",
"version": "0.3.2",
"name": "@strudel/core",
"version": "1.0.0",
"description": "Port of Tidal Cycles to JavaScript",
"main": "index.mjs",
"type": "module",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs"
},
"scripts": {
"test": "vitest run"
"test": "vitest run",
"build": "vite build",
"prepublishOnly": "pnpm build"
},
"repository": {
"type": "git",
@@ -23,10 +29,13 @@
"bugs": {
"url": "https://github.com/tidalcycles/strudel/issues"
},
"homepage": "https://strudel.tidalcycles.org",
"homepage": "https://strudel.cc",
"dependencies": {
"bjork": "^0.0.1",
"fraction.js": "^4.2.0"
"fraction.js": "^4.3.7"
},
"gitHead": "0e26d4e741500f5bae35b023608f062a794905c2"
"gitHead": "0e26d4e741500f5bae35b023608f062a794905c2",
"devDependencies": {
"vite": "^5.0.10",
"vitest": "^1.1.0"
}
}
+1805 -1260
View File
File diff suppressed because it is too large Load Diff
+287
View File
@@ -0,0 +1,287 @@
/*
pianoroll.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/pianoroll.mjs>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Pattern, noteToMidi, getDrawContext, freqToMidi, isNote } from './index.mjs';
const scale = (normalized, min, max) => normalized * (max - min) + min;
const getValue = (e) => {
let { value } = e;
if (typeof e.value !== 'object') {
value = { value };
}
let { note, n, freq, s } = value;
if (freq) {
return freqToMidi(freq);
}
note = note ?? n;
if (typeof note === 'string') {
return noteToMidi(note);
}
if (typeof note === 'number') {
return note;
}
if (s) {
return '_' + s;
}
return value;
};
Pattern.prototype.pianoroll = function (options = {}) {
let { cycles = 4, playhead = 0.5, overscan = 1, hideNegative = false } = options;
let from = -cycles * playhead;
let to = cycles * (1 - playhead);
this.draw(
(ctx, haps, t) => {
const inFrame = (event) =>
(!hideNegative || event.whole.begin >= 0) && event.whole.begin <= t + to && event.endClipped >= t + from;
pianoroll({
...options,
time: t,
ctx,
haps: haps.filter(inFrame),
});
},
{
from: from - overscan,
to: to + overscan,
},
);
return this;
};
// this function allows drawing a pianoroll without ties to Pattern.prototype
// it will probably replace the above in the future
/**
* Displays a midi-style piano roll
*
* @name pianoroll
* @param {Object} options Object containing all the optional following parameters as key value pairs:
* @param {integer} cycles number of cycles to be displayed at the same time - defaults to 4
* @param {number} playhead location of the active notes on the time axis - 0 to 1, defaults to 0.5
* @param {boolean} vertical displays the roll vertically - 0 by default
* @param {boolean} labels displays labels on individual notes (see the label function) - 0 by default
* @param {boolean} flipTime reverse the direction of the roll - 0 by default
* @param {boolean} flipValues reverse the relative location of notes on the value axis - 0 by default
* @param {number} overscan lookup X cycles outside of the cycles window to display notes in advance - 1 by default
* @param {boolean} hideNegative hide notes with negative time (before starting playing the pattern) - 0 by default
* @param {boolean} smear notes leave a solid trace - 0 by default
* @param {boolean} fold notes takes the full value axis width - 0 by default
* @param {string} active hexadecimal or CSS color of the active notes - defaults to #FFCA28
* @param {string} inactive hexadecimal or CSS color of the inactive notes - defaults to #7491D2
* @param {string} background hexadecimal or CSS color of the background - defaults to transparent
* @param {string} playheadColor hexadecimal or CSS color of the line representing the play head - defaults to white
* @param {boolean} fill notes are filled with color (otherwise only the label is displayed) - 0 by default
* @param {boolean} fillActive active notes are filled with color - 0 by default
* @param {boolean} stroke notes are shown with colored borders - 0 by default
* @param {boolean} strokeActive active notes are shown with colored borders - 0 by default
* @param {boolean} hideInactive only active notes are shown - 0 by default
* @param {boolean} colorizeInactive use note color for inactive notes - 1 by default
* @param {string} fontFamily define the font used by notes labels - defaults to 'monospace'
* @param {integer} minMidi minimum note value to display on the value axis - defaults to 10
* @param {integer} maxMidi maximum note value to display on the value axis - defaults to 90
* @param {boolean} autorange automatically calculate the minMidi and maxMidi parameters - 0 by default
*
* @example
* note("C2 A2 G2").euclid(5,8).s('piano').clip(1).color('salmon').pianoroll({vertical:1, labels:1})
*/
export function pianoroll({
time,
haps,
cycles = 4,
playhead = 0.5,
flipTime = 0,
flipValues = 0,
hideNegative = false,
// inactive = '#C9E597',
// inactive = '#FFCA28',
inactive = '#7491D2',
active = '#FFCA28',
// background = '#2A3236',
background = 'transparent',
smear = 0,
playheadColor = 'white',
minMidi = 10,
maxMidi = 90,
autorange = 0,
timeframe: timeframeProp,
fold = 0,
vertical = 0,
labels = false,
fill = 1,
fillActive = false,
strokeActive = true,
stroke,
hideInactive = 0,
colorizeInactive = 1,
fontFamily,
ctx,
} = {}) {
const w = ctx.canvas.width;
const h = ctx.canvas.height;
let from = -cycles * playhead;
let to = cycles * (1 - playhead);
if (timeframeProp) {
console.warn('timeframe is deprecated! use from/to instead');
from = 0;
to = timeframeProp;
}
const timeAxis = vertical ? h : w;
const valueAxis = vertical ? w : h;
let timeRange = vertical ? [timeAxis, 0] : [0, timeAxis]; // pixel range for time
const timeExtent = to - from; // number of seconds that fit inside the canvas frame
const valueRange = vertical ? [0, valueAxis] : [valueAxis, 0]; // pixel range for values
let valueExtent = maxMidi - minMidi + 1; // number of "slots" for values, overwritten if autorange true
let barThickness = valueAxis / valueExtent; // pixels per value, overwritten if autorange true
let foldValues = [];
flipTime && timeRange.reverse();
flipValues && valueRange.reverse();
// onQuery
const { min, max, values } = haps.reduce(
({ min, max, values }, e) => {
const v = getValue(e);
return {
min: v < min ? v : min,
max: v > max ? v : max,
values: values.includes(v) ? values : [...values, v],
};
},
{ min: Infinity, max: -Infinity, values: [] },
);
if (autorange) {
minMidi = min;
maxMidi = max;
valueExtent = maxMidi - minMidi + 1;
}
// foldValues = values.sort((a, b) => a - b);
foldValues = values.sort((a, b) => String(a).localeCompare(String(b)));
barThickness = fold ? valueAxis / foldValues.length : valueAxis / valueExtent;
ctx.fillStyle = background;
ctx.globalAlpha = 1; // reset!
if (!smear) {
ctx.clearRect(0, 0, w, h);
ctx.fillRect(0, 0, w, h);
}
haps.forEach((event) => {
const isActive = event.whole.begin <= time && event.endClipped > time;
let strokeCurrent = stroke ?? (strokeActive && isActive);
let fillCurrent = (!isActive && fill) || (isActive && fillActive);
if (hideInactive && !isActive) {
return;
}
let color = event.value?.color || event.context?.color;
active = color || active;
inactive = colorizeInactive ? color || inactive : inactive;
color = isActive ? active : inactive;
ctx.fillStyle = fillCurrent ? color : 'transparent';
ctx.strokeStyle = color;
ctx.globalAlpha = event.context.velocity ?? event.value?.gain ?? 1;
const timeProgress = (event.whole.begin - (flipTime ? to : from)) / timeExtent;
const timePx = scale(timeProgress, ...timeRange);
let durationPx = scale(event.duration / timeExtent, 0, timeAxis);
const value = getValue(event);
const valueProgress = fold
? foldValues.indexOf(value) / foldValues.length
: (Number(value) - minMidi) / valueExtent;
const valuePx = scale(valueProgress, ...valueRange);
let margin = 0;
const offset = scale(time / timeExtent, ...timeRange);
let coords;
if (vertical) {
coords = [
valuePx + 1 - (flipValues ? barThickness : 0), // x
timeAxis - offset + timePx + margin + 1 - (flipTime ? 0 : durationPx), // y
barThickness - 2, // width
durationPx - 2, // height
];
} else {
coords = [
timePx - offset + margin + 1 - (flipTime ? durationPx : 0), // x
valuePx + 1 - (flipValues ? 0 : barThickness), // y
durationPx - 2, // widith
barThickness - 2, // height
];
}
/* const xFactor = Math.sin(performance.now() / 500) + 1;
coords[0] *= xFactor; */
if (strokeCurrent) {
ctx.strokeRect(...coords);
}
if (fillCurrent) {
ctx.fillRect(...coords);
}
//ctx.ellipse(...ellipseFromRect(...coords))
if (labels) {
const defaultLabel = event.value.note ?? event.value.s + (event.value.n ? `:${event.value.n}` : '');
const { label: inactiveLabel, activeLabel } = event.value;
const customLabel = isActive ? activeLabel || inactiveLabel : inactiveLabel;
const label = customLabel ?? defaultLabel;
let measure = vertical ? durationPx : barThickness * 0.75;
ctx.font = `${measure}px ${fontFamily || 'monospace'}`;
// font color
ctx.fillStyle = /* isActive && */ !fillCurrent ? color : 'black';
ctx.textBaseline = 'top';
ctx.fillText(label, ...coords);
}
});
ctx.globalAlpha = 1; // reset!
const playheadPosition = scale(-from / timeExtent, ...timeRange);
// draw playhead
ctx.strokeStyle = playheadColor;
ctx.beginPath();
if (vertical) {
ctx.moveTo(0, playheadPosition);
ctx.lineTo(valueAxis, playheadPosition);
} else {
ctx.moveTo(playheadPosition, 0);
ctx.lineTo(playheadPosition, valueAxis);
}
ctx.stroke();
return this;
}
export function getDrawOptions(drawTime, options = {}) {
let [lookbehind, lookahead] = drawTime;
lookbehind = Math.abs(lookbehind);
const cycles = lookahead + lookbehind;
const playhead = lookbehind / cycles;
return { fold: 1, ...options, cycles, playhead };
}
export const getPunchcardPainter =
(options = {}) =>
(ctx, time, haps, drawTime, paintOptions = {}) =>
pianoroll({ ctx, time, haps, ...getDrawOptions(drawTime, { ...paintOptions, ...options }) });
Pattern.prototype.punchcard = function (options) {
return this.onPaint(getPunchcardPainter(options));
};
/**
* Displays a vertical pianoroll with event labels.
* Supports all the same options as pianoroll.
*
* @name wordfall
*/
Pattern.prototype.wordfall = function (options) {
return this.punchcard({ vertical: 1, labels: 1, stroke: 0, fillActive: 1, active: 'white', ...options });
};
/* Pattern.prototype.pianoroll = function (options) {
return this.onPaint((ctx, time, haps, drawTime) =>
pianoroll({ ctx, time, haps, ...getDrawOptions(drawTime, { fold: 0, ...options }) }),
);
}; */
export function drawPianoroll(options) {
const { drawTime, ...rest } = options;
pianoroll({ ...getDrawOptions(drawTime), ...rest });
}
+161 -9
View File
@@ -1,23 +1,175 @@
import { Cyclist } from './cyclist.mjs';
import { evaluate as _evaluate } from './evaluate.mjs';
import { logger } from './logger.mjs';
import { setTime } from './time.mjs';
import { evalScope } from './evaluate.mjs';
import { register, Pattern, isPattern, silence, stack } from './pattern.mjs';
export function repl({ interval, defaultOutput, onSchedulerError, onEvalError, onEval, getTime, transpiler }) {
const scheduler = new Cyclist({ interval, onTrigger: defaultOutput, onError: onSchedulerError, getTime });
const evaluate = async (code) => {
export function repl({
interval,
defaultOutput,
onSchedulerError,
onEvalError,
beforeEval,
afterEval,
getTime,
transpiler,
onToggle,
editPattern,
onUpdateState,
}) {
const state = {
schedulerError: undefined,
evalError: undefined,
code: '// LOADING',
activeCode: '// LOADING',
pattern: undefined,
miniLocations: [],
widgets: [],
pending: false,
started: false,
};
const updateState = (update) => {
Object.assign(state, update);
state.isDirty = state.code !== state.activeCode;
state.error = state.evalError || state.schedulerError;
onUpdateState?.(state);
};
const scheduler = new Cyclist({
interval,
onTrigger: getTrigger({ defaultOutput, getTime }),
onError: onSchedulerError,
getTime,
onToggle: (started) => {
updateState({ started });
onToggle?.(started);
},
});
let pPatterns = {};
let allTransform;
const hush = function () {
pPatterns = {};
allTransform = undefined;
return silence;
};
const setPattern = (pattern, autostart = true) => {
pattern = editPattern?.(pattern) || pattern;
scheduler.setPattern(pattern, autostart);
};
setTime(() => scheduler.now()); // TODO: refactor?
const stop = () => scheduler.stop();
const start = () => scheduler.start();
const pause = () => scheduler.pause();
const toggle = () => scheduler.toggle();
const setCps = (cps) => scheduler.setCps(cps);
const setCpm = (cpm) => scheduler.setCps(cpm / 60);
const all = function (transform) {
allTransform = transform;
return silence;
};
// set pattern methods that use this repl via closure
const injectPatternMethods = () => {
Pattern.prototype.p = function (id) {
pPatterns[id] = this;
return this;
};
Pattern.prototype.q = function (id) {
return silence;
};
try {
for (let i = 1; i < 10; ++i) {
Object.defineProperty(Pattern.prototype, `d${i}`, {
get() {
return this.p(i);
},
configurable: true,
});
Object.defineProperty(Pattern.prototype, `p${i}`, {
get() {
return this.p(i);
},
configurable: true,
});
Pattern.prototype[`q${i}`] = silence;
}
} catch (err) {
console.warn('injectPatternMethods: error:', err);
}
const cpm = register('cpm', function (cpm, pat) {
return pat._fast(cpm / 60 / scheduler.cps);
});
evalScope({
all,
hush,
cpm,
setCps,
setcps: setCps,
setCpm,
setcpm: setCpm,
});
};
const evaluate = async (code, autostart = true, shouldHush = true) => {
if (!code) {
throw new Error('no code to evaluate');
}
try {
const { pattern } = await _evaluate(code, transpiler);
scheduler.setPattern(pattern, true);
onEval?.({
updateState({ code, pending: true });
injectPatternMethods();
await beforeEval?.({ code });
shouldHush && hush();
let { pattern, meta } = await _evaluate(code, transpiler);
if (Object.keys(pPatterns).length) {
pattern = stack(...Object.values(pPatterns));
}
if (allTransform) {
pattern = allTransform(pattern);
}
if (!isPattern(pattern)) {
const message = `got "${typeof evaluated}" instead of pattern`;
throw new Error(message + (typeof evaluated === 'function' ? ', did you forget to call a function?' : '.'));
}
logger(`[eval] code updated`);
setPattern(pattern, autostart);
updateState({
miniLocations: meta?.miniLocations || [],
widgets: meta?.widgets || [],
activeCode: code,
pattern,
code,
evalError: undefined,
schedulerError: undefined,
pending: false,
});
afterEval?.({ code, pattern, meta });
return pattern;
} catch (err) {
console.warn(`eval error: ${err.message}`);
logger(`[eval] error: ${err.message}`, 'error');
updateState({ evalError: err, pending: false });
onEvalError?.(err);
}
};
return { scheduler, evaluate };
const setCode = (code) => updateState({ code });
return { scheduler, evaluate, start, stop, pause, setCps, setPattern, setCode, toggle, state };
}
export const getTrigger =
({ getTime, defaultOutput }) =>
async (hap, deadline, duration, cps) => {
try {
if (!hap.context.onTrigger || !hap.context.dominantTrigger) {
await defaultOutput(hap, deadline, duration, cps);
}
if (hap.context.onTrigger) {
// call signature of output / onTrigger is different...
await hap.context.onTrigger(getTime() + deadline, hap, getTime(), cps);
}
} catch (err) {
logger(`[cyclist] error: ${err.message}`, 'error');
}
};

Some files were not shown because too many files have changed in this diff Show More