Thomas Morley <thomasmorle...@gmail.com> writes:

> I had a look at your code and did some experiments.
>
> I was very surprised that the following seems to work (outputting pdf and 
> midi)
>
> myL =
> \layout {
>   \context {
>     \Staff
>     \name MyCustomStaff
>     \alias Staff
>     \consists "Pitch_squash_engraver"
>     squashedPosition = #0
>     \override NoteHead #'style = #'slash
>     \override Stem #'transparent = ##t
>     \override Flag #'transparent = ##t
>   }
>   \context { \Score \accepts MyCustomStaff }
> }
>
> \score {
>   <<
>     \new Staff {
>       c' d' e' f'
>     }
>     \new MyCustomStaff {
>       c' d' e' f'
>     }
>   >>
>   \midi { \myL }
> }

It doesn't output Midi for me.

> Is this really valid code?

If an output block _starts_ with an output definition, then this output
definition is cloned and is entirely responsible for the result;
otherwise $defaultlayout, $defaultmidi, $defaultpaper are used as
templates.  If the result is a layout block, then the result is used as
a layout block.  This is not exactly intuitive: it might make sense to
verify that the type of output definition matches what the syntax calls
for and give an error message otherwise.

The "type" of output definition is actually established rather flimsily:
there is a definition is-paper, is-midi or is-layout set to #t in the
output definition's module.

-- 
David Kastrup

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

Reply via email to