Re: separating design from pure score
Yes..i think it does..:) On 3/15/12, Urs Liska li...@ursliska.de wrote: 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 Aikemahans.aik...@aikebah.net 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
Re: separating design from pure score
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 hans.aik...@aikebah.net 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
Re: separating design from pure score
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 Aikemahans.aik...@aikebah.net 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)
Re: separating design from pure score
On 3/14/2012 6:16 PM, 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? I don't know if this is helpful or not, but when I'm coding something from an old part, or manuscript, I'll define: mBreak = \break ...and then use \mBreak to make the line breaks the same as the original, while I'm working on it, for easier error checking. Then when I'm done with the input I change the definition to: mBreak = {} ...and LilyPond decides where the line breaks should be. Could you do something like that to achieve what you're after? It's also possible to make layers and then put them together like this: something = { time and key signature info } somethingElse = { the music itself } somethingMore = { line breaks, rehearsal marks etc. } \score { \relative c { \set Score.skipBars = ##t \something % time sigs, key sigs \somethingElse % notes etc. \somethingMore % line breaks etc. } } Or am I not really understanding the question? -David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: separating design from pure score
Stjepan Horvat zvanste...@gmail.com writes: 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? \layout { \context { \Score markFormatter = #format-mark-box-numbers } } In newer versions, it will work to write \layout { \set Score.markFormatter = #format-mark-box-numbers } So you can just pull in the \set command documented in URL:http://lilypond.org/doc/v2.14/Documentation/notation/bars#rehearsal-marks into your \layout block, and it will get translated into the first form automagically. Most of the layout stuff can be specified in the \layout block, and it has become easier in the most recent versions since you can just pull in most layout-changing _music_ here, and have it converted into the respective context definitions. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: separating design from pure score
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 lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user