s-d-m / lilydumper

makes a lilypond piano music sheet readable by lilyplayer
MIT License
2 stars 1 forks source link

error: syntax error, unexpected EVENT_IDENTIFIER #1

Open achillis2 opened 4 years ago

achillis2 commented 4 years ago

I was trying to generate a bin file for lilyplayer to use. I successfully compiled the .ly file in my lilypond. Then I ran the command below but got the error. I understand lilydumper uses lilypond to compile the .ly file. But I've compiled the file successfully in lilypond. Why do I still get this error?

./lilydumper -o a.bin -i chopin_nocturne_op9_n3.ly

Error message:

/usr/share/lilypond/2.18.2/ly/spanners-init.ly:104:17: error: GUILE signaled an error for the expression beginning here sostenutoOff = # (make-span-event 'SostenutoEvent STOP) Unbound variable: name /home/ding/Downloads/chopin_nocturne_op9_n3.ly:258:8: error: syntax error, unexpected EVENT_IDENTIFIER cis8[ \trill r16 b( cis8] dis8)[ r16 cis( dis8] | /home/ding/Downloads/chopin_nocturne_op9_n3.ly:330:29: error: not an articulation \stemUp 8*1/2^ ([

achillis2 commented 4 years ago

The .ly file can be downloaded at the link below. Thanks

https://www.mutopiaproject.org/ftp/ChopinFF/O9/chopin_nocturne_op9_n3/chopin_nocturne_op9_n3.ly

s-d-m commented 4 years ago

Hi @achillis2

The issue reported comes from the version of lilypond that is used. I made my software against the dev branch of lilypond (2.19) and ubuntu still packages 2.18. However I tried to generate the .bin file on my machine using my locally compiled good lilypond version and there are issues here anyway. I fixed one, but there is at least another one preventing the file generation. I'll see if I can fix it, but I don't want to invest too much time as I consider this software as abandonware now. (I moved to other things).

Also there are a lot of "corner" cases that are not handled such that even when it does generate a bin file without errors, the bin file is wrong. One such case is about playing staccato for example. The software plays these notes as if it is a normal note.

I'll keep on updated if I manage to quickly fix the other issues with that file

achillis2 commented 4 years ago

Please don’t abundon lilyplayer and lilydumper. I would be very happy to maintain them but they are beyond my technical capability...

On Fri, Jan 3, 2020 at 17:15 Sam notifications@github.com wrote:

Hi @achillis2 https://github.com/achillis2

The issue reported comes from the version of lilypond that is used. I made my software against the dev branch of lilypond (2.19) and ubuntu still packages 2.18. However I tried to generate the .bin file on my machine using my locally compiled good lilypond version and there are issues here anyway. I fixed one, but there is at least another one preventing the file generation. I'll see if I can fix it, but I don't want to invest too much time as I consider this software as abandonware now. (I moved to other things).

Also there are a lot of "corner" cases that are not handled such that even when it does generate a bin file without errors, the bin file is wrong. One such case is about playing staccato for example. The software plays these notes as if it is a normal note.

I'll keep on updated if I manage to quickly fix the other issues with that file

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/s-d-m/lilydumper/issues/1?email_source=notifications&email_token=ACVALHFXZ5AAHMEO3KMOTA3Q37BIPA5CNFSM4KCSIUXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICJO2I#issuecomment-570726249, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVALHEDO3EZNRR3ISPK47LQ37BIPANCNFSM4KCSIUXA .

s-d-m commented 4 years ago

I looked at the next issue, and apparently lilypond does not generate the same svg files as the last time I was working on this, thus breaking my program. I can fix that but honestly, ... I'm not very motivated as I don't want to spend more time on this. From the design I chose, This software will always break as soon as lilypond changes how they generate their svg files (and other things too) and thus requires constant maintenance.

If you can find someone willing to maintain this, I can explain all that is needed.

achillis2 commented 4 years ago

Do you remember which lilypond version you used to generate those premade bin files? If I use the same version lilypond, I should be able to make those bin files, right? The .ly files shouldn't change if my understanding is correct. The lilydumper was developed 2 years ago. I checked lilypond update history, see below. It must be one of them, correct?

