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 "as" function + getControlName #1247

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

add "as" function + getControlName #1247

wants to merge 2 commits into from

Conversation

felixroos
Copy link
Collaborator

adds as function:

"c:.5 a:1 f:.25 e:.8".as("note:clip")

fixes #595

@yaxu
Copy link
Member

yaxu commented Jan 18, 2025

Would it be possible to also support "c:.5 a:1 f:.25 e:.8".as(note, clip) ?

@felixroos
Copy link
Collaborator Author

Would it be possible to also support "c:.5 a:1 f:.25 e:.8".as(note, clip) ?

it might work if we say that multiarg is interpreted as a list of functions.. but not sure what a use case would be.

@yaxu
Copy link
Member

yaxu commented Jan 18, 2025

.. and a bit wackier, but following that thought, howabout s("bd sd").apply("4 5".as("<fast hurry>")) or s("bd sd").as("<fast hurry>", "4 5")

@felixroos
Copy link
Collaborator Author

.. and a bit wackier, but following that thought, howabout s("bd sd").apply("4 5".as("<fast hurry>")) or s("bd sd").as("<fast hurry>", "4 5")

hm yeah that wouldn't work, as it's only for controls, but i see the appeal..

@yaxu
Copy link
Member

yaxu commented Jan 18, 2025

it might work if we say that multiarg is interpreted as a list of functions.. but not sure what a use case would be.

Yep I was thinking these would be called as methods, but true they need to call toplevel functions which is harder to implement.

@yaxu
Copy link
Member

yaxu commented Jan 18, 2025

hm yeah that wouldn't work, as it's only for controls, but i see the appeal..

I guess it could be implemented as a string of method calls to give some experimental behaviour for 'free'..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"as" function
2 participants