Re: Scheme function and top-level markup

2022-05-27 Thread Simon Albrecht
Hi Jean, On 27/05/2022 12:34, Jean Abou Samra wrote: The solution for now is to use a plain Scheme function: Thanks a bunch for the solution and explanations, that does it! Best, Simon

Re: Scheme function and top-level markup

2022-05-27 Thread Simon Albrecht
Sorry for the garbled line breaks, I’ll try again: %%% \version "2.23.9" pieceTitle = #(define-scheme-function (str) (markup?)    #{ \markup \huge $str \noPageBreak    #}) \pieceTitle "I. Kyrie" { c'1 } %

Re: Scheme function and top-level markup

2022-05-27 Thread Jean Abou Samra
Le 27/05/2022 à 12:21, Simon Albrecht a écrit : Hello everyone, I’m a bit surprised that the following doesn’t work and don’t know where to look for a solution. % \version "2.23.9" pieceTitle = #(define-scheme-function (str) (markup?)    #{ \markup \huge $str   

Re: Scheme function names

2021-10-02 Thread David Zelinsky
David Zelinsky writes: > David Kastrup writes: > >> David Zelinsky writes: >> >>> I'm trying get some facility with Scheme in Lilypond. One thing I >>> haven't found in the manual is an explanation of naming conventions for >>> built-in scheme functions. Specifically, why do some of them

Re: Scheme function names

2021-10-02 Thread David Zelinsky
David Kastrup writes: > David Zelinsky writes: > >> I'm trying get some facility with Scheme in Lilypond. One thing I >> haven't found in the manual is an explanation of naming conventions for >> built-in scheme functions. Specifically, why do some of them have names >> starting with "ly:"

Re: Scheme function names

2021-10-02 Thread David Kastrup
David Zelinsky writes: > I'm trying get some facility with Scheme in Lilypond. One thing I > haven't found in the manual is an explanation of naming conventions for > built-in scheme functions. Specifically, why do some of them have names > starting with "ly:" and others don't? Can someone

Re: Scheme function evluates only once

2020-01-23 Thread Thomas Morley
Am Do., 23. Jan. 2020 um 22:47 Uhr schrieb Urs Liska : > But let me take the opportunity to introduce you to Amir who I think > has never posted on the LilyPond lists so far. German Forum? https://lilypondforum.de/index.php/topic,214.msg1333.html Cheers, Harm

Re: Scheme function evluates only once

2020-01-23 Thread David Kastrup
Urs Liska writes: > Hi, > > I intended to write about the same, but when I came back home to switch > the computer back on David had already replied, although in clearer > words than I would have done. Since I only quoted the Guile manual, any clarity has to be credited to the people writing

Re: Scheme function evluates only once

2020-01-23 Thread Urs Liska
Hi, I intended to write about the same, but when I came back home to switch the computer back on David had already replied, although in clearer words than I would have done. But let me take the opportunity to introduce you to Amir who I think has never posted on the LilyPond lists so far. For

Re: Scheme function evluates only once

2020-01-23 Thread David Kastrup
Amir Teymuri writes: > Hi, > > this is just a nonsense exercise for me to get to know LilyPond better! > I can't figure out why in the following the #(rnd-col) is evaluated only > once and not upon each compilation of my ly file? The first time i > compile this i will get the four colors

Re: Scheme function to return pitchnames as markup/text

2019-11-27 Thread Stephen Cummings
David, a follow-up-- I came across a post of yours from some years back in response to a sort-of-similar question, in which you suggested a more direct/more succinct way to access LilyPond's music-to-string functionality, via "value->lilystring." (More succinct, that is, if don't count the

Re: Scheme function to return pitchnames as markup/text

2019-11-20 Thread David Kastrup
Stephen Cummings writes: > Quite comfortable with such cheek. Thank you. > > Still, I will try to package up a more formally named version of that > little function. A translating map or loop will then be needed to > extract note names and render them in more conventional form, but that > won't

Re: Scheme function to return pitchnames as markup/text

2019-11-19 Thread Steve Cummings
e pitch-datum)) (out-acc (pitch->alteration pitch-datum))) #{\markup \bold \concat {$out-notename $out-acc } #} ) ) \notenamer {ees d b c g} From: Aaron Hill Subject:Re: Scheme function to return pitchnames a

Re: Scheme function to return pitchnames as markup/text

