Re: Function with conditional

2025-03-20 Thread Lukas-Fabian Moser
Hi all, You could write this function more briefly as below. I wonder if there is any ambiguity about transposition by, for example, one semitone: should it be \transpose c cis or \transpose c des ? \version "2.24.0" #(define pitches (vector #{c#} #{des#} #{d#} #{es#} #{e#} #{f#} #{fis#} #{g#}

Re: Function with conditional

2025-03-20 Thread Lucas Cavalcanti
At the moment I'm trying to resolve an specific issue that would not fall on enharmonic ambiguity, so writing with those intervals made sense in this situation (tonic and dominant being perfect, subdominant being perfect or augmented, and all the rest being major or minor). Still, thank you very mu

Re: Function with conditional

2025-03-20 Thread Timothy Lanfear
On 20/03/2025 11:44, Lucas Cavalcanti wrote: Hello, Lukas. I've re-drafted a mock up of the function in question. but now the mock up actually worked... I was just not adding the hash "#" to the number argument Still, I'll attach the function below to see if it can be better optimized. Yo

Re: Function with conditional

2025-03-20 Thread Lucas Cavalcanti
Hello, Lukas. I've re-drafted a mock up of the function in question. but now the mock up actually worked... I was just not adding the hash "#" to the number argument Still, I'll attach the function below to see if it can be better optimized. %%CODE BEGINS %% someFunction = #(define-music-funct

Re: Function with conditional

2025-03-20 Thread Lukas-Fabian Moser
Hi Lucas, this sounds absolutely possible, but can you please give more details or - better still - an example of what you want to achieve? Lukas Lucas Cavalcanti schrieb am Do., 20. März 2025, 02:05: > Hello! I'm in need of help in regards to writing a music function that has > conditions ins

Function with conditional

2025-03-19 Thread Lucas Cavalcanti
Hello! I'm in need of help in regards to writing a music function that has conditions inside it: I need my argument (a number between 1 to 12) to be evaluated by an if statement, so that it can run "\transpose c someNote". This function would reduce a lot of code to a project of mine. I've only fou

Re: Conditional code in the midi block

2024-05-20 Thread Carolyn Beeton
Thank you all for your suggestions. I finally have the flag working after years of just editing my master file when I wanted one track per voice! Thanks, Carolyn > On May 20, 2024, at 6:09 AM, Jean Abou Samra wrote: > >  >> nostaffmidi = >> #(define-scheme-function () () >> (if TrackPerVoic

Re: Conditional code in the midi block

2024-05-20 Thread David Kastrup
Jean Abou Samra writes: > Alternatively, you can do it more like you were envisioning, but for > technical reasons, you have to start the Scheme code with $ , not # , > and you also have to include an extra \midi { } around the \context > blocks (basically because \context outside \layout or \mid

Re: Conditional code in the midi block

2024-05-20 Thread Thomas Morley
Am So., 19. Mai 2024 um 21:28 Uhr schrieb Carolyn Beeton : > > I would like to include some Staff and Voice context settings in the \midi > block only if a flag is set to ##t and I have not been able to figure out how > to do this. When I try to wrap the \context blocks in a code block with > #

Re: Conditional code in the midi block

2024-05-20 Thread Jean Abou Samra
> nostaffmidi = > #(define-scheme-function () () >(if TrackPerVoice #{ \context { \Staff \remove "Staff_performer" } #})) Ah, that proves me wrong. I didn't recall the parser was smart enough for this. > Although, I don't understand why the contents of the scheme functions cannot > be pla

Re: Conditional code in the midi block

2024-05-20 Thread Jean Abou Samra
> I would like to include some Staff and Voice context settings in the > \midi block only if a flag is set to ##t and I have not been able to > figure out how to do this.  When I try to wrap the \context blocks > in a code block with #{…#} I get this error: > trackPerVoiceMWE.ly:31:16: error: synt

Re: Conditional code in the midi block

2024-05-20 Thread Timothy Lanfear
On 19/05/2024 20:27, Carolyn Beeton wrote: I would like to include some Staff and Voice context settings in the \midi block only if a flag is set to ##t and I have not been able to figure out how to do this. When I try to wrap the \context blocks in a code block with #{…#} I get this error: t

