On Fri, Nov 28, 2025 at 7:00 AM Gabriel Ellsworth < [email protected]> wrote:
> In my choir, each singer has an assigned number, akin to an athlete’s > jersey number. Whenever we print a new piece, we number our set of paper > copies, using a Bates automatic-numbering machine > <https://en.wikipedia.org/wiki/Bates_numbering> to stamp the hard-copy > scores with each chorister’s number. > > I am hoping to create an automated and digital alternative to Bates > numbering within LilyPond. The goal: Have LilyPond generate a single PDF > file that I can send to the printer. This file would contain NN copies of > my score (where NN is a numerical variable that I can tweak). Every hard > copy would be identical to every other (same page numbering, same \header > content), except for the “Copy #” field. > > The simplified minimal working example below assumes that my choir > comprises only two singers. In reality, I’d like to be able to tell > LilyPond to “put NN numbered copies in the single PDF output file.” And > even better, if possible, would be a bit more customization: “LilyPond, > please generate copies labeled ‘#1’, ‘#2’ … ‘#24’, ‘#25’, ‘Choirmaster > Copy’, and ‘Organist Copy’.” > > Does anyone know how I might be able to do this? For example, a CSV file > from which LilyPond fills in the copy labels? (The spreadsheet rows might > read #1, #2, … #24, #25, Choirmaster Copy, Organist Copy.) > > You can do this with a shell script. If you have Linux or macOS bash, then you're in luck. Otherwise, you'll need someone to translate the script into Windows batch or PowerShell. Or maybe there's an easier way to do this. I've attached the shell script and the LilyPond sample input file to demonstrate how this could work. -- Knute Snortum
choir-copies
Description: Binary data
\version "2.24.4"
#(use-modules (guile-user))
myTitlePage = \markup \fill-line \huge { "This Is My Title Page" }
myScore = { c' \pageBreak d' \pageBreak e' }
\paper { bookpart-level-page-numbering = ##t }
\bookpart {
\markup { Copy #copyNumber }
\myTitlePage
\pageBreak
\myScore
}