23 months ago release/2.19.81-1   tag \  commit \  shortlog \  log
2 years ago release/2.19.80-1   tag | commit | shortlog | log
2 years ago release/2.19.65-1   tag | commit | shortlog | log
2 years ago release/2.19.64-1   tag | commit | shortlog | log
2 years ago release/2.19.63-1   tag | commit | shortlog | log
2 years ago release/2.19.62-1   tag | commit | shortlog | log
2 years ago release/2.19.61-1   tag | commit | shortlog | log
2 years ago release/2.19.60-1   tag | commit | shortlog | log
2 years ago release/2.19.59-1   tag | commit | shortlog | log
2 years ago release/2.19.58-1   tag | commit | shortlog | log
2 years ago release/2.19.57-1   tag | commit | shortlog | log
2 years ago release/2.19.56-1   tag | commit | shortlog | log
2 years ago release/2.19.55-1   tag | commit | shortlog | log
3 years ago release/2.19.54-1   tag | commit | shortlog | log
s-d-m commented 4 years ago

Hi Achilis,

I tried using the same version I was using 2 years ago, which is version at commit faa73e45e2049ea74fc8e0405b64cc5854e747e7 (betwen 2.19.61-1and 2.19.62-1).

One thing about that is that I had to compile lilypond against guile 1.8 as guile 2.0 were bringing issues. I haven't tried with guile 2.2 (wasn't released at the time).

The current issue about generating the bin for your chopin music sheet is due to how lilydumper works. It calls lilypond three times with different parameters such that it can extract useful data e.g. where are the notes on the music sheet to draw a cursor over. The issue now is that some data that used to be outputted isn't anymore. That's nothing I can't fix, but I'm not willing to spend too much time on this anymore. From how lilydumper works, it requires too much maintenance if I don't embed a specific lilypond version in it. And I'm not sure I can do that for legal reasons.

Are you only interested in this piece of music from Chopin, or do you want any music sheet to work? When I worked on that, I downloaded the 600 or so piano music sheet from I think mutopia (or imslp) and the 300 pieces I provided here are the ones for which there was no issues. For the other ones they contained something lilydumper didn't handle (e.g. arpeggios) and I was past the point of continuing working on it. If you are only interested in this Chopin, I should be able to hack something to make lilydumper happy without spending time actually fixing the issue

Unless you can convince the lilypond project about the usefulness of something like lilyplayer (and honestly I doubt they will want it as their project has a quite different goal), or get someone (maybe student projects) to keep this working, I believe you can consider lilydumper/lilyplayer as dead I'm afraid.

achillis2 commented 4 years ago

I successfully generated the bin file with a simple .ly file (twinkle twinkle little star). So Lilydumper is working for at least some pieces. Probably there are something complex in the Chopin sheet note which lilydumper couldn't recognize (or lilypond doesn't output the useful info for lilydumper). I'm not interested in this particular Chopin. I need something which can help me and my daughter to learn the piano quickly. I'm just trying to figure out how to play the piano with both hands with the sheet note. The sheet note reading take years to develop. I need something to speed up the process, something similar to https://www.youtube.com/watch?v=-GVhwLXGpH8. Lilyplayer and lilydumper are the only ones I found. I know lilydumper is probably not perfect but it's working and the only working ones based on my research in the last several days. They are exactly what I need. I was thinking to add finger number on the piano keys if possible. But unfortunately they are dead... Are you aware of any product in the open source world similar to lilyplayer and lilydumper?

s-d-m commented 4 years ago

Lilydumper is working for at least some pieces

You can grab a few at https://github.com/s-d-m/precompiled_music_sheets_for_lilyplayer

I was thinking to add finger number on the piano keys if possible.

Do you mean on the physical piano keys? If so, it would work only for a few sheets for kids as a key can/should be played by different fingers depending on where you are in a song. If you meant finger numbers on top of the note heads in the music sheets, then lilypond can do it (see http://lsr.di.unimi.it/LSR/Search?q=fingering ). Lilydumper just uses the music sheet produced by lilypond, such that they will appear in the bin file and displayed in lilyplayer as you can expect.

Are you aware of any product in the open source world similar to lilyplayer and lilydumper?

In the open-source world, sadly no. Sorry.

s-d-m commented 4 years ago

@achillis2 you can have a look at https://musescore.org/en/piano it might do what you want.

achillis2 commented 4 years ago

Do you have the source .ly file associated with those premade bin files?

s-d-m commented 4 years ago

@achillis2 all of these premade bin files were generated from .ly files that I took from the mutopia project back then. I have the original ly files locally but didn't organise them to know which one goes to which .bin. For a specific sheet, it should be fairly easy to find out though due to mutopia's search engine

achillis2 commented 4 years ago

@achillis2 you can have a look at https://musescore.org/en/piano it might do what you want.

Thank you for finding musescore. It does have what I need!