Conditional code in the midi block

2024-05-19 Thread Carolyn Beeton
I would like to include some Staff and Voice context settings in the \midi block only if a flag is set to ##t and I have not been able to figure out how to do this. When I try to wrap the \context blocks in a code block with #{…#} I get this error: trackPerVoiceMWE.ly:31:16: error: syntax error

Re: Conditional markup? UP|DOWN

2024-05-01 Thread Pierre-Luc Gauthier
Thank you so much Aaron, How could I have *never* used chain-assoc-get. I've read the docs about it since then. I also used (display props) to know what was available (which by itself was instructing). Again, I'm very grateful for your help. Le lun. 29 avr. 2024, à 12 h 43, Aaron Hill a écrit :

Re: Conditional markup? UP|DOWN

2024-04-29 Thread Aaron Hill
On 2024-04-29 7:50 am, Pierre-Luc Gauthier wrote: Can a markup command introspect its direction ? Is it possible to set in a markup command some conditionals (not paper related) ? \version "2.25.15" #(define-markup-command (conditionalMrkp layout props) () (interpret-markup layout props

Conditional markup? UP|DOWN

2024-04-29 Thread Pierre-Luc Gauthier
Can a markup command introspect its direction ? Is it possible to set in a markup command some conditionals (not paper related) ? \version "2.25.15" #(define-markup-command (conditionalMrkp layout props) () (interpret-markup layout props #{ \markup { %\if #DOWN "↑"

Re: [large/complex projects] conditional header values and/or book name

2024-01-27 Thread Kieren MacMillan
Hi Sam, Thanks for these thoughts! > I'm not sure if this fits under your umbrella of having a single top level > file, but what about this? > > song-FV.ly > definedVariables = data > \include song.ily > > song-SV.ly > definedVariables = data > \include song.ily > > song.ily >

Re: [large/complex projects] conditional header values and/or book name

2024-01-23 Thread Sam Speer
Kieren, I'm not sure if this fits under your umbrella of having a single top level file, but what about this? song-FV.ly definedVariables = data \include song.ily song-SV.ly definedVariables = data \include song.ily song.ily \include [.ily files containing the notes, edition-engr

Re: [large/complex projects] conditional header values and/or book name

2024-01-23 Thread Kieren MacMillan
Hi Timothy, > How about setting up some Scheme variables that are later used to build > variants of the score? OOO I like this! There are some further complications coming up that might render this unfeasible/impractical… but it’s a great suggestion, and I can definitely see where to use it i

Re: [large/complex projects] conditional header values and/or book name

