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)))
(with-output-to-stri
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 ma
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 provides are allowed, for exampl
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 underscore
(which is also nice...). But anyhow, for
this matter, the indications are the same.
Best regards
/Silvain/
Le 07.03.21 à 12:50, Peter Toye a écrit :
Re: Workaround for (not-allowed) numbers in variable names? Yes, it's documented in the
Notation Reference Manual section 3.1.5 File Structur
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
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 quest
My personal view is that variables are important concepts and deserve a
separate section somewhere - possibly 3.1.6 as a separate part of 'File
Structure'. I note that the preceding section on markup text does not contain
any detailed syntax definition - not even a link to the relevant section.
> 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 a better sug
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 element
1 21:30:56 +0900
> From: 田村淳
> To: "lilypond-user@gnu.org"
> Subject: Re: Workaround for (not-allowed) numbers in variable names?
> Message-ID:
> Content-Type: text/plain; charset="utf-8"
> Wow! This is something I’ve been looking for for a long time. Is
: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
田村淳 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
\StaffGrouper.staff-staff-spaci
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.
Jun
> 2021/03/07 17:26、Jean Abou Samra のメール:
>
> Le 07/03/2021 à 03:03, 田村淳 a écrit :
>
>> Hello David,
>>
>>> gamme.1 is not
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 parse
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 documented
elsewhere
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 name. It takes gamme
><8><8><8><8><8><
(cautionary note: I haven't examined the code or docs on this, but it
seems a dot before and after will do the trick mid-word and a single
dot at end of word)
A decade or so ago I resorted to converting all the numbers to Roman
numerals using
(cautionary note: I haven't examined the code or docs on this, but it
> seems a dot before and after will do the trick mid-word and a single
> dot at end of word)
>
> A decade or so ago I resorted to converting all the numbers to Roman
> numerals using a C routine that's k
ord and a single
dot at end of word)
A decade or so ago I resorted to converting all the numbers to Roman
numerals using a C routine that's knocking around on the interweb...
time I upgraded that.
Richard Shann
> Regards,
> Mogens
>
> From: Silvain Dupertuis
> Sent:
, CategB-2 = "code for another
exercise"}, and so on. Clean structure, easy to maintain and rearrange, etc.
Then I discovered that lilypond does not allow numbers in variable names :-(
I'd be willing to bet my use case is not particularly weird---there must have
been other p
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
level variables 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 maint
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
I would have, CategA-1 = {"code for one exercise"} ,
CategB-2 = "code for another exercise"}, and so on. Clean structure, easy to maintain
and rearrange, etc.
Then I discovered that lilypond does not allow numbers in variable names :-(
I'd be willing to bet my use
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 r
d rearrange, etc.
>
> Then I discovered that lilypond does not allow numbers in variable
> names :-(
>
> I'd be willing to bet my use case is not particularly weird---there must
> have been other people e
"code for another exercise"}, and so on. Clean
structure, easy to maintain and rearrange, etc.
Then I discovered that lilypond does not allow numbers in variable
names :-(
I'd be willing to bet my use case is not particularly weird---there must
have been other people encounteri
For example, you can define your own music function that has a single
numerical argument (for example to modify some spacing parameters).
The syntax for such a function would be exacty of the form \myvar 1.
/Mats
[EMAIL PROTECTED] wrote:
I would expect that
\myvar1 refers to the variable
> I would expect that
>\myvar1 refers to the variable myvar1
>\myvar 1 refers to the var myvar followed by 1
As regards the expression
\myvar 1
in what context do you use that?
-- Tom
Andrew Black wrote:
I would r
Han-Wen Nienhuys wrote:
c4_\staccato_\markup { bla }
does this reference \staccato or \staccato_ ?
It might be possible to enable numbers, though. I would welcome an analysis.
I would really like to see numbers in name of variables.
I am not expert on parsers so apologies if this is hard
On 19 Apr 2006, at 19:19, Daniel Johnson wrote:
I always use Roman numerals.
Interesting, I understand perfectly the weltanschauung behind the
technique. Dadaism is the next step.
In fact, I automatically convert numbers in letters with a hash table,
so you have this Picabian-style
varia
> > but Lilypond (more likely LaTeX) won't let me. Does anyone know a
> > workaround?
It's LilyPond. LaTeX isn't even used anymore. Roman numerals or
spelling out the numbers ( \globalZeroOne ) are the only ways I know
to work around it.
Geoff
___
lil
Kieren Richard MacMillan wrote:
Hello, all --
I use a lot of variables, especially when breaking larger works across
multiple pieces (and thus .ly files).
but Lilypond (more likely LaTeX) won't let me. Does anyone know a
workaround?
I always use Roman numerals.
__
Hello, all --
I use a lot of variables, especially when breaking larger works
across multiple pieces (and thus .ly files).
I'd like to name my variables numerically, e.g.,
file01.ly
global01 = { ... }
notes01 = { ... }
file02.ly
global02 = { ... }
not
35 matches
Mail list logo