lilypond-user
[Top][All Lists]
Advanced

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

Compiling standalone lilypond files


From: Raitis Veinbahs
Subject: Compiling standalone lilypond files
Date: Wed, 10 Oct 2018 16:41:20 +0300

Hi,

## 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!

Attachment: big.ly
Description: Text Data

Attachment: small.ly
Description: Text Data

Attachment: small-variables.ly
Description: Text Data


reply via email to

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