Re: output-filename with variable

2024-05-04 Thread Valentin Petzel
heers, Valentin Am Samstag, 4. Mai 2024, 10:58:28 MESZ schrieb corde...@disroot.org: > Hello everyone, > > Is there a simple way to have the output-filename as a variable (the title > of the main header)? > > This one doesn’t recognise the property as a string: > > \paper {

output-filename with variable

2024-05-04 Thread cordelia
Hello everyone, Is there a simple way to have the output-filename as a variable (the title of the main header)? This one doesn’t recognise the property as a string: \paper { output-filename = \fromproperty #'header:title } Thank you all, cord

Re: Help using a Scheme variable in a function

2024-04-13 Thread ming tsang
Hello Mathew Fong, I am very interested in this scheme variable in a function, however I have a hard time generating a working .ly with sample output. Thank you. -- ming (lyndon) tsang

Re: Control breaks in staff that I get from a variable?

2024-03-11 Thread Raphael Mankin
On 10/03/2024 12:41, Ole V. Villumsen wrote: The classic fix is << \new Devnull { s1*5 \break } \staffIGot This was exactly what I was after. It’s nice and simple and works well. Thank you. I might wish for it being better documented. I see Devnull documented well in the

Re: Control breaks in staff that I get from a variable?

2024-03-10 Thread Jean Abou Samra
Le dimanche 10 mars 2024 à 18:33 +, Werner LEMBERG a écrit : > > Can you provide some additional sentence or sentences for the > documentation so that we have something to start with? See also https://gitlab.com/lilypond/lilypond/-/issues/6439 signature.asc Description: This is a

Re: Control breaks in staff that I get from a variable?

2024-03-10 Thread Werner LEMBERG
>> The classic fix is >> >> << >> \new Devnull { s1*5 \break } >> \staffIGot > > This was exactly what I was after. It’s nice and simple and works > well. Thank you. > > I might wish for it being better documented. I see Devnull > documented well in the Internals Reference, but I didn’t

Re: Control breaks in staff that I get from a variable?

2024-03-10 Thread Ole V. Villumsen
> The classic fix is > > << > \new Devnull { s1*5 \break } > \staffIGot > >> This was exactly what I was after. It’s nice and simple and works well. Thank you. I might wish for it being better documented. I see Devnull documented well in the Internals Reference, but I didn’t readily see it

Re: Control breaks in staff that I get from a variable?

2024-02-10 Thread Jean Abou Samra
> As some of us know, this does not work: > > << >   \staffIGot >   { s1*5 \break } > >> > > It introduces an extra staff. Not wanted. The classic fix is << \new Devnull { s1*5 \break } \staffIGot >> Best, Jean signature.asc Description: This is a digitally signed message part

Control breaks in staff that I get from a variable?

2024-02-10 Thread Ole V. Villumsen
**Question in short**: Suppose I have a staff in a variable. Can I impose breaks (line breaks, page breaks, page turns) on that staff without modifying the variable? My use case is using the staff in a part and in a score with other parts, where obviously the breaks need to be different

keep a \book in a Variable

2024-01-22 Thread Paul McKay
Hi I’m producing scores on multiple page sizes. The basic technique is to create a new book for each size. Like this: music = { \new PianoStaff << \new Staff = "right" << \clef treble \new Voice\soprano >> \new Staff = "left" << \clef bass \new Voice \tenor \new Voice

Re: Help using a Scheme variable in a function

2024-01-06 Thread Matthew Fong
Ah ha! Thank you, David! \override #`(line-width . ,rubricsWidthSU) does indeed work. I have to be mindful of the environment I'm using the variable in. Many thanks, mattfong On Sat, Jan 6, 2024 at 3:43 PM David Kastrup wrote: > David Kastrup writes: > > > David Kas

Re: Help using a Scheme variable in a function

2024-01-06 Thread David Kastrup
David Kastrup writes: > David Kastrup writes: > >> Matthew Fong writes: >> >>> I tried the following inside the function, and all generate errors. I would >>> like to use the value of rubricsWidthSU in this override. >>> >>> \override #'(line-width . \rubricsWidthSU) >>> \override

Re: Help using a Scheme variable in a function

2024-01-06 Thread David Kastrup
David Kastrup writes: > Matthew Fong writes: > >> I tried the following inside the function, and all generate errors. I would >> like to use the value of rubricsWidthSU in this override. >> >> \override #'(line-width . \rubricsWidthSU) >> \override #'(line-width . #rubricsWidthSU) >> \override

Re: Help using a Scheme variable in a function

2024-01-06 Thread David Kastrup
Matthew Fong writes: > I tried the following inside the function, and all generate errors. I would > like to use the value of rubricsWidthSU in this override. > > \override #'(line-width . \rubricsWidthSU) > \override #'(line-width . #rubricsWidthSU) > \override #'(line-width . ,rubricsWidthSU)

Re: Help using a Scheme variable in a function

2024-01-06 Thread Matthew Fong
84) > \wordwrap #text > } > #} > ) > > \rubricsTest \markuplist { Although it is provided with its own Preface, > this Eucharistic Prayer may also be used with other Prefaces, especially > those that present an overall view of the mystery of salvation, such

Help using a Scheme variable in a function

2024-01-06 Thread Matthew Fong
with other Prefaces, especially those that present an overall view of the mystery of salvation, such as the Common Prefaces. } - I can get \hspace to happily use the variable halfInchSU. However, I cannot seem to use the variable rubricsWidthSU with \override #'(line-width . 78.84). I must

Re: changing clefs in transposed variable

2023-08-22 Thread David Kastrup
juiceDéLemon writes: > hello list, > > new here, > > i have the following simplified snippets: > > music = \relative c' { > c8 d e g, a b c4 > } > > \score > \relative c' { > \transpose c f, \music > } > > is it possible to change clef in the middle of the transposed music Please

changing clefs in transposed variable

2023-08-22 Thread juiceDéLemon
hello list, new here, i have the following simplified snippets: music = \relative c' { c8 d e g, a b c4 } \score \relative c' { \transpose c f, \music } is it possible to change clef in the middle of the transposed music lem

RE: Re: Variable binding breaks layout

2023-05-11 Thread juergen . gruen
Thank you for the explanation. Juergen.

Re: Variable binding breaks layout

2023-05-11 Thread Jean Abou Samra
Le jeudi 11 mai 2023 à 06:26 +, juergen.gr...@xyz.de a écrit : > Hello all, > > > why does each of the out commented lines break the layout when active? And > why does "(brace-Y..." not? What breaks the layout is not the variable bindings per se of course, but th

Variable binding breaks layout

2023-05-11 Thread juergen . gruen
Hello all, why does each of the out commented lines break the layout when active? And why does "(brace-Y..." not? %%% \version "2.24.0" #(define (align-to-brace)    (lambda (grob)      (let* ((refp (ly:grob-system grob))             (all-elts (ly:grob-array->list

Re: Cannot pass number variable to \markup.

2023-05-08 Thread dfro
e you input data outside a music block or without stating a mode explicitly, as with "\include "..."? I do not see it mentioned in "Notation Reference Manual, 3.1 Input modes". What I called “normal mode” is what the manual calls “note mode”. Thank you, for the cle

Re: Cannot pass number variable to \markup.

2023-05-08 Thread Jean Abou Samra
uot;? I do not see it mentioned in "Notation > Reference Manual, 3.1 Input modes".  What I called “normal mode” is what the manual calls “note mode”. > > Thank you, for the clear explanation of why \paper must be used for a > "set-..." variable outside th

Re: Cannot pass number variable to \markup.

2023-05-08 Thread dfro
in the Learning Manual, 2.4.1 Organizing pieces with variables; or, somewhere else on using Scheme in Lilypond. If I may also ask about the last example in that section of the manual: \version "2.24.1" myWidth = 60 % a number to pass to a \paper variable % (the unit is millimeter) myNam

Re: Cannot pass number variable to \markup.

2023-05-07 Thread Jean Abou Samra
g Manual, 2.4.1 Organizing pieces with > variables; or, somewhere else on using Scheme in > Lilypond. > > If I may also ask about the last example in that section of the manual: > > > > > > \version "2.24.1" > > myWidth = 60 % a number

Re: Cannot pass number variable to \markup.

2023-05-07 Thread Jean Abou Samra
Le dimanche 07 mai 2023 à 10:09 -0400, dfro a écrit : > > Hello, fellow music engravers. > > > > I would like to pass a number variable to \markup, but my attempts are not > working. > > When I try to pass a number variable to \markup I get the following me

Cannot pass number variable to \markup.

2023-05-07 Thread dfro
Hello, fellow music engravers. I would like to pass a number variable to \markup, but my attempts are not working. When I try to pass a number variable to \markup I get the following message: "error: syntax error, unexpected NUMBER_IDENTIFIER". Examples: fontsize-number = #5 { c

Re: substitution function variable name

2023-01-28 Thread Jean Abou Samra
On 22/01/2023 18:31, Jean Abou Samra wrote: > Le 22/01/2023 à 18:22, Darren Ng a écrit : >> Thanks. The following works: >> >>    accOne = >>    #(define-music-function >>    (x    ) >>    (ly:pitch?) >> #{ >>    $x 8 $x 8 >> #}) >> >> My ultimate goal is a function which

Re: substitution function variable name

2023-01-22 Thread Jean Abou Samra
Le 22/01/2023 à 18:22, Darren Ng a écrit : Thanks. The following works: accOne = #(define-music-function (x) (ly:pitch?) #{ $x 8 $x 8 #}) My ultimate goal is a function which does the following accTwo = #(define-music-function (x

Re: substitution function variable name

2023-01-22 Thread Darren Ng
tput is: > >> > >> f8 f8 f8 f8 f8 > >> > >> However, lilypond reports error as follows: > >> > >> GNU LilyPond 2.24.0 (running Guile 2.2) > >> Processing `main.ly' > >> Parsing... > &g

Re: substitution function variable name

2023-01-22 Thread Jean Abou Samra
$   x8 $x8 $x8 $x8 $x8 Unbound variable: x8 accompanimentfunc.ly:19:10: error: Guile signaled an error for the expression beginning here $x8 $   x8 $x8 $x8 $x8 Unbound variable: x8 accompanimentfunc.ly:19:14: error: Guile signaled an error

Re: substitution function variable name

2023-01-22 Thread Jean Abou Samra
f8 f8 However, lilypond reports error as follows: GNU LilyPond 2.24.0 (running Guile 2.2) Processing `main.ly' Parsing... accompanimentfunc.ly:19:6: error: Guile signaled an error for the expression beginning here $ x8 $x8 $x8 $x8 $x8 Unbound variable

substitution function variable name

2023-01-22 Thread Darren Ng
: GNU LilyPond 2.24.0 (running Guile 2.2) Processing `main.ly' Parsing... accompanimentfunc.ly:19:6: error: Guile signaled an error for the expression beginning here $ x8 $x8 $x8 $x8 $x8 Unbound variable: x8 accompanimentfunc.ly:19:10: error: Guile signaled

Re: Can a \bookpart be a variable?

2022-09-23 Thread Jean Abou Samra
into a \bookpart, set the bookpart as a variable, then \include the file name in a separate master file and call on the variable there. But when I do that and try to compile the master, I just get a bunch of error messages in the original file (I'm using Frescobaldi, and all of the variables

Can a \bookpart be a variable?

2022-09-23 Thread Brent Annable
Hi all, I've been typesetting a bunch of hymns for inclusion in a larger publication, and I now have about 100 separate Lilypond files that I need to collate into a single master file. It seems easiest to me to turn each individual file into a \bookpart, set the bookpart as a variable

Re: error: Unbound variable: \version

2022-09-20 Thread David Wright
cm:462:5 <0>: > > > In procedure primitive-load-path in expression (primitive-load-path > > > file-name): > > > > > > C:/LilyPond_2-18-2/usr/share/lilypond/current/scm/lily.scm:462:5 <1>: > > > Unbound variable: \version > > > > > >

Re: error: Unbound variable: \version

2022-09-20 Thread Jean Abou Samra
Le 20/09/2022 à 11:49, ming tsang a écrit : Hi Jean, The following code is in v2.23.11 and it run OK. \version "2.23.11" \markup "test" And the log file is : Starting lilypond.exe 2.23.11 [Untitled (11)]... Processing

Re: error: Unbound variable: \version

2022-09-20 Thread Andrew Bernard
I am curious as to why you are still using 2.18.2. Is it really necessary for you? Why? Stable release is now 22.22.2. That's a _long_ way further on. I'm not sure people want to spend time helping debug 2.18.2 issues. Just asking. Andrew

Re: error: Unbound variable: \version

2022-09-20 Thread ming tsang
ting lilypond-windows.exe 2.18.2 [Untitled (9)]... > > > > C:/LilyPond_2-18-2/usr/share/lilypond/current/scm/lily.scm:462:5 <0>: > > In procedure primitive-load-path in expression (primitive-load-path > > file-name): > > > > C:/LilyPond_2-18-2/usr/share/l

Re: error: Unbound variable: \version

2022-09-20 Thread Jean Abou Samra
current/scm/lily.scm:462:5 <0>: In procedure primitive-load-path in expression (primitive-load-path file-name): C:/LilyPond_2-18-2/usr/share/lilypond/current/scm/lily.scm:462:5 <1>: Unbound variable: \version Exited with return code 1. QUESTION: I have version in my computer. I

error: Unbound variable: \version

2022-09-20 Thread ming tsang
cedure primitive-load-path in expression (primitive-load-path file-name): C:/LilyPond_2-18-2/usr/share/lilypond/current/scm/lily.scm:462:5 <1>: Unbound variable: \version Exited with return code 1. QUESTION: I have version in my computer. I have window 10, lilypond v2.18.2 and v2.23.10, freco

Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-08 Thread Kenneth Wolcott
Hi Ya; Thank you for showing me the "\set Voice.midiExpression" idea. Ken On Tue, Jun 7, 2022 at 12:11 AM Ya Gloops wrote: > > May be mix with \set Voice.midiExpression=#1 ... > > \version "2.22.2" > > > % Massenet: Meditation, from "Thais" > > > global = { > \language "english" >

Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-08 Thread Kenneth Wolcott
Hi Peter; Thank you very much for helping me connect the Dynamics context with the GrandStaff; I just did not grasp this previously. I definitely need to start implementing the Dynamics context in my Lilypond projects. Ken On Mon, Jun 6, 2022 at 11:15 PM wrote: > > > "Kenneth" ==

Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-08 Thread Kenneth Wolcott
Hi David; Thank you for the tip regarding DAW; seems a bit over my head for now, but I will put it in my ToDo list for future reference. Ken On Mon, Jun 6, 2022 at 10:44 PM David Bellows wrote: > > If you care a lot about how it sounds then you'll want to import the > MIDI into a DAW and

Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-07 Thread Ya Gloops
May be mix with \set Voice.midiExpression=#1 ... \version "2.22.2" % Massenet: Meditation, from "Thais" global = {   \language "english"   \numericTimeSignature   \time 4/4   \key d \major   \tempo "Andante religioso" } \header {   title = "Meditation"   subtitle = "(from \"Thais\")"  

Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-07 Thread peter
> "Kenneth" == Kenneth Wolcott writes: Kenneth> Frequently I have engraved music that doesn't sound good Kenneth> when the corresponding midi is played, usually with regards Kenneth> to two (or more) instruments that are overwhelmed by one of Kenneth> them. There are ways to set the

Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-06 Thread David Bellows
If you care a lot about how it sounds then you'll want to import the MIDI into a DAW and make your adjustments there. If you are content with just the MIDI sounds then what I have done in the past is to make a copy of the LilyPond file and make all the adjustments I want to the dynamics on that

Re: Custom Spanner with variable length sections

2022-04-17 Thread Dimitris Marinakis
> What are you using this spanner for, by the way? > I'll use it for various spanners that need gradual changes, primarily for trills with variable speed. There are other more text-based notations but I like the simplicity of the spanner. I am surprised by the font issue though. Is Li

Re: Custom Spanner with variable length sections

2022-04-15 Thread Jean Abou Samra
Le 15/04/2022 à 22:41, Dimitris Marinakis a écrit : Thank you, much better now :) The only thing to improve here would be to have separate paddings for each system. For some reason the staff-padding currently behaves more like a fixed offset. If you have very high notes they get clipped.

Re: Custom Spanner with variable length sections

2022-04-15 Thread Dimitris Marinakis
Thank you, much better now :) The only thing to improve here would be to have separate paddings for each system. For some reason the staff-padding currently behaves more like a fixed offset. If you have very high notes they get clipped. [image: customspannerclippednotes.jpg] I'm using 2.23.0. I

Re: Custom Spanner with variable length sections

2022-04-15 Thread Jean Abou Samra
Le 15/04/2022 à 16:35, Dimitris Marinakis a écrit : Thank you so much Jean. That looks amazing for a first try. Great work! Sorry it took me a while to test it. Less than a day? I didn't find that long :-) Upon testing I found out that it only works when there are line breaks (not on a

Re: Custom Spanner with variable length sections

2022-04-15 Thread Dimitris Marinakis
Thank you so much Jean. That looks amazing for a first try. Great work! Sorry it took me a while to test it. Upon testing I found out that it only works when there are line breaks (not on a single system). Also it would be useful to have control over the broken.left/right paddings. This is an

Re: Custom Spanner with variable length sections

2022-04-14 Thread Jean Abou Samra
Le 14/04/2022 à 16:09, Kieren MacMillan a écrit : Hi Dimitris, I need a custom spanner that has x sections with different symbols. This is going to be tricky so any help is appreciated. https://github.com/davidnalesnik/lilypond-text-spanner-inner-texts Ok, I'm not sure if this solves the

Re: Custom Spanner with variable length sections

2022-04-14 Thread Kieren MacMillan
Hi Dimitris, > I need a custom spanner that has x sections with different symbols. This is > going to be tricky so any help is appreciated. https://github.com/davidnalesnik/lilypond-text-spanner-inner-texts Hope that helps! Kieren.

Custom Spanner with variable length sections

2022-04-14 Thread Dimitris Marinakis
I need a custom spanner that has x sections with different symbols. This is going to be tricky so any help is appreciated. I already have a hacky solution for fixed length spanners but it is pain to maintain it. I'd like a more usable solution that can handle variable lengths. It would be nice

Re: Copy variable by value in a current-module.

2021-10-16 Thread Robert Kubosz
Thanks for quick answers, Jean and David! The function "ly:music-deep-copy" is the solution I was looking for :-) > module-ref and module-set! are useful for dealing with variables of which the name is not known in advance. Actually, in my case I don't know in advance the name of a v

Re: Copy variable by value in a current-module.

2021-10-16 Thread David Kastrup
Robert Kubosz writes: > I want to make a copy of a variable defined in a separate file, but run in > the same current-module. > The copy I make is a copy-by-reference, and in result any modifications I > apply to the copy also appear in the original. > How do I make a copy-by-val

Re: Copy variable by value in a current-module.

2021-10-16 Thread Jean Abou Samra
Le 16/10/2021 à 10:47, Robert Kubosz a écrit : I want to make a copy of a variable defined in a separate file, but run in the same current-module. The copy I make is a copy-by-reference, and in result any modifications I apply to the copy also appear in the original. How do I make a copy

Copy variable by value in a current-module.

2021-10-16 Thread Robert Kubosz
I want to make a copy of a variable defined in a separate file, but run in the same current-module. The copy I make is a copy-by-reference, and in result any modifications I apply to the copy also appear in the original. How do I make a copy-by-value in a current-module? More detailed example

Re: Transform notes in a variable?

2021-10-02 Thread Craig Comstock
Jean and others on this list, thank you so much for your help. It was so supportive! I was really surprised and pleased with how supportive this community was. It was certainly challenging to learn so much so quickly but I have accomplished a score for general use, and also a specific viola

Re: Transform notes in a variable?

2021-08-02 Thread Craig Comstock
> mappingOne = { } > mappingTwo = { } > > music = { c' d' e' } > > \transformPitches \mappingOne \music > \transformPitches \mappingTwo \music This is exactly what I needed. Once again I am impressed by the generosity of your time. > Since you seem interested by the Scheme level, Yes,

Re: Transform notes in a variable?

2021-08-02 Thread Jean Abou Samra
Le 02/08/2021 à 11:25, Jean Abou Samra a écrit : Like this perhaps? The mapping is defined in chords, internally converted to an alist. It just seemed easier to input { } than #`((#{ c' #} . #{ d' #})). Sorry, I meant: #`((,#{ c' #} . ,#{ d' #})) Jean

Re: Transform notes in a variable?

2021-08-02 Thread Jean Abou Samra
Le 02/08/2021 à 02:27, Craig Comstock a écrit : Related to my other question of note names I am wondering if it is possible to maybe write a mapping function of some sort for pitches? I know there is transpose like shown here: https://lilypond.org/doc/v2.22/Documentation/web/text-input

Re: Transform notes in a variable?

2021-08-01 Thread Craig Comstock
Oh no. A typo in my alist. I’ll be quiet now for a while and dig before asking more. :) >> Where transformOne would map c’ to say e’ and d’ to g’’. > > So I would expect to define transformOne something like > > ((c' . e') (d' . g'’)) Thanks, Craig

Re: Transform notes in a variable?

2021-08-01 Thread Craig Comstock
To be clear, I would like to transform all of the notes in a particular part or staff. Ideally defining a map like an alist is it in scheme? > \version "2.20.0" > riff = { c' r d' r } > << > \new Staff \riff > % \new Staff \transformOne \riff > >> > > Where transformOne would map c’ to say e’

Transform notes in a variable?

2021-08-01 Thread Craig Comstock
Related to my other question of note names I am wondering if it is possible to maybe write a mapping function of some sort for pitches? I know there is transpose like shown here: https://lilypond.org/doc/v2.22/Documentation/web/text-input

Re: Scheme doesn't check for missspeeled variable names???

2021-07-21 Thread Aaron Hill
(Do try to keep the mailing list on all replies, so that threads do not get disrupted and to ensure broad visibility and participation.) On 2021-07-21 9:11 am, James B. Wilkinson wrote: On Jul 20, 2021, at 11:16 PM, Aaron Hill wrote: On 2021-07-20 8:11 pm, James B. Wilkinson wrote: I

Re: Scheme doesn't check for missspeeled variable names???

2021-07-20 Thread Aaron Hill
On 2021-07-20 8:11 pm, James B. Wilkinson wrote: I fat-fingered the keyboard on my laptop and got this: flute-notes = { \override BreathingSigh.Y-offset = #2.6 %% also tried #5.0 and some really big numbers; no effect 7 bars of music in 4/4 } AND I never got an error

Scheme doesn't check for missspeeled variable names???

2021-07-20 Thread James B. Wilkinson
I fat-fingered the keyboard on my laptop and got this: flute-notes = { \override BreathingSigh.Y-offset = #2.6 %% also tried #5.0 and some really big numbers; no effect 7 bars of music in 4/4 } AND I never got an error message. This seems to mean that Scheme has no

Re: Markup in a variable

2021-04-29 Thread David Kastrup
Mark Probert writes: > You wrote: >> >> You have an extra pair of braces around your \markup. Consider: >> >> -- Aaron Hill > > Doh! Many thanks. Absolutely see it now It's an inviting fallacy to consider braces { } as just grouping, just like Scheme beginners tend to be tripped up by the

Re: Markup in a variable

2021-04-29 Thread Mark Probert
You wrote: > > You have an extra pair of braces around your \markup. Consider: > > -- Aaron Hill Doh! Many thanks. Absolutely see it now .. m.

Re: Markup in a variable

2021-04-29 Thread Aaron Hill
On 2021-04-28 10:43 pm, Mark Probert wrote: Hi, all. I'm getting myself confused. I have an include file -- foo.ily -- and I want to define different instrument names for later use, like altoSax = { \markup { \fontsize #-2 { Alto Saxophone \concat { E { \raise #0.5 \teeny \flat }

Markup in a variable

2021-04-28 Thread Mark Probert
Hi, all. I'm getting myself confused. I have an include file -- foo.ily -- and I want to define different instrument names for later use, like altoSax = { \markup { \fontsize #-2 { Alto Saxophone \concat { E { \raise #0.5 \teeny \flat } tenorSax = { \markup { \fontsize #-2 { Tenor

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-10 Thread Valentin Petzel
Hello Stefano, Here’s an improved version that also allows for Markup between the examples. Cheers, Valentin#(define (string-replace-substring s substring replacement) "Replace every instance of substring in s by replacement." (let ((sublen (string-length substring)))

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-10 Thread Valentin Petzel
Hello Stefano, Here’s a slightly improved example, offering more control. Cheers, Valentin Am Mittwoch, 10. März 2021, 05:31:07 CET schrieben Sie: > Thank you for the example Valentin, > > a very interesting approach. I think I was headed in that direction, in > fact, although you code will

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread David Wright
On Sun 07 Mar 2021 at 14:48:08 (+), Peter Toye wrote: > The 2.22 documentation is obviously better here: > > The name of a variable should not contain (ASCII) numbers, multiple > underscores, multiple dashes or space characters. All other characters > Unicode provi

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Peter Toye
The 2.22 documentation is obviously better here: The name of a variable should not contain (ASCII) numbers, multiple underscores, multiple dashes or space characters. All other characters Unicode provides are allowed, for example Latin, Greek, Chinese or Cyrillic. Non-adjacent single

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Silvain Dupertuis
Hello, Browsing the documentation, I did not find anything about variable names with allowing non-alphabetic characters. Did I miss something? Here are extracts the 2.20 documentation == 3.1.1 Introduction to the LilyPond file structure <3.

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread David Kastrup
Peter Toye writes: > Thanks for putting me right yet again. I'm not quite sure what you > mean by 'resized'. q4 is surely legal? Sure, but it's two chords, not one. -- David Kastrup

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Peter Toye
Thanks for putting me right yet again. I'm not quite sure what you mean by 'resized'. q4 is surely legal? Best regards, Peter mailto:lilyp...@ptoye.com www.ptoye.com - Sunday, March 7, 2021, 12:09:30 PM, David Kastrup wrote: > Peter Toye writes: >> I asked this

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Peter Toye
- Sunday, March 7, 2021, 12:34:45 PM, Werner LEMBERG wrote: >> Yes, it's documented in the Notation Reference Manual section 3.1.5 >> File Structure. It doesn't seem the obvious place to put the syntax >> of variable names. > Well, there is a proper in

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Werner LEMBERG
> Yes, it's documented in the Notation Reference Manual section 3.1.5 > File Structure. It doesn't seem the obvious place to put the syntax > of variable names. Well, there is a proper index entry... However, documentation for the 'foo.1.bar.2' trick is still missing. Do you have

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread David Kastrup
Peter Toye writes: > I asked this question some time ago, and David Kastrup was kind enough > to put me right. > > The problem , as you mentioned, is in the way that numbers are used > for durations. Consider the following code: > > chord = > chord2= > > c1 \chord2 > > Should the second

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Peter Toye
Yes, it's documented in the Notation Reference Manual section 3.1.5 File Structure. It doesn't seem the obvious place to put the syntax of variable names. Best regards, Peter mailto:lilyp...@ptoye.com www.ptoye.com - > Message: 4 > Date: Sat, 6 Mar 2021 21:30:56

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Peter Toye
:17:02 +0100 > From: Silvain Dupertuis > To: lilypond-user@gnu.org > Subject: Re: Workaround for (not-allowed) numbers in variable names? > Message-ID: > Content-Type: text/plain; charset="utf-8"; Format="flowed" > I also wondered why numbers are not allowed i

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread David Kastrup
田村淳 writes: > Thank you! > > Now I understand that keys separated by periods, for example, > StaffGrouper.staff-staff-spacing.basic-distance = #7 > is a way to access a nested alist easily. Yes, and it has been like that a long time. Being able to access it with

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread 田村淳
d, >> >>> gamme.1 is not a variable name. It takes gamme to be an alist, and the >>> entry under key 1 is what is addressed here. >> Since you showed the Scheme equivalent below, I guess the above is a part of >> LilyPond syntax, or something the LilyPond parser do

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Jean Abou Samra
Le 07/03/2021 à 03:03, 田村淳 a écrit : Hello David, gamme.1 is not a variable name. It takes gamme to be an alist, and the entry under key 1 is what is addressed here. Since you showed the Scheme equivalent below, I guess the above is a part of LilyPond syntax, or something the LilyPond

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-06 Thread 田村淳
Hello David, > gamme.1 is not a variable name. It takes gamme to be an alist, and the > entry under key 1 is what is addressed here. Since you showed the Scheme equivalent below, I guess the above is a part of LilyPond syntax, or something the LilyPond parser does. Is that docu

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-06 Thread David Kastrup
Silvain Dupertuis writes: > I still checked this use of variable with numbers. > *Wonderful to see that it works.* > > One important note, though: > If you use a numbered variable, _you cannot use the same variable > without an additional number_. gamme.1 is not a variable nam

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-06 Thread Silvain Dupertuis
I still checked this use of variable with numbers. *Wonderful to see that it works.* One important note, though: If you use a numbered variable, _you cannot use the same variable without an additional number_. *This should be added somewhere in the documentation!* Here is a snippet

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-06 Thread 田村淳
sen wrote: >> I believe it was David K who made this magic work: >> >> \version "2.20.0" >> >> mus.1 = { c d e } >> >> \score { >> \new Staff { \mus.1 } >> } >> > > This can be extended to cover the case where a vari

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-06 Thread Richard Shann
On Fri, 2021-03-05 at 10:15 -0800, Mogens Lemvig Hansen wrote: > I believe it was David K who made this magic work: >   > \version "2.20.0" >   > mus.1 = { c d e } >   > \score { >   \new Staff { \mus.1 } > } >   This can be extended to cover the case whe

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread Silvain Dupertuis
Yes, it works with quotes in the variable definition as well as in the call : /Exemple/ "gamme1" = \relative c' { g a b c d e f g } \score { \"gamme1" } Nice !! Le 05.03.21 à 18:13, Kenneth Wolcott a écrit : Thank you for asking (and answering) this question! I a

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread Valentin Petzel
Hello Stefano, You might try to keep the whole thing dynamic and leave the numbering and stuff to Lilypond. For example you could have just a list of all Examples in one Category and then have a function to print that out. You could even do a list of Categories and print them all at once. This

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread Tom Brennan
iables names for the main musical categories and sub-categories and then assign each score snippet to progressively numbered variable. So I would have, CategA-1 = {"code for one exercise"} , CategB-2 = "code for another exercise"}, and so on. Clean structure, easy to maintain and re

RE: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread Mogens Lemvig Hansen
I believe it was David K who made this magic work: \version "2.20.0" mus.1 = { c d e } \score { \new Staff { \mus.1 } } Regards, Mogens From: Silvain Dupertuis Sent: March 5, 2021 10:12 To: lilypond-user@gnu.org Subject: Re: Workaround for (not-allowed) numbers in variable name

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread Silvain Dupertuis
in variable names...! Le 05.03.21 à 17:37, stefano franchi a écrit : Here is a question for anyone who may have been using lilypond for projects involving text and many, many, short and similar musical snippets. I am putting together a book that will contain many (very brief)  exercises

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread Kenneth Wolcott
tegories and >> sub-categories and then assign each score snippet to progressively numbered >> variable. So I would have, CategA-1 = {"code for one exercise"} , CategB-2 = >> "code for another exercise"}, and so on. Clean structure, easy to maintain >> and rearra

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread stefano franchi
musical > categories and sub-categories and then assign each score snippet to > progressively numbered variable. So I would have, CategA-1 = {"code for one > exercise"} , CategB-2 = "code for another exercise"}, and so on. Clean > structure, easy to maintain and rea

  1   2   3   4   5   6   7   8   9   >