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

fix(slice): support slice 1 _ #1086

Merged
merged 1 commit into from
Jun 9, 2024
Merged

fix(slice): support slice 1 _ #1086

merged 1 commit into from
Jun 9, 2024

Conversation

grddavies
Copy link
Contributor

fixes: #979

Slice was failing on any slice pN of 1. This was because the begin of the next slice was being used to calculate the end of the first. With slice 1 _ all slices begin at 0.0, so end is incorrectly set to 0.0.

This implementation calculates the end control pattern by generating a sample-width pattern, and adding this to the begin pattern.

Two tests are added:

  • slice "can slice samples" - Regression test that passes on dev and this branch
  • slice "can slice by 1" - Test for accurate calculation of sample end time when slicing into 1

@yaxu yaxu merged commit c69162e into tidalcycles:dev Jun 9, 2024
20 of 21 checks passed
@yaxu
Copy link
Member

yaxu commented Jun 9, 2024

Thanks!

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.

slice of 1 doesn't work
2 participants