2019-11-19 Thread Stephen Cummings
Quite comfortable with such cheek. Thank you. Still, I will try to package up a more formally named version of that little function. A translating map or loop will then be needed to extract note names and render them in more conventional form, but that won't require inscrutable-for-me ly:xxx

Re: Scheme function to return pitchnames as markup/text

2019-11-19 Thread David Kastrup
Stephen Cummings writes: > Am I missing a basic LilyPond command/directive--something built-in > that takes music as input and returns note names as text? Such a > functionality would seem to be useful in all kinds of > annotations/quotations. I know about \displayMusic but its output only >

Re: Scheme function to return pitchnames as markup/text

2019-11-19 Thread Aaron Hill
On 2019-11-19 6:05 am, Stephen Cummings wrote: Am I missing a basic LilyPond command/directive--something built-in that takes music as input and returns note names as text? There is the NoteNames context, but its functionality is wrapped up in C++ code and is not easily customizable.

Re: Scheme function to return pitchnames as markup/text

2019-11-19 Thread Stephen Cummings
Am I missing a basic LilyPond command/directive--something built-in that takes music as input and returns note names as text? Such a functionality would seem to be useful in all kinds of annotations/quotations. I know about \displayMusic but its output only goes to the console/output stream

Re: Scheme function to return pitchnames as markup/text

2019-11-19 Thread Jacques Menu
Oups, answered the wrong post, sorry… JM > Le 19 nov. 2019 à 09:43, Jacques Menu a écrit : > > Hello Steve, > > Maybe starting this way: > > \version "2.19.83" > > { > % initial shared music > c'1 e | > > % the two alternatives > \override Staff.StaffSymbol.line-count = 0 >

Re: Scheme function to return pitchnames as markup/text

2019-11-19 Thread Jacques Menu
Hello Steve, Maybe starting this way: \version "2.19.83" { % initial shared music c'1 e | % the two alternatives \override Staff.StaffSymbol.line-count = 0 \stopStaff \startStaff \hide Staff.BarLine << \new Staff { \hide Staff.Clef \hide Staff.KeySignature

Re: Scheme function returning \book

2019-01-16 Thread Lukas-Fabian Moser
Hi Aaron, Going back to the original function posted, if the output is meant to be a book that is more-or-less immutable and ready for printing, one could just do the following instead: \version "2.19.82" test = #(define-void-function (suffix) (string?)   (print-book-with-defaults #{   

Re: Scheme function returning \book

2019-01-16 Thread David Kastrup
Aaron Hill writes: > Here's an oddity: > > > \version "2.19.82" > test = #(define-scheme-function (suffix) (string?) #{ > \book { \bookOutputSuffix $suffix \score { b'4 } } #} ) > foo = \test "foo" > bar = \test "bar" > \foo \bar > > > This works. For historical reasons. It cannot

Re: Scheme function returning \book

2019-01-16 Thread David Kastrup
Thomas Morley writes: > Am Mi., 16. Jan. 2019 um 00:14 Uhr schrieb David Kastrup : >> >> Lukas-Fabian Moser writes: >> >> > Hi David, >> >> \test apparently expects a string argument. >> > >> > Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try: >> > >> > \version

Re: Scheme function returning \book

2019-01-15 Thread Aaron Hill
On 2019-01-15 4:40 pm, Aaron Hill wrote: Here's an oddity: \version "2.19.82" test = #(define-scheme-function (suffix) (string?) #{ \book { \bookOutputSuffix $suffix \score { b'4 } } #} ) foo = \test "foo" bar = \test "bar" \foo \bar Oops. Probably shouldn't go around redefining

Re: Scheme function returning \book

2019-01-15 Thread Thomas Morley
Am Mi., 16. Jan. 2019 um 00:14 Uhr schrieb David Kastrup : > > Lukas-Fabian Moser writes: > > > Hi David, > >> \test apparently expects a string argument. > > > > Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try: > > > > \version "2.19.82" > > > > test =

Re: Scheme function returning \book

2019-01-15 Thread Aaron Hill
Here's an oddity: \version "2.19.82" test = #(define-scheme-function (suffix) (string?) #{ \book { \bookOutputSuffix $suffix \score { b'4 } } #} ) foo = \test "foo" bar = \test "bar" \foo \bar This works. -- Aaron Hill ___ lilypond-user

Re: Scheme function returning \book

2019-01-15 Thread Aaron Hill
On 2019-01-15 4:11 pm, Kieren MacMillan wrote: Hi David, Does anybody have an idea what is supposed to distinguish a book from a bookpart outside of actual \book { \bookpart { ... } } usage? You can’t have multiple book parts in a single output file? That’s the way I understand it. Is