2024-01-23 Thread Timothy Lanfear
On 22/01/2024 19:09, Kieren MacMillan wrote: Is there a more efficient construct where the book name and header variables could be “injected” or “conditionalled” in? Or is that just overcomplicating this particular problem-space? (n.b., In future questions, the problem-space is naturally more

[large/complex projects] conditional header values and/or book name

2024-01-22 Thread Kieren MacMillan
Hi all, I have a big engraving use case — I’m neck-deep in an example of it right now! — and I’m hoping to do some brainstorming towards an optimal structure/toolchain/workflow, so any thoughts are appreciated. One of the things I do most often is compose for musical theatre. Because of the wa

Re: Conditional Complilation

2023-11-15 Thread Ken Ledeen
THanks to all who have offered ideas. I think the "bookpart" approach will be quite effective for me. I sincerely appreciate both the competence and the willingness to share of this fantastic community. Ken Ledeen Mobile: 617-817-3183 www.nevo.com www.bitsbook.com tiny.cc/KenLedeen

Re: Conditional Complilation

2023-11-15 Thread Knute Snortum
On Tue, Nov 14, 2023 at 9:21 PM Vaughan McAlley wrote: > On Wed, 15 Nov 2023 at 12:09, Ken Ledeen wrote: > >> Hi All, >> >> From time to time I would like to include / exclude portions of the total >> score. >> >> ... > > Hi Ken, > > For big projects I use something like this. You change a str

Re: Conditional Complilation

2023-11-15 Thread Kevin Cole
you're looking for but it may give you ideas... In my case, I have a lot of LilyPond files that I recompile too often -- mostly because I learn some more clever way of doing something and then go back and change all of the old files. But, sometimes I want PDFs with a set page size for printing

Re: Conditional Complilation

2023-11-14 Thread Vaughan McAlley
On Wed, 15 Nov 2023 at 12:09, Ken Ledeen wrote: > Hi All, > > From time to time I would like to include / exclude portions of the total > score. For now, in the crudest of ways, I just comment out the parts I > don't want (%{ . %}). That works, of course, but I was wondering if > there was a

Re: Conditional Complilation

2023-11-14 Thread Stu McKenzie
On 2023-11-14 17:07, Ken Ledeen wrote: Hi All, From time to time I would like to include / exclude portions of the total score. For now, in the crudest of ways, I just comment out the parts I don't want (%{ . %}).  That works, of course, but I was wondering if there was a more elegant w

Conditional Complilation

2023-11-14 Thread Ken Ledeen
Hi All, >From time to time I would like to include / exclude portions of the total score. For now, in the crudest of ways, I just comment out the parts I don't want (%{ . %}). That works, of course, but I was wondering if there was a more elegant way. Ideally I would have some variable that

Re: Conditional Definitions

2023-02-18 Thread Fr . Samuel Springuel
his means I have to prevent a redefinition rather than exploit it. I was > doing this just fine in 2.22, but 2.24 complains about definition being > wrapped in a conditional. I believe this has to do with the switchover in > Guile versions, but I don’t know enough about Guile to figur

Re: Conditional Definitions

2023-02-15 Thread Jean Abou Samra
ile. > This means I have to prevent a redefinition rather than exploit it. I was > doing this just fine in 2.22, but 2.24 complains about definition being > wrapped in a conditional. I believe this has to do with the switchover in > Guile versions, but I don’t know enough about Guile to f

Conditional Definitions

2023-02-15 Thread Fr. Samuel Springuel
definition being wrapped in a conditional. I believe this has to do with the switchover in Guile versions, but I don’t know enough about Guile to figure out how to fix it (and no, convert-ly does not help here). Attached is my MWE. ✝✝ Fr. Samuel, OSB (R. Padraic

Re: Conditional fermata padding

2022-09-08 Thread Martín Rincón Botero
Thank you very much, Lukas! Well, I didn't want to bother so much with more conditions. They are namely: only sharp accidentals and only notes starting from the fourth line and higher when the stem is down. For my use case I would just add those extra conditions in abjad. The reason why we have now

Re: Conditional fermata padding

2022-09-08 Thread Lukas-Fabian Moser
Hi Martín, Am 08.09.22 um 10:52 schrieb Martín Rincón Botero: I would like to have less padding for a fermata when a note has an accidental. Say, if the fermata has a padding of x, I would like it be x-0.1 or so when the note in question has an accidental. I would be thankful for a snippet :-)

Conditional fermata padding

2022-09-08 Thread Martín Rincón Botero
Dear Scheme wizards, I would like to have less padding for a fermata when a note has an accidental. Say, if the fermata has a padding of x, I would like it be x-0.1 or so when the note in question has an accidental. I would be thankful for a snippet :-).

Re: Conditional segmentation faults

2020-08-30 Thread David Sumbler
Thank you for these responses. Before I received them, I had already done a little more work on my score. After all, I knew that I could work around the seg. fault problem by issuing the lilypond command in a terminal, rather than from within emacs. So I reinstated the viola line, which was prev

Conditional segmentation faults

2020-08-30 Thread Jean Abou Samra
I am running Ubuntu 18.04, Lilypond 2.21.4, emacs 25.2.2 Ever since I started my current Lilypond project, I have been getting occasional segmentation faults when compiling. Until today I thought it was something to do with errors or inconsistencies in my Lilypond code, and I have been able to m

Re: Conditional segmentation faults

2020-08-28 Thread Paul Scott
I was also getting occasional seg. faults with 21.1.4. I would add a little more to the code and they would go away. Since I was able to finish that project I didn’t worry about it and it certainly worth the trouble to try too create a MWE. I also use Emacs but I just alt-tab to another shell

Re: Conditional segmentation faults

