[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defining bar checks in a variable
From: |
David Kastrup |
Subject: |
Re: Defining bar checks in a variable |
Date: |
Sat, 26 Oct 2013 12:25:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Mike Solomon <address@hidden> writes:
> On Oct 14, 2013, at 6:20 PM, David Kastrup <address@hidden> wrote:
>
>> David Kastrup <address@hidden> writes:
>>
>>> Mike Solomon <address@hidden> writes:
>>>
>>>> hmm…for a slightly less minimal example, I'm trying to do:
>>>>
>>>> bc = |
>>>>
>>>> foo = { \bc \bar "|" }
>>>>
>>>> {
>>>> a a a a a \foo
>>>> }
>>>>
>>>> Any ideas on how to accomplish that?
>>>
>>> Simple. First fix
>>> <URL:http://code.google.com/p/lilypond/issues/detail?id=2392>
Fixed.
> Probably a separate issue, but when I do:
>
> \version "2.17.30"
>
> mybarcheck = { | }
>
> { a \mybarcheck }
>
> I get
>
> GNU LilyPond 2.17.30
> Processing `foo.ly'
> Parsing...
> Interpreting music...
> foo.ly:3:14: warning: barcheck failed at: 1/4
> mybarcheck =
> { | }
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...
> Layout output to `foo.ps'...
> Converting to `./foo.pdf'…
>
> Is there anyway to have the parser spit out the line number of the bar
> check failure instead of the line number of the definition of the
> variable?
No, and it would imply that if you wrote
violinI = { 500 bars of music }
\new Staff { \violinI }
that error messages would point to \new Staff only. As long as the
input origin is a file location rather than a _stack_ of file locations,
one has to make a choice, and this choice makes a lot of sense. Now you
are lucky since if you really need it, you can write
mybarcheck = #(define-music-function (parser location) () #{ { | } #})
{ a \mybarcheck }
and get what you want. That's issue 3153 I think, as of 2.17.13.
--
David Kastrup