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

Merged
merged 4 commits into from
Jan 29, 2025
Merged

add "as" function + getControlName #1247

merged 4 commits into from
Jan 29, 2025

Conversation

felixroos
Copy link
Collaborator

@felixroos felixroos commented Jan 18, 2025

adds as function:

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

fixes #595

  • add doc

@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'..

@felixroos felixroos added the v1.2 label Jan 24, 2025
@felixroos
Copy link
Collaborator Author

any objections against merging this as is? making it work with more than controls surely is interesting but i guess that'd would require more brain power / effort / time to get it working. it would probably not produce a breaking change then

@yaxu
Copy link
Member

yaxu commented Jan 24, 2025

Yes agreed it can be built on later so lets merge!

@felixroos felixroos merged commit dbbe2d7 into main Jan 29, 2025
2 checks passed
@felixroos felixroos deleted the get-control branch January 29, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"as" function
2 participants