2020-08-28 Thread Kevin Barry
Hi David, That certainly is strange behaviour. A segmentation fault occurs when a program tries to access a segment of memory that it isn't allowed to. It's usually the result of memory bugs in the program. If it's a bug in emacs, which looks possible, then I am not sure what you will be able to d

Conditional segmentation faults

2020-08-28 Thread David Sumbler
I am running Ubuntu 18.04, Lilypond 2.21.4, emacs 25.2.2 Ever since I started my current Lilypond project, I have been getting occasional segmentation faults when compiling. Until today I thought it was something to do with errors or inconsistencies in my Lilypond code, and I have been able to ma

Re: conditional breaks

2018-02-20 Thread Craig Dabelstein
Hi Urs, I changed the conditional breaks target to "manuscript-breaks" to make sure there wasn't a conflict but the breaks package is still not working (at all). I get no errors but also no breaks. Updated MWE attached. Craig On 20 February 2018 at 20:20, Urs Liska wrote: >

Re: conditional breaks

2018-02-20 Thread Urs Liska
Hi Craig, Am 20.02.2018 um 11:14 schrieb Craig Dabelstein: Hi all, I'm trying to get the edition engraver, scholarly and conditional breaks all to work at the same time. In the MWE I've attached, the edition engraver and scholarly are working but I can't seem to get the con

conditional breaks

2018-02-20 Thread Craig Dabelstein
Hi all, I'm trying to get the edition engraver, scholarly and conditional breaks all to work at the same time. In the MWE I've attached, the edition engraver and scholarly are working but I can't seem to get the conditional breaks to work as well. Could someone please tell me what

Re: Conditional paper block

2017-12-15 Thread Br. Samuel Springuel
In Frescobaldi you can choose the Engrave (custom) option which lets you add to the command line, and remembers the last used setting. I'd never noticed that option. However, after trying it I don't like that it pulls up the dialog each time. This slows me down because it requires me to inte

Re: Conditional paper block

2017-12-15 Thread Edward Neeman
In Frescobaldi you can choose the Engrave (custom) option which lets you add to the command line, and remembers the last used setting. But I think your solution is better. Best, Edward -- Dr. Edward Neeman Adjunct Instructor, South Georgia State College Collaborative Pianist, Valdost

Re: Conditional paper block

2017-12-14 Thread Br. Samuel Springuel
Absent a way to make Frescobaldi apply the command-line argument, I came up with the following solution: To the lyluatex preamble I added a flag which indicated the use of lyluatex (similar to what lilypond-book does): #(define inside-lyluatex #t) This change has been merged into the

Re: Conditional paper block

2017-12-13 Thread David Wright
On Tue 12 Dec 2017 at 13:34:18 (-0500), Br. Samuel Springuel wrote: > On 2017-12-12 12:08 PM, David Wright wrote: > >You can set the default paper-size with a -d option in the LP command > >line. See p10 of the "Usage" manual (2.19.80 page ref.). > > That works perfect from the command line. Is i

Re: Conditional paper block

2017-12-12 Thread Br. Samuel Springuel
On 2017-12-12 12:08 PM, David Wright wrote: You can set the default paper-size with a -d option in the LP command line. See p10 of the "Usage" manual (2.19.80 page ref.). That works perfect from the command line. Is it possible to get Frescobaldi to apply this option when running LilyPond? I

Re: Conditional paper block

2017-12-12 Thread David Wright
On Tue 12 Dec 2017 at 10:52:40 (-0500), Br. Samuel Springuel wrote: > I have a project in which I'm including a bunch of scores into a pdf > document using lyluatex. In the final product, lyluatex handles > figuring out what the appropriate line width is for the scores and > passes that informatio

Conditional paper block

2017-12-12 Thread Br. Samuel Springuel
I have a project in which I'm including a bunch of scores into a pdf document using lyluatex. In the final product, lyluatex handles figuring out what the appropriate line width is for the scores and passes that information to lilypond by adding a header to score before processing. During th

Re: Snippet for conditional score compilation

2017-11-16 Thread Kieren MacMillan
(operas, musicals, etc.) For those searching the list and finding this thread, here's another way of accomplishing conditional engraving: SNIPPET BEGINS \version "2.19.80" include_A = ##t nullscore = \markup \null score_A = \score { { c''4 } } $(if include_A

Snippet for conditional score compilation

