On 14-3-2012 19:16, Stjepan Horvat wrote:
Hello,
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:
format/BaseBeamerslideDesign.ly
contains
- 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: http://lsr.dsi.unimi.it/LSR/Item?id=443
- 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 }}
format/BeamerRegular.ly
contains
- an include of format\BaseBeamerslideDesign.ly
- a Score block combining the variables defined in BaseBeamerSlideDesign
into an actual Score and override of the grob-colors to get colored output:
=== format/BeamerRegular.ly sample ===
\include "BaseBeamerslideDesign.ly"
\score {
<<
\applyContext #(override-color-for-all-grobs white)
\muziekbalk
\verstekst
}
=== end of format/BeamerRegular.ly ===
Then any song requiring the beamer slide format:
- a \header block
- a variable definition called 'melodie' (which is refered to in the
format\BaseBeamerslideDesign.ly mentioned above) containing the melody of
the song
- a variable definition called 'tekst' which is refered to in the
format\BaseBeamerslideDesign.ly mentioned above) containing the lyrics of
the song
- an include of the format/BeamerRegular.ly
e.g.:
=== MySong.ly 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/BeamerGewoon.ly
=== end of MySong.ly sample ===
The reason for the BeamerRegular.ly 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:
- baseDesign.ly (font setup, paper setup, staff-sizing setup)
- SATBScoreBase.ly (variable setup for the 4 voices and accompanying lyrics)
- SATBScore-S-A-T-B-SLyrics.ly including the SATBScoreBase and containing a
score-block with each voice on its own staff and only lyrics accompanying
the Soprano voice
- SATBScore-SA-TB-STLyrics.ly including the SATBScoreBase and containg a
score-block with the voices two-by-two on staffs and lyrics accompanying the
Soprano and Tenor voices
- SATBScore-S-A-T-B-LyricsAll.ly including the SATBScoreBase and containing
a score-block with each voice on its own staff and lyrics accompanying each
of the voices
regards,
Hans Aikema
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user