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

Changing beats per bar leads to confusion in the order of the steps #23

Closed
matstc opened this Issue Aug 5, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@matstc
Contributor

matstc commented Aug 5, 2016

I am using dilla to play a song at 4 beats per bar, then to play another song at 3 beats per bar.

The second song does not sound right: the steps do not come in the right order.

I believe this is linked to getClockPositionFromPosition being memoized even though it uses the instance variable _beatsPerBar. Changing the beats per bar won't invalidate the memoization.

Removing the call to memoize for that function fixed it.

How should this be fixed properly? Should getClockPositionFromPosition accept beatsPerBar as a parameter? I'm happy to submit a PR if you can guide me through the proper fix.

@adamrenklint adamrenklint added the bug label Aug 11, 2016

@adamrenklint

This comment has been minimized.

Show comment
Hide comment
@adamrenklint

adamrenklint Aug 11, 2016

Owner

Hey,
yeah, that seems to be exactly the problem, since dilla. getClockPositionFromPosition has a reference to this._beatsPerBar inside it. I'd love to see a PR with the fix proposed fix from you 👍

Owner

adamrenklint commented Aug 11, 2016

Hey,
yeah, that seems to be exactly the problem, since dilla. getClockPositionFromPosition has a reference to this._beatsPerBar inside it. I'd love to see a PR with the fix proposed fix from you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment