lilypond-user
[Top][All Lists]
Advanced

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

Re: MIDI Tempo Off...Everywhere


From: Mats Bengtsson
Subject: Re: MIDI Tempo Off...Everywhere
Date: Fri, 17 Oct 2003 12:19:05 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Thanks for the analysis.

I haven't contributed with many lines of code to LilyPond, but I'm
afraid I might be the culprit for this problem. I just found a copy
of a patch I submitted in summer 1999 where I removed the tempo setting
in track 0.

The reason was that I introduced support for tempo changes in the
middle of a piece and did this by adding tempo changing commands in
the track corresponding to the stave where the tempo change was
specified. This worked well with all the MIDI sequencers I had
access to. The only problem was that different sequencers read the
tracks in different order so if you had one \tempo declaration in
the \midi{...} block (which ended up in Track 0) and another in the
beginning of some stave (which ended up in the corresponding track),
I would get different tempi for different sequencers.

Anyway, I'm still curious to hear from a MIDI expert how tempo changes
in the middle of a piece should be specified in a MIDI file? Should they
also be inserted (only) in track 0?

   /Mats

Nigel Warner wrote:
        Dear All,

        After running a check I believe that the problems people
        are having with MIDI and Tempo are because Lilypond does
        not do "the right thing".

        Picking apart the MIDI output for a simple file:

        panfluteAA = \notes {
        \time 3/4
        r2 \times 2/3 { d'8 e' g' }  |
        g'4 fis' g' |
        a' a'2   ~ |   a'   g'8( e')
        }
        \score {
        \context Voice \panfluteAA
        \paper { }
        \midi{  }
        }


MFile 1 2 384
MTrk
0 Meta Text "Creator: GNU LilyPond 2.0.1            "
0 Meta Text "Generated automatically by: GNU LilyPond 2.0.1            "
0 Meta Text "at Thu Oct 16 18:16:28 2003                                 "
0 Meta Text "from musical definition:
/home/nigel/LilySource/TempoCheck.ly:9:25"

0 Meta SeqName "Track 0"
0 Meta TrkEnd
TrkEnd
MTrk
0 Meta TrkName ""
0 Tempo 1000000
0 TimeSig 3/4 18 8
768 On ch=1 n=62 v=127
896 Off ch=1 n=62 v=64
896 On ch=1 n=64 v=127
1024 Off ch=1 n=64 v=64
1024 On ch=1 n=67 v=127
1152 Off ch=1 n=67 v=64
1152 On ch=1 n=67 v=127
1536 Off ch=1 n=67 v=64
1536 On ch=1 n=66 v=127
1920 Off ch=1 n=66 v=64
1920 On ch=1 n=67 v=127
2304 Off ch=1 n=67 v=64
2304 On ch=1 n=69 v=127
2688 Off ch=1 n=69 v=64
2688 On ch=1 n=69 v=127
4224 Off ch=1 n=69 v=64
4224 On ch=1 n=67 v=127
4416 Off ch=1 n=67 v=64
4416 On ch=1 n=64 v=127
4608 Off ch=1 n=64 v=64
4608 Meta TrkEnd
TrkEnd

        This is not good MIDI. In a format 1 file, a file containing multiple
tracks, Tempo changes should only appear in the Conductor track, track 0,
which should only contain System Common messages. Quicktime, and other
MIDI file players, are within their rights to ignore tempo changes, key
signatures and time signatures which appear in tracks other than 0 which
should only contain Channel Mode messages and Meta Events.

        The reason I know this is because I have experimented with various
combinations of data and MIDI reading software and have come to the
conclusion that the only safe way is to ensure that the constraints
as above are obeyed. The results of feeding a disobedient file into
Sibelius, Finale and others are widely inconsistent and appear to depend
on whim.

        I would consider this to be a buglet.

        Regards,

        Nigel.





_______________________________________________
Lilypond-user mailing list
address@hidden
http://mail.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: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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