lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Annotate and Lilyglyphs


From: Urs Liska
Subject: Re: Annotate and Lilyglyphs
Date: Sun, 08 Feb 2015 09:55:25 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 08.02.2015 um 09:33 schrieb Craig Dabelstein:
Hi Urs,

[1] I have moved to Git.

That's a good thing. You'll see in a minute.


[2] The new method of using ScholarLy is all working (when I engrave through Frescobaldi), but it does give me these warnings first:

openLilyLib: library infrastructure successfully loaded.


Interpreting music...[8][16][24]

warning: openLilyLib:

"context" property: #f

warning: openLilyLib: "actual-context-id: Bassoon 2

warning: openLilyLib: "context-id" property: Notes

warning: openLilyLib: Resulting "ctx-id": Bassoon 2


warning: openLilyLib:

"context" property: #f

warning: openLilyLib: "actual-context-id: Baritone Saxophone

warning: openLilyLib: "context-id" property: Notes 

warning: openLilyLib: Resulting "ctx-id": Baritone Saxophone




Hihi, I should try that with our 1.000+ annotations Fried score ;-/
When fixing the previous bug I forgot to remove the debug output.

Now I've pushed the fix you can simply do "git pull" from inside the repository and have the update.


[3] However, when I try to engrave using my Makefile I get an "error: cannot find file: `openlilylib' "


I don't know your makefile, and actually I don't have any experience with makefiles. But that error means that ???/openlilylib/ly is not in the include path passed to LilyPond.

HTH
Urs


Craig



On Sun Feb 08 2015 at 9:02:14 AM Urs Liska <address@hidden> wrote:

Am 07.02.2015 um 11:37 schrieb Craig Dabelstein:
Urs,

I tried and failed to understand the ouput Here is the ouput error.

