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

sparseq ticks timed at at loop edges not included in the loop #63

Open
bthj opened this issue Jan 30, 2025 · 2 comments
Open

sparseq ticks timed at at loop edges not included in the loop #63

bthj opened this issue Jan 30, 2025 · 2 comments

Comments

@bthj
Copy link

bthj commented Jan 30, 2025

If el.sparseq includes seq elements with tickTime set to the loop start or end points, then those are not included in the loop sequence, while elements with tickTimes that fall within the loop edges are included.

This loops:

    return el.sample(
      {path: 'synth:0'},
      el.sparseq({
        seq: [
          { value: 1, tickTime: 1 },
        ],
        loop: [0, 500]
      }, 
      el.train(100), 
      0),
      1,
    )

while this does not:

    return el.sample(
      {path: 'synth:0'},
      el.sparseq({
        seq: [
          { value: 1, tickTime: 0 },
        ],
        loop: [0, 500]
      }, 
      el.train(100), 
      0),
      1,
    )
@bthj
Copy link
Author

bthj commented Jan 30, 2025

Just after submitting this issue, I see that the issue is solved on the playground at the above links.

But I noticed this in @elemaudio/web-renderer 4.0.3 and temporarily added a workaround in a thing I was trying.

@nick-thompson
Copy link
Contributor

Thanks for filing! I see the issue in the playground links and it seems to reproduce in 4.0.3 for me as well. I suspect there's an off-by-one in the sparseq code. I will look to get a fix in asap!

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

No branches or pull requests

2 participants