sugarlabs / musicblocks

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

Characters confusing Lilypond #1352

Open pikurasa opened 6 years ago

pikurasa commented 6 years ago

When running the lilypond output of "Remix of Galton" (from planet) I find these character combinations:

\! and \<

...which are causing problems.

This zip has the output (MB file is embedded -- it differs from planet version in that I changed repetitions to 5) and my edited file, which works succesfully (I just deleted every instance of \! and \<) Remix of Galton issue and edited file.zip

Ishakikani9117 commented 4 years ago

@pikurasa Can you tell me for what \ ! and \ < used for in the original lilypond output format?

pikurasa commented 4 years ago

The bug is that these characters are meaningless to lilypond, and should not be generated by mb (when outputting to Lilypond)

is-knight commented 4 years ago

@pikurasa I think \< is used to start a crescendo in lilypond and \! to terminate that.. Should we remove the part of the code that generates this characters?

is-knight commented 4 years ago

@pikurasa When I converted the two files recieved via the above link..This is what I am getting. For the edited file: lil2 For the unedited file: lil1 The only difference I see is those crescendo symbols below certain notes.I don't know how to read sheet music so please correct me if I am wrong. Also the difference between the text files generated during the conversion was that the unedited version contained a warning written "Unattached crescendo event" but at the end it got converted successfully. I am not getting problem here. It may be possible that I am not understanding the problem properly so please guide me if required..

pikurasa commented 4 years ago

@is-knight You may have found the source of the issue. Your diagnosis seems entirely plausible.

I will check again later to verify.

walterbender commented 1 year ago

I think we bumped into this issue in a different way before. I don't think Lilypond is happy if you start with a crescendo before adding any notes. Sort of makes sense... crescendo is a change but if there were never any prior notes, it becomes a change from nothing.

Emilance commented 1 year ago

I think the issue here is the wrong lillypond crescendo syntax generated by MB, the starting syntax for crescendo \< and descendo \> should be after the first Note and be closed by \! after the last note

Here is a sample that shows MB is generating the opening tag \< before the first note in the interval

wrong

the correct syntax

correct

walterbender commented 1 year ago

I stand by my previous comment 😛

pikurasa commented 1 year ago

I think we bumped into this issue in a different way before. I don't think Lilypond is happy if you start with a crescendo before adding any notes. Sort of makes sense... crescendo is a change but if there were never any prior notes, it becomes a change from nothing.

Well, I just tried the following test:

At the beginning of the music part of the code (after \meter), changing \< des''16 to des''16 \<, and it was able to compile without any errors.

So, that supports @walterbender's theory.

If that's the case, is the solution to move \<after the first note?

When I first wrote this issue up, I didn't know that those had any meaning...