-
Notifications
You must be signed in to change notification settings - Fork 821
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 transposition definition #2211
Conversation
@aviral243 the commit by @walterbender already fixed this issue. So I think there is no need for this PR. The blocks are working perfectly. It is not throwing the transposition error anymore. |
I am getting a bit lost regarding this issue. Which blocks are still having problems with transposition? (My earlier patch should have fixed any issues with Hertz Block.) @Ishakikani9117 Your earlier patch prevented an error from being triggered but did not properly calculate the transposition value. |
@walterbender I'm not completely sure about the blocks, but during testing I found This has been addressed by me in this PR. |
@aviral243 Yeah you are right. But as you said it is not useful for any block. |
@Ishakikani9117 I didn't say it wasn't useful for any block. I said I don't know which block. |
Can you please share a project that is triggering that error? |
@walterbender Yes sure. It is actually the same project I mentioned earlier, created by you for Block API. |
js/blocks/PitchBlocks.js
Outdated
@@ -603,6 +603,11 @@ function _playPitch(args, logo, turtle, blk) { | |||
logo.pushedNote[turtle] = true; | |||
} else if (logo.drumStyle[turtle].length > 0) { | |||
let drumname = last(logo.drumStyle[turtle]); | |||
let transposition = 2 * delta; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure delta is defined either.
But I don't think we need it in this case. Just let transposition = 0 and add in the logo.transposition, it there is any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Fixes issue mentioned in #2207 (comment)