Compiling standalone lilypond files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Compiling standalone lilypond files

Raitis Veinbahs

## Intro
I'm trying to make a little project for myself to gather tunes I know.
It has a primitive UI, but you can see tunes, their descriptions and rendered lilypond sheets.

[there will be sample files attached]

## Problem
That works and is great, but I'd like to be able to make compilation PDFs of the tunes without
having two different source files, but that currently doesn't work.

The reason why compilations currently don't work is because the pieces sometimes contain
multiple score parts, that both use a variable, but variables can't be declared in a \book
part, so they can't be included neither directly nor via an \include.

## Solution?
I'd be more than happy to alter them programmatically and I took a look at python-ly, but I've
yet to master its API, because I haven't found many examples yet.

I'm thinking I could cut all the variable definitions out and put them before \book and also
fix any variable naming collisions, if there are any.

## Questions

1. Does anyone know where I could find some python-ly transformation code examples before I've
    either found them myself or figured out the API? Or offer me some code?

2. MAYBE there's a better way of combining the small files. I could combine the PDF outputs,
    but as this is a toy project, I'm happy to explore more unconventional solutions.

Thank you!

lilypond-user mailing list
[hidden email] (636 bytes) Download Attachment (114 bytes) Download Attachment (238 bytes) Download Attachment