Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing mini notation features #30

Open
13 of 14 tasks
felixroos opened this issue Apr 9, 2022 · 12 comments
Open
13 of 14 tasks

add missing mini notation features #30

felixroos opened this issue Apr 9, 2022 · 12 comments
Labels
compatibility Mainline Tidal Compatibility
Milestone

Comments

@felixroos
Copy link
Collaborator

felixroos commented Apr 9, 2022

Compared to mainline tidal, the following features are missing from the mini notation:

For most of them to actually work, the corresponding functions need to be implemented in core.

@felixroos
Copy link
Collaborator Author

correlates with #31

@eilseq
Copy link

eilseq commented Apr 12, 2022

Tie PR #47

@eilseq
Copy link

eilseq commented Apr 12, 2022

Feet Marking PR #49

@felixroos
Copy link
Collaborator Author

related #72

@felixroos felixroos added the compatibility Mainline Tidal Compatibility label Apr 24, 2022
@bpow
Copy link
Contributor

bpow commented Aug 6, 2022

Related #165 for random choice and random removal.

@bpow
Copy link
Contributor

bpow commented Aug 6, 2022

Are the various "word-like" operators towards the bottom part of the krill.pegjs file desired?

Because PEG parsers don't perform backtracking, I think if you were to pass something to the parser like mini('slow 2 $ "a b"') that "slow" and "2" both end up being recognized as "slices" (because slices match before the individual command operators) and then the parser gets to the '$' and doesn't know what to do.

My thoughts are that we might not even need these forms of things (since it seems a bit too much like making a little mini-haskell and people wanting to have the additional complexity of many of these functions would just call them in javascript). If that's the overall preference, then that part of the grammar could be cleaned up to reduce future maintenance burden. On the other hand, if there seems to be utility in having them, then I could take a look into reworking the pegjs file so those structures actually get parsed.

@felixroos
Copy link
Collaborator Author

Ah this stuff at the end is not really used at the moment, as mini will wrap everything it gets into double quotes. It can be used with the h function but not much work has gone into that part. The grammar originated from the krill project, where this sort of mini haskell was used, while strudel only uses the mini notation part so far.

I would find it interesting to have a more tidal like way of writing patterns, as an alternative to js, but as you said, the grammar would need some work to properly do that. I am not sure if we need to throw it out, as it might be the starting point for some explorations in the future, though we could mark it as experimental / not maintained or similar. On the other hand, it might be obfuscating the actual grammar that is in use..

I'd say it's up to you if you want to explore this region or not :)

@bpow
Copy link
Contributor

bpow commented Aug 7, 2022

Ahh... those do indeed get parsed properly. I hadn't noticed the behavior of mini to wrap with double quotes, and the haskell-like operators do get properly recognized when outside double quotes and using h instead. So it makes sense to leave that part of the grammar intact.

@eilseq eilseq removed their assignment Sep 8, 2022
@felixroos
Copy link
Collaborator Author

ref #562

@felixroos
Copy link
Collaborator Author

just found out that you can do <bd hh, ht lt mt> in tidal. this is not possible with the mini parser atm

@yaxu
Copy link
Member

yaxu commented Oct 1, 2023

Tidal has [0 .. 3] as shorthand for 0 1 2 3. [0, 0.5 .. 2] might also be nice for 0 0.5 1 1.5 2 but tricky when , is already taken.
In tidal it has to be in its own subsequence, "0 .. 3" and "[0 .. 3] 4" are ok, "0 .. 3 4" and "[0 .. 3 4]" are syntax errors. <0 .. 4> works but (surprisingly) is the same as [0 .. 4]. These edge cases are probably bugs to fix though.

@yaxu
Copy link
Member

yaxu commented Oct 1, 2023

It could work like this:
https://strudel.tidalcycles.org/?x8seM6I-aCwL

@yaxu yaxu added this to the 1.0 milestone Jan 11, 2024
yaxu added a commit that referenced this issue Jan 13, 2024
yaxu added a commit that referenced this issue Jan 19, 2024
- `.` feet now work, e.g. `"a b c . d e . f"` is the same as `"[a b c] [d e] [f]"`
- `_` elongation now works, e.g. `"a _ _ b"` is the same as `"a@3 b"` (`"a @ @ b"` also works, like in tidal)
- standalone `!` now works, e.g. `"a ! ! b"` is the same as `"a!3 b"`

Reworks #47 and #49
Ref #30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Mainline Tidal Compatibility
Projects
None yet
Development

No branches or pull requests

4 participants