See "Creating MIDI files" in the manual. To quote this instruction, the
\midi{...} block should be included at the end of the \score{...}:

\score {
  ...music...
  \midi { \tempo 4=72 }
}

In your example, the final curly brace of the \score{...} block is
missing, but you should try a structure like
\score{
  ...music...
  \layout{...}
  \midi{...}
}

However, there is an additional complication in your example, namely
\atonicKey, which seems to confuse LilyPond completely when it tries to
output MIDI. For some reason, the alternative definition of \atonicKey
that I proposed in http://lists.gnu.org/archive/html/lilypond-user/2005-09/msg00035.html
seems to work, at least you get some MIDI output.

   /Mats

Mehmet Okonsar wrote:
Hello users and creators of the best music notation program in the world!
As always I have a simple question:

in a file setup like this I have no midi output, no matter where I do
put the \midi block..:
where can I put the \midi block?

%---------------------------------------------------------------------
\version "2.7.10"
\include "english.ly"

\header {}

atonicKey =
  #(def-music-function (parser location) ()
     #{ #(ly:export (make-music 'EventChord
                     'origin $location
                     'elements (list (make-music 'KeyChangeEvent
                                      'tonic (ly:make-pitch -1 4 0)
                                      'pitch-alist '((4 . 5)
                                                     (5 . 5)
                                                     (6 . 5)
                                                     (0 . 5)
                                                     (1 . 5)
                                                     (2 . 5)
                                                     (3 . 5))))))
        \set Score . extraNatural = ##f #})

unmeteredOn =
    {
        \set Timing.measureLength = #(ly:make-moment 1 4)
        \set Timing.automaticBars = ##f
    }
\score {
\new PianoStaff {
    \unmeteredOn {
<<
    \context Staff = "RH"
    {   \atonicKey
        \clef treble
% ---> rh notes here <---
c''1

\bar "|."
    }
    \context Staff = "LH"
    {   \atonicKey
        \clef bass
% ---> lh notes here <---
c1

\bar "|."
    }

}
}
%====================================================================== LAYOUT 
BLOCK
\layout
{
    indent = 2\cm
    \context
    {
        \Staff
            \remove "Time_signature_engraver"
    }
}

%===================================================================== PAPER 
BLOCK
\paper
    {
        #(set-default-paper-size "a4" ) % ----- set other formats here

    }


------------- Best regards,
Mehmet Okonşar, pianist-composer
www.okonsar.com
[EMAIL PROTECTED]



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

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
        Fax:   (+46) 8 790 7260
        Email: [EMAIL PROTECTED]
        WWW: http://www.s3.kth.se/~mabe
=============================================


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

Reply via email to