Processing `/Users/craigdabelstein/Dropbox/Maximes_Music/French_music/Berlioz/lilypond/Score/Berlioz-01-score.ly'

Parsing...


openLilyLib: library infrastructure successfully loaded.


Interpreting music...[8][16][24]

warning: openLilyLib:

"context" property: #f

warning: openLilyLib: "actual-context-id: Bassoon 2

warning: openLilyLib: "context-id" property: Notes

warning: openLilyLib: Resulting "ctx-id": #t


/Users/craigdabelstein/Dropbox/Lilypond/openlilylib/ly/scholarly/annotate/__main__.ily:156:34: In procedure string->symbol in _expression_ (string->symbol ctx-id):

/Users/craigdabelstein/Dropbox/Lilypond/openlilylib/ly/scholarly/annotate/__main__.ily:156:34: Wrong type argument in position 1 (expecting string): #t

Exited with return code 1.


Thanks for testing. It turned out to be a simple error in the conditional evaluation of the different possibilities to determine a context name. This shows that one should actually have a comprehensive test suite ...

I have pushed the update to Github so you can get it from there.
I see that you have stored openlilylib in a Dropbox folder. You really should consider using Git, if only for getting stuff from Github. It makes managing repositories like openlilylib so much cleaner ...

Best

Urs



On Sat Feb 07 2015 at 7:19:25 PM Urs Liska <address@hidden> wrote:

Am 07.02.2015 um 07:54 schrieb Urs Liska:


Am 7. Februar 2015 04:47:11 MEZ, schrieb Craig Dabelstein <address@hidden>:
>Dear Urs,
>
>All good.
>
>I've followed all your instructions -- no problem.
>
>However, perhaps I'm putting \setOption
>scholarly.annotate.export-targets
>#'("latex" "plaintext") in the wrong place. I put this in the
>"main-init.ily" file, yes?
>
>When I try to engrave the score I get this error:
>
>Parsing...
>
>
>openLilyLib: library infrastructure successfully loaded.
>
>
>Interpreting music...[8][16][24]
>/Users/craigdabelstein/Dropbox/Lilypond/openlilylib/ly/scholarly/annotate/__main__.ily:150:34
><0>: In procedure string->symbol in _expression_ (string->symbol ctx-id):
>
>/Users/craigdabelstein/Dropbox/Lilypond/openlilylib/ly/scholarly/annotate/__main__.ily:150:34
><1>: Wrong type argument in position 1 (expecting string): #t
>
>Exited with return code 1.

This looks like a bug to me. It seems you managed to use a constellation I failed to check. This is in the code where the name of the context is determined.

Please try with a simple example file to check whether you can get it to compile at all.

Unfortunately I don't think I'll be able to work on this today at all.

There's something you can do to debug:

  • Open openlilylib/ly/scholarly/annotate/__main__.ily
  • Locate the "(set! annotation", should be line 145
  • Insert the following lines _before_ this line:

                     (oll:warn "\n\"context\" property: ~a" (assoc-ref annotation "context"))
                     (oll:warn "\"actual-context-id: ~a" (ly:context-id context))
                     (oll:warn "\"context-id\" property: ~a" (assoc-ref annotation "context-id"))
                     (oll:warn "Resulting \"ctx-id\": ~a\n" ctx-id)

This will output like the following for each annotation:

warning: openLilyLib:

"context" property: #f

warning: openLilyLib: "actual-context-id: \new

warning: openLilyLib: "context-id" property: usage-examples

warning: openLilyLib: Resulting "ctx-id": usage-examples


Hopefully you'll get some meaningful information just before the "offending" annotation.
If you can't find it or can't make sense of it you can also send me the whole console output.

Urs


Best
Urs
.
>
>Craig
>
>
>
>On Sat Feb 07 2015 at 11:23:04 AM Urs Liska <address@hidden> wrote:
>
>>
>> Am 07.02.2015 um 00:40 schrieb Urs Liska:
>>
>>
>> Am 07.02.2015 um 00:39 schrieb Craig Dabelstein:
>>
>> Hi List,
>>
>> Sorry for the frustrating question, but how do I combine Samuel's
>code -- @address@hidden@
>> -- with an annotate message such as -- "Should the @\textit{cresc.}
>begin
>> here or immediately after the preceeding address@hidden"
>>
>>
>> You don't do that at all. You simply wait until I have managed to
>update
>> everything and upload it ;-)
>>
>>
>> Sorry, didn't intend to sound harsh ...
>>
>> Now I've fixed a few more things and uploaded it to Github - but you
>have
>> to make significant changes to get anything new, because I've moved
>the
>> whole thing into a new structure within openLilyLib.
>> Sorry to let you switch just after having started, but it's better to
>do
>> The Right Thing now.
>>
>> I will soon write a new post about all this (which I'm extremely
>excited
>> about), but for now just the instructions for using ScholarLY:
>>
>>
>> - Discard the ScholarLY repository
>> (if you'd do git pull you'd probably be surprised to be left with
>only
>> one README file ;-) )
>> - Remove the path to ScholarLY from LilyPond's include path
>> - Download, clone or update openLilyLib (from
>> https://github.com/openlilylib/openlilylib)
>> - Add the /ly directory within that repository to LilyPond's
>include
>> path
>> (If you already use openLilyLib you will have its root directory
>in
>> the include path, and you should keep that for now. Once the
>reorganization
>> is finished this can be removed - but that will take a
>considerable amount
>> of time I
>>
>> Once that is in place you have to modify your documents like this:
>>
>> - remove the \include "scholarly/annotate.ily"
>> - add
>> \include "openlilylib"
>> - add
>> \loadModule "scholarly"
>>
>> Now you can use the annotation commands as before.
>> What is significantly different is the common configuration
>> infrastructure. This is not documented for ScholarLY yet (as said
>I'll make
>> a proper announcement later when it's ready). Basically you can
>configure
>> ScholarLY (or any other to-be-added openLilyLib library) with the new
>> \setOption
>> command that is part of the new openLilyLib infrastructure.
>>
>> As said the options are not documented yet, but you can have a look
>at
>> config.ily in the annotate folder.
>> What you'll need is probably
>>
>> \setOption scholarly.annotate.export-targets #'("latex" "plaintext")
>>
>> You can also experiment with
>>
>> \setOption scholarly.annotate.print ##f
>> \setOption scholarly.annotate.sort-criteria #'("type")
>> \setOption scholarly.colorize ##f
>>
>> Good luck
>>
>>
>> Urs
>>
>>
>>
>> Craig
>>
>>
>> On Sat Feb 07 2015 at 7:49:15 AM Urs Liska <address@hidden>
>wrote:
>>
>>>
>>> Am 06.02.2015 um 22:46 schrieb Br. Samuel Springuel:
>>> > On 2015-02-06 4:18 PM, Noeck wrote:
>>> >> You could also enforce this by now allowing all characters
>between
>>> >> the @:
>>> >> e.g. @[-a-zA-Z\\_]*@
>>> >
>>> > Rather than include all characters not "@" it would be better to
>>> > simply exclude "@". I.e.:
>>> >
>>> > @address@hidden@
>>> >
>>> > The "^", when it is the first character inside a brace changes the
>>> > brace from meaning "anything in this group" to meaning "anything
>not
>>> > in this group". As a result this _expression_ will match an string
>>> > contained between to "@" characters which does not itself contain
>an @
>>> > character.
>>> >
>>> > I'm fairly certain this is standard for regular expressions.
>>>
>>> Maybe. In any case it seems to work for the problem at hand, while
>>> "@.*?@" did not work.
>>>
>>> Thanks
>>> Urs
>>>
>>> >
>>> >
>>> > ✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
>>> > Br. Samuel, OSB
>>> > (R. Padraic Springuel)
>>> >
>>> > PAX ☧ ΧΡΙΣΤΟΣ
>>> >
>>> > _______________________________________________
>>> > lilypond-user mailing list
>>> > address@hidden
>>> > https://lists.gnu.org/mailman/listinfo/lilypond-user
>>>
>>>
>>> _______________________________________________
>>> lilypond-user mailing list
>>> address@hidden
>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>>
>>
>>
>>
>> _______________________________________________
>> lilypond-user mailing
>address@hiddenhttps://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>> _______________________________________________
>> lilypond-user mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

[Prev in Thread] Current Thread [Next in Thread]