Re: Introducing "LilyPond HTML Live Score"
On 15-11-29 11:08 AM, Mathieu Demange wrote: Hello all, I've been developing a tool which is at a very early stage now, but I humbly guess you should like the idea. Check this very simple page and click the "play" button (or you can click any note or rest). http://www.mathieudemange.fr/lilypond-html-live-score-demo/ There's a public repository for the tool here : https://gitlab.com/sigmate/lilypond-html-live-score And the score used in the demo is a transcription I made which is a free score (CC-BY-SA) available on this repo : https://gitlab.com/sigmate/transcription-pools-vibes-solo Looking forward to hear your feedback! Cheers, Mathieu Have you talked to Adam Spiers, lilypond-de...@adamspiers.org who did a similar thing a year or so ago? Cheers, Colin -- I've learned that you shouldn't go through life with a catcher's mitt on both hands. You need to be able to throw something back. -Maya Angelou, poet (1928- ) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
This looks really nice. It would nicely complement http://lilybin.com/ -- View this message in context: http://lilypond.1069038.n5.nabble.com/Introducing-LilyPond-HTML-Live-Score-tp184247p184394.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Hi David, Can you send me the generated HTML output file ? If you see such a message, this means that the JavaScript code contains errors. I'll fix that if I can see your file. Thanks, Mathieu Le 2015-12-02 22:35, David Bellows a écrit : Hey Mathieu I just updated the project's repository. I refactored and simplified a lot of things. A new problem. I'm able to successfully run the script on both your example and my test file. But now whenever I open it up in a browser (Firefox, Chrome, Rekonq) I get the message that I need to update my Flash player. I'm running Kubuntu 15.10 and everything is up-to-date but still no go. The example you linked to at the head of this thread still works. Dave Bellows On Wed, Dec 2, 2015 at 8:09 AM, Mathieu Demange wrote: Hi David, I just updated the project's repository. I refactored and simplified a lot of things. There's now a single python script (make-live-score) which takes care of everything. Also, you don't need to edit your .ly file anymore. Please note that the script except audio files to be specified (at least one format) or it'll break the js part. This'll be fixed in the next release and will allow to have visual rhythmic feedback even with no sound played back. See the README.md file for details (and command usage, it has been reworked). Please tell me how it goes now. Cheers, Mathieu Le lundi 30 novembre 2015 à 16:27 -0800, David Bellows a écrit : The jPlayer plugin for jQuery excepts (if possible) two audio formats : Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio source file converted into those two formats. Hey Mathieu, So here is my Lilypond test file. \include "live-score.ily" \score{ {c e g c'} \layout {} \midi {} } I then convert that to an ogg file with Timidity: timidity -Ov score.midi If I run make-live-score.sh as is then I get the score in index.html but no sound or animation. If I comment out line 81, the m4a part, then I get the score and the sound but no animation. I'm using Lilypond 2.19.32 On Mon, Nov 30, 2015 at 1:52 AM, Mathieu Demange wrote: Hi David, The jPlayer plugin for jQuery excepts (if possible) two audio formats : Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio source file converted into those two formats. I'll update the make-live-script.sh file today so it can accept command line arguments to specify the .ly source file and the audio files (if any). I'll urge myself to write some documentation too! Yours, Mathieu Le dimanche 29 novembre 2015 à 13:15 -0800, David Bellows a écrit : Ow! That's because I clearly didn't except anyone to try the script that quick :D Ha! I've been looking for something like this for a while. There's another out there but I've had no luck getting it working and I think it's been abandoned. - make sure you adapt the paper format so that your score fits into one single page (see the \paper block in the original score.ly file) - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to the audio files you want to use (if any) Ok, I switched to a score that uses only one page. I changed line 80 to reflect the name of the piece ("name"). I changed line 82 to point to the correct ogg file ("name.ogg"). I'm not sure what to do with line 81: A) If I change it to "name.m4a" then everything seems to compile and the score is shown in index.html but there's no sound or animation. B) If I comment out that line then I get the score and the music but no animation. So close! So I'm almost there! And I would very much like to include this in a super huge project I'm working once it reaches maturity and to that end I'll help out wherever I can (though I'm not much of a programmer). Thanks! Dave On Sun, Nov 29, 2015 at 12:03 PM, Mathieu Demange wrote: Ow! That's because I clearly didn't except anyone to try the script that quick :D It's not fail-proof, yet, but here are some hints (before all this gets managed automatically): - make sure you adapt the paper format so that your score fits into one single page (see the \paper block in the original score.ly file) - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to the audio files you want to use (if any) Thanks for you interest! The tool is currently at an early stage of development (more like a proof-of-concept actually). There's still quite a lot of work to do :) Yours, Mathieu Le 2015-11-29 20:10, David Bellows a écrit : This seems like it might be exceedingly cool, but I'm running into a problem. When running make-live-score.sh I get this: Drawing systems... Layout output to `score-page-1.svg'... Layout output to `score-page-2.svg'... Layout output to `score-page-3.svg'... Success: compilation successfully completed Adding #score id to tag... sed: can't read score.svg: No such file or directory Injecting events timing data into score.svg... Traceback (most recent call last): File
Re: Introducing "LilyPond HTML Live Score"
Hey Mathieu > I just updated the project's repository. I refactored and simplified a lot of things. A new problem. I'm able to successfully run the script on both your example and my test file. But now whenever I open it up in a browser (Firefox, Chrome, Rekonq) I get the message that I need to update my Flash player. I'm running Kubuntu 15.10 and everything is up-to-date but still no go. The example you linked to at the head of this thread still works. Dave Bellows On Wed, Dec 2, 2015 at 8:09 AM, Mathieu Demange wrote: > Hi David, > > I just updated the project's repository. I refactored and simplified a > lot of things. > > There's now a single python script (make-live-score) which takes care of > everything. Also, you don't need to edit your .ly file anymore. > > Please note that the script except audio files to be specified (at least > one format) or it'll break the js part. This'll be fixed in the next > release and will allow to have visual rhythmic feedback even with no > sound played back. > > See the README.md file for details (and command usage, it has been > reworked). > > Please tell me how it goes now. > > Cheers, > > Mathieu > > Le lundi 30 novembre 2015 à 16:27 -0800, David Bellows a écrit : >> > The jPlayer plugin for jQuery excepts (if possible) two audio formats : >> > Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio >> > source file converted into those two formats. >> >> Hey Mathieu, >> >> So here is my Lilypond test file. >> >> \include "live-score.ily" >> \score{ >> {c e g c'} >> \layout {} >> \midi {} >> } >> >> I then convert that to an ogg file with Timidity: >> >> timidity -Ov score.midi >> >> If I run make-live-score.sh as is then I get the score in index.html >> but no sound or animation. >> >> If I comment out line 81, the m4a part, then I get the score and the >> sound but no animation. >> >> I'm using Lilypond 2.19.32 >> >> On Mon, Nov 30, 2015 at 1:52 AM, Mathieu Demange >> wrote: >> > Hi David, >> > >> > The jPlayer plugin for jQuery excepts (if possible) two audio formats : >> > Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio >> > source file converted into those two formats. >> > >> > I'll update the make-live-script.sh file today so it can accept command >> > line arguments to specify the .ly source file and the audio files (if >> > any). >> > >> > I'll urge myself to write some documentation too! >> > >> > Yours, >> > >> > Mathieu >> > >> > >> > Le dimanche 29 novembre 2015 à 13:15 -0800, David Bellows a écrit : >> >> > Ow! That's because I clearly didn't except anyone to try the script >> >> > that quick :D >> >> >> >> Ha! I've been looking for something like this for a while. There's >> >> another out there but I've had no luck getting it working and I think >> >> it's been abandoned. >> >> >> >> > - make sure you adapt the paper format so that your score fits into one >> >> > single page (see the \paper block in the original score.ly file) >> >> > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to >> >> > the audio files you want to use (if any) >> >> >> >> Ok, I switched to a score that uses only one page. >> >> >> >> I changed line 80 to reflect the name of the piece ("name"). >> >> I changed line 82 to point to the correct ogg file ("name.ogg"). >> >> I'm not sure what to do with line 81: >> >>A) If I change it to "name.m4a" then everything seems to compile >> >> and the score is shown in index.html but there's no sound or >> >> animation. >> >>B) If I comment out that line then I get the score and the music >> >> but no animation. So close! >> >> >> >> So I'm almost there! >> >> >> >> And I would very much like to include this in a super huge project I'm >> >> working once it reaches maturity and to that end I'll help out >> >> wherever I can (though I'm not much of a programmer). >> >> >> >> Thanks! >> >> Dave >> >> >> >> On Sun, Nov 29, 2015 at 12:03 PM, Mathieu Demange >> >> wrote: >> >> > Ow! That's because I clearly didn't except anyone to try the script that >> >> > quick :D It's not fail-proof, yet, but here are some hints (before all >> >> > this >> >> > gets managed automatically): >> >> > >> >> > - make sure you adapt the paper format so that your score fits into one >> >> > single page (see the \paper block in the original score.ly file) >> >> > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to >> >> > the >> >> > audio files you want to use (if any) >> >> > >> >> > Thanks for you interest! The tool is currently at an early stage of >> >> > development (more like a proof-of-concept actually). There's still >> >> > quite a >> >> > lot of work to do :) >> >> > >> >> > Yours, >> >> > >> >> > Mathieu >> >> > >> >> > >> >> > Le 2015-11-29 20:10, David Bellows a écrit : >> >> >> >> >> >> This seems like it might be exceedingly cool, but I'm running into a >> >> >> problem. When running make-live-score.sh I get this: >> >> >> >> >> >> Drawing s
Re: Introducing "LilyPond HTML Live Score"
Hi David, I just updated the project's repository. I refactored and simplified a lot of things. There's now a single python script (make-live-score) which takes care of everything. Also, you don't need to edit your .ly file anymore. Please note that the script except audio files to be specified (at least one format) or it'll break the js part. This'll be fixed in the next release and will allow to have visual rhythmic feedback even with no sound played back. See the README.md file for details (and command usage, it has been reworked). Please tell me how it goes now. Cheers, Mathieu Le lundi 30 novembre 2015 à 16:27 -0800, David Bellows a écrit : > > The jPlayer plugin for jQuery excepts (if possible) two audio formats : > > Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio > > source file converted into those two formats. > > Hey Mathieu, > > So here is my Lilypond test file. > > \include "live-score.ily" > \score{ > {c e g c'} > \layout {} > \midi {} > } > > I then convert that to an ogg file with Timidity: > > timidity -Ov score.midi > > If I run make-live-score.sh as is then I get the score in index.html > but no sound or animation. > > If I comment out line 81, the m4a part, then I get the score and the > sound but no animation. > > I'm using Lilypond 2.19.32 > > On Mon, Nov 30, 2015 at 1:52 AM, Mathieu Demange > wrote: > > Hi David, > > > > The jPlayer plugin for jQuery excepts (if possible) two audio formats : > > Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio > > source file converted into those two formats. > > > > I'll update the make-live-script.sh file today so it can accept command > > line arguments to specify the .ly source file and the audio files (if > > any). > > > > I'll urge myself to write some documentation too! > > > > Yours, > > > > Mathieu > > > > > > Le dimanche 29 novembre 2015 à 13:15 -0800, David Bellows a écrit : > >> > Ow! That's because I clearly didn't except anyone to try the script that > >> > quick :D > >> > >> Ha! I've been looking for something like this for a while. There's > >> another out there but I've had no luck getting it working and I think > >> it's been abandoned. > >> > >> > - make sure you adapt the paper format so that your score fits into one > >> > single page (see the \paper block in the original score.ly file) > >> > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to > >> > the audio files you want to use (if any) > >> > >> Ok, I switched to a score that uses only one page. > >> > >> I changed line 80 to reflect the name of the piece ("name"). > >> I changed line 82 to point to the correct ogg file ("name.ogg"). > >> I'm not sure what to do with line 81: > >>A) If I change it to "name.m4a" then everything seems to compile > >> and the score is shown in index.html but there's no sound or > >> animation. > >>B) If I comment out that line then I get the score and the music > >> but no animation. So close! > >> > >> So I'm almost there! > >> > >> And I would very much like to include this in a super huge project I'm > >> working once it reaches maturity and to that end I'll help out > >> wherever I can (though I'm not much of a programmer). > >> > >> Thanks! > >> Dave > >> > >> On Sun, Nov 29, 2015 at 12:03 PM, Mathieu Demange > >> wrote: > >> > Ow! That's because I clearly didn't except anyone to try the script that > >> > quick :D It's not fail-proof, yet, but here are some hints (before all > >> > this > >> > gets managed automatically): > >> > > >> > - make sure you adapt the paper format so that your score fits into one > >> > single page (see the \paper block in the original score.ly file) > >> > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to > >> > the > >> > audio files you want to use (if any) > >> > > >> > Thanks for you interest! The tool is currently at an early stage of > >> > development (more like a proof-of-concept actually). There's still quite > >> > a > >> > lot of work to do :) > >> > > >> > Yours, > >> > > >> > Mathieu > >> > > >> > > >> > Le 2015-11-29 20:10, David Bellows a écrit : > >> >> > >> >> This seems like it might be exceedingly cool, but I'm running into a > >> >> problem. When running make-live-score.sh I get this: > >> >> > >> >> Drawing systems... > >> >> Layout output to `score-page-1.svg'... > >> >> Layout output to `score-page-2.svg'... > >> >> Layout output to `score-page-3.svg'... > >> >> Success: compilation successfully completed > >> >> Adding #score id to tag... > >> >> sed: can't read score.svg: No such file or directory > >> >> Injecting events timing data into score.svg... > >> >> Traceback (most recent call last): > >> >> File "injector.py", line 6, in > >> >> svg = ET.parse("score.svg") > >> >> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in > >> >> parse > >> >> tree.parse(source, parser) > >> >> File "/usr/lib/python2.7/xml/etree/ElementTree.py"
Re: Introducing "LilyPond HTML Live Score"
> On Nov 29, 2015, at 1:08 PM, Mathieu Demange > wrote: > > http://www.mathieudemange.fr/lilypond-html-live-score-demo/ Nice work! This is great stuff, and I’d probably be interested in using it at some point. (Another case where the ability to automatically calculate the size of the SVG to fit the music would come in handy.) -Paul ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
> The jPlayer plugin for jQuery excepts (if possible) two audio formats : > Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio > source file converted into those two formats. Hey Mathieu, So here is my Lilypond test file. \include "live-score.ily" \score{ {c e g c'} \layout {} \midi {} } I then convert that to an ogg file with Timidity: timidity -Ov score.midi If I run make-live-score.sh as is then I get the score in index.html but no sound or animation. If I comment out line 81, the m4a part, then I get the score and the sound but no animation. I'm using Lilypond 2.19.32 On Mon, Nov 30, 2015 at 1:52 AM, Mathieu Demange wrote: > Hi David, > > The jPlayer plugin for jQuery excepts (if possible) two audio formats : > Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio > source file converted into those two formats. > > I'll update the make-live-script.sh file today so it can accept command > line arguments to specify the .ly source file and the audio files (if > any). > > I'll urge myself to write some documentation too! > > Yours, > > Mathieu > > > Le dimanche 29 novembre 2015 à 13:15 -0800, David Bellows a écrit : >> > Ow! That's because I clearly didn't except anyone to try the script that >> > quick :D >> >> Ha! I've been looking for something like this for a while. There's >> another out there but I've had no luck getting it working and I think >> it's been abandoned. >> >> > - make sure you adapt the paper format so that your score fits into one >> > single page (see the \paper block in the original score.ly file) >> > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to >> > the audio files you want to use (if any) >> >> Ok, I switched to a score that uses only one page. >> >> I changed line 80 to reflect the name of the piece ("name"). >> I changed line 82 to point to the correct ogg file ("name.ogg"). >> I'm not sure what to do with line 81: >>A) If I change it to "name.m4a" then everything seems to compile >> and the score is shown in index.html but there's no sound or >> animation. >>B) If I comment out that line then I get the score and the music >> but no animation. So close! >> >> So I'm almost there! >> >> And I would very much like to include this in a super huge project I'm >> working once it reaches maturity and to that end I'll help out >> wherever I can (though I'm not much of a programmer). >> >> Thanks! >> Dave >> >> On Sun, Nov 29, 2015 at 12:03 PM, Mathieu Demange >> wrote: >> > Ow! That's because I clearly didn't except anyone to try the script that >> > quick :D It's not fail-proof, yet, but here are some hints (before all this >> > gets managed automatically): >> > >> > - make sure you adapt the paper format so that your score fits into one >> > single page (see the \paper block in the original score.ly file) >> > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to the >> > audio files you want to use (if any) >> > >> > Thanks for you interest! The tool is currently at an early stage of >> > development (more like a proof-of-concept actually). There's still quite a >> > lot of work to do :) >> > >> > Yours, >> > >> > Mathieu >> > >> > >> > Le 2015-11-29 20:10, David Bellows a écrit : >> >> >> >> This seems like it might be exceedingly cool, but I'm running into a >> >> problem. When running make-live-score.sh I get this: >> >> >> >> Drawing systems... >> >> Layout output to `score-page-1.svg'... >> >> Layout output to `score-page-2.svg'... >> >> Layout output to `score-page-3.svg'... >> >> Success: compilation successfully completed >> >> Adding #score id to tag... >> >> sed: can't read score.svg: No such file or directory >> >> Injecting events timing data into score.svg... >> >> Traceback (most recent call last): >> >> File "injector.py", line 6, in >> >> svg = ET.parse("score.svg") >> >> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse >> >> tree.parse(source, parser) >> >> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse >> >> source = open(source, "rb") >> >> IOError: [Errno 2] No such file or directory: 'score.svg' >> >> Injecting score.svg into index.html... >> >> >> >> I'm really not sure what I should be doing. I changed the name of my >> >> original Lilypond file to score.ly and the svg files are all correct >> >> but the index.html file still plays your original demo. >> >> >> >> On Sun, Nov 29, 2015 at 10:08 AM, Mathieu Demange >> >> wrote: >> >>> >> >>> Hello all, >> >>> >> >>> I've been developing a tool which is at a very early stage now, but I >> >>> humbly >> >>> guess you should like the idea. Check this very simple page and click the >> >>> "play" button (or you can click any note or rest). >> >>> >> >>> http://www.mathieudemange.fr/lilypond-html-live-score-demo/ >> >>> >> >>> There's a public repository for the tool here : >> >>> >> >>> https://gitlab.com/sigmate/lilypond-html-live-score >> >>
Re: Introducing "LilyPond HTML Live Score"
On Mon, 2015-11-30 at 14:56 +0100, Mathieu Demange wrote: > Hi Richard, > > The ideal approach would have been to have a timing information > directly inserted in the svg output by LilyPond itself but I tried > everything I could to obtain such a result with no luck. I posted here > about that topic but I didn't get any clue. > > So I figured out I'd do it myself. > > I was able to set a grob's ID dynamically and put its "origin" (point > and click information) in it : that was a way to later reference a > unique notehead or rest. > > On the other side, the event listener (based on the event-listener.ly > file bundled with LilyPond) allowed me to get an approximate timing > information and another "origin" which I could then couple to the > first one. [...] > > The script then injects extra HTML5 attributes to the svg code. > > The JavaScript part gather all noteheads and rests tags and > creates an array of objects which is then sorted chronologically (svg > objects are laid out in a way which is not chronological at all). > > Hope this answers even partially to your curiosity :) Thank you, this goes a little beyond mere curiosity in fact - I just spent a few days looking at this problem and was just about to abandon it. Can I ask for an overview of the flow you use? I can see a score.ly containing the regular LilyPond score and live-score.ily I guess to make the LilyPond executable do things on encountering notes, rests etc and I see a python script which seems (I don't speak python!) to take a file events.txt and output a file score.svg Is the rest (js) a matter of confabulating the svg from LilyPond with that score.svg file and an audio file to make the webpage? Richard ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Mathieu Demange writes: > Yes! Thanks for the help! I'll check that as soon as possible. This > could greatly reduce the amount of work which is actually done by the > python script. > > Is there a way to know the current tempo for any given grob ? I don't think so. The context property tempoWholesPerMinute records the current tempo so you'd need to fetch this information at grob acknowledge time (going via ly:translator-context and ly:context-property) and store it somewhere until the grob is being typeset. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Yes! Thanks for the help! I'll check that as soon as possible. This could greatly reduce the amount of work which is actually done by the python script. Is there a way to know the current tempo for any given grob ? Regards, Mathieu Le 2015-11-30 15:50, David Nalesnik a écrit : On Mon, Nov 30, 2015 at 8:43 AM, Urs Liska wrote: Am 30.11.2015 um 15:19 schrieb David Kastrup: Mathieu Demange writes: Hi Richard, The ideal approach would have been to have a timing information directly inserted in the svg output by LilyPond itself but I tried everything I could to obtain such a result with no luck. I posted here about that topic but I didn't get any clue. (grob::rhythmic-location grob) should deliver a pair consisting of measure number (integer) and position in the measure (Moment). What does (grob::when grob) do? It returns the global timestep: how many moments along we are without any regard for measure. DN ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
On Mon, Nov 30, 2015 at 8:43 AM, Urs Liska wrote: > > > Am 30.11.2015 um 15:19 schrieb David Kastrup: > > Mathieu Demange writes: > > > >> Hi Richard, > >> > >> The ideal approach would have been to have a timing information > >> directly inserted in the svg output by LilyPond itself but I tried > >> everything I could to obtain such a result with no luck. I posted here > >> about that topic but I didn't get any clue. > > (grob::rhythmic-location grob) should deliver a pair consisting of > > measure number (integer) and position in the measure (Moment). > > > > What does (grob::when grob) do? > > It returns the global timestep: how many moments along we are without any regard for measure. DN ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Urs Liska writes: > Am 30.11.2015 um 15:19 schrieb David Kastrup: >> Mathieu Demange writes: >> >>> Hi Richard, >>> >>> The ideal approach would have been to have a timing information >>> directly inserted in the svg output by LilyPond itself but I tried >>> everything I could to obtain such a result with no luck. I posted here >>> about that topic but I didn't get any clue. >> (grob::rhythmic-location grob) should deliver a pair consisting of >> measure number (integer) and position in the measure (Moment). >> > > What does (grob::when grob) do? Absolute position measured from the start. That's the only thing moving between \cadenzaOn and \cadenzaOff and is reliable for sorting and other stuff, but the value is not particularly human-friendly. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Am 30.11.2015 um 15:19 schrieb David Kastrup: > Mathieu Demange writes: > >> Hi Richard, >> >> The ideal approach would have been to have a timing information >> directly inserted in the svg output by LilyPond itself but I tried >> everything I could to obtain such a result with no luck. I posted here >> about that topic but I didn't get any clue. > (grob::rhythmic-location grob) should deliver a pair consisting of > measure number (integer) and position in the measure (Moment). > What does (grob::when grob) do? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Mathieu Demange writes: > Hi Richard, > > The ideal approach would have been to have a timing information > directly inserted in the svg output by LilyPond itself but I tried > everything I could to obtain such a result with no luck. I posted here > about that topic but I didn't get any clue. (grob::rhythmic-location grob) should deliver a pair consisting of measure number (integer) and position in the measure (Moment). -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Hi Richard, The ideal approach would have been to have a timing information directly inserted in the svg output by LilyPond itself but I tried everything I could to obtain such a result with no luck. I posted here about that topic but I didn't get any clue. So I figured out I'd do it myself. I was able to set a grob's ID dynamically and put its "origin" (point and click information) in it : that was a way to later reference a unique notehead or rest. On the other side, the event listener (based on the event-listener.ly file bundled with LilyPond) allowed me to get an approximate timing information and another "origin" which I could then couple to the first one. I say "approximate" because the event listener itself seems imperfect to me (even though I'm glad it exist, of course). The "moment" value is always computed on a 4/4 time signature basis, even if specified otherwise. Time signatures events themselves are not reported even though there's a listener for that. Anyway, I got rid of those little things by calculating timing data myself. In the python script, I'm basically keeping track of a current tempo and use delta-time computations over note and rest events to calculate their real timing. The script then injects extra HTML5 attributes to the svg code. The _javascript_ part gather all noteheads and rests tags and creates an array of objects which is then sorted chronologically (svg objects are laid out in a way which is not chronological at all). Hope this answers even partially to your curiosity :) I really appreciate your feedback and I'm happy to have reasons to keep working on that tool other than myself only :) Cheers, Mathieu Le 30 nov. 2015 13:39, Richard Shann a écrit :On Sun, 2015-11-29 at 19:08 +0100, Mathieu Demange wrote: > Hello all, > > I've been developing a tool which is at a very early stage now, but I > humbly guess you should like the idea. Check this very simple page and > click the "play" button (or you can click any note or rest). I wonder could you give a brief over-view of how you are finding locations in the LilyPond typeset score that correspond with times? I ask because by strange coincidence I have just spent the last few days exploring this topic: I resorted to specifying the number of bars per line and systems per page and setting the Score.proportionalNotationDuration = #(ly:make-moment ... so as to arrive at a score where I could calculate the location by dead-reckoning. Could you say, very roughly, what you are doing? And, if there has been any further progress in LilyPond to generate a set of timings for locations in a LilyPond svg or pdf output score which I may have missed, can anyone else on the list enlighten me. Richard ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
On Sun, 2015-11-29 at 19:08 +0100, Mathieu Demange wrote: > Hello all, > > I've been developing a tool which is at a very early stage now, but I > humbly guess you should like the idea. Check this very simple page and > click the "play" button (or you can click any note or rest). I wonder could you give a brief over-view of how you are finding locations in the LilyPond typeset score that correspond with times? I ask because by strange coincidence I have just spent the last few days exploring this topic: I resorted to specifying the number of bars per line and systems per page and setting the Score.proportionalNotationDuration = #(ly:make-moment ... so as to arrive at a score where I could calculate the location by dead-reckoning. Could you say, very roughly, what you are doing? And, if there has been any further progress in LilyPond to generate a set of timings for locations in a LilyPond svg or pdf output score which I may have missed, can anyone else on the list enlighten me. Richard ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Hi David, The jPlayer plugin for jQuery excepts (if possible) two audio formats : Ogg Vorbis (.ogg) and AAC (.m4a). Please make sure you have your audio source file converted into those two formats. I'll update the make-live-script.sh file today so it can accept command line arguments to specify the .ly source file and the audio files (if any). I'll urge myself to write some documentation too! Yours, Mathieu Le dimanche 29 novembre 2015 à 13:15 -0800, David Bellows a écrit : > > Ow! That's because I clearly didn't except anyone to try the script that > > quick :D > > Ha! I've been looking for something like this for a while. There's > another out there but I've had no luck getting it working and I think > it's been abandoned. > > > - make sure you adapt the paper format so that your score fits into one > > single page (see the \paper block in the original score.ly file) > > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to the > > audio files you want to use (if any) > > Ok, I switched to a score that uses only one page. > > I changed line 80 to reflect the name of the piece ("name"). > I changed line 82 to point to the correct ogg file ("name.ogg"). > I'm not sure what to do with line 81: >A) If I change it to "name.m4a" then everything seems to compile > and the score is shown in index.html but there's no sound or > animation. >B) If I comment out that line then I get the score and the music > but no animation. So close! > > So I'm almost there! > > And I would very much like to include this in a super huge project I'm > working once it reaches maturity and to that end I'll help out > wherever I can (though I'm not much of a programmer). > > Thanks! > Dave > > On Sun, Nov 29, 2015 at 12:03 PM, Mathieu Demange > wrote: > > Ow! That's because I clearly didn't except anyone to try the script that > > quick :D It's not fail-proof, yet, but here are some hints (before all this > > gets managed automatically): > > > > - make sure you adapt the paper format so that your score fits into one > > single page (see the \paper block in the original score.ly file) > > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to the > > audio files you want to use (if any) > > > > Thanks for you interest! The tool is currently at an early stage of > > development (more like a proof-of-concept actually). There's still quite a > > lot of work to do :) > > > > Yours, > > > > Mathieu > > > > > > Le 2015-11-29 20:10, David Bellows a écrit : > >> > >> This seems like it might be exceedingly cool, but I'm running into a > >> problem. When running make-live-score.sh I get this: > >> > >> Drawing systems... > >> Layout output to `score-page-1.svg'... > >> Layout output to `score-page-2.svg'... > >> Layout output to `score-page-3.svg'... > >> Success: compilation successfully completed > >> Adding #score id to tag... > >> sed: can't read score.svg: No such file or directory > >> Injecting events timing data into score.svg... > >> Traceback (most recent call last): > >> File "injector.py", line 6, in > >> svg = ET.parse("score.svg") > >> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse > >> tree.parse(source, parser) > >> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse > >> source = open(source, "rb") > >> IOError: [Errno 2] No such file or directory: 'score.svg' > >> Injecting score.svg into index.html... > >> > >> I'm really not sure what I should be doing. I changed the name of my > >> original Lilypond file to score.ly and the svg files are all correct > >> but the index.html file still plays your original demo. > >> > >> On Sun, Nov 29, 2015 at 10:08 AM, Mathieu Demange > >> wrote: > >>> > >>> Hello all, > >>> > >>> I've been developing a tool which is at a very early stage now, but I > >>> humbly > >>> guess you should like the idea. Check this very simple page and click the > >>> "play" button (or you can click any note or rest). > >>> > >>> http://www.mathieudemange.fr/lilypond-html-live-score-demo/ > >>> > >>> There's a public repository for the tool here : > >>> > >>> https://gitlab.com/sigmate/lilypond-html-live-score > >>> > >>> And the score used in the demo is a transcription I made which is a free > >>> score (CC-BY-SA) available on this repo : > >>> > >>> https://gitlab.com/sigmate/transcription-pools-vibes-solo > >>> > >>> Looking forward to hear your feedback! > >>> > >>> Cheers, > >>> > >>> Mathieu > >>> > >>> > >>> > >>> > >>> > >>> ___ > >>> lilypond-user mailing list > >>> lilypond-user@gnu.org > >>> https://lists.gnu.org/mailman/listinfo/lilypond-user > >> > >> > >> ___ > >> lilypond-user mailing list > >> lilypond-user@gnu.org > >> https://lists.gnu.org/mailman/listinfo/lilypond-user > > > > > > ___ > > lilypond-user mailing list > > lilypond-user@gnu.
Re: Introducing "LilyPond HTML Live Score"
2015-11-29 19:08 GMT+01:00 Mathieu Demange : > Hello all, > > I've been developing a tool which is at a very early stage now, but I humbly > guess you should like the idea. Check this very simple page and click the > "play" button (or you can click any note or rest). > > http://www.mathieudemange.fr/lilypond-html-live-score-demo/ > > There's a public repository for the tool here : > > https://gitlab.com/sigmate/lilypond-html-live-score > > And the score used in the demo is a transcription I made which is a free > score (CC-BY-SA) available on this repo : > > https://gitlab.com/sigmate/transcription-pools-vibes-solo > > Looking forward to hear your feedback! Very cool! I don’t quite have a use for it at the moment, but I very well might soon. Starred the GitLab project, so I keep an eye on it … -- Peter Crighton | Musician & Music Engraver based in Mainz, Germany http://www.petercrighton.de ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
> Ow! That's because I clearly didn't except anyone to try the script that > quick :D Ha! I've been looking for something like this for a while. There's another out there but I've had no luck getting it working and I think it's been abandoned. > - make sure you adapt the paper format so that your score fits into one > single page (see the \paper block in the original score.ly file) > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to the > audio files you want to use (if any) Ok, I switched to a score that uses only one page. I changed line 80 to reflect the name of the piece ("name"). I changed line 82 to point to the correct ogg file ("name.ogg"). I'm not sure what to do with line 81: A) If I change it to "name.m4a" then everything seems to compile and the score is shown in index.html but there's no sound or animation. B) If I comment out that line then I get the score and the music but no animation. So close! So I'm almost there! And I would very much like to include this in a super huge project I'm working once it reaches maturity and to that end I'll help out wherever I can (though I'm not much of a programmer). Thanks! Dave On Sun, Nov 29, 2015 at 12:03 PM, Mathieu Demange wrote: > Ow! That's because I clearly didn't except anyone to try the script that > quick :D It's not fail-proof, yet, but here are some hints (before all this > gets managed automatically): > > - make sure you adapt the paper format so that your score fits into one > single page (see the \paper block in the original score.ly file) > - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to the > audio files you want to use (if any) > > Thanks for you interest! The tool is currently at an early stage of > development (more like a proof-of-concept actually). There's still quite a > lot of work to do :) > > Yours, > > Mathieu > > > Le 2015-11-29 20:10, David Bellows a écrit : >> >> This seems like it might be exceedingly cool, but I'm running into a >> problem. When running make-live-score.sh I get this: >> >> Drawing systems... >> Layout output to `score-page-1.svg'... >> Layout output to `score-page-2.svg'... >> Layout output to `score-page-3.svg'... >> Success: compilation successfully completed >> Adding #score id to tag... >> sed: can't read score.svg: No such file or directory >> Injecting events timing data into score.svg... >> Traceback (most recent call last): >> File "injector.py", line 6, in >> svg = ET.parse("score.svg") >> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse >> tree.parse(source, parser) >> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse >> source = open(source, "rb") >> IOError: [Errno 2] No such file or directory: 'score.svg' >> Injecting score.svg into index.html... >> >> I'm really not sure what I should be doing. I changed the name of my >> original Lilypond file to score.ly and the svg files are all correct >> but the index.html file still plays your original demo. >> >> On Sun, Nov 29, 2015 at 10:08 AM, Mathieu Demange >> wrote: >>> >>> Hello all, >>> >>> I've been developing a tool which is at a very early stage now, but I >>> humbly >>> guess you should like the idea. Check this very simple page and click the >>> "play" button (or you can click any note or rest). >>> >>> http://www.mathieudemange.fr/lilypond-html-live-score-demo/ >>> >>> There's a public repository for the tool here : >>> >>> https://gitlab.com/sigmate/lilypond-html-live-score >>> >>> And the score used in the demo is a transcription I made which is a free >>> score (CC-BY-SA) available on this repo : >>> >>> https://gitlab.com/sigmate/transcription-pools-vibes-solo >>> >>> Looking forward to hear your feedback! >>> >>> Cheers, >>> >>> Mathieu >>> >>> >>> >>> >>> >>> ___ >>> lilypond-user mailing list >>> lilypond-user@gnu.org >>> https://lists.gnu.org/mailman/listinfo/lilypond-user >> >> >> ___ >> lilypond-user mailing list >> lilypond-user@gnu.org >> https://lists.gnu.org/mailman/listinfo/lilypond-user > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
Ow! That's because I clearly didn't except anyone to try the script that quick :D It's not fail-proof, yet, but here are some hints (before all this gets managed automatically): - make sure you adapt the paper format so that your score fits into one single page (see the \paper block in the original score.ly file) - adapt the Javascript code in the index.tpl file (lines 80, 81, 82) to the audio files you want to use (if any) Thanks for you interest! The tool is currently at an early stage of development (more like a proof-of-concept actually). There's still quite a lot of work to do :) Yours, Mathieu Le 2015-11-29 20:10, David Bellows a écrit : This seems like it might be exceedingly cool, but I'm running into a problem. When running make-live-score.sh I get this: Drawing systems... Layout output to `score-page-1.svg'... Layout output to `score-page-2.svg'... Layout output to `score-page-3.svg'... Success: compilation successfully completed Adding #score id to tag... sed: can't read score.svg: No such file or directory Injecting events timing data into score.svg... Traceback (most recent call last): File "injector.py", line 6, in svg = ET.parse("score.svg") File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse tree.parse(source, parser) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse source = open(source, "rb") IOError: [Errno 2] No such file or directory: 'score.svg' Injecting score.svg into index.html... I'm really not sure what I should be doing. I changed the name of my original Lilypond file to score.ly and the svg files are all correct but the index.html file still plays your original demo. On Sun, Nov 29, 2015 at 10:08 AM, Mathieu Demange wrote: Hello all, I've been developing a tool which is at a very early stage now, but I humbly guess you should like the idea. Check this very simple page and click the "play" button (or you can click any note or rest). http://www.mathieudemange.fr/lilypond-html-live-score-demo/ There's a public repository for the tool here : https://gitlab.com/sigmate/lilypond-html-live-score And the score used in the demo is a transcription I made which is a free score (CC-BY-SA) available on this repo : https://gitlab.com/sigmate/transcription-pools-vibes-solo Looking forward to hear your feedback! Cheers, Mathieu ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Introducing "LilyPond HTML Live Score"
This seems like it might be exceedingly cool, but I'm running into a problem. When running make-live-score.sh I get this: Drawing systems... Layout output to `score-page-1.svg'... Layout output to `score-page-2.svg'... Layout output to `score-page-3.svg'... Success: compilation successfully completed Adding #score id to tag... sed: can't read score.svg: No such file or directory Injecting events timing data into score.svg... Traceback (most recent call last): File "injector.py", line 6, in svg = ET.parse("score.svg") File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse tree.parse(source, parser) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse source = open(source, "rb") IOError: [Errno 2] No such file or directory: 'score.svg' Injecting score.svg into index.html... I'm really not sure what I should be doing. I changed the name of my original Lilypond file to score.ly and the svg files are all correct but the index.html file still plays your original demo. On Sun, Nov 29, 2015 at 10:08 AM, Mathieu Demange wrote: > Hello all, > > I've been developing a tool which is at a very early stage now, but I humbly > guess you should like the idea. Check this very simple page and click the > "play" button (or you can click any note or rest). > > http://www.mathieudemange.fr/lilypond-html-live-score-demo/ > > There's a public repository for the tool here : > > https://gitlab.com/sigmate/lilypond-html-live-score > > And the score used in the demo is a transcription I made which is a free > score (CC-BY-SA) available on this repo : > > https://gitlab.com/sigmate/transcription-pools-vibes-solo > > Looking forward to hear your feedback! > > Cheers, > > Mathieu > > > > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Introducing "LilyPond HTML Live Score"
Hello all, I've been developing a tool which is at a very early stage now, but I humbly guess you should like the idea. Check this very simple page and click the "play" button (or you can click any note or rest). http://www.mathieudemange.fr/lilypond-html-live-score-demo/ There's a public repository for the tool here : https://gitlab.com/sigmate/lilypond-html-live-score And the score used in the demo is a transcription I made which is a free score (CC-BY-SA) available on this repo : https://gitlab.com/sigmate/transcription-pools-vibes-solo Looking forward to hear your feedback! Cheers, Mathieu ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user