Re: Scheme function returning \book

2019-01-15 Thread David Kastrup
Kieren MacMillan writes: > Hi David, > >> Does anybody have an idea what is supposed to distinguish >> a book from a bookpart outside of actual >> >> \book { >> \bookpart { ... } } >> >> usage? > > You can’t have multiple book parts in a single output file? > That’s the way I understand it.

Re: Scheme function returning \book

2019-01-15 Thread Kieren MacMillan
Hi David, > Does anybody have an idea what is supposed to distinguish > a book from a bookpart outside of actual > > \book { > \bookpart { ... } } > > usage? You can’t have multiple book parts in a single output file? That’s the way I understand it. K.

Re: Scheme function returning \book

2019-01-15 Thread David Kastrup
Lukas-Fabian Moser writes: >>> \version "2.19.82" >>> >>> test = #(define-scheme-function (suffix) (string?)  #{ >>>   \book { >>>     \bookOutputSuffix #suffix >>>     \score { >>>   d4 >>>     } >>>   } >>> #} ) >>> >>> \test "surname" >>> >>> (still) causes a "Bad expression type"

Re: Scheme function returning \book

2019-01-15 Thread Lukas-Fabian Moser
\version "2.19.82" test = #(define-scheme-function (suffix) (string?)  #{   \book {     \bookOutputSuffix #suffix     \score {   d4     }   } #} ) \test "surname" (still) causes a "Bad expression type" error. Ah, well. Turns out that copying the code for \xxx here where \xxx was

Re: Scheme function returning \book

2019-01-15 Thread David Kastrup
Lukas-Fabian Moser writes: > Hi David, >> \test apparently expects a string argument. > > Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try: > > \version "2.19.82" > > test = #(define-scheme-function (suffix) (string?)  #{ >   \book { >     \bookOutputSuffix #suffix >    

Re: Scheme function returning \book

2019-01-15 Thread Lukas-Fabian Moser
Hi David, \test apparently expects a string argument. Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try: \version "2.19.82" test = #(define-scheme-function (suffix) (string?)  #{   \book {     \bookOutputSuffix #suffix     \score {   d4     }   } #} ) \test

Re: Scheme function returning \book

2019-01-15 Thread David Kastrup
Lukas-Fabian Moser writes: > Folks, > > is it possible for a scheme function to return a whole \book ? > > test = #(define-scheme-function (suffix) (string?)  #{ >   \book { >     \bookOutputSuffix #suffix >     \score { >   d4 >     } >   } > #} ) > > \test > > causes a "Bad expression

Re: scheme function

2018-12-20 Thread Gianmaria Lari
On Thu, 20 Dec 2018 at 13:35, David Kastrup wrote: > Gianmaria Lari writes: > > >> Uh, there is a difference between \markup and \mark . > > > > > > I put \mark just to make things more interesting. I'm joking. > > Shit! I made the usual stupid mistake that's perfect to complicate > >

Re: scheme function

