]> git.donarmstrong.com Git - lilypond.git/commit
Set the sequence name in MIDI using title information from
authorHeikki Tauriainen <g034737@welho.com>
Sat, 15 Aug 2015 19:33:31 +0000 (21:33 +0200)
committerThomas Morley <thomasmorley65@gmail.com>
Sat, 15 Aug 2015 19:37:41 +0000 (21:37 +0200)
commitab6b5b6312019ac4d6ea8af57b2ba5aa4295b42f
tree3774e35663efbda24d57e18e10806f9821a177fd
parent276f82fe50790b2d6acb7177a68991664b06e64d
Set the sequence name in MIDI using title information from
 \header block

issue 4539

This patch adds support for setting the MIDI sequence name for MIDI output files
using the value of the "midititle" field from a relevant \header block, and
falling back to using the "title" field if "midititle"
has not been defined.  (This should be analogous to how "pdftitle" and "title"
work for customizing PDF metadata.)

The purpose of the change is to improve the previous behavior where the name of
every MIDI sequence created by LilyPond used to be shown by MIDI synthesizers as
"control track" (previously, this string was hard-coded as the name of every
initial track of MIDI files created by LilyPond by Control_track_performer).

The patch
  * extends every Performance instance with a reference to a \header block
associated with the performance, adds Scheme library routines for getting and
setting the associated \header (modeled after corresponding routines available
for the Score class), and updates the Book::process_score function to initialize
the header information of Performance objects attached to a score;
  * adds a "name" parameter to the Performance output routines, used for
updating the track name in the performance's first Audio_staff (assumed to
represent the control track) before outputting MIDI; and
  * changes the write-performances-midis function (in scm/midi.scm) to query the
MIDI sequence name for a performance from the performance's \header block
(adapted from the handle-metadata function in scm/framework-ps.scm).
  * adds two regtests
Documentation/changes.tely
input/regression/midi/sequence-name-scoping.ly [new file with mode: 0644]
input/regression/midi/sequence-name.ly [new file with mode: 0644]
lily/book.cc
lily/control-track-performer.cc
lily/include/audio-staff.hh
lily/include/performance.hh
lily/performance-scheme.cc
lily/performance.cc
scm/midi.scm