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

Perform small math operations in Mercury? #93

Open
tmhglnd opened this issue Jan 7, 2024 · 0 comments
Open

Perform small math operations in Mercury? #93

tmhglnd opened this issue Jan 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tmhglnd
Copy link
Owner

tmhglnd commented Jan 7, 2024

When creating lists it could be useful to just use some simple math to calculate the length that needs to be used instead of having to calculate this on your own. For example when using functions like every or cosine

current situation

list rtm rotate(every(euclid(11 5) 4 12) 36)
list len cosine(96 1 50 500)

new synth sine note(0 2) shape(1 len) play(rtm) time(1/12)

new situation could look something like:

list rtm rotate(every(euclid(11 5) 4*12) 3*12)
list len cosine(8*12 1 50 500)

new synth sine note(0 2) shape(1 len) play(rtm) time(1/12)

Or maybe possible to create a short alias with the already present list functions

list rtm rotate(every(euclid(11 5) *(4 12)) *(3 12))
list len cosine(*(8 12) 1 50 500)

new synth sine note(0 2) shape(1 len) play(rtm) time(1/12)
@tmhglnd tmhglnd added the enhancement New feature or request label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant