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

Mini-notation for fraction shorthands #65

Open
Tracked by #30
yaxu opened this issue Apr 13, 2022 · 5 comments · May be fixed by #793
Open
Tracked by #30

Mini-notation for fraction shorthands #65

yaxu opened this issue Apr 13, 2022 · 5 comments · May be fixed by #793
Labels
compatibility Mainline Tidal Compatibility

Comments

@yaxu
Copy link
Member

yaxu commented Apr 13, 2022

The tidal mininotation has these shorthands for fractions:

'w' 1
'h' 0.5
'q' 0.25
'e' 0.125
's' 0.0625
't' (1/3)
'f' 0.2
'x' (1/6)

It allows a prefix factor, e.g. 5s is parsed as 5/16ths, 2t as 2/3rds etc.

e on its own would be 1/8th, unlike for notes where it would be parsed as the note label for 4.. I.e. notes are parsed differently from other numbers.

Explicit ratios can be given with %, e.g. 3%7 would parse to 3/7. (/ can't be used as that's taken by 'slowing down' steps).

Part of #30.

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

this is potentially blocked by #483

@felixroos felixroos linked a pull request Nov 7, 2023 that will close this issue
@felixroos
Copy link
Collaborator

one way to implement this: #793

@yaxu how to find out which params of which functions in tidal get parsed as fraction shorthands?

@yaxu
Copy link
Member Author

yaxu commented Nov 7, 2023

@felixroos note and n (and up, which is now an alias of note) are the only ones parsed as notes, so fraction shorthands work for everything else.

@yaxu
Copy link
Member Author

yaxu commented Jan 11, 2024

Now I've worked out how to type ⅓ and ⅜ on my keyboard (super/windows key followed by the numerator and denominator), I'm thinking it could be nice to support those in the mininotation.

These are the available fractions in ascii: ½ ⅓ ⅔ ¼ ¾ ⅕ ⅖ ⅗ ⅘ ⅙ ⅛ ⅜ ⅝ ⅞

There's more in unicode, but without editor features, they're harder to type.. You can also construct them like ¹³¹⁄₁₂₄

@yaxu
Copy link
Member Author

yaxu commented Sep 28, 2024

I guess the problem with #793 is that without type inference, things like .off("t s".div("2"), ...) are tricky

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

Successfully merging a pull request may close this issue.

2 participants