Compare commits

..

1475 Commits

Author SHA1 Message Date
Jade (Rose) Rowland d198910a86 Publish
- @strudel/codemirror@1.2.7
 - @strudel/core@1.2.6
 - @strudel/csound@1.2.7
 - @strudel/draw@1.2.6
 - @strudel/embed@1.1.2
 - @strudel/gamepad@1.2.6
 - @strudel/hydra@1.2.6
 - @strudel/midi@1.2.7
 - @strudel/mini@1.2.6
 - mondolang@1.1.2
 - @strudel/mondo@1.1.6
 - @strudel/motion@1.2.6
 - @strudel/mqtt@1.2.6
 - @strudel/osc@1.3.1
 - @strudel/reference@1.2.2
 - @strudel/repl@1.2.8
 - @strudel/sampler@0.2.4
 - @strudel/serial@1.2.6
 - @strudel/soundfonts@1.2.7
 - superdough@1.2.7
 - supradough@1.2.5
 - @strudel/tonal@1.2.6
 - @strudel/transpiler@1.2.6
 - vite-plugin-bundle-audioworklet@0.1.2
 - @strudel/web@1.2.7
 - @strudel/webaudio@1.2.7
 - @strudel/xen@1.2.6
2026-01-17 15:26:28 -08:00
Aria 8ce6a881e6 Merge pull request 'Make kabelsalat stereo out' (#1927) from glossing/ks-stereo-out into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1927
2026-01-17 21:00:42 +01:00
Aria 7bc8576a68 Make kabelsalat stereo out 2026-01-17 11:16:58 -08:00
froos bbe95b3995 Merge pull request 'update changelog + fix script to not miss entries' (#1916) from changelog-update into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1916
2026-01-16 10:38:03 +01:00
Felix Roos 2dc921e375 fix: add fun fact 2026-01-16 10:14:17 +01:00
Felix Roos 3d13955c41 fix: prefix usernames with @ 2026-01-16 10:08:41 +01:00
Felix Roos ae9638c353 update changelog + fix script to not miss entries 2026-01-16 09:58:14 +01:00
froos 97cd3a5946 Merge pull request 'mondo fix: add registered functions to scope automatically' (#1896) from register_to_scope into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1896
2026-01-15 16:59:13 +01:00
froos ca3452bf52 Merge pull request 'Added docs for pattern search' (#1905) from JohnBjrk/strudel:pattern-search-docs into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1905
2026-01-15 16:58:13 +01:00
froos 7f528870b7 Merge pull request 'Update kabelsalat dependency' (#1911) from jeromew/strudel:kabelsalat into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1911
2026-01-15 16:57:18 +01:00
jeromew 60e5682829 Update kabelsalat dependency 2026-01-15 15:42:34 +00:00
Aria d605fbbde8 Merge pull request 'Bug Fix: Set pooled values immediately instead of scheduling' (#1907) from glossing/set-pooled-vals-immediately into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1907
2026-01-15 00:24:38 +01:00
Aria 21e6d81d34 Also set values immediately for supersaw and wavetable 2026-01-14 17:00:14 -06:00
Aria 85e79d9932 Set pooled values immediately instead of scheduling 2026-01-14 16:53:11 -06:00
John Björk 71dfbeea88 Fix markdown format 2026-01-14 22:35:10 +01:00
John Björk ffcab7bf6c Added docs for pattern search 2026-01-14 22:25:27 +01:00
Aria c3f6a1d6ba Merge pull request 'Feat: Kabelsalat integration' (#1876) from glossing/kabelsalat into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1876
2026-01-14 20:29:15 +01:00
Aria eb96d3ad63 Merge branch 'main' into glossing/kabelsalat 2026-01-14 19:08:20 +01:00
Aria 06e10cd693 Merge pull request 'Feat: MIDI Keyboard 🎹🐈' (#1828) from glossing/keyboard into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1828
2026-01-14 19:07:48 +01:00
Aria 80875cca95 Expose scheduler state and don't enqueue/trigger midi keys when repl stopped 2026-01-14 11:44:48 -06:00
Aria b954a25b2b Merge branch 'main' into glossing/keyboard 2026-01-14 18:15:31 +01:00
Aria cca346d2c2 Merge pull request 'Bug Fix: Fix race condition between worklet termination and port messages' (#1897) from glossing/diedack into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1897
2026-01-14 18:14:51 +01:00
Aria 3343c7bcf0 Merge branch 'main' into glossing/keyboard 2026-01-13 23:00:59 +01:00
Aria 6e3c5b23dd Merge branch 'main' into glossing/diedack 2026-01-13 21:30:58 +01:00
froos c12a77a0a1 Merge pull request 'Add search/filter in patterns tab' (#1842) from JohnBjrk/strudel:patterns-search into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1842
2026-01-13 04:06:50 +01:00
Felix Roos e5ab6b3c93 fix: short circuit 2026-01-13 03:47:33 +01:00
Felix Roos e82bb6c410 fix: use pattern.id as title fallback 2026-01-13 03:38:09 +01:00
Felix Roos 8b1fb12388 fix: class -> className 2026-01-13 03:32:19 +01:00
Aria 1f1f3288a6 Switch to tracking grace period in node pool; add negative begin and ends 2026-01-12 17:59:33 -06:00
Switch Angel AKA Jade Rose d642c0e12f Merge pull request 'Add shortcut for navigating through labels!' (#1807) from jade/dollar_shortcut into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1807
2026-01-13 00:18:08 +01:00
Aria 1eb657e6fe Merge branch 'main' into glossing/diedack 2026-01-12 20:58:34 +01:00
Aria 7c5f53f9ae Add ack message for worklet death; remove max pool size 2026-01-12 13:51:21 -06:00
Switch Angel AKA Jade Rose efe7c9394f Merge branch 'main' into jade/dollar_shortcut 2026-01-12 20:30:14 +01:00
Jade (Rose) Rowland 35bfd8b3ff curried 2026-01-12 11:28:54 -08:00
Jade (Rose) Rowland c2720a5738 working 2026-01-12 11:26:18 -08:00
Aria 5355a0c563 Ignore non-note messages 2026-01-11 23:34:52 -06:00
Alex McLean 75db9ff16e Merge pull request 'add warm.strudel.cc to faq' (#1891) from faq-warm into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1891
2026-01-12 00:17:36 +01:00
Aria 12cc1e9b5e Add immediate triggering; move time to schedulerState 2026-01-11 14:51:47 -06:00
Aria cd48e67675 Merge branch 'main' into glossing/kabelsalat 2026-01-11 19:59:21 +01:00
Aria 3a284696c9 Merge branch 'main' into glossing/keyboard 2026-01-11 19:59:13 +01:00
Felix Roos 753dc48b69 update changelog 2026-01-11 19:12:45 +01:00
froos 5ee5d4f1b1 Merge pull request 'Fix sounds example to work in the REPL' (#1851) from JesCoding/strudel:jescoding-patch-2 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1851
2026-01-11 19:00:24 +01:00
alex 31cacc3c29 add warm to faq 2026-01-11 16:23:17 +00:00
JesCoding 8d2bca59c4 Fix sounds example to work in the REPL
`freq` only takes one argument, so switch this to mini-notation
so this can be used in the REPL as indicated in the paragraph below.
Make it so this can be played by the user.

Fix syntax-type typo.
2026-01-11 14:50:30 +00:00
froos f867cbce92 Merge pull request 'Improve hint text when sound search has no results' (#1883) from floy/strudel:improve-help-text-filtered into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1883
2026-01-11 13:52:01 +01:00
floy a659c89385 fix code formatting 2026-01-11 13:25:44 +01:00
Alex McLean 8290e99cf9 Merge pull request 'New page FAQ in "More"' (#1753) from scrappy_fiddler/strudel:documentation into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1753
2026-01-11 13:19:45 +01:00
froos e648ddd9ff Merge pull request 'fix: remove faulty default readme' (#1889) from trim-website-readme into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1889
2026-01-11 12:45:06 +01:00
yaxu 85fd567fb2 Format and remove link to open document 2026-01-11 12:21:05 +01:00
scrappy_fiddler 20ea2980a2 Merge branch 'main' into documentation 2026-01-11 12:18:42 +01:00
froos af2d4784c6 Merge pull request 'fix/self-hosted-config' (#1880) from alienmind/strudel:fix/self-hosted-config into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1880
2026-01-11 12:15:32 +01:00
froos 526083d7c9 Merge pull request 'Feat: Support External AudioContext Injection' (#1833) from 1d10t/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1833
2026-01-11 12:07:47 +01:00
Alex McLean 8e792e1bfd Merge branch 'main' into documentation 2026-01-11 11:57:19 +01:00
yaxu f3e6f86857 Update website/src/pages/learn/faq.mdx
Trimmed all the DAW talk a little!
2026-01-11 11:55:40 +01:00
Felix Roos 25dbfe4c7d fix: remove faulty default readme 2026-01-11 11:43:04 +01:00
froos 0a586eddb3 Merge pull request 'fix: add trem to top level' (#1887) from trem-toplevel into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1887
2026-01-11 11:37:36 +01:00
froos b6d81ba2a0 Merge pull request 'fix: export start cycle min 0' (#1888) from fix-export-min-cycle into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1888
2026-01-11 11:37:17 +01:00
yaxu 8f3dc8daea Update website/src/pages/learn/faq.mdx 2026-01-11 11:34:55 +01:00
scrappy_fiddler ced434a1cf Merge branch 'main' into documentation 2026-01-11 11:20:51 +01:00
froos 96626fce25 Merge pull request 'fix: repl package init audio properly' (#1836) from fix-repl-audioworklet into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1836
2026-01-11 11:05:43 +01:00
Felix Roos c74707e804 fix: export start cycle min 0 2026-01-11 10:58:13 +01:00
Felix Roos 0174e08639 fix: add trem to top level 2026-01-11 10:50:44 +01:00
Switch Angel AKA Jade Rose af88471f6b Merge branch 'main' into jade/dollar_shortcut 2026-01-11 06:51:47 +01:00
Switch Angel AKA Jade Rose af855a0c77 Merge pull request 'Fix: show reload dialog when uploading prebake script' (#1886) from jade/reloaddialog into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1886
2026-01-11 06:51:23 +01:00
Switch Angel AKA Jade Rose f9a9993c42 Merge branch 'main' into jade/dollar_shortcut 2026-01-11 06:32:29 +01:00
Jade (Rose) Rowland 604a1b770c dialog 2026-01-11 00:27:07 -05:00
Switch Angel AKA Jade Rose 2aa978ca5b Merge pull request 'fixes Serial onTrigger() params #1633' (#1885) from gueejla/strudel:fix-serial-ontrigger into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1885
2026-01-11 06:01:41 +01:00
gueejla 0571a8dc7d fixes Serial onTrigger() params #1633 2026-01-10 22:11:13 -06:00
Switch Angel AKA Jade Rose a8a919f581 Merge pull request 'Perf: Targeted node pools' (#1810) from glossing/basic-node-pool into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1810
2026-01-10 23:12:47 +01:00
Switch Angel AKA Jade Rose bf21c4cf02 Merge branch 'main' into glossing/basic-node-pool 2026-01-10 22:58:28 +01:00
Jade (Rose) Rowland 741ff3f3f0 fix import 2026-01-10 16:55:53 -05:00
Jade (Rose) Rowland 4476921069 use releasenode 2026-01-10 16:46:11 -05:00
Aria 8c5e4a5780 Merge pull request 'Allow top level distortions for the purpose of FX' (#1884) from glossing/naked-distorts into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1884
2026-01-10 20:52:39 +01:00
Aria 34ae1bb305 Merge branch 'main' into glossing/naked-distorts 2026-01-10 20:38:34 +01:00
Aria 0cf11adc2c Allow naked distortions for the purpose of FX 2026-01-10 13:07:54 -06:00
Aria dab1676761 Add license for time file 2026-01-10 11:26:30 -06:00
Aria d753eedb90 Make latency consistent across all cps 2026-01-10 11:20:17 -06:00
floy fd0209dbc0 Show explicit help text when search doesn't match 2026-01-10 15:39:02 +01:00
floy b4e00538f8 Don't show 'No sounds loaded' text if search is active 2026-01-10 15:30:07 +01:00
Jade (Rose) Rowland 7a5020aa71 format 2026-01-10 01:42:43 -05:00
Jade (Rose) Rowland a205f7d873 rm dead code 2026-01-10 01:42:06 -05:00
Jade (Rose) Rowland 0e9c50bf0a fix import 2026-01-10 01:39:39 -05:00
Jade (Rose) Rowland e837c516c5 merge main 2026-01-10 01:37:14 -05:00
Jade (Rose) Rowland 3b2e9fa0b4 wip 2026-01-10 01:22:50 -05:00
Jade (Rose) Rowland 6a47139e0d wip 2026-01-10 01:07:09 -05:00
Aria 4743334a17 Reduce latency; change name to midikeys; include in i/o learn page 2026-01-09 22:50:16 -06:00
Aria 7cff2050c8 Merge branch 'main' into glossing/kabelsalat 2026-01-09 23:38:25 +01:00
alienmind eefae851d5 fix malformed script src attributes 2026-01-09 16:26:32 +01:00
alienmind 40f9f4cde0 allow alternative URLs for self-hosted strudel 2026-01-09 16:26:32 +01:00
Aria f7f8c56c0a Merge pull request 'Bake in scaling by freq for FM with a gain node' (#1878) from glossing/fm-modulation into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1878
2026-01-09 03:43:35 +01:00
Aria c7e88e1ff2 Merge branch 'main' into glossing/fm-modulation 2026-01-09 03:31:26 +01:00
Aria f6a43f1b10 Make the scaling by freq in FM a separate node so that modulators behave like the fm control 2026-01-08 20:28:53 -06:00
Aria a3b183d304 Merge pull request 'Bug fix: Properly handle subcontrols' (#1877) from glossing/subcontrols into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1877
2026-01-09 02:53:37 +01:00
Aria f7175c0505 Properly handle subcontrols 2026-01-08 19:40:50 -06:00
Aria e6e96c8603 Fix release behavior; add multi-line example 2026-01-08 16:39:10 -06:00
Aria d4b3a3b972 Auto call functions in kabel; clean up end behavior of worklet; move kabel first in chain; write docstring 2026-01-08 12:31:26 -06:00
1d10t a1d1bd0e11 Merge branch 'main' into main 2026-01-08 09:44:32 +01:00
Aria fd2ff255e5 Don't include worklet in autocomplete; use empty object in pure for consistency 2026-01-07 22:59:54 -06:00
Aria 5903070c02 Test cleanup 2026-01-07 13:45:19 -06:00
Aria e92865cecb Handle mini notation without S 2026-01-07 13:32:12 -06:00
Aria a5c4fd5bc1 Merge branch 'main' into glossing/kabelsalat 2026-01-07 13:14:49 -06:00
Aria e26040d154 Merge pull request 'Feat: Add ability to turn mini parsing off with mini-off decorator' (#1786) from glossing/disable-mini into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1786
2026-01-07 20:06:17 +01:00
Aria 17a1b75e5b Merge branch 'main' into glossing/disable-mini 2026-01-07 19:22:35 +01:00
Aria 7df9688bb9 Merge pull request 'Bug Fix: Update loopStart/End to not be offset' (#1826) from glossing/sample-looping-bugfix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1826
2026-01-07 19:22:22 +01:00
Aria 5caaf423ff Import kabelsalat, update transpiler to handle K and S, add worklet control 2026-01-07 12:19:16 -06:00
Aria d557bb59f0 Merge branch 'main' into glossing/disable-mini 2026-01-06 21:40:05 +01:00
Aria 679e81eb0f Merge branch 'main' into glossing/sample-looping-bugfix 2026-01-06 21:39:52 +01:00
yaxu 37dd834398 Update README.md 2026-01-06 16:33:06 +01:00
yaxu 959e8ac7bc Update README.md 2026-01-06 16:31:51 +01:00
Aria 16524ca805 Merge pull request 'Update modulator docstrings and allow ids to be patterns' (#1874) from glossing/pattern-ids-for-modulators into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1874
2026-01-06 06:35:47 +01:00
Aria b4b0194455 Update docstrings and allow modulator ids to be patterns 2026-01-05 23:17:40 -06:00
1d10t 8f342262ab Merge branch 'main' into main 2026-01-05 00:37:28 +01:00
Alex McLean fd472a64d9 Merge pull request 'Fix doc link in @strudel/osc README.md' (#1872) from forrcaho/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1872
2026-01-04 17:14:10 +01:00
Forrest Cahoon 58094973b0 Fix doc link in @strudel/osc README.md 2026-01-04 09:39:17 -06:00
1d10t e82602af5a Merge branch 'main' into main 2026-01-04 13:24:39 +01:00
Aria db49b37780 Merge pull request 'Make stretch modulatable' (#1870) from glossing/stretch-node into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1870
2026-01-04 02:01:05 +01:00
Aria bf243c04b9 Make stretch modulatable 2026-01-03 18:27:11 -06:00
Sergey S Yaglov bfef9ba8d2 Merge remote-tracking branch 'upstream/main' 2026-01-04 00:14:23 +03:00
1d10t aa7ba6ae99 update webaudio to main branch 2026-01-03 22:01:37 +01:00
1d10t a86e5751eb reset audioContext to main branch 2026-01-03 21:55:16 +01:00
Aria bc05cffdbc Merge pull request 'Make pan modulatable' (#1865) from glossing/pan-fx into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1865
2026-01-02 18:44:52 +01:00
Aria 7b1e02e8cf Make pan modulatable 2026-01-02 11:43:27 -06:00
scrappy_fiddler 8d79715ce4 Merge branch 'main' into documentation 2026-01-02 00:30:21 +01:00
Alex McLean 257f09da4f Merge pull request 'Fix transpilation example to have same mini-notation' (#1850) from JesCoding/strudel:jescoding-patch-1 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1850
2026-01-01 21:42:19 +01:00
Alex McLean ecd58fa501 Merge pull request 'fix: missing punctuation' (#1860) from eddyflux/strudel:fix-missing-punctuation into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1860
2026-01-01 21:39:03 +01:00
Aria c4ece4932e Merge pull request 'Fix formatting of docstring' (#1864) from glossing/fx-docstring into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1864
2026-01-01 20:20:33 +01:00
Aria 5c9855bf12 Merge branch 'main' into glossing/fx-docstring 2026-01-01 20:08:54 +01:00
Aria e54b9c3a32 Fix formatting of docstring 2026-01-01 13:07:38 -06:00
Aria 6afe0dc714 Merge pull request 'Feat: FX Chains' (#1861) from glossing/multifx-new into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1861
2026-01-01 19:52:14 +01:00
Aria ebaf7624f9 Fix lfos for vowels, phasers; fix ir index; more informative error message 2026-01-01 12:02:54 -06:00
John Björk aa8209ad4c Refactored handling of trim/lowercase based on PR comments 2026-01-01 12:22:52 +01:00
Aria 882bcc513f Typos and some examples 2025-12-31 15:17:06 -06:00
Aria aec33710b7 Working version 2025-12-31 14:58:31 -06:00
eddyflux d41ebf190b fix: missing punctuation 2025-12-30 00:22:51 +01:00
Aria 7953fa61e4 Merge pull request 'Bugfix: Fix modulator clamping when min/max not specified' (#1859) from glossing/clamp-bugfix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1859
2025-12-29 21:59:10 +01:00
Aria 6051b922c0 Fix clamping when min/max not specified 2025-12-29 14:45:49 -06:00
Aria 367e07da0c Merge pull request 'Feature: LFOs and Envelopes' (#1507) from glossing/strudel:glossing/lfo-anything into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1507
2025-12-29 20:54:10 +01:00
Aria 0edede106a Fixes for zzfx and soundfonts 2025-12-29 13:28:26 -06:00
Aria b6264a1513 Merge branch 'main' into glossing/lfo-anything 2025-12-29 20:00:29 +01:00
Aria 680b7d78ec Lots of examples; use id instead of index; waveshaper clamping; one mode for synth 2025-12-29 12:59:48 -06:00
Aria e79b4b8ccb Refactor modulators 2025-12-29 10:41:20 -06:00
Aria 98367868ac Handle min/max when target is LFO; fix vib and tremolo 2025-12-29 10:22:48 -06:00
scrappy_fiddler b648961d30 Merge branch 'main' into documentation 2025-12-29 16:28:57 +01:00
froos 616bc64e70 Merge pull request 'Fix AudioContext change detection. Use AudioNode.context' (#1858) from jeromew/strudel:fix-scope into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1858
2025-12-29 16:07:16 +01:00
jeromew c0f4f47150 Fix AudioContext change detection. Use AudioNode.context 2025-12-29 14:04:40 +00:00
Aria b4496fcc24 More control mapping tweaks 2025-12-28 21:43:08 -05:00
Aria 48f6a41683 Extend to FM, vibrato, etc 2025-12-28 20:13:15 -05:00
froos 7bce739068 Merge pull request 'Say that @license should use SPDX identifier' (#1817) from Wuzzy/strudel:clarify_at_license into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1817
2025-12-28 22:58:37 +01:00
froos 06f9c2dfb5 Merge pull request 'Expose Vim object in order to create custom keybindings' (#1816) from JohnBjrk/strudel:expose-vim-for-custom-keybindings into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1816
2025-12-28 22:56:05 +01:00
Felix Roos 30fe5b47e3 hotfix: fix scope and friends #1847 2025-12-28 22:42:42 +01:00
Alex McLean 1823993e7c Merge branch 'main' into jescoding-patch-1 2025-12-28 17:53:50 +01:00
froos 1935195e9a Merge pull request 'dough repl fixes' (#1855) from vanillarepl into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1855
2025-12-28 14:20:02 +01:00
Felix Roos 300a1bbfd5 fix: actually load code from url 2025-12-28 14:07:27 +01:00
froos 2f43dcab0c Merge pull request 'add basic dough repl' (#1749) from vanillarepl into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1749
2025-12-28 13:40:28 +01:00
Felix Roos 125eece223 fix: import 2025-12-28 13:20:22 +01:00
Felix Roos 53e49952d8 persist code in hash 2025-12-28 13:10:57 +01:00
Felix Roos e286ab2830 no default samples for now + add doughsamples to scope 2025-12-28 13:10:37 +01:00
Felix Roos e4e2d60b28 Merge branch 'main' into vanillarepl 2025-12-28 12:58:45 +01:00
Aria 99bec835f8 Merge branch 'main' into glossing/lfo-anything 2025-12-27 20:54:39 -05:00
JesCoding d349d2a0cd Fix transpilation example to have same mini-notation
This was introduced in https://codeberg.org/uzu/strudel/commit/66f8ca72c1b364f72f25b8cff041cac13b380432
2025-12-24 10:38:21 +01:00
scrappy_fiddler fc2f5accfe Merge branch 'main' into documentation 2025-12-22 14:05:24 +01:00
Wuzzy c7a2c2bb9c Say that @license should use SPDX identifier 2025-12-21 10:47:01 +01:00
John Björk 6908ea38e4 Added search/filter in patterns tab
Added pattern as dep to filter memo

Format
2025-12-20 23:10:01 +01:00
froos 5a51b4ec71 Merge pull request 'Document "-" in mini-notation' (#1818) from Wuzzy/strudel:dashtilde into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1818
2025-12-20 22:27:50 +01:00
froos 3922defab9 Merge pull request 'simplify envValAtTime and remove asymmetric behavior (fix #1653)' (#1815) from pulu/strudel:remove-env-asymmetry into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1815
2025-12-20 22:20:26 +01:00
John Björk a9752fb2a4 Exposing Vim from codemirror-vim
Docs for adding keybindings

Only expose Vim from keybindings
2025-12-20 17:20:38 +01:00
froos 0a2f2eaa3d Merge pull request 'fix: visual block selection mode for vim bindings' (#1839) from Dsm0/strudel:visual-block-mode-fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1839
2025-12-19 08:11:49 +01:00
Dsm0 0de212c12f fix visual block mode 2025-12-18 22:55:44 -08:00
Felix Roos 181ebee374 fix: repl package init audio properly 2025-12-19 01:25:58 +01:00
froos b376b2616a Merge pull request '[perf] Add audiograph await debugAudiograph() feature' (#1763) from jeromew/strudel:audiograph into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1763
2025-12-19 01:03:52 +01:00
froos 56ecb006fa Merge pull request 'Feature: non-realtime exporting' (#1674) from BANanaD3V/strudel:feat/non-realtime-exporting into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1674
2025-12-19 00:45:39 +01:00
scrappy_fiddler e6c1e97838 Merge branch 'main' into documentation 2025-12-17 20:44:07 +01:00
Aria 2748189f18 Merge pull request 'Fix: wrong warning in build environments' (#1835) from jeromew/strudel:onenced-warning into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1835
Reviewed-by: Aria <glossing@noreply.codeberg.org>
2025-12-14 19:33:36 +01:00
Alex McLean 63d254daf4 Merge pull request 'delta -> tight/tightx/loose refinements' (#1832) from delta into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1832
2025-12-14 15:09:10 +01:00
jeromew 34991e9602 Fix: wrong warning in build environments 2025-12-14 11:27:41 +00:00
Aria 8df5c80d82 Merge pull request 'Improved randomness' (#1505) from glossing/strudel:glossing/random into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1505
2025-12-14 01:07:35 +01:00
Aria e0344dbd67 Simple seeding for this first iteration 2025-12-13 17:49:19 -06:00
Aria 931d684b19 Merge branch 'main' into glossing/random 2025-12-13 17:28:44 -06:00
Aria 4a7344595d Make legacy the default 2025-12-13 17:28:42 -06:00
Aria 18b3c66eb8 Clean up error messages 2025-12-13 17:15:06 -06:00
Aria 63de46ae96 Update docstrings 2025-12-13 16:44:36 -06:00
Aria c598059dc7 Clean up old code 2025-12-13 16:26:50 -06:00
Aria dec037bed5 Bus fix 2025-12-13 16:23:47 -06:00
Aria 29f7f5c1f8 Allow lfos to modulate other lfos without clamping 2025-12-13 16:07:19 -06:00
Aria bae5571df0 Cleanup 2025-12-13 15:32:27 -06:00
Aria 4b08dd8447 Unify lfo functions 2025-12-13 15:20:51 -06:00
Aria 11e3da0552 Parity with other LFO (sync and dcoffset) 2025-12-13 15:08:48 -06:00
Aria ef2ee0969a Restore old lfo to avoid unifying right now 2025-12-13 14:59:14 -06:00
Aria 12f9af227c Merge branch 'main' into glossing/lfo-upgrades 2025-12-13 14:54:17 -06:00
Aria dc5f6827f9 Change names, cleanup 2025-12-13 14:50:27 -06:00
Aria 8baecf78b9 Add note 2025-12-13 11:37:37 -06:00
alex 8eeebf1e4f try renaming to per / perx / cyclesPer 2025-12-13 16:30:51 +00:00
Sergey S Yaglov adf9596d07 codestyle(webaudio) 2025-12-13 00:28:13 +03:00
1d10t 4e14718e93 feat(webaudio): enable AudioContext sharing for webaudioRepl
- Add support for optional `existingAudioCtx` parameter in `webaudioRepl()` function
- When provided, sets it as the default AudioContext via `setDefaultAudioContext()`
- Allows integration with external systems that manage their own Web Audio API context
- Maintains backward compatibility with existing usage patterns
2025-12-12 21:56:31 +01:00
1d10t 2998de8426 Merge pull request 'feat(superdough/audiocontext): make AudioContext injection optional' (#1) from 1d10t-patch-1 into main
Reviewed-on: https://codeberg.org/1d10t/strudel/pulls/1
2025-12-12 21:28:40 +01:00
1d10t c8b2e1ac9e feat(superdough/audiocontext): make AudioContext injection optional
- Modify `setDefaultAudioContext()` to accept an optional `existingAudioCtx` parameter.
- If provided, it will use the existing context; otherwise, it creates a new one.
- This allows for better integration with external audio systems that manage their own AudioContext.
2025-12-12 21:22:21 +01:00
alex c7789a09e3 Merge branch 'delta' of ssh://codeberg.org/uzu/strudel into delta 2025-12-12 16:50:48 +00:00
alex a53385aa11 delint 2025-12-12 16:50:24 +00:00
Alex McLean 0a5fb8ca1d Merge branch 'main' into delta 2025-12-12 17:49:14 +01:00
alex 99e4999e6a snapshot 2025-12-12 15:46:19 +00:00
alex cd071cb7c0 separate out signal tests, add tests for tight, tightx, loose 2025-12-12 15:46:04 +00:00
alex 8e1fba0436 rename delta to loose, add inverse tight, and exponential tightx 2025-12-12 15:45:36 +00:00
Felix Roos f4df4f679f Merge branch 'main' of https://codeberg.org/uzu/strudel 2025-12-12 15:12:45 +01:00
Alex McLean 1d2a3bdb9c Merge pull request 'Add delta signal for representing the duration of events in patterns that are combined with it' (#1831) from delta into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1831
2025-12-12 10:28:25 +01:00
alex c6e0f0533e add delta 2025-12-11 23:32:10 +00:00
Aria 415b6d5f1d Fix name collision and move modulators into controls to avoid circular import test failure 2025-12-11 15:48:45 -06:00
Aria 4169b764c3 Simpler control handling 2025-12-11 15:28:48 -06:00
Aria e7d1613bfb Broken tests, but otherwise working 2025-12-11 14:42:16 -06:00
Aria 45aa1f5384 Control cleanup 2025-12-11 12:52:40 -06:00
Aria 3a17aeabf3 Some cleanup 2025-12-11 11:41:40 -06:00
Aria 2aeba2e53f Working version of bus 2025-12-11 11:37:20 -06:00
Alex McLean 3608f1ca25 Merge pull request 'Feature: stateful timeline function for jumping between timelines' (#1669) from alternative-timeline into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1669
2025-12-11 18:00:48 +01:00
alex 37990b459f bugfix and tweak doc 2025-12-11 16:51:25 +00:00
alex a34e58aa09 Merge branch 'alternative-timeline' of ssh://codeberg.org/uzu/strudel into alternative-timeline 2025-12-11 16:39:22 +00:00
alex 8cbe4b945c Respond to glossing's review 2025-12-11 16:39:08 +00:00
Alex McLean 6f9a1470e7 Merge branch 'main' into alternative-timeline 2025-12-11 17:19:03 +01:00
Alex McLean 8a3719752f Merge pull request 'Updates relating to LLM, github, etc' (#1830) from llm-guidance into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1830
2025-12-11 16:37:57 +01:00
alex 96835be056 tweaks 2025-12-11 15:07:57 +00:00
alex 960f1de9d2 tweaks 2025-12-11 12:16:54 +00:00
alex 12884cba3a Updates relating to LLM, github, etc 2025-12-11 12:09:26 +00:00
Aria 103b27c21f Working version of keyboard with variable lengths; tests and cleanup 2025-12-10 13:44:49 -06:00
Aria 597c941991 Add keyboard function 2025-12-10 12:01:04 -06:00
Alex McLean 20c513d649 Merge pull request 'fix .as so it doesn't set undefined values' (#1827) from fix-as into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1827
2025-12-10 15:32:43 +01:00
alex e89414e400 fix .as so it doesn't set undefined values 2025-12-10 09:19:12 +00:00
Aria a79491dd16 Update loopbegin/end to not be offset 2025-12-08 16:32:54 -06:00
Aria 765de9daf3 Merge pull request '[perf] propagate onceEnded and releaseAudioNode' (#1809) from jeromew/strudel:fix-perf12 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1809
Reviewed-by: Aria <glossing@noreply.codeberg.org>
2025-12-08 19:27:30 +01:00
jeromew 132dea8478 Merge branch 'main' into fix-perf12 2025-12-08 18:54:51 +01:00
jeromew b889d19493 Merge branch 'fix-perf12' of https://codeberg.org/jeromew/strudel into fix-perf12 2025-12-08 17:32:47 +00:00
jeromew 71d36b79ed Improve getOscillator/noiseMix release 2025-12-08 17:31:34 +00:00
Aria d7bf5db8be Merge pull request 'Feat: Add channel support to midi in' (#1775) from glossing/midin-channels into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1775
2025-12-07 21:51:39 +01:00
Aria 48231ea12a Merge branch 'main' into glossing/midin-channels 2025-12-07 21:23:57 +01:00
Aria c8a442234e Merge pull request 'Feat: Transient shaper' (#1777) from glossing/transient-processor into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1777
2025-12-07 21:23:42 +01:00
Aria efda32eedb Merge branch 'main' into glossing/transient-processor 2025-12-07 20:29:50 +01:00
Aria 95d04d1149 Merge branch 'main' into glossing/midin-channels 2025-12-07 20:29:39 +01:00
Aria 358b1e3f56 Make sure processor turns off; fix array sizes for JIT 2025-12-07 13:28:57 -06:00
Aria fe7e8f7add Clearer docstring 2025-12-07 13:21:06 -06:00
Aria 45d329d3d1 Merge pull request 'Add vel as a synonym for velocity & update a few docstrings' (#1781) from glossing/controls-various into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1781
2025-12-07 19:15:42 +01:00
Aria 5e99393f5a Merge branch 'main' into glossing/controls-various 2025-12-07 18:54:18 +01:00
Aria 9650c8eb50 Merge pull request '[perf] fix phaser leak of unused biquads' (#1800) from jeromew/strudel:fix-perf10 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1800
Reviewed-by: Aria <glossing@noreply.codeberg.org>
2025-12-07 18:53:03 +01:00
Aria fab8d2193d Merge branch 'main' into glossing/midin-channels 2025-12-07 18:45:16 +01:00
Aria 150835aa4d Merge branch 'main' into glossing/transient-processor 2025-12-07 18:45:11 +01:00
Aria 76237016a3 Merge branch 'main' into glossing/controls-various 2025-12-07 18:45:02 +01:00
Aria 6f4d8ebacf Merge branch 'main' into fix-perf10 2025-12-07 18:44:47 +01:00
Aria 4374bdf1bd Merge branch 'main' into fix-perf12 2025-12-07 18:44:38 +01:00
Aria 3cecf4a50e Merge pull request 'Bug fix: Remove failing tests due to shabda removal' (#1820) from glossing/shabda-test-fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1820
2025-12-07 18:42:49 +01:00
Aria 16b5faf333 Removing failing tests due to shabda removal 2025-12-07 11:23:55 -06:00
Aria c4826b7dfb Merge branch 'main' into glossing/midin-channels 2025-12-07 18:11:59 +01:00
Aria bd61c1dc7e Merge branch 'main' into glossing/transient-processor 2025-12-07 18:11:50 +01:00
Aria ceb3aa797d Merge branch 'main' into glossing/controls-various 2025-12-07 18:11:39 +01:00
Aria 9b3277da1c Merge branch 'main' into fix-perf10 2025-12-07 18:09:00 +01:00
Wuzzy 53c101005c Document "-" in mini-notation 2025-12-07 00:12:40 +01:00
Aria 82ca77be9d Working version 2025-12-06 12:02:11 -06:00
scrappy_fiddler 6402ad5d37 better linebreak in example 2025-12-06 16:55:57 +01:00
scrappy_fiddler ab03ece2b7 prettier 2025-12-06 16:48:40 +01:00
miranda 173e359a65 simplify envValAtTime and remove asymmetric behavior (fix #1653) 2025-12-06 17:46:16 +02:00
scrappy_fiddler bd282f439a everyone wants that trancegate 2025-12-06 16:37:39 +01:00
scrappy_fiddler 177c3a4a2e some items from review 2025-12-06 16:36:25 +01:00
Aria ad43259353 Switch to omod 2025-12-05 13:39:52 -06:00
Aria 32924b3fcf Merge branch 'main' into glossing/lfo-anything 2025-12-05 10:47:17 -06:00
scrappy_fiddler d4d9b4f543 Merge branch 'main' into documentation 2025-12-05 10:22:52 +01:00
Aria 4c99f4866b Use setvalueattime to pin values and prevent bleed 2025-12-04 22:50:28 -06:00
Aria d50af71ba1 Merge branch 'main' into glossing/basic-node-pool 2025-12-04 14:20:41 -06:00
Aria 0664f90178 Remove old comment 2025-12-04 13:07:13 -06:00
Aria 4321814d36 Working version for compressor, filter, supersaw, wavetable 2025-12-04 13:04:33 -06:00
Aria 6610713018 Working version of supersaw, almost on wavetable 2025-12-04 12:40:28 -06:00
Aria 600ab0a83e WIP with compressors, filters, heavy worklets 2025-12-04 12:17:07 -06:00
jeromew 1225d04437 codeformat 2025-12-04 15:29:21 +00:00
jeromew f6f507dd29 propagate releaseAudioNode in packages 2025-12-04 15:26:59 +00:00
jeromew c7586e96ff Add comment on end worklet param 2025-12-04 13:20:17 +00:00
jeromew 46291bf85c Difuse the onceEnded mechanism 2025-12-04 13:17:20 +00:00
jeromew d7e240e2dc Add PeriodicWave & VowelNode support 2025-12-04 12:56:54 +00:00
jeromew 0b711e879c Improve naming & backward compat 2025-12-04 08:23:36 +00:00
Jade (Rose) Rowland f0aac2098a update_shortcut 2025-12-03 22:59:20 -05:00
Jade (Rose) Rowland c1a185e852 fix null case 2025-12-03 15:25:05 -05:00
Jade (Rose) Rowland b9fce15042 working 2025-12-03 15:18:32 -05:00
Aria e01621d0cc Merge pull request 'Feature: Eight FMs' (#1628) from glossing/strudel:glossing/fmsss into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1628
2025-12-03 18:27:27 +01:00
Aria 196f70ab6b Formatting 2025-12-03 11:13:21 -06:00
Aria 1d4f2b81d8 Switch back to explicit exports and use new release mechanism 2025-12-03 11:12:30 -06:00
Aria d28c8dac8e Merge branch 'main' into glossing/fmsss 2025-12-03 10:42:35 -06:00
Aria eb18648a2a Merge pull request '[perf] release unused AudioBufferSourceNode + releaseAudioNode' (#1805) from jeromew/strudel:fix-perf11 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1805
Reviewed-by: Aria <glossing@noreply.codeberg.org>
2025-12-03 17:35:03 +01:00
jeromew 25c20296a1 Tone down log message when a pure orphan node is found 2025-12-02 13:58:09 +00:00
jeromew 2db30a710b Fix codeformat 2025-12-02 13:54:27 +00:00
jeromew 71d1fe99e4 Fix special case for FeedbackDelayNode 2025-12-02 13:51:16 +00:00
jeromew 0ec9826de5 onceEnded mechanism to clean audioNode.onended callbacks 2025-12-02 09:29:50 +00:00
jeromew af7855402f Accept non-instanciated nodes for better developer experience 2025-12-01 20:43:55 +00:00
scrappy_fiddler 39bff8900f website/src/pages/learn/faq.mdx aktualisiert
updated the section on switch angel's prebake. Now refers to the readme for instructions.
2025-12-01 18:22:26 +01:00
jeromew 68b1cb87ca [perf] release unused AudioBufferSourceNode + releaseAudioNode 2025-12-01 15:29:19 +00:00
jeromew 05ed16e158 Add stop-leak detection. Stoppable nodes that are not stopped 2025-11-30 17:50:56 +00:00
jeromew 24b69ad1bc [perf] Add audiograph await debugAudiograph(); tool 2025-11-30 14:09:03 +00:00
Nikita 5bddb6f48d Move export UI to the panel 2025-11-30 10:13:16 +03:00
Nikita c5250d7794 Add info comment about ascending time order 2025-11-30 10:12:55 +03:00
Nikita 7d890156f4 Fix haps not being sorted by time 2025-11-30 10:12:55 +03:00
Nikita 8f9967c76d Format 2025-11-30 10:12:55 +03:00
Nikita 91ebdd5ea6 Better progress bar UI 2025-11-30 10:12:55 +03:00
Nikita fc74dcdb1a More bug fixes 2025-11-30 10:12:51 +03:00
jeromew b65cc2128f [perf] fix phaser leak of unused biquads 2025-11-29 14:47:03 +00:00
froos 7a3e0fd3fe Merge pull request 'added export to getSuperdoughAudioController() so that its possible to route superdough audio through other webaudio applications.' (#1796) from ndr0n/strudel:exportSuperdoughAudioController into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1796
2025-11-29 01:00:41 +01:00
Alex McLean 4061dd4cf8 Merge pull request 'add revv() for reversing whole patterns' (#1791) from revv into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1791
2025-11-28 23:26:19 +01:00
alex b523205590 Merge branch 'revv' of ssh://codeberg.org/uzu/strudel into revv 2025-11-28 22:03:32 +00:00
alex 956598da18 snapshot 2025-11-28 22:03:21 +00:00
Alex McLean e011f3b982 Merge branch 'main' into revv 2025-11-28 22:37:03 +01:00
alex cb591815ed fix copy paste errors 2025-11-28 21:35:35 +00:00
Alex McLean 6a4fd27f5b Merge branch 'main' into exportSuperdoughAudioController 2025-11-28 22:32:10 +01:00
Aria d30df8d4cf Merge pull request '[perf] Disconnect lfos for phaser and filters' (#1787) from glossing/perf-lfos into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1787
2025-11-28 20:19:14 +01:00
Aria e10cd22c26 Merge branch 'main' into glossing/perf-lfos 2025-11-28 19:59:51 +01:00
Aria 18dc4944bf Typos and cleanup 2025-11-28 12:36:23 -06:00
Felix Roos d84db1e663 hotfix: auto deploy to warm.strudel.cc when main changes 2025-11-28 10:02:57 +01:00
ndr0n a6008e2700 added export to getSuperdoughAudioController() so that its possible to route superdough audio on external application integrations. 2025-11-28 04:03:48 +00:00
froos 2f8cabbb6b Merge pull request 'fix: return silence when no pattern is returned' (#1795) from fix-empty-pattern into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1795
2025-11-27 23:08:50 +01:00
Felix Roos ec26392509 fix: return silence when no pattern is returned 2025-11-27 22:53:38 +01:00
froos 30cd486f37 Merge pull request 'fix(tool/dbpatch): add missing package name' (#1765) from peterpf/strudel:bugfix/add-package-name-for-dbpatch into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1765
2025-11-27 22:47:01 +01:00
froos cde0520ed9 Merge pull request 'add CHANGELOG.md + basic script to generate' (#1794) from changelog into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1794
2025-11-27 22:38:04 +01:00
Felix Roos 405338e4f0 add CHANGELOG.md + basic script to generate 2025-11-27 22:25:32 +01:00
froos afbcaa54d0 Merge pull request '[perf] in noise, let noiseMix do the disconnect when it exists' (#1783) from jeromew/strudel:fix-perf9 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1783
2025-11-27 22:03:51 +01:00
froos 6a1c6081e0 Merge pull request 'Bug Fix: Retries for sounds tab' (#1754) from glossing/sounds-tab-preview into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1754
2025-11-27 22:01:00 +01:00
Felix Roos 3c4ba667c8 cleanup 2025-11-27 21:29:37 +01:00
Felix Roos 7fcb5262b8 Merge remote-tracking branch 'origin/main' into glossing/sounds-tab-preview 2025-11-27 21:14:22 +01:00
Felix Roos b824c45ba4 Merge remote-tracking branch 'origin/main' into glossing/sounds-tab-preview 2025-11-27 21:11:50 +01:00
froos e47e6c87fc Merge pull request '[hydra] return the hydra object when await initHydra(..) is called' (#1784) from jeromew/strudel:return-hydra into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1784
2025-11-27 20:36:44 +01:00
froos 69b5ba89cb Merge pull request 'Use errorLogger for query and tonal errors' (#1782) from glossing/query-error into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1782
2025-11-27 20:36:12 +01:00
froos 33a51761ce Merge pull request '[perf] level 5 connect-leak on vowel' (#1779) from jeromew/strudel:fix-perf7 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1779
2025-11-27 20:27:09 +01:00
Alex McLean f4b1baac87 add revv() for reversing whole patterns 2025-11-27 15:34:18 +00:00
Peter Egger d217119391 fix(tool/dbpatch): add missing package name 2025-11-26 19:48:48 +01:00
Switch Angel AKA Jade Rose d5d6284a90 Merge pull request 'feat: add prebake script import button for loading .strudel files' (#1774) from pre_eval into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1774
2025-11-26 08:23:37 +01:00
Switch Angel AKA Jade Rose fb790de26c Merge branch 'main' into pre_eval 2025-11-26 08:05:05 +01:00
Aria ec6f6a1f1c Merge pull request 'Fix Sampler port trampling' (#1717) from Dayglo/strudel:fix-port-trampling into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1717
Reviewed-by: Aria <glossing@noreply.codeberg.org>
2025-11-26 07:39:27 +01:00
W-A-James a126bc9b86 Fix lint 2025-11-25 22:20:55 -05:00
Aria a5c7fcc136 Add back options code (will resolve in another PR) 2025-11-25 22:16:23 -05:00
Aria d70b758065 Remove base url from sample server and properly handle url schemes 2025-11-25 22:16:11 -05:00
W-A-James 9fdba6374c remove extraneous eslint ignore directive 2025-11-25 22:14:19 -05:00
W-A-James af90baea33 Fix trampling of port env variable 2025-11-25 22:14:15 -05:00
Aria 692359309f Typo and formatting 2025-11-25 17:31:11 -06:00
Aria d65b908bda Disconnect lfos for phaser and filters 2025-11-25 17:27:37 -06:00
Aria 743e239e52 Merge pull request 'Feat: Hook up octave and fix example' (#1773) from glossing/hook-up-octave into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1773
2025-11-25 20:59:08 +01:00
Aria f44a96a5ce Merge branch 'main' into glossing/hook-up-octave 2025-11-25 20:50:49 +01:00
Aria b94a686394 Merge pull request '[perf] fix connect-leak in tremolo param' (#1780) from jeromew/strudel:fix-perf8 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1780
Reviewed-by: Aria <glossing@noreply.codeberg.org>
2025-11-25 20:48:07 +01:00
Aria 728552b669 Merge branch 'main' into fix-perf8 2025-11-25 20:30:18 +01:00
Aria 8b427bc1dd Add oct synonym 2025-11-25 13:19:39 -06:00
Aria 8529516c66 Add ability to turn mini parsing off with midi-off decorator 2025-11-25 13:05:27 -06:00
Aria ae47d767ce Merge branch 'main' into glossing/hook-up-octave 2025-11-25 20:02:43 +01:00
jeromew ab64451d65 [hydra] return the hydra object when await initHydra(..) is called 2025-11-25 10:49:30 +00:00
jeromew 89da9bbdb0 [perf] in noise, let noiseMix do the disconnect when it exists 2025-11-25 10:31:53 +00:00
Aria 2bc208d8f5 Use errorLogger for query and tonal errors 2025-11-24 19:05:42 -06:00
Aria 39e7f70079 Remove synonym 2025-11-24 18:44:29 -06:00
Aria 7e5a907ce5 Add a few more functions to autocomplete 2025-11-24 18:41:25 -06:00
Aria d7afb8a6c0 Add register example 2025-11-24 18:01:20 -06:00
Aria a278f21f1b Allow register in autocomplete, add vel as synonym for velocity, fix some controls 2025-11-24 17:52:00 -06:00
Switch Angel AKA Jade Rose cfeff26d42 Merge pull request 'filter modulation improvements!' (#1769) from filter_mod_improvements into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1769
2025-11-24 17:51:19 +01:00
jeromew e60ecba393 Merge branch 'fix-perf8' of https://codeberg.org/jeromew/strudel into fix-perf8 2025-11-24 16:36:14 +00:00
jeromew f0d49e0e22 [perf] fix connect-leak from audioworklet=>param in lfo/tremolo 2025-11-24 16:35:48 +00:00
Jade (Rose) Rowland 7ee6b933cc add tests 2025-11-24 11:33:21 -05:00
jeromew a3947d1ccf [perf] fix connect-leak from audioworklet=>param in lfo/tremolo 2025-11-24 16:33:20 +00:00
Jade (Rose) Rowland e86850b6d8 frequency mod 2025-11-24 11:19:49 -05:00
jeromew 89a6efb69e [perf] level 5 connect-leak on vowel 2025-11-24 16:10:00 +00:00
Jade (Rose) Rowland 31c694b596 Merge branch 'main' into filter_mod_improvements 2025-11-24 10:44:11 -05:00
Jade (Rose) Rowland 7a4babf6e1 format 2025-11-24 10:40:16 -05:00
Jade (Rose) Rowland d5e5ab83ac fix style 2025-11-24 10:39:37 -05:00
Aria 36587ae747 Switch back to original version 2025-11-23 22:55:36 -06:00
Aria 6c01c16a0c Fix typo 2025-11-23 22:39:21 -06:00
Aria be36898803 Formatting and examples 2025-11-23 22:29:33 -06:00
Aria df047fd48d Optimizations 2025-11-23 22:28:10 -06:00
Aria 68840de188 Working version 2025-11-23 20:58:28 -06:00
Aria 020a6bc75f First pass at transient processor 2025-11-23 20:31:31 -06:00
Jade (Rose) Rowland 20016fd9aa update hash 2025-11-23 20:25:13 -05:00
Aria 7bc6fcbf2a Add channel support to midi in 2025-11-23 18:24:48 -06:00
Switch Angel AKA Jade Rose 132a124644 Merge pull request 'Add o as a synonym for orbit' (#1766) from jade/orbitsynonym into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1766
Reviewed-by: Aria <glossing@noreply.codeberg.org>
2025-11-24 01:20:52 +01:00
Jade (Rose) Rowland 4caacb0de1 only eval if script 2025-11-23 19:12:28 -05:00
Jade (Rose) Rowland 8325b4cfc4 Merge branch 'main' into jade/orbitsynonym 2025-11-23 19:06:16 -05:00
Jade (Rose) Rowland 3b2df0b725 synonym: 2025-11-23 19:05:57 -05:00
Jade (Rose) Rowland f80fdbc38a Merge branch 'pre_eval' of ssh://codeberg.org/uzu/strudel into pre_eval 2025-11-23 18:59:26 -05:00
Jade (Rose) Rowland 3a7b237765 change variable name 2025-11-23 18:59:16 -05:00
Switch Angel AKA Jade Rose f5af55b63b Merge branch 'main' into pre_eval 2025-11-24 00:47:37 +01:00
Jade (Rose) Rowland d5dfbd7aa4 cleanup 2025-11-23 18:45:13 -05:00
Jade (Rose) Rowland 6221099af8 working 2025-11-23 18:09:38 -05:00
froos 22f1512697 Merge pull request '[perf] fix connect-leak in fm modulation' (#1758) from jeromew/strudel:fix-perf6 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1758
2025-11-23 22:23:24 +01:00
Aria 6c0d550b6b Fix example 2025-11-23 12:25:40 -06:00
Aria cf12e3e1d8 Hook up the octave control 2025-11-23 12:21:55 -06:00
froos 9a05a679aa Merge pull request 'Fix interoperability issue between all and await initHydra()' (#1663) from jeromew/strudel:jeromew-hydra-all into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1663
2025-11-23 09:47:22 +01:00
Switch Angel AKA Jade Rose 321e76166a Merge branch 'main' into filter_mod_improvements 2025-11-23 06:35:22 +01:00
Jade (Rose) Rowland bde17594ce test 2025-11-23 00:33:52 -05:00
Jade (Rose) Rowland 7bbb653963 fixed 2025-11-22 23:42:20 -05:00
Jade (Rose) Rowland 30e672a027 wip 2025-11-22 22:49:23 -05:00
Aria f7f3aa7668 Merge pull request 'Bug fix: Swap l/r gains with temp variable' (#1768) from glossing/stereo-bug into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1768
2025-11-23 04:23:04 +01:00
Aria adc3a9ac6c Swap with temp variable 2025-11-22 20:51:30 -06:00
Switch Angel AKA Jade Rose 2518b2aed2 Merge pull request 'FIX: prevent LFO filter modulation from popping from negative values' (#1767) from lpmod_improvements into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1767
2025-11-23 00:52:27 +01:00
Jade (Rose) Rowland 1d5f3a4f30 prevent filter modulation pops 2025-11-22 18:21:24 -05:00
Jade (Rose) Rowland 2efd56e331 add synonym 2025-11-22 18:10:28 -05:00
Switch Angel AKA Jade Rose 5fa6cb4653 Merge pull request 'prefix "S" for solo' (#1481) from solo into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1481
2025-11-23 00:03:31 +01:00
Jade (Rose) Rowland 19fd0fc649 rm unessecary file 2025-11-22 17:17:41 -05:00
Jade (Rose) Rowland e72e26eb81 add comment 2025-11-22 17:11:17 -05:00
Jade (Rose) Rowland 1c4b05d55f solo search n = 1 2025-11-22 16:40:31 -05:00
jeromew d453c861d3 Merge branch 'fix-perf6' of https://codeberg.org/jeromew/strudel into fix-perf6 2025-11-21 09:01:02 +00:00
jeromew f637b8b0dd [perf] fix connect-leak in fm modulation 2025-11-21 09:00:17 +00:00
Aria 06bf17f444 Merge pull request 'Bug Fix: Use frac due to negative frequencies from FM' (#1759) from glossing/droponelettertosaveears into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1759
2025-11-21 01:56:10 +01:00
Aria 21543956c6 Also for wavetable 2025-11-20 18:30:53 -06:00
Aria 4758effdc6 Use frac due to negative frequencies from FM 2025-11-20 18:22:44 -06:00
Aria 0e3840aff4 Merge branch 'main' into glossing/lfo-anything 2025-11-20 14:40:39 -06:00
Aria a929b36770 Remove room 2025-11-20 14:06:45 -06:00
froos 6f58e74bea Merge pull request '[perf] fix connect-leak added by #1742 when noise() is not used' (#1757) from jeromew/strudel:fix-perf5 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1757
2025-11-20 19:48:15 +01:00
jeromew 907f03f3bf [perf] fix connect-leak in fm modulation 2025-11-20 17:40:51 +00:00
jeromew 0435711051 [perf] fix connect-leak added by #1742 when noise() is not used 2025-11-20 17:36:00 +00:00
froos 8f6718b9e8 Merge pull request '[perf] fix connect-leak in delay effect' (#1755) from jeromew/strudel:fix-perf4 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1755
2025-11-20 14:50:59 +01:00
froos aa77255d98 Merge pull request '[perf] fix connect leak when .noise() is in the mix' (#1742) from jeromew/strudel:fix-perf3 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1742
2025-11-20 14:49:40 +01:00
jeromew 7267990e20 Fix codeformat 2025-11-20 13:35:37 +00:00
jeromew 387e5db0fe Merge branch 'fix-perf3' of https://codeberg.org/jeromew/strudel into fix-perf3 2025-11-20 13:24:03 +00:00
jeromew d9f63b8dfa [perf] fix connect leak when .noise() is in the mix 2025-11-20 13:21:09 +00:00
jeromew 8ed72b4573 [perf] fix connect-leak in delay effect 2025-11-20 13:05:41 +00:00
Aria 2794541dad Clean up send nodes and remove offset 2025-11-19 20:52:51 -06:00
Aria 3e118ce0a8 Fully working version 2025-11-19 20:11:02 -06:00
Aria c3ad0d1789 Fix for curve params 2025-11-19 20:01:17 -06:00
Aria 19b710c401 Mostly working version 2025-11-19 19:44:02 -06:00
Aria 74488f8480 Stray log message 2025-11-19 18:41:56 -06:00
Aria 8144ec46bd Attempt system for sounds tab previews 2025-11-19 18:35:35 -06:00
Aria 0dbca05de0 Ready for testing 2025-11-19 17:24:33 -06:00
Aria f8796d039f Add param guesses 2025-11-19 17:18:38 -06:00
Aria 442f487973 Another major cleanup 90% of first pass 2025-11-19 17:10:05 -06:00
scrappy_fiddler 4ec68fcd1d a little prettier 2025-11-20 00:07:44 +01:00
Aria 7ccdefe1c6 Huge overhaul for config part 1 2025-11-19 16:33:08 -06:00
Aria b73f624058 Trying out alias approach 2025-11-19 15:41:29 -06:00
scrappy_fiddler 7abfcd0f38 Merge branch 'main' into documentation 2025-11-19 22:18:32 +01:00
scrappy_fiddler 4504d1afd0 remove trailing spaces in FAQ 2025-11-19 22:14:23 +01:00
Aria e4466082eb Merge branch 'main' into glossing/upgrading-lfospr 2025-11-19 15:10:02 -06:00
Aria 29b6729246 First pass at improving controls 2025-11-19 15:03:11 -06:00
Felix Roos dd2c808cd7 hotfix: reduce sounds-tab click to play latency 2025-11-19 21:55:35 +01:00
Aria b3df7f438f Merge branch 'main' into glossing/lfo-anything 2025-11-19 14:43:47 -06:00
scrappy_fiddler 69c5df67f5 FAQ is now prettier 2025-11-19 21:40:48 +01:00
scrappy_fiddler a21f0d629e Merge branch 'main' into documentation 2025-11-19 20:24:34 +01:00
scrappy_fiddler 371e6c7d6d tidy up FAQ 2025-11-19 20:17:19 +01:00
scrappy_fiddler 0bb89d1a9f New page FAQ in "More" 2025-11-19 20:09:14 +01:00
Alex McLean 389a63a850 Merge pull request 'wchooseCycles has now notes in an example' (#1748) from scrappy_fiddler/strudel:documentation into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1748
2025-11-18 23:52:43 +01:00
Aria 654c1a86f0 Simplify declarations via globalThis; fix cleanup/stop 2025-11-18 16:02:33 -06:00
Felix Roos 3b1c75d3de fix: linting errors 2025-11-17 23:18:31 +01:00
Felix Roos 48407c309c add basic dough repl 2025-11-17 23:10:10 +01:00
scrappy_fiddler 99beb4454d update snapshot with note example 2025-11-17 20:49:26 +01:00
scrappy_fiddler 30cc46ea66 wchooseCycles has now notes in an example 2025-11-17 20:04:40 +01:00
Aria ac3f477f30 Merge branch 'main' into glossing/fmsss 2025-11-16 22:32:38 -06:00
Aria ea7dc7a732 Merge pull request 'Feature: Partials' (#1659) from glossing/strudel:glossing/partials into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1659
2025-11-17 05:31:53 +01:00
Aria 573cd1ae41 Merge branch 'main' into glossing/fmsss 2025-11-16 22:23:31 -06:00
Aria 641bd2f356 Properly patternify everything 2025-11-16 22:20:17 -06:00
Aria f5ed6dbe79 Top level functions 2025-11-16 20:28:22 -06:00
Aria 7a3bea6f90 Working version 2025-11-16 19:38:59 -06:00
Aria cc10122b71 Testing out approach to allow list patterns in partials 2025-11-16 19:20:42 -06:00
Aria b66c0d18b3 Merge branch 'main' into glossing/partials 2025-11-16 18:44:04 -06:00
Aria 17af92b2df Merge branch 'main' into glossing/random 2025-11-16 15:32:15 -06:00
Aria e90aa5202d Export withseed 2025-11-16 15:28:10 -06:00
Aria fb7f686519 Add seeding 2025-11-16 15:22:34 -06:00
froos 0331c91b80 Merge pull request 'README: update superdough documentation' (#1741) from TristanMlct/strudel:update-readme-superdough into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1741
2025-11-16 22:06:12 +01:00
Aria 4d5ebfc204 Merge pull request 'Feature: Envelope worklet' (#1524) from glossing/strudel:glossing/snappy-envs into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1524
2025-11-16 22:00:42 +01:00
Aria aca500ba73 Merge branch 'main' into glossing/random 2025-11-16 14:42:20 -06:00
Aria 921cb17d33 Merge branch 'main' into glossing/snappy-envs 2025-11-16 14:39:40 -06:00
Aria 832fd04a3d Merge pull request 'Worklet optimizations' (#1730) from glossing/optimizations into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1730
Reviewed-by: Switch Angel AKA Jade Rose <daslyfe@noreply.codeberg.org>
2025-11-16 21:08:53 +01:00
Aria d9c21489f8 Merge branch 'main' into glossing/optimizations 2025-11-16 20:13:31 +01:00
Aria 3962558c09 Some final tweaks 2025-11-16 13:12:47 -06:00
jeromew bfa8fa3c75 [perf] fix connect leak when .noise() is in the mix 2025-11-16 09:23:11 +00:00
Tristan Mlct 91799f2014 README: update superdough documentation 2025-11-15 15:06:44 +01:00
froos f6bb3869de Merge pull request '[perf] disconnect Offline AudioNode connections in generateReverb' (#1740) from jeromew/strudel:fix-perf2 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1740
2025-11-15 14:59:28 +01:00
froos b9e9c9e9e6 Merge pull request '[perf] disconnect send effect AudioNode when room is used' (#1736) from jeromew/strudel:fix-perf1 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1736
2025-11-15 14:57:46 +01:00
jeromew 92d87093e0 [perf] disconnect Offline AudioNode connections in generateReverb 2025-11-15 13:39:24 +00:00
jeromew 3e05525dc2 [perf] disconnect send effect AudioNode when room is used 2025-11-14 22:06:39 +00:00
Aria 22807b3833 Use weak references for sound sources 2025-11-14 16:05:09 -06:00
froos 0960741156 Merge pull request '[supradough] fix: unstable filter' (#1593) from supradough-filter-fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1593
2025-11-12 21:22:33 +01:00
Alex McLean bbb977afcc Merge pull request 'Fix link syntax in project-start' (#1724) from Kissaki/strudel:kissaki-patch-1 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1724
2025-11-12 21:12:06 +01:00
Alex McLean 81a4981a68 Merge pull request 'Fix web README sample code' (#1725) from Kissaki/strudel:kissaki-patch-2 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1725
2025-11-12 21:06:12 +01:00
Alex McLean 90d82c8988 Merge pull request 'Fix typo: 'studel' -> 'strudel'' (#1726) from drhayes/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1726
2025-11-12 20:59:39 +01:00
Aria 2875814a36 Square instead of self-multiply; more voices; more cleanup 2025-11-12 13:56:14 -06:00
Aria 157b05536a Final cleanup 2025-11-12 13:36:01 -06:00
Aria f8c9425569 Simplify spread 2025-11-12 13:13:37 -06:00
Aria be3a88b09c Optimize phase wrap; make voices k-rate 2025-11-12 12:23:40 -06:00
Aria aabf122161 Further optimizations, including detuner 2025-11-12 11:53:38 -06:00
Aria 3c6de3be6d First pass of worklets optimizations 2025-11-12 10:48:20 -06:00
froos 15f7b7c1a2 Merge pull request 'fix for node 24 support in tests - #1718' (#1719) from ausav/strudel:ausav.nodever into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1719
2025-11-12 15:23:36 +01:00
froos b6e382508f Merge pull request 'soundAlias example fix' (#1720) from PepsiiMan/strudel:docfix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1720
2025-11-11 09:00:47 +01:00
drhayes 3e7ae88043 Fix typo: 'studel' -> 'strudel' 2025-11-10 17:02:55 +01:00
froos 897a2016d0 Merge pull request 'fix: Make Supradough package build' (#1711) from munshkr/strudel:fix/1702-supradough-build into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1711
2025-11-10 08:18:35 +01:00
froos 7a1c1a75b1 Merge pull request 'added docs for spaces in scale names' (#1715) from ondras/strudel:scale-docs into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1715
2025-11-10 08:18:00 +01:00
ondras 7f06f11e96 Merge branch 'main' into scale-docs 2025-11-10 08:08:04 +01:00
Switch Angel AKA Jade Rose 5acb00795e Merge pull request 'Feature: LFOs for Filters' (#1636) from glossing/strudel:glossing/filter-lfo into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1636
2025-11-10 02:44:00 +01:00
Switch Angel AKA Jade Rose f4b68fa2e6 Merge branch 'main' into glossing/filter-lfo 2025-11-10 02:20:20 +01:00
PepsiiMan 1b37f1ed1d soundAlias example fix 2025-11-06 15:33:06 +01:00
ondras f8943dbc94 Merge branch 'main' into scale-docs 2025-11-06 08:16:34 +01:00
Ondřej Žára a3f82f90a9 test fix 2025-11-06 08:15:55 +01:00
Switch Angel AKA Jade Rose 670f75b7e8 Merge pull request 'improvement: sync midi messages to audio context clock' (#1708) from sync_midi_timing into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1708
2025-11-05 17:06:59 +01:00
Jade (Rose) Rowland 79875ebc50 fix branch 2025-11-05 01:26:36 -05:00
Switch Angel AKA Jade Rose a1bd905c06 Merge branch 'main' into sync_midi_timing 2025-11-05 07:25:06 +01:00
Alex Victoria 247bf9b930 fix for node 24 support #1718 2025-11-04 20:54:21 -06:00
froos 8f24ce223f Merge pull request 'Add stick button mappings to gamepad implementation and improve docs' (#1696) from kaosuryoko/strudel:gamepad-stick-button into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1696
2025-11-04 19:36:13 +01:00
froos 51648d3e6e Merge pull request 'Refactor sound stopping and triggering logic in SoundsTab component' (#1688) from IJOL/strudel:bugfix/multi-sample-loading into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1688
2025-11-04 19:29:34 +01:00
froos d4e67e1c20 Merge pull request 'Add setting to toggle pattern auto-start on pattern change' (#1690) from moumar/strudel:pattern-auto-start-setting into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1690
2025-11-04 19:13:20 +01:00
froos edf4739cc6 Merge pull request 'Voicings JSDoc' (#1686) from sharkeys_lunchbox/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1686
2025-11-04 18:58:50 +01:00
froos 3e636bd6f0 Merge branch 'main' into main 2025-11-04 18:55:34 +01:00
Ondřej Žára 4df2cc3086 added docs for spaces in scale names 2025-11-03 22:03:39 +01:00
moumar 809eb7132c codeformat 2025-11-02 15:20:31 +01:00
froos dd6429007e Merge branch 'main' into bugfix/multi-sample-loading 2025-11-02 14:56:30 +01:00
froos e211d5a6bb Merge branch 'main' into pattern-auto-start-setting 2025-11-02 14:44:31 +01:00
Damián Silvani 404d9999f3 fix: Update github.com links 2025-11-02 09:21:40 -03:00
Damián Silvani bc1c83ed64 fix: Add missing vite.config.js to supradough package 2025-11-02 09:21:25 -03:00
Jade (Rose) Rowland 91e1cc136e working 2025-11-01 23:34:10 -04:00
Switch Angel AKA Jade Rose 92e3a80e65 Merge pull request 'FIX: Loading local samples uses too much memory' (#1706) from jade/fix_sample_loading into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1706
2025-11-01 07:50:39 +01:00
Jade (Rose) Rowland 4f046ae883 cf 2025-11-01 02:40:40 -04:00
Jade (Rose) Rowland 2b575d50b9 temporarily disable sample autocomplete 2025-11-01 02:39:43 -04:00
Jade (Rose) Rowland 7b92874909 fix broken array 2025-11-01 01:55:05 -04:00
Jade (Rose) Rowland 10bfe32a2d rm console 2025-11-01 01:48:42 -04:00
Jade (Rose) Rowland a41b07c67a fixed build 2025-11-01 01:44:32 -04:00
Jade (Rose) Rowland 20027d7208 Merge branch 'jade/fix_sample_loading' of ssh://codeberg.org/uzu/strudel into jade/fix_sample_loading 2025-11-01 01:32:35 -04:00
Jade (Rose) Rowland f38792c569 format 2025-11-01 01:32:24 -04:00
Switch Angel AKA Jade Rose 2c2bfd7070 Merge branch 'main' into jade/fix_sample_loading 2025-11-01 06:31:25 +01:00
Jade (Rose) Rowland 484c5e6cdd working 2025-11-01 01:26:25 -04:00
Jason Dufair a036c4f921 Merge remote-tracking branch 'upstream/main' 2025-10-30 18:57:36 -04:00
froos 4c35f6a77b Merge pull request 'Bug Fix: Handle scale-for-notes when n also supplied' (#1625) from glossing/strudel:glossing/scale-with-note-and-n into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1625
2025-10-28 22:58:24 +01:00
froos e92f4938cd Merge branch 'main' into glossing/scale-with-note-and-n 2025-10-28 22:54:34 +01:00
froos 12204c9053 Merge pull request 'Repurpose vim shortcuts for usability' (#1624) from dtricks/strudel:feat/vim-shortcuts into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1624
2025-10-28 22:51:15 +01:00
froos 980bf17059 Merge branch 'main' into feat/vim-shortcuts 2025-10-28 22:38:04 +01:00
froos f2009a33aa Merge pull request 'Add support for euclidian in mondo with bd&3:8' (#1630) from TristanCacqueray/strudel:mondian into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1630
2025-10-28 22:35:19 +01:00
froos a65a68b828 Merge branch 'main' into mondian 2025-10-28 22:20:41 +01:00
alex cbe7aaacfb Publish
- @strudel/codemirror@1.2.6
 - @strudel/core@1.2.5
 - @strudel/csound@1.2.6
 - @strudel/draw@1.2.5
 - @strudel/gamepad@1.2.5
 - @strudel/hydra@1.2.5
 - @strudel/midi@1.2.6
 - @strudel/mini@1.2.5
 - @strudel/mondo@1.1.5
 - @strudel/motion@1.2.5
 - @strudel/mqtt@1.2.5
 - @strudel/osc@1.3.0
 - @strudel/repl@1.2.7
 - @strudel/serial@1.2.5
 - @strudel/soundfonts@1.2.6
 - superdough@1.2.6
 - supradough@1.2.4
 - @strudel/tonal@1.2.5
 - @strudel/transpiler@1.2.5
 - @strudel/web@1.2.6
 - @strudel/webaudio@1.2.6
 - @strudel/xen@1.2.5
2025-10-27 15:38:32 +00:00
Jason Dufair c0e7971be7 Merge remote-tracking branch 'upstream/main' 2025-10-27 09:26:47 -04:00
Alex McLean 35014b5190 Merge pull request 'Use bunny cdn for all samples and json files' (#1701) from bunny-cdn into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1701
2025-10-27 10:42:06 +01:00
alex 9ff0449ca3 use json files in dough-samples via bunny cdn 2025-10-27 09:24:17 +00:00
kaosuryoko b491c42af5 Merge branch 'main' into gamepad-stick-button 2025-10-27 00:36:50 +01:00
alex 8398385dcd piano via bunnycdn 2025-10-26 22:18:37 +00:00
Alex McLean 629c2b9301 Merge pull request 'degithub - switch some samples to bunnycdn' (#1697) from bunny-cdn into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1697
2025-10-26 22:52:53 +01:00
alex 5cc93996ce degithub 2025-10-26 21:49:10 +00:00
Greg Ervin ee43d85f29 Add stick button mappings to gamepad implementation and improve docs 2025-10-26 13:31:13 -05:00
Alex McLean 7cef558440 Merge pull request 'Fix ZZFX example' (#1685) from moumar/strudel:fix-zzfx-example into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1685
2025-10-26 17:09:20 +01:00
Alex McLean c261fb6dd6 Merge branch 'main' into fix-zzfx-example 2025-10-26 17:08:56 +01:00
moumar fcd83cce55 Re-evaluate pattern if activated 2025-10-26 14:07:36 +01:00
moumar fddf2ff2a7 Set pattern auto-start to true by default 2025-10-26 14:06:31 +01:00
Jason Dufair 6d4787ee33 Test snapshot 2025-10-24 09:21:04 -04:00
Jason Dufair 1a362bd8ea Fix example 2025-10-24 09:19:02 -04:00
BANanaD3V 03d2f363f1 Merge branch 'main' into feat/non-realtime-exporting 2025-10-24 13:09:09 +02:00
Nikita ff370cf86f Reapply realtimeOptions after export 2025-10-24 14:07:57 +03:00
moumar 28056deb66 Fix ZZFX example
ZZFX example did not produce any sound out of the box, fixed by updating
tremolo param.
2025-10-23 23:15:53 +02:00
moumar 20bbda30f8 Add setting to toggle pattern auto-start on pattern change 2025-10-23 23:15:21 +02:00
Nikita 9cbeaef88d Format 2025-10-23 22:21:40 +03:00
Nikita ca936aada7 Fix incorrect duration calculation 2025-10-23 21:46:13 +03:00
Ignacio Ortega a8c613b7eb Refactor sound stopping and triggering logic in SoundsTab component 2025-10-23 19:04:29 +02:00
Jason Dufair fd0a910bfb Voicings JSDoc 2025-10-23 11:11:21 -04:00
Nikita fe70a2df43 Format 2025-10-23 17:08:11 +03:00
Nikita 6baca67cd3 Fix maxPolyphony and multiChannelOrbits not applying to export 2025-10-23 17:07:53 +03:00
yaxu 7071dec775 revert 39e2221c29
revert add _processParts()
2025-10-23 16:07:42 +02:00
Alex McLean 3d55567445 Merge branch 'main' of ssh://codeberg.org/uzu/strudel 2025-10-23 15:05:50 +01:00
Alex McLean 39e2221c29 add _processParts() 2025-10-23 15:05:39 +01:00
BANanaD3V 85f6454340 Merge branch 'main' into feat/non-realtime-exporting 2025-10-23 16:05:09 +02:00
Alex McLean b8ce920f50 Merge pull request 'Make osc port and host configurable. Changes dependencies.' (#1682) from multiosc into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1682
2025-10-23 15:56:00 +02:00
yaxu ccb5ec1685 Add action to deploy 'beta' version to warm.strudel.cc 2025-10-23 10:41:29 +02:00
yaxu b09230fe90 Update .forgejo/workflows/deploy.yml 2025-10-23 10:40:08 +02:00
yaxu 8f7b439dce Move deploy location to deploy/strudel.cc 2025-10-23 10:39:26 +02:00
Aria c823a37c93 Merge pull request 'Adds back shape to superdough' (#1672) from glossing/strudel:glossing/return-shape-to-sd into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1672
2025-10-23 03:47:30 +02:00
Aria 0c9f535ff5 Merge branch 'main' into glossing/return-shape-to-sd 2025-10-23 03:44:44 +02:00
froos fb5884ab81 Merge pull request 'Fix sampler.mjs githubPath' (#1684) from jeromew/strudel:fix-githubpath into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1684
2025-10-22 22:15:17 +02:00
Nikita 16f885c010 Use errorLogger instead 2025-10-22 23:09:30 +03:00
jeromew ea91d30ce4 Add semicolon 2025-10-22 21:52:53 +02:00
Nikita 5a70599aac Ignore superdough errors when exporting, instead skip sound. 2025-10-22 22:48:04 +03:00
jeromew f0bd5bffaa Fix sampler.mjs githubPath
PR https://codeberg.org/uzu/strudel/pulls/1679 introduced a subtle bug when both other and subpath are empty. The url should not end with '//'
2025-10-22 21:39:08 +02:00
Nikita 7b74a902a2 Remove unneeded imports 2025-10-22 20:05:03 +03:00
Nikita 95700e1196 Fix wavetables breaking after playback 2025-10-22 20:00:36 +03:00
Alex McLean ac37b6a029 Merge pull request 'Fix onPaint for widgets' (#1658) from fix-onpaint into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1658
2025-10-22 16:20:49 +02:00
Nikita e7578be6c5 Remove preloading code and instead await superdough 2025-10-22 17:16:05 +03:00
Nikita 28df4259b8 Merge remote-tracking branch 'upstream/main' into feat/non-realtime-exporting 2025-10-22 16:21:34 +03:00
Nikita 5e27358fe8 Better preloading 2025-10-22 16:19:58 +03:00
froos a986688874 Merge pull request 'Fix a bug introduced by #4e17cfbdd6' (#1679) from milliganf/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1679
2025-10-22 15:19:11 +02:00
froos 4ab8c256b2 Merge branch 'main' into main 2025-10-22 15:18:53 +02:00
alex 06ea5a36e2 Make osc port and host configurable. Changes dependencies. 2025-10-22 10:15:48 +01:00
Nikita daea207aff Better sample loading 2025-10-21 22:42:01 +03:00
Nikita 92d3fe496d Bug fixes 2025-10-21 21:00:30 +03:00
Nikita 98031676d6 Add an EOL character to package.json 2025-10-21 16:44:42 +03:00
Nikita 498624f6fe Make server.js a normal file 2025-10-21 16:35:33 +03:00
Nikita bf702c3b2a Reviewed changes 2025-10-21 16:30:18 +03:00
froos 6e4dae4dfa Merge branch 'main' into feat/non-realtime-exporting 2025-10-21 14:24:09 +02:00
froos 98f5a56ef6 Merge pull request 'feature/autocomplete-sound-names' (#1564) from drdozer/strudel:feature/autocomplete-sound-names into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1564
2025-10-20 22:37:14 +02:00
milliganf 46af6ed9ef Fix a bug introduced by #4e17cfbdd6
When there's no subpath for a Github path, the URL should end with a '/'. Otherwise when we concatenate values on from a sample map it doesn't separate the base URL from the filename.

Signed-off-by: milliganf <m.h.freeson@outlook.com>
2025-10-20 22:30:58 +02:00
froos 752940b3ab Merge branch 'main' into feature/autocomplete-sound-names 2025-10-20 22:17:45 +02:00
froos c727534d29 Merge pull request 'add replicate + use it for ! in mondo' (#1436) from JoStro/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1436
2025-10-20 21:58:11 +02:00
Felix Roos 20e5fdedfb fix: use replicate for ! in mondo 2025-10-20 21:38:43 +02:00
Felix Roos 188f0e9098 snapshot 2025-10-20 21:35:28 +02:00
Felix Roos c2a5562bad add new flavour under replicate 2025-10-20 21:24:13 +02:00
froos 57f2a97b7b Merge branch 'main' into main 2025-10-20 21:21:08 +02:00
Nikita a8ea9a1b63 Update lockfile 2025-10-20 21:26:40 +03:00
Nikita a2b76bde14 Format 2025-10-20 21:24:54 +03:00
Nikita 0f652e8b5b Remove webaudio from core dependencies 2025-10-20 21:24:27 +03:00
Nikita 2a0635879c Format 2025-10-20 20:58:27 +03:00
Nikita f5fc0ff9d1 Remove resetGlobalEffects from AudioContext 2025-10-20 20:58:01 +03:00
Nikita 7774364ac7 Add webaudio as a workspace dependency 2025-10-20 20:36:36 +03:00
Nikita 329289fc35 Revert refreshing deps 2025-10-20 20:33:25 +03:00
Nikita 8b3c0d2a4a Refresh deps 2025-10-20 20:27:31 +03:00
Nikita 120b46c4a5 Add webaudio as a cyclist dependency (do we want that?) 2025-10-20 20:24:42 +03:00
Nikita 4bdaf577c0 Format 2025-10-20 20:22:16 +03:00
Nikita 428a4b3dd7 Revert workletsUrl to use ?audioworklet 2025-10-20 20:21:23 +03:00
Nikita ff83994733 Better export UI 2025-10-20 20:19:52 +03:00
Nikita 418bca79b2 Disable button when exporting & min start cycle is 0 2025-10-19 23:05:33 +03:00
Nikita b3715dc5df WIP export UI 2025-10-19 23:02:20 +03:00
Nikita 9a47e0f11e close() doesn't exist for OfflineAudioContext 2025-10-19 19:47:23 +03:00
Nikita 908c0e44ff Fix worklets not loading 2025-10-19 19:44:53 +03:00
Nikita 920776fdfe Re-init audio before and after export 2025-10-19 15:10:31 +03:00
Nikita 0fbde61b2d WIP non-realtime exporting 2025-10-19 14:38:50 +03:00
Aria 4c49cd9297 More examples 2025-10-18 11:24:56 -05:00
Aria 70d2da81d8 Merge branch 'main' into glossing/fmsss 2025-10-18 11:01:23 -05:00
Aria 72423c3a25 Adds back shape to superdough 2025-10-18 10:41:33 -05:00
alex 92a82ce4bd delint 2025-10-18 10:49:15 +01:00
alex b2ce4591d9 sort exports and add impure.mjs 2025-10-18 10:42:55 +01:00
alex 1be9f40574 timeline feature 2025-10-18 10:42:35 +01:00
Felix Roos 105db2a4ca fix: tonal import in autocomplete + add tonal to codemirror package dependencies 2025-10-18 08:49:31 +02:00
froos be61d08cc6 Merge branch 'main' into feature/autocomplete-sound-names 2025-10-18 08:41:15 +02:00
Switch Angel AKA Jade Rose 6e58c973af Merge pull request 'Bug Fix: Wavetable: phase wrapping at 1 and detune' (#1620) from glossing/strudel:glossing/wrap-phase-typo into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1620
2025-10-18 04:29:19 +02:00
Switch Angel AKA Jade Rose 2473a5391d Merge branch 'main' into glossing/wrap-phase-typo 2025-10-17 04:55:25 +02:00
Aria c02def03b6 Don't tag when scale fails, allow mixed sharps and flats, simplify scale function 2025-10-16 16:26:33 -05:00
froos 4e17cfbdd6 Merge pull request 'github samples: default to "samples" if repository is not specified' (#1644) from prezmop/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1644
2025-10-16 20:26:26 +02:00
prezmop 83c7e63432 update docs 2025-10-16 18:20:22 +02:00
prezmop 909e0154fe default to samples if repo not found 2025-10-16 18:20:13 +02:00
froos ef4e21ac40 Merge pull request 'Docs: add example of custom chained function' (#1642) from dariusk/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1642
2025-10-16 17:33:39 +02:00
froos 857c82e260 Merge branch 'main' into main 2025-10-16 17:25:07 +02:00
froos 0d5dc1f8c1 Merge branch 'main' into glossing/scale-with-note-and-n 2025-10-16 17:19:07 +02:00
jeromew 47c85f8540 fix interoperability of all with hydra
Hydra add methods on Array.prototype which breaks the Array enumeration with for...in.
Use for...of instead
cf https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#difference_between_for...of_and_for...in for details on the issue

without this fix, it is impossible to use both `await initHydra()` and `all` in the same strudel code. Strudel errors with "Error: got "undefined" instead of pattern."

example code: https://strudel.cc/#YXdhaXQgaW5pdEh5ZHJhKCkKCmFsbChwaWFub3JvbGwpCgokOiBzKCJiZCIp
2025-10-16 14:06:33 +02:00
Aria fd03d1fdfb Update conditional to allow to control user waveforms 2025-10-15 15:14:31 -05:00
Aria 35016b5847 Mention range in docstring 2025-10-15 14:56:20 -05:00
Aria 0fe7edc157 Some examples 2025-10-15 14:53:07 -05:00
Aria d6de160224 Merge branch 'main' into glossing/partials 2025-10-15 13:19:57 -05:00
alex ba93bd1bc5 Fix onPaint for widgets 2025-10-15 18:54:02 +01:00
Aria 3c1a8c8bdb Format 2025-10-14 11:41:11 -05:00
Aria b7e941c649 Merge branch 'main' into glossing/wrap-phase-typo 2025-10-14 11:40:29 -05:00
Aria ac7e9c6978 Typos on envelope values 2025-10-14 11:37:41 -05:00
Aria c13a726129 Merge branch 'main' into glossing/filter-lfo 2025-10-14 11:24:49 -05:00
Switch Angel AKA Jade Rose ded91fab7d Merge pull request 'Feature: Distortion Modes' (#1561) from glossing/strudel:glossing/distortion-modes into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1561
2025-10-13 07:26:50 +02:00
Switch Angel AKA Jade Rose f40d079543 Merge pull request 'Feature: Wavetable FM' (#1623) from glossing/strudel:glossing/wavetable-fm into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1623
2025-10-13 07:05:56 +02:00
Switch Angel AKA Jade Rose d5833dd475 Merge branch 'main' into glossing/wavetable-fm 2025-10-13 07:05:24 +02:00
Switch Angel AKA Jade Rose 99b3c04a76 Merge branch 'main' into glossing/filter-lfo 2025-10-13 07:04:51 +02:00
Switch Angel AKA Jade Rose e3658ec30e Merge pull request 'fix: repair REPL sample sources and URL concat (#1640)' (#1646) from erikfox/strudel:fix-repl-sample-sources-1640 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1646
2025-10-12 20:43:41 +02:00
Erik Fox 72eaf96b4f fix: repair REPL sample sources and URL concat (#1640) 2025-10-12 12:30:36 -04:00
Darius Kazemi 9c5c71c31a Removing semicolon to be more idiomatic;;; 2025-10-11 17:52:26 -07:00
Darius Kazemi af53bab259 Fixing some syntax and a typo 2025-10-11 17:50:58 -07:00
Darius Kazemi 0065db8569 Docs: add example of custom chained function
This adds a subsection to the "Understand/Coding Syntax" documentation that shows a simple example of converting the previous chain of effects into a custom, reusable chained function. There's also a prompt for the reader to experiment.
2025-10-11 17:40:55 -07:00
Alex McLean 7eebf3a466 Merge pull request 'Add control-metadata' (#1634) from control-metadata into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1634
2025-10-10 11:25:00 +02:00
Aria 57fac57677 Remove todo 2025-10-09 22:23:28 -05:00
Aria a3b803c3f3 First pass 2025-10-09 18:28:59 -05:00
Aria 6f703e48e7 Merge branch 'main' into glossing/wrap-phase-typo 2025-10-08 16:44:35 -05:00
Alex McLean 64f16c4f33 placate format gods 2025-10-08 15:35:34 +01:00
Alex McLean ffbbc43c89 add cyclist version to the query metadata 2025-10-08 15:34:51 +01:00
Alex McLean 086596c47c fix setControls to do union with existing controls 2025-10-08 14:52:00 +01:00
Alex McLean fdde05e751 add pattern id to query state controls 2025-10-08 14:51:21 +01:00
Alex McLean 694162a7b1 fix purity of 'withState' so it returns a new pattern 2025-10-08 14:13:33 +01:00
Felix Roos 319a2d7289 fix: tests 2025-10-07 23:05:00 +02:00
Felix Roos 3a7d50924d refactor: add op_precedence to express & with desugar_ops 2025-10-07 22:59:50 +02:00
Alex McLean cbcb25b063 Merge pull request 'Fix MQTT: change the trigger handler to match new hap' (#1629) from jurrchen/strudel:bugfix/mqtt-hap-sig into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1629
2025-10-07 22:59:38 +02:00
Felix Roos f33db5f07f - refactor bjork -> bjorklund
- refactor e -> bjork
- flip & desugared arguments
2025-10-07 22:35:29 +02:00
Tristan de Cacqueray b7fa440bda mondough: interpret & 2025-10-07 18:10:24 +02:00
Tristan de Cacqueray 3dc9b3524c mondo: add & sugar 2025-10-07 17:19:27 +02:00
dtricks f48f8e46e5 fix empty catches 2025-10-06 15:53:44 +02:00
dtricks a79fc3db5b remove unnecessary comments 2025-10-06 15:53:44 +02:00
dtricks 30a2e14959 weird permission change 2025-10-06 15:53:44 +02:00
dtricks cfe17fcba5 wrong unicode char 2025-10-06 15:53:44 +02:00
dtricks 46ba165c7e remove gcc 2025-10-06 15:53:44 +02:00
dtricks 73a9834959 codeformat 2025-10-06 15:53:44 +02:00
dtricks be9368e8a2 feat(codemirror): add Vim :w evaluate, :q stop, and gc/gcc toggle comment via custom events; docs: add Vim shortcuts page and link from REPL manual 2025-10-06 15:53:44 +02:00
Aria 1ae773acc4 Merge branch 'main' into glossing/wrap-phase-typo 2025-10-05 18:21:05 -05:00
Aria 39a73f2499 Merge branch 'main' into glossing/scale-with-note-and-n 2025-10-05 18:20:30 -05:00
froos 53c504f260 Merge branch 'main' into feature/autocomplete-sound-names 2025-10-05 21:50:45 +02:00
Jieren Chen 0d08225983 change the trigger handler to match new hap 2025-10-05 21:45:23 +02:00
froos 00872bd1de Merge pull request 'Fix case sensitivity for synonym search' (#1618) from vvolhejn/strudel:vv/fix-case-sensitivity into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1618
2025-10-05 21:42:18 +02:00
Aria cc4452ce58 Working version of partials and phases 2025-10-04 20:33:25 -05:00
Aria 11dd8a318a Cleanup 2025-10-04 02:13:42 -05:00
Aria 3ef6c7c921 Handle scale-for-notes when n also supplied 2025-10-04 02:07:35 -05:00
Aria 120f89d57f Handle detune in the presence of pitch envelope 2025-10-04 01:37:57 -05:00
Aria bd73d96847 Cleanup 2025-10-03 18:49:49 -05:00
Aria 7cf9db4872 Big matrix refactor 2025-10-03 18:20:41 -05:00
Aria c9381a11f9 Working version 2025-10-03 17:21:05 -05:00
Aria d496919fe5 Import 2025-10-02 22:48:41 -05:00
Aria f369de13d7 Hook up FM to wavetables 2025-10-02 22:45:48 -05:00
Dr Mathew R Pocock 908a703b7f Merge branch 'main' into feature/autocomplete-sound-names 2025-10-02 10:32:16 +02:00
Aria 99e14dae5c Consistency 2025-10-02 01:12:42 -05:00
Aria ac582b4d40 Wrap properly when phase === 1 2025-10-02 01:06:29 -05:00
Václav Volhejn b7d98dd370 Fix case sensitivity for synonym search 2025-10-01 21:53:28 +02:00
Alex McLean 0ecacae71e format 2025-10-01 12:02:09 +01:00
yaxu 8cd497abb2 Update website/src/pages/technical-manual/project-start.mdx 2025-10-01 12:54:58 +02:00
Switch Angel AKA Jade Rose 070055d2ef Merge pull request 'Optimize wavetable synth' (#1613) from glossing/strudel:glossing/wavetable-optimizations into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1613
2025-10-01 08:56:33 +02:00
Switch Angel AKA Jade Rose e500ebe268 Merge branch 'main' into glossing/wavetable-optimizations 2025-10-01 08:54:53 +02:00
Aria 72298c5f03 Docstring cleanup 2025-10-01 00:45:26 -05:00
Aria c885d84785 Add comment 2025-10-01 00:39:44 -05:00
Aria a14bf4d97b Add aliases for distort types 2025-10-01 00:36:59 -05:00
Aria c5f1085bd9 WIP 2025-09-30 23:51:59 -05:00
Aria ccbf28f2db Merge branch 'main' into glossing/distortion-modes 2025-09-30 23:25:57 -05:00
Aria 3a7ec18d46 Move invsr to constructor 2025-09-30 23:19:55 -05:00
Aria a2b8407fbb Add back mipmaps; add caching 2025-09-30 23:08:28 -05:00
Switch Angel AKA Jade Rose ac1fd88d8d Merge pull request 'fix: pattern switching' (#1616) from fix_pattern_Switching into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1616
2025-10-01 02:02:30 +02:00
Jade (Rose) Rowland 9f8143e062 format 2025-09-30 19:46:53 -04:00
Jade (Rose) Rowland cdc5e5f3f3 working 2025-09-30 19:45:30 -04:00
Aria bad498a1e5 Remove unused var 2025-09-30 16:21:28 -07:00
Switch Angel AKA Jade Rose f4cf77f5c6 Merge branch 'main' into solo 2025-09-30 08:09:37 +02:00
Aria 4de0c11f8c Remove mipmaps, fix clamping of parameters 2025-09-29 14:15:50 -07:00
Dr Mathew R Pocock 97af50222f Merge branch 'main' into feature/autocomplete-sound-names 2025-09-29 18:10:12 +02:00
Switch Angel AKA Jade Rose f360d394a7 Merge pull request 'fix wavetable JSON' (#1611) from fix_JSON into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1611
2025-09-29 02:10:53 +02:00
Jade (Rose) Rowland 48718daea8 add_vgame 2025-09-28 19:57:19 -04:00
Jade (Rose) Rowland 8d45016ccf working 2025-09-28 19:11:13 -04:00
Switch Angel AKA Jade Rose ec69f6fd77 Merge pull request 'rename wavetable controls to match existing naming conventions' (#1610) from wavetable_controls into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1610
2025-09-28 21:28:15 +02:00
Jade (Rose) Rowland d94f145649 fix vib 2025-09-28 15:23:58 -04:00
Jade (Rose) Rowland bf3fe605d9 fix unison gain 2025-09-28 15:21:06 -04:00
Jade (Rose) Rowland 54ebc97ddc fix tests 2025-09-28 15:07:35 -04:00
Jade (Rose) Rowland c689874bb4 simplify modulators 2025-09-28 14:57:12 -04:00
Jade (Rose) Rowland 23d4bfa9d9 rename controls 2025-09-28 09:19:39 -04:00
Switch Angel AKA Jade Rose 91eb50f1c1 Merge pull request '<Warn: Don't merge until tables uploaded> Feature: Wavetable synth improvements' (#1607) from glossing/strudel:glossing/wavetable-synth into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1607
2025-09-27 23:28:12 +02:00
Aria 5838ade740 Merge branch 'main' into glossing/wavetable-synth 2025-09-27 13:17:05 -07:00
Aria 917d01c47d Add LFOs and envelopes 2025-09-27 12:48:37 -07:00
Switch Angel AKA Jade Rose 0a51718df3 Merge pull request 'wavetable improvements' (#1608) from wt_improvements into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1608
2025-09-27 21:43:09 +02:00
Jade (Rose) Rowland 774372a339 format 2025-09-27 15:29:55 -04:00
Jade (Rose) Rowland 626a99ba5b supports old documented way of loading wavetables: 2025-09-27 15:22:54 -04:00
Aria 8c3ee6db6b Missed deletion 2025-09-27 11:07:04 -07:00
Aria c5c05ebadc Clean up to align with other PR 2025-09-27 11:02:57 -07:00
Aria a8918d55fb Actually update normalizer 2025-09-27 10:45:30 -07:00
Aria 07e3ddbe40 Merge branch 'main' into glossing/distortion-modes 2025-09-27 10:25:51 -07:00
Jade (Rose) Rowland a9957b45e5 suppoert existing wt_ api 2025-09-27 13:22:21 -04:00
Jade (Rose) Rowland 4bd103e612 gain adj 2025-09-27 11:31:43 -04:00
Aria 466234bad6 Merge branch 'main' into glossing/wavetable-synth 2025-09-26 21:22:45 -07:00
Aria 97beaec25a Added examples, fixed samplerate issue on import, added to settings tab, fixed spread, added default wavetables, change default phaserand to 0 2025-09-26 20:46:10 -07:00
Jade (Rose) Rowland 2b3b638943 sample source for WT 2025-09-26 21:47:45 -05:00
Switch Angel AKA Jade Rose e1629e8383 Merge pull request 'create orbit based DJ filter' (#1603) from djf into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1603
2025-09-26 08:48:45 +02:00
Jade (Rose) Rowland 266cb614a8 add better example 2025-09-25 23:44:32 -07:00
Jade (Rose) Rowland dfc4a0818c res adjust 2025-09-25 23:39:08 -07:00
Jade (Rose) Rowland 236ff577a6 Merge branch 'main' into djf 2025-09-25 23:18:22 -07:00
Switch Angel AKA Jade Rose 66a32ac45d Merge pull request 'Feature: Wavetable synth' (#1525) from glossing/strudel:glossing/wavetable-synth into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1525
2025-09-26 08:15:48 +02:00
Aria 8b2c35b7a3 Cleanup 2025-09-25 01:10:41 -07:00
Aria f8f42565ae Typo - add back slight delay in cleanup 2025-09-25 00:40:25 -07:00
Aria 96981c3c1d A bit more cleanup 2025-09-25 00:36:28 -07:00
Aria bd8d207a3d Typo 2025-09-25 00:17:13 -07:00
Aria e3741ae8fa Add control over phase randomization and fix a bug with supersaw 2025-09-25 00:05:50 -07:00
Switch Angel AKA Jade Rose ef87f65bef Merge branch 'main' into glossing/wavetable-synth 2025-09-25 07:21:17 +02:00
Aria b3537a9acb Some cleanup 2025-09-24 22:17:30 -07:00
Aria d3d9f23c3c Remove unnecessary defaulting 2025-09-24 22:06:53 -07:00
Jade (Rose) Rowland c474b8c92e rm comment 2025-09-24 20:33:51 -07:00
Jade (Rose) Rowland da81ba00fb adjust control range 2025-09-24 20:32:45 -07:00
Aria f0669ce3ba Move algorithm into constructor 2025-09-24 17:32:03 -07:00
Jade (Rose) Rowland 28c94efaa9 format 2025-09-24 00:24:25 -07:00
Jade (Rose) Rowland 0633954e24 working 2025-09-24 00:23:05 -07:00
Switch Angel AKA Jade Rose cedf09168f Merge pull request 'fix: time signal' (#1583) from fix_time into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1583
2025-09-23 13:28:19 +02:00
Switch Angel AKA Jade Rose 3373225f53 Merge branch 'main' into fix_time 2025-09-23 13:13:51 +02:00
Jade (Rose) Rowland 1eb9dc73fa fix duck 2025-09-22 00:34:57 -04:00
Jade (Rose) Rowland fdcdc3aaa0 rm deadcode 2025-09-22 00:13:59 -04:00
Jade (Rose) Rowland da926805b3 rm dead code 2025-09-22 00:12:48 -04:00
Jade (Rose) Rowland 82893ffc22 fix import 2025-09-22 00:11:02 -04:00
Jade (Rose) Rowland beafd9c700 format 2025-09-22 00:07:06 -04:00
Jade (Rose) Rowland c5bd2a7487 working 2025-09-21 23:54:04 -04:00
Kissaki 4d39f36868 Fix web README sample code
Looks like the code was copied, and then the wrong string was replaced when creating this code sample.
2025-09-21 18:31:59 +02:00
Kissaki c64aa3bf01 Fix link syntax in project-start 2025-09-21 18:27:05 +02:00
Dr Mathew R Pocock b4d57f12fe Merge branch 'main' into feature/autocomplete-sound-names 2025-09-21 18:13:40 +02:00
froos 118086aff5 Merge pull request 'mondo: fix all + setcpm + setcps' (#1600) from mondo-fixes into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1600
2025-09-21 16:16:05 +02:00
Felix Roos 452827630b move unpure up 2025-09-21 16:13:09 +02:00
Felix Roos 86248328cc fix: mondo setcps / setcpm 2025-09-21 16:09:10 +02:00
Felix Roos 8833d623f7 fix: all function in mondo 2025-09-21 16:06:28 +02:00
froos 3fff4609a0 Merge pull request 'fix: osc error message' (#1597) from osc-debug-flag into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1597
2025-09-19 21:59:42 +02:00
Dr Mathew R Pocock 98a1573e27 Merge branch 'main' into feature/autocomplete-sound-names 2025-09-18 22:54:41 +02:00
Matthew Pocock 7080490c68 Merge handlers and cache regexes in autocomplete
- Merged scalePreColonHandler and scaleAfterColonHandler into single scaleHandler
- Merged modePreColonHandler and modeAfterColonHandler into single modeHandler
- Cached all regex patterns as constants above their respective handler functions
- Eliminated regex compilation overhead on every keystroke/navigation event
- Improved code maintainability by reducing duplication between similar handlers
- Preserved exact same functionality while improving performance

Each handler now follows a consistent pattern of checking after-colon context
first (more specific) then pre-colon context, with all regex patterns
pre-compiled for better performance during intensive autocomplete sessions.
2025-09-18 21:52:40 +01:00
froos e2b5b92a0c Merge pull request 'osc: --debug flag to see incoming messages' (#1595) from osc-debug-flag into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1595
2025-09-18 21:09:55 +02:00
Felix Roos 1c3e07afd3 fix: rephrase error message + bump to 1.2.10 2025-09-18 20:40:25 +02:00
Felix Roos c54fa7d266 chore: bump osc to 1.2.8 2025-09-18 20:39:05 +02:00
Felix Roos a25f763796 docs: add --debug flag to readme 2025-09-18 20:37:19 +02:00
Felix Roos 91ad3d729f feat: osc add --debug flag to log messages + log errors 2025-09-18 20:36:40 +02:00
Felix Roos a0c2edad30 fix: add clamp function 2025-09-18 10:54:41 +02:00
Felix Roos 82c9047195 fix: unstable filter 2025-09-18 10:47:23 +02:00
Matthew Pocock f51ad2cb7e Merge branch 'main' into feature/autocomplete-sound-names 2025-09-17 23:08:06 +01:00
froos 4cb0488839 Merge pull request 'simplify osc usage' (#1588) from osc-server-via-npx into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1588
2025-09-17 14:12:09 +02:00
Felix Roos 663229ecde bump osc to 1.2.8 2025-09-17 13:50:02 +02:00
Felix Roos cdb623cb66 overhaul osc readme 2025-09-17 13:39:35 +02:00
Felix Roos 28d7e0e489 export osc function to be able to do all(osc) 2025-09-17 13:39:28 +02:00
Felix Roos aba594b72a fix: bin field 2025-09-17 12:52:42 +02:00
Felix Roos 5d7c6c3e4b fix: add node shebang + bump osc to 1.2.6 2025-09-17 12:47:41 +02:00
Felix Roos 820744dc27 bump osc to 1.2.5 2025-09-17 12:42:11 +02:00
Felix Roos 5445f0812f configurable port for osc bridge + add bin field 2025-09-17 12:41:46 +02:00
Dr Mathew R Pocock 49868fc119 Merge branch 'main' into feature/autocomplete-sound-names 2025-09-16 21:00:40 +02:00
Jade (Rose) Rowland a68c784753 rm unessecary change 2025-09-16 11:55:31 -04:00
Jade (Rose) Rowland f2b2f9f959 format 2025-09-16 11:53:19 -04:00
Jade (Rose) Rowland 53dd53553a Merge branch 'main' into fix_time 2025-09-16 11:52:54 -04:00
Jade (Rose) Rowland 89b7eac789 fix test 2025-09-16 11:52:36 -04:00
Jade (Rose) Rowland 9cdba1a50e Working 2025-09-16 11:36:21 -04:00
Switch Angel AKA Jade Rose 98b7003504 Merge pull request 'dev: logger errors to console in dev mode' (#1585) from devlog into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1585
2025-09-16 16:59:57 +02:00
Matthew Pocock cb2dc6304f Merge branch 'feature/autocomplete-sound-names' of ssh://codeberg.org/drdozer/strudel into feature/autocomplete-sound-names 2025-09-16 14:51:50 +01:00
Matthew Pocock edb6c0db2e Reordered handlers to be a bit more organised. 2025-09-16 14:45:22 +01:00
Dr Mathew R Pocock a46a055246 Merge branch 'main' into feature/autocomplete-sound-names 2025-09-16 15:42:35 +02:00
Jade (Rose) Rowland 9a8f8a051c rm comment 2025-09-16 01:48:37 -04:00
Jade (Rose) Rowland 3eb40ee7d3 working in dev 2025-09-16 01:44:01 -04:00
Jade (Rose) Rowland 4cc453c640 fix test 2025-09-15 22:09:05 -04:00
Jade (Rose) Rowland 74e27ca94f coerce in correct place 2025-09-15 21:57:56 -04:00
Jade (Rose) Rowland 7dfd7dbcdc rmconsole 2025-09-15 21:47:40 -04:00
Jade (Rose) Rowland 2cba1dcb31 working 2025-09-15 21:46:37 -04:00
Switch Angel AKA Jade Rose 48a6a12648 Merge pull request 'Bug Fix / Feature: Updates to duck to avoid clicks and allow configuration over release/attack' (#1514) from glossing/strudel:glossing/ducking-click into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1514
2025-09-16 03:19:36 +02:00
Dr Mathew R Pocock 71dd45cd4b Merge branch 'main' into feature/autocomplete-sound-names 2025-09-16 02:13:26 +02:00
froos 6bbf7cbe32 Merge pull request 'Feat: Enhance scale function to quantize notes to a named scale' (#1492) from glossing/strudel:glossing/scale-for-notes into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1492
2025-09-15 23:36:30 +02:00
froos 9f36b73081 Merge pull request 'add tic80 font' (#1579) from tic80font into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1579
2025-09-15 22:52:13 +02:00
Matthew Pocock 6ebe84e096 Added completion for chord. 2025-09-15 21:34:15 +01:00
Felix Roos a7e485992e add tic80 font 2025-09-15 20:54:39 +02:00
Matthew Pocock cb011c8bb0 Add autocomplete for mode function
- Added modePreColonHandler for autocomplete of mode values (below, above, duck, root)
- Added modeAfterColonHandler for pitch name completion after colon in mode:anchor syntax
- Follows same pattern as sound/bank/scale handlers for complex expressions
- Supports expressions like '<above [below root]>' with proper fragment matching
- Uses regex pattern (?:[\s\[\{\()<])([\w:]*)$ to handle delimited expressions
2025-09-15 18:44:30 +01:00
drdozer c8875b29c1 Improve autocompletion behavior
- Refactored handlers to use consistent early return pattern for better readability
- Added blocking behavior for unquoted contexts (sound(, scale(, bank()) to guide users toward correct syntax instead of showing irrelevant fallback completions
- Fixed soundHandler to show all sounds when fragment is empty (e.g., sound(""))
- Simplified bankHandler by removing complex quote handling logic in favor of consistent blocking pattern
- Made scale handler regex patterns consistent (removed leading dots)
- All handlers now follow same structure: block unquoted contexts, provide completions for quoted contexts
2025-09-15 14:27:59 +01:00
drdozer 978616833a Merged autocomplete.mjs conflict. 2025-09-15 13:01:16 +01:00
Aria ab74ccfe7c Merge branch 'main' into glossing/ducking-click 2025-09-14 18:28:00 -05:00
Aria 92b2013cf6 Correctly handle silences for non-notes 2025-09-14 17:04:39 -05:00
froos 2e97fb7be2 Merge pull request 'supradough: fix delay + add some jsdoc types' (#1578) from supradough-fixes into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1578
2025-09-15 00:00:18 +02:00
Felix Roos df1934f87b add some typechecking + fix delay 2025-09-14 23:54:51 +02:00
froos d3472feb5c Merge pull request 'added plyWith/plyWithClassic functions' (#1571) from Dsm0/strudel:add_plyWith into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1571
2025-09-14 12:42:57 +02:00
Dsm0 addb6db1c7 updated names + snapshot 2025-09-14 02:21:25 -07:00
froos 566d590453 Merge pull request 'feat: sound alias' (#1494) from Antipathie/strudel:feature/592-sound-alias into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1494
2025-09-14 10:39:11 +02:00
froos e57bd98da0 Merge branch 'main' into feature/592-sound-alias 2025-09-14 10:34:47 +02:00
Dsm0 f5c4373f99 added plyWith/plyWithClassic functions 2025-09-13 17:21:19 -07:00
froos e762291bb7 Merge pull request 'Bug Fix: Allow penv values to be falsy' (#1559) from glossing/strudel:glossing/penv-with-zeros into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1559
2025-09-14 01:20:14 +02:00
Felix Roos 9da027d377 hotfix: format 2025-09-14 01:11:34 +02:00
froos 96dccdc38b Merge pull request 'Update website/src/pages/workshop/first-sounds.mdx' (#1566) from fesmith/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1566
2025-09-14 01:10:47 +02:00
Felix Roos d6254294b0 fix: bring back tests on external PRs (push doesn't cut it for forks) 2025-09-14 01:09:30 +02:00
froos 339c1bb573 Merge pull request 'fix: autocomplete-styles + html rendering' (#1570) from autocomplete-styles into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1570
2025-09-14 01:07:47 +02:00
Felix Roos 9782795761 fix: autocomplete container style 2025-09-14 01:04:48 +02:00
Felix Roos 2d2b238da9 fix: use template element for string to html 2025-09-14 01:03:14 +02:00
froos f0839e02eb Merge pull request 'Feature: Synonyms in autocomplete and reference' (#1535) from glossing/strudel:glossing/synonyms-in-autocomplete into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1535
2025-09-14 00:49:16 +02:00
Felix Roos a9f7d825c8 hotfix: format 2025-09-14 00:40:54 +02:00
Aria 709b654ed3 Add synonyms to autocomplete 2025-09-13 16:21:09 -05:00
drdozer c265595536 Merge branch 'feature/autocomplete-sound-names' of ssh://codeberg.org/drdozer/strudel into feature/autocomplete-sound-names 2025-09-13 21:36:48 +01:00
drdozer 1670aebad8 Updated the gitignore rules for vscode. 2025-09-13 21:36:24 +01:00
drdozer 39460eb100 Commiting lockfile. 2025-09-13 21:36:24 +01:00
drdozer cd659ac2a1 feat: sound autocomplete matches anywhere in name using includes() 2025-09-13 21:36:24 +01:00
drdozer ed182d4b3f Updated the codemirror packages to be able to access additional imports. 2025-09-13 21:36:24 +01:00
drdozer 90614612e2 feat: add E# and B# to pitchNames for complete enharmonic coverage 2025-09-13 21:36:24 +01:00
drdozer 6b6d4b86a6 refactor: modularize autocomplete context handlers using strategy array 2025-09-13 21:36:24 +01:00
drdozer 0b67473bd3 refactor: modularize autocomplete context handlers using strategy array 2025-09-13 21:36:24 +01:00
drdozer d87ce960d2 feat: implement context-aware autocomplete
Adds context-sensitive autocompletion for:
- Sound names in s("...") and sound("...") after the opening quote or after whitespace/bracket
- Bank names in bank("...") with quote handling and live filtering
- Scale types in .scale("...") after the colon, inserting colon-form for multi-word names
- Pitch names (C, C#, Db, etc.) for scale keys on explicit completion (Ctrl+Space) before the colon
- Blocks fallback completions in scale context before colon to avoid function list cross-talk
2025-09-13 21:36:24 +01:00
Aria 23aa8ef509 Add ability for LFOs to target.. other lfos :devil emoji: 2025-09-13 14:49:36 -05:00
Aria 945b325336 Codeformat, example tests 2025-09-13 14:33:32 -05:00
Aria 502f0b5c23 Merge branch 'main' into glossing/lfo-anything 2025-09-13 14:32:41 -05:00
Aria 69b034349a Codeformat 2025-09-13 14:30:05 -05:00
Aria ed00686804 Codeformat 2025-09-13 14:29:28 -05:00
Aria e10c469749 Merge branch 'main' into glossing/ducking-click 2025-09-13 14:28:35 -05:00
Aria 5f7e10733a Merge branch 'main' into glossing/distortion-modes 2025-09-13 14:23:17 -05:00
froos d81a214c74 Merge pull request 'Docs: add xen package examples' (#1446) from dudymas/strudel:docs/xen/added-tune into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1446
2025-09-13 20:01:47 +02:00
froos e57f240e70 Merge branch 'main' into docs/xen/added-tune 2025-09-13 20:00:35 +02:00
Felix Roos e18296e760 hotfix: word 2025-09-13 19:52:07 +02:00
froos c145355ccc Merge pull request 'Update website/src/pages/learn/code.mdx' (#1391) from anecondev/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1391
2025-09-13 19:51:09 +02:00
fesmith 352a3c39d7 Update website/src/pages/workshop/first-sounds.mdx 2025-09-13 00:00:36 +02:00
drdozer c85a4d4fc1 Merge branch 'feature/autocomplete-sound-names' of ssh://codeberg.org/drdozer/strudel into feature/autocomplete-sound-names 2025-09-12 12:12:02 +01:00
drdozer 7676641c9e Commiting lockfile. 2025-09-12 12:11:36 +01:00
Dr Mathew R Pocock 260d2e499e Merge branch 'main' into feature/autocomplete-sound-names 2025-09-12 13:04:11 +02:00
Felix Roos a46617f3f0 hotfix: use ?audioworklet for supradough worklet import 2025-09-12 10:16:37 +02:00
Felix Roos d164b5e7f5 Revert "Revert "Merge pull request 'supradough poc' (#1362) from supradough into main""
This reverts commit c0bf86d11e.
2025-09-12 10:08:55 +02:00
Felix Roos c0bf86d11e Revert "Merge pull request 'supradough poc' (#1362) from supradough into main"
This reverts commit 6f06683d70, reversing
changes made to 637d714ab2.
2025-09-11 23:19:22 +02:00
Switch Angel AKA Jade Rose 6f06683d70 Merge pull request 'supradough poc' (#1362) from supradough into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1362
2025-09-11 22:52:29 +02:00
drdozer e3409e52d0 Merge branch 'feature/autocomplete-sound-names' of ssh://codeberg.org/drdozer/strudel into feature/autocomplete-sound-names 2025-09-11 21:38:53 +01:00
drdozer 41d6f1b5da feat: sound autocomplete matches anywhere in name using includes() 2025-09-11 21:37:35 +01:00
Dr Mathew R Pocock aca4601734 Merge branch 'main' into feature/autocomplete-sound-names 2025-09-11 21:22:16 +02:00
drdozer 2a00fcdf5d Updated the codemirror packages to be able to access additional imports. 2025-09-11 19:01:22 +01:00
drdozer 9200a67a60 feat: add E# and B# to pitchNames for complete enharmonic coverage 2025-09-11 19:00:05 +01:00
drdozer 80fe5b8140 refactor: modularize autocomplete context handlers using strategy array 2025-09-11 18:59:50 +01:00
drdozer 085e839bfe refactor: modularize autocomplete context handlers using strategy array 2025-09-11 18:59:26 +01:00
drdozer 7ff7e8852b feat: implement context-aware autocomplete
Adds context-sensitive autocompletion for:
- Sound names in s("...") and sound("...") after the opening quote or after whitespace/bracket
- Bank names in bank("...") with quote handling and live filtering
- Scale types in .scale("...") after the colon, inserting colon-form for multi-word names
- Pitch names (C, C#, Db, etc.) for scale keys on explicit completion (Ctrl+Space) before the colon
- Blocks fallback completions in scale context before colon to avoid function list cross-talk
2025-09-11 18:42:23 +01:00
Felix Roos 637d714ab2 Publish
- @strudel/mondo@1.1.4
2025-09-11 19:14:00 +02:00
Felix Roos c42d00f048 hotfix: export mondo getLocations 2025-09-11 19:11:45 +02:00
Felix Roos 702e558d1a Publish
- @strudel/mondo@1.1.3
2025-09-11 17:30:38 +02:00
froos bcc2e8f759 Merge pull request 'fix: exclude mondough dependencies' (#1563) from fix-mondo-package into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1563
2025-09-11 17:29:34 +02:00
Felix Roos 27339715b7 fix: exclude mondough dependencies 2025-09-11 17:22:06 +02:00
Felix Roos 5e2e6411e5 Publish
- @strudel/codemirror@1.2.5
 - @strudel/repl@1.2.6
2025-09-11 08:26:20 +02:00
Aria 9848740e18 Formatting and tests 2025-09-10 21:39:02 -05:00
Aria 51b150b829 Optimize folding for audio rate 2025-09-10 21:27:56 -05:00
froos 0fac16e769 Merge pull request 'add basicSetup for keybindings' (#1462) from Dsm0/strudel:codemirror-keymap-fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1462
2025-09-11 00:27:20 +02:00
Felix Roos d0ce82e3cd Publish
- @strudel/codemirror@1.2.4
 - @strudel/core@1.2.4
 - @strudel/csound@1.2.5
 - @strudel/draw@1.2.4
 - @strudel/gamepad@1.2.4
 - @strudel/hydra@1.2.4
 - @strudel/midi@1.2.5
 - @strudel/mini@1.2.4
 - @strudel/mondo@1.1.2
 - @strudel/motion@1.2.4
 - @strudel/mqtt@1.2.4
 - @strudel/osc@1.2.4
 - @strudel/repl@1.2.5
 - @strudel/sampler@0.2.3
 - @strudel/serial@1.2.4
 - @strudel/soundfonts@1.2.5
 - superdough@1.2.5
 - @strudel/tonal@1.2.4
 - @strudel/transpiler@1.2.4
 - @strudel/web@1.2.5
 - @strudel/webaudio@1.2.5
 - @strudel/xen@1.2.4
2025-09-10 23:08:16 +02:00
Switch Angel AKA Jade Rose e82629de2e Merge pull request 'feat: add delete user samples button for convenience' (#1556) from delete_samples_button into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1556
2025-09-10 17:25:25 +02:00
Aria 38ce593c60 Allow penv values to be falsy 2025-09-09 20:47:09 -05:00
Switch Angel AKA Jade Rose 8a91549a7b Merge branch 'main' into delete_samples_button 2025-09-09 06:42:38 +02:00
froos cc27d482cd Merge pull request 'Fix formatting of REPL footnote' (#1547) from ddbeck/strudel:fix-footnote into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1547
2025-09-08 08:54:00 +02:00
Switch Angel AKA Jade Rose 37e640470b Merge pull request 'fix: OSC' (#1557) from fixosc into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1557
2025-09-08 05:38:07 +02:00
Jade (Rose) Rowland 5e5e7730c1 rm errorlogger console 2025-09-07 23:29:24 -04:00
Jade (Rose) Rowland 89e7d52308 fixed 2025-09-07 23:28:18 -04:00
Jade (Rose) Rowland 99bb227cf4 format 2025-09-07 22:48:04 -04:00
Jade (Rose) Rowland 70e776e799 cleanup div 2025-09-07 22:44:09 -04:00
Jade (Rose) Rowland 66aad0004a fix formatting 2025-09-07 22:43:13 -04:00
Jade (Rose) Rowland a968545458 change sound background to distinguish action buttons 2025-09-07 22:41:03 -04:00
Jade (Rose) Rowland 5414bbe85d only show button on user samples 2025-09-07 22:27:48 -04:00
Jade (Rose) Rowland e7e80bfd83 working 2025-09-07 22:21:03 -04:00
froos c57f5bb429 Merge pull request 'Add examples for ? and | operators to documentation' (#1532) from james-collapse/strudel:mininotation-randomness-docs into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1532
2025-09-07 22:47:10 +02:00
froos f2608e712b Merge pull request 'Signal flow documentation' (#1504) from glossing/strudel:glossing/signal-flow-documentation into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1504
Reviewed-by: Switch Angel AKA Jade Rose <daslyfe@noreply.codeberg.org>
2025-09-07 21:48:18 +02:00
froos 34b41fc26f Merge pull request 'Allow flattening of dirs with sample server' (#1529) from glossing/strudel:glossing/sample-server-with-flat into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1529
2025-09-07 21:27:28 +02:00
Switch Angel AKA Jade Rose f6e171fed8 Merge pull request 'fix: prevent orbit clicking by defining max number of channels in an orbit' (#1552) from orbitfix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1552
2025-09-07 21:05:23 +02:00
Jade (Rose) Rowland 2511dcc09e working 2025-09-07 15:02:13 -04:00
Aria 798eb22d9a Use currentTime for exact scheduling 2025-09-06 10:09:44 -05:00
Daniel D. Beck 977420e74d Fix formatting of REPL footnote 2025-09-06 15:33:08 +02:00
Aria 9c108862ef Corrected piping 2025-09-05 22:09:50 -05:00
Felix Roos 2fbdc9fdd7 hotfix: formatting 2025-09-06 00:43:03 +02:00
Felix Roos 0a96fa5896 hotfix: comment out tauri stuff to fix osc 2025-09-06 00:42:36 +02:00
Aria 46a45b4596 Some missing cleanup 2025-09-04 20:51:06 -05:00
Aria 1205573bc6 Merge branch 'main' into glossing/wavetable-synth 2025-09-04 20:31:01 -05:00
Aria 2ccbb0596d Codeformat 2025-09-04 20:27:32 -05:00
Aria 862b88b6c4 Some typos and cleanup 2025-09-04 20:27:05 -05:00
Aria 9b1c23d49f Some tuning experimentally and adding back chebyshev 2025-09-04 20:05:28 -05:00
Aria 42ab65abdb Move things around to allow selection by name and avoid circular imports; fixed chebyshev 2025-09-04 11:47:01 -05:00
Aria bb982e6b9b First pass at modes 2025-09-03 21:55:48 -05:00
james-collapse 3e0e903d38 Merge branch 'main' into mininotation-randomness-docs 2025-09-03 20:19:54 +02:00
James Walker 591c3fe08f Add documentation for ?n in mini-notation 2025-09-03 19:16:47 +01:00
Antipathie 56b1ea3fa5 Add soundAlias function 2025-09-03 00:47:45 +02:00
Aria c199b51645 Update autocomplete name to be the label and update ref to use main name as a synonym 2025-09-02 16:29:01 -05:00
Aria 8d2a368da9 Add some more synonyms to controls docs 2025-09-02 16:14:50 -05:00
Aria 052d09e892 Add synonyms to reference 2025-09-02 16:14:38 -05:00
Aria 439a7dc5e6 Include synonyms in autocomplete 2025-09-02 16:05:40 -05:00
froos 06ebcbff8c Merge pull request 'Padding for tooltips, preserving linebreaks in descriptions, not closing autocompletes on click' (#1521) from glossing/strudel:glossing/tooltip-padding-and-paragraphs into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1521
2025-09-02 08:42:41 +02:00
Aria 4e2e790864 Set delay and reverb nodes properly 2025-09-01 20:45:53 -05:00
Aria 4f3b40bd7b Merge branch 'main' into glossing/ducking-click 2025-09-01 20:45:00 -05:00
James Walker 142160d79a Add examples for ? and | operators 2025-09-01 21:08:06 +01:00
Switch Angel AKA Jade Rose ff2c59a2a6 Merge pull request 'Update "restore defaults" to not delete patterns' (#1519) from glossing/strudel:glossing/dont-delete-patterns-on-default into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1519
2025-09-01 17:50:08 +02:00
Aria 9b9176325b Update restore defaults to not delete patterns 2025-09-01 17:50:08 +02:00
Jade (Rose) Rowland b8e1b8d7ac Merge branch 'main' into supradough 2025-08-31 22:42:07 -04:00
Switch Angel AKA Jade Rose e84c39837f Merge pull request 'feat: add the ability to control the speed and start time of the reverb IR' (#1501) from irspeed into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1501
2025-08-31 19:10:02 +02:00
Jade (Rose) Rowland 6527c68cda Merge branch 'main' into irspeed 2025-08-31 12:51:28 -04:00
Aria 6a09f54b25 Add vibrato to list of continuous modulators 2025-08-31 01:03:09 -05:00
yaxu dc6b766ab7 Update README.md 2025-08-30 12:47:06 +02:00
yaxu 9eb3c9410d Add verify link to mastodon a/c 2025-08-30 12:46:00 +02:00
Aria e4070b86f8 More descriptive variables and comments 2025-08-29 14:33:14 -05:00
Aria 189e650a73 Add flat flag, automatic json saving; filter out non-audio at base dir 2025-08-29 12:18:28 -05:00
Aria fe46e1da53 Update docstring to include new warp modes; save sample server for a separate PR 2025-08-28 16:28:33 -05:00
Aria d1869c18ba Remove internal LFO 2025-08-28 16:25:10 -05:00
Aria 02cd79a6d9 Add wavetable oscillator with scanning, warps, and detune 2025-08-28 16:25:10 -05:00
Aria 9eeb6da3e6 Codeformat 2025-08-28 14:54:09 -05:00
Aria 869141b0a3 Parity with old adsr 2025-08-28 00:31:37 -05:00
Aria ea017e7622 Working version 2025-08-27 20:11:00 -05:00
Aria 763f900c69 First pass at envelopes with curves 2025-08-27 19:19:54 -05:00
Aria cd7865a66f Merge branch 'main' into glossing/lfo-anything 2025-08-27 16:28:26 -05:00
Aria 9c8e39d83d Add.. a lot of doc strings 2025-08-27 16:27:36 -05:00
Aria a5886bb9d4 Use white-space instead; fix scrolling; don't close autocomplete tooltips on click 2025-08-26 14:14:00 -05:00
Aria 877bc95a58 Switch to more specific class and fix p->div 2025-08-26 12:54:39 -05:00
Aria 18b1739b89 Add a space after paragraphs in descriptions and add padding to hover tooltips 2025-08-26 12:53:38 -05:00
Aria 022ac95bbd Typo 2025-08-26 12:09:12 -05:00
Aria b3e25cfc52 Merge branch 'main' into glossing/ducking-click 2025-08-26 12:08:58 -05:00
Aria 3d25aa1b91 Rename params, more examples 2025-08-26 12:06:10 -05:00
Aria 0a4b6a01b3 Merge branch 'main' into glossing/random 2025-08-24 21:19:49 -05:00
Aria b3e433291c Turn back on silent 2025-08-24 21:15:47 -05:00
Aria 969c9663ef Update tests for new randomness 2025-08-24 21:15:11 -05:00
Aria 5e4e678800 Test bleed, some docstrings 2025-08-24 21:14:57 -05:00
Switch Angel AKA Jade Rose b54139376e Merge pull request 'Bug Fix: Duck on Mobile / Safari' (#1503) from glossing/strudel:glossing/ducks-on-mobile into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1503
2025-08-25 02:31:21 +02:00
Aria d64a0ef0eb Lint requires no empty blocks: pass comment 2025-08-25 02:31:21 +02:00
Aria 659071a4ee Ensure zeroGain is cleaned up after use; move start/stop to after callback assigned for safety 2025-08-25 02:31:21 +02:00
Aria 64f7bc4442 Working version of duck on iOS safari 2025-08-25 02:31:21 +02:00
Aria b8423f0ed1 Add docstring 2025-08-24 12:01:12 -05:00
Aria 5d5159a08f Add option to use old random and a benchmark 2025-08-24 11:56:11 -05:00
Aria 1e96d59ac8 Merge branch 'main' into glossing/random 2025-08-24 11:05:57 -05:00
Alex McLean 8c97f2e2d0 Merge pull request 'fix benchmarks' (#1517) from fix-bench into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1517
2025-08-23 18:39:52 +02:00
alex b8c98736c5 fix benchmarks 2025-08-23 17:29:15 +01:00
Aria b8c46d6b26 Added some description and examples of multi-accidentals and negative octaves 2025-08-22 13:23:41 -05:00
Aria 79453ac2c3 Allow negatives and multi-accidentals 2025-08-22 13:17:13 -05:00
Aria b08890bd9e Working version with note names 2025-08-22 11:25:13 -05:00
Aria 938c92fda2 Merge branch 'main' into glossing/scale-for-notes 2025-08-21 15:58:43 -05:00
Aria a0fc52b1ec Final tweaks 2025-08-21 14:42:52 -05:00
Aria 9a9fe83f9c Example tests 2025-08-21 14:13:01 -05:00
froos 0693a32736 Merge pull request 'add --json flag to @strudel/sampler to generate a strudel.json' (#1513) from strudeljson-generate into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1513
2025-08-21 20:57:31 +02:00
Felix Roos 42a903ecc0 add --yes flag to readme, making sure first run works 2025-08-21 20:36:42 +02:00
Felix Roos da283eb55a doc: generate strudel.json 2025-08-21 20:36:17 +02:00
Felix Roos b12707316a bump @strudel/sampler to 0.2.1 2025-08-21 20:30:32 +02:00
Felix Roos 66aa3ac1da add --json flag to strudel sampler 2025-08-21 20:30:02 +02:00
Aria bf5d9917ab Codeformat and examples 2025-08-21 13:20:12 -05:00
Aria 4f15d681b0 Add release parameter, avoid clicks, some cleanup 2025-08-21 13:12:36 -05:00
froos d81b1ab65c Merge pull request 'remove hs2js postinstall' (#1510) from remove-postinstall into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1510
2025-08-21 10:04:28 +02:00
Felix Roos 8465517c76 remove hs2js postinstall 2025-08-21 10:00:41 +02:00
Felix Roos 215ab87809 fix: prettier 2025-08-21 09:41:21 +02:00
Aria 6a9739bed5 Code format and a typo on lfoNum 2025-08-20 13:39:24 -05:00
Aria d8f0d70908 Big refactor; start envelope at current value 2025-08-20 13:22:37 -05:00
Aria e25eab11ad Working version of envelopes 2025-08-20 10:47:57 -05:00
Aria efb337677c Fully working version with multiple LFOs 2025-08-20 10:08:36 -05:00
froos e5fe998327 Merge pull request 'Docs: Small additions to Learn Docs and fixed refrences to function Documentation' (#1502) from fyynn/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1502
2025-08-20 15:15:31 +02:00
froos 6f75a0a62b Merge pull request 'fix: repl autocomplete not rendering correctly' (#1480) from robase/strudel:fix-repl-autocomplete-styles into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1480
2025-08-20 12:31:36 +02:00
froos 0464845262 Merge pull request 'BUG FIX: make 'midin' initialization work with multiple controllers' (#1469) from cbabraham/strudel:fix/midi-init-bug into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1469
2025-08-20 12:10:00 +02:00
Aria 4a70ac5a99 Working version of LFOs 2025-08-20 00:38:25 -05:00
Aria 554d6118c6 Merge branch 'main' into glossing/random 2025-08-19 19:10:18 -05:00
Aria 03271ec5fb Remove stray comments 2025-08-19 18:15:24 -05:00
Aria a0760f9468 Merge branch 'main' into glossing/random 2025-08-19 17:46:09 -05:00
Aria e490774294 Mention order of effects 2025-08-19 16:06:18 -05:00
Aria 34e8a57472 Typos grammar etc 2025-08-19 11:32:07 -05:00
Aria 59c8d70714 Code format 2025-08-19 11:27:56 -05:00
Aria ce7cff2c3b Clean up wording on orbit routing 2025-08-19 11:26:25 -05:00
Aria 32fe73aba2 Update effects documentation to include information on signal flow 2025-08-19 11:10:34 -05:00
fyynn d6ee10e05c fixed new scrub refrence 2025-08-19 00:44:46 +02:00
fyynn 36441e7b73 Fixing hush refrence to code documentation
Signed-off-by: fyynn <fyynn@noreply.codeberg.org>
2025-08-19 00:25:31 +02:00
fyynn 189daa3942 Added Refrence to arp() arpWidth() to Docs
Signed-off-by: fyynn <fyynn@noreply.codeberg.org>
2025-08-19 00:21:32 +02:00
fyynn d009b9592e Added Refrence to arp() arpWidth() and hush to Docs
Signed-off-by: fyynn <fyynn@noreply.codeberg.org>
2025-08-19 00:09:41 +02:00
fyynn f7f1bd63e8 Adding the Duck/Sidechain effect to Learn Docs (learn/effects.mdx)
Added the duck Effect to the section global effects.

Signed-off-by: fyynn <fyynn@noreply.codeberg.org>
2025-08-18 23:49:43 +02:00
fyynn 7d24e45692 Added scrub() to Learn Docs
Signed-off-by: fyynn <fyynn@noreply.codeberg.org>
2025-08-18 23:36:39 +02:00
Jade (Rose) Rowland cf55d4c8d1 rm var 2025-08-18 11:49:11 -04:00
Jade (Rose) Rowland f17a4d045f Publish
- @strudel/codemirror@1.2.3
 - @strudel/core@1.2.3
 - @strudel/csound@1.2.4
 - @strudel/draw@1.2.3
 - @strudel/embed@1.1.1
 - @strudel/gamepad@1.2.3
 - @strudel/hydra@1.2.3
 - @strudel/midi@1.2.4
 - @strudel/mini@1.2.3
 - mondolang@1.1.1
 - @strudel/mondo@1.1.1
 - @strudel/motion@1.2.3
 - @strudel/mqtt@1.2.3
 - @strudel/osc@1.2.3
 - @strudel/reference@1.2.1
 - @strudel/repl@1.2.4
 - @strudel/serial@1.2.3
 - @strudel/soundfonts@1.2.4
 - superdough@1.2.4
 - @strudel/tonal@1.2.3
 - @strudel/transpiler@1.2.3
 - @strudel/web@1.2.4
 - @strudel/webaudio@1.2.4
 - @strudel/xen@1.2.3
2025-08-18 11:46:29 -04:00
Jade (Rose) Rowland e7e636886d add tests 2025-08-17 17:21:36 -04:00
Alex McLean 8e1e83f3cf Merge pull request 'euclidish' (#1482) from euclidish into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1482
2025-08-17 23:18:45 +02:00
alex 2d64b538e7 Merge branch 'main' into euclidish 2025-08-17 22:16:58 +01:00
alex b717615558 optimise euclidish, creating new morph function in the process 2025-08-17 22:13:26 +01:00
Jade (Rose) Rowland e9aef9e4d4 working 2025-08-17 16:49:10 -04:00
Switch Angel AKA Jade Rose 8c4f10464b Merge pull request 'feat: Create a duck (sidechain) orbit effect' (#1470) from pump into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1470
2025-08-17 06:37:22 +02:00
Jade (Rose) Rowland 018649c4f3 fix test 2025-08-16 23:42:14 -04:00
Jade (Rose) Rowland 5ff59a878d fix lookahead 2025-08-16 23:38:03 -04:00
Jade (Rose) Rowland a20468b85f minor changes 2025-08-16 23:19:34 -04:00
Jade (Rose) Rowland 9648e35de2 Merge branch 'main' into pump 2025-08-16 23:06:36 -04:00
Switch Angel AKA Jade Rose cd344cefe0 Merge pull request 'Bug Fix: Restore log functionality after onTrigger arg removal' (#1491) from glossing/strudel:glossing/fix-log into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1491
Reviewed-by: Switch Angel AKA Jade Rose <daslyfe@noreply.codeberg.org>
2025-08-17 04:40:14 +02:00
Switch Angel AKA Jade Rose 1f6a313f02 Merge pull request 'Bug Fix: Handle zero appearing first in FM's ADSR' (#1496) from glossing/strudel:glossing/fix-fm-with-adsr-zeros into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1496
Reviewed-by: Switch Angel AKA Jade Rose <daslyfe@noreply.codeberg.org>
2025-08-17 04:33:38 +02:00
Switch Angel AKA Jade Rose 5cbeb227d8 Merge pull request 'Bug Fix: FM (and vibrato) for Supersaws' (#1495) from glossing/strudel:glossing/fix-fm-for-supersaw into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1495
Reviewed-by: Switch Angel AKA Jade Rose <daslyfe@noreply.codeberg.org>
2025-08-17 04:27:18 +02:00
Aria 058d950121 Working version of updated randomness 2025-08-15 22:57:59 -05:00
Aria c8c6a2ce08 Add example test and update fastChunk test (which was previously broken) 2025-08-15 13:34:43 -05:00
Aria 2ab2cc5fc8 Add example tests 2025-08-15 13:27:08 -05:00
Aria 3dd667e825 Fix for a zero appearing (first) in FM's ADSR 2025-08-10 17:11:59 -05:00
Alex McLean 482ebb695a Merge branch 'main' into euclidish 2025-08-10 20:49:27 +02:00
Aria 218952b8b6 Use the per-sample frequency and properly wrap polyBlep 2025-08-09 16:25:11 -05:00
Aria 2e8a8b50df Seemingly working version of supersaw FM and light cleanup 2025-08-08 22:27:05 -05:00
robase 612efad3eb clean up comments 2025-08-07 09:25:01 +02:00
robase e7839a09a1 fix: tooltip should respect themes 2025-08-07 09:25:01 +02:00
robase 3292f88810 fix: repl autocomplete not rendering correctly 2025-08-07 09:25:01 +02:00
Aria a4c040e101 Add new tests, organize old tests, fix issue with note 2025-08-06 12:37:55 -05:00
Aria 7046c1f546 Cleanup and simplification; improved docstrings 2025-08-06 10:17:48 -05:00
Aria a4ab8e1b06 First pass at extending scale function to include notes 2025-08-06 00:45:01 -05:00
Aria f22f89347e Final docstring cleanup & adding hap tag to logValues for consistency 2025-08-05 22:40:11 -05:00
Aria de15d79edf Add doscstrings and move stringifyValues into its own function for reuse 2025-08-05 22:29:59 -05:00
Aria 23e5358ae4 Formatting 2025-08-05 20:46:00 -05:00
Aria 3b6777e259 Fix signature of functions in log and logValues and add tests 2025-08-05 19:05:17 -05:00
Alex McLean ed5bf3b3fc Merge pull request 'Fix incorrect stack Mini Notation' (#1484) from samyk/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1484
2025-08-04 07:51:29 +02:00
daslyfe b089328da3 Merge pull request 'fix: regression caused by incorrectly exported alias for transpose and scaleTranspose' (#1489) from fixtest into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1489
2025-08-03 18:57:45 +02:00
daslyfe 784c711870 Merge branch 'main' into pump 2025-08-03 18:57:19 +02:00
Jade (Rose) Rowland 34b10b6c84 codeformat 2025-08-03 12:56:16 -04:00
Jade (Rose) Rowland 450f9685f3 fixed export 2025-08-03 12:54:19 -04:00
daslyfe 03090e399c Merge pull request 'Add strans and scaleTrans as synonyms of scaleTranspose' (#1488) from TodePond/strudel:lu/strans into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1488
2025-08-03 18:34:12 +02:00
Lu Wilson ed58d26da6 Merge branch 'main' into lu/strans 2025-08-03 16:14:33 +02:00
daslyfe e3605590e5 Merge pull request 'Add trans alias for transpose' (#1487) from TodePond/strudel:lu/trans into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1487
2025-08-02 18:18:25 +02:00
Lu[ke] Wilson d55ef8e843 add strans too 2025-08-02 10:26:36 +01:00
Lu[ke] Wilson efc2333360 add synonyms for scaleTranspose 2025-08-02 10:25:28 +01:00
Lu Wilson 92626e7c20 Merge branch 'main' into lu/trans 2025-08-02 11:18:37 +02:00
Lu[ke] Wilson ad113b3888 document ability to specify an array of names 2025-08-02 10:17:48 +01:00
Lu[ke] Wilson 39c45bc2b2 pass an array of names instead 2025-08-02 10:17:33 +01:00
daslyfe 899af88bd9 Merge branch 'main' into pump 2025-08-02 05:32:13 +02:00
Jade (Rose) Rowland c2b8cc4b82 webtimeout 2025-08-01 23:29:50 -04:00
daslyfe 40ed7b5382 Merge pull request 'feat: Create Accurate 909 bass drum synthesizer' (#1478) from 909bd into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1478
2025-08-02 03:27:24 +02:00
daslyfe 5d829419ba Merge branch 'main' into 909bd 2025-08-02 03:24:29 +02:00
daslyfe e26da854c0 Merge pull request 'feat: Add fmwave control and ability to fm with noise' (#1472) from noisefm into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1472
2025-08-02 03:23:48 +02:00
daslyfe a28b7a2d5a Merge branch 'main' into noisefm 2025-08-02 02:49:15 +02:00
daslyfe 83c776d70f Merge branch 'main' into 909bd 2025-08-02 02:49:00 +02:00
Lu[ke] Wilson 051efdc13b flyby improvement: add dec synonym to docs 2025-08-01 09:39:33 +01:00
Lu[ke] Wilson ef3cd56b0d add synonym to docs 2025-08-01 09:39:21 +01:00
Lu[ke] Wilson 9017085fa3 add trans alias for transpose 2025-08-01 09:36:36 +01:00
daslyfe cdbbe079db Merge pull request 'hotfix: uzu kit JSON should be in the repo to avoid offline loading errors' (#1485) from samplemaphotfix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1485
2025-07-30 00:22:40 +02:00
Jade (Rose) Rowland d6045c943b working 2025-07-29 18:20:13 -04:00
samyk 6ee9dea2ff Fix incorrect stack Mini Notation 2025-07-28 20:26:34 +02:00
alex 03cbe4b6d4 delint 2025-07-28 15:48:09 +02:00
alex 784ee576da fixes 2025-07-28 15:33:18 +02:00
alex ee3e1217b4 add euclidish 2025-07-28 15:24:19 +02:00
Jade (Rose) Rowland 30c80119e9 works 2025-07-28 01:20:42 -04:00
Felix Roos 7f103e77e3 prefix "S" for solo 2025-07-28 04:05:21 +02:00
Jade (Rose) Rowland 973ae4c7da change 909bd to sbd 2025-07-27 15:02:00 -04:00
Jade (Rose) Rowland 4d13b981f1 variable srate 2025-07-27 01:28:50 -04:00
Jade (Rose) Rowland 7691403fd0 prevent clicks 2025-07-27 01:22:59 -04:00
Jade (Rose) Rowland 3b6e3624be working 2025-07-27 01:07:45 -04:00
Jade (Rose) Rowland 51f0bab1f8 duckarray 2025-07-26 12:54:59 -04:00
Jade (Rose) Rowland dae1560c40 description 2025-07-25 00:00:23 -04:00
Jade (Rose) Rowland 82f0dbb750 add another example 2025-07-24 23:59:38 -04:00
Jade (Rose) Rowland fb7d76a2ab working 2025-07-24 23:50:27 -04:00
Jade (Rose) Rowland 26225e4ea7 Merge branch 'main' into pump 2025-07-23 23:40:48 -04:00
daslyfe ab12c6ae0a Merge pull request 'feat: make uzu-drumkit the default drumkit' (#1422) from jade/uzudrumkit into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1422
2025-07-24 05:28:23 +02:00
Jade (Rose) Rowland 4a894b0be2 frmt 2025-07-23 23:25:14 -04:00
Jade (Rose) Rowland 4ad305550e Merge branch 'jade/uzudrumkit' of ssh://codeberg.org/uzu/strudel into jade/uzudrumkit 2025-07-23 23:16:39 -04:00
Jade (Rose) Rowland cf5c502a05 rm unessecary json 2025-07-23 23:16:14 -04:00
Jade (Rose) Rowland 2415210be6 fix lint 2025-07-23 18:41:20 -04:00
Jade (Rose) Rowland fe18aa770d test 2025-07-23 18:34:34 -04:00
Chandler Abraham 2eda047108 Merge branch 'main' of https://codeberg.org/uzu/strudel into fix/midi-init-bug 2025-07-22 21:52:03 -07:00
Chandler Abraham c8cf1dc712 fix(midi): ensure midin initializes device state correctly
The midin function only initialized the refs object for a device on the initial MIDI setup. This caused an error if a second MIDI device was connected in the same session, as its refs object would not exist, leading to a 'cannot read properties of undefined' error when accessed.

This commit fixes the issue by ensuring that the refs object for a given MIDI input is initialized every time  is called, not just on the first call.
2025-07-22 21:49:40 -07:00
daslyfe e136e95375 Merge branch 'main' into jade/uzudrumkit 2025-07-23 03:06:08 +02:00
daslyfe a26559fd3d Merge branch 'main' into supradough 2025-07-22 06:35:59 +02:00
daslyfe 004c0baa59 Merge pull request 'FIX: PWM modulation' (#1467) from pwfix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1467
2025-07-21 07:16:17 +02:00
daslyfe 5f44ae9c4b Merge branch 'main' into pwfix 2025-07-21 07:13:55 +02:00
Jade (Rose) Rowland 66828e17d3 working 2025-07-21 01:11:04 -04:00
Jade (Rose) Rowland b2f90ecb3b fix def skew 2025-07-20 23:56:30 -04:00
Jade (Rose) Rowland ccf2a6de52 fixing.. 2025-07-20 23:38:16 -04:00
Jade (Rose) Rowland 9416f317d4 fixing... 2025-07-20 23:29:01 -04:00
Jade (Rose) Rowland 75b6f59212 fix 2025-07-20 23:26:17 -04:00
daslyfe 84238c8999 Merge pull request 'Tremolo modulation' (#1095) from daslyfe/gainmod into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1095
2025-07-19 17:16:21 +02:00
daslyfe 2d855cf5e8 Merge branch 'main' into daslyfe/gainmod 2025-07-19 04:06:31 +02:00
Jade (Rose) Rowland dd04d49c75 fix test 2025-07-18 22:04:18 -04:00
Jade (Rose) Rowland 34874862ab change params 2025-07-18 22:03:33 -04:00
Dsm0 5448fc6077 removed duplication and unnecessary keymappings in codemirror config 2025-07-16 15:17:34 -07:00
Dsm0 06fafbd8eb Ensure no default extensions conflict with extensions in defaultSettings 2025-07-16 15:03:55 -07:00
Dsm0 10156f0067 add basicSetup for keybindings 2025-07-15 19:13:24 -07:00
Felix Roos 5632d83afb fix: supradough onTrigger after breaking change 2025-07-16 02:21:39 +02:00
Felix Roos a32473d570 Merge remote-tracking branch 'origin/main' into supradough 2025-07-15 22:26:46 +02:00
froos 0361bc629f Merge pull request 'fix: can now use def in mondough' (#1461) from mondo-def-fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1461
2025-07-15 09:39:32 +02:00
Felix Roos 1fdd87a4f3 doc: def 2025-07-15 09:35:24 +02:00
Felix Roos 16e9aca222 fix: can now use def in mondough 2025-07-15 09:33:14 +02:00
froos 4a3d5ca44f Merge pull request 'fixed keybinding presedence issue' (#1456) from Dsm0/strudel:keyboard_binding_presedence_fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1456
2025-07-11 11:10:23 +02:00
froos 6c0e8a0833 Merge pull request 'added multicursor support on ctrl/cmd + click' (#1457) from Dsm0/strudel:multicursor-on-click into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1457
2025-07-11 11:09:04 +02:00
Jade (Rose) Rowland 7336ff0ded Merge branch 'daslyfe/gainmod' of ssh://codeberg.org/uzu/strudel into daslyfe/gainmod 2025-07-10 23:19:19 -04:00
Jade (Rose) Rowland 735f57e276 working 2025-07-10 23:18:57 -04:00
Dsm0 eb4f1f69f6 pnpm codeformat 2025-07-10 17:28:56 -07:00
Dsm0 e7e321fe03 added multicursor support on ctrl/cmd + click 2025-07-10 15:03:22 -07:00
Dsm0 bf3de368f0 added codemirror as an option + removed fallback on defaults 2025-07-10 12:11:10 -07:00
Dsm0 d645cc6fe5 fixed keybinding presedence issue 2025-07-09 13:28:22 -07:00
froos 6fe11be218 Merge pull request 'added tab-indent setting' (#1454) from Dsm0/strudel:tab-indentation into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1454
2025-07-09 09:39:45 +02:00
Felix Roos cf7fc23981 add new am examples to doc 2025-07-09 09:33:28 +02:00
Felix Roos bfdfab0a00 fix: @synonym -> @synonyms 2025-07-09 09:33:11 +02:00
Jade (Rose) Rowland edb347e85a format 2025-07-08 22:24:54 -04:00
Jade (Rose) Rowland 63fcce79e0 default cycle 2025-07-08 21:24:27 -04:00
Dsm0 8defdc424c added tab-indent setting 2025-07-08 17:57:24 -07:00
Felix Roos 16b2fc0632 Merge remote-tracking branch 'origin/main' into daslyfe/gainmod 2025-07-08 15:49:39 +02:00
froos d0a544d7a7 Merge pull request 'ontrigger-refactoring' (#1442) from ontrigger-refactoring into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1442
2025-07-08 15:48:40 +02:00
Jade (Rose) Rowland 9b3c6b9f94 c 2025-07-08 00:46:39 -04:00
Jade (Rose) Rowland 6327e17feb remove unessecary cyclist changes 2025-07-08 00:44:57 -04:00
Jade (Rose) Rowland 15fe2734e9 Merge branch 'daslyfe/gainmod' of ssh://codeberg.org/uzu/strudel into daslyfe/gainmod 2025-07-08 00:30:40 -04:00
Jade (Rose) Rowland 1dd1ce254f rm deadcode 2025-07-08 00:30:00 -04:00
daslyfe 3ea91adfd6 Merge branch 'main' into daslyfe/gainmod 2025-07-08 06:29:27 +02:00
Jade (Rose) Rowland ce5f425142 fully implemented 2025-07-08 00:26:15 -04:00
Felix Roos 671a22fc22 chore: add link to contributors 2025-07-07 23:28:41 +02:00
froos 976955dae3 Merge pull request 'fix: remove first gm_synth_bass_1, as it doesn't work in safari' (#1452) from gm_synth_bass_1 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1452
2025-07-07 23:14:24 +02:00
Felix Roos a6ad58a375 fix: remove first gm_synth_bass_1, as it doesn't work in safari 2025-07-07 23:12:15 +02:00
Felix Roos 681eed3d0e revert add logo 2025-07-07 22:23:40 +02:00
Felix Roos 81a9811803 add logo 2025-07-07 22:23:16 +02:00
Felix Roos 72b582c605 fix: remove github contributor avatars 2025-07-07 22:20:04 +02:00
froos 2f0891d4e5 Merge pull request 'fix: minor doc changes' (#1435) from Aurel300/strudel:fix/minor-docs into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1435
2025-07-07 00:06:15 +02:00
Felix Roos a7a283a99e doc: add version tagging guide to contributing.md 2025-07-06 17:00:33 +02:00
Jade (Rose) Rowland d9e44dcda6 sync without cyclist changes 2025-07-06 00:59:39 -04:00
dudymas e87bb4376f Merge branch 'main' into docs/xen/added-tune 2025-07-05 20:28:09 +02:00
dudymas 0722cf7ded feat(xen/tunejs): support sending a custom tuning 2025-07-05 13:43:42 -04:00
dudymas 37fde8f3e8 docs(website/learn/xen): discussed strumming 2025-07-05 13:43:09 -04:00
Alex McLean acd5661106 Merge pull request 'Fix randrun and deps including shuffle. Fixes #1441' (#1447) from fix-randrun into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1447
2025-07-05 12:53:44 +02:00
froos b0b2b6a120 Merge pull request 'add setDefault + resetDefaults to superdough' (#1433) from set-default-default into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1433
2025-07-05 12:15:51 +02:00
Felix Roos 664d76cf1b resetDefaults when editor is reset 2025-07-05 11:32:16 +02:00
alex a901e2e387 snapshot 2025-07-05 10:28:20 +01:00
Felix Roos 82b14b5292 fix: lint 2025-07-05 11:13:40 +02:00
alex 05bcd5e32f Fix randrun and deps including shuffle. Fixes #1441 2025-07-05 09:01:48 +01:00
Jade (Rose) Rowland 077556e7cb Merge remote-tracking branch 'origin/ontrigger-refactoring' into daslyfe/gainmod 2025-07-05 00:45:58 -04:00
Jade (Rose) Rowland 4cc2de9b7e wip 2025-07-05 00:39:23 -04:00
dudymas 8655c5b73c Merge branch 'main' into docs/xen/added-tune 2025-07-05 00:50:57 +02:00
dudymas 31c1450edc docs(website/learn/xen): add tune() examples 2025-07-04 18:50:21 -04:00
dudymas cbb4207bab chore(docker): basic support added 2025-07-04 18:50:21 -04:00
froos b0c0a393a1 Merge pull request 'disable fm for supersaw' (#1443) from supersaw-no-fm into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1443
2025-07-04 22:36:18 +02:00
Felix Roos 168269a839 disable fm for supersaw 2025-07-04 22:29:18 +02:00
Felix Roos 34771f03d4 some clarification comments 2025-07-04 22:17:23 +02:00
JoStro f5ae50c3ce Modify extend to better match behavior of ! operator 2025-07-01 22:07:22 +01:00
Aurel Bílý 504fe9ed40 document setcps in cycles reference 2025-07-01 13:45:36 +02:00
froos caf6686d01 Merge pull request 'corrected minor spelling mistake (#1425)' (#1434) from tj-mueller/strudel_1425:spelling_mistake_1425 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1434
2025-06-30 13:28:09 +02:00
tj-mueller c063fb6b1c correct rd to cr 2025-06-30 11:51:39 +02:00
Felix Roos e3680b96de refactor: remove first param of all onTrigger calls 2025-06-30 10:18:54 +02:00
Jade (Rose) Rowland 688e275e0c merge 2025-06-30 00:50:02 -04:00
Felix Roos 2e33569786 add setDefault + resetDefaults to superdough 2025-06-30 05:48:08 +02:00
froos 46fe6d3c4d Merge pull request 'Add browser cache explanation in samples.mdx' (#1369) from wyan/patch-1 into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1369
2025-06-30 05:26:10 +02:00
froos 9220b95677 Merge branch 'main' into wyan/patch-1 2025-06-30 05:24:26 +02:00
froos 5b27b19972 Merge pull request 'add-release-notes' (#1432) from add-release-notes into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1432
2025-06-30 05:18:41 +02:00
Felix Roos 5a72ea94b1 fix: format 2025-06-30 05:15:30 +02:00
Felix Roos eac6f27ca4 add 1.2.0 release notes 2025-06-29 21:29:11 +02:00
Felix Roos f2330a2307 add 1.1.0 release notes 2025-06-29 20:18:15 +02:00
Jade Rose db413881db Merge pull request 'feat: delaytime in cycles' (#1341) from daslyfe/jade/delaycycle into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1341
2025-06-28 20:30:48 +02:00
Jade (Rose) Rowland 77bab433e0 cf 2025-06-28 14:06:16 -04:00
daslyfe f8cc1c2022 Merge branch 'main' into daslyfe/jade/delaycycle 2025-06-28 20:01:57 +02:00
froos e0bf9ea4d6 Merge pull request 'Case insensitive search in the reference tab' (#1420) from kdiab/strudel:main into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1420
2025-06-28 13:44:47 +02:00
Alex McLean 374661eb23 Merge pull request 'add unjoin, into and chunkinto' (#1418) from add-unjoin into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1418
2025-06-28 00:04:12 +02:00
alex df06248c54 snapshot 2025-06-27 22:59:01 +01:00
alex 27073d6c17 format 2025-06-27 22:56:19 +01:00
alex f44caf9096 tests and tweaks, and add chunkBackInto 2025-06-27 22:51:47 +01:00
alex ff5b11f5ed test + bugfix for chunkinto 2025-06-27 22:44:15 +01:00
Alex McLean 719c70a598 Merge branch 'main' into add-unjoin 2025-06-27 22:40:40 +02:00
Jade (Rose) Rowland 7a53f6c021 add test 2025-06-27 15:56:37 -04:00
Jade (Rose) Rowland 09d05abd70 delaysync 2025-06-27 15:54:39 -04:00
Jade (Rose) Rowland 3acc364a03 Merge branch 'main' into daslyfe/jade/delaycycle 2025-06-27 15:53:48 -04:00
Jade (Rose) Rowland 2dd528134a fix json 2025-06-27 02:52:04 -04:00
Jade (Rose) Rowland fef50e654c working 2025-06-27 02:38:43 -04:00
Felix Roos b1aba294ad hotfix: fix upstream test 2025-06-26 15:39:35 +02:00
froos 63ac80eb79 Merge pull request 'mondo notation' (#1311) from uzu into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1311
2025-06-26 15:29:45 +02:00
Felix Roos 82e3f9b837 fix: js example 2025-06-26 14:59:24 +02:00
Khalid e19fd24447 Case insensitive search in the reference tab 2025-06-25 08:44:12 -04:00
alex fe9a91d1e4 add unjoin, into and chunkinto 2025-06-24 23:22:42 +01:00
froos 860bb58d61 Merge pull request 'allow calling all multiple times' (#1417) from multiple-all-calls into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1417
2025-06-24 06:14:15 +02:00
Felix Roos d58b3e490b fix: reset all transforms before eval 2025-06-24 06:12:21 +02:00
Felix Roos 0003ce174e allow calling all multiple times 2025-06-24 06:06:37 +02:00
froos 8e0f23e081 Merge pull request 'tonal: allow scales without tonic (default to C)' (#1092) from kasparsj/tonal-fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1092
2025-06-24 05:53:21 +02:00
Felix Roos 71e60ed8de add back comment 2025-06-24 05:45:36 +02:00
Felix Roos e2a29914c7 don't interpret note as n 2025-06-24 05:43:06 +02:00
Felix Roos a9a3d491a2 Merge branch 'main' into kasparsj/tonal-fix 2025-06-24 05:39:59 +02:00
yaxu a750764f88 Update CONTRIBUTING.md 2025-06-23 11:13:00 +02:00
froos 5b397009ab Merge pull request 'website intro: fix whitespace and code hosting name' (#1400) from trofi/strudel:website-intro-minor into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1400
2025-06-20 20:00:11 +02:00
Sergei Trofimovich e68df9e789 website intro: fix whitespace and code hosting name 2025-06-20 18:33:58 +01:00
yaxu 4d3bbd5057 Update README.md 2025-06-19 17:44:45 +02:00
Felix Roos 15f3321b04 fix: extend in some situations, like [[bd]@3 bd] 2025-06-19 11:33:22 +02:00
froos 67bfedb317 Merge branch 'main' into uzu 2025-06-19 10:21:04 +02:00
Alex McLean c0184dd827 Merge pull request 'fix stepcat #1396' (#1398) from fix-stepcat into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1398
2025-06-19 10:15:06 +02:00
Alex McLean 09fdc45ff2 Merge branch 'main' into fix-stepcat 2025-06-19 10:08:08 +02:00
alex c01b4c651c don't trash lists passed to timecat 2025-06-19 09:06:53 +01:00
froos 634eed1d82 Merge pull request 'deprecate cpm + refactor docs to use setcpm' (#1397) from reference-improvements into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1397
2025-06-19 09:52:36 +02:00
froos 01810f379f Merge branch 'main' into reference-improvements 2025-06-19 09:47:01 +02:00
alex f3c4afaa54 apt install zstd for caching 2025-06-19 08:42:33 +01:00
alex a8757fecc8 avoid double action for PRs, try turning on pnpm cache 2025-06-19 08:39:05 +01:00
alex a1d181d609 format 2025-06-19 08:27:41 +01:00
alex 440f1cb081 reify arguments of stepcat 2025-06-19 08:27:23 +01:00
alex 95193b0bfd a test for #1396 2025-06-19 08:18:20 +01:00
Felix Roos 66673d211e fix: cpm -> setcpm 2025-06-19 09:13:48 +02:00
Felix Roos 64ab3c9ba7 fix: tests 2025-06-19 09:12:05 +02:00
Felix Roos 6c4aa12c60 refactor: replace .cpm with setcpm calls
+ doc setcpm
2025-06-19 09:09:45 +02:00
daslyfe a8f2537e31 Merge pull request 'feat: 3 new codemirror themes' (#1394) from jade/themes into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1394
2025-06-19 02:49:08 +02:00
Jade (Rose) Rowland 7e6876c282 comment 2025-06-18 20:44:09 -04:00
Felix Roos 1cc15c7e8d fix: fall back to silence when empty
removes annoying error
2025-06-18 22:25:05 +02:00
Felix Roos 10ac7c353c use + and - as late / early
+ add some extra error handling
2025-06-18 22:07:16 +02:00
Felix Roos 9412bf60bf add e as euclid that accepts a list 2025-06-18 22:06:18 +02:00
Felix Roos c751bb7e5f allow _ as silence 2025-06-18 21:36:34 +02:00
Felix Roos 28cd7c1681 Merge branch 'main' into uzu 2025-06-18 21:26:51 +02:00
Jade (Rose) Rowland 011139eff8 arch2 2025-06-18 20:12:36 +02:00
Jade (Rose) Rowland 184cb746f3 arch 2025-06-18 19:55:30 +02:00
anecondev 5efcd14f40 Update website/src/pages/learn/code.mdx
Correct "appended" to "prepended"
2025-06-18 17:07:13 +02:00
alex 351314ccdf rename .github to .forgejo 2025-06-15 09:23:29 +01:00
Felix Roos e52017c0d8 fix: reference tab critical fail 2025-06-15 10:12:17 +02:00
alex b253d437d3 Merge branch 'main' of ssh://codeberg.org/uzu/strudel 2025-06-15 08:06:12 +01:00
alex bebbe30b50 codeformat 2025-06-15 08:03:23 +01:00
alex 489d3f8d4d Merge branch 'reorganise-docs' 2025-06-15 08:01:44 +01:00
alex cc4cad05b2 add the technical manual again 2025-06-14 23:33:52 +01:00
alex 2cb22e94b5 move iclc paper under docs/ 2025-06-14 23:26:59 +01:00
Felix Roos ee7d783099 fix homepage link 2025-06-14 16:27:54 +02:00
Felix Roos 9becd0a3f0 Merge branch 'main' of https://codeberg.org/uzu/strudel 2025-06-14 16:23:36 +02:00
Felix Roos 9738c90b82 even more degithubbing 2025-06-14 16:23:03 +02:00
Alex McLean f7b58f2e3e Merge pull request 'link back to tech manual in wiki' (#1382) from techmanual-wiki into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1382
2025-06-14 16:22:59 +02:00
alex d856e567c1 link back to tech manual in wiki 2025-06-14 15:22:27 +01:00
Felix Roos a7f044e1aa more degithubbing 2025-06-14 16:17:22 +02:00
froos 1f7d78c6ce Merge pull request 'degithub-links' (#1380) from degithub-links into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1380
2025-06-14 14:55:36 +02:00
Felix Roos 4137f39495 Merge remote-tracking branch 'origin/main' into degithub-links 2025-06-14 14:48:54 +02:00
Felix Roos 0163c8ba25 replace remaining links to old github repo 2025-06-14 14:47:16 +02:00
Felix Roos 912b3270aa use yt for gh video assets + replace release asset links 2025-06-14 14:35:19 +02:00
Felix Roos 2bc3d69fb0 replace github links in release notes 2025-06-14 14:01:11 +02:00
froos 8051e56d13 Merge branch 'main' into supradough 2025-06-14 00:35:52 +02:00
yaxu aa20526963 Update .github/workflows/test.yml 2025-06-13 17:33:47 +02:00
yaxu 47de9e45ff Update .github/workflows/deploy.yml 2025-06-13 17:31:33 +02:00
yaxu 0c193238c5 Update .github/workflows/deploy.yml 2025-06-13 17:31:03 +02:00
yaxu 3428e18e7d Update .github/workflows/deploy.yml 2025-06-13 17:26:37 +02:00
yaxu 8fba92f447 Update .github/workflows/deploy.yml 2025-06-13 17:10:37 +02:00
yaxu 38e7fe606c Update .github/workflows/deploy.yml 2025-06-13 16:47:40 +02:00
Alex McLean 59e7584bf7 Merge pull request 'fix euclidLegatoRot' (#1378) from bwagner/strudel:fix-euclidLegatoRot into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1378
2025-06-13 15:24:40 +02:00
Bernhard Wagner 7f50bcebd2 avoid floating point inaccuracy by using Fraction 2025-06-13 10:28:03 +02:00
Bernhard Wagner d7b83e200c fix issue #1368 euclidLegatoRot 2025-06-13 10:21:36 +02:00
Alex McLean db33707e52 Merge pull request 'remove-ms' (#1377) from remove-ms into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1377
2025-06-13 10:07:50 +02:00
Alex McLean 78fca9695c Merge branch 'main' into remove-ms 2025-06-13 09:23:42 +02:00
alex 3dbae7907c ignore .pnpm-store 2025-06-13 08:22:46 +01:00
alex dcac254790 missing double quotes 2025-06-13 08:17:55 +01:00
Alex McLean 000114fcc8 Merge branch 'main' into remove-ms 2025-06-13 09:08:13 +02:00
alex 062201d1dc fix json 2025-06-13 08:07:35 +01:00
yaxu 8c8e914170 Update .github/workflows/test.yml 2025-06-13 08:53:53 +02:00
yaxu 1141b1803b Update .github/workflows/test.yml 2025-06-13 00:08:39 +02:00
yaxu fec38bd5d2 Update .github/workflows/test.yml 2025-06-13 00:07:24 +02:00
alex a3d9d68c45 less github 2025-06-12 18:00:39 +01:00
alex 990f1c6ece degithub 2025-06-12 17:29:29 +01:00
alex c0ae12f32f add codeberg repo update command 2025-06-12 17:26:19 +01:00
Alex McLean 307e5ea2d7 less github 2025-06-12 14:45:35 +01:00
Alex McLean 5fdea7fd80 github > strudel 2025-06-12 14:36:45 +01:00
Alex McLean 580447d00a move technical manual from https://github.com/tidalcycles/strudel/wiki/Technical-Manual 2025-06-12 14:15:07 +01:00
Alex McLean b6e67f3474 > codeberg 2025-06-12 14:12:42 +01:00
Alex McLean 84efa664ca Update README.md 2025-06-12 13:39:00 +01:00
Alex McLean 94746b5fae Update README.md 2025-06-12 13:37:58 +01:00
Jade (Rose) Rowland c1fa5d0855 Merge pull request #1375 from tidalcycles/jade/share_fat
Share fat URL
2025-06-12 10:25:48 +02:00
Jade (Rose) Rowland 372542dcd8 working 2025-06-12 10:23:21 +02:00
Felix Roos 239987af0b snapshot 2025-06-12 10:23:06 +02:00
Felix Roos 8363ba5a41 format 2025-06-12 10:22:35 +02:00
Felix Roos 30f7127a92 Merge remote-tracking branch 'origin/main' into supradough 2025-06-12 10:22:08 +02:00
Felix Roos 694a22af85 hotfix: bring back loading code + fill in default pattern later 2025-06-12 09:51:04 +02:00
Felix Roos ef3b9a68e3 hotfix: leave out part about shuffle in welcome tab 2025-06-12 09:21:57 +02:00
Felix Roos 40ba5d4465 hotfix: don't load patterns from db 2025-06-12 09:11:19 +02:00
Felix Roos 79f7938b33 hotfix: add default code 2025-06-12 08:51:03 +02:00
Felix Roos 2c9f9d785f hotfix: close bakery 2025-06-12 08:39:27 +02:00
Felix Roos 14193abe03 improve export: add stereo + measure performance + add bigger pattern for testing 2025-06-12 02:26:50 +02:00
Felix Roos 3caf08e199 up latency 2025-06-12 02:26:08 +02:00
Felix Roos 5cbd38a3e8 improve filter performance making it accept hz directly 2025-06-12 02:25:46 +02:00
Felix Roos bbd7ed0f27 lazy sample loading 2025-06-12 02:25:04 +02:00
Jade (Rose) Rowland 43504d16b6 add chorus 2025-06-10 16:03:42 +02:00
Alice Wyan 1b7fbecf50 Fix style issue 2025-06-10 13:20:21 +02:00
Jade (Rose) Rowland 7e8206dcbc pitched delay 2025-06-10 12:31:21 +02:00
Felix Roos 3963b807eb fix: calling doughsamples multiple times 2025-06-09 22:32:41 +02:00
Felix Roos e99adffc56 vibrato 2025-06-09 22:29:35 +02:00
Felix Roos c9f494d865 fix: node export 2025-06-09 22:10:09 +02:00
Alice Wyan 117cf7e18a Update samples.mdx 2025-06-09 19:45:21 +02:00
Felix Roos e8254735bb apply speed to synths and samples + add normalize flag (for fit) 2025-06-09 19:35:50 +02:00
Jade (Rose) Rowland 3d30007756 supersaw 2025-06-09 15:55:44 +02:00
Jade (Rose) Rowland aeaed50446 gaincurve 2025-06-09 15:18:47 +02:00
Alice Wyan ae15bb7274 Add browser cache explanation in samples.mdx
Several users (including me) have been bitten by this, so it's perhaps worth mentioning in the docs that the strudel.json file gets cached by the browser and doesn't reload properly unless forced.
2025-06-09 15:03:41 +02:00
Felix Roos 3ac0fdf619 rudimentary sample map loading (doughsamples) 2025-06-09 11:07:57 +02:00
Felix Roos d1b6b6be85 fix: hpf 2025-06-09 09:54:24 +02:00
Felix Roos 1081fc69e9 refactor: stereo sample support + channelwise fx 2025-06-09 09:52:29 +02:00
Felix Roos 73ef43dd2c move things around in init
+ shorten things
2025-06-08 22:56:55 +02:00
Jade (Rose) Rowland 181e51ef0e adjustable envelope curves 2025-06-08 20:26:20 +02:00
Jade (Rose) Rowland 1167fdb910 Merge branch 'supradough' of https://github.com/tidalcycles/strudel into supradough 2025-06-08 19:25:47 +02:00
Jade (Rose) Rowland ec9109dd89 exponential lerp 2025-06-08 19:24:55 +02:00
Felix Roos 55aef18851 buffers can now be repitched (still with aliasing) 2025-06-08 14:43:23 +02:00
Felix Roos 356d4360ec fix: scheduling + sample playback 2025-06-08 09:05:14 +02:00
Felix Roos 0f2aa9569b half working samples 2025-06-08 02:04:49 +02:00
Felix Roos ac7ee376e5 pitch envelope 2025-06-08 00:43:58 +02:00
Felix Roos ab052ce1ac fix: polyblepped sawtooth + fm = death 2025-06-07 23:15:09 +02:00
Felix Roos 5988e3d3b4 fix: hot reloading for dough.mjs (see comment) 2025-06-07 22:42:48 +02:00
Felix Roos 2f2bf5bf29 fix: note2midi for notes without octave 2025-06-07 22:36:54 +02:00
Felix Roos b000f2297d fm 2025-06-07 20:31:47 +02:00
Felix Roos 77463a199a add square alias for pulse 2025-06-07 13:26:43 +02:00
Felix Roos e54449f5f7 white brown pink noise + crackle alias for dust 2025-06-07 13:24:06 +02:00
Felix Roos d743570546 set delay time and feedback from voice 2025-06-07 13:12:35 +02:00
Felix Roos 1dac69635d feedback delay (still hard coded feedback / time values) 2025-06-07 10:40:34 +02:00
Felix Roos 49f38aeddb remove log 2025-06-06 16:26:17 +02:00
Felix Roos 43c05cb504 move supradough to separate package 2025-06-06 16:17:05 +02:00
Felix Roos ccc90d547c ignore dough-export to fix checks 2025-06-06 15:47:19 +02:00
Felix Roos 998a010247 better filter envelopes 2025-06-06 11:21:01 +02:00
Felix Roos e4cd5dc552 rough filter envelope implementation 2025-06-06 10:55:38 +02:00
Felix Roos 6cf0b6f651 hpf + bpf 2025-06-06 10:12:49 +02:00
Felix Roos 794bf86904 distort 2025-06-06 09:56:41 +02:00
Felix Roos 9ed690ce45 pulse osc + velocity 2025-06-06 09:37:40 +02:00
Felix Roos 623bf93368 panning 2025-06-06 08:50:02 +02:00
Felix Roos 0cc18a6468 crush (might be wrong) 2025-06-06 08:27:47 +02:00
Felix Roos 87598e10d1 coarse 2025-06-06 08:17:20 +02:00
Jade (Rose) Rowland 5a88a6daa6 Merge pull request #1364 from tidalcycles/dosomething
feat: onTriggerTime for interfacing with random APIs and doing illegal things on event time
2025-06-05 19:39:16 +01:00
Felix Roos ccec7e725a poc: render pattern audio with node script 2025-06-05 11:04:55 +02:00
Felix Roos f0e6c5483c handle invalid spawns + remove logs 2025-06-05 10:30:53 +02:00
Felix Roos 2cbd35f6d2 refactor: make webaudio glue as minimal as possible 2025-06-05 10:26:14 +02:00
Felix Roos 930dabe4d6 dough as a singleton worklet with voice allocation 2025-06-05 09:54:44 +02:00
Jade (Rose) Rowland 9350d826a3 Merge pull request #1363 from tidalcycles/berlinnoise
feat: berlin noise
2025-06-05 00:08:18 +01:00
Jade (Rose) Rowland ff4b7ca171 fix volume 2025-06-04 01:08:36 +01:00
Jade (Rose) Rowland 5129fa6677 fix click 2025-06-04 00:48:32 +01:00
Jade (Rose) Rowland df923174ed working 2025-06-03 01:22:37 +01:00
Jade (Rose) Rowland cde943d737 fix test 2025-06-02 13:02:41 +01:00
Jade (Rose) Rowland f363bd6bcc Merge branch 'main' into berlinnoise 2025-06-02 12:58:33 +01:00
Jade (Rose) Rowland e0a21a936b berlin 2025-06-02 12:57:37 +01:00
Felix Roos 5336569c25 proper lpf mapping + remove redundant worklet params, 2025-06-01 21:20:28 +02:00
Felix Roos 483843bd0a begin supradough 2025-06-01 18:06:36 +02:00
Felix Roos b312ff63a9 Publish
- @strudel/codemirror@1.2.2
 - @strudel/core@1.2.2
 - @strudel/csound@1.2.3
 - @strudel/draw@1.2.2
 - @strudel/gamepad@1.2.2
 - @strudel/hydra@1.2.2
 - @strudel/midi@1.2.3
 - @strudel/mini@1.2.2
 - @strudel/motion@1.2.2
 - @strudel/mqtt@1.2.2
 - @strudel/osc@1.2.2
 - @strudel/repl@1.2.3
 - @strudel/serial@1.2.2
 - @strudel/soundfonts@1.2.3
 - superdough@1.2.3
 - @strudel/tonal@1.2.2
 - @strudel/transpiler@1.2.2
 - @strudel/web@1.2.3
 - @strudel/webaudio@1.2.3
 - @strudel/xen@1.2.2
2025-05-29 23:58:35 +02:00
Jade (Rose) Rowland 93bc353b6b Merge pull request #1359 from tidalcycles/bytebeat_fixes_3
Fix bytebeat sample offset
2025-05-29 14:36:43 +02:00
Jade (Rose) Rowland 14a0dea826 fixtest 2025-05-29 14:35:37 +02:00
Jade (Rose) Rowland 009f5445be codeformat 2025-05-29 14:33:25 +02:00
Jade (Rose) Rowland 3d37c73103 fixed 2025-05-29 14:32:52 +02:00
Alex McLean 0b0f9fe13b preserve stepcount in chunks (#1358)
* preserve stepcount in chunks
* format
2025-05-29 12:14:18 +02:00
Jade (Rose) Rowland 1d189763b2 Merge pull request #1357 from tidalcycles/bbfixes_2
Byte Beat improvements -> 2
2025-05-29 02:34:30 +02:00
Jade (Rose) Rowland a4b55776d2 test 2025-05-29 02:33:06 +02:00
Jade (Rose) Rowland 0287be547a bbstart 2025-05-29 02:27:55 +02:00
Jade (Rose) Rowland 6a83ede33d Merge pull request #1356 from tidalcycles/bb_fixes
Bytebeat improvements
2025-05-28 16:40:32 +02:00
Jade (Rose) Rowland 1e3f546918 bb waveforms 2025-05-28 16:36:53 +02:00
Jade (Rose) Rowland faa60be211 Merge pull request #1354 from tidalcycles/jade/bytebeats
feat: Byte Beats!
2025-05-27 17:42:38 +02:00
Jade (Rose) Rowland dde2b9c6f8 working 2025-05-27 17:41:32 +02:00
Jade (Rose) Rowland 382dce65df working 2025-05-27 17:39:55 +02:00
Jade (Rose) Rowland 63f4f202f1 working 2025-05-27 17:35:35 +02:00
Jade (Rose) Rowland 366637026b bbs 2025-05-27 17:34:53 +02:00
Jade (Rose) Rowland 608dfd515e WIP oscillations 2025-05-27 14:37:55 +02:00
Felix Roos 9bd7b66228 Publish
- @strudel/codemirror@1.2.1
 - @strudel/core@1.2.1
 - @strudel/csound@1.2.2
 - @strudel/draw@1.2.1
 - @strudel/gamepad@1.2.1
 - @strudel/hydra@1.2.1
 - @strudel/midi@1.2.2
 - @strudel/mini@1.2.1
 - @strudel/motion@1.2.1
 - @strudel/mqtt@1.2.1
 - @strudel/osc@1.2.1
 - @strudel/repl@1.2.2
 - @strudel/serial@1.2.1
 - @strudel/soundfonts@1.2.2
 - superdough@1.2.2
 - @strudel/tonal@1.2.1
 - @strudel/transpiler@1.2.1
 - @strudel/web@1.2.2
 - @strudel/webaudio@1.2.2
 - @strudel/xen@1.2.1
2025-05-24 11:30:02 +02:00
Jade (Rose) Rowland 5e4eb7fc53 gain 2025-05-20 21:53:10 +01:00
Jade (Rose) Rowland 45bccf13ff add test 2025-05-20 21:47:43 +01:00
Jade (Rose) Rowland 65f1760fad format 2025-05-20 21:45:14 +01:00
Jade (Rose) Rowland b8d2d02466 bb 2025-05-20 21:41:40 +01:00
Jade (Rose) Rowland 058cb36640 structure 2025-05-20 20:28:52 +01:00
Nachito 5c3501caa4 fix: typo on docs causing problems with autocompletion. (#1350)
* fix: scramble and shuffle comments

* fix: comments on themes,docs, tests and more
2025-05-18 20:43:04 +01:00
Jade (Rose) Rowland 1341bd9c92 Merge pull request #1343 from daslyfe/pw
feat: Create pulsewidth (pw) and pulsewidth lfo parameters
2025-05-14 19:12:06 -04:00
Jade (Rose) Rowland 760d1abec0 remove n 2025-05-14 19:10:59 -04:00
Jade (Rose) Rowland 2b44fc48a4 Merge pull request #1344 from daslyfe/multichannelorbits
feat: Multi Channel Orbits
2025-05-14 12:25:16 -04:00
Henré Botha 99779171f5 Fix typo (#1346) 2025-05-13 16:45:29 +01:00
Jade (Rose) Rowland 64ebfb57c3 lint 2025-05-07 11:30:42 -04:00
Jade (Rose) Rowland 099d321dbd format 2025-05-07 11:25:34 -04:00
Jade (Rose) Rowland 59bdfd2cb8 format 2025-05-07 11:12:05 -04:00
Jade (Rose) Rowland 56d3436fda asconst 2025-05-07 01:08:00 -04:00
Jade (Rose) Rowland 440ce0cd3b format 2025-05-06 02:14:35 -04:00
Jade (Rose) Rowland 98346261ed lint 2025-05-06 01:13:50 -04:00
Jade (Rose) Rowland 38e4718826 lint 2025-05-06 01:09:20 -04:00
Jade (Rose) Rowland 38908baccd working 2025-05-06 01:06:37 -04:00
alex 1b3b07842e format again.. 2025-05-03 21:57:01 +01:00
alex 98efd72ab4 delint 2025-05-03 20:59:05 +01:00
alex 1eb5f6a995 format 2025-05-03 20:38:43 +01:00
alex 9b10dc8535 change pipe symbol from '.' to '#' 2025-05-03 20:37:44 +01:00
Felix Roos 2951a60fac fix: rests at the end 2025-05-03 11:44:02 +02:00
Jade (Rose) Rowland 94257e81ee lint 2025-05-02 23:44:55 -04:00
Jade (Rose) Rowland 006ce9d1da delaytime 2025-05-02 23:33:58 -04:00
Felix Roos 607a6121bc rename mondo package to mondolang 2025-05-02 16:20:23 +02:00
Felix Roos 4208c79c09 fix: ! and @ operators 2025-05-02 15:13:04 +02:00
Felix Roos 7565354274 superdough: fallback to triangle when non-string is given 2025-05-02 08:54:34 +02:00
Felix Roos ffe831d24b mondo: strings now get type "string" to be discernable from plain variables 2025-05-02 08:53:55 +02:00
Felix Roos 60dd8bd763 tweak again 2025-05-02 08:35:16 +02:00
Felix Roos 29e5833c8c tweak 2025-05-02 08:32:46 +02:00
Felix Roos e3a6444f41 mondo: support line comments 2025-05-02 08:30:09 +02:00
Felix Roos 30fd4c5dec Merge branch 'main' into uzu 2025-05-02 08:16:52 +02:00
Felix Roos 8d02d4270a Publish
- @strudel/repl@1.2.1
 - @strudel/web@1.2.1
2025-05-02 00:03:18 +02:00
Felix Roos 9cf1cd2656 revert web + repl versions for next try 2025-05-02 00:02:50 +02:00
Felix Roos 4c079b6ebe Merge pull request #1339 from tidalcycles/fix-web-pkg-build
Fix web + repl package builds
2025-05-02 00:01:27 +02:00
Felix Roos e9e2e881e5 fix: repl package build 2025-05-01 23:58:49 +02:00
Felix Roos 685b4f172b fix: duplicate key 2025-05-01 23:57:09 +02:00
Felix Roos 53e50d81b0 also use worklet plugin in web package 2025-05-01 23:56:29 +02:00
Felix Roos 8f58d5788f Publish
- @strudel/csound@1.2.1
 - @strudel/midi@1.2.1
 - @strudel/repl@1.2.1
 - @strudel/soundfonts@1.2.1
 - superdough@1.2.1
 - vite-plugin-bundle-audioworklet@0.1.1
 - @strudel/web@1.2.1
 - @strudel/webaudio@1.2.1
2025-05-01 23:54:13 +02:00
Felix Roos 306a6db8dc hotfix: remove broken tauri workflow 2025-05-01 23:52:36 +02:00
Felix Roos 757d78252b Merge pull request #1338 from tidalcycles/fix-worklet-bundling
fix: superdough worklets bundling
2025-05-01 23:50:56 +02:00
Felix Roos 6f2e026e4a fix: import in vitest config 2025-05-01 23:49:47 +02:00
Felix Roos 22f114be59 update metadata 2025-05-01 23:35:20 +02:00
Felix Roos f993056fb1 fix: tests -> use vite plugin in tests as well 2025-05-01 23:30:14 +02:00
Felix Roos fdbbcd2dd2 add vite-plugin-bundle-audioworklet and use it both from website and superdough 2025-05-01 23:26:04 +02:00
Felix Roos 7bec92ca99 fix: superdough worklets bundling 2025-05-01 23:13:32 +02:00
Felix Roos 5702914661 Publish
- @strudel/reference@1.2.0
2025-05-01 12:52:12 +02:00
Felix Roos f2a9e2d4e6 hotfix: downgrade reference to be able to get 1.2.0 2025-05-01 12:51:54 +02:00
Felix Roos 6398b5fb38 hotfix: make broken hs2js + tidal packages private to opt out of release
- some issue with the build command
2025-05-01 12:48:43 +02:00
Felix Roos 9ceebd4679 hotfix: reference package vite config 2025-05-01 12:47:56 +02:00
Felix Roos 2da03ab46f Merge remote-tracking branch 'origin/main' into uzu 2025-05-01 11:15:24 +02:00
Felix Roos 243adda3dd mondo: more sicp tests 2025-05-01 10:56:33 +02:00
Felix Roos 7fc21d55d7 mondo: rational number test 2025-04-04 10:04:22 +02:00
Felix Roos d5ef686fe0 mondo: sicp 100 2025-04-04 00:45:00 +02:00
Felix Roos d4733a30ab mondo: add half interval method example 2025-04-03 17:30:03 +02:00
Felix Roos 989bd0990e mondo: let expressions 2025-04-03 17:01:36 +02:00
Felix Roos 60d09adb44 mondo: more tests 2025-04-02 22:33:18 +02:00
Felix Roos b2588e8c93 fix: lint 2025-04-02 22:11:06 +02:00
Felix Roos 39d2784441 mondo: more sicp tests
+ support special form for function def (might remove later)
+ support multiple expressions in fn body
+ support lexical scoping
2025-04-02 22:09:17 +02:00
Felix Roos aa70246afc mondo: more sicp 2025-04-01 23:24:47 +02:00
Felix Roos f6ffdd6ae6 mondo: move +- to ops
+ add "raw" to parsed pairs
+ implement match + if
+ add more sicp examples
2025-04-01 22:31:42 +02:00
Felix Roos 077aac1888 mondo: add some examples from sicp book 2025-04-01 21:50:03 +02:00
Felix Roos 94a3a60e49 mondo: remember pair locations
+ allow passing a scope to MondoRunner.run
+ make def a side effect
+ proper lambda with multiple args + closure
2025-04-01 21:49:28 +02:00
Felix Roos f2372e7a41 mondo: refactor evaluate function into bits 2025-03-30 17:55:37 +02:00
Felix Roos a0fb8fb37f mondo: def node 2025-03-30 11:43:01 +02:00
Felix Roos b4027fd92a fix: mondo dont mutate (breaks lambdas) 2025-03-30 11:42:50 +02:00
Felix Roos c9cafa37fd mondo: improve mondo package api + update readme 2025-03-29 21:33:51 +01:00
Felix Roos 2e017e46f9 trim readme 2025-03-29 20:17:09 +01:00
Felix Roos c9f58220a3 remove minor change 2025-03-29 19:55:29 +01:00
Felix Roos e9de45993e signal: remove signal synonyms for now 2025-03-29 19:54:04 +01:00
Felix Roos 6b2b8b5124 fix: test 2025-03-26 09:30:49 +01:00
Felix Roos 64a6dacc1e mondo: patternable function names 2025-03-26 09:27:02 +01:00
Felix Roos 1738e4d538 fix: lint 2025-03-26 03:55:54 +01:00
Felix Roos abc7a1e48d mondo: this is the way 2025-03-26 03:55:00 +01:00
Felix Roos 7716fdb98e mondo: refactor
- rename MondoRunner.call => .evaluate
- can now evaluate leafs
- remove .( because it's confusing and half baked
- support (.) as id function
2025-03-26 03:22:23 +01:00
Felix Roos 2938bfd88f mondo: add highly impractical .(. notation for local infix application 2025-03-26 02:46:26 +01:00
Felix Roos 222e479e30 mondo: more docs 2025-03-23 23:18:57 +01:00
Felix Roos 92b5b6538f mondo: improve doc 2025-03-23 23:12:52 +01:00
Felix Roos 3a19e23473 mondo: doc 2025-03-23 22:49:56 +01:00
Felix Roos dd5743ab8c mondo: bring back $ for stacking 2025-03-23 22:49:23 +01:00
Felix Roos 51e3aa257c mondolang function for mondo repl + fix rests 2025-03-23 22:49:03 +01:00
Felix Roos 5eabcf0618 mondo mode for StrudelMirror / repl / mini repl 2025-03-23 22:47:33 +01:00
Felix Roos 6d21456423 mondo: allow # character in plain values (for sharps) 2025-03-23 11:18:18 +01:00
Felix Roos bca16cdf99 mondo: rename resolve_ -> desugar_ 2025-03-22 23:51:23 +01:00
Felix Roos 492271d786 mondo: support $ tidal style 2025-03-22 23:28:57 +01:00
Felix Roos f71db4aeed mondo: flip pipe order: now pining to the end of the function... 2025-03-21 23:50:14 +01:00
Felix Roos 5d4ef46ac7 mondo cleanup 2025-03-21 22:43:39 +01:00
Felix Roos bd93e44154 mondo: fix combination of | and , 2025-03-21 22:34:53 +01:00
Felix Roos 6fd89ddee7 mondo: add | and ? 2025-03-21 11:10:43 +01:00
Felix Roos cf1f4ec35c fix: patterns without structure would error on draw 2025-03-21 11:10:25 +01:00
Felix Roos 12bb82d295 add chooseIn + chooseOut 2025-03-21 11:10:06 +01:00
Felix Roos c33cfc78c5 waveform aliases: tri, sqr, saw, sin 2025-03-20 21:19:47 +01:00
Felix Roos ac6472a43a mondo: mondo as minilang (inactive) 2025-03-20 21:19:21 +01:00
Felix Roos 989fdfa20b transpiler: add mechanism to register custom mini language 2025-03-20 21:18:32 +01:00
Felix Roos 05ae31838e add sin sqr cos aliases 2025-03-20 18:01:41 +01:00
Felix Roos c691916cbf mondo: generic bracket names + simplify call handler + refactor mondough 2025-03-20 17:55:40 +01:00
Felix Roos e16295623d mondo: use stepcat for curly braces 2025-03-20 14:09:32 +01:00
Felix Roos 9626f3cc9a mondo add % for pace 2025-03-20 13:24:31 +01:00
Felix Roos 432e8dcccc mondo: support ! and @, also express seq and cat with stepcat 2025-03-20 13:15:48 +01:00
Felix Roos d2e93a99f1 fix: lint 2025-03-20 10:24:22 +01:00
Felix Roos 3505732afa mondo: add .. operator 2025-03-20 09:34:47 +01:00
Felix Roos 55a5f1d62a transpiler cleanup 2025-03-20 09:10:54 +01:00
Felix Roos 3657e2fd65 mondo: change default markcss 2025-03-20 09:10:45 +01:00
Felix Roos 65a7b3030e fix: markcss can now override styles (like color) 2025-03-20 09:10:12 +01:00
Felix Roos 208706fb52 simplify mondo: ":" is just another operator 2025-03-20 09:09:29 +01:00
Felix Roos e04f250adb mondo: proper lambda functions with local scope 2025-03-19 18:16:37 +01:00
Felix Roos 642ddcdb59 support : in mondo 2025-03-19 17:03:17 +01:00
Felix Roos 88ca54461e rename @strudel/mondough to @strudel/mondo 2025-03-19 00:15:53 +01:00
Felix Roos 129fd7d6b0 add notes 2025-03-19 00:13:06 +01:00
Felix Roos 7db52b3dc2 mondo improvements:
- add second string type
- add $ as alias for stack
- simplify leaf handling
2025-03-18 22:33:14 +01:00
Felix Roos 40f6489111 reify variables 2025-03-16 23:30:41 +01:00
Felix Roos 118b619b74 mondo: support - ~ in plain type + simplify errors 2025-03-16 23:10:52 +01:00
Felix Roos 2dd445c102 mondo: support variables 2025-03-16 23:10:23 +01:00
Felix Roos 3c3832dbce superdough: native support for rest symbols - ~ in s 2025-03-16 23:08:31 +01:00
Felix Roos 9b8761bc45 fix: top-level functions arp/arpWith 2025-03-16 22:31:40 +01:00
Felix Roos 77ade0758e mondo: slightly improve error handling 2025-03-16 22:07:03 +01:00
Felix Roos 902012759a fix:support negative numbers 2025-03-16 21:24:22 +01:00
Felix Roos ea61627963 fix: lint error 2025-03-16 21:05:04 +01:00
Felix Roos 95526ac99c fix: formatting 2025-03-16 21:04:28 +01:00
Felix Roos b0da353115 mondo highlighting 2025-03-16 21:04:05 +01:00
Felix Roos fae59a6bcd feat: add mondough package to run strudel via mondo 2025-03-16 10:49:18 +01:00
Felix Roos 11196fb1e6 breaking: refactor controls
- multiple args wont be interpreted as sequence anymore
- you can now pass value, pat to set value to pat
2025-03-16 10:48:38 +01:00
Felix Roos e782dc09dd export strudelScope for mondo to use 2025-03-16 10:47:32 +01:00
Felix Roos e3df504423 rename uzu to mondo 2025-03-16 02:01:16 +01:00
Felix Roos b71b1354c3 uzu: stacks now work within () + write more tests 2025-03-16 00:51:59 +01:00
Felix Roos dbe3915368 fix: lint errors 2025-03-15 10:35:22 +01:00
Felix Roos 62705da3de begin uzu package 2025-03-15 10:29:23 +01:00
Kaspars 81ca199a96 Merge branch 'upstream-main' into tonal-fix 2024-06-02 12:39:14 +03:00
Jade (Rose) Rowland bee8c81254 simplify targettime 2024-05-13 23:14:30 -04:00
Jade (Rose) Rowland 8ad48e1633 remove unesseccary time call 2024-05-13 23:02:48 -04:00
Jade (Rose) Rowland 4a181d5b33 updated non synced clock to work more like synced clock 2024-05-13 23:02:36 -04:00
Jade (Rose) Rowland d5ab6b7211 fix tests 2024-05-13 22:38:20 -04:00
Jade (Rose) Rowland 4ba9d47bff fix test 2024-05-13 21:10:43 -04:00
Jade (Rose) Rowland c6c5a3035c fixed non synced clock 2024-05-13 21:06:24 -04:00
Jade (Rose) Rowland e024ae2142 almost figured it out 2024-05-13 20:42:59 -04:00
Jade (Rose) Rowland 19df19375d kinda fixed it, need to find cause of incorrect cps calculation 2024-05-13 10:33:18 -04:00
Jade (Rose) Rowland cba96049a3 fixed duplicate variable 2024-05-10 00:03:52 -04:00
Jade (Rose) Rowland 1509ff1793 Merge branch 'tidalcycles:main' into gainmod 2024-05-09 23:55:13 -04:00
Jade (Rose) Rowland 6a33032da7 formatting 2024-05-09 23:26:04 -04:00
Jade (Rose) Rowland 6c05a4eb7b fixed tri shape 2024-05-09 00:21:21 -04:00
Kaspars 8d8b8ab99e codeformat 2024-05-08 10:42:06 +02:00
Kaspars a4f10d5339 bug fix 2024-05-08 10:38:06 +02:00
Jade (Rose) Rowland 16472b59dd fix cyclist clock cycle 2024-05-08 00:05:05 -04:00
Kaspars 33a73c37bc fix tests 2024-05-08 00:46:27 +02:00
Kaspars 4e6d39666a codeformat 2024-05-08 00:00:58 +02:00
Kaspars a5b6022506 - fix scale() to allow both n() and note() at the same time
- fix scale() to allow scale names without tonic and then default it to C
2024-05-07 23:56:39 +02:00
Jade (Rose) Rowland 7df663e87d memory leaking 2024-05-05 23:54:30 -04:00
Jade (Rose) Rowland 3159f66560 working 2024-05-05 22:52:18 -04:00
Jade (Rose) Rowland 0d900c0134 sine test 2024-05-05 12:02:51 -04:00
Jade (Rose) Rowland 66a27a609c implementing 2024-05-03 14:58:20 -04:00
Jade (Rose) Rowland 496d60dc1c testing 2024-05-03 14:56:16 -04:00
337 changed files with 30156 additions and 10861 deletions
+40
View File
@@ -0,0 +1,40 @@
name: Build and Deploy to beta (warm.strudel.cc)
on:
push:
branches:
- main
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: docker
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.12.2
- uses: actions/setup-node@v4
with:
node-version: 20
# cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Deploy
run: |
eval $(ssh-agent -s)
echo "$SSH_PRIVATE_KEY" | ssh-add -
apt update && apt install -y rsync
mkdir ~/.ssh
ssh-keyscan matrix.toplap.org > ~/.ssh/known_hosts
rsync -atv --delete --delete-after --progress ./website/dist/ strudel@matrix.toplap.org:/home/strudel/deploy/warm.strudel.cc
+37
View File
@@ -0,0 +1,37 @@
name: Build and Deploy to live (strudel.cc)
on: [workflow_dispatch]
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: docker
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.12.2
- uses: actions/setup-node@v4
with:
node-version: 20
# cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Deploy
run: |
eval $(ssh-agent -s)
echo "$SSH_PRIVATE_KEY" | ssh-add -
apt update && apt install -y rsync
mkdir ~/.ssh
ssh-keyscan matrix.toplap.org > ~/.ssh/known_hosts
rsync -atv --delete --delete-after --progress ./website/dist/ strudel@matrix.toplap.org:/home/strudel/deploy/strudel.cc
@@ -4,20 +4,22 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
runs-on: docker
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- name: apt install ztd
run: apt update && apt install -y zstd
- uses: pnpm/action-setup@v4
with:
version: 9.12.2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache: "pnpm"
- run: pnpm install
- run: pnpm run format-check
- run: pnpm run lint
-49
View File
@@ -1,49 +0,0 @@
name: Build and Deploy
on: [workflow_dispatch]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
deployments: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.12.2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "./website/dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
-62
View File
@@ -1,62 +0,0 @@
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
+15
View File
@@ -45,6 +45,20 @@ tidal-drum-machines
webaudiofontdata
src-tauri/target
### BEGIN Visual Studio Code ###
# Blanket, recursive exclude for .vscode directory and files
.vscode/**/*
# Unexclude specific files and directories within .vscode
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
### END Visual Studio Code ###
# BEGIN JetBrains -> END JetBrains
# for JetBrains IDE users, e.g. WebStorm. Source: https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
@@ -130,3 +144,4 @@ fabric.properties
samples/*
!samples/README.md
.idea/
+1
View File
@@ -0,0 +1 @@
22
+1
View File
@@ -13,3 +13,4 @@ pnpm-workspace.yaml
website/.astro
!tidal-drum-machines.json
!tidal-drum-machines-alias.json
.pnpm-store
+1081
View File
File diff suppressed because it is too large Load Diff
+104 -13
View File
@@ -2,12 +2,15 @@
Thanks for wanting to contribute!!! There are many ways you can add value to this project
## Move to codeberg
Along with many other live coding projects, we have moved from Microsoft's Github platform to Codeberg for ethical reasons. Please don't fork the project back to github.
## Communication Channels
To get in touch with the contributors, either
To get in touch with the community, either
- open a [github discussion](https://github.com/tidalcycles/strudel/discussions) or
- [join the Tidal Discord Channel](https://discord.gg/remJ6gQA) and go to the #strudel channel
- [join the Uzulang Discord Server](https://discord.com/invite/HGEdXmRkzT) and go to the strudel channels (Uzulangs are a family of live coding languages inspired by each other, including TidalCycles as well as Strudel)
- Find related discussions on the [tidal club forum](https://club.tidalcycles.org/)
## Ask a Question
@@ -26,22 +29,35 @@ Use one of the Communication Channels listed above and drop us a line or two!
## Share Music
If you made some music with strudel, you can give back some love and share what you've done!
Your creation could also be part of the random selection in the REPL if you want.
Use one of the Communication Channels listed above.
(There used to be a random selection of contributed patterns in the REPL, but that is unfortunately disabled for now due to abuse)
## Improve the Docs
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.
If you find some weak spots in the [docs](https://strudel.cc/workshop/getting-started/), you can edit each file directly on codeberg. There are "Edit this page" links in the right sidebar that take you to the right place.
## Propose a Feature
If you want a specific feature that is not part of strudel yet, feel free to use one of the communication channels above.
Maybe you even want to help with the implementation of that feature!
If you want a specific feature that is not part of strudel yet, feel free to use one of the communication channels above. Please bear in mind that this is a free/open source project, oriented around collaborative discussion. Maybe you even want to help with the implementation of that feature!
## Contribute a feature
Pull requests welcome! Consider starting with discussion or proof-of-concept first, rather than do loads of work on something and then find it doesn't fit the collective goals of the project, or something like that.
At the time of writing we have a PR backlog, and generally prioritise bugfixes and contributions that have arisen through community discussion.
### AI/LLM policy
Strudel is a project handmade by humans, with thought and nuance.
If you have used LLMs (so called 'AI'), please detail that in the pull request. We are still developing our response to the onslaught of LLM technology, but for practical and legal reasons are currently not accepting wholly LLM-generated code. We are also not accepting PRs that add LLM features to strudel itself.
There are #llm-chat and #llm-share channels on our discord. Please do not discuss or share LLM-related things outside of those channels.
## Report a Bug
If you've found a bug, or some behaviour that does not seem right, you are welcome to file an [issue](https://github.com/tidalcycles/strudel/issues).
If you've found a bug, or some behaviour that does not seem right, you are welcome to file an [issue](https://codeberg.org/uzu/strudel/issues).
Please check that it has not been reported before.
## Fix a Bug
@@ -71,7 +87,7 @@ To get the project up and running for development, make sure you have installed:
then, do the following:
```sh
git clone https://github.com/tidalcycles/strudel.git && cd strudel
git clone https://codeberg.org/uzu/strudel.git && cd strudel
pnpm i # install at root to symlink packages
pnpm start # start repl
```
@@ -108,12 +124,11 @@ There are also eslint extensions / plugins for most editors.
## 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`
When opening a PR, the CI runner will (once approved by a human) 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.
The project is split into multiple [packages](https://codeberg.org/uzu/strudel/src/branch/main/packages) with independent versioning.
When you run `pnpm i` on the root folder, [pnpm workspaces](https://pnpm.io/workspaces) will install all dependencies of all subpackages. This will allow any js file to import `@strudel/<package-name>` to get the local version,
allowing to develop multiple packages at the same time.
@@ -140,6 +155,7 @@ Important: Always publish with `pnpm`, as `npm` does not support overriding main
## useful commands
```sh
#regenerate the test snapshots (ex: when updating or creating new pattern functions)
pnpm snapshot
@@ -150,6 +166,81 @@ pnpm run osc
#build the standalone version
pnpm tauri build
```
## version tag patching
here's a little guide on how to patch patterns in the database to prevent breaking old patterns due to breaking changes in newer versions.
the general tactic is to use `// @version x.y` to tag a pattern with a specific strudel version. when a pattern is evaluated, this metadata will de-activate any breaking changes that came after the specified version.
for example, in version 1.1, the default value for `fanchor` was changed from `0.5` to `0`.
if play a pattern that was made before that change, sounds that use filter evenlopes can sound very different, so by adding `// @version 1.0` will make it sound like it used to.
before releasing a new version with breaking changes, we can edit all patterns in the database, inserting the version tag they were created under:
as an example, to release version 1.2, do the following:
1. get date range
```sh
# get date of last version:
git log -1 --format=%aI @strudel/core@1.1.0
# 2024-05-31T23:07:26+02:00
# get date of current version:
git log -1 --format=%aI @strudel/core@1.2.0
# 2025-05-01T12:39:24+02:00
# might also use todays timestamp if version is not yet released
```
now we know, all patterns between these 2 dates have to receive a version tag (unless they already have one).
2. get patterns in question
```sql
SELECT *
FROM code_v1
WHERE code NOT LIKE '%@version%'
AND created_at > '2024-05-31T23:07:26+02:00'
AND created_at < '2025-05-01T12:39:24+02:00'
ORDER BY created_at ASC;
```
this gives us all unversioned patterns that were saved between 1.1.0 and 1.2.0. in this case, it's 9373 patterns!
3. insert version tags
we are now ready to insert the version tag to these patterns.
before updating thousands of patterns, it's probably a good idea to test if a single one gets udpated:
```sql
UPDATE code_v1
SET code = code || E'\n// @version 1.1'
WHERE hash = 'Ns2sMB40yIw4';
```
after [verifying](https://strudel.cc/?Ns2sMB40yIw4) that the version tag has been added, let's insert it everywhere:
```sql
UPDATE code_v1
SET code = code || E'\n// @version 1.1'
WHERE code NOT LIKE '%@version%'
AND created_at > '2024-05-31T23:07:26+02:00'
AND created_at < '2025-05-01T12:39:24+02:00'
```
4. verify
we can verify that the edits worked by querying all patterns that contain the new version tag:
```sql
SELECT *
FROM code_v1
WHERE code LIKE '%@version 1.1%'
AND created_at > '2024-05-31T23:07:26+02:00'
AND created_at < '2025-05-01T12:39:24+02:00'
ORDER BY created_at ASC;
```
## Have Fun
Remember to have fun, and that this project is driven by the passion of volunteers!
+21
View File
@@ -0,0 +1,21 @@
FROM node:24
WORKDIR /app
RUN npm install pnpm --global
COPY pnpm-workspace.yaml ./
COPY package.json pnpm-lock.yaml ./
COPY packages/ ./packages/
COPY examples/ ./examples/
RUN mkdir -p website/public
COPY website/package.json ./website/
RUN pnpm install
COPY . .
EXPOSE 4321
CMD ["pnpm", "dev"]
+9 -11
View File
@@ -1,20 +1,22 @@
# strudel
[![Strudel test status](https://github.com/tidalcycles/strudel/actions/workflows/test.yml/badge.svg)](https://github.com/tidalcycles/strudel/actions) [![DOI](https://zenodo.org/badge/450927247.svg)](https://doi.org/10.5281/zenodo.6659278)
Live coding patterns on the web
An experiment in making a [Tidal](https://github.com/tidalcycles/tidal/) using web technologies. This software is a bit more stable now, but please continue to tread carefully.
- Try it here: <https://strudel.cc>
- Docs: <https://strudel.cc/learn>
- Source: https://codeberg.org/uzu/strudel/
* Along with many other live coding projects, we have moved from Microsoft's Github platform to Codeberg for ethical reasons. **Please don't fork the project back to github**.
- Technical Blog Post: <https://loophole-letters.vercel.app/strudel>
- 1 Year of Strudel Blog Post: <https://loophole-letters.vercel.app/strudel1year>
- 2 Years of Strudel Blog Post: <https://strudel.cc/blog/#year-2>
## Running Locally
After cloning the project, you can run the REPL locally:
1. Install [Node.js](https://nodejs.org/)
1. Install [Node.js](https://nodejs.org/) 18 or newer
2. Install [pnpm](https://pnpm.io/installation)
3. Install dependencies by running the following command:
```bash
@@ -31,19 +33,13 @@ This project is organized into many [packages](./packages), which are also avail
Read more about how to use these in your own project [here](https://strudel.cc/technical-manual/project-start).
You will need to abide by the terms of the [GNU Affero Public Licence v3](LICENSE.md). As such, Strudel code can only be shared within free/open source projects under the same license -- see the license for details.
You will need to abide by the terms of the [GNU Affero Public Licence v3](LICENSE). As such, Strudel code can only be shared within free/open source projects under the same license -- see the license for details.
Licensing info for the default sound banks can be found over on the [dough-samples](https://github.com/felixroos/dough-samples/blob/main/README.md) repository.
## Contributing
There are many ways to contribute to this project! See [contribution guide](./CONTRIBUTING.md).
<a href="https://github.com/tidalcycles/strudel/graphs/contributors">
<img src="https://contrib.rocks/image?repo=tidalcycles/strudel" />
</a>
Made with [contrib.rocks](https://contrib.rocks).
There are many ways to contribute to this project! See [contribution guide](./CONTRIBUTING.md). You can find the full list of contributors [here](https://codeberg.org/uzu/strudel/activity/contributors).
## Community
@@ -52,3 +48,5 @@ There is a #strudel channel on the TidalCycles discord: <https://discord.com/inv
You can also ask questions and find related discussions on the tidal club forum: <https://club.tidalcycles.org/>
The discord and forum is shared with the haskell (tidal) and python (vortex) siblings of this project.
We also have a mastodon account: <a rel="me" href="https://social.toplap.org/@strudel">social.toplap.org/@strudel</a>
@@ -201,7 +201,7 @@ interfaces.
The Strudel REPL is available at <https://strudel.cc>,
including an interactive tutorial. The repository is at
<https://github.com/tidalcycles/strudel>, all the code is open source
<https://codeberg.org/uzu/strudel/releases>, all the code is open source
under the GPL-3.0 License.
# Acknowledgments
@@ -128,7 +128,7 @@ For the future, it is planned to integrate alternative sound engines such as Gli
# Links
The Strudel REPL is available at <https://strudel.cc>, including an interactive tutorial.
The repository is at <https://github.com/tidalcycles/strudel>, all the code is open source under the GPL-3.0 License.
The repository is at <https://codeberg.org/uzu/strudel/releases>, all the code is open source under the GPL-3.0 License.
# Acknowledgments
+954
View File
@@ -0,0 +1,954 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<meta name="date" content="2022-12-14" />
<title>Strudel: live coding patterns on the Web</title>
<style type="text/css">
code {
white-space: pre;
}
</style>
<style type="text/css">
pre > code.sourceCode {
white-space: pre;
position: relative;
}
pre > code.sourceCode > span {
display: inline-block;
line-height: 1.25;
}
pre > code.sourceCode > span:empty {
height: 1.2em;
}
.sourceCode {
overflow: visible;
}
code.sourceCode > span {
color: inherit;
text-decoration: inherit;
}
div.sourceCode {
margin: 1em 0;
}
pre.sourceCode {
margin: 0;
}
@media screen {
div.sourceCode {
overflow: auto;
}
}
@media print {
pre > code.sourceCode {
white-space: pre-wrap;
}
pre > code.sourceCode > span {
text-indent: -5em;
padding-left: 5em;
}
}
pre.numberSource code {
counter-reset: source-line 0;
}
pre.numberSource code > span {
position: relative;
left: -4em;
counter-increment: source-line;
}
pre.numberSource code > span > a:first-child::before {
content: counter(source-line);
position: relative;
left: -1em;
text-align: right;
vertical-align: baseline;
border: none;
display: inline-block;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding: 0 4px;
width: 4em;
color: #aaaaaa;
}
pre.numberSource {
margin-left: 3em;
border-left: 1px solid #aaaaaa;
padding-left: 4px;
}
div.sourceCode {
}
@media screen {
pre > code.sourceCode > span > a:first-child::before {
text-decoration: underline;
}
}
code span.al {
color: #ff0000;
font-weight: bold;
} /* Alert */
code span.an {
color: #60a0b0;
font-weight: bold;
font-style: italic;
} /* Annotation */
code span.at {
color: #7d9029;
} /* Attribute */
code span.bn {
color: #40a070;
} /* BaseN */
code span.bu {
color: #008000;
} /* BuiltIn */
code span.cf {
color: #007020;
font-weight: bold;
} /* ControlFlow */
code span.ch {
color: #4070a0;
} /* Char */
code span.cn {
color: #880000;
} /* Constant */
code span.co {
color: #60a0b0;
font-style: italic;
} /* Comment */
code span.cv {
color: #60a0b0;
font-weight: bold;
font-style: italic;
} /* CommentVar */
code span.do {
color: #ba2121;
font-style: italic;
} /* Documentation */
code span.dt {
color: #902000;
} /* DataType */
code span.dv {
color: #40a070;
} /* DecVal */
code span.er {
color: #ff0000;
font-weight: bold;
} /* Error */
code span.ex {
} /* Extension */
code span.fl {
color: #40a070;
} /* Float */
code span.fu {
color: #06287e;
} /* Function */
code span.im {
color: #008000;
font-weight: bold;
} /* Import */
code span.in {
color: #60a0b0;
font-weight: bold;
font-style: italic;
} /* Information */
code span.kw {
color: #007020;
font-weight: bold;
} /* Keyword */
code span.op {
color: #666666;
} /* Operator */
code span.ot {
color: #007020;
} /* Other */
code span.pp {
color: #bc7a00;
} /* Preprocessor */
code span.sc {
color: #4070a0;
} /* SpecialChar */
code span.ss {
color: #bb6688;
} /* SpecialString */
code span.st {
color: #4070a0;
} /* String */
code span.va {
color: #19177c;
} /* Variable */
code span.vs {
color: #4070a0;
} /* VerbatimString */
code span.wa {
color: #60a0b0;
font-weight: bold;
font-style: italic;
} /* Warning */
</style>
<link rel="stylesheet" href="css/iclc.css" />
</head>
<body>
<div id="header">
<h1 class="title">Strudel: live coding patterns on the Web</h1>
<ul id="authorlist">
<li>true</li>
<li>true</li>
</ul>
<h3 class="date">2022-12-14</h3>
</div>
<h2 class="abstract">Abstract</h2>
<div id="abstract">
<p>
This paper introduces Strudel, which brings the TidalCycles approach to live coding algorithmic patterns to
native JavaScript and the web. We begin by giving a little background of the first year of development, before
sharing some detail about its implementation and examples of use. We go on to outline the wide range of
synthesis and other outputs available in Strudel, including WebAudio, MIDI, OSC (for SuperDirt), WebSerial and
CSound, and introduce Strudels REPL live editor, including its built-in visualisations. We then compare Strudel
with Tidal, the trade-offs involved between JavaScript and Haskell, and the unique capabilities offered by
Strudel for aligning patterns.
</p>
</div>
<h1 data-number="1" id="introduction"><span class="header-section-number">1</span> Introduction</h1>
<p>
In the following paper, we introduce <em>Strudel</em>, an alternative implementation of the TidalCycles (or
Tidal for short) live coding system, using the JavaScript programming language. Strudel is an attempt to make
live coding more accessible, by creating a system that runs entirely in the browser, while opening Tidals
approach to algorithmic patterns
<span class="citation" data-cites="mcleanAlgorithmicPattern2020a">(Mclean 2020)</span> up to modern audio/visual
web technologies. The Strudel REPL is a live code editor dedicated to manipulating patterns while they play, with
builtin visual feedback. While Strudel is written in JavaScript, the API is optimized for simplicity and
readability by applying code transformations on the syntax tree level, allowing language operations that would
otherwise be impossible. The application supports multiple ways to output sound, including Tone.js, Web Audio
Nodes, OSC (Open Sound Control) messages, Web Serial, Web MIDI and Csound. The project is split into multiple
packages, allowing granular reuse in other applications. Apart from TidalCycles, Strudel draws inspiration from
many prior existing projects like TidalVortex
<span class="citation" data-cites="mcleanTidalVortexZero2022">(McLean et al. 2022)</span>, Gibber
<span class="citation" data-cites="robertsGibberLiveCoding2012">(Roberts and Kuchera-morin 2012)</span>, Estuary
<span class="citation" data-cites="ogbornEstuaryBrowserbasedCollaborative2017">(Ogborn et al. 2017)</span>, Hydra
<span class="citation" data-cites="jackHydra2022">(Jack [2022] 2022)</span>, Ocarina
<span class="citation" data-cites="solomonPurescriptocarina2022">(Solomon [2021] 2022)</span> and Feedforward
<span class="citation" data-cites="mcleanFeedforward2020">(McLean 2020)</span>. This paper expands the Strudel
Demo paper for the Web Audio Conference 2022
<span class="citation" data-cites="StrudelWAC2022">(Roos and McLean 2022)</span>.
</p>
<p>
The first tentative commit to the Strudel project was on 22nd January 2022 by Alex McLean, with the core
representation implemented over the following few days. Although this was his first attempt at a JavaScript-based
application, by 27th January, Alex had managed to upload the initial version to the npm javascript package
database, sharing with the wider community for comment. By 4th February, Felix Roos had discovered Strudel and
contributed a REPL user interface to it, and then contributed a scheduler the next day, so that Strudel could
already make sound. At this point, Alex and Felix shared ownership to the repository, and the project has since
proved to be a productive confluence of Felixs own work into music representation and visualisation, with Alexs
experience with making Tidal. Felix has since become the primary contributor to Strudel, with Alex continuing to
jump between developing both Strudel and Tidal. Aspects of Strudels development have therefore fed back into
TidalCycles, and both systems have maintained a shared conceptual underpinning. We plan to continue working
towards feature parity between these systems, although within the syntactical trade-offs and library ecosystems of
JavaScript and Haskell, some divergence is inevitable and healthy.
</p>
<p>
Over the first year of its life, Strudel is now a fully-fledged live coding environment, porting Tidals core
represention of patterns, pattern transformations, and mininotation for polymetric sequences, combined with a
wealth of features for synthesising and visualising those patterns.
</p>
<h1 data-number="2" id="from-tidal-to-strudel-and-back">
<span class="header-section-number">2</span> From Tidal to Strudel and back
</h1>
<p>
As mentioned above, the original Tidal is implemented as a domain specific language (DSL) embedded in the Haskell
pure functional programming language, and takes advantage of Haskells terse syntax and advanced, strong type
system. JavaScript on the other hand, is a multi-paradigm programming language, with a dynamic type system.
Because Tidal leans heavily on many of Haskells more unique features, it was not always clear that it could
meaningfully be ported to a multi-paradigm scripting language. However, this possibility was already demonstrated
with an earlier port to Python [TidalVortex;
<span class="citation" data-cites="mcleanTidalVortexZero2022">McLean et al. (2022)</span>], and we have now
successfully implemented Tidals pure functional representation of patterns in Strudel, including partial
application, currying, and the functor, applicative and monadic structures that underlie Tidals expressive
pattern transformations. The result is a terse and highly composable system, where everything is either a pattern,
or a function for combining and manipulating patterns, offering a rich creative ground for exploration.
</p>
<p>
This development process has been far from a one-way port, however. The process of porting Tidals concepts has
also opened up new possibilities, some just from revisiting every design decision, and some from the particular
affordances and constraints offered by JavaScript. This has lead to new features (and indeed bugfixes) that have
found their way back to Tidal where appropriate, and ongoing work that we will return to in the conclusion of this
paper.
</p>
<h1 data-number="3" id="representing-patterns">
<span class="header-section-number">3</span> Representing Patterns
</h1>
<p>
Patterns are the essence of Tidal. Its patterns are abstract entities that represent flows of time as functions,
adapting a technique called pure functional reactive programming. Taking a time span as its input, a Pattern can
output a set of events that happen within that time span. It depends on the structure of the Pattern how the
events are located in time. From now on, this process of generating events from a time span will be called
<strong>querying</strong>. Example:
</p>
<div class="sourceCode" id="cb1">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> pattern <span class="op">=</span> <span class="fu">sequence</span>(c3<span class="op">,</span> [e3<span class="op">,</span> g3])</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> events <span class="op">=</span> pattern<span class="op">.</span><span class="fu">queryArc</span>(<span class="dv">0</span><span class="op">,</span> <span class="dv">1</span>)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="bu">console</span><span class="op">.</span><span class="fu">log</span>(events<span class="op">.</span><span class="fu">map</span>(e <span class="kw">=&gt;</span> e<span class="op">.</span><span class="fu">show</span>()))</span></code></pre>
</div>
<p>
In this example, we create a pattern using the <code>sequence</code> function and <strong>query</strong> it for
the time span from <code>0</code> to <code>1</code>. Those numbers represent units of time called
<strong>cycles</strong>. The length of one cycle depends on the tempo, which defaults to one cycle per second. The
resulting events are:
</p>
<div class="sourceCode" id="cb2">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>[{ <span class="dt">value</span><span class="op">:</span> <span class="st">&#39;c3&#39;</span><span class="op">,</span> <span class="dt">begin</span><span class="op">:</span> <span class="dv">0</span><span class="op">,</span> <span class="dt">end</span><span class="op">:</span> <span class="dv">1</span><span class="op">/</span><span class="dv">2</span> }<span class="op">,</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>{ <span class="dt">value</span><span class="op">:</span> <span class="st">&#39;e3&#39;</span><span class="op">,</span> <span class="dt">begin</span><span class="op">:</span> <span class="dv">1</span><span class="op">/</span><span class="dv">2</span><span class="op">,</span> <span class="dt">end</span><span class="op">:</span> <span class="dv">3</span><span class="op">/</span><span class="dv">4</span> }<span class="op">,</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>{ <span class="dt">value</span><span class="op">:</span> <span class="st">&#39;g3&#39;</span><span class="op">,</span> <span class="dt">begin</span><span class="op">:</span> <span class="dv">3</span><span class="op">/</span><span class="dv">4</span><span class="op">,</span> <span class="dt">end</span><span class="op">:</span> <span class="dv">1</span> }]</span></code></pre>
</div>
<p>
Each event has a value, a begin time and an end time, where time is represented as a fraction. In the above case,
the events are placed in sequential order, where c3 takes the first half, and e3 and g3 together take the second
half. This temporal placement is the result of the <code>sequence</code> function, which divides its arguments
equally over one cycle. If an argument is an array, the same rule applies to that part of the cycle. In the
example, e3 and g3 are divided equally over the second half of the whole cycle.
</p>
<p>
The above examples do not represent how Strudel is used in practice. In the live coding editor, the user only has
to type in the pattern itself, the querying will be handled by the scheduler. The scheduler will repeatedly query
the pattern for events, which are then scheduled as sound synthesis or other event triggers. Also, the above event
data structure has been simplified for readability.
</p>
<figure>
<img
src="images/strudel-screenshot2.png"
style="width: 60%"
alt="Screenshot of the Strudel REPL live coding editor, including piano-roll visualisation."
/>
<figcaption aria-hidden="true">
Screenshot of the Strudel REPL live coding editor, including piano-roll visualisation.
</figcaption>
</figure>
<h1 data-number="4" id="making-patterns"><span class="header-section-number">4</span> Making Patterns</h1>
<p>
In practice, the end-user live coder will not deal with constructing patterns directly, but will rather build
patterns using Strudels extensive combinator library to create, combine and transform patterns.
</p>
<p>
The live coder will rarely use the <code>sequence</code> function as seen above, as sequencing is implicit in many
functions. For example in the following, the <code>note</code> function constructs a pattern of notes, sequencing
its arguments in the same manner as the previous example.
</p>
<div class="sourceCode" id="cb3">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">note</span>(c3<span class="op">,</span> [e3<span class="op">,</span> g3])</span></code></pre>
</div>
<p>
Perhaps more often, they will use the mini-notation for even terser notation of rhythmic sequences: [^This last
example is also valid Tidal code, albeit the parenthesis is not required in its Haskell syntax in this case. Tidal
does not support passing sequences as lists directly to the <code>note</code> function, however.].
</p>
<div class="sourceCode" id="cb4">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">note</span>(<span class="st">&quot;c3 [e3 g3]&quot;</span>)</span></code></pre>
</div>
<p>
Such sequences are often treated only a starting point for manipulation, where they then undergo pattern
transformations such as repetition, symmetry, interference/combination or randomisation, potentially at multiple
timescales. Because Strudel patterns are represented as pure functions of time rather than as data structures,
very long and complex generative results can be represented and manipulated without having to store the resulting
sequences in memory.
</p>
<h1 data-number="5" id="pattern-example"><span class="header-section-number">5</span> Pattern Example</h1>
<p>
The following example showcases how patterns can be utilized to create musical complexity from simple parts, using
repetition and interference:
</p>
<div class="sourceCode" id="cb5">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;&lt;0 2 [4 6](3,4,1) 3&gt;&quot;</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="op">.</span><span class="fu">off</span>(<span class="dv">1</span><span class="op">/</span><span class="dv">4</span><span class="op">,</span> <span class="fu">add</span>(<span class="dv">2</span>))</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="op">.</span><span class="fu">off</span>(<span class="dv">1</span><span class="op">/</span><span class="dv">2</span><span class="op">,</span> <span class="fu">add</span>(<span class="dv">6</span>))</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="op">.</span><span class="fu">scale</span>(<span class="st">&#39;D minor&#39;</span>)</span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="op">.</span><span class="fu">legato</span>(<span class="op">.</span><span class="dv">25</span>)</span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="op">.</span><span class="fu">note</span>()<span class="op">.</span><span class="fu">s</span>(<span class="st">&quot;sawtooth square&quot;</span>)</span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="op">.</span><span class="fu">delay</span>(<span class="op">.</span><span class="dv">8</span>)<span class="op">.</span><span class="fu">delaytime</span>(<span class="op">.</span><span class="dv">125</span>)</span></code></pre>
</div>
<p>
The pattern starts with a rhythm of numbers in mini notation, which are later interpreted inside the scale of D
minor. The first line could also be expressed without mini notation:
</p>
<div class="sourceCode" id="cb6">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span>(<span class="dv">0</span><span class="op">,</span> <span class="dv">2</span><span class="op">,</span> [<span class="dv">4</span><span class="op">,</span> <span class="dv">6</span>]<span class="op">.</span><span class="fu">euclid</span>(<span class="dv">3</span><span class="op">,</span> <span class="dv">4</span><span class="op">,</span> <span class="dv">1</span>)<span class="op">,</span> <span class="dv">3</span>)</span></code></pre>
</div>
<p>
These numbers then undergo various pattern transformations. Here is a short description of all the functions used:
</p>
<ul>
<li><code>cat</code>: play elements sequentially, where each lasts one cycle</li>
<li><code>brackets</code>: elements inside brackets are divided equally over the time of their parent</li>
<li>
<code>.euclid(p, s, o)</code>: place p pulses evenly over s steps, with offset o
<span class="citation" data-cites="toussaintEuclideanAlgorithmGenerates2005">(Toussaint 2005)</span>
</li>
<li>
<code>.off(n, f)</code>: layers a pattern on top of itself, with the new layer offset by n cycles, and with
function f applied
</li>
<li><code>.legato(n)</code>: multiply the duration of all events in a pattern by a factor of n</li>
<li>
<code>.echo(t, n, v)</code>: copy each event t times, with n cycles in between each copy, decreasing velocity by
v
</li>
<li><code>.note()</code>: interpretes values as notes</li>
<li><code>.s(name)</code>: play back each event with the given sound</li>
<li><code>.delay(wet)</code>: add delay</li>
<li><code>.delaytime(t)</code>: set delay time</li>
</ul>
<p>Much of the above will be familiar to Tidal users.</p>
<!-- This example shows some of Strudel's unique support for chords and transposition familiar to students of Western music theory. This differs a little from Tidal's approach and thanks to the integration of the javascript library XXX (*TODO* ? or is this all your work Felix?), Strudel's support for tonal transformations such as voice leading is perhaps respects more advanced than Tidal. -->
<h1 data-number="6" id="ways-to-make-sound-and-other-events">
<span class="header-section-number">6</span> Ways to make Sound (and other events)
</h1>
<p>To generate sound, Strudel supports bindings for different outputs:</p>
<ul>
<li>Tone.js (deprecated)</li>
<li>Web Audio API</li>
<li>WebDirt, a js recreation of Tidals <em>Dirt</em> sample engine (deprecated)</li>
<li>OSC via osc-js, compatible with superdirt</li>
<li>Csound via the Csound WebAssembly build</li>
<li>MIDI via WebMIDI</li>
<li>Serial via WebSerial</li>
</ul>
<p>
At first, we used Tone.js as sound output, but it proved to be limited for the use case of Strudel, where each
individual event could potentially have a completely different audio graph. While the Web Audio API takes a
<em>fire-and-forget</em> approach, creating a lot of Tone.js instruments and effects causes performance issues
quickly. For that reason, we chose to search for alternatives.
</p>
<p>
Strudels new default output uses the Web Audio API to create a new audio graph for each event. It currently
supports basic oscillators, sample playback, various effects and an experimental support for soundfonts.
</p>
<p>
WebDirt <span class="citation" data-cites="ogbornDktr0WebDirt2022">(Ogborn [2016] 2022)</span> was created as part
of the Estuary Live Coding System
<span class="citation" data-cites="ogbornEstuaryBrowserbasedCollaborative2017">(Ogborn et al. 2017)</span>, and
proved to be a solid choice for handling samples in Strudel as well. We are however focused on working more
directly with the Web Audio API to be able to integrate new features more tightly.
</p>
<p>
Using the OSC protocol via Strudels provided Node.js-based OSC proxy server, it is possible to send network
messages to trigger events. This is mainly used to render sound using SuperDirt
<span class="citation" data-cites="SuperDirt2022">(<em>SuperDirt</em> [2015] 2022)</span>, which is the
well-developed Supercollider-based synthesis framework that Tidal live coders generally use as standard.
</p>
<p>
Recently, the experimental integration of Csound proved to bring a new dimension of sound design capabilities to
Strudel. Thanks to the WebAssembly distribution of this classic system
<span class="citation" data-cites="CsoundWebAssembly">(Yi, Lazzarini, and Costello 2018)</span>, Csound
orchestra synthesisers can be embedded in and then patterned with Strudel code.
</p>
<p>
MIDI output can also be used to send MIDI messages to either external instruments or to other programs on the same
device. Unlike OSC, Strudel is able to send MIDI directly without requiring additional proxy software, but only
from web browsers that support it (at the time of writing, this means Chromium-based browsers).
</p>
<p>
Finally, Strudel supports Serial output, for example to trigger events via microcontrollers. This has already been
explored for robot choreography by Kate Sicchio and Alex McLean, via a performance presented at the International
Conference on Live Interfaces 2022.
</p>
<h1 data-number="7" id="the-strudel-repl"><span class="header-section-number">7</span> The Strudel REPL</h1>
<p>
While Strudel can be used as a library in any JavaScript codebase, its main, reference user interface is the
Strudel REPL[^REPL stands for read, evaluate, print/play, loop. It is friendly jargon for an interactive
programming interface from computing heritage, usually for a commandline interface but also applied to live coding
editors.], which is a browser-based live coding environment. This live code editor is dedicated to manipulating
Strudel patterns while they play. The REPL features built-in visual feedback, which highlights which elements in
the patterned (mini-notation) sequences are influencing the event that is currently being played. This feedback is
designed to support both learning and live use of Strudel.
</p>
<p>
Besides a UI for playback control and meta information, the main part of the REPL interface is the code editor
powered by CodeMirror. In it, the user can edit and evaluate pattern code live, using one of the available
synthesis outputs to create music and/or sound art. The control flow of the REPL follows 3 basic steps:
</p>
<ol type="1">
<li>
The user writes and updates code. Each update transpiles and evaluates it to create a
<code>Pattern</code> instance
</li>
<li>
While the REPL is running, the <code>Scheduler</code> queries the active <code>Pattern</code> by a regular
interval, generating <code>Events</code> (also known as <code>Haps</code> in Strudel) for the next time span.
</li>
<li>
For each scheduling tick, all generated <code>Events</code> are triggered by calling their
<code>onTrigger</code> method, which is set by the output.
</li>
</ol>
<figure>
<img
src="https://github.com/tidalcycles/strudel/raw/talk/talk/public/strudelflow.png?raw=true"
style="width: 43%"
alt="REPL control flow"
/>
<figcaption aria-hidden="true">REPL control flow</figcaption>
</figure>
<h2 data-number="7.1" id="user-code"><span class="header-section-number">7.1</span> User Code</h2>
<p>To create a <code>Pattern</code> from the user code, two steps are needed:</p>
<ol type="1">
<li>Transpile the JS input code to make it functional</li>
<li>Evaluate the transpiled code</li>
</ol>
<h3 data-number="7.1.1" id="transpilation-evaluation">
<span class="header-section-number">7.1.1</span> Transpilation &amp; Evaluation
</h3>
<p>
In the JavaScript world, using transpilation is a common practise to be able to use language features that are not
supported by the base language. Tools like <code>babel</code> will transpile code that contains unsupported
language features into a version of the code without those features.
</p>
<p>
In the same tradition, Strudel can add a transpilation step to simplify the user code in the context of live
coding. For example, the Strudel REPL lets the user create mini notation patterns using just double quoted
strings, while single quoted strings remain what they are:
</p>
<div class="sourceCode" id="cb7">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;c3 [e3 g3]*2&quot;</span></span></code></pre>
</div>
<p>is transpiled to:</p>
<div class="sourceCode" id="cb8">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mini</span>(<span class="st">&quot;c3 [e3 g3]*2&quot;</span>)<span class="op">.</span><span class="fu">withMiniLocation</span>([<span class="dv">1</span><span class="op">,</span><span class="dv">0</span><span class="op">,</span><span class="dv">0</span>]<span class="op">,</span>[<span class="dv">1</span><span class="op">,</span><span class="dv">14</span><span class="op">,</span><span class="dv">14</span>])</span></code></pre>
</div>
<p>
Here, the string is wrapped in <code>mini</code>, which will create a pattern from a mini notation string.
Additionally, the <code>withMiniLocation</code> method passes the original source code location of the string to
the pattern, which enables highlighting active events.
</p>
<p>
Other convenient features like pseudo variables, operator overloading and top level await are possible with
transpilation.
</p>
<p>After the transpilation, the code is ready to be evaluated into a <code>Pattern</code>.</p>
<p>
Behind the scenes, the user code string is parsed with <code>acorn</code>, turning it into an Abstract Syntax Tree
(AST). The AST allows changing the structure of the code before generating the transpiled version using
<code>escodegen</code>.
</p>
<h3 data-number="7.1.2" id="mini-notation"><span class="header-section-number">7.1.2</span> Mini Notation</h3>
<p>
While the transpilation allows JavaScript to express Patterns in a less verbose way, it is still preferable to use
the Mini Notation as a more compact way to express rhythm. Strudel aims to provide the same Mini Notation features
and syntax as used in Tidal.
</p>
<p>
The Mini Notation parser is implemented using <code>peggy</code>, which allows generating performant parsers for
Domain Specific Languages (DSLs) using a concise grammar notation. The generated parser turns the Mini Notation
string into an AST which is used to call the respective Strudel functions with the given structure. For example,
<code>"c3 [e3 g3]*2"</code> will result in the following calls:
</p>
<div class="sourceCode" id="cb9">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">seq</span>(</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">reify</span>(<span class="st">&#39;c3&#39;</span>)<span class="op">.</span><span class="fu">withLocation</span>([<span class="dv">1</span><span class="op">,</span><span class="dv">1</span><span class="op">,</span><span class="dv">1</span>]<span class="op">,</span> [<span class="dv">1</span><span class="op">,</span><span class="dv">4</span><span class="op">,</span><span class="dv">4</span>])<span class="op">,</span></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">seq</span>(</span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">reify</span>(<span class="st">&#39;e3&#39;</span>)<span class="op">.</span><span class="fu">withLocation</span>([<span class="dv">1</span><span class="op">,</span><span class="dv">5</span><span class="op">,</span><span class="dv">5</span>]<span class="op">,</span> [<span class="dv">1</span><span class="op">,</span><span class="dv">8</span><span class="op">,</span><span class="dv">8</span>])<span class="op">,</span></span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">reify</span>(<span class="st">&#39;g3&#39;</span>)<span class="op">.</span><span class="fu">withLocation</span>([<span class="dv">1</span><span class="op">,</span><span class="dv">8</span><span class="op">,</span><span class="dv">8</span>]<span class="op">,</span> [<span class="dv">1</span><span class="op">,</span><span class="dv">10</span><span class="op">,</span><span class="dv">10</span>])<span class="op">,</span></span>
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true" tabindex="-1"></a> )<span class="op">.</span><span class="fu">fast</span>(<span class="dv">2</span>)</span>
<span id="cb9-7"><a href="#cb9-7" aria-hidden="true" tabindex="-1"></a>)</span></code></pre>
</div>
<h3 data-number="7.1.3" id="highlighting-locations">
<span class="header-section-number">7.1.3</span> Highlighting Locations
</h3>
<p>
As seen in the examples above, both the JS and the Mini Notation parser add source code locations using
<code>withMiniLocation</code> and <code>withLocation</code> methods. While the JS parser adds locations relative
to the user code as a whole, the Mini Notation adds locations relative to the position of the mini notation
string. The absolute location of elements within Mini Notation can be calculated by simply adding both locations
together. This absolute location can be used to highlight active events in real time.
</p>
<h2 data-number="7.2" id="scheduling-events"><span class="header-section-number">7.2</span> Scheduling Events</h2>
<p>
After an instance of <code>Pattern</code> is obtained from the user code, it is used by the scheduler to get
queried for events. Once started, the scheduler runs at a fixed interval to query active pattern for events
withing the current intervals time span. A simplified implementation looks like this:
</p>
<div class="sourceCode" id="cb10">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="kw">let</span> pattern <span class="op">=</span> <span class="fu">seq</span>(<span class="st">&#39;c3&#39;</span><span class="op">,</span> [<span class="st">&#39;e3&#39;</span><span class="op">,</span> <span class="st">&#39;g3&#39;</span>])<span class="op">;</span> <span class="co">// pattern from user</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="kw">let</span> interval <span class="op">=</span> <span class="fl">0.5</span><span class="op">;</span> <span class="co">// query interval in seconds</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="kw">let</span> time <span class="op">=</span> <span class="dv">0</span><span class="op">;</span> <span class="co">// beginning of current time span</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="kw">let</span> minLatency <span class="op">=</span> <span class="op">.</span><span class="dv">1</span><span class="op">;</span> <span class="co">// min time before a hap should trigger</span></span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a><span class="pp">setInterval</span>(() <span class="kw">=&gt;</span> {</span>
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">const</span> haps <span class="op">=</span> pattern<span class="op">.</span><span class="fu">queryArc</span>(time<span class="op">,</span> time <span class="op">+</span> interval)<span class="op">;</span></span>
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true" tabindex="-1"></a> time <span class="op">+=</span> interval<span class="op">;</span> <span class="co">// increment time</span></span>
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true" tabindex="-1"></a> haps<span class="op">.</span><span class="fu">forEach</span>((hap) <span class="kw">=&gt;</span> {</span>
<span id="cb10-9"><a href="#cb10-9" aria-hidden="true" tabindex="-1"></a> <span class="kw">const</span> deadline <span class="op">=</span> hap<span class="op">.</span><span class="at">whole</span><span class="op">.</span><span class="at">begin</span> <span class="op">-</span> time <span class="op">+</span> minLatency<span class="op">;</span></span>
<span id="cb10-10"><a href="#cb10-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">onTrigger</span>(hap<span class="op">,</span> deadline<span class="op">,</span> duration)<span class="op">;</span></span>
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true" tabindex="-1"></a> })<span class="op">;</span></span>
<span id="cb10-12"><a href="#cb10-12" aria-hidden="true" tabindex="-1"></a>}<span class="op">,</span> interval <span class="op">*</span> <span class="dv">1000</span>)<span class="op">;</span> <span class="co">// query each &quot;interval&quot; seconds</span></span></code></pre>
</div>
<p>
Note that the above code is simplified for illustrative purposes. The actual implementation has to work around
imprecise callbacks of <code>setInterval</code>. More about the implementation details can be read in
<a href="https://loophole-letters.vercel.app/web-audio-scheduling">this blog post</a>.
</p>
<p>
The fact that <code>Pattern.queryArc</code> is a pure function that maps a time span to a set of events allows us
to choose any interval we like without changing the resulting output. It also means that when the pattern is
changed from outside, the next scheduling callback will work with the new pattern, keeping its clock running.
</p>
<p>
The latency between the time the pattern is evaluated and the change is heard is between
<code>minLatency</code> and <code>interval + minLatency</code>, in our example between 100ms and 600ms. In
Strudel, the current query interval is 50ms with a minLatency of 100ms, meaning the latency is between 50ms and
150ms.
</p>
<h2 data-number="7.3" id="output"><span class="header-section-number">7.3</span> Output</h2>
<p>
The last step is to trigger each event in the chosen output. This is where the given time and value of each event
is used to generate audio or any other form of time based output. The default output of the Strudel REPL is the
WebAudio output. To understand what an output does, we first have to understand what control parameters are.
</p>
<h3 data-number="7.3.1" id="control-parameters">
<span class="header-section-number">7.3.1</span> Control Parameters
</h3>
<p>
To be able to manipulate multiple aspects of sound in parallel, so called control parameters are used to shape the
value of each event. Example:
</p>
<div class="sourceCode" id="cb11">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">note</span>(<span class="st">&quot;c3 e3&quot;</span>)<span class="op">.</span><span class="fu">cutoff</span>(<span class="dv">1000</span>)<span class="op">.</span><span class="fu">s</span>(<span class="st">&#39;sawtooth&#39;</span>)</span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">queryArc</span>(<span class="dv">0</span><span class="op">,</span> <span class="dv">1</span>)<span class="op">.</span><span class="fu">map</span>(hap <span class="kw">=&gt;</span> hap<span class="op">.</span><span class="at">value</span>)</span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="co">/* [</span></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="co"> { note: &#39;c3&#39;, cutoff: 1000, s: &#39;sawtooth&#39; }</span></span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a><span class="co"> { note: &#39;e3&#39;, cutoff: 1000, s: &#39;sawtooth&#39; }</span></span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a><span class="co">] */</span></span></code></pre>
</div>
<p>
Here, the control parameter functions <code>note</code>, <code>cutoff</code> and <code>s</code> are used, where
each controls a different property in the value object. Each control parameter function accepts a primitive value,
a list of values to be sequenced into a <code>Pattern</code>, or a <code>Pattern</code>. In the example,
<code>note</code> gets a <code>Pattern</code> from a Mini Notation expression (double quoted), while
<code>cutoff</code> and <code>s</code> are given a <code>Number</code> and a (single quoted)
<code>String</code> respectively.
</p>
<p>
Strudel comes with a large default set of control parameter functions that are based on the ones used by Tidal and
SuperDirt, focusing on music and audio terminology. It is however possible to create custom control paramters for
any purpose:
</p>
<div class="sourceCode" id="cb12">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> { x<span class="op">,</span> y } <span class="op">=</span> <span class="fu">createParams</span>(<span class="st">&#39;x&#39;</span><span class="op">,</span> <span class="st">&#39;y&#39;</span>)</span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="fu">x</span>(sine<span class="op">.</span><span class="fu">range</span>(<span class="dv">0</span><span class="op">,</span> <span class="dv">200</span>))<span class="op">.</span><span class="fu">y</span>(cosine<span class="op">.</span><span class="fu">range</span>(<span class="dv">0</span><span class="op">,</span><span class="dv">200</span>))</span></code></pre>
</div>
<p>
This example creates the custom control parameters <code>x</code> and <code>y</code> which are then used to form a
pattern that descibes the coordinates of a circle.
</p>
<h3 data-number="7.3.2" id="outputs"><span class="header-section-number">7.3.2</span> Outputs</h3>
<p>
Now that we know how the value of an event is manipulated using control parameters, we can look at how outputs can
use that value to generate anything. The scheduler above was calling the <code>onTrigger</code> function which is
used to implement the output. A very simple version of the web audio output could look like this:
</p>
<div class="sourceCode" id="cb13">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="kw">function</span> <span class="fu">onTrigger</span>(hap<span class="op">,</span> deadline<span class="op">,</span> duration) {</span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">const</span> { note } <span class="op">=</span> hap<span class="op">.</span><span class="at">value</span><span class="op">;</span></span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a> <span class="kw">const</span> time <span class="op">=</span> <span class="fu">getAudioContext</span>()<span class="op">.</span><span class="at">currentTime</span> <span class="op">+</span> deadline<span class="op">;</span></span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">const</span> o <span class="op">=</span> <span class="fu">getAudioContext</span>()<span class="op">.</span><span class="fu">createOscillator</span>()<span class="op">;</span></span>
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true" tabindex="-1"></a> o<span class="op">.</span><span class="at">frequency</span><span class="op">.</span><span class="at">value</span> <span class="op">=</span> <span class="fu">getFreq</span>(note)<span class="op">;</span></span>
<span id="cb13-6"><a href="#cb13-6" aria-hidden="true" tabindex="-1"></a> o<span class="op">.</span><span class="fu">start</span>(time)<span class="op">;</span></span>
<span id="cb13-7"><a href="#cb13-7" aria-hidden="true" tabindex="-1"></a> o<span class="op">.</span><span class="fu">stop</span>(time <span class="op">+</span> <span class="bu">event</span><span class="op">.</span><span class="at">duration</span>)<span class="op">;</span></span>
<span id="cb13-8"><a href="#cb13-8" aria-hidden="true" tabindex="-1"></a> o<span class="op">.</span><span class="fu">connect</span>(<span class="fu">getAudioContext</span>()<span class="op">.</span><span class="at">destination</span>)<span class="op">;</span></span>
<span id="cb13-9"><a href="#cb13-9" aria-hidden="true" tabindex="-1"></a>}</span></code></pre>
</div>
<p>
The above example will create an <code>OscillatorNode</code> for each event, where the frequency is controlled by
the <code>note</code> param. In essence, this is how the WebAudio API output of Strudel works, only with many more
parameters to control synths, samples and effects.
</p>
<h1 data-number="8" id="pattern-alignment-and-combination">
<span class="header-section-number">8</span> Pattern alignment and combination
</h1>
<p>
One core aspect of Strudel, inherited from Tidal, is the flexible way that patterns can be combined, irrespective
of their structure. Its declarative approach means a live coder does not have to think about the details of
<em>how</em> this is done, only <em>what</em> is to be done.
</p>
<p>
As a simple example, consider two number patterns <code>"0 [1 2] 3"</code>, and <code>"10 20"</code>. The first
has three contiguous steps of equal lengths, with the second step broken down into two substeps, giving four
events in total. There are a very large number of ways in which the structure of these two patterns could be
combined, but the default method in both Strudel and Tidal is to line up the cycles of the two patterns, and then
take events from the first pattern and match them with those in the second pattern. Therefore, the following two
lines are equivalent:
</p>
<div class="sourceCode" id="cb14">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;0 [1 2] 3&quot;</span><span class="op">.</span><span class="fu">add</span>(<span class="st">&quot;10 20&quot;</span>)</span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;10 [11 22] 23&quot;</span></span></code></pre>
</div>
<p>
Where the events only partially overlap, they are treated as fragments of the event in the first pattern. This is
a little difficult to conceptualise, but lets start by comparing the two patterns in the following example:
</p>
<div class="sourceCode" id="cb15">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;0 1 2&quot;</span><span class="op">.</span><span class="fu">add</span>(<span class="st">&quot;10 20&quot;</span>)</span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;10 [11 21] 20&quot;</span></span></code></pre>
</div>
<p>
They are similar to the previous example in that the number <code>1</code> is split in two, with its two halves
added to <code>10</code> and <code>20</code> respectively. However, the <code>11</code> remembers that it is a
fragment of that original <code>1</code> event, and so is treated as having a duration of a third of a cycle,
despite only being active for a sixth of a cycle. Likewise, the <code>21</code> is also a fragment of that
original <code>1</code> event, but a fragment of its second half. Because the start of its event is missing, it
wouldnt actually trigger a sound (unless it underwent further pattern transformations/combinations).
</p>
<p>
In practice, the effect of this default, implicit method for combining two patterns is that the second pattern is
added <em>in</em> to the first one, and indeed this can be made explicit:
</p>
<div class="sourceCode" id="cb16">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;0 1 2&quot;</span><span class="op">.</span><span class="at">add</span><span class="op">.</span><span class="fu">in</span>(<span class="st">&quot;10 20&quot;</span>)</span></code></pre>
</div>
<p>This makes way for other ways to align the pattern, and several are already defined, in particular:</p>
<ul>
<li>
<code>in</code> - as explained above, aligns cycles, and applies values from the pattern on the right
<em>in</em> to the pattern on the left.
</li>
<li>
<code>out</code> - as with <code>in</code>, but values are applied <em>out</em> of the pattern on the left
(i.e. <em>in</em> to the one on the right).
</li>
<li>
<code>mix</code> - structures from both patterns are combined, so that the new events are not fragments but are
created at intersections of events from both sides.
</li>
<li>
<code>squeeze</code> - cycles from the pattern on the right are squeezed into events on the left. So that
e.g. <code>"0 1 2".add.squeeze("10 20")</code> is equivalent to <code>"[10 20] [11 21] [12 22]"</code>.
</li>
<li>
<code>squeezeout</code> - as with <code>squeeze</code>, but cycles from the left are squeezed into events on the
right. So, <code>"0 1 2".add.squeezeout("10 20")</code> is equivalent to <code>[10 11 12] [20 21 22]</code>.
</li>
<li>
<code>trig</code> is similar to <code>squeezeout</code> in that cycles from the right are aligned with events on
the left. However those cycles are not squeezed, rather they are truncated to fit the event. So
<code>"0 1 2 3 4 5 6 7".add.trig("10 [20 30]")</code> would be equivalent to
<code>10 11 12 13 20 21 30 31</code>. In effect, events on the right trigger cycles on the left.
</li>
<li>
<code>trigzero</code> is similar to <code>trig</code>, but the pattern is triggered from its very first cycle,
rather than from the current cycle. <code>trig</code> and <code>trigzero</code> therefore only give different
results where the leftmost pattern differs from one cycle to the next.
</li>
</ul>
<p>
We will save going deeper into the background, design and practicalities of these alignment functions for future
publications. However in the next section, we take them as a case study for looking at the different design
affordances offered by Haskell to Tidal, and JavaScript to Strudel.
</p>
<h1 data-number="9" id="comparing-strudel-and-haskell-in-use">
<span class="header-section-number">9</span> Comparing Strudel and Haskell in use
</h1>
<p>
Unlike Haskell, JavaScript lacks the ability to define custom infix operators, or change the meaning of existing
ones. So the above Strudel example of <code>"0 1 2".add.out("10 20")</code> is equivalent to the Tidal expression
<code>"0 1 2" +| "10 20"</code>, where the vertical bar in the operator <code>+|</code> stands for
<code>out</code> (where <code>a |+ b</code> would be equivalent of <code>a.add.in(b)</code>).
</p>
<p>
From this we can already see that Tidal tends towards brevity through mixing infix operators with functions, and
Strudel tends towards spelling out operations which are joined together with the <code>.</code> operator. This
then is the design trade-off of Tidals tersity, versus Strudels simplicity.
</p>
<p>To demonstrate this, consider the following Tidal pattern:</p>
<pre
class="tidal"
><code>iter 4 $ every 3 (||+ n &quot;10 20&quot;) $ (n &quot;0 1 3&quot;) # s &quot;triangle&quot; # crush 4</code></pre>
<p>This can be directly translated to the Strudel equivalent:</p>
<div class="sourceCode" id="cb18">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="fu">iter</span>(<span class="dv">4</span><span class="op">,</span> <span class="fu">every</span>(<span class="dv">3</span><span class="op">,</span> add<span class="op">.</span><span class="fu">squeeze</span>(<span class="st">&quot;10 20&quot;</span>)<span class="op">,</span> <span class="fu">n</span>(<span class="st">&quot;0 1 3&quot;</span>)<span class="op">.</span><span class="fu">s</span>(<span class="st">&quot;triangle&quot;</span>)<span class="op">.</span><span class="fu">crush</span>(<span class="dv">4</span>)))</span></code></pre>
</div>
<p>Although for a more canonical Strudel expression, we would reorder it as:</p>
<div class="sourceCode" id="cb19">
<pre
class="sourceCode js"
><code class="sourceCode javascript"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="fu">n</span>(<span class="st">&quot;0 1 3&quot;</span>)<span class="op">.</span><span class="fu">every</span>(<span class="dv">3</span><span class="op">,</span> add<span class="op">.</span><span class="fu">squeeze</span>(<span class="st">&quot;10 20&quot;</span>))<span class="op">.</span><span class="fu">iter</span>(<span class="dv">4</span>)<span class="op">.</span><span class="fu">s</span>(<span class="st">&quot;triangle&quot;</span>)<span class="op">.</span><span class="fu">crush</span>(<span class="dv">4</span>)</span></code></pre>
</div>
<p>
The Strudel example uses the <code>.</code> method call operator for all operations and combinations, whereas the
Tidal example has <code>#</code> for the default method for combining patterns and uses infix operators for other
methods. The lack of parenthesis in the Tidal example is partly due to the way that arguments are applied to
Haskells functions, and partly due to the use of the <code>$</code> operator as an alternative way to establish
precedence and control the order of evaluation.
</p>
<p>
Considering the above, we argue that the Haskell syntax is a little cleaner, but that the Strudel syntax is easier
to learn. Our informal observation is that while Haskells dollar <code>$</code> operator is very useful in making
code easier to work with, it is one of the most difficult aspects of Tidal use for beginners to learn. On the
other hand, the deeper levels of parenthesis in Strudel code can be difficult to keep track of, especially while
coding under pressure of live musical performance. However this difficulty can be largely be mitigated by
reordering expressions, and further mitigated by supporting editor features.
</p>
<p>
With Strudel, we have little choice but to embrace the affordances and constraints offered by JavaScript, and
while designing a domain-specific language entirely based on method calls is a challenge, through creative
adoption of functional programming techniques like partial application, we are so far very happy with the results.
Tidals functional reactive approach to pattern-making has in general translated well to JavaScript, and
opportunities and constraints have overall traded off to create a very approachable and useable live coding
environment.
</p>
<h2 data-number="9.1" id="the-trade-off-of-flexible-typing">
<span class="header-section-number">9.1</span> The trade-off of flexible typing
</h2>
<p>
We have identified one problem with porting Tidal to JavaScript where we have missed Haskells strict typing and
type inference. In both Tidal and Strudel, time is rational, where any point in time is represented as the ratio
of two integers. This allows representation of musical ratios such that are impossible to represent accurately
using the more common floating point numbers. However while libraries are available that support rational numbers
in JavaScript, the lack of strict typing means that it is easy to implement pattern methods where computationally
expensive conversion from floating point to rational numbers are performed late, and therefore often enough to
overload the CPUs, due to the large number of iterative calculations required to estimate a ratio for a given
floating point number. To mitigate this problem, we might consider moving to TypeScript in the future.
</p>
<h1 data-number="10" id="future-outlook"><span class="header-section-number">10</span> Future Outlook</h1>
<p>
The project is still young, with many features on the horizon. As general guiding principles, Strudel aims to be
</p>
<ol type="1">
<li>accessible</li>
<li>consistent with Tidals approach to pattern</li>
<li>modular and extensible</li>
</ol>
<p>
While Haskells type system makes it a great language for the ongoing development of Tidals inner representation
of pattern, JavaScripts vibrant ecosystem, flexibility and accessibility makes it a great host for more ad-hoc
experiments, including interface design. For the future, it is planned to integrate additional alternative sound
engines such as Glicol <span class="citation" data-cites="lanChaosprintGlicol2022">(Lan [2020] 2022)</span> and
Faust
<span class="citation" data-cites="FaustProgrammingLanguage2022"
>(<em>Faust - Programming Language for Audio Applications and Plugins</em> [2016] 2022)</span
>. Strudel is already approaching feature parity with Tidal, but there are more Tidal functions to be ported, and
work to be done to improve compatibility with Tidals mininotation. Tidal version 2.0 is under development, which
brings a new representation for sequences to its patterns, which will then be brought to Strudel. Besides sound,
other ways to render events are being explored, such as graphical, and choreographic output. We are also looking
into alternative ways of editing patterns, including multi-user editing for network music, parsing a novel syntax
to escape the constraints of javascript, and developing hardware/e-textile interfaces. In summary, there is a lot
of fun ahead.
</p>
<h1 data-number="11" id="links"><span class="header-section-number">11</span> Links</h1>
<p>
The Strudel REPL is available at <a href="https://strudel.cc" class="uri">https://strudel.cc</a>, including an
interactive tutorial. The repository is at
<a href="https://github.com/tidalcycles/strudel" class="uri">https://github.com/tidalcycles/strudel</a>, all the
code is open source under the AGPL-3.0 License.
</p>
<h1 data-number="12" id="acknowledgments"><span class="header-section-number">12</span> Acknowledgments</h1>
<p>
Thanks to the Strudel and wider Tidal, live coding, WebAudio and free/open source software communities for
inspiration and support. Alex McLeans work on this project is supported by a UKRI Future Leaders Fellowship
[grant number MR/V025260/1].
</p>
<h1 class="unnumbered" id="references">References</h1>
<div id="refs" class="references csl-bib-body hanging-indent" role="doc-bibliography">
<div id="ref-FaustProgrammingLanguage2022" class="csl-entry" role="doc-biblioentry">
<em>Faust - Programming Language for Audio Applications and Plugins</em>. (2016) 2022. C++. GRAME.
<a href="https://github.com/grame-cncm/faust">https://github.com/grame-cncm/faust</a>.
</div>
<div id="ref-jackHydra2022" class="csl-entry" role="doc-biblioentry">
Jack, Olivia. (2022) 2022. <em>Hydra</em>.
<a href="https://github.com/ojack/hydra">https://github.com/ojack/hydra</a>.
</div>
<div id="ref-lanChaosprintGlicol2022" class="csl-entry" role="doc-biblioentry">
Lan, Qichao. (2020) 2022. <em>Chaosprint/Glicol</em>. Rust.
<a href="https://github.com/chaosprint/glicol">https://github.com/chaosprint/glicol</a>.
</div>
<div id="ref-mcleanAlgorithmicPattern2020a" class="csl-entry" role="doc-biblioentry">
Mclean, Alex. 2020. <span>“Algorithmic Pattern.”</span> In
<em>Proceedings of the International Conference on New Interfaces for Musical Expression</em>, 265--270.
Birmingham, UK. <a href="https://zenodo.org/record/4813352">https://zenodo.org/record/4813352</a>.
</div>
<div id="ref-mcleanFeedforward2020" class="csl-entry" role="doc-biblioentry">
McLean, Alex. 2020. <span>“Feedforward.”</span> In
<em>Proceedings of New Interfaces for Musical Expression</em>. Birmingham.
<a href="https://zenodo.org/record/6353969">https://zenodo.org/record/6353969</a>.
</div>
<div id="ref-mcleanTidalVortexZero2022" class="csl-entry" role="doc-biblioentry">
McLean, Alex, Raphaël Forment, Sylvain Le Beux, and Damián Silvani. 2022. <span>“TidalVortex Zero.”</span> In
<em>Proceedings of the 7th International Conference on Live Coding</em>. Limerick, Ireland: Zenodo.
<a href="https://doi.org/10.5281/zenodo.6456380">https://doi.org/10.5281/zenodo.6456380</a>.
</div>
<div id="ref-ogbornDktr0WebDirt2022" class="csl-entry" role="doc-biblioentry">
Ogborn, David. (2016) 2022. <em>Dktr0/WebDirt</em>. JavaScript.
<a href="https://github.com/dktr0/WebDirt">https://github.com/dktr0/WebDirt</a>.
</div>
<div id="ref-ogbornEstuaryBrowserbasedCollaborative2017" class="csl-entry" role="doc-biblioentry">
Ogborn, David, Jamie Beverley, Luis Navarro del Angel, Eldad Tsabary, and Alex McLean. 2017.
<span>“Estuary: Browser-Based Collaborative Projectional Live Coding of Musical Patterns.”</span> In
<em>Proceedings of the International Conference on Live Coding</em>, 11. Morelia.
</div>
<div id="ref-robertsGibberLiveCoding2012" class="csl-entry" role="doc-biblioentry">
Roberts, Charles, and Joann Kuchera-morin. 2012. <span>“Gibber: Live Coding Audio in the Browser.”</span> In
<em>In Proceedings of the 2012 International Computer Music Conference</em>.
</div>
<div id="ref-StrudelWAC2022" class="csl-entry" role="doc-biblioentry">
Roos, Felix, and Alex McLean. 2022. <span>“Strudel: Algorithmic Patterns for the Web.”</span> In. Zenodo.
<a href="https://doi.org/10.5281/zenodo.6768844">https://doi.org/10.5281/zenodo.6768844</a>.
</div>
<div id="ref-solomonPurescriptocarina2022" class="csl-entry" role="doc-biblioentry">
Solomon, Mike. (2021) 2022. <em>Purescript-Ocarina</em>. PureScript.
<a href="https://github.com/mikesol/purescript-ocarina">https://github.com/mikesol/purescript-ocarina</a>.
</div>
<div id="ref-SuperDirt2022" class="csl-entry" role="doc-biblioentry">
<em>SuperDirt</em>. (2015) 2022. SuperCollider. musikinformatik.
<a href="https://github.com/musikinformatik/SuperDirt">https://github.com/musikinformatik/SuperDirt</a>.
</div>
<div id="ref-toussaintEuclideanAlgorithmGenerates2005" class="csl-entry" role="doc-biblioentry">
Toussaint, Godfried. 2005. <span>“The Euclidean Algorithm Generates Traditional Musical Rhythms.”</span> In
<em>In Proceedings of BRIDGES: Mathematical Connections in Art, Music and Science</em>, 4756.
<a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.62.231"
>http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.62.231</a
>.
</div>
<div id="ref-CsoundWebAssembly" class="csl-entry" role="doc-biblioentry">
Yi, Steven, Victor Lazzarini, and Edward Costello. 2018.
<span>“WebAssembly AudioWorklet Csound.”</span> In. Berlin, Germany.
<a href="https://mural.maynoothuniversity.ie/16018/">https://mural.maynoothuniversity.ie/16018/</a>.
</div>
</div>
</body>
</html>
@@ -451,7 +451,7 @@ While Haskell's type system makes it a great language for the ongoing developmen
# Links
The Strudel REPL is available at <https://strudel.cc>, including an interactive tutorial.
The repository is at <https://github.com/tidalcycles/strudel>, all the code is open source under the AGPL-3.0 License.
The repository is at <https://codeberg.org/uzu/strudel>, all the code is open source under the AGPL-3.0 License.
# Acknowledgments

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 220 KiB

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

+63
View File
@@ -0,0 +1,63 @@
$if(false)$ This is a pandoc template and should not be edited. $endif$
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" $if(lang)$ lang="$lang$" xml:lang="$lang$" $endif$>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$ $if(date-meta)$
<meta name="date" content="$date-meta$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ - $endif$$pagetitle$</title>
<style type="text/css">
code {
white-space: pre;
}
</style>
$if(quotes)$
<style type="text/css">
q {
quotes: '“' '”' '' '';
}
</style>
$endif$ $if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
<link rel="stylesheet" href="css/iclc.css" $if(html5)$$else$type="text/css" $endif$ />
$for(css)$
<link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$ />
$endfor$ $if(math)$ $math$ $endif$ $for(header-includes)$ $header-includes$ $endfor$
</head>
<body>
$for(include-before)$ $include-before$ $endfor$ $if(title)$
<div id="$idprefix$header">
<h1 class="title">$title$</h1>
$if(subtitle)$
<h1 class="subtitle">$subtitle$</h1>
$endif$
<ul id="authorlist">
$for(author)$
<li>$author$</li>
$endfor$
</ul>
$if(date)$
<h3 class="date">$date$</h3>
$endif$
</div>
$endif$ $if(toc)$
<div id="$idprefix$TOC">$toc$</div>
$endif$
<h2 class="abstract">Abstract</h2>
<div id="abstract">
$if(abstract)$ $abstract$ $else$ Please provide an abstract in the metadata block at the top of your markdown
document. Refer to template.txt for details. $endif$
</div>
$body$ $for(include-after)$ $include-after$ $endfor$
</body>
</html>
+197
View File
@@ -0,0 +1,197 @@
This document introduces you to Strudel in a technical sense.
It is rather out of date, but there might still be useful info below.
If you just want to *use* Strudel, have a look at the [Tutorial](https://strudel.tidalcycles.org/tutorial/).
## Strudel Packages
There are different packages for different purposes. They..
- split up the code into smaller chunks
- can be selectively used to implement some sort of time based system
Please refer to the individual README files in the [packages folder](https://codeberg.org/uzu/strudel/src/branch/main/packages)
## REPL
The [REPL](https://strudel.tidalcycles.org/) is the place where all packages come together to form a live coding system. It can also be seen as a reference implementation for users of the library.
More info in the [REPL README](https://codeberg.org/uzu/strudel/src/branch/main/packages/repl/README.md)
# High Level Overview
<img src="strudelflow.png" width="600" />
## 1. End User Code
The End User Code is written in JavaScript with added syntax sugar. The [eval package](https://github.com/tidalcycles/strudel/tree/main/packages/eval#strudelcycleseval) evaluates the user code
after a transpilation step, which resolves the syntax sugar. If you don't want the syntax sugar, you can omit the eval package and call the native javascript `eval` instead.
### 🍭 Syntax Sugar
JavaScript Transpilation = converting valid JavaScript to valid JavaScript:
```js
"c3 [e3 g3]".fast(2)
```
becomes
```js
mini('c3 [e3 g3]')
.withMiniLocation([1, 0, 0], [1, 11, 11]) // source location
.fast(2);
```
- double quoted strings and backtick strings are turned into `mini` calls (single quoted strings are left as is)
- The source location is added by chaining `withMiniLocation`, which enables the real time highlighting later
- (psuedo) variable names that look like notes (like `c4`, `bb2` or `fs3`) are turned into strings
- support for top level await
- operator overloading could be implemented in the future
This is how it works:
<img src="https://github.com/tidalcycles/strudel/blob/talk/talk/public/shiftflow.png?raw=true" width="800" />
- The user code is parsed with a [shift parser](https://github.com/shapesecurity/shift-parser-js), generating an AST
- The AST is transformed to resolve the syntax sugar
- The AST is used to generate code again (shift-codegen)
Shift will most likely be replaced with acorn in the future, see https://github.com/tidalcycles/strudel/issues/174
### Mini Notation
Another important part of the user code is the mini notation, which allows to express rhythms in a short manner.
- the mini notation is [implemented as a PEG grammar](https://github.com/tidalcycles/strudel/blob/main/packages/mini/krill.pegjs), living in the [mini package](https://github.com/tidalcycles/strudel/tree/main/packages/mini)
- it is based on [krill](https://github.com/Mdashdotdashn/krill) by Mdashdotdashn
- the peg grammar is used to generate a parser with [peggyjs](https://peggyjs.org/)
- the generated parser takes a mini notation string and outputs an AST
- the AST can then be used to construct a pattern using the regular Strudel API
Here's an example AST:
```json
{
"type_": "pattern",
"arguments_": { "alignment": "h" },
"source_": [
{
"type_": "element", "source_": "c3",
"location_": { "start": { "offset": 1, "line": 1, "column": 2 }, "end": { "offset": 4, "line": 1, "column": 5 } }
},
{
"type_": "element",
"location_": { "start": { "offset": 4, "line": 1, "column": 5 }, "end": { "offset": 11, "line": 1, "column": 12 } }
"source_": {
"type_": "pattern", "arguments_": { "alignment": "h" },
"source_": [
{
"type_": "element", "source_": "e3",
"location_": { "start": { "offset": 5, "line": 1, "column": 6 }, "end": { "offset": 8, "line": 1, "column": 9 } }
},
{
"type_": "element", "source_": "g3",
"location_": { "start": { "offset": 8, "line": 1, "column": 9 }, "end": { "offset": 10, "line": 1, "column": 11 } }
}
]
},
}
]
}
```
which translates to `seq(c3, seq(e3, g3))`
## 2. Querying & Scheduling
When the user code has been evaluated, we hopefully get a Pattern instance, which we can use to query events from.
These events can then be used to trigger side effects in the real world. On that note, Events are mostly called Hap(s) in the codebase, because JS already has a built in `Event` class.
### Querying
> Querying = Asking a Pattern for Events within a certain time span
```js
seq('c3', ['e3', 'g3']) // <--- Pattern
.queryArc(0, 2) // query events within 0 and 2 cycles
.map((hap) => hap.showWhole()); // make readable
```
yields
```js
[
'0/1 -> 1/2: c3', // cycle 0
'1/2 -> 3/4: e3',
'3/4 -> 1/1: g3',
'1/1 -> 3/2: c3', // cycle 1
'3/2 -> 7/4: e3',
'7/4 -> 2/1: g3',
];
```
### 🗓️ Scheduling
The scheduler will query events repeatedly, creating a possibly endless loop of time slices.
Here is a simplified example of how it works
```js
let step = 0.5; // query interval in seconds
let tick = 0; // how many intervals have passed
let pattern = seq('c3', ['e3', 'g3']); // pattern from user
setInterval(() => {
const events = pattern.queryArc(tick * step, ++tick * step);
events.forEach((event) => {
console.log(event.showWhole());
const o = getAudioContext().createOscillator();
o.frequency.value = getFreq(event.value);
o.start(event.whole.begin);
o.stop(event.whole.begin + event.duration);
o.connect(getAudioContext().destination);
});
}, step * 1000); // query each "step" seconds
```
## 3. Sound Output
The third and last step is to use the scheduled events to make sound.
Patterns are wrapped with param functions to compose different properties of the sound.
```js
note("[c2(3,8) [<eb2 g1> bb1]]") // sets frequency
.s("<sawtooth square>") // sound source
.gain(.5) // turn down volume
.cutoff(sine.range(200,1000).slow(4)) // modulated cutoff
.slow(2)
.out().logValues()`,
]}
/>
```
Here is an example Hap value with different properties:
```js
{ note: 'a4', s: 'sawtooth', gain: 0.5, cutoff: 267 }
```
<img src="waa-nodes.png" width="600" />
<div className="text-left">
- Patterns represent just values in time!
- Suitable for any time based output (music, visuals, movement, .. ?)
### Supported Outputs
At the time of writing this doc, the following outputs are supported:
- Web Audio API `.out()` see [/webaudio](https://github.com/tidalcycles/strudel/tree/main/packages/webaudio)
- MIDI `.midi()` see [/midi](https://github.com/tidalcycles/strudel/tree/main/packages/midi)
- OSC `.osc()` see [/osc](https://github.com/tidalcycles/strudel/tree/main/packages/osc)
- Serial `.serial()` see [/serial](https://github.com/tidalcycles/strudel/tree/main/packages/serial)
- Tone.js `.tone()` (deprecated?) [/tone](https://github.com/tidalcycles/strudel/tree/main/packages/tone)
- WebDirt `.webdirt()` (deprecated?) [/webdirt](https://github.com/tidalcycles/strudel/tree/main/packages/webdirt)
- Speech `.speak()` (experimental) part of [/core](https://github.com/tidalcycles/strudel/tree/main/packages/core)
These could change, so make sure to check the [packages folder](https://github.com/tidalcycles/strudel/tree/main/packages).
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

+11
View File
@@ -42,6 +42,7 @@ export default [
'**/hydra.mjs',
'**/jsdoc-synonyms.js',
'packages/hs2js/src/hs2js.mjs',
'packages/supradough/dough-export.mjs',
'**/samples',
],
},
@@ -83,4 +84,14 @@ export default [
],
},
},
{
// Properties provided by AudioWorkletGlobalScope
files: ['packages/superdough/worklets.mjs'],
languageOptions: {
globals: {
currentTime: 'readonly',
sampleRate: 'readonly',
},
},
},
];
@@ -1,4 +1,5 @@
<script src="https://unpkg.com/@strudel/repl@1.0.2"></script>
<script src="https://unpkg.com/@strudel/repl@1.2.7"></script>
<!-- <script src="../../packages/repl/dist/index.js"></script> -->
<strudel-editor>
<!--
// @date 23-08-15
+3
View File
@@ -20,5 +20,8 @@
"@strudel/tonal": "workspace:*",
"@strudel/transpiler": "workspace:*",
"@strudel/webaudio": "workspace:*"
},
"engines": {
"node": ">=18.0.0"
}
}
+3
View File
@@ -14,5 +14,8 @@
},
"dependencies": {
"@strudel/web": "workspace:*"
},
"engines": {
"node": ">=18.0.0"
}
}
+3
View File
@@ -18,5 +18,8 @@
"@strudel/transpiler": "workspace:*",
"@strudel/webaudio": "workspace:*",
"@strudel/tonal": "workspace:*"
},
"engines": {
"node": ">=18.0.0"
}
}
+3
View File
@@ -13,5 +13,8 @@
},
"devDependencies": {
"vite": "^6.0.11"
},
"engines": {
"node": ">=18.0.0"
}
}
+6 -3
View File
@@ -11,7 +11,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/tidalcycles/strudel.git"
"url": "git+https://codeberg.org/uzu/strudel.git"
},
"keywords": [
"titdalcycles",
@@ -23,14 +23,17 @@
"author": "Felix Roos <flix91@gmail.com>",
"license": "AGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/tidalcycles/strudel/issues"
"url": "https://codeberg.org/uzu/strudel/issues"
},
"homepage": "https://github.com/tidalcycles/strudel#readme",
"homepage": "https://codeberg.org/uzu/strudel#readme",
"dependencies": {
"@strudel/web": "workspace:*",
"hs2js": "workspace:*"
},
"devDependencies": {
"vite": "^6.0.11"
},
"engines": {
"node": ">=18.0.0"
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
/*
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>
jsdoc-synonyms.js - Add support for @synonyms tag
Copyright (C) 2023 Strudel contributors - see <https://codeberg.org/uzu/strudel/activity/contributors>
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/>.
*/
+9 -13
View File
@@ -5,22 +5,24 @@ made into a pattern swatch.
Example: <https://felixroos.github.io/strudel/swatch/>
Please note: These instructions have not been fully tested/adapted since strudel moved to codeberg from github. PRs welcome!
## deploy
### 1. fork the [strudel repo on github](https://github.com/tidalcycles/strudel.git)
### 1. fork the [strudel repo on codeberg](https://codeberg.org/uzu/strudel.git)
### 2. clone your fork to your machine `git clone https://github.com/<your-username>/strudel.git strudel && cd strudel`
### 2. clone your fork to your machine `git clone https://codeberg.org/<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`
### 5. edit `website/public/CNAME` to contain `<your-username>.codeberg.page/strudel`
### 6. edit `website/astro.config.mjs` to use site: `https://<your-username>.github.io` and base `/strudel`, like this
### 6. edit `website/astro.config.mjs` to use site: `https://<your-username>.codeberg.page` and base `/strudel`, like this
```js
const site = 'https://<your-username>.github.io';
const site = 'https://<your-username>.codeberg.page';
const base = '/strudel';
```
@@ -30,15 +32,9 @@ const base = '/strudel';
git add . && git commit -m "site config" && git push --set-upstream origin
```
### 8. deploy to github pages
### 8. deploy to codeberg 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).
### 9. view your patterns at `<your-username>.codeberg.page/strudel/swatch/`
### 10. optional: automatic deployment
+7 -3
View File
@@ -31,7 +31,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/tidalcycles/strudel.git"
"url": "git+https://codeberg.org/uzu/strudel.git"
},
"keywords": [
"tidalcycles",
@@ -43,7 +43,7 @@
"author": "Alex McLean <alex@slab.org> (https://slab.org)",
"license": "AGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/tidalcycles/strudel/issues"
"url": "https://codeberg.org/uzu/strudel/issues"
},
"homepage": "https://strudel.cc",
"dependencies": {
@@ -71,6 +71,10 @@
"jsdoc-json": "^2.0.2",
"lerna": "^8.1.9",
"prettier": "^3.4.2",
"vitest": "^3.0.4"
"vitest": "^3.0.4",
"vite-plugin-bundle-audioworklet": "workspace:*"
},
"engines": {
"node": ">=18.0.0"
}
}
+1 -1
View File
@@ -2,4 +2,4 @@
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.
To understand how those pieces connect, refer to the [Technical Manual](https://codeberg.org/uzu/strudel/wiki/Technical-Manual) or the individual READMEs.
+444 -64
View File
@@ -1,84 +1,464 @@
import jsdoc from '../../doc.json';
// import { javascriptLanguage } from '@codemirror/lang-javascript';
import { autocompletion } from '@codemirror/autocomplete';
import { h } from './html';
//TODO: fix tonal scale import
// import { Scale } from '@tonaljs/tonal';
// import { soundMap } from '@strudel/webaudio';
let soundMap = undefined;
import { complex } from '@strudel/tonal';
function plaintext(str) {
const escapeHtml = (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');
const stripHtml = (html) => {
const 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 getDocLabel = (doc) => doc.name || doc.longname;
const buildParamsList = (params) =>
params?.length
? `
<div class="autocomplete-info-params-section">
<h4 class="autocomplete-info-section-title">Parameters</h4>
<ul class="autocomplete-info-params-list">
${params
.map(
({ name, type, description }) => `
<li class="autocomplete-info-param-item">
<span class="autocomplete-info-param-name">${name}</span>
<span class="autocomplete-info-param-type">${type.names?.join(' | ')}</span>
${description ? `<div class="autocomplete-info-param-desc">${stripHtml(description)}</div>` : ''}
</li>
`,
)
.join('')}
</ul>
</div>
`
: '';
const buildExamples = (examples) =>
examples?.length
? `
<div class="autocomplete-info-examples-section">
<h4 class="autocomplete-info-section-title">Examples</h4>
${examples
.map(
(example) => `
<pre class="autocomplete-info-example-code">${escapeHtml(example)}</pre>
`,
)
.join('')}
</div>
`
: '';
export const Autocomplete = (doc) =>
h`
<div class="autocomplete-info-container">
<div class="autocomplete-info-tooltip">
<h3 class="autocomplete-info-function-name">${getDocLabel(doc)}</h3>
${doc.synonyms_text ? `<div class="autocomplete-info-function-synonyms">Synonyms: ${doc.synonyms_text}</div>` : ''}
${doc.description ? `<div class="autocomplete-info-function-description">${doc.description}</div>` : ''}
${buildParamsList(doc.params)}
${buildExamples(doc.examples)}
</div>
</div>
`[0];
const isValidDoc = (doc) => {
const label = getDocLabel(doc);
return label && !label.startsWith('_') && !['package'].includes(doc.kind);
};
const hasExcludedTags = (doc) =>
['superdirtOnly', 'noAutocomplete'].some((tag) => doc.tags?.find((t) => t.originalTitle === tag));
export function bankCompletions() {
// TODO: FIX IMPORT
const soundDict = soundMap?.get() ?? {};
const banks = new Set();
for (const key of Object.keys(soundDict)) {
const [bank, suffix] = key.split('_');
if (suffix && bank) banks.add(bank);
}
return Array.from(banks)
.sort()
.map((name) => ({ label: name, type: 'bank' }));
}
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
}));
// Attempt to get all scale names from Tonal TODO: FIX IMPORT
let scaleCompletions = [];
// try {
// scaleCompletions = (Scale.names ? Scale.names() : []).map((name) => ({ label: name, type: 'scale' }));
// } catch (e) {
// console.warn('[autocomplete] Could not load scale names from Tonal:', e);
// }
export const strudelAutocomplete = (context /* : CompletionContext */) => {
let word = context.matchBefore(/\w*/);
if (word.from == word.to && !context.explicit) return null;
// Valid mode values for voicing
const modeCompletions = [
{ label: 'below', type: 'mode' },
{ label: 'above', type: 'mode' },
{ label: 'duck', type: 'mode' },
{ label: 'root', type: 'mode' },
];
// Valid chord symbols from ireal dictionary plus empty string for major triads
const chordSymbols = ['', ...Object.keys(complex)].sort();
const chordSymbolCompletions = chordSymbols.map((symbol) => {
if (symbol === '') {
return {
label: 'major',
apply: '',
type: 'chord-symbol',
};
}
return {
from: word.from,
options: jsdocCompletions,
/* options: [
{ label: 'match', type: 'keyword' },
{ label: 'hello', type: 'variable', info: '(World)' },
{ label: 'magic', type: 'text', apply: '⠁⭒*.✩.*⭒⠁', detail: 'macro' },
], */
label: symbol,
apply: symbol,
type: 'chord-symbol',
};
});
export const getSynonymDoc = (doc, synonym) => {
const synonyms = doc.synonyms || [];
const docLabel = getDocLabel(doc);
// Swap `doc.name` in for `s` in the list of synonyms
const synonymsWithDoc = [docLabel, ...synonyms].filter((x) => x && x !== synonym);
return {
...doc,
name: synonym,
longname: synonym,
synonyms: synonymsWithDoc,
synonyms_text: synonymsWithDoc.join(', '),
};
};
export function isAutoCompletionEnabled(on) {
return on
? [
autocompletion({ override: [strudelAutocomplete] }),
//javascriptLanguage.data.of({ autocomplete: strudelAutocomplete }),
]
: []; // autocompletion({ override: [] })
const jsdocCompletions = (() => {
const seen = new Set(); // avoid repetition
const completions = [];
for (const doc of jsdoc.docs) {
if (!isValidDoc(doc) || hasExcludedTags(doc)) continue;
const docLabel = getDocLabel(doc);
// Remove duplicates
const synonyms = doc.synonyms || [];
let labels = [docLabel, ...synonyms];
for (const label of labels) {
// https://codemirror.net/docs/ref/#autocomplete.Completion
if (label && !seen.has(label)) {
seen.add(label);
completions.push({
label,
info: () => Autocomplete(getSynonymDoc(doc, label)),
type: 'function', // https://codemirror.net/docs/ref/#autocomplete.Completion.type
});
}
}
}
return completions;
})();
// --- Handler functions for each context ---
const pitchNames = [
'C',
'C#',
'Db',
'D',
'D#',
'Eb',
'E',
'E#',
'Fb',
'F',
'F#',
'Gb',
'G',
'G#',
'Ab',
'A',
'A#',
'Bb',
'B',
'B#',
'Cb',
];
// Cached regex patterns for scaleHandler
const SCALE_NO_QUOTES_REGEX = /scale\(\s*$/;
const SCALE_AFTER_COLON_REGEX = /scale\(\s*['"][^'"]*:[^'"]*$/;
const SCALE_PRE_COLON_REGEX = /scale\(\s*['"][^'"]*$/;
const SCALE_PITCH_MATCH_REGEX = /([A-Ga-g][#b]*)?$/;
const SCALE_SPACES_TO_COLON_REGEX = /\s+/g;
function scaleHandler(context) {
// First check for scale context without quotes - block with empty completions
let scaleNoQuotesContext = context.matchBefore(SCALE_NO_QUOTES_REGEX);
if (scaleNoQuotesContext) {
return {
from: scaleNoQuotesContext.to,
options: [],
};
}
// Check for after-colon context first (more specific)
let scaleAfterColonContext = context.matchBefore(SCALE_AFTER_COLON_REGEX);
if (scaleAfterColonContext) {
const text = scaleAfterColonContext.text;
const colonIdx = text.lastIndexOf(':');
if (colonIdx !== -1) {
const fragment = text.slice(colonIdx + 1);
const filteredScales = scaleCompletions.filter((s) => s.label.startsWith(fragment));
const options = filteredScales.map((s) => ({
...s,
apply: s.label.replace(SCALE_SPACES_TO_COLON_REGEX, ':'),
}));
const from = scaleAfterColonContext.from + colonIdx + 1;
return {
from,
options,
};
}
}
// Then check for pre-colon context
let scalePreColonContext = context.matchBefore(SCALE_PRE_COLON_REGEX);
if (scalePreColonContext) {
if (!scalePreColonContext.text.includes(':')) {
if (context.explicit) {
const text = scalePreColonContext.text;
const match = text.match(SCALE_PITCH_MATCH_REGEX);
const fragment = match ? match[0] : '';
const filtered = pitchNames.filter((p) => p.toLowerCase().startsWith(fragment.toLowerCase()));
const from = scalePreColonContext.to - fragment.length;
const options = filtered.map((p) => ({ label: p, type: 'pitch' }));
return { from, options };
} else {
return { from: scalePreColonContext.to, options: [] };
}
}
}
return null;
}
// Cached regex patterns for soundHandler
const SOUND_NO_QUOTES_REGEX = /(s|sound)\(\s*$/;
const SOUND_WITH_QUOTES_REGEX = /(s|sound)\(\s*['"][^'"]*$/;
const SOUND_FRAGMENT_MATCH_REGEX = /(?:[\s[{(<])([\w]*)$/;
function soundHandler(context) {
// First check for sound context without quotes - block with empty completions
let soundNoQuotesContext = context.matchBefore(SOUND_NO_QUOTES_REGEX);
if (soundNoQuotesContext) {
return {
from: soundNoQuotesContext.to,
options: [],
};
}
// Then check for sound context with quotes - provide completions
let soundContext = context.matchBefore(SOUND_WITH_QUOTES_REGEX);
if (!soundContext) return null;
const text = soundContext.text;
const quoteIdx = Math.max(text.lastIndexOf('"'), text.lastIndexOf("'"));
if (quoteIdx === -1) return null;
const inside = text.slice(quoteIdx + 1);
const fragMatch = inside.match(SOUND_FRAGMENT_MATCH_REGEX);
const fragment = fragMatch ? fragMatch[1] : inside;
const soundNames = Object.keys(soundMap?.get() ?? {}).sort();
const filteredSounds = soundNames.filter((name) => name.includes(fragment));
let options = filteredSounds.map((name) => ({ label: name, type: 'sound' }));
const from = soundContext.to - fragment.length;
return {
from,
options,
};
}
// Cached regex patterns for bankHandler
const BANK_NO_QUOTES_REGEX = /bank\(\s*$/;
const BANK_WITH_QUOTES_REGEX = /bank\(\s*['"][^'"]*$/;
function bankHandler(context) {
// First check for bank context without quotes - block with empty completions
let bankNoQuotesContext = context.matchBefore(BANK_NO_QUOTES_REGEX);
if (bankNoQuotesContext) {
return {
from: bankNoQuotesContext.to,
options: [],
};
}
// Then check for bank context with quotes - provide completions
let bankMatch = context.matchBefore(BANK_WITH_QUOTES_REGEX);
if (!bankMatch) return null;
const text = bankMatch.text;
const quoteIdx = Math.max(text.lastIndexOf('"'), text.lastIndexOf("'"));
if (quoteIdx === -1) return null;
const inside = text.slice(quoteIdx + 1);
const fragment = inside;
let banks = bankCompletions();
const filteredBanks = banks.filter((b) => b.label.startsWith(fragment));
const from = bankMatch.to - fragment.length;
return {
from,
options: filteredBanks,
};
}
// Cached regex patterns for modeHandler
const MODE_NO_QUOTES_REGEX = /mode\(\s*$/;
const MODE_AFTER_COLON_REGEX = /mode\(\s*['"][^'"]*:[^'"]*$/;
const MODE_PRE_COLON_REGEX = /mode\(\s*['"][^'"]*$/;
const MODE_FRAGMENT_MATCH_REGEX = /(?:[\s[{(<])([\w:]*)$/;
function modeHandler(context) {
// First check for mode context without quotes - block with empty completions
let modeNoQuotesContext = context.matchBefore(MODE_NO_QUOTES_REGEX);
if (modeNoQuotesContext) {
return {
from: modeNoQuotesContext.to,
options: [],
};
}
// Check for after-colon context first (more specific)
let modeAfterColonContext = context.matchBefore(MODE_AFTER_COLON_REGEX);
if (modeAfterColonContext) {
const text = modeAfterColonContext.text;
const colonIdx = text.lastIndexOf(':');
if (colonIdx !== -1) {
const fragment = text.slice(colonIdx + 1);
// For anchor after colon, we can suggest pitch names
const filtered = pitchNames.filter((p) => p.toLowerCase().startsWith(fragment.toLowerCase()));
const options = filtered.map((p) => ({ label: p, type: 'pitch' }));
const from = modeAfterColonContext.from + colonIdx + 1;
return {
from,
options,
};
}
}
// Then check for pre-colon context
let modeContext = context.matchBefore(MODE_PRE_COLON_REGEX);
if (!modeContext) return null;
const text = modeContext.text;
const quoteIdx = Math.max(text.lastIndexOf('"'), text.lastIndexOf("'"));
if (quoteIdx === -1) return null;
const inside = text.slice(quoteIdx + 1);
const fragMatch = inside.match(MODE_FRAGMENT_MATCH_REGEX);
const fragment = fragMatch ? fragMatch[1] : inside;
const filteredModes = modeCompletions.filter((m) => m.label.startsWith(fragment));
const from = modeContext.to - fragment.length;
return {
from,
options: filteredModes,
};
}
// Cached regex patterns for chordHandler
const CHORD_NO_QUOTES_REGEX = /chord\(\s*$/;
const CHORD_WITH_QUOTES_REGEX = /chord\(\s*['"][^'"]*$/;
const CHORD_FRAGMENT_MATCH_REGEX = /(?:[\s[{(<])([\w#b+^:-]*)$/;
function chordHandler(context) {
// First check for chord context without quotes - block with empty completions
let chordNoQuotesContext = context.matchBefore(CHORD_NO_QUOTES_REGEX);
if (chordNoQuotesContext) {
return {
from: chordNoQuotesContext.to,
options: [],
};
}
// Then check for chord context with quotes - provide completions
let chordContext = context.matchBefore(CHORD_WITH_QUOTES_REGEX);
if (!chordContext) return null;
const text = chordContext.text;
const quoteIdx = Math.max(text.lastIndexOf('"'), text.lastIndexOf("'"));
if (quoteIdx === -1) return null;
const inside = text.slice(quoteIdx + 1);
// Use same fragment matching as sound/mode for expressions like "<G Am>"
const fragMatch = inside.match(CHORD_FRAGMENT_MATCH_REGEX);
const fragment = fragMatch ? fragMatch[1] : inside;
// Check if fragment contains any pitch name at start (for root + symbol)
let rootMatch = null;
let symbolFragment = fragment;
for (const pitch of pitchNames) {
if (fragment.toLowerCase().startsWith(pitch.toLowerCase())) {
rootMatch = pitch;
symbolFragment = fragment.slice(pitch.length);
break;
}
}
if (rootMatch) {
// We have a root, now complete chord symbols
const filteredSymbols = chordSymbolCompletions.filter((s) =>
s.label.toLowerCase().startsWith(symbolFragment.toLowerCase()),
);
// Create completions that replace the entire chord, not just the symbol part
const options = filteredSymbols;
const from = chordContext.to - symbolFragment.length;
return { from, options };
} else {
// No root yet, complete with pitch names
const filteredPitches = pitchNames.filter((p) => p.toLowerCase().startsWith(fragment.toLowerCase()));
const options = filteredPitches.map((p) => ({ label: p, type: 'pitch' }));
const from = chordContext.to - fragment.length;
return { from, options };
}
}
// Cached regex patterns for fallbackHandler
const FALLBACK_WORD_REGEX = /\w*/;
function fallbackHandler(context) {
const word = context.matchBefore(FALLBACK_WORD_REGEX);
if (word && word.from === word.to && !context.explicit) return null;
if (word) {
return {
from: word.from,
options: jsdocCompletions,
};
}
return null;
}
const handlers = [
soundHandler,
bankHandler,
chordHandler,
scaleHandler,
modeHandler,
// this handler *must* be last
fallbackHandler,
];
export const strudelAutocomplete = (context) => {
for (const handler of handlers) {
const result = handler(context);
if (result) {
return result;
}
}
return null;
};
export const isAutoCompletionEnabled = (enabled) =>
enabled ? [autocompletion({ override: [strudelAutocomplete], closeOnBlur: false })] : [];
+63
View File
@@ -0,0 +1,63 @@
import {
keymap,
highlightSpecialChars,
drawSelection,
highlightActiveLine,
dropCursor,
rectangularSelection,
crosshairCursor,
lineNumbers,
highlightActiveLineGutter,
} from '@codemirror/view';
import {
defaultHighlightStyle,
syntaxHighlighting,
bracketMatching,
foldGutter,
foldKeymap,
} from '@codemirror/language';
import { defaultKeymap, history, historyKeymap } from '@codemirror/commands';
import { searchKeymap, highlightSelectionMatches } from '@codemirror/search';
import { completionKeymap, closeBracketsKeymap } from '@codemirror/autocomplete';
// Taken + slightly modified from https://github.com/codemirror/basic-setup/blob/main/src/codemirror.ts
export const basicSetup = (() => [
// lineNumbers(),
// highlightActiveLineGutter(),
highlightSpecialChars(),
history(),
// foldGutter(),
// drawSelection(),
dropCursor(),
// EditorState.allowMultipleSelections.of(true),
// indentOnInput(),
// syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
// autocompletion(),
rectangularSelection(),
crosshairCursor(),
// highlightActiveLine(),
// highlightSelectionMatches(),
keymap.of([
...closeBracketsKeymap,
...defaultKeymap,
// ...searchKeymap,
...historyKeymap,
// ...foldKeymap,
// ...completionKeymap,
]),
])();
/// A minimal set of extensions to create a functional editor. Only
/// includes [the default keymap](#commands.defaultKeymap), [undo
/// history](#commands.history), [special character
/// highlighting](#view.highlightSpecialChars), [custom selection
/// drawing](#view.drawSelection), and [default highlight
/// style](#language.defaultHighlightStyle).
export const minimalSetup = (() => [
highlightSpecialChars(),
history(),
drawSelection(),
syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
keymap.of([...defaultKeymap, ...historyKeymap]),
])();
+103 -32
View File
@@ -1,31 +1,34 @@
import { closeBrackets } from '@codemirror/autocomplete';
export { toggleComment, toggleBlockComment, toggleLineComment, toggleBlockCommentByLine } from '@codemirror/commands';
// import { search, highlightSelectionMatches } from '@codemirror/search';
import { history } from '@codemirror/commands';
import { javascript } from '@codemirror/lang-javascript';
import { defaultHighlightStyle, syntaxHighlighting, bracketMatching } from '@codemirror/language';
import { indentWithTab, toggleLineComment } from '@codemirror/commands';
import { javascript, javascriptLanguage } from '@codemirror/lang-javascript';
import { bracketMatching, defaultHighlightStyle, syntaxHighlighting } from '@codemirror/language';
import { Compartment, EditorState, Prec } from '@codemirror/state';
import {
drawSelection,
EditorView,
highlightActiveLineGutter,
highlightActiveLine,
highlightActiveLineGutter,
keymap,
lineNumbers,
drawSelection,
} from '@codemirror/view';
import { repl, registerControl } from '@strudel/core';
import { Drawer, cleanupDraw } from '@strudel/draw';
import { persistentAtom } from '@nanostores/persistent';
import { logger, registerControl, repl } from '@strudel/core';
import { cleanupDraw, Drawer } from '@strudel/draw';
import { isAutoCompletionEnabled } from './autocomplete.mjs';
import { isTooltipEnabled } from './tooltip.mjs';
import { basicSetup } from './basicSetup.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 { sliderPlugin, updateSliderWidgets } from './slider.mjs';
import { widgetPlugin, updateWidgets } from './widget.mjs';
import { persistentAtom } from '@nanostores/persistent';
import { activateTheme, initTheme, theme } from './themes.mjs';
import { isTooltipEnabled } from './tooltip.mjs';
import { updateWidgets, widgetPlugin } from './widget.mjs';
import { jumpToCharacter } from './labelJump.mjs';
const extensions = {
export { toggleBlockComment, toggleBlockCommentByLine, toggleComment, toggleLineComment } from '@codemirror/commands';
export const extensions = {
isLineWrappingEnabled: (on) => (on ? EditorView.lineWrapping : []),
isBracketMatchingEnabled: (on) => (on ? bracketMatching({ brackets: '()[]{}<>' }) : []),
isBracketClosingEnabled: (on) => (on ? closeBrackets() : []),
@@ -37,8 +40,16 @@ const extensions = {
isActiveLineHighlighted: (on) => (on ? [highlightActiveLine(), highlightActiveLineGutter()] : []),
isFlashEnabled,
keybindings,
isTabIndentationEnabled: (on) => (on ? keymap.of([indentWithTab]) : []),
isMultiCursorEnabled: (on) =>
on
? [
EditorState.allowMultipleSelections.of(true),
EditorView.clickAddsSelectionRange.of((ev) => ev.metaKey || ev.ctrlKey),
]
: [],
};
const compartments = Object.fromEntries(Object.keys(extensions).map((key) => [key, new Compartment()]));
export const compartments = Object.fromEntries(Object.keys(extensions).map((key) => [key, new Compartment()]));
export const defaultSettings = {
keybindings: 'codemirror',
@@ -51,6 +62,8 @@ export const defaultSettings = {
isFlashEnabled: true,
isTooltipEnabled: false,
isLineWrappingEnabled: false,
isTabIndentationEnabled: false,
isMultiCursorEnabled: false,
theme: 'strudelTheme',
fontFamily: 'monospace',
fontSize: 18,
@@ -62,7 +75,7 @@ export const codemirrorSettings = persistentAtom('codemirror-settings', defaultS
});
// https://codemirror.net/docs/guide/
export function initEditor({ initialCode = '', onChange, onEvaluate, onStop, root }) {
export function initEditor({ initialCode = '', onChange, onEvaluate, onStop, root, mondo }) {
const settings = codemirrorSettings.get();
const initialSettings = Object.keys(compartments).map((key) =>
compartments[key].of(extensions[key](parseBooleans(settings[key]))),
@@ -75,13 +88,17 @@ export function initEditor({ initialCode = '', onChange, onEvaluate, onStop, roo
/* search(),
highlightSelectionMatches(), */
...initialSettings,
javascript(),
basicSetup,
mondo ? [] : javascript(),
javascriptLanguage.data.of({
closeBrackets: { brackets: ['(', '[', '{', "'", '"', '<'] },
bracketMatching: { brackets: ['(', '[', '{', "'", '"', '<'] },
}),
sliderPlugin,
widgetPlugin,
// indentOnInput(), // works without. already brought with javascript extension?
// bracketMatching(), // does not do anything
// indentOnInput(), // works without. already brought with javascript
// extension? bracketMatching(), // does not do anything
syntaxHighlighting(defaultHighlightStyle),
history(),
EditorView.updateListener.of((v) => onChange(v)),
drawSelection({ cursorBlinkRate: 0 }),
Prec.highest(
@@ -103,14 +120,22 @@ export function initEditor({ initialCode = '', onChange, onEvaluate, onStop, roo
preventDefault: true,
run: () => onStop?.(),
},
{
key: 'Alt-w',
run: (view) => jumpToCharacter(view, '$', 1),
},
{
key: 'Alt-q',
run: (view) => jumpToCharacter(view, '$', -1),
},
/* {
key: 'Ctrl-Shift-.',
run: () => (onPanic ? onPanic() : onStop?.()),
},
{
key: 'Ctrl-Shift-Enter',
run: () => (onReEvaluate ? onReEvaluate() : onEvaluate?.()),
}, */
key: 'Ctrl-Shift-.',
run: () => (onPanic ? onPanic() : onStop?.()),
},
{
key: 'Ctrl-Shift-Enter',
run: () => (onReEvaluate ? onReEvaluate() : onEvaluate?.()),
}, */
]),
),
],
@@ -191,7 +216,8 @@ export class StrudelMirror {
updateWidgets(this.editor, widgets);
updateMiniLocations(this.editor, this.miniLocations);
replOptions?.afterEval?.(options);
// if no painters are set (.onPaint was not called), then we only need the present moment (for highlighting)
// if no painters are set (.onPaint was not called), then we only need
// the present moment (for highlighting)
const drawTime = options.pattern.getPainters().length ? this.drawTime : [0, 0];
this.drawer.setDrawTime(drawTime);
// invalidate drawer after we've set the appropriate drawTime
@@ -209,6 +235,7 @@ export class StrudelMirror {
},
onEvaluate: () => this.evaluate(),
onStop: () => this.stop(),
mondo: replOptions.mondo,
});
const cmEditor = this.root.querySelector('.cm-editor');
if (cmEditor) {
@@ -229,6 +256,33 @@ export class StrudelMirror {
}
};
document.addEventListener('start-repl', this.onStartRepl);
// Handle global evaluation requests (e.g., from Vim :w)
this.onEvaluateRequest = (e) => {
try {
// Evaluate current editor on repl-evaluate
logger('[repl] evaluate via event');
this.evaluate();
e?.cancelable && e.preventDefault?.();
} catch (err) {
console.error('Error handling repl-evaluate event', err);
}
};
document.addEventListener('repl-evaluate', this.onEvaluateRequest);
document.addEventListener('repl-stop', this.onStopRequest);
// Toggle comments requested from Vim (gc)
this.onToggleComment = (e) => {
try {
// Honor selections; toggleLineComment handles both selections and
// single line
toggleLineComment(this.editor);
e?.cancelable && e.preventDefault?.();
} catch (err) {
console.error('Error handling repl-toggle-comment event', err);
}
};
document.addEventListener('repl-toggle-comment', this.onToggleComment);
}
draw(haps, time, painters) {
painters?.forEach((painter) => painter(this.drawContext, time, haps, this.drawTime));
@@ -248,13 +302,23 @@ export class StrudelMirror {
console.warn('first frame could not be painted');
}
}
async evaluate() {
async evaluate(autostart = true) {
this.flash();
await this.repl.evaluate(this.code);
await this.repl.evaluate(this.code, autostart);
}
async stop() {
this.repl.scheduler.stop();
}
// Listen for global stop requests (e.g., from Vim :q)
onStopRequest = (e) => {
try {
this.stop();
e?.cancelable && e.preventDefault?.();
} catch (err) {
console.error('Error handling repl-stop event', err);
}
};
async toggle() {
if (this.repl.scheduler.started) {
this.repl.stop();
@@ -330,11 +394,18 @@ export class StrudelMirror {
}
}
setCode(code) {
const changes = { from: 0, to: this.editor.state.doc.length, insert: 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);
this.onEvaluateRequest && document.removeEventListener('repl-evaluate', this.onEvaluateRequest);
this.onStopRequest && document.removeEventListener('repl-stop', this.onStopRequest);
this.onToggleComment && document.removeEventListener('repl-toggle-comment', this.onToggleComment);
}
getCursorLocation() {
return this.editor.state.selection.main.head;
@@ -349,7 +420,7 @@ export class StrudelMirror {
}
}
function parseBooleans(value) {
export function parseBooleans(value) {
return { true: true, false: false }[value] ?? value;
}
+2 -2
View File
@@ -1,4 +1,4 @@
import { RangeSetBuilder, StateEffect, StateField } from '@codemirror/state';
import { RangeSetBuilder, StateEffect, StateField, Prec } from '@codemirror/state';
import { Decoration, EditorView } from '@codemirror/view';
export const setMiniLocations = StateEffect.define();
@@ -134,5 +134,5 @@ export const isPatternHighlightingEnabled = (on, config) => {
setTimeout(() => {
updateMiniLocations(config.editor, config.miniLocations);
}, 100);
return on ? highlightExtension : [];
return on ? Prec.highest(highlightExtension) : [];
};
+3 -2
View File
@@ -1,6 +1,7 @@
const parser = typeof DOMParser !== 'undefined' ? new DOMParser() : null;
export let html = (string) => {
return parser?.parseFromString(string, 'text/html').querySelectorAll('*');
const template = document.createElement('template');
template.innerHTML = string.trim();
return template.content.childNodes;
};
let parseChunk = (chunk) => {
if (Array.isArray(chunk)) return chunk.flat().join('');
+1
View File
@@ -4,3 +4,4 @@ export * from './flash.mjs';
export * from './slider.mjs';
export * from './themes.mjs';
export * from './widget.mjs';
export { Vim } from './keybindings.mjs';
+117 -5
View File
@@ -1,10 +1,12 @@
import { Prec } from '@codemirror/state';
import { defaultKeymap } from '@codemirror/commands';
import { Prec, EditorState } 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 { vim, Vim } from '@replit/codemirror-vim';
// import { vim } from './vim_test.mjs';
import { vscodeKeymap } from '@replit/codemirror-vscode-keymap';
import { defaultKeymap, historyKeymap } from '@codemirror/commands';
import { logger } from '@strudel/core';
const vscodePlugin = ViewPlugin.fromClass(
class {
@@ -18,14 +20,124 @@ const vscodePlugin = ViewPlugin.fromClass(
);
const vscodeExtension = (options) => [vscodePlugin].concat(options ?? []);
// Map Vim :w to trigger the same action as evaluation. We dispatch a custom
// event 'repl-evaluate' that the editor listens for, and also simulate
// Ctrl+Enter/Alt+Enter as a fallback. We log to the Strudel logger so it
// appears in the Console panel.
try {
if (Vim && typeof Vim.defineEx === 'function') {
// Map gc to toggle line comments by dispatching a custom event that our
// CodeMirror integration listens to. This avoids depending on Vim's
// internal actions and works with current selections/visual mode.
try {
Vim.defineAction('strudelToggleComment', (cm) => {
const view = cm?.view || cm;
try {
const ev = new CustomEvent('repl-toggle-comment', { detail: { source: 'vim', view }, cancelable: true });
document.dispatchEvent(ev);
} catch (e) {
console.error('strudelToggleComment dispatch failed', e);
}
});
Vim.mapCommand('gc', 'action', 'strudelToggleComment', {}, { context: 'normal' });
Vim.mapCommand('gc', 'action', 'strudelToggleComment', {}, { context: 'visual' });
} catch (e) {
console.error('Vim gc mapping failed', e);
}
// :q to pause/stop
Vim.defineEx('quit', 'q', (cm) => {
try {
const view = cm?.view || cm;
// First try dispatching our custom stop event, then fallback to Alt+.
let handled = false;
try {
const ev = new CustomEvent('repl-stop', { detail: { source: 'vim', view }, cancelable: true });
handled = document.dispatchEvent(ev) === false;
} catch (e) {
console.error('Error dispatching repl-stop event', e);
}
if (!handled) {
const altDot = new KeyboardEvent('keydown', {
key: '.',
code: 'Period',
altKey: true,
bubbles: true,
cancelable: true,
});
view?.dom?.dispatchEvent?.(altDot);
}
} catch (e) {
console.error('Error dispatching :q stop event', e);
}
});
// :w to evaluate
Vim.defineEx('write', 'w', (cm) => {
const view = cm?.view || cm; // CM6 Vim passes either an object with view or the view itself
try {
view?.focus?.();
// Let the app know this came from Vim :w
try {
logger('[vim] :w — evaluating code');
} catch (e) {
console.error('Error logging Vim :w evaluation', e);
}
// Dispatch a dedicated evaluate event first
let handled = false;
try {
const ev = new CustomEvent('repl-evaluate', { detail: { source: 'vim', view }, cancelable: true });
handled = document.dispatchEvent(ev) === false; // false means preventDefault was called
} catch (e) {
console.error('Error dispatching repl-evaluate event', e);
}
if (handled) {
return;
}
// Try Ctrl+Enter first if not handled by custom event
const ctrlEnter = new KeyboardEvent('keydown', {
key: 'Enter',
code: 'Enter',
ctrlKey: true,
bubbles: true,
cancelable: true,
});
view?.dom?.dispatchEvent?.(ctrlEnter);
// If not handled (no handler called preventDefault), try Alt+Enter as
// fallback
if (!ctrlEnter.defaultPrevented) {
const altEnter = new KeyboardEvent('keydown', {
key: 'Enter',
code: 'Enter',
altKey: true,
bubbles: true,
cancelable: true,
});
view?.dom?.dispatchEvent?.(altEnter);
}
} catch (e) {
console.error('Error dispatching :w evaluation event', e);
}
});
}
} catch (e) {
console.error('Vim ex command setup failed (defineEx missing or Vim unavailable)', e);
}
const keymaps = {
vim,
emacs,
codemirror: () => keymap.of(defaultKeymap),
vscode: vscodeExtension,
};
export { Vim } from '@replit/codemirror-vim';
export function keybindings(name) {
const active = keymaps[name];
return [keymap.of(defaultKeymap), keymap.of(historyKeymap), active ? active() : []];
// keymap.of(searchKeymap),
const extensions = active ? [Prec.high(active())] : [];
if (name === 'vim') {
extensions.push(EditorState.allowMultipleSelections.of(true));
}
return extensions;
}
+31
View File
@@ -0,0 +1,31 @@
import { EditorSelection } from '@codemirror/state';
import { SearchCursor } from '@codemirror/search';
export function jumpToCharacter(view, character, direction = 1) {
const { state, dispatch } = view;
const pos = state.selection.main.head;
const cursor = new SearchCursor(state.doc, character);
let characterPositions = [];
let jumpPos;
while (!cursor.next().done) {
characterPositions.push(cursor.value.to);
}
if (!characterPositions.length) {
return false;
}
if (direction > 0) {
jumpPos = characterPositions.find((x) => x > pos + 1) ?? characterPositions.at(0); // Loop back around for convenience
} else {
jumpPos = characterPositions.reverse().find((x) => x < pos + 1) ?? characterPositions.at(0);
}
if (jumpPos == null) {
return false;
}
dispatch({
selection: EditorSelection.cursor(jumpPos - 1),
scrollIntoView: true,
});
return true;
}
+12 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@strudel/codemirror",
"version": "1.2.0",
"version": "1.2.7",
"description": "Codemirror Extensions for Strudel",
"main": "index.mjs",
"publishConfig": {
@@ -13,7 +13,7 @@
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/tidalcycles/strudel.git"
"url": "git+https://codeberg.org/uzu/strudel.git"
},
"keywords": [
"tidalcycles",
@@ -28,9 +28,9 @@
],
"license": "AGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/tidalcycles/strudel/issues"
"url": "https://codeberg.org/uzu/strudel/issues"
},
"homepage": "https://github.com/tidalcycles/strudel#readme",
"homepage": "https://codeberg.org/uzu/strudel#readme",
"dependencies": {
"@codemirror/autocomplete": "^6.18.4",
"@codemirror/commands": "^6.8.0",
@@ -42,14 +42,20 @@
"@lezer/highlight": "^1.2.1",
"@nanostores/persistent": "^0.10.2",
"@replit/codemirror-emacs": "^6.1.0",
"@replit/codemirror-vim": "^6.2.1",
"@replit/codemirror-vim": "^6.3.0",
"@replit/codemirror-vscode-keymap": "^6.0.2",
"@strudel/core": "workspace:*",
"@strudel/draw": "workspace:*",
"@strudel/tonal": "workspace:*",
"@strudel/transpiler": "workspace:*",
"nanostores": "^0.11.3"
"@tonaljs/tonal": "^4.10.0",
"nanostores": "^0.11.3",
"superdough": "workspace:*"
},
"devDependencies": {
"vite": "^6.0.11"
},
"engines": {
"node": ">=18.0.0"
}
}
+12
View File
@@ -8,6 +8,11 @@ import CutiePi, { settings as CutiePiSettings } from './themes/CutiePi.mjs';
import sonicPink, { settings as sonicPinkSettings } from './themes/sonic-pink.mjs';
import redText, { settings as redTextSettings } from './themes/red-text.mjs';
import greenText, { settings as greenTextSettings } from './themes/green-text.mjs';
import archBtw, { settings as archBtwSettings } from './themes/archBtw.mjs';
import fruitDaw, { settings as fruitDawSettings } from './themes/fruitDaw.mjs';
import bluescreenlight, { settings as bluescreenlightsettings } from './themes/bluescreenlight.mjs';
import androidstudio, { settings as androidstudioSettings } from './themes/androidstudio.mjs';
import atomone, { settings as atomOneSettings } from './themes/atomone.mjs';
import aura, { settings as auraSettings } from './themes/aura.mjs';
@@ -39,17 +44,20 @@ import { setTheme } from '@strudel/draw';
export const themes = {
strudelTheme,
algoboy,
archBtw,
androidstudio,
atomone,
aura,
bbedit,
blackscreen,
bluescreen,
bluescreenlight,
CutiePi,
darcula,
dracula,
duotoneDark,
eclipse,
fruitDaw,
githubDark,
githubLight,
greenText,
@@ -78,10 +86,12 @@ export const themes = {
export const settings = {
strudelTheme: strudelThemeSettings,
bluescreen: bluescreenSettings,
bluescreenlight: bluescreenlightsettings,
blackscreen: blackscreenSettings,
whitescreen: whitescreenSettings,
teletext: teletextSettings,
algoboy: algoboySettings,
archBtw: archBtwSettings,
androidstudio: androidstudioSettings,
atomone: atomOneSettings,
aura: auraSettings,
@@ -92,9 +102,11 @@ export const settings = {
eclipse: eclipseSettings,
CutiePi: CutiePiSettings,
sonicPink: sonicPinkSettings,
fruitDaw: fruitDawSettings,
githubLight: githubLightSettings,
githubDark: githubDarkSettings,
greenText: greenTextSettings,
gruvboxDark: gruvboxDarkSettings,
gruvboxLight: gruvboxLightSettings,
materialDark: materialDarkSettings,
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* @name Cutie Pi
/*
* Cutie Pi
* by Switch Angel
*/
import { tags as t } from '@lezer/highlight';
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* @name androidstudio
/*
* androidstudio
*/
import { tags as t } from '@lezer/highlight';
import { createTheme } from './theme-helper.mjs';
+38
View File
@@ -0,0 +1,38 @@
/*
* Arch Btw
* Modern terminal inspired theme
* made by Jade
*/
import { tags as t } from '@lezer/highlight';
import { createTheme } from './theme-helper.mjs';
const hex = ['rgb(0, 0, 0)', 'rgb(82, 208, 250)', 'rgba(113, 208, 250, .4)', 'rgba(113, 208, 250, .15)'];
export const settings = {
background: hex[0],
lineBackground: 'transparent',
foreground: hex[1],
selection: hex[2],
selectionMatch: hex[0],
gutterBackground: hex[0],
gutterForeground: hex[2],
gutterBorder: 'transparent',
lineHighlight: hex[0],
};
export default createTheme({
theme: 'dark',
settings,
styles: [
{
tag: [t.function(t.variableName), t.function(t.propertyName), t.url, t.processingInstruction],
color: hex[1],
},
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: hex[1] },
{ tag: [t.comment, t.brace, t.bracket], color: hex[2] },
{ tag: [t.variableName, t.propertyName, t.labelName], color: hex[1] },
{ tag: [t.attributeName, t.number], color: hex[1] },
{ tag: t.keyword, color: hex[1] },
{ tag: [t.string, t.regexp, t.special(t.propertyName)], color: hex[1] },
],
});
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* @name Atom One
/*
* Atom One
* Atom One dark syntax theme
*
* https://github.com/atom/one-dark-syntax
+37
View File
@@ -0,0 +1,37 @@
/*
* A lighter blue screen theme
* made by Jade
*/
import { tags as t } from '@lezer/highlight';
import { createTheme } from './theme-helper.mjs';
const hex = ['rgb(75, 130, 247)', 'rgb(47, 108, 246)', 'rgb(255, 255, 255)', 'rgba(255, 255, 255,.3)'];
export const settings = {
background: hex[0],
lineBackground: 'transparent',
foreground: hex[2],
selection: hex[3],
selectionMatch: hex[0],
gutterBackground: hex[0],
gutterForeground: hex[2],
gutterBorder: 'transparent',
lineHighlight: hex[1],
};
export default createTheme({
theme: 'dark',
settings,
styles: [
{
tag: [t.function(t.variableName), t.function(t.propertyName), t.url, t.processingInstruction],
color: hex[2],
},
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: hex[2] },
{ tag: [t.comment, t.bracket, t.brace, t.compareOperator], color: hex[3] },
{ tag: [t.variableName, t.propertyName, t.labelName], color: hex[2] },
{ tag: [t.attributeName, t.number], color: hex[2] },
{ tag: t.keyword, color: hex[2] },
{ tag: [t.string, t.regexp, t.special(t.propertyName)], color: hex[2] },
],
});
+2 -3
View File
@@ -1,6 +1,5 @@
/**
* @name darcula
* @author darcula
/*
* darcula
* Name: IntelliJ IDEA darcula theme
* From IntelliJ IDEA by JetBrains
*/
+1 -2
View File
@@ -1,6 +1,5 @@
/**
/*
* @name dracula
* @author dracula
* Michael Kaminsky (http://github.com/mkaminsky11)
* Original dracula color scheme by Zeno Rocha (https://github.com/zenorocha/dracula-theme)
*/
+3 -3
View File
@@ -1,6 +1,6 @@
/**
* @name duotone
* @author Bram de Haan
/*
* duotone
* author Bram de Haan
* by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes)
*/
import { tags as t } from '@lezer/highlight';
+3 -3
View File
@@ -1,6 +1,6 @@
/**
* @name duotone
* @author Bram de Haan
/*
* duotone
* author Bram de Haan
* by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes)
*/
import { tags as t } from '@lezer/highlight';
+50
View File
@@ -0,0 +1,50 @@
/*
* Fruit Daw
* made by Jade
*/
import { tags as t } from '@lezer/highlight';
import { createTheme } from './theme-helper.mjs';
const hex = [
'rgb(84, 93, 98)',
'rgb(255, 255, 255)',
'rgba(255, 255, 255, .25)',
'rgb(67, 76, 81)',
'rgb(186, 230, 115)',
'rgb(252, 184, 67)',
'rgb(124, 206, 254)',
'rgb(83, 101, 102)',
'rgba(46, 62, 72,.5)',
'rgb(94, 100, 108)',
'rgb(167, 216, 177)',
];
export const settings = {
background: hex[0],
lineBackground: 'transparent',
foreground: hex[10],
selection: hex[8],
selectionMatch: hex[0],
gutterBackground: hex[3],
gutterForeground: hex[2],
gutterBorder: 'transparent',
lineHighlight: hex[3],
};
export default createTheme({
theme: 'dark',
settings,
styles: [
{
tag: [t.function(t.variableName), t.function(t.propertyName), t.url, t.processingInstruction],
color: hex[1],
},
{ tag: [t.bool, t.special(t.variableName)], color: hex[1] },
{ tag: [t.comment, t.brace, t.bracket], color: hex[2] },
{ tag: [t.variableName], color: hex[1] },
{ tag: [t.labelName, t.propertyName, t.self, t.atom], color: hex[5] },
{ tag: [t.attributeName, t.number], color: hex[6] },
{ tag: t.keyword, color: hex[5] },
{ tag: [t.string, t.regexp, t.special(t.propertyName)], color: hex[4] },
],
});
-3
View File
@@ -1,6 +1,3 @@
/**
* @name github
*/
import { tags as t } from '@lezer/highlight';
import { createTheme } from './theme-helper.mjs';
-3
View File
@@ -1,6 +1,3 @@
/**
* @name github
*/
import { tags as t } from '@lezer/highlight';
import { createTheme } from './theme-helper.mjs';
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* @name Atom One
/*
* Atom One
* Atom One dark syntax theme
*
* https://github.com/atom/one-dark-syntax
+3 -4
View File
@@ -1,7 +1,6 @@
/**
* @name gruvbox-dark
* @author morhetz
* Name: Gruvbox
/*
* gruvbox-dark
* author morhetz
* From github.com/codemirror/codemirror5/blob/master/theme/gruvbox-dark.css
*/
import { tags as t } from '@lezer/highlight';
+3 -4
View File
@@ -1,7 +1,6 @@
/**
* @name gruvbox-light
* @author morhetz
* Name: Gruvbox
/*
* gruvbox-light
* author morhetz
* From github.com/codemirror/codemirror5/blob/master/theme/gruvbox-light.css
*/
import { tags as t } from '@lezer/highlight';
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* @name Atom One
/*
* Atom One
* Atom One dark syntax theme
*
* https://github.com/atom/one-dark-syntax
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* @name Atom One
/*
* Atom One
* Atom One dark syntax theme
*
* https://github.com/atom/one-dark-syntax
+5 -4
View File
@@ -1,6 +1,6 @@
import { hoverTooltip } from '@codemirror/view';
import jsdoc from '../../doc.json';
import { Autocomplete } from './autocomplete.mjs';
import { Autocomplete, getSynonymDoc } from './autocomplete.mjs';
const getDocLabel = (doc) => doc.name || doc.longname;
@@ -52,10 +52,11 @@ export const strudelTooltip = hoverTooltip(
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) {
const doc = jsdoc.docs.filter((doc) => doc.synonyms && doc.synonyms.includes(word))[0];
if (!doc) {
return null;
}
entry = getSynonymDoc(doc, word);
}
return {
@@ -66,7 +67,7 @@ export const strudelTooltip = hoverTooltip(
create(view) {
let dom = document.createElement('div');
dom.className = 'strudel-tooltip';
const ac = Autocomplete({ doc: entry, label: word });
const ac = Autocomplete(entry);
dom.appendChild(ac);
return { dom };
},
+6 -6
View File
@@ -1,11 +1,11 @@
import { describe, bench } from 'vitest';
import { calculateTactus, sequence, stack } from '../index.mjs';
import { calculateSteps, sequence, stack } from '../index.mjs';
const pat64 = sequence(...Array(64).keys());
describe('steps', () => {
calculateTactus(true);
calculateSteps(true);
bench(
'+tactus',
() => {
@@ -14,7 +14,7 @@ describe('steps', () => {
{ time: 1000 },
);
calculateTactus(false);
calculateSteps(false);
bench(
'-tactus',
() => {
@@ -25,7 +25,7 @@ describe('steps', () => {
});
describe('stack', () => {
calculateTactus(true);
calculateSteps(true);
bench(
'+tactus',
() => {
@@ -34,7 +34,7 @@ describe('stack', () => {
{ time: 1000 },
);
calculateTactus(false);
calculateSteps(false);
bench(
'-tactus',
() => {
@@ -43,4 +43,4 @@ describe('stack', () => {
{ time: 1000 },
);
});
calculateTactus(true);
calculateSteps(true);
+49
View File
@@ -0,0 +1,49 @@
import { describe, bench } from 'vitest';
import { calculateSteps, rand, useRNG } from '../index.mjs';
const testingResolution = 128;
const _generateRandomPattern = () => rand.iter(testingResolution).fast(testingResolution).firstCycle();
describe('old random', () => {
calculateSteps(true);
bench(
'+tactus',
() => {
useRNG('legacy');
_generateRandomPattern();
},
{
time: 1000,
teardown() {
useRNG('legacy');
},
},
);
calculateSteps(false);
bench(
'-tactus',
() => {
useRNG('precise');
_generateRandomPattern();
},
{
time: 1000,
teardown() {
useRNG('legacy');
},
},
);
});
describe('random', () => {
calculateSteps(true);
bench('+tactus', _generateRandomPattern, { time: 1000 });
calculateSteps(false);
bench('-tactus', _generateRandomPattern, { time: 1000 });
});
calculateSteps(true);
+1 -1
View File
@@ -113,7 +113,7 @@ self.onconnect = function (e) {
port.start(); // Required when using addEventListener. Otherwise called implicitly by onmessage setter.
};
// used to consistently schedule events, for use in a service worker - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/clockworker.mjs>
// used to consistently schedule events, for use in a service worker - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/clockworker.mjs>
function createClock(
getTime,
callback, // called slightly before each cycle
+1340 -73
View File
File diff suppressed because it is too large Load Diff
+7 -6
View File
@@ -1,11 +1,11 @@
/*
cyclist.mjs - event scheduler for a single strudel instance. for multi-instance scheduler, see - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/neocyclist.mjs>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/cyclist.mjs>
cyclist.mjs - event scheduler for a single strudel instance. for multi-instance scheduler, see - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/neocyclist.mjs>
Copyright (C) 2022 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/cyclist.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 createClock from './zyklus.mjs';
import { logger } from './logger.mjs';
import { errorLogger, logger } from './logger.mjs';
export class Cyclist {
constructor({
@@ -57,7 +57,7 @@ export class Cyclist {
}
// query the pattern for events
const haps = this.pattern.queryArc(begin, end, { _cps: this.cps });
const haps = this.pattern.queryArc(begin, end, { _cps: this.cps, cyclist: 'cyclist' });
haps.forEach((hap) => {
if (hap.hasOnset()) {
@@ -65,8 +65,9 @@ export class Cyclist {
(hap.whole.begin - this.num_cycles_at_cps_change) / this.cps + this.seconds_at_cps_change + latency;
const duration = hap.duration / this.cps;
// the following line is dumb and only here for backwards compatibility
// see https://github.com/tidalcycles/strudel/pull/1004
// see https://codeberg.org/uzu/strudel/pulls/1004
const deadline = targetTime - phase;
// this onTrigger has another signature
onTrigger?.(hap, deadline, duration, this.cps, targetTime);
if (hap.value.cps !== undefined && this.cps != hap.value.cps) {
this.cps = hap.value.cps;
@@ -75,7 +76,7 @@ export class Cyclist {
}
});
} catch (e) {
logger(`[cyclist] error: ${e.message}`);
errorLogger(e);
onError?.(e);
}
},
+1 -1
View File
@@ -1,6 +1,6 @@
/*
drawLine.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/drawLine.mjs>
Copyright (C) 2022 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/drawLine.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/>.
*/
+58 -28
View File
@@ -2,7 +2,7 @@
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.
See <https://codeberg.org/uzu/strudel/src/branch/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
@@ -10,9 +10,9 @@ 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, register, silence } from './pattern.mjs';
import { timeCat, register, silence, stack, pure, _morph } from './pattern.mjs';
import { rotate, flatten, splitAt, zipWith } from './util.mjs';
import Fraction from './fraction.mjs';
import Fraction, { lcm } from './fraction.mjs';
const left = function (n, x) {
const [ons, offs] = n;
@@ -35,36 +35,33 @@ const right = function (n, x) {
return result;
};
const _bjork = function (n, x) {
const _bjorklund = function (n, x) {
const [ons, offs] = n;
return Math.min(ons, offs) <= 1 ? [n, x] : _bjork(...(ons > offs ? left(n, x) : right(n, x)));
return Math.min(ons, offs) <= 1 ? [n, x] : _bjorklund(...(ons > offs ? left(n, x) : right(n, x)));
};
export const bjork = function (ons, steps) {
export const bjorklund = function (ons, steps) {
const inverted = ons < 0;
ons = Math.abs(ons);
const offs = steps - ons;
const x = Array(ons).fill([1]);
const y = Array(offs).fill([0]);
const result = _bjork([ons, offs], [x, y]);
const p = flatten(result[1][0]).concat(flatten(result[1][1]));
if (inverted) {
return p.map((x) => (x === 0 ? 1 : 0));
}
return p;
const absOns = Math.abs(ons);
const offs = steps - absOns;
const ones = Array(absOns).fill([1]);
const zeros = Array(offs).fill([0]);
const result = _bjorklund([absOns, offs], [ones, zeros]);
const pattern = flatten(result[1][0]).concat(flatten(result[1][1]));
return inverted ? pattern.map((x) => 1 - x) : pattern;
};
/**
* Changes the structure of the pattern to form an euclidean rhythm.
* Euclidian rhythms are rhythms obtained using the greatest common
* Changes the structure of the pattern to form an Euclidean rhythm.
* Euclidean 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
* Toussaint, a Canadian computer scientist. Euclidean 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} pulses the number of onsets/beats
* @param {number} steps the number of steps to fill
* @returns Pattern
* @example
@@ -76,7 +73,7 @@ export const bjork = function (ons, steps) {
* 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} pulses the number of onsets/beats
* @param {number} steps the number of steps to fill
* @param {number} rotation offset in steps
* @returns Pattern
@@ -86,13 +83,13 @@ export const bjork = function (ons, steps) {
*/
/**
* @example // A thirteenth century Persian rhythm called Khafif-e-ramal.
* @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").euclidRot(3,5,2)
* @example // A Ruchenitza rhythm used in a Bulgarian folk-dance.
* @example // A Ruchenitza rhythm used in a Bulgarian folk dance.
* note("c3").euclid(3,7)
* @example // The Cuban tresillo pattern.
* note("c3").euclid(3,8)
@@ -131,7 +128,7 @@ export const bjork = function (ons, steps) {
*/
const _euclidRot = function (pulses, steps, rotation) {
const b = bjork(pulses, steps);
const b = bjorklund(pulses, steps);
if (rotation) {
return rotate(b, -rotation);
}
@@ -142,6 +139,14 @@ export const euclid = register('euclid', function (pulses, steps, pat) {
return pat.struct(_euclidRot(pulses, steps, 0));
});
export const bjork = register('bjork', function (euc, pat) {
if (!Array.isArray(euc)) {
euc = [euc];
}
const [pulses, steps = pulses, rot = 0] = euc;
return pat.struct(_euclidRot(pulses, steps, rot));
});
export const { euclidrot, euclidRot } = register(['euclidrot', 'euclidRot'], function (pulses, steps, rotation, pat) {
return pat.struct(_euclidRot(pulses, steps, rotation));
});
@@ -151,8 +156,10 @@ export const { euclidrot, euclidRot } = register(['euclidrot', 'euclidRot'], fun
* so there will be no gaps.
* @name euclidLegato
* @memberof Pattern
* @param {number} pulses the number of onsets / beats
* @param {number} pulses the number of onsets/beats
* @param {number} steps the number of steps to fill
* @param rotation offset in steps
* @param pat
* @example
* note("c3").euclidLegato(3,8)
*/
@@ -161,13 +168,13 @@ const _euclidLegato = function (pulses, steps, rotation, pat) {
if (pulses < 1) {
return silence;
}
const bin_pat = _euclidRot(pulses, steps, rotation);
const bin_pat = _euclidRot(pulses, steps, 0);
const gapless = bin_pat
.join('')
.split('1')
.slice(1)
.map((s) => [s.length + 1, true]);
return pat.struct(timeCat(...gapless));
return pat.struct(timeCat(...gapless)).late(Fraction(rotation).div(steps));
};
export const euclidLegato = register(['euclidLegato'], function (pulses, steps, pat) {
@@ -180,7 +187,7 @@ export const euclidLegato = register(['euclidLegato'], function (pulses, steps,
* the resulting sequence
* @name euclidLegatoRot
* @memberof Pattern
* @param {number} pulses the number of onsets / beats
* @param {number} pulses the number of onsets/beats
* @param {number} steps the number of steps to fill
* @param {number} rotation offset in steps
* @example
@@ -189,3 +196,26 @@ export const euclidLegato = register(['euclidLegato'], function (pulses, steps,
export const euclidLegatoRot = register(['euclidLegatoRot'], function (pulses, steps, rotation, pat) {
return _euclidLegato(pulses, steps, rotation, pat);
});
/**
* A 'euclid' variant with an additional parameter that morphs the resulting
* rhythm from 0 (no morphing) to 1 (completely 'even'). For example
* `sound("bd").euclidish(3,8,0)` would be the same as
* `sound("bd").euclid(3,8)`, and `sound("bd").euclidish(3,8,1)` would be the
* same as `sound("bd bd bd")`. `sound("bd").euclidish(3,8,0.5)` would have a
* groove somewhere between.
* Inspired by the work of Malcom Braff.
* @name euclidish
* @synonyms eish
* @memberof Pattern
* @param {number} pulses the number of onsets
* @param {number} steps the number of steps to fill
* @param {number} groove exists between the extremes of 0 (straight euclidian) and 1 (straight pulse)
* @example
* sound("hh").euclidish(7,12,sine.slow(8))
* .pan(sine.slow(8))
*/
export const { euclidish, eish } = register(['euclidish', 'eish'], function (pulses, steps, perc, pat) {
const morphed = _morph(bjorklund(pulses, steps), new Array(pulses).fill(1), perc);
return pat.struct(morphed).setSteps(steps);
});
+4 -1
View File
@@ -1,9 +1,11 @@
/*
evaluate.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/evaluate.mjs>
Copyright (C) 2022 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/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/>.
*/
export const strudelScope = {};
export const evalScope = async (...args) => {
const results = await Promise.allSettled(args);
const modules = results.filter((result) => result.status === 'fulfilled').map((r) => r.value);
@@ -18,6 +20,7 @@ export const evalScope = async (...args) => {
modules.forEach((module) => {
Object.entries(module).forEach(([name, value]) => {
globalThis[name] = value;
strudelScope[name] = value;
});
});
return modules;
+3 -1
View File
@@ -1,6 +1,6 @@
/*
fraction.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/fraction.mjs>
Copyright (C) 2022 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/fraction.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/>.
*/
@@ -126,6 +126,8 @@ export const lcm = (...fractions) => {
);
};
export const isFraction = (x) => x instanceof Fraction;
fraction._original = Fraction;
export default fraction;
+3 -8
View File
@@ -1,9 +1,10 @@
/*
hap.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/hap.mjs>
Copyright (C) 2022 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/hap.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 Fraction from './fraction.mjs';
import { stringifyValues } from './util.mjs';
export class Hap {
/*
@@ -148,13 +149,7 @@ export class Hap {
}
showWhole(compact = false) {
return `${this.whole == undefined ? '~' : this.whole.show()}: ${
typeof this.value === 'object'
? compact
? JSON.stringify(this.value).slice(1, -1).replaceAll('"', '').replaceAll(',', ' ')
: JSON.stringify(this.value)
: this.value
}`;
return `${this.whole == undefined ? '~' : this.whole.show()}: ${stringifyValues(this.value, compact)}`;
}
combineContext(b) {
+90
View File
@@ -0,0 +1,90 @@
/*
stateful.mjs - File of shame for stateful, impure and otherwise illegal pattern methods
Copyright (C) 2025 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/index.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 { register, reify, Pattern } from './pattern.mjs';
let timelines = {};
export const reset_state = function () {
reset_timelines();
};
export const reset_timelines = function () {
timelines = {};
};
/***
* Allows you to switch a pattern between different 'timelines'. This is particularly useful when
* live coding, for example when you want to cue a pattern up to play from its start.
*
* Timelines are specified by number, so that if you had a pattern like
* `n("<0 1 2 3>").s("num").timeline(1)` playing, then changed the '1'
* to '2', it would always align '0' to the nearest cycle. You will likely want to trigger
* an evaluation a little bit before the cycle starts, to avoid missing events.
*
* After the first use, a timeline will continue with the same 'offset'. That is, if you change
* a pattern without changing its timeline number, it will stay on that timeline without resetting.
*
* Rather than incrementing a timeline to reset it, it's easier to negate it, e.g. by switching between `-2`
* and `2`. This is because when you negate a timeline it will always reset.
*
* You can also pattern the timeline if you want, to create strange resetting patterns.
* @param {number | Pattern} timeline The timeline that the pattern should play on.
* @example
* n("<0 1 2 3>(3,8)")
* .sound("num")
* // resets the timeline every two cycles, by negating the timeline.
* // in a lot of cases this will be edited by a human live coder
* // rather than patterned!
* .timeline("<2 -2>".slow(2))
*/
export const timeline = register(
'timeline',
function (tpat, pat) {
tpat = reify(tpat);
const f = function (state) {
// Is this called from the scheduler? (rather than from e.g. the visualiser)
const scheduler = !!state.controls.cyclist;
const timehaps = tpat.query(state);
const result = [];
for (const timehap of timehaps) {
const tlid = timehap.value;
let offset;
if (tlid === 0) {
offset = 0;
} else if (tlid in timelines) {
offset = timelines[tlid];
} else {
const timearc = timehap.wholeOrPart();
if (!scheduler || state.span.begin.lt(timearc.midpoint())) {
offset = timearc.begin;
} else {
// Sync to end of timearc if we first see it over halfway into its
// timespan. Allows 'cuing up' next timeline when live coding.
offset = timearc.end;
}
}
if (scheduler) {
// update state
timelines[tlid] = offset;
if (tlid !== 0) {
delete timelines[-tlid];
}
}
const pathaps = pat
.late(offset)
.query(state.setSpan(timehap.part))
.map((h) => h.setContext(h.combineContext(timehap)));
result.push(...pathaps);
}
return result;
};
return new Pattern(f, pat._steps);
},
false,
);
+13 -12
View File
@@ -1,6 +1,6 @@
/*
index.mjs - <short description TODO>
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/index.mjs>
Copyright (C) 2025 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/index.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/>.
*/
@@ -11,20 +11,21 @@ import createClock from './zyklus.mjs';
import { logger } from './logger.mjs';
export { Fraction, controls, createClock };
export * from './controls.mjs';
export * from './hap.mjs';
export * from './pattern.mjs';
export * from './signal.mjs';
export * from './pick.mjs';
export * from './state.mjs';
export * from './timespan.mjs';
export * from './util.mjs';
export * from './speak.mjs';
export * from './evaluate.mjs';
export * from './repl.mjs';
export * from './cyclist.mjs';
export * from './evaluate.mjs';
export * from './hap.mjs';
export * from './impure.mjs';
export * from './logger.mjs';
export * from './time.mjs';
export * from './pattern.mjs';
export * from './pick.mjs';
export * from './repl.mjs';
export * from './signal.mjs';
export * from './speak.mjs';
export * from './state.mjs';
export * from './schedulerState.mjs';
export * from './timespan.mjs';
export * from './ui.mjs';
export * from './util.mjs';
export { default as drawLine } from './drawLine.mjs';
// below won't work with runtime.mjs (json import fails)
/* import * as p from './package.json';
+7
View File
@@ -4,6 +4,13 @@ let debounce = 1000,
lastMessage,
lastTime;
export function errorLogger(e, origin = 'cyclist') {
if (process.env.NODE_ENV === 'development') {
console.error(e);
}
logger(`[${origin}] error: ${e.message}`);
}
export function logger(message, type, data = {}) {
let t = performance.now();
if (lastMessage === message && t - lastTime < debounce) {
+2 -4
View File
@@ -1,6 +1,6 @@
/*
neocyclist.mjs - event scheduler like cyclist, except recieves clock pulses from clockworker in order to sync across multiple instances.
Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/neocyclist.mjs>
Copyright (C) 2022 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/neocyclist.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/>.
*/
@@ -11,7 +11,6 @@ export class NeoCyclist {
constructor({ onTrigger, onToggle, getTime }) {
this.started = false;
this.cps = 0.5;
this.lastTick = 0; // absolute time when last tick (clock callback) happened
this.getTime = getTime; // get absolute time
this.time_at_last_tick_message = 0;
// the clock of the worker and the audio context clock can drift apart over time
@@ -39,8 +38,7 @@ export class NeoCyclist {
if (this.started === false) {
return;
}
const haps = this.pattern.queryArc(begin, end, { _cps: this.cps });
const haps = this.pattern.queryArc(begin, end, { _cps: this.cps, cyclist: 'neocyclist' });
haps.forEach((hap) => {
if (hap.hasOnset()) {
const timeUntilTrigger = cycleToSeconds(hap.whole.begin - this.cycle, this.cps);
+7 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@strudel/core",
"version": "1.2.0",
"version": "1.2.6",
"description": "Port of Tidal Cycles to JavaScript",
"main": "index.mjs",
"type": "module",
@@ -15,7 +15,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/tidalcycles/strudel.git"
"url": "git+https://codeberg.org/uzu/strudel.git"
},
"keywords": [
"tidalcycles",
@@ -27,15 +27,19 @@
"author": "Alex McLean <alex@slab.org> (https://slab.org)",
"license": "AGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/tidalcycles/strudel/issues"
"url": "https://codeberg.org/uzu/strudel/issues"
},
"homepage": "https://strudel.cc",
"dependencies": {
"@kabelsalat/web": "^0.4.1",
"fraction.js": "^5.2.1"
},
"gitHead": "0e26d4e741500f5bae35b023608f062a794905c2",
"devDependencies": {
"vite": "^6.0.11",
"vitest": "^3.0.4"
},
"engines": {
"node": ">=18.0.0"
}
}
+595 -44
View File
@@ -1,11 +1,11 @@
/*
pattern.mjs - Core pattern representation for strudel
Copyright (C) 2025 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/pattern.mjs>
Copyright (C) 2025 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/pattern.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 TimeSpan from './timespan.mjs';
import Fraction, { lcm } from './fraction.mjs';
import Fraction, { isFraction, lcm } from './fraction.mjs';
import Hap from './hap.mjs';
import State from './state.mjs';
import { unionWithObj } from './value.mjs';
@@ -21,9 +21,12 @@ import {
numeralArgs,
parseNumeral,
pairs,
zipWith,
stringifyValues,
} from './util.mjs';
import drawLine from './drawLine.mjs';
import { logger } from './logger.mjs';
import { errorLogger, logger } from './logger.mjs';
import { strudelScope } from './evaluate.mjs';
let stringParser;
@@ -96,10 +99,7 @@ export class Pattern {
// runs func on query state
withState(func) {
return this.withHaps((haps, state) => {
func(state);
return haps;
});
return new Pattern((state) => this.query(func(state)));
}
/**
@@ -415,7 +415,7 @@ export class Pattern {
try {
return this.query(new State(new TimeSpan(begin, end), controls));
} catch (err) {
logger(`[query]: ${err.message}`, 'error');
errorLogger(err, 'query');
return [];
}
}
@@ -575,7 +575,8 @@ export class Pattern {
* Returns a new Pattern, which only returns haps that meet the given test.
* @param {Function} hap_test - a function which returns false for haps to be removed from the pattern
* @returns Pattern
* @noAutocomplete
* @example
* s("bd*8").velocity(rand).filterHaps((h) => (h.whole.begin % 1) < h.value.velocity)
*/
filterHaps(hap_test) {
return new Pattern((state) => this.query(state).filter(hap_test));
@@ -586,7 +587,11 @@ export class Pattern {
* inside haps.
* @param {Function} value_test
* @returns Pattern
* @noAutocomplete
* @example
* const drums = s("bd sd bd sd")
* kick: drums.filterValues((v) => v.s === 'bd').duck(2)
* snare: drums.filterValues((v) => v.s === 'sd')
* bass: s("saw!4").note("G#1").lpf(80).lpenv(4).orbit(2)
*/
filterValues(value_test) {
return new Pattern((state) => this.query(state).filter((hap) => value_test(hap.value))).setSteps(this._steps);
@@ -852,14 +857,29 @@ export class Pattern {
);
}
log(func = (_, hap) => `[hap] ${hap.showWhole(true)}`, getData = (_, hap) => ({ hap })) {
/**
* Writes the content of the current event to the console (visible in the side menu).
* @name log
* @memberof Pattern
* @example
* s("bd sd").log()
*/
log(func = (hap) => `[hap] ${hap.showWhole(true)}`, getData = (hap) => ({ hap })) {
return this.onTrigger((...args) => {
logger(func(...args), undefined, getData(...args));
}, false);
}
logValues(func = id) {
return this.log((_, hap) => func(hap.value));
/**
* A simplified version of `log` which writes all "values" (various configurable parameters)
* within the event to the console (visible in the side menu).
* @name logValues
* @memberof Pattern
* @example
* s("bd sd").gain("0.25 0.5 1").n("2 1 0").logValues()
*/
logValues(func = (value) => `[hap] ${stringifyValues(value, true)}`) {
return this.log((hap) => func(hap.value));
}
//////////////////////////////////////////////////////////////////////
@@ -869,6 +889,31 @@ export class Pattern {
console.log(drawLine(this));
return this;
}
//////////////////////////////////////////////////////////////////////
// methods relating to breaking patterns into subcycles
// Breaks a pattern into a pattern of patterns, according to the structure of the given binary pattern.
unjoin(pieces, func = id) {
return pieces.withHap((hap) =>
hap.withValue((v) => (v ? func(this.ribbon(hap.whole.begin, hap.whole.duration)) : this)),
);
}
/**
* Breaks a pattern into pieces according to the structure of a given pattern.
* True values in the given pattern cause the corresponding subcycle of the
* source pattern to be looped, and for an (optional) given function to be
* applied. False values result in the corresponding part of the source pattern
* to be played unchanged.
* @name into
* @memberof Pattern
* @example
* sound("bd sd ht lt").into("1 0", hurry(2))
*/
into(pieces, func) {
return this.unjoin(pieces, func).innerJoin();
}
}
//////////////////////////////////////////////////////////////////////
@@ -904,12 +949,13 @@ Pattern.prototype.collect = function () {
* note("<[c,eb,g]!2 [c,f,ab] [d,f,ab]>")
* .arpWith(haps => haps[2])
* */
Pattern.prototype.arpWith = function (func) {
return this.collect()
export const arpWith = register('arpWith', (func, pat) => {
return pat
.collect()
.fmap((v) => reify(func(v)))
.innerJoin()
.withHap((h) => new Hap(h.whole, h.part, h.value.value, h.combineContext(h.value)));
};
});
/**
* Selects indices in in stacked notes.
@@ -917,9 +963,11 @@ Pattern.prototype.arpWith = function (func) {
* note("<[c,eb,g]!2 [c,f,ab] [d,f,ab]>")
* .arp("0 [0,2] 1 [0,2]")
* */
Pattern.prototype.arp = function (pat) {
return this.arpWith((haps) => pat.fmap((i) => haps[i % haps.length]));
};
export const arp = register(
'arp',
(indices, pat) => pat.arpWith((haps) => reify(indices).fmap((i) => haps[i % haps.length])),
false,
);
/*
* Takes a time duration followed by one or more patterns, and shifts the given patterns in time, so they are
@@ -954,7 +1002,7 @@ addToPrototype('weaveWith', function (t, ...funcs) {
// compose matrix functions
function _nonArrayObject(x) {
return !Array.isArray(x) && typeof x === 'object';
return !Array.isArray(x) && typeof x === 'object' && !isFraction(x);
}
function _composeOp(a, b, func) {
if (_nonArrayObject(a) || _nonArrayObject(b)) {
@@ -1201,7 +1249,8 @@ export const silence = gap(1);
/* Like silence, but with a 'steps' (relative duration) of 0 */
export const nothing = gap(0);
/** A discrete value that repeats once per cycle.
/**
* A discrete value that repeats once per cycle.
*
* @returns {Pattern}
* @example
@@ -1254,13 +1303,14 @@ export function sequenceP(pats) {
return result;
}
/** The given items are played at the same time at the same length.
/**
* The given items are played at the same time at the same length.
*
* @return {Pattern}
* @synonyms polyrhythm, pr
* @example
* stack("g3", "b3", ["e4", "d4"]).note()
* // "g3,b3,[e4,d4]".note()
* // "g3,b3,[e4 d4]".note()
*
* @example
* // As a chained function:
@@ -1337,11 +1387,11 @@ export function stackBy(by, ...pats) {
.setSteps(steps);
}
/** Concatenation: combines a list of patterns, switching between them successively, one per cycle:
*
* synonyms: `cat`
/**
* Concatenation: combines a list of patterns, switching between them successively, one per cycle.
*
* @return {Pattern}
* @synonyms cat
* @example
* slowcat("e5", "b4", ["d5", "c5"])
*
@@ -1541,9 +1591,15 @@ export const func = curry((a, b) => reify(b).func(a));
/**
* Registers a new pattern method. The method is added to the Pattern class + the standalone function is returned from register.
*
* @param {string} name name of the function
* @param {string | string[]} name name of the function, or an array of names to be used as synonyms
* @param {function} func function with 1 or more params, where last is the current pattern
* @noAutocomplete
* @param {bool} patternify defaults to true; if set to false, you will have more control over the arguments to `func` as they will be
* in their raw form and it will be up to you to patternify them and/or query them for values
* @example
* const vlpf = register('vlpf', (freq, pat) => {
* return pat.fmap((v) => ({...v, cutoff: freq * (v.velocity ?? 1) }));
* })
* s("saw").seg(8).velocity(rand).vlpf(800)
*
*/
export function register(name, func, patternify = true, preserveSteps = false, join = (x) => x.innerJoin()) {
@@ -1628,7 +1684,9 @@ export function register(name, func, patternify = true, preserveSteps = false, j
// toplevel functions get curried as well as patternified
// because pfunc uses spread args, we need to state the arity explicitly!
return curry(pfunc, null, arity);
const curried = curry(pfunc, null, arity);
strudelScope[name] = curried;
return curried;
}
// Like register, but defaults to stepJoin
@@ -1981,6 +2039,7 @@ export const apply = register('apply', function (func, pat) {
/**
* Plays the pattern at the given cycles per minute.
* @deprecated
* @example
* s("<bd sd>,hh*2").cpm(90) // = 90 bpm
*/
@@ -2189,7 +2248,7 @@ export const brak = register('brak', function (pat) {
});
/**
* Reverse all haps in a pattern
* Reverse all cycles in a pattern. See also `revv` for reversing a whole pattern.
*
* @name rev
* @memberof Pattern
@@ -2221,6 +2280,23 @@ export const rev = register(
true,
);
/**
* Reverse a whole pattern. See also `rev` for reversing each cycle.
*
* @name revv
* @memberof Pattern
* @returns Pattern
* @example
* // This is the same as `<[g e] [d c]>`. If `rev()` is used, you get
* // the same as `<[d c] [g e]>`, where each cycle reverses, but the order of
* // cycles stays the same.
* note("<[c d] [e g]>").revv()
*/
export const revv = register('revv', function (pat) {
const negateSpan = (span) => new TimeSpan(Fraction(0).sub(span.end), Fraction(0).sub(span.begin));
return pat.withQuerySpan(negateSpan).withHapSpan(negateSpan);
});
/** Like press, but allows you to specify the amount by which each
* event is shifted. pressBy(0.5) is the same as press, while
* pressBy(1/3) shifts each event by a third of its timespan.
@@ -2351,6 +2427,57 @@ export const stut = register('stut', function (times, feedback, time, pat) {
return pat._echoWith(times, time, (pat, i) => pat.gain(Math.pow(feedback, i)));
});
export const applyN = register('applyN', function (n, func, p) {
let result = p;
for (let i = 0; i < n; i++) {
result = func(result);
}
return result;
});
/**
* The plyWith function repeats each event the given number of times, applying the given function to each event.\n
* @name plyWith
* @synonyms plywith
* @param {number} factor how many times to repeat
* @param {function} func function to apply, given the pattern
* @example
* "<0 [2 4]>"
* .plyWith(4, (p) => p.add(2))
* .scale("C:minor").note()
*/
export const plyWith = register(['plyWith', 'plywith'], function (factor, func, pat) {
const result = pat
.fmap((x) => cat(...listRange(0, factor - 1).map((i) => applyN(i, func, x)))._fast(factor))
.squeezeJoin();
if (__steps) {
result._steps = Fraction(factor).mulmaybe(pat._steps);
}
return result;
});
/**
* The plyForEach function repeats each event the given number of times, applying the given function to each event.
* This version of ply uses the iteration index as an argument to the function, similar to echoWith.
* @name plyForEach
* @synonyms plyforeach
* @param {number} factor how many times to repeat
* @param {function} func function to apply, given the pattern and the iteration index
* @example
* "<0 [2 4]>"
* .plyForEach(4, (p,n) => p.add(n*2))
* .scale("C:minor").note()
*/
export const plyForEach = register(['plyForEach', 'plyforeach'], function (factor, func, pat) {
const result = pat
.fmap((x) => cat(cat(pure(x), ...listRange(1, factor - 1).map((i) => func(pure(x), i))))._fast(factor))
.squeezeJoin();
if (__steps) {
result._steps = Fraction(factor).mulmaybe(pat._steps);
}
return result;
});
/**
* Divides a pattern into a given number of subdivisions, plays the subdivisions in order, but increments the starting subdivision each cycle. The pattern wraps to the first subdivision after the last subdivision is played.
* @name iter
@@ -2441,9 +2568,14 @@ const _chunk = function (n, func, pat, back = false, fast = false) {
return pat.when(binary_pat, func);
};
export const { chunk, slowchunk, slowChunk } = register(['chunk', 'slowchunk', 'slowChunk'], function (n, func, pat) {
return _chunk(n, func, pat, false, false);
});
export const { chunk, slowchunk, slowChunk } = register(
['chunk', 'slowchunk', 'slowChunk'],
function (n, func, pat) {
return _chunk(n, func, pat, false, false);
},
true,
true,
);
/**
* Like `chunk`, but cycles through the parts in reverse order. Known as chunk' in tidalcycles
@@ -2455,9 +2587,14 @@ export const { chunk, slowchunk, slowChunk } = register(['chunk', 'slowchunk', '
* "0 1 2 3".chunkBack(4, x=>x.add(7))
* .scale("A:minor").note()
*/
export const { chunkBack, chunkback } = register(['chunkBack', 'chunkback'], function (n, func, pat) {
return _chunk(n, func, pat, true);
});
export const { chunkBack, chunkback } = register(
['chunkBack', 'chunkback'],
function (n, func, pat) {
return _chunk(n, func, pat, true);
},
true,
true,
);
/**
* Like `chunk`, but the cycles of the source pattern aren't repeated
@@ -2468,11 +2605,47 @@ export const { chunkBack, chunkback } = register(['chunkBack', 'chunkback'], fun
* @returns Pattern
* @example
* "<0 8> 1 2 3 4 5 6 7"
* .fastChunk(4, x => x.color('red')).slow(2)
* .scale("C2:major").note()
* .fastChunk(4, x => x.color('red')).slow(2)
*/
export const { fastchunk, fastChunk } = register(['fastchunk', 'fastChunk'], function (n, func, pat) {
return _chunk(n, func, pat, false, true);
export const { fastchunk, fastChunk } = register(
['fastchunk', 'fastChunk'],
function (n, func, pat) {
return _chunk(n, func, pat, false, true);
},
true,
true,
);
/**
* Like `chunk`, but the function is applied to a looped subcycle of the source pattern.
* @name chunkInto
* @synonyms chunkinto
* @memberof Pattern
* @example
* sound("bd sd ht lt bd - cp lt").chunkInto(4, hurry(2))
* .bank("tr909")
*/
export const { chunkinto, chunkInto } = register(['chunkinto', 'chunkInto'], function (n, func, pat) {
return pat.into(fastcat(true, ...Array(n - 1).fill(false))._iterback(n), func);
});
/**
* Like `chunkInto`, but moves backwards through the chunks.
* @name chunkBackInto
* @synonyms chunkbackinto
* @memberof Pattern
* @example
* sound("bd sd ht lt bd - cp lt").chunkInto(4, hurry(2))
* .bank("tr909")
*/
export const { chunkbackinto, chunkBackInto } = register(['chunkbackinto', 'chunkBackInto'], function (n, func, pat) {
return pat.into(
fastcat(true, ...Array(n - 1).fill(false))
._iter(n)
._early(1),
func,
);
});
// TODO - redefine elsewhere in terms of mask
@@ -2490,7 +2663,7 @@ export const bypass = register(
* Loops the pattern inside an `offset` for `cycles`.
* If you think of the entire span of time in cycles as a ribbon, you can cut a single piece and loop it.
* @name ribbon
* @synonym rib
* @synonyms rib
* @param {number} offset start point of loop in cycles
* @param {number} cycles loop length in cycles
* @example
@@ -2517,8 +2690,13 @@ export const hsl = register('hsl', (h, s, l, pat) => {
/**
* Tags each Hap with an identifier. Good for filtering. The function populates Hap.context.tags (Array).
* @name tag
* @noAutocomplete
* @param {string} tag anything unique
* @example
* s("saw!16").note("F1")
* .lpf(tri.range(40, 80).slow(4)).lpenv(5).lpq(4).lpd(0.15)
* .when(rand.late(0.1).gte(0.5), x => x.transpose("12").tag('altered'))
* .when(rand.late(0.2).gte(0.5), x => x.s("square").tag('altered'))
* .when("<0 1>", x => x.filter((hap) => hap.hasTag('altered')))
*/
Pattern.prototype.tag = function (tag) {
return this.withContext((ctx) => ({ ...ctx, tags: (ctx.tags || []).concat([tag]) }));
@@ -2529,15 +2707,16 @@ Pattern.prototype.tag = function (tag) {
* @name filter
* @param {Function} test function to test Hap
* @example
* s("hh!7 oh").filter(hap => hap.value.s==='hh')
* s("hh!7 oh").filter(hap => hap.value.s === 'hh')
*/
export const filter = register('filter', (test, pat) => pat.withHaps((haps) => haps.filter(test)));
/**
* Filters haps by their begin time
* @name filterWhen
* @noAutocomplete
* @param {Function} test function to test Hap.whole.begin
* @example
* oneCycle: s("bd*4").filterWhen((t) => t < 1)
*/
export const filterWhen = register('filterWhen', (test, pat) => pat.filter((h) => test(h.whole.begin)));
@@ -2704,7 +2883,7 @@ export function stepcat(...timepats) {
if (timepats.length === 0) {
return nothing;
}
const findsteps = (x) => (Array.isArray(x) ? x : [x._steps, x]);
const findsteps = (x) => (Array.isArray(x) ? x : [x._steps ?? 1, x]);
timepats = timepats.map(findsteps);
if (timepats.find((x) => x[0] === undefined)) {
const times = timepats.map((a) => a[0]).filter((x) => x !== undefined);
@@ -2856,6 +3035,24 @@ export const extend = stepRegister('extend', function (factor, pat) {
return pat.fast(factor).expand(factor);
});
/**
* *Experimental*
*
* `replicate` is similar to `fast` in that it increases its density, but it also increases the step count
* accordingly. So `stepcat("a b".replicate(2), "c d")` would be the same as `"a b a b c d"`, whereas
* `stepcat("a b".fast(2), "c d")` would be the same as `"[a b] [a b] c d"`.
*
* TODO: find out how this function differs from extend
* @example
* stepcat(
* sound("bd bd - cp").replicate(2),
* sound("bd - sd -")
* ).pace(8)
*/
export const replicate = stepRegister('replicate', function (factor, pat) {
return pat.repeatCycles(factor).fast(factor).expand(factor);
});
/**
* *Experimental*
*
@@ -3177,6 +3374,25 @@ export const slice = register(
false, // turns off auto-patternification
);
/**
*
* make something happen on event time
* uses browser timeout which is innacurate for audio tasks
* @name onTriggerTime
* @memberof Pattern
* @returns Pattern
* @example
* s("bd!8").onTriggerTime((hap) => {console.log(hap)})
*/
Pattern.prototype.onTriggerTime = function (func) {
return this.onTrigger((hap, currentTime, _cps, targetTime) => {
const diff = targetTime - currentTime;
window.setTimeout(() => {
func(hap);
}, diff * 1000);
}, false);
};
/**
* Works the same as slice, but changes the playback speed of each slice to match the duration of its step.
* @name splice
@@ -3306,3 +3522,338 @@ export const { beat } = register(
['beat'],
__beat((x) => x.innerJoin()),
);
export const _morph = (from, to, by) => {
by = Fraction(by);
const dur = Fraction(1).div(from.length);
const positions = (list) => {
const result = [];
for (const [pos, value] of list.entries()) {
if (value) {
result.push([Fraction(pos).div(list.length), value]);
}
}
return result;
};
const arcs = zipWith(
([posa, valuea], [posb, valueb]) => {
const b = by.mul(posb - posa).add(posa);
const e = b.add(dur);
return new TimeSpan(b, e);
},
positions(from),
positions(to),
);
function query(state) {
const cycle = state.span.begin.sam();
const cycleArc = state.span.cycleArc();
const result = [];
for (const whole of arcs) {
const part = whole.intersection(cycleArc);
if (part !== undefined) {
result.push(
new Hap(
whole.withTime((x) => x.add(cycle)),
part.withTime((x) => x.add(cycle)),
true,
),
);
}
}
return result;
}
return new Pattern(query).splitQueries();
};
/**
* Takes two binary rhythms represented as lists of 1s and 0s, and a number
* between 0 and 1 that morphs between them. The two lists should contain the same
* number of true values.
* @example
* sound("hh").struct(morph([1,0,1,0,1,0,1,0], // straight rhythm
* [1,1,0,1,0,1,0], // wonky rhythm
* 0.25 // creates a slightly wonky rhythm
* )
* )
* @example
* sound("hh").struct(morph("1:0:1:0:1:0:1:0", // straight rhythm
* "1:1:0:1:0:1:0", // wonky rhythm
* sine.slow(8) // slowly morph between the rhythms
* )
* )
*/
export const morph = (frompat, topat, bypat) => {
frompat = reify(frompat);
topat = reify(topat);
bypat = reify(bypat);
return frompat.innerBind((from) => topat.innerBind((to) => bypat.innerBind((by) => _morph(from, to, by))));
};
const _distortWithAlg = function (name) {
const func = function (args, pat) {
const argsPat = reify(args).fmap((v) => (Array.isArray(v) ? [...v, name] : [v, 1, name]));
if (!pat) {
return pure({}).distort(argsPat);
}
return pat.distort(argsPat);
};
Pattern.prototype[name] = function (args) {
return func(args, this);
};
return func;
};
/**
* Soft-clipping distortion
*
* @name soft
* @param {number | Pattern} distortion amount of distortion to apply
* @param {number | Pattern} volume linear postgain of the distortion
*
*/
export const soft = _distortWithAlg('soft');
/**
* Hard-clipping distortion
*
* @name hard
* @param {number | Pattern} distortion amount of distortion to apply
* @param {number | Pattern} volume linear postgain of the distortion
*
*/
export const hard = _distortWithAlg('hard');
/**
* Cubic polynomial distortion
*
* @name cubic
* @param {number | Pattern} distortion amount of distortion to apply
* @param {number | Pattern} volume linear postgain of the distortion
*
*/
export const cubic = _distortWithAlg('cubic');
/**
* Diode-emulating distortion
*
* @name diode
* @param {number | Pattern} distortion amount of distortion to apply
* @param {number | Pattern} volume linear postgain of the distortion
*
*/
export const diode = _distortWithAlg('diode');
/**
* Asymmetrical diode distortion
*
* @name asym
* @param {number | Pattern} distortion amount of distortion to apply
* @param {number | Pattern} volume linear postgain of the distortion
*
*/
export const asym = _distortWithAlg('asym');
/**
* Wavefolding distortion
*
* @name fold
* @param {number | Pattern} distortion amount of distortion to apply
* @param {number | Pattern} volume linear postgain of the distortion
*
*/
export const fold = _distortWithAlg('fold');
/**
* Wavefolding distortion composed with sinusoid
*
* @name sinefold
* @param {number | Pattern} distortion amount of distortion to apply
* @param {number | Pattern} volume linear postgain of the distortion
*
*/
export const sinefold = _distortWithAlg('sinefold');
/**
* Distortion via Chebyshev polynomials
*
* @name chebyshev
* @param {number | Pattern} distortion amount of distortion to apply
* @param {number | Pattern} volume linear postgain of the distortion
*
*/
export const chebyshev = _distortWithAlg('chebyshev');
/**
* Turns a list of patterns into a single pattern which outputs list-values
*
* @name parray
* @returns Pattern
*/
export const parray = (pats) => {
const pack = (...xs) => xs;
let acc = pure(curry(pack, null, pats.length));
for (const p of pats) acc = acc.appBoth(reify(p));
return acc;
};
const _ensureListPattern = (list) => {
if (Array.isArray(list)) {
return parray(list);
}
return reify(list);
};
/**
* Scale the magnitude of the harmonics of one of the core synths ('sine', 'tri', 'saw', ..)
*
* Can also be used to create a new synth via `s('user').partials(...)`
*
* @name partials
* @param {number[] | Pattern} magnitudes List of [0, 1] magnitudes for partials. 0th entry is the fundamental harmonic (i.e. DC offset is skipped)
* @example
* s("user").seg(16).n(irand(8)).scale("A:major")
* .partials([1, 0, 1, 0, 0, 1])
* @example
* s("saw").seg(8).n(irand(12)).scale("G#:minor")
* .partials(binaryL(irand(256).add("1")))
*/
Pattern.prototype.partials = function (list) {
return this.withValue((v) => (l) => ({ ...v, partials: l })).appLeft(_ensureListPattern(list));
};
// Also create a top-level function
export const partials = (list) => {
return _ensureListPattern(list).as('partials');
};
/**
* Rotates the harmonics of one of the core synths ('sine', 'tri', 'saw', 'user', ..) by a list of phases
*
* @name phases
* @param {number[] | Pattern} phases List of [0, 1) phases for partials. 0th entry is the fundamental phase (i.e. DC offset is skipped)
* @example
* // Phase cancellation
* s("saw").seg(8).n(irand(12)).scale("G#1:minor")
* .partials(partials([1, 1, 1]))
* .superimpose(x => x.phases([0.5, 0.5, 0.5]))
*/
Pattern.prototype.phases = function (list) {
return this.withValue((v) => (l) => ({ ...v, phases: l })).appLeft(_ensureListPattern(list));
};
// Also create a top-level function
export const phases = (list) => {
return _ensureListPattern(list).as('phases');
};
/**
* Establishes an FX chain. Can be called by chaining .FX(fx1).FX(fx2)..
* calls and/or in a single .FX(fx1, fx2, ..) call. The fx1, .. are _patterns_ which
* establish the controls of the given effect. See examples.
* @name FX
* @memberof Pattern
* @returns Pattern
* @example
* $: s("[sbd <hh [bd | lt | oh]>]*4").dec(.4)
* .FX(
* phaser(0.5).gain(2),
* bpf(800),
* distort(1.3),
* room(0.2),
* delay(0.5).gain(1.25),
* distort(0.3),
* ).fxr(1.7) // sets release time of effects (like delay)
* @example
* $: s("saw").fm(0.5)
* .delay(0.3) // outer effects are applied *last*
* .FX(coarse(4)) // first coarse
* .FX(lpf(500).lpe(4).lpa(1).lpd(2)) // then lpf
* .FX(distort(1)) // then distort
*/
Pattern.prototype.FX = function (...effects) {
effects = effects.map(reify);
return this.withValue((v) => (vEff) => {
const currFX = v.FX ?? [];
return { ...v, FX: currFX.concat(vEff) };
}).appLeft(parray(effects));
};
const _asArrayPattern = (pats) => {
const pack = (...xs) => xs;
let acc = pure(curry(pack, null, pats.length));
for (const p of pats) acc = acc.appLeft(p);
return acc;
};
/**
* Produces a [Kabelsalat](https://kabel.salat.dev/) modular sound engine.
* This can be used as either an effect (by including `audioin()` at the beginning
* of your kabel expression) or as a sound source (via any expression which doesn't
* start with `audioin()`).
*
* Some helpers you have available to you:
* * Strudel mini notation works fine in K(..) via "" or ``
* * More complex Strudel expressions (like "0 1 2".fast(4) or irand(24)) can be
* written by wrapping them in `S(..)` inside your Kabel code
* * We expose Strudel's note frequency under `sFreq` and Strudel's gate
* information under `sGate`
* * You can use more complex multi-line expressions (like `let x = a; let y = b; x.lpf(y);`)
* by wrapping them inside a function in K (see example).
*
* @name K
* @param {KabelsalatExpression | Function} expr Kabelsalat graph definition
* @memberof Pattern
* @returns Pattern
*
* @example
* note("A c e".fast(4)).transpose("<0 2 4 6 8>")
* .scale("F:minor").transpose("12")
* .s("saw")
* .K(
* // audioin().mul(sGate.adsr(0.001, 0.3, 0, 0.2)) // as effect
* saw(saw(sFreq / "2!3 16").mul(8).add(sFreq).lag("0!3 0.1")).mul(0.3) // as source
* .mul(sGate.adsr(0, 0.15, 0.5, "0.1!3 1"))
* .lpf(sGate.adsr(0, 0.2, 0.3, 0.2).mul(1).add(0))
* .add(x => x.delay(S("0.3 0.2".fast(2))).mul(0.7))
* .add(x => x.delay("0.03 [0.08 0.01] 0.01 0.013").mul(0.77)).mul(0.7)
* .add(x => x.delay(.13).mul(0.7))
* .out()
* )
*
* @example
* n("<0 1 <2 3 2 4>>*16")
* .scale("G#2:minor").sometimes(x => x.transpose("12 | 24"))
* .K(() => {
* const att = S(rand.range(0, 0.05))
* const dec = S(rand.range(0.05, 0.2))
* let f = n(sFreq);
* const mod = sine(f).mul("0.1 | 0.2 | 0.3")
* .add("[[1.5 1] | 1 | 2 | 4 | [6 4@3]]*2")
* saw(f.mul(mod))
* .mul(sGate.ad(att, dec))
* .add(x => x.delay(0.4).mul(0.3))
* .out()
* }).fxr(1).room(0.3)
*/
/**
* Creates a worklet effect. Typically derived by writing K(...) in the REPL which will parse
* Kabelsalat code.
*
* @name worklet
* @param {string} src Source code of the worklet update function
* @param {...number | ...Pattern} inputs Worklet inputs
* @memberof Pattern
* @returns Pattern
* @noAutocomplete
*/
Pattern.prototype.worklet = function (src, ...inputs) {
inputs = inputs.map(reify);
return this.outerBind((v) => {
return _asArrayPattern(inputs).withValue((vInput) => {
const currInputs = v.workletInputs ?? [];
return { ...v, workletSrc: src, workletInputs: currInputs.concat(vInput) };
});
});
};
export const worklet = (...args) => pure({}).worklet(...args);
+2 -3
View File
@@ -1,6 +1,6 @@
/*
pick.mjs - methods that use one pattern to pick events from other patterns.
Copyright (C) 2024 Strudel contributors - see <https://github.com/tidalcycles/strudel/blob/main/packages/core/signal.mjs>
Copyright (C) 2024 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/core/signal.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/>.
*/
@@ -156,8 +156,7 @@ export const pickmodReset = register('pickmodReset', function (lookup, pat) {
return _pick(lookup, pat, true).resetJoin();
});
/**
/** * Picks patterns (or plain values) either from a list (by index) or a lookup table (by name).
/** Picks patterns (or plain values) either from a list (by index) or a lookup table (by name).
* Similar to `pick`, but cycles are squeezed into the target ('inhabited') pattern.
* @name inhabit
* @synonyms pickSqueeze

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