[luatex] lyluatex compile problems

R. Padraic Springuel rpspringuel at gmail.com
Mon Jul 30 19:40:00 CEST 2018

For embedding audio files in a pdf using LaTeX, I would start by looking at media9, as suggested on TeX StackExchange (https://tex.stackexchange.com/questions/89706/audio-examples-in-phonetics-project/89741#89741).  I haven't played with it to see whether it can embed midi directly, but it looks promising. 

Br. Samuel, OSB
(R. Padraic Springuel)
St. Anselm's Abbey 
4501 South Dakota Ave, NE
Washington, DC, 20017
(c) 202-674-1682

> On Jul 30, 2018, at 1:20 PM, liebrecht at grossmann-venter.com wrote:
> Urs,
> There are several ways to implement this and I already drawn it out using Lazarus, but I agree that doing it native to TeX as far as possible would be really preferable.
> In the end Knuth always wins.
> Since you asked; I can explain the scenario of use like this.
> --------------------------------------------------------------
> Assume someone is giving a lecture by electronic means, meaning an LCD projector and laptop.
> Currently you have to display the sheetmusic and sometimes just a a few bars independently from text which is painful distracting switching on the screen, or you literally have to go paste sheetmusic images into a word or such document which is really really, I mean really stupid or have to deal with the usually troublesome image import with floats in LaTeX which is preferable but out of the reach of the general regular person which makes up the majority of mousepushing users.
> (but thank heavens I now have lyluatex and it makes this mess described unnecessary )
> Then usually you even have to have separate music files to play sound separate from the document and the sheetmusic. This now creates enormous acrobatics for an already stressed out presenter with a person dedicated to do the document/sheetmusic/snippets of bars of music/sound for you while you give the presentation or you have to drag a piano into the conference room to play the examples yourself
> (with compromise usually). It is damn awful! We all saw it and how it usually goes wrong during seminars and such.
> What I envisaged in my original mail is ONE documewnt of which lyluatex already does 2/3 of the topics above.
> All that is needed is a player that can be activated on the notation. the presenter then has everything in one document and can just play the parts right in the documents as they come up.
> As an added benefit, the audience can take a copy of the document with and replay the entire thing complete at their leisure.
> This will solve the current madness.
> I use a lot of professional Symphony VST's like for example Miroslav Symphony and it is enormously good.
> It is really a piece of cake to implement the midi interfaces to these professional vsts and to adapt the current midi implementation to work with these VSTs.
> I spent the last 3 years begging Notion to just include text in their great software, but they cant see the benefit. They absolutely want to do scores only period.
> So, luLaTeX is probably the only hope to get something like this realized, but I will do it with Lazarus+luLaTeX+Custom-midi-drivers  as it is the easiest way for me to implement the changes to midi interfacing with professional VSTs. I see a bit of a learning curve for me doing all that with TeX but it would be preferable if possible and the real TeX-heads are seriously resourceful people that can perform magic that will take me longer with TeX.
> So I can think you see the current dilemma and the obvious solution which lyLuaTeX is already 70% of the solution. (if only mousepushers can be converted to use a computer for what it was intended for)
> Knuth should at least get the Nobel prize in my opinion although he deserves way more.
> After 15 years since buying the books, I still fight my way through "The Art Of Computer Programming" which is always helpful and never outdated.
>>> I am really thankful that you guys did this.
>>> Now if only you have a midi interface that could play the Notation
>>> in the document by means of player buttons, but I understand that
>>> doesnt exist yet.
>>> Frescobaldi does that, but unfortunately cannot add text inline to
>>> scores creating a document.
>>> I might want to create such a frontend for lyluatex.
>> A solution to this is probably not that far-fetched, but in order to
>> get there you have to either get to a clear understanding of what you
>> want to achieve or - if you actually have that - communicate it
>> clearly so we all know where we want to get. I think you have a very
>> valid use case here that would be good to support.
>> I *think* what you will want is to have the score examples accompanied
>> by *links* (in whatever graphical form, as plain text links or as
>> fancy graphic buttons). These links should point to either the MIDI
>> files created by LilyPond, *or* to audio files that have been
>> generated from these MIDI files in advance. I can think of no other
>> suitable concept of having a "document" play back the score examples.
>> If I'm missing anything please correct me.
>> Here's what has to be done to achieve that goal. Please create an
>> issue at https://github.com/jperon/lyluatex/issues and copy as much
>> information as possible/useful from this thread. I would not want to
>> continue discussion here because it really isn't a "luatex" issue but
>> relates to lyluatex and LilyPond directly:
>>    * lyluatex has to make LilyPond also produce the MIDI files beside
>> the scores.
>> This has not been implemented yet, but should be a minor thing to do
>> (and as said, I find this a valuable use case)    * lyluatex will then
>> (automatically) produce poth a <unique-hash-name>.pdf and a
>> <same-unique-hash-name>.midi file in the cache directory
>>    * With the 'raw-pdf' option lyluatex will return that calculated
>> base name instead of directly including the score as an image.
>>    * From there you can create a macro that will include the image and
>> create a link to the midi file.
>> This can be done with standard LaTeX means
>>    * Or you can add a hook in between to call another external program
>> to generate the corresponding audio file and link to that.
>> This would probably be (much) easier to program in Lua, since Lua is
>> present anyway.
>>> I will take your concerns noted below seriously.
>>> It is just difficult to figure out the differences between
>>> luatex, lyluatex, lualatex and which interfaces with lillypond for
>>> someone new to luatex (I am an old-time LaTeX/TeX user though )
>>> So I will step on your toes for a while unintentionally.
>>> Are you going to remove lyluatex.tex file in future ?
>>> The reason I ask is that I want to learn lyluatex by studying the
>>> code creating the manual, so I will have to add all the other
>>> packages in the headers of the TeX file.
>>> If I am not supposed to have it let me know, but the manual does
>>> EXACTLY what I want so it THE example file for me. It has everything
>>> by design.
>> This last assumption is on spot.
>> And no, we're not going to remove that file.
>> In the development repository we author the manual in a Markdown file,
>> and it is compiled through Pandoc. But the make rule for producing the
>> CTAN upload the Markdown file is compiled to the corresponding .tex
>> file. So that lyluatex.tex file is an official part of the CTAN
>> package (and I would assume that it is also copied *somewhere* into
>> your texlive installation).
>>> If I am allowed to use it and you have the time and patience...
>>> 1) Are only the packages listed n the header needed to compile the
>>> manual ?
>> You should also look into the the lyluatex.sty file since that also
>> loads a number of packages. But AFAIK there are no *special* packages
>> needed that aren't available in regular TeX Live (I just don't know
>> what happens if you haven't installed texlive-full).
>>> 2) Are there any other unforseen issues compiling it you know of
>>> that could save me time before I delve into it myself ?
>> From what I can see in your communications I'm not 100% confident you
>> have set up LilyPond properly already.
>> lyluatex does its work by calling LilyPond as an external command, so
>> that has to be a) installed and b) found by lyluatex.
>> If you don't have a working environment I suggest downloading the
>> current development version from http://lilypond.org/development.html
>> (they are not at all "unstable" in the case of LilyPond) and
>> installing it (I don't know what OS you are having).
>> If you are on a UNIX OS and can run "lilypond --version" after the
>> installation everything should be fine, but if you have to specify any
>> other command line you have to provide this to lyluatex through the
>> [program={path/to/lilypond/executable}] option.
>> If you still have errors after that please report with more details -
>> we have tried to make the error handling as informative as possible -
>> but do so on the lyluatex issue tracker, not here.
>>> This is possibly the best music typeset software that I have seen in
>>> my life.
>>> I cannot think of anything that can beat it.
>>> Enormous !!!
>>> Hope the Universities at least will use it and stop teaching people
>>> to be Joe-mousepusher.
>> Having literally spent years with this topic I can't give you too much
>> hope about this :-(
>> Best
>> Urs
>>> Thanks
>>> On 2018-07-29 12:28, Urs Liska wrote:
>>> Am 29.07.2018 um 17:59 schrieb liebrecht at grossmann-venter.com:
>>> a) Ok good to know that explains the compiling problems
>>> fundamentally.
>>> If the manual were a lyluatex file it would have been one of the
>>> greatest tutorials right there.
>>> What I tried to compile is the manual in the zip download here
>>> "https://ctan.org/pkg/lyluatex?lang=en" [1]
>>> Which seemed to be the  lyluatex code, but I am seemingly mistaken.
>>> No, you're not mistaken. I wasn't aware of the fact that the script
>>> preparing the CTAN upload actually produced that lyluatex.tex file.
>>> b) Ok
>>> c) Ok I saw that, but where that was mentioned there was no direct
>>> compile instruction. The option --shell-escape was mentioned in the
>>> body text and there was no direct compile command.
>>> If
>>> "lualatex --shell-escape somefile.tex"
>>> were in the instructions I did not have to ask this question, but it
>>> is absent.
>>> Would be a good idea to add that.
>>> I'll try to keep that in mind. It would be great if you could open
>>> an
>>> issue on the Github issue tracker at
>>> https://github.com/jperon/lyluatex/issues about it.
>>> Question:
>>> 1) Since I cannot compile the manual and use that to learn lyluatex,
>>> (my preferred latex way to learn is just to work through the code
>>> compiling the manual. (Last 20+ more years taught me that is by far
>>> the best way.)
>>> Is there an indepth lyluatex manual that is compilable with luatex ?
>>> This .tex file *is* compilable with lualatex (not luatex!).
>>> Please first try the other things I told you about, and if that
>>> doesn't work please post more details about the errors. But this is
>>> not a luatex issue, so this list may not be right place to discuss.
>>> Please either subscribe to the lilypond-user mailing list or open an
>>> issue on the issue tracker.
>>> 2) Is there an archive with lots of lyluatex document examples
>>> combining both text and musical notaion in the document ?
>>> lyluatex is actually brand new, so there is no such archive (yet).
>>> HTH
>>> Urs
>> Links:
>> ------
>> [1] https://ctan.org/pkg/lyluatex?lang=en
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20180730/ac9143e9/attachment-0001.html>

More information about the luatex mailing list