sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
552 stars 750 forks source link

Better Faux Pickup Support #2645

Open pikurasa opened 3 years ago

pikurasa commented 3 years ago

Music Blocks does not mind unusual pickups of 1/3, but Lilypond does not support this sort of input.

In fact, if you put a pickup of 1/3 in your code, Lilypond export fails.

Uncaught ReferenceError: obj is not defined
    at Notation.notationPickup (notation.js:322)
    at Function.setPickup (MeterActions.js:64)
    at PickupBlock.flow (MeterBlocks.js:792)
    at Logo.runFromBlockNow (logo.js:1603)
    at logo.js:1477

Test File: Faux-Pickup.html.zip

For more information on how we can formulate a "faux pickup" in MB, please see https://github.com/sugarlabs/musicblocks/issues/1086#issuecomment-368234124

kushal-khare-official commented 3 years ago

@pikurasa What should be the expected behavior? What pickup should lilypond not support?

Current Behavior: After a small fix, though saving this file as lilypond shows an error, it still downloads it. Faux-Pickup.pdf Here's the pdf file generated by lilypond

pikurasa commented 3 years ago

After a small fix,

What was your small fix? It seems to involve be deleting the "pickup" block.

though saving this file as lilypond shows an error, it still downloads it. Faux-Pickup.pdf

(I am guessing, but it seems) You deleted the ~.

pikurasa commented 3 years ago

What should be the expected behavior?

The expected behavior is to be able to generate a lilypond file regardless of the values a MB user puts in for their pickup.

Lilypond has no (direct) support for tuplet values (e.g. 3, 5, 7, etc.). Therefore, we would need to finagle our lilypond output to make it work in lilypond.

kushal-khare-official commented 3 years ago

What was your small fix?

I just declared the variable. See this commit

pikurasa commented 3 years ago

I just declared the variable. See this commit

Ok, but it doesn't fix this issue.

kushal-khare-official commented 3 years ago

Lilypond has no (direct) support for tuplet values (e.g. 3, 5, 7, etc.). Therefore, we would need to finagle our lilypond output to make it work in lilypond.

But it did generate a .ly file regardless of the values. Please check if the this fileFaux-Pickup.pdf is as expected. If it is then we only need to make sure that it does not show any error msgs.

pikurasa commented 3 years ago

@kushal-khare-official Do you know what a pickup measure is?

pikurasa commented 3 years ago

Please check if the this fileFaux-Pickup.pdf is as expected.

(No, this is not as expected. This is the second time I have looked at this same file.)

ashutosh887 commented 1 year ago

@walterbender @pikurasa Should I work on it if it's still not resolved? Please assign this issue to me!

walterbender commented 1 year ago

We don't assign issues, but feel free to make a PR.

pikurasa commented 1 year ago

@MohitGupta14 I haven't tested this in a while, so I recommend to test once before starting it. Please use the test file in the original report. Happy to help explain what this means musically speaking.

Shyam-Raghuwanshi commented 8 months ago

@pikurasa can i work on this issue

pikurasa commented 8 months ago

@pikurasa can i work on this issue

Yes, you may (no one need ask permission here). Do you have any questions about the issue itself?