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

clip now works like legato in tidal #598

Merged
merged 6 commits into from
Jun 23, 2023
Merged

clip now works like legato in tidal #598

merged 6 commits into from
Jun 23, 2023

Conversation

felixroos
Copy link
Collaborator

@felixroos felixroos commented Jun 12, 2023

  • hap.duration now respects clip value
  • hap.endClipped is now end*clip
  • visualizations show clipped length
  • clip(0) will now be silence

clip so far was only a flag. now it supports floats, making it equivalent to legato in tidal.
i did not touch legato because it would break dozens of existing patterns, as legato currently works without hap.value, so it can be used within a control param function.
in the long run, it should make sense to either refactor old patterns or implement #288 .
with just clip changed, the only breaking change is that clip(0) now brings silence, instead of, as currently, disabling clip.
In practice, clip(0) is not really in use, as it is the default behavior anyway (i haven't found a single use anywhere)

btw shoutout to henk from the workshop for inspiring the idea!

- supports floats
- hap.duration now respects clip value
- hap.endClipped is now end*clip
- visualizations show clipped length
- clip(0) will now be silence
@felixroos
Copy link
Collaborator Author

I have now refactored usages of legato in the examples to clip .. The question is if the old legato should stay as is (illegal time manipulation) or if we should change it to be an alias of clip (like tidal).. Changing it will break a lot of existing patterns, as the current legato can be used on non-object values.
I'd say we merge this now so people won't see any more examples of a thing that might break in the future. We can decide later if we want to do the breaking change or implement #288

ok?

@felixroos
Copy link
Collaborator Author

@yaxu any objections?

@yaxu
Copy link
Member

yaxu commented Jun 23, 2023

Sorry for being slow, looks good!

@felixroos felixroos merged commit 7cfed80 into main Jun 23, 2023
@felixroos felixroos deleted the clip-support-floats branch June 23, 2023 07:55
@yaxu
Copy link
Member

yaxu commented Jun 23, 2023

we should change it to be an alias of clip (like tidal)

actually clip/legato don't seem to be aliased in Tidal yet, will make an issue..

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.

2 participants