[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI us
From: |
lilypond |
Subject: |
[Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block |
Date: |
Wed, 05 Aug 2015 07:56:20 +0000 |
Status: New
Owner: ----
New issue 4539 by address@hidden: Set the sequence name in MIDI
using title information from \header block
https://code.google.com/p/lilypond/issues/detail?id=4539
https://codereview.appspot.com/256230045/
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).
For testing, I used the following LilyPond code:
----
\version "2.19.25"
\header {
title = "Top-level title"
}
% Book A without a title defined in a \header block
\book {
\bookOutputName "A"
% A: score without a title in Book A -- will get the top-level title
\score {
\new Staff { c1 }
\midi { }
}
% A-1: score with a title defined in a nested \header block (in Book A) --
% will get the title in this \header block
\score {
\new Staff { c1 }
\header { title = "Score in Book A" }
\midi { }
}
% A-2: score with a title and a separate MIDI title defined in a nested
% \header block (in Book A) -- will get the MIDI title in this \header
block
\score {
\new Staff { c1 }
\header {
title = "Another score in Book A"
midititle = "MIDI title"
}
\midi { }
}
}
% Book B with a title defined in a \header block
\book {
\bookOutputName "B"
\header { title = "Book B" }
% B: score without a title in Book B -- will get the title of Book B
\score {
\new Staff { c1 }
\midi { }
}
% B-1: score with a \header block (and title) of its own (in Book B) --
will
% get the title in this \header block
\score {
\new Staff { c1 }
\header { title = "Score in Book B" }
\midi { }
}
}
% Book C: book with a title defined in a \header block with book parts
\book {
\bookOutputName "C"
\header { title = "Book C" }
% Book part in Book C with a title of its own
\bookpart {
\header { title = "Part 1 in Book C" }
% C: score without a title (in Part 1 of Book C) -- will get the title
of
% its enclosing book part
\score {
\new Staff { c1 }
\midi { }
}
% C-1: score with a \header (and a title) of its own (in Part 1 of Book
C)
% -- will get this title
\score {
\new Staff { c1 }
\header { title = "Score in Part 1 of Book C" }
\midi { }
}
}
% C-2: score without a title outside any book part of Book C -- will get
the
% title of Book C
\score {
\new Staff { c1 }
\midi { }
}
% Book part in Book C with no \header block
\bookpart {
% C-3: score without a \header block (in Part 2 of Book C) -- will get
the
% title of Book C
\score {
\new Staff { c1 }
\midi { }
}
% C-4: score with an explicit title (in Part 2 of Book C) -- will get
this
% title
\score {
\new Staff { c1 }
\header { title = "Score in Part 2 of Book C" }
\midi { }
}
}
}
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block,
lilypond <=
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/05
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/05
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/05
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/05
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/05
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/06
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/06
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/07
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/07
- Re: [Lilypond-auto] Issue 4539 in lilypond: Set the sequence name in MIDI using title information from \header block, lilypond, 2015/08/07