where goes \midi {}

View: New views
2 Messages — Rating Filter:   Alert me  

where goes \midi {}

by yota () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello everybody,

I read the manual thoroughly (twice) and yet.
To do it beautifully I used \new Score, Staff, Voice stuffs, the problem came with \with :) , the corollary was I could not found any example fitting my case.
So I tried to put \midi{} it everywhere.... and failed

here is the file...

please mark an 'X' where I could insert my \midi {} to get the expected result :)

Thank you m(_ _)m


\version "2.13.0"
\include "italiano.ly"

\book {
        \paper { }
        \header {
                title = "title"
        }
        \bookpart {
                \paper { }
                \header {
                        instrument = "conductor"
                }
                \new Score \with {
                        \override VerticalAlignment #'max-stretch = #ly:align-interface::calc-max-stretch
                }
                {
                        \new GrandStaff <<
                                \new StaffGroup <<
                                        \new Staff {do' re' mi' fa'}
                                        \new Staff {do' re' mi' fa'}
                                        \new Staff {do' re' mi' fa'}
                                >>
                                \new PianoStaff <<
                                        \new Staff {do' re' mi' fa'}
                                        \new Staff \with {
                                                \override VerticalAxisGroup #'keep-fixed-while-stretching = ##t
                                        }
                                        {do' re' mi' fa'}
                                >>
                                \new StaffGroup <<
                                        \new Staff {do' re' mi' fa'}
                                        \new Staff {do' re' mi' fa'}
                                >>
                        >>
% <- here I get a *.ly::: error: syntax error, unexpected \midi
                }
% <- here I get a *.ly::: error: need \paper for paper block
        }
% <- here I get a *.ly::: error: need \paper for paper block
}

Re: where goes \midi {}

by yota :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

found ... in doc

MIDI output is created only when a \midi block is included within a score block defined with a \score command. If it is placed within an explicitly instantiated score context (i.e. within a \new Score block) the file will fail. To solve this, enclose the \new Score and the \midi commands in a \score block.

    \score {
      \new Score { …notes… }
      \midi { }
    }


which is pretty dirty :)