lilypond-user
[Top][All Lists]
Advanced

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

Re: separating design from pure score


From: Urs Liska
Subject: Re: separating design from pure score
Date: Thu, 15 Mar 2012 19:59:49 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Hi Stjepan,

sorry that I don't have the time to really go through this thread (so I might misunderstand sth).

But I think you should separate your music variables from your score definition, so you can \include them separately:

music.ly
myMusic = { ... }

score.ly
\score {
    \new Staff <<
      \myMusic
      \myMarks
>>
}


Then you can have your master file like:

\include "music.ly"
myMarks = { ... }
\include "score.ly"

Does that help?

Best
Urs

Am 15.03.2012 11:23, schrieb Stjepan Horvat:
Hello all..thank you for you anwsers..i really appreciate it..It's not
exactly what i wanted..but it helps me figure out more what i want and
what will be my solution..!

David Kastrup leads in this direction what i'm trying ta achive..The
diference form Hans Aikema is that i want to include music in a
diffrent file which i compile afterwords..The reason for that is that
i want to define music as is..Becouse each song is uniq and
unchangable..So i dont ever have to change the music file.

For Example:
1. I want the score to be minimalistic and to be sufficient in itself.

===== score.ly =====
\verison "2.14.2"
\header { title = "TITLE" composer = "COMPOSER" }
mymusic = \relative c' { c4 d e f \mark \default g }
mylyrics = \lyricmode { c d e f g }
mychords = \chordmode { c1 c4 }
\score {
<<
\new ChordNames { \mychords }
\new Staff { \mymusic }
\addlyrics { \mylyrics }
}
==== end of score.ly ====

Minimalistic as i said. Maybe even without \mark \default.

So now in design.ly i would set the fonts and paper and whatever would
be static in project period. I think the layout should work here.

And on the end.

==== master.ly ====
\include "./desing.ly"
\include "./score.ly"

%now here should go the paddings for this specifig song couse every
song looks difrent and has diffrent bar numbers..Now i would want to
maybe use \break command but inside the score..So here comes my
problem. Becouse the score block is included while including score.ly
(i would want only the variable to be included) i can't make a mark
blok where i would define simple marks and bar brakes.

paper {
markup-system-spacing #'padding = #5
markup-system-spacing #'stretchability = #5
score-system-spacing #'padding = #5
last-bottom-spacing #'padding = #5
score-markup-spacing #'padding = #5
top-system-spacing #'padding = #17.5
}

marks = {
   \set Score.markFormatter = #format-mark-box-barnumbers
   \hideNotes
   R1 \break
   \bar "||"
   \mark \default
   \unHideNotes
   \bar "|."
}

\score {
<<
\new ChordNames { \mychords }
\new Staff {<<  \mymusic \marks>>}
\addlyrics { \mylyrics }
}

==== end of master.ly ====

I would only compile the maste.ly file..

I think i made myself clear..:) Thanks for further guidence.


On Wed, Mar 14, 2012 at 9:31 PM, Hans Aikema<address@hidden>  wrote:
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






reply via email to

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