2018-12-20 Thread David Kastrup
Gianmaria Lari writes: >> Uh, there is a difference between \markup and \mark . > > > I put \mark just to make things more interesting. I'm joking. > Shit! I made the usual stupid mistake that's perfect to complicate > things :( > > >> Once you fixed >> that, your counter will be reset

Re: scheme function

2018-12-20 Thread Gianmaria Lari
> Uh, there is a difference between \markup and \mark . I put \mark just to make things more interesting. I'm joking. Shit! I made the usual stupid mistake that's perfect to complicate things :( > Once you fixed > that, your counter will be reset to 0 for each invocation of the >

Re: scheme function

2018-12-20 Thread David Kastrup
Urs Liska writes: >>>(set! counter (1+ counter)) > > And it must be > > (set! counter (+ 1 counter)) > > (first the procedure "+", then the arguments) Have you tried? 1+ is defined as a function taking one argument. Scheme has a lot less restrictions on identifier names than some

Re: scheme function

2018-12-20 Thread Gianmaria Lari
On Thu, 20 Dec 2018 at 13:12, Gianmaria Lari wrote: > > > On Thu, 20 Dec 2018 at 13:10, Urs Liska wrote: > >> >> >> Am 20. Dezember 2018 13:02:22 MEZ schrieb David Kastrup : >> >Gianmaria Lari writes: >> > >> >> %alternate version >> >> \version "2.19.82" >> >> nextcount = >> >> #(let

Re: scheme function

2018-12-20 Thread Gianmaria Lari
On Thu, 20 Dec 2018 at 13:10, Urs Liska wrote: > > > Am 20. Dezember 2018 13:02:22 MEZ schrieb David Kastrup : > >Gianmaria Lari writes: > > > >> %alternate version > >> \version "2.19.82" > >> nextcount = > >> #(let ((counter 0)) > >> (lambda () > >>(set! counter (1+ counter))

Re: scheme function

2018-12-20 Thread Urs Liska
Am 20. Dezember 2018 13:02:22 MEZ schrieb David Kastrup : >Gianmaria Lari writes: > >> %alternate version >> \version "2.19.82" >> nextcount = >> #(let ((counter 0)) >> (lambda () >>(set! counter (1+ counter)) >>(number->string counter))) >> >> \markup #(nextcount) >>

Re: scheme function

2018-12-20 Thread David Kastrup
Gianmaria Lari writes: > %alternate version > \version "2.19.82" > nextcount = > #(let ((counter 0)) > (lambda () >(set! counter (1+ counter)) >(number->string counter))) > > \markup #(nextcount) > \markup #(nextcount) > > > I would like to know if it is possible to write

Re: scheme function with string

2018-11-19 Thread Gianmaria Lari
On Mon, 19 Nov 2018 at 16:06, David Kastrup wrote: > Gianmaria Lari writes: > > > I have this simple scheme substitution function > > > > myFin = #(define-music-function (m) (ly:music?) > > #{ \addStringNumber \addFingering $m "1x2x" "x3x4" #} > > ) > > > > > > It simply adds some

Re: scheme function with string

2018-11-19 Thread David Kastrup
Gianmaria Lari writes: > I have this simple scheme substitution function > > myFin = #(define-music-function (m) (ly:music?) > #{ \addStringNumber \addFingering $m "1x2x" "x3x4" #} > ) > > > It simply adds some fingering and string numbers on the musical expression > argument m. I use like

Re: scheme function returning #beats and beat duration

2018-06-22 Thread Malte Meyn
Am 22.06.2018 um 14:46 schrieb Gianmaria Lari: Is there any scheme function returning the number of beats and the duration of each beat of the mesure where the function is invoked? For instance, I would like this code.. \version "2.19.81" {  \time 3/4  \writeBeats

Re: scheme function returning two scores

2018-02-26 Thread Simon Albrecht
On 26.02.2018 08:05, Gianmaria Lari wrote: On 26 February 2018 at 00:07, Simon Albrecht > wrote: On 25.02.2018 22:55, Gianmaria Lari wrote: (I have never reported a bug before. Please let me know if this is not  the

Re: scheme function returning two scores

2018-02-25 Thread Gianmaria Lari
On 26 February 2018 at 00:07, Simon Albrecht wrote: > On 25.02.2018 22:55, Gianmaria Lari wrote: > >> (I have never reported a bug before. Please let me know if this is not >> the correct procedure). >> > > > > Best, Simon > That's

Re: scheme function returning two scores

2018-02-25 Thread Simon Albrecht
On 25.02.2018 22:55, Gianmaria Lari wrote: (I have never reported a bug before. Please let me know if this is not  the correct procedure). Best, Simon ___ lilypond-user mailing list lilypond-user@gnu.org

Re: scheme function returning two scores

2018-02-25 Thread Gianmaria Lari
On 25 February 2018 at 14:50, David Kastrup wrote: > Gianmaria Lari writes: > > > Yes, I tried it but didn't work did I made a mistake? > > > > \version "2.19.81" > > > > myScore = #(define-scheme-function (music) (ly:music?) #{ > > \bookpart { > >

Re: scheme function returning two scores

2018-02-25 Thread Gianmaria Lari
On 25 February 2018 at 22:41, Caagr98 wrote: > > > On 02/25/18 22:24, Gianmaria Lari wrote: > > > > > > On 25 February 2018 at 15:05, Caagr98 > wrote: > > > > > > > > On 02/25/18 14:50, David Kastrup wrote: > > > In the mean time,

Re: scheme function returning two scores

2018-02-25 Thread Caagr98
On 02/25/18 22:24, Gianmaria Lari wrote: > > > On 25 February 2018 at 15:05, Caagr98 > wrote: > > > > On 02/25/18 14:50, David Kastrup wrote: > > In the mean time, you could define a void function and let it just call > >

Re: scheme function returning two scores

2018-02-25 Thread Gianmaria Lari
On 25 February 2018 at 15:05, Caagr98 wrote: > > > On 02/25/18 14:50, David Kastrup wrote: > > In the mean time, you could define a void function and let it just call > > toplevel-score-handler on your scores. Of course, this would no longer > > allow you to place those

Re: scheme function returning two scores

2018-02-25 Thread Caagr98
On 02/25/18 14:50, David Kastrup wrote: > In the mean time, you could define a void function and let it just call > toplevel-score-handler on your scores. Of course, this would no longer > allow you to place those scores in a book or bookpart. Why not call add-score (defined in

Re: scheme function returning two scores

2018-02-25 Thread David Kastrup
Gianmaria Lari writes: > Yes, I tried it but didn't work did I made a mistake? > > \version "2.19.81" > > myScore = #(define-scheme-function (music) (ly:music?) #{ > \bookpart { > \score { $music \layout{} } > \score { \unfoldRepeats $music \midi{}} > }

Re: scheme function returning two scores

2018-02-25 Thread Gianmaria Lari
On 25 February 2018 at 14:15, David Kastrup wrote: > Gianmaria Lari writes: > > > On 25 February 2018 at 13:15, David Kastrup wrote: > > > >> Gianmaria Lari writes: > >> > >> > Because lilypond "doesn't expect" to

Re: scheme function returning two scores

2018-02-25 Thread David Kastrup
Gianmaria Lari writes: > On 25 February 2018 at 13:15, David Kastrup wrote: > >> Gianmaria Lari writes: >> >> > Because lilypond "doesn't expect" to return more than one score I tried >> to >> > put the call to my function

Re: scheme function returning two scores

2018-02-25 Thread Gianmaria Lari
On 25 February 2018 at 13:15, David Kastrup wrote: > Gianmaria Lari writes: > > > Because lilypond "doesn't expect" to return more than one score I tried > to > > put the call to my function returning the score inside a \book. But this > > also does not

Re: scheme function returning two scores

2018-02-25 Thread David Kastrup
Gianmaria Lari writes: > Because lilypond "doesn't expect" to return more than one score I tried to > put the call to my function returning the score inside a \book. But this > also does not work and I get this error: > > This is my code: > > \version "2.19.81" > myScore

Re: scheme function returning two scores

2018-02-25 Thread Gianmaria Lari
Because lilypond "doesn't expect" to return more than one score I tried to put the call to my function returning the score inside a \book. But this also does not work and I get this error: Starting lilypond-windows.exe 2.19.81 [Untitled (2)]... Processing

Re: scheme function generating multiple score

2017-12-29 Thread Gianmaria Lari
On 29 December 2017 at 12:28, Gianmaria Lari wrote: > > > On 29 December 2017 at 11:26, Timothy Lanfear wrote: > >> On 29/12/17 07:03, Gianmaria Lari wrote: >> >>> Sorry to bother but I'm unable to get out from this problem. >>> This code generate

Re: scheme function generating multiple score

2017-12-29 Thread Gianmaria Lari
On 29 December 2017 at 11:26, Timothy Lanfear wrote: > On 29/12/17 07:03, Gianmaria Lari wrote: > >> Sorry to bother but I'm unable to get out from this problem. >> This code generate two scores: >> >> \version "2.19.80" >> >> \score { >> \transpose c d {c' d'

Re: scheme function generating multiple score

2017-12-29 Thread Timothy Lanfear
On 29/12/17 07:03, Gianmaria Lari wrote: Sorry to bother but I'm unable to get out from this problem. This code generate two scores: \version "2.19.80" \score {   \transpose c d {c' d' e'}   \layout{} } \score {   \transpose c e {c' d' e'}   \layout{} } I

Re: scheme function containing score {...}

2017-12-24 Thread Gianmaria Lari
On 25 November 2017 at 10:00, Gianmaria Lari wrote: > On 24 November 2017 at 18:18, David Kastrup wrote: > >> Gianmaria Lari writes: >> >> > I'm trying to put the score functionality inside a function (consider >> it a >> > test).

Re: scheme function containing score {...}

2017-11-25 Thread Gianmaria Lari
David, I changed "define" in "define-music-function" and now it works perfectly, thank you David! I think this is something can be useful to others so I post the new working code: \version "2.19.80" myScore = #(define-scheme-function (music) (ly:music?) #{ \score { $music \layout{}

Re: scheme function containing score {...}

2017-11-24 Thread David Kastrup
Gianmaria Lari writes: > I'm trying to put the score functionality inside a function (consider it a > test). Here it is the code: > > \version "2.19.80" > myScore = > #(define (music) (ly:music?) #{ > \score { > $music > \layout{} > \midi{} >} #} ) > >

Re: scheme-function to provide value for \include

2016-06-29 Thread Urs Liska
Am 29.06.2016 um 17:54 schrieb David Kastrup: >> That's not what Johan is talking about. What he refers to is that the >> > C #include syntax *looks* completely different from regular C/C++ >> > code, so nobody will mistake it for a regular function call or >> > whatever. >> > >> > But \include

Re: scheme-function to provide value for \include

2016-06-29 Thread David Kastrup
Urs Liska writes: > Am 29.06.2016 um 17:12 schrieb David Kastrup: >> Johan Vromans writes: >>> >>> Except that in C #include is significantly different from the rest >>> of the C syntax. #-lines are all different and independent of >>> C-lines and

Re: scheme-function to provide value for \include

2016-06-29 Thread Johan Vromans
On Wed, 29 Jun 2016 17:12:57 +0200 David Kastrup wrote: > The same with LilyPond. You can put \include in the midst of any > LilyPond construct without bothering about nesting. Try I meant "visually distinct". Lines starting with # are preprocessor only lines. \include is not

Re: scheme-function to provide value for \include

2016-06-29 Thread Urs Liska
Am 29.06.2016 um 17:12 schrieb David Kastrup: > Johan Vromans writes: > >> On Tue, 28 Jun 2016 11:05:59 +0200 >> David Kastrup wrote: >> >>> Basically you are expecting something akin to the #include of the C >>> preprocessor to accept calls of functions

Re: scheme-function to provide value for \include

2016-06-29 Thread David Kastrup
Johan Vromans writes: > On Tue, 28 Jun 2016 11:05:59 +0200 > David Kastrup wrote: > >> Basically you are expecting something akin to the #include of the C >> preprocessor to accept calls of functions defined in C for specifying >> the file to include. > >

Re: scheme-function to provide value for \include

2016-06-29 Thread Johan Vromans
On Tue, 28 Jun 2016 11:05:59 +0200 David Kastrup wrote: > Basically you are expecting something akin to the #include of the C > preprocessor to accept calls of functions defined in C for specifying > the file to include. Except that in C #include is significantly different from

Re: scheme-function to provide value for \include

2016-06-28 Thread David Kastrup
Urs Liska writes: > Am 28.06.2016 um 11:05 schrieb David Kastrup: >> Urs Liska writes: >> >>> Hi all, >>> >>> I am surprised that \include refuses to accept a string that isn't >>> passed literally but through a scheme-function: >>> >>> \version

Re: scheme-function to provide value for \include

2016-06-28 Thread Urs Liska
Am 28.06.2016 um 11:05 schrieb David Kastrup: > Urs Liska writes: > >> Hi all, >> >> I am surprised that \include refuses to accept a string that isn't >> passed literally but through a scheme-function: >> >> \version "2.19.43" givePath = #(define-scheme-function ()()

Re: scheme-function to provide value for \include

2016-06-28 Thread David Kastrup
Urs Liska writes: > Hi all, > > I am surprised that \include refuses to accept a string that isn't > passed literally but through a scheme-function: > > \version "2.19.43" givePath = #(define-scheme-function ()() > "some/path/that/will/probably/not/be/found.ily")

Re: scheme-function to provide value for \include

2016-06-28 Thread Thomas Morley
2016-06-28 9:23 GMT+02:00 Urs Liska : > Hi all, > > I am surprised that \include refuses to accept a string that isn't passed > literally but through a scheme-function: > > \version "2.19.43" givePath = #(define-scheme-function ()() >

Re: Scheme function to force any noteEvent to a skipEvent

2016-04-04 Thread David Wright
On Mon 04 Apr 2016 at 17:47:03 (+), Joseph Chrestien wrote: > Thanks David and Simon for your kind help. I used David's solution and it > works brilliantly. Very nice. I didn't know of this NullVoice context, I'll > take a look at it. My view would be to use David's solution where you have

Re: Scheme function to force any noteEvent to a skipEvent

2016-04-04 Thread Joseph Chrestien
Thanks David and Simon for your kind help. I used David's solution and it works brilliantly. Very nice. I didn't know of this NullVoice context, I'll take a look at it. Nice day to all of you Joseph On Mon, Apr 4, 2016 at 7:57 AM -0700, "Simon Albrecht"

Re: Scheme function to force any noteEvent to a skipEvent

2016-04-04 Thread Simon Albrecht
Hi Joseph, a more common approach to the situation is using a separate music variable containing information common to all parts. E.g. % aux = { \tempo 4 = 100 s1 \bar "|." } musicOne = { e'1 } musicTwo = { c'1 } \score { << \new Staff << \new NullVoice \aux

Re: Scheme function to force any noteEvent to a skipEvent

2016-04-04 Thread David Kastrup
Joseph Chrestien <_...@live.com> writes: > Hi all, > > is it possible to change all notes in a voice to skips through a function ? > > E.g. ` \silence c4 \tempo 4=100 f8\p g8 ` would be compiled as ` s4 \tempo > 4=100 s8\p s8 `. Note all other events would stay the same. \version "2.19.32"

Re: Scheme function to output \bookpart {} ?

2015-10-01 Thread Simon Albrecht
On 30.09.2015 01:28, Thomas Morley wrote: Could you post a fully compilable example for follow readers? Here’s a demo file showing the entire framework in action (since you seemed to be interested in more detail, I included all of it (except for style-sheet information), resulting in quite a

Re: Scheme function to output \bookpart {} ?

2015-09-30 Thread Thomas Morley
2015-09-29 11:31 GMT+02:00 Simon Albrecht : > On 24.09.2015 00:22, Simon Albrecht wrote: >> >> On 23.09.2015 22:45, Thomas Morley wrote: >>> >>> 2015-09-23 17:50 GMT+02:00 Simon Albrecht : Hello, is it possible to have a Scheme

Re: Scheme function to output \bookpart {} ?

2015-09-29 Thread Simon Albrecht
On 24.09.2015 00:22, Simon Albrecht wrote: On 23.09.2015 22:45, Thomas Morley wrote: 2015-09-23 17:50 GMT+02:00 Simon Albrecht : Hello, is it possible to have a Scheme function output a bookpart? In the attached example and my real-world setup, I get ‘error: bad

Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread David Kastrup
Simon Albrecht writes: > On 23.09.2015 23:43, David Kastrup wrote: >> Thomas Morley writes: >> >>> 2015-09-23 17:50 GMT+02:00 Simon Albrecht : Hello, is it possible to have a Scheme function output a

Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread Simon Albrecht
On 23.09.2015 22:45, Thomas Morley wrote: 2015-09-23 17:50 GMT+02:00 Simon Albrecht : Hello, is it possible to have a Scheme function output a bookpart? In the attached example and my real-world setup, I get ‘error: bad expression type’. TIA, Simon Hi Simon, this may

Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread Simon Albrecht
On 23.09.2015 23:43, David Kastrup wrote: Thomas Morley writes: 2015-09-23 17:50 GMT+02:00 Simon Albrecht : Hello, is it possible to have a Scheme function output a bookpart? In the attached example and my real-world setup, I get ‘error: bad

Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread Simon Albrecht
On 23.09.2015 22:45, Thomas Morley wrote: 2015-09-23 17:50 GMT+02:00 Simon Albrecht : Hello, is it possible to have a Scheme function output a bookpart? In the attached example and my real-world setup, I get ‘error: bad expression type’. TIA, Simon Hi Simon, this may

Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread David Kastrup
Thomas Morley writes: > 2015-09-23 17:50 GMT+02:00 Simon Albrecht : >> Hello, >> >> is it possible to have a Scheme function output a bookpart? In the attached >> example and my real-world setup, I get ‘error: bad expression type’. >> >> TIA,

Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread Thomas Morley
2015-09-23 17:50 GMT+02:00 Simon Albrecht : > Hello, > > is it possible to have a Scheme function output a bookpart? In the attached > example and my real-world setup, I get ‘error: bad expression type’. > > TIA, Simon Hi Simon, this may give you a starting point:

Re: Scheme function

2015-06-10 Thread Víctor
Thank you very much for your answer and the documentation, I looked for scheme tutorials but only found very large books which I don't have time to read right now. I'll take a look to lilypond's scheme tutorial right away. Thanks again. Víctor El 10/06/15 a las 10:34, Simon Albrecht escibió:

Re: Scheme function

2015-06-10 Thread David Kastrup
Víctor piratabonifa...@gmail.com writes: Thank you very much for your answer, this works very well. I'll be studying the scheme tutorial so I don't have to bother you people with basic things. Regards, Víctor. El 10/06/15 a las 12:04, Nathan Ho escibió: Hi Victor, Here's one way to do

Re: Scheme function

2015-06-10 Thread Víctor
Thank you very much for your answer, this works very well. I'll be studying the scheme tutorial so I don't have to bother you people with basic things. Regards, Víctor. El 10/06/15 a las 12:04, Nathan Ho escibió: Hi Victor, Here's one way to do it: solfa = #(define-music-function

Re: Scheme function

2015-06-10 Thread Nathan Ho
On Wed, Jun 10, 2015 at 7:17 AM, Víctor piratabonifa...@gmail.com wrote: Hi all: solfa = #(define-music-function (parser location framed number note) (string? string? string?) #{ ^\markup{ \box \pad-to-box #'(0 . 0) #'(0 . 2.2){ #framed } #number :

Re: Scheme function for alternate tagged swing stopped working

2014-12-25 Thread Christopher R. Maden
On 12/24/2014 11:15 PM, I wrote: I’m trying to figure out a generic way to do a *shallow* copy of heterogeneous structures (i.e., to traverse and copy unmodified as a starting point, before introducing the few small modifications I want to make). Searching hasn’t turned up anything other

Re: Scheme function for alternate tagged swing stopped working

2014-12-24 Thread Christopher R. Maden
On 12/21/2014 04:29 AM, Thomas Morley wrote: it's due to the changes for 'EventChord. Until 2.15.x (don't remember the exact version) every single note was wrapped into an 'EventChord. Thanks, Harm! That’s the clue I needed. A quick fix would be to wrap the music into EventChords again. I

Re: Scheme function for alternate tagged swing stopped working

2014-12-21 Thread Thomas Morley
2014-12-21 8:29 GMT+01:00 Christopher R. Maden cr...@maden.org: I wrote a function \sw, against LilyPond 2.12, a while back. It takes music as an argument, and returns two copies of the music, one tagged 'layout and one tagged 'midi. The 'midi tagged one has eighth notes changed to

Re: scheme function that conditionally sets several variables in \paper?

2014-12-06 Thread Paul Morris
Just for the record, I'm using this way of getting and setting paper variables with scheme in the latest version of my scale vertical spacing code, along with some other changes and improvements: https://github.com/openlilylib/openlilylib/tree/master/notation-snippets/scale-vertical-spacing

Re: scheme function that conditionally sets several variables in \paper?

2014-11-16 Thread Paul Morris
Thomas Morley-2 wrote Hi Paul, maybe something at the lines of: my-paper-settings = #'((system-system-spacing . (padding . 10)) ;(score-system-spacing . (padding . 0)) ;(markup-system-spacing . (padding . 0)) ;(score-markup-spacing . (padding . 0))

Re: scheme function that conditionally sets several variables in \paper?

2014-11-16 Thread Thomas Morley
2014-11-16 16:31 GMT+01:00 Paul Morris p...@paulwmorris.com: Thomas Morley-2 wrote Hi Paul, maybe something at the lines of: my-paper-settings = #'((system-system-spacing . (padding . 10)) ;(score-system-spacing . (padding . 0)) ;(markup-system-spacing . (padding . 0))

Re: scheme function that conditionally sets several variables in \paper?

2014-11-16 Thread Paul Morris
Thomas Morley-2 wrote I looked in the source: lily-library.scm paper.scm Though, I'm not an expert with this. For example, have a look at 'paper-variable' from lily-library.scm. You'll find a local 'get-papers'-variable, seems there is probably something more to think of. It's beyond my

Re: scheme function that conditionally sets several variables in \paper?

2014-11-15 Thread Thomas Morley
2014-11-09 18:36 GMT+01:00 Paul Morris p...@paulwmorris.com: Greetings all, Is there currently a way to get the scheme function below (a minimal example) to do what it's trying to do, namely return a paper block with several parts that are conditionally added or omitted? I have tried

Re: Scheme function to affect a compound music expression?

2014-10-25 Thread Peter Crighton
2014-10-24 23:01 GMT+02:00 Peter Crighton petecrigh...@gmail.com: 2014-10-24 16:54 GMT+02:00 Robin Bannister r...@dataway.ch: So it looks like LilyPond wants to merge the rests, but will do this only if they seem identical. Having read through the regression snippet and been inspired by

  1   2   >