lilypond-user
[Top][All Lists]
Advanced

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

Re: midi doesn't work with custom Voice contexts


From: David Kastrup
Subject: Re: midi doesn't work with custom Voice contexts
Date: Tue, 10 Sep 2013 09:58:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Thomas Morley <address@hidden> 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



reply via email to

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