[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DevNull produces strange output
From: |
Thomas Morley |
Subject: |
Re: DevNull produces strange output |
Date: |
Mon, 29 Oct 2012 23:57:30 +0100 |
2012/10/29 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> writes:
>
>> Hi,
>>
>> accidently I noticed that DevNull produces some weird output, if its
>> argument contains an override to TabStaff, VaticanaStaff or
>> RhythmicStaff (this list may be not complete)
>>
>> \version "2.17.4"
>>
>> mus = {
>> \override TabStaff.TabNoteHead #'color = #red
>> % same with:
>> % \override VaticanaStaff.NoteHead #'color = #red
>> % \override RhythmicStaff.NoteHead #'color = #red
>> % but not with, p.e.:
>> % \override Staff.NoteHead #'color = #red
>> c1
>> }
>>
>> \score {
>> <<
>> \new Devnull \mus
>> %\new Staff \mus
>> %\new TabStaff \mus
>> %\new VaticanaStaff \mus
>> %\new RhythmicStaff \mus
>> >>
>> }
>>
>> Is this a bug (in this case I'll create a bugreport) or expected behaviour?
>
> It is pretty much expected behavior. The output is the same as
>
> \score { << \new TabStaff {} \skip 1 >> }
>
> which spends, in the grand total of things, a time of a whole note and
> creates a TabStaff. The definition of Devnull is
>
> \context {
> \name "Devnull"
> \type "Engraver_group"
>
> %% don't want to route anything out of here:
> \alias "Staff"
> \alias "Voice"
> \description "Silently discards all musical information given to this
> context."
> }
>
> and it is accepted by \Score. So it will capture overrides to Staff and
> Voice (and Devnull), but anything else will create a context of the
> appropriate type in the containing \Score context and direct the
> override there.
>
> To change this, Devnull would either need to contain more aliases, or it
> would need to \accept the respective contexts itself or have a
> \defaultchild accepting them. But in the latter cases, those contexts
> would be fully operative, defeating the idea of Devnull.
Thanks for clarification!
> Should Devnull try to be an alias for every context type? Good
> question.
Don't know. As said, I stumbled over it by accident and so far haven't
thought deeper about it.
-Harm