190 Commits

Author SHA1 Message Date
Felix Roos
2857e816d2 add Pattern.id + use it for _punchcard and _spiral 2024-03-23 12:06:31 +01:00
Alex McLean
29cb6195b3
Fix pure mini highlight (#994)
* preserve locations for pure values via mininotation

* preserve weight
2024-03-18 10:37:55 +00:00
Alex McLean
398533877c
Beat-oriented functionality (#976)
* annotate pure values with their value, allowing single mininotation values to maintain their labels as pure
* Don't use any 'patternified' arguments if they're all 'pure'
* allow pattern weights (roughly, beats-per-cycle) to be inferred where possible, including from mininotation and across many transformations (e.g. `fast` with a 'pure' factor)
* Add `beatCat`, similar to `timeCat` but funkier
* `silence` has a weight of 1, add alternative `nothing` with a weight of 0, and `gap` function with weight argument
* preserve weight across applicative operations (weight comes with the structure)
* add `stack` alternatives that take advantage of pattern weights to align patterns differently - `stackLeft`, `stackRight`, `stackCentre`, `stackExpand`, with `stackBy` with an argument for patterning the alignment.
2024-03-16 17:24:37 +00:00
Felix Roos
1d92ee76b9 make velocity a regular value prop 2024-03-01 18:00:34 +01:00
Felix Roos
bf343eb499 simplify _composeOp 2024-03-01 00:32:45 +01:00
Felix Roos
eb93a6c149 refactor: duration is now a regular control 2024-02-29 04:05:05 +01:00
Felix Roos
5c71bb95a0 remove legacy legato
+ make legato a synonym of clip
2024-02-28 18:51:07 +01:00
Felix Roos
bf63b716af refactor: remove await before samples calls in docs etc..
+ remove /master from dirt-samples calls (there is now a main branch)
+ remove /main endings from some places
2024-02-21 10:17:45 +01:00
Alex McLean
6422047cff
make 0.5hz cps the default (#931)
* 0.5 default cps

* 1 -> 0.5 cps defaults

* start moving examples to 2Hz

* more 2Hz doc edits

* small tweaks

* format

* adapt cycles page

* adapt pitch page

* tonal page

* accumulation

* synth page

* adapt conditional-modifiers

* audio effects page

* adapt signals doc

* fix: errors for signals

* adapt signals page

* start time modifiers

* adapt time modifiers

* adapt factories

* hydra + pattern intro

* adapt mini notation page

* start recipes

* adapt recipes page

* use code_v1 table

* delete old dbdump + add new csv based tool

* fix: tests

* fix: cpm

* shuffle featured patterns

* fix: snapshot

---------

Co-authored-by: Felix Roos <flix91@gmail.com>
2024-01-22 19:02:34 +00:00
Felix Roos
0a82471112 implement loopAt with pat state 2024-01-21 00:45:40 +01:00
Felix Roos
8052e10f0c implement fit with pat state 2024-01-21 00:39:26 +01:00
Alex McLean
738cea0025
Make splice cps-aware (#932)
* make splice cps-aware

* format

* copypaste fix
2024-01-20 22:47:31 +00:00
Alex McLean
98b7859605
pick, pickmod, inhabit, inhabitmod (#921)
* the args for `pick` are now reversed as standard (old behaviour still supported to avoid breaking change)
* `pick` is also now a pattern method
* `pick` now also accepts a lookup table for pick-by-name as an alternative to pick-by-index from a list
* `inhabit` added with same behaviour as `pick`, except cycles from source patterns are squeezed into events of inhabited patterns
* Also some general doc tidying, sorry for the noise..
* There is also `pickmod` and `inhabitmod`, for wrapping indexes around rather than clamping them
2024-01-18 17:08:29 +00:00
Alex McLean
a8db707440
Revert "pick now accepts lookup tables, with alternate cycle squeezing behaviour as new inhabit function" (#920) 2024-01-18 17:04:26 +00:00
Alex McLean
873a412179
pick now accepts lookup tables, with alternate cycle squeezing behaviour as new inhabit function (#918)
- the args for `pick` are now reversed (breaking change!)
- `pick` is also now a method on the inhabited pattern
- `pick` now also accepts a lookup table
- `inhabit` added with same behaviour as `pick`, except cycles from source patterns are squeezed into events of inhabited patterns
- Also some general doc tidying, sorry for the noise..
- There is now also `pickmod` and `inhabitmod`, for wrapping indexes around rather than clamping them
2024-01-18 16:45:39 +00:00
Felix Roos
96bafa7f0b the big rename: @strudel.cycles/* -> @strudel/* 2024-01-18 09:54:37 +01:00
Bernhard Wagner
1bca05e349
FIXES: palindrome abc -> abccba (#831)
* FIXES: palindrome abc -> abccba

* FIXES: tests for palindrome

---------

Co-authored-by: Bernhard Wagner <gitcommit@nosuch.biz>
2023-12-05 10:15:13 +00:00
Felix Roos
049aa35286 hsl + hsla functions 2023-11-18 21:15:52 +01:00
Felix Roos
a4487179a5 fix tests 2023-11-16 07:25:20 +01:00
Felix Roos
f43f627037 + add hush
+ add the ability to evaluate without clearing
2023-11-16 07:17:59 +01:00
Felix Roos
9dbd073073
Merge pull request #784 from ilesinge/document_pianoroll
Document pianoroll
2023-11-09 08:46:03 +01:00
Alexandre G.-Raymond
f045fb44de
Add color function documentation 2023-11-05 16:23:36 +01:00
Felix Roos
8c5837e78a add xfade + docs 2023-11-05 12:11:17 +01:00
Alex McLean
9ceab0f294
Fix chunk, add fastChunk and repeatCycles (#712)
* Match behaviour of chunk with tidal, add fastChunk for old strudel behaviour. Also adds repeatCycles. fixes #689

* documentation
2023-11-01 21:22:33 +00:00
Alexandre G.-Raymond
1e1d5ef442
Document striate function 2023-10-28 11:47:37 +02:00
Felix Roos
30cba7b935 Merge branch 'main' into midi-in 2023-09-17 17:26:42 +02:00
Felix Roos
b98e24fabf docs: fit + splice 2023-09-17 08:02:02 +02:00
Felix Roos
0f72729f0d midi cc input poc 2023-09-14 09:36:06 +02:00
Felix Roos
7a999de602 fix: always run previous trigger
+ make dominantTrigger more dominant
2023-08-11 00:04:09 +02:00
Felix Roos
2d08b31f9a fix: tests 2023-07-08 16:14:25 +02:00
Felix Roos
27643f4a48 doc: slice 2023-07-08 16:12:21 +02:00
Felix Roos
fe6d99d4f1 slice array notation 2023-07-07 21:48:19 +02:00
Felix Roos
66f8ca72c1 refactor: remove old location methods
docs: update repl chapter to reflect new transpiler behavior
2023-07-04 22:13:40 +02:00
Felix Roos
0b5d905120 fix: adaptive highlighting
- transpiler now uses m function with globalOffset
- patternifyAST now accepts global offset
- patternifyAST now calls .withLoc with global leaf location
- .withLoc replaces .withLocation + .withMiniLocation
- simple locs (offsets) are now used everywhere
- some tests fail, seems some haps have reordered...
- wip: Repl still uses hardcoded updateMiniLocations
- todo: find way to call updateMiniLocations dynamically
2023-07-03 05:15:32 +02:00
Felix Roos
d126c28b85 fix: loopAt with cps 1 for fallback 2023-06-28 22:25:49 +02:00
Felix Roos
c1649b9dc0 - fix: loopAt for non default cps value
- add fay to repitch samples to fit hap duration
- add setcpm function
2023-06-28 22:13:05 +02:00
Felix Roos
92da70a7ae Merge remote-tracking branch 'origin/main' into clip-support-floats 2023-06-15 10:46:10 +02:00
Felix Roos
09b14a5702 add ratio function 2023-06-14 23:19:04 +02:00
Felix Roos
260b831815 refactor: legato -> clip 2023-06-14 00:22:55 +02:00
Felix Roos
9b3122837e fix: division by zero 2023-06-11 13:15:52 +02:00
Bernhard Wagner
1458ee64ec FIXES: alias pm for polymeter 2023-03-21 21:20:57 +01:00
Bernhard Wagner
fffd3c07ca FIXES: alias pm for polymeter
(return statement was missing)
2023-03-18 22:12:12 +01:00
Felix Roos
487ccb90a1 add arrange function 2023-03-03 20:17:23 +01:00
Alex McLean
2d5064bd5b
Reinstate slice and splice (#500)
Reinstate slice/splice, fixing up "unit" param using new global cps
2023-03-02 14:44:41 +00:00
Felix Roos
961bbf6f55 Revert "Another attempt at composable functions - WIP (#390)"
This reverts commit cbae3558969ec85c003c90a076ffeff6fa254bd4.
2023-02-27 15:20:49 +01:00
Felix Roos
49234183a3 Merge remote-tracking branch 'origin/main' into fix-array-args 2023-02-25 14:13:55 +01:00
Felix Roos
ed7763df92 fix: reify after sequence to preserve array
ref https://github.com/tidalcycles/strudel/issues/383#issuecomment-1399514090
2023-02-25 14:13:39 +01:00
Alex McLean
7c367eb1e8
slice and splice (#466)
Implements `slice` and `splice` from tidal, intended for beat slicing
2023-02-22 11:51:31 +00:00
Alex McLean
fdb76867a7
weave and weaveWith (#465)
Added weave and weaveWith from tidal
2023-02-18 00:00:18 +00:00
Alex McLean
cbae355896
Another attempt at composable functions - WIP (#390)
Summary of changes:

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

Other minor changes:

- standardised alignment 'squeezeOut' as lowercase 'squeezeout'
- made firstCycleValues turn haps sorted in order of 'part'
2023-02-16 23:15:21 +00:00