52 Commits

Author SHA1 Message Date
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
Jade (Rose) Rowland
2ee392be9b fixed all the things 2024-01-05 01:00:22 -05:00
Felix Roos
64d80f98db fix: make sure n is never undefined before nanFallback 2023-12-31 16:59:45 +01:00
Felix Roos
3760f51c3c
Merge pull request #871 from daslyfe/bugfix_sample_select
bugfix: sound select indexes out of bounds
2023-12-31 10:06:24 +01:00
Felix Roos
94fcea1040 codeformat 2023-12-30 23:21:34 +01:00
Jade (Rose) Rowland
b5039ecce8 fix import 2023-12-28 10:19:20 -05:00
Felix Roos
99194814a9 move code hashing helpers to core 2023-12-14 10:36:56 +01:00
Felix Roos
f2c16a06a1 fix: note2oct 2023-07-17 23:10:13 +02:00
Felix Roos
58fc786462 noteToMidi: adjustable default octave
+ pull out static objects
2023-07-12 23:32:02 +02:00
Felix Roos
190fe37a9f move solmization logic from midi2note to sol2note 2023-06-11 19:55:24 +02:00
Felix Roos
623661f8d2 Merge remote-tracking branch 'upstream/main' into branch-daria 2023-06-11 19:54:55 +02:00
Felix Roos
7850fb727e fix: allow f for flat notes like tidal 2023-06-11 13:23:45 +02:00
Felix Roos
9971867e2f clamp function 2023-05-28 12:41:53 +02:00
Felix Roos
fc06181217 - add claviature flag to minirepl
- bring back option+dot on macos
- consume more editor settings in minirepl
2023-05-27 13:30:57 +02:00
Daria Cotocu
ccf775e976 Format code 2023-05-24 17:57:05 +01:00
Daria Cotocu
811346e83d Solmization added 2023-05-24 17:24:34 +01:00
Felix Roos
ba35a81e9b - feat: add freq support to gm soundfonts
- refactor: toMidi -> noteToMidi
- refactor: fromMidi -> midiToFreq
2023-03-23 10:18:24 +01:00
Felix Roos
961bbf6f55 Revert "Another attempt at composable functions - WIP (#390)"
This reverts commit cbae3558969ec85c003c90a076ffeff6fa254bd4.
2023-02-27 15:20:49 +01: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
Felix Roos
97cbdc6b0f use jsdoc in autocomplete, still not context aware
+ add noAutocomplete flags
+ add superdirtOnly flags
2023-02-09 12:19:38 +01:00
Felix Roos
d1d9b37ec7 supper notes without octave 2022-12-23 23:01:07 +01:00
Felix Roos
c6d57f6a56 fix non note samples 2022-12-12 20:53:11 +01:00
Felix Roos
09b06da403 fix error message 2022-12-12 20:45:15 +01:00
Felix Roos
df73ce8a60 add freq support to sampler 2022-12-12 20:41:09 +01:00
Alex McLean
4340f024d3
Reorganise pattern.mjs with a 'toplevel first' regime (#286)
'toplevel first' regime
* loopAt has its optional cps parameter removed, with loopAtCps added for supporting that usage.
* rename bitlevel operations e.g. _and -> band

Co-authored-by: Felix Roos <flix91@gmail.com>
2022-12-10 14:39:03 +00:00
Alex McLean
f827201ee0
Switch 'operators' from .whatHow to .what.how, and make sure there are toplevel curried functions for all of them. Rename util.mod to util._mod, to make room for toplevel 'operator' of that name. (#285) 2022-12-07 19:07:55 +00:00
Felix Roos
9717c696d8 add s for sharp (fixes notes example) 2022-11-17 10:16:29 +01:00
Felix Roos
1a1363ef77 scheduler error handling 2022-11-10 22:25:58 +01:00
Felix Roos
0485632e22 Merge remote-tracking branch 'origin/main' into general-purpose-scheduler 2022-11-06 11:06:32 +01:00
Felix Roos
e128b02da1 support object arithmetic 2022-11-01 21:31:39 +01:00
Felix Roos
7e7e299bce Merge remote-tracking branch 'origin/main' into general-purpose-scheduler 2022-10-29 17:56:30 +02:00
MysteryHouse
113adcc5cc
Core util tests (#226)
* Error message formatting, deprecate unused functions
* Add 'test-coverage' script
* Additional test coverage for core util module
* Additional tests for core util module

by @mystery-house
2022-10-20 08:26:28 +01:00
Felix Roos
1cd31cfce9 fix getFrequency for .note 2022-08-17 21:25:04 +02:00
Felix Roos
f2b2f4f226
Merge pull request #183 from tidalcycles/soundfont-file-support
Soundfont file support
2022-08-14 16:04:14 +02:00
Felix Roos
48526824d6 support old way of setting frequencies 2022-08-14 15:51:01 +02:00
Felix Roos
467b3db824 handle objects in getPlayableNoteValue 2022-08-07 21:21:44 +02:00
Felix Roos
8d1c98f03e always throw error for invalid notes 2022-08-06 21:37:41 +02:00
Felix Roos
fd61001b4d getFreq + midi2note helpers 2022-07-28 23:55:17 +02:00
Felix Roos
dd3f4e4751 support "s" as "#" alternative inside note names 2022-06-27 00:03:06 +02:00
alex
f8f744dd87 standardise on hap rather than event, especially in function names 2022-05-05 17:20:36 +01:00
alex
53d82e5126 Prettify 2022-05-02 21:27:02 +01:00
alex
ee514ee8ba redo headers 2022-04-28 14:38:41 +01:00
alex
3742bf384c Remove recursion from mod 2022-04-22 17:01:28 +01:00
Felix Roos
f8739e341b respect midi numbers 2022-04-18 18:57:28 +02:00
Felix Roos
1b35dd0c55 add preliminary getFrequency 2022-04-16 21:34:05 +02:00
alex
544e32e0f8 add 'constant' 2022-04-16 10:02:35 +01:00
alex
9eba883978 move some utilities to utils.mjs 2022-04-13 09:03:31 +01:00