2017-11-16 Thread Saul Tobin
Hi all, Here's a short little snippet to turn on or off whether a score is compiled. \version "2.18.2" % Swap the commented lines to demonstrate that you can turn the score on and off flag = ##t % flag = ##f compileIf = #(define-void-function (parser location flag score) (boolean? ly:score?)

Re: ClefModifier tweaks conditional on clef

2017-05-12 Thread Noeck
Am 11.05.2017 um 01:03 schrieb Simon Albrecht: > > Change clefs can be recognised by the glyph name as well. You can try > putting some sort of (display glyph-name) in the body of the > let-expression (on the same level like the actual functionality) to find > out more. Ah of course. Thanks, Si

Re: ClefModifier tweaks conditional on clef

2017-05-10 Thread Simon Albrecht
Am 10.05.2017 um 19:26 schrieb Noeck: Am 10.05.2017 um 00:03 schrieb Simon Albrecht: of course you could write a callback: Thanks Simon, that's much better than my approach to replace the \clef command with a \once \override or \tweak and \clef combination. I'll figure out what the #\F means

Re: ClefModifier tweaks conditional on clef

2017-05-10 Thread Noeck
Am 10.05.2017 um 00:03 schrieb Simon Albrecht: > of course you could write a callback: Thanks Simon, that's much better than my approach to replace the \clef command with a \once \override or \tweak and \clef combination. I'll figure out what the #\F means but could someone tell me how I can fin

Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread tisimst
. Sorry about that. I was going off of memory, but forgot that this is how the pairs are actually utilized. Thanks, Simon, for a usable solution. Best, Abraham -- View this message in context: http://lilypond.1069038.n5.nabble.com/ClefModifier-tweaks-conditional-on-clef-tp203018p203039.html

Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread Simon Albrecht
Am 09.05.2017 um 23:39 schrieb Kieren MacMillan: Hi Joram, does it only handle the x-offset? Try-and-error told me that the first number is the X-offset for _8 and the second for ^8. But can I affect the y position? Ah! I look forward to seeing the answer. It would be great (actually, kind of

Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread Kieren MacMillan
Hi Joram, > does it only handle the x-offset? Try-and-error told me that the first > number is the X-offset for _8 and the second for ^8. > But can I affect the y position? Ah! I look forward to seeing the answer. It would be great (actually, kind of essential) if it did. Thanks, Kieren. ___

Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread Noeck
Hi, does it only handle the x-offset? Try-and-error told me that the first number is the X-offset for _8 and the second for ^8. But can I affect the y position? Best, Joram ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mail

Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread Kieren MacMillan
Abraham, > The ClefModifier grob has a property called "clef-alignments" that handles > this, providing individual positioning for G, F, and C clefs (you'll likely > need to play around with the numbers a bit): > http://lilypond.org/doc/v2.19/Documentation/internals/clefmodifier Oh, FFS… I cle

Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread tisimst
ot;clef-alignments" that handles this, providing individual positioning for G, F, and C clefs (you'll likely need to play around with the numbers a bit): http://lilypond.org/doc/v2.19/Documentation/internals/clefmodifier HTH, Abraham -- View this message in context: http://l

ClefModifier tweaks conditional on clef

2017-05-09 Thread Kieren MacMillan
Hello all, In Gould (p. 506), it suggests that the clef modifier for the bass clef should dangle from the tip of the bass clef. Lilypond does the following by default: I would like to move this to the tip, but without affecting the modifier for the treble clef (which is in the perfect positio

Re: conditional when-property function not working as intended

2016-09-16 Thread Kieren MacMillan
Hi David, > But we are not talking about music functions (where the quite different > "parser location" arguments are now usually passed implicitly) but > markup commands here. Ah! That would be the source of my confusion. Thank you, Kieren. Kieren MacMillan, co

Re: conditional when-property function not working as intended

2016-09-16 Thread Kieren MacMillan
Hi David, > By not specifying a default value? I have absolutely no idea why you > put `markp' as the default-value of your call to ly:chain-assoc-get. Because this is somebody else’s code that I’m using, without (obviously) fully understanding what it does. With your hint, I believe I can now

Re: conditional when-property function not working as intended

2016-09-16 Thread David Kastrup
Kieren MacMillan writes: > Hi David, > >> It's necessary for functions taking "layout props" arguments? Where >> would that cause reason for doubt? > > I thought I recalled a recent update (say, in the past 2 years) in > which those arguments were rendered unnecessary when writing certain > musi

Re: conditional when-property function not working as intended

2016-09-16 Thread David Kastrup
Kieren MacMillan writes: > Hi David, > > Thank you for the helpful reply and documentation/explanation. > >> -- Function: ly:chain-assoc-get key achain default-value >> strict-checking >> Return value for KEY from a list of alists ACHAIN. If no entry is >> found, return DEFAULT-

Re: conditional when-property function not working as intended

2016-09-16 Thread Kieren MacMillan
Hi David, Thank you for the helpful reply and documentation/explanation. > -- Function: ly:chain-assoc-get key achain default-value > strict-checking > Return value for KEY from a list of alists ACHAIN. If no entry is > found, return DEFAULT-VALUE or ‘#f’ if DEFAULT-VALUE is not

Re: conditional when-property function not working as intended

2016-09-16 Thread Kieren MacMillan
Hi David, > It's necessary for functions taking "layout props" arguments? Where > would that cause reason for doubt? I thought I recalled a recent update (say, in the past 2 years) in which those arguments were rendered unnecessary when writing certain music functions — but apparently, I’m mis

Re: conditional when-property function not working as intended

2016-09-15 Thread David Kastrup
Kieren MacMillan writes: > Hi all, > > Solved my own problem (I think?): the modified version (below) appears to > work as expected. > > On a related topic: I [clearly] don’t understand when “layout props” > is necessary, and when it’s not. It's necessary for functions taking "layout props" arg

Re: conditional when-property function not working as intended

2016-09-15 Thread David Kastrup
spacing that is [I thought] conditional on the presence of a ‘testB’ > property in the property. > > Where is my code going wrong? > More precisely, how can I make it work as intended? =) > > Thanks, > Kieren. > > SNIPPET BEGINS > \version "2.19.46" >

Re: conditional when-property function not working as intended

2016-09-15 Thread Kieren MacMillan
Hi all, Solved my own problem (I think?): the modified version (below) appears to work as expected. On a related topic: I [clearly] don’t understand when “layout props” is necessary, and when it’s not. Is this explained in the docs somewhere? Thanks, Kieren. SNIPPET BEGINS \version "2.1

conditional when-property function not working as intended

2016-09-15 Thread Kieren MacMillan
Hello all, In the snippet included below, I’m hoping the second line of the scoreTitleMarkup will take no vertical space. If you comment out that line, you’ll see that it *does* take no space, but when it’s included, so is the 25mm spacing that is [I thought] conditional on the presence of a

Re: booleans and conditional compilation?

2016-04-01 Thread Simon Albrecht
On 01.04.2016 22:43, Simon Albrecht wrote: you can use Guile Scheme. LilyPond uses Guile 1.8, whose Reference Manual is here: . ___ lilypond-user mailing list lilypond-user@gnu.org https:/

Re: booleans and conditional compilation?

2016-04-01 Thread Simon Albrecht
On 01.04.2016 21:23, Johannes Waldmann wrote: Hi. Is there a standard way of conditional compilation, e.g., to turn parts (on any level) of a score on and off? The standard way is using tags, as Urs said. But of course you can do everything you like via scheme: \version "2.19.38" f

Re: booleans and conditional compilation?

2016-04-01 Thread Urs Liska
Am 1. April 2016 21:23:17 MESZ, schrieb Johannes Waldmann : >Hi. > >Is there a standard way of conditional compilation, >e.g., to turn parts (on any level) of a score on and off? > Yes, look up \tag. HTH Urs >From a programmer's standpoint, >I'd want booleans

booleans and conditional compilation?

2016-04-01 Thread Johannes Waldmann
Hi. Is there a standard way of conditional compilation, e.g., to turn parts (on any level) of a score on and off? >From a programmer's standpoint, I'd want booleans, and branching, something like let foo = true % or false, somewhere at the top of the file, % o

Re: conditional include

2014-10-18 Thread MarcM
://lilypond.1069038.n5.nabble.com/conditional-include-tp140471p167671.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user

Re: conditional include

2014-10-18 Thread Johan Vromans
MarcM writes: > your function checks for arguments passed on the command line. Is there a way > to check variable like an IFDEF ? HTH, Johan ifdefined.ly Description: Binary data ifthenelse.ly Description: Binary data ___ lilypond-user mail

Re: conditional include

2014-10-18 Thread MarcM
ice_IV includes common header only if "header_included = #t" What function could i use? -- View this message in context: http://lilypond.1069038.n5.nabble.com/conditional-include-tp140471p167653.html Sent from the User mailing list archive at Nabble.com. _

Re: conditional markup

2014-06-15 Thread James
On 15/06/14 15:43, Orm Finnendahl wrote: > Hi David, > > thanks a lot for the comment. > > Am Sonntag, den 15. Juni 2014 um 16:07:01 Uhr (+0200) schrieb David Kastrup: >> A music function has to return music, period. Different music may be >> used in different contexts, but a music function cannot

Re: conditional markup

2014-06-15 Thread Orm Finnendahl
Hi David, thanks a lot for the comment. Am Sonntag, den 15. Juni 2014 um 16:07:01 Uhr (+0200) schrieb David Kastrup: > > A music function has to return music, period. Different music may be > used in different contexts, but a music function cannot return anything > but music. Maybe it would be

Re: conditional markup

2014-06-15 Thread David Kastrup
Orm Finnendahl writes: > Am Sonntag, den 15. Juni 2014 um 14:26:36 Uhr (+0200) schrieb David Kastrup: >> Orm Finnendahl writes: >> Would you have preferred >> >> orm.ly:11:20: error: music function cannot return \markup \line { "Test"} > > that doesn't really matter, the problem for me was, wh

Re: conditional markup

2014-06-15 Thread Orm Finnendahl
Am Sonntag, den 15. Juni 2014 um 14:26:36 Uhr (+0200) schrieb David Kastrup: > Orm Finnendahl writes: > Would you have preferred > > orm.ly:11:20: error: music function cannot return \markup \line { "Test"} that doesn't really matter, the problem for me was, whether the error message meant "mus

Re: conditional markup

2014-06-15 Thread David Kastrup
Orm Finnendahl writes: > Hi, > > Am Samstag, den 14. Juni 2014 um 16:56:36 Uhr (+0200) schrieb David Kastrup: >> Notice the - before the markup, turning this into a post-event. > > Thanks, that was the missing link. I had tried define-event-function > and got stuck as it appeared to be pre-event.

Re: conditional markup

2014-06-15 Thread Orm Finnendahl
Hi, Am Samstag, den 14. Juni 2014 um 16:56:36 Uhr (+0200) schrieb David Kastrup: > Notice the - before the markup, turning this into a post-event. Thanks, that was the missing link. I had tried define-event-function and got stuck as it appeared to be pre-event. BTW: This meaning of the error mes

Re: conditional markup

2014-06-14 Thread David Kastrup
Orm Finnendahl writes: > Hi, > > for defining markups which appear selectively either only in the > parts or only in the score I'm trying to use the following strategy: > > I include a "score-defs.ly" or "part-defs.ly" file in the score or > part respectively and define commands like "sMarkup" f

Re: conditional markup

2014-06-14 Thread Orm Finnendahl
Am Samstag, den 14. Juni 2014 um 14:17:44 Uhr (+0100) schrieb Phil Holmes: > Had you considered using tags instead? No, thanks, I wasn't aware of this. Seems to be exactly what I need. -- Orm ___ lilypond-user mailing list lilypond-user@gnu.org https:/

Re: conditional markup

2014-06-14 Thread Phil Holmes
- Original Message - From: "Orm Finnendahl" To: Sent: Saturday, June 14, 2014 2:07 PM Subject: conditional markup Hi, for defining markups which appear selectively either only in the parts or only in the score I'm trying to use the following strategy: I include a

conditional markup

2014-06-14 Thread Orm Finnendahl
Hi, for defining markups which appear selectively either only in the parts or only in the score I'm trying to use the following strategy: I include a "score-defs.ly" or "part-defs.ly" file in the score or part respectively and define commands like "sMarkup" for markup only appearing in the score

Re: Writing LilyPond files conditional on LilyPond version (Wikimedia Score extension)

2014-02-09 Thread Urs Liska
t can be used (e.g. ly:parser-include-string cannot be used). Is such conditional lily-code possible to write? In safe mode? I think this should be possible: https://github.com/openlilylib/snippets/blob/master/general-tools/lilypond-version-predicates/definitions.ily https://github.com/openlilyl

Writing LilyPond files conditional on LilyPond version (Wikimedia Score extension)

2014-02-09 Thread David Rydh
nually convert between versions \version "2.14.2" if version >= 2.16 then converted lily-code else old lily-code fi Since the lily-code is running in safe-mode, as mentioned above, there is a very limited repertoire of scheme code that can be used (e.g. ly:parser-include-string ca

Re: problems trying to write a conditional \transpose

2013-08-19 Thread David Kastrup
Mark Polesky writes: > David Kastrup wrote: >>> I'm trying to write a conditional version of the \transpose >>> function, that would work something like this... >>> >>> input = { >>> c c >>> \conditionalTr

Re: problems trying to write a conditional \transpose

2013-08-19 Thread Mark Polesky
David Kastrup wrote: >> I'm trying to write a conditional version of the \transpose >> function, that would work something like this... >> >> input = { >>   c c >>   \conditionalTransposition c c' { c c } >> } >> >> \input >> =&

Re: problems trying to write a conditional \transpose

2013-08-05 Thread David Kastrup
Mark Polesky writes: > I'm trying to write a conditional version of the \transpose > function, that would work something like this: > > input = { >   c c >   \conditionalTransposition c c' { c c } > } > > \input > => { c c c c } > > \proce

problems trying to write a conditional \transpose

2013-08-05 Thread Mark Polesky
Hi. I'm trying to write a conditional version of the \transpose function, that would work something like this: input = {   c c   \conditionalTransposition c c' { c c } } \input => { c c c c } \processConditionalTransposition \input => { c c c' c' }

Re: conditional \when-property

2013-07-31 Thread Kieren MacMillan
eers, Kieren. p.s. Does anyone else think this should be part of the standard distro? Or is there an even more general conditional that is already, or should be, in there to be employed? ___ lilypond-user mailing list lilypond-user@gnu.org https

Re: conditional \when-property

2013-07-31 Thread David Nalesnik
Hi Kieren, On Wed, Jul 31, 2013 at 5:59 PM, Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi David, > > > Using empty-stencil rather than your own call of ly:make-stencil should > > work for more versions. > > This sounds useful… but I don't quite know what you are suggesting I do.

Re: conditional \when-property

2013-07-31 Thread Kieren MacMillan
Hi David, > Using empty-stencil rather than your own call of ly:make-stencil should > work for more versions. This sounds useful… but I don't quite know what you are suggesting I do. Do you mean this (which appears to work, but still uses ly:make-stencil): #(define-markup-command (when-property

Re: conditional \when-property

2013-07-30 Thread David Kastrup
Kieren MacMillan writes: > Hi all, > > Found the correct solution (I think): > > #(define-markup-command (when-property layout props symbol markp) (symbol? > markup?) > (if (chain-assoc-get symbol props) > (interpret-markup layout props markp) > (ly:make-stencil '() empty-interval emp

Re: conditional \when-property

2013-07-30 Thread Kieren MacMillan
fromproperty #'header:foo } >\when-property #'header:bar { \fromproperty #'header:bar } >\fromproperty #'header:title > } > } > > \header { > title = TEST > } > > \score { > \relative c' { c1 } > } > > How can it be made truly

conditional \when-property

2013-07-30 Thread Kieren MacMillan
rty #'header:foo { \fromproperty #'header:foo } \when-property #'header:bar { \fromproperty #'header:bar } \fromproperty #'header:title } } \header { title = TEST } \score { \relative c' { c1 } } How can it b

Re: conditional scores

2013-07-25 Thread David Kastrup
MarcM writes: > i took another look at the tag documentation and I was able to have a score > printed only under a certain condition with tag. > > music = \relative c' { > \tag #'dontPrintScore >{ > c e g c > } > } > > \score { > \keepWithTag #'inFunctions \music > } > > Thi

  1   2   >