[Top][All Lists]

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

Re: separating design from pure score

From: Hans Aikema
Subject: Re: separating design from pure score
Date: Wed, 14 Mar 2012 21:31:38 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0

On 14-3-2012 19:16, Stjepan Horvat wrote:

I'm working on a project and i want to separate the design from score
because i want to have a clear score so that in the future when i
maybe want to change the design i dont have to change the score
(something like html and CSS :) ). So when i include my score into my
design file variables are included but score block also. Now when i
what to change, for example, \mark \default to have a preety box i
dont know where to put it. Is there a way not to include a score block
but all variables, or insert stuff into a score block that is
invisible to me?

If I understand your request correctly you're looking for a similar structure as what I'm working with for generating beamerslides of songs including their music. In that case the \include command is your friend.

What I have in my projects:

- a \paper section containing lots of formatting settings
- a \layout setting containing lots of formatting settings
- an include for yet another lilypond file containing useful scheme functions such as the override-color-for-allgrobs scheme funtion I found in the LSR: - variable definitions for a music staff (muziekbalk) and its associated lyrics (verstekst):
muziekbalk = { \new Staff \new Voice = myMelody { \melodie } }
verstekst = {\new Lyrics \lyricsto "myMelody" { \tekst }}

- an include of format\
- a Score block combining the variables defined in BaseBeamerSlideDesign into an actual Score and override of the grob-colors to get colored output:
=== format/ sample ===
\include ""

\score {
            \applyContext #(override-color-for-all-grobs white)
=== end of format/ ===

Then any song requiring the beamer slide format:
- a \header block
- a variable definition called 'melodie' (which is refered to in the format\ mentioned above) containing the melody of the song - a variable definition called 'tekst' which is refered to in the format\ mentioned above) containing the lyrics of the song
- an include of the format/

=== sample ===
\version "2.15.26"
\header {
    title = "Just some sample song"
melodie = \relative c'' {
    \clef treble
    \time 4/4
    \key c \major
    c d e f \bar "|."
tekst = \lyricmode {
 this is a song
\include format/
=== end of sample ===

The reason for the is that I also have separate files for BeamerNoBars, BeamerNoTimeSignature, BeamerNoTimeSignatureNoBars for different score-tweaks on different songs. All basic formatting is done in BaseBeamerslideDesign, the tweaks for outputting different score types for different subsets of my songs are in these additional lilypond format/*.ly files. The songs than include the appropriate 'tweaked' design from the format folder. Any design change (e.g. font-size, fonts to use, paper-sizing) I can do on BaseBeamerslideDesign and then I can just regenerate all the songs of my library to get updated sheet-music using the new layout.

This 'layering' of definitions can be extended as much as one wants of course, such as for different score setups (I only have need for a single-voice score with accompanying lyrics), someone else might find a need to define eg a set of SATB choral score designs including the baseDesign for the basic layout settings.

Which might lead to for example:
- (font setup, paper setup, staff-sizing setup)
- (variable setup for the 4 voices and accompanying lyrics)
- including the SATBScoreBase and containing a score-block with each voice on its own staff and only lyrics accompanying the Soprano voice - including the SATBScoreBase and containg a score-block with the voices two-by-two on staffs and lyrics accompanying the Soprano and Tenor voices - including the SATBScoreBase and containing a score-block with each voice on its own staff and lyrics accompanying each of the voices

Hans Aikema

reply via email to

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