lilypond-user
[Top][All Lists]
Advanced

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

Re: MIDI track names


From: Heikki Tauriainen
Subject: Re: MIDI track names
Date: Tue, 04 Aug 2015 12:47:37 +0300

On Mon, 2015-08-03 at 18:39 +0200, David Kastrup wrote:

> > > From lily/control-track-performer.cc:

[...]

> > > No idea what happens when the Control_track_performer gets
> > > removed but I doubt it's useful.

>From the same file it appears that the Control_track_performer is
interested in tempo or time signature changes, which would be
consistent with the guideline

    In [MIDI file] format 1, the very first MTrk should consist of only
    the tempo (and time signature) events [...]

(source: <
http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/midifile/tempo.htm>
; LilyPond MIDI files are format 1 files as the "format" parameter to
the Midi_header constructor [lily/midi-chunk.cc] is always 1
[lily/performance.cc].)

My guess is that removing the Control_track_performer will result in
losing support for tempo and time signature changes in MIDI output.

I've no idea whether the name "control track" also has some special
meaning, although that would (in light of the above guideline that the
track should be the initial track of a MIDI file) seem oddly
restrictive since, according to (for example) <
http://www.fileformat.info/format/midi/corion.htm>, the name of the
first track of a format 1 MIDI file gives a name for the entire MIDI
sequence (see the "Sequence/Track Name" meta-event).

> > 
> > Has the control track performer access to the metadata from 
> > \header{}?
> > In that case, I suggest to default the name to header’s „title“
> > setting.  What do you think?
> 
> Could work.  Haven't looked into MIDI a lot though.

Using properties from the \header block (which sounds in principle like
a nice idea) is probably made more complicated by the fact that the
title metadata in a \header block can be arbitrary LilyPond markup, and
not necessarily a plain string that could be passed through directly to
the MIDI output file (and still get "acceptable" output).  To avoid
possible problems with complex markups, a safer (and more general, in
case the user really wishes to use a MIDI sequence name different from
the title) option would be to just have support for customizing the
name of the MIDI sequence independently of the \header block (for use
by the Control_track_performer).

-- 
Heikki Tauriainen




reply via email to

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