Re: Score layout in a separate file
On Tue, 2012-04-03 at 15:17 +0200, Siska Ádám wrote: Dear List, is there a way to put the layout block for a score in a variable that lives in a separate file? Unfortunately the following won't compile: This does something similar: http://www.openguitar.com/files/slyce.py Regards, daveA -- Guitar teaching materials and original music for all styles and levels. Site: http://www.openguitar.com (()) eMail: d.raleigh.arn...@gmail.com Contact: http://www.openguitar.com/contact.html ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Score layout in a separate file
Dear List, is there a way to put the layout block for a score in a variable that lives in a separate file? Unfortunately the following won't compile: myMusic = \relative d' { d4 d d d } myLayout = \layout { \context { \Staff \remove Clef_engraver } } \score { \myMusic \myLayout } I tried several other ways to export the content of the layout block, but none of them succeeded. I'm writing parts of an orchestral piece and I'd like to include the layout definition for these scores in a separate file. Thanks for any help, Ádám ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Score layout in a separate file
Am 3. April 2012 15:17 schrieb Siska Ádám sa...@sadam.hu: Dear List, is there a way to put the layout block for a score in a variable that lives in a separate file? Unfortunately the following won't compile: myMusic = \relative d' { d4 d d d } myLayout = \layout { \context { \Staff \remove Clef_engraver } } \score { \myMusic \myLayout } I tried several other ways to export the content of the layout block, but none of them succeeded. I'm writing parts of an orchestral piece and I'd like to include the layout definition for these scores in a separate file. Thanks for any help, Ádám Hi, try: \layout { \myLayout } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Score layout in a separate file
On Apr 3, 2012, at 8:17 AM, Siska Ádám wrote: is there a way to put the layout block for a score in a variable that lives in a separate file? Unfortunately the following won't compile: have you tried using \include? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Score layout in a separate file
On 2012.04.03., at 15:46, Thomas Morley wrote: Am 3. April 2012 15:17 schrieb Siska Ádám sa...@sadam.hu: Dear List, is there a way to put the layout block for a score in a variable that lives in a separate file? Unfortunately the following won't compile: myMusic = \relative d' { d4 d d d } myLayout = \layout { \context { \Staff \remove Clef_engraver } } \score { \myMusic \myLayout } I tried several other ways to export the content of the layout block, but none of them succeeded. I'm writing parts of an orchestral piece and I'd like to include the layout definition for these scores in a separate file. Thanks for any help, Ádám Hi, try: \layout { \myLayout } Cheers, Harm Hi, thanks a lot, this works! Out of curiosity, could you or somebody on the list explain to me why this works? It is a bit weird to me, as I also tried to have the variable without the \layout in it (so that it was myLayout = \context { etc. } and then I used \layout { \myLayout } ), but that didn't work either. I'm just surprised that this solution (which reads at the end \layout { \layout { etc. } } ) will compile... Thank you, Ádám ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Score layout in a separate file
On 4/3/12 15:17 , Siska Ádám wrote: Dear List, is there a way to put the layout block for a score in a variable that lives in a separate file? Unfortunately the following won't compile: myMusic = \relative d' { d4 d d d } myLayout = \layout { \context { \Staff \remove Clef_engraver } } \score { \myMusic \myLayout } I tried several other ways to export the content of the layout block, but none of them succeeded. I'm writing parts of an orchestral piece and I'd like to include the layout definition for these scores in a separate file. You must put the variable call inside a \layout block: \score { \myMusic \layout { \myLayout } } will work fine. Best. -- Choan Gálvez Ukecosas. Los ukeleles que nos gustan, también para ti Visítanos: http://ukecosas.es/ Degústanos en Facebook: http://facebook.com/ukecosas ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Score layout in a separate file
Siska Ádám sa...@sadam.hu writes: On 2012.04.03., at 15:46, Thomas Morley wrote: Am 3. April 2012 15:17 schrieb Siska Ádám sa...@sadam.hu: Dear List, is there a way to put the layout block for a score in a variable that lives in a separate file? Unfortunately the following won't compile: myMusic = \relative d' { d4 d d d } myLayout = \layout { \context { \Staff \remove Clef_engraver } } \score { \myMusic \myLayout } try: \layout { \myLayout } thanks a lot, this works! Out of curiosity, could you or somebody on the list explain to me why this works? The LilyPond grammar in the appendices of the NR will show what to use here. It is a bit weird to me, as I also tried to have the variable without the \layout in it (so that it was myLayout = \context { etc. } and then I used \layout { \myLayout } ), but that didn't work either. I'm just surprised that this solution (which reads at the end \layout { \layout { etc. } } ) will compile... Variables in LilyPond are not textual entities but Scheme expressions. Some keywords like \layout throw LilyPond into a mode, like one suitable for creating output definitions, or drum parts or whatever. And to interpret such a variable, you sometimes need to be in the right mode already (because the information _what_ kind of output definition is in the variable created by \layout is not there). Basically, when putting stuff into a variable and reusing the result, you are safer off if you consult the grammar when things go wrong. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user