Unbound variable: define-public-toplevel

2014-10-18 Thread MarcM
in 2.19, I am getting an error "Unbound variable: define-public-toplevel" when i run the file ""includeIfAbsent.ly" in the enhancement request [*] that seemed to work in 2.12. includeIfAbsent.ly:26:2: error: GUILE signaled an error for the expression beginning

Re: variable in markup possible?

2015-02-12 Thread Noeck
Hi Ole, > Is it possible to use a variable inside a markup Yes. With two modifications to your code: 1. The definition of def must be a markup (insert \markup before the \center-column) 2. You have to call a variable with a backslash (\def). The definitions of a variable is: var = … The us

Re: variable in markup possible?

2015-02-12 Thread Ole Schmidt
Am 12.02.2015 um 12:40 schrieb Noeck : www.oleschmidt.de > Hi Ole, > >> Is it possible to use a variable inside a markup > > Yes. With two modifications to your code: > 1. The definition of def must be a markup (insert \markup before the > \center-column) > 2.

Re: string variable for markup

2015-03-30 Thread Mark Knoop
7;($str . -.5) > > } > >The idea is to be able to assign a length $str Looks like you want a number, not a string. Try the following. When you use the variable you have to quasiquote the pair, thus the syntax changes slightly. Note the backtick and comma. \version "2.18.2" #(d

Re: string variable for markup

2015-03-31 Thread Stephen MacNeil
Thanks for putting on the path Mark! This is my solution thus far to a sizable hairpin for accent dynamics acdy = #(define-music-function (parser location str) (number?) #{ -\markup { \pad-markup #.5 \halign #-1.2 \combine \draw-line #`(,str . 0.7) \draw-line #`(,str . -0.7) } #} )

Re: custom, variable paper size?

2007-09-28 Thread Graham Percival
Michael Rasmussen wrote: Having just rememberd that Lilypond can output png files for web use I'm now wondering about how to trim the image automatically. You read 4.6.3 in the Program Usage on opihi. I think that change made it into the 2.11 docs, as well. - Graham __

Newbie question about variable durations

2007-11-03 Thread Ben
I thought I had this figured out, but now I'm stuck. My program generates midi notes and converts them to lily variables (ie noteone = {ees'} ). What I need to do next is add my durations onto them. It seems so simple but I get error after error. What do I need to do to combine the strings togethe

Re: variable in paper block

2009-03-27 Thread Kieren MacMillan
Hi Stefan, I would like to make a substition in the paper block, for the part title. Why not put \header { parttitle = "My Part Title" } in your "source" (notes) file/section, and then in the "score" file/ section, use oddHeaderMarkup = \markup { \fromproperty #'header:pa

Re: Dashed, variable-thickness slurs

2009-04-16 Thread David Stocker
Righteous. Not to impede your efforts, but can the same idea be applied to ties--the variable thickness, not the half & half? Carl D. Sorensen wrote: Dear LilyPond users, I've posted a patch for approval that implements variable thickness dashed and part-dashed, part-solid slurs.

Re: Dashed, variable-thickness slurs

2009-04-16 Thread Carl D. Sorensen
Actually, the tie calls the slur code, so I think it's already done. But I'll check it out more thoroughly. Carl On 4/16/09 10:27 PM, "David Stocker" wrote: > Righteous. > > Not to impede your efforts, but can the same idea be applied to > ties--the variabl

Re: Dashed, variable-thickness slurs

2009-04-17 Thread Kieren MacMillan
Hi Carl, I've posted a patch for approval that implements variable thickness dashed and part-dashed, part-solid slurs. I hope it will be fully implemented in 2.13.1. When I posted my comment about this, I never imagined it would get solved so quickly. Amazing! As a preview, h

Re: Dashed, variable-thickness slurs

2009-04-17 Thread Ian Hulin
were inherited from the composer's manuscript. Is there a slot in the documentation that covers the usage of all this fancy slur-sign stuff (LR NR)? Cheers, Ian Carl D. Sorensen wrote: Dear LilyPond users, I've posted a patch for approval that implements variable thickness das

Re: Dashed, variable-thickness slurs

2009-04-17 Thread Carl D. Sorensen
On 4/17/09 7:26 AM, "Ian Hulin" wrote: > Hi Carl, > I'll comment on the bits I feel qualified on: the documentation bits. > > It's taken me while following the threads on lilypond-devel and > lilypond-user to work out */why/* this has been developed. To tell you the truth, I don't really kno

Re: Dashed, variable-thickness slurs

2009-04-19 Thread Graham Percival
On Fri, Apr 17, 2009 at 07:31:26AM -0600, Carl D. Sorensen wrote: > > On 4/17/09 7:26 AM, "Ian Hulin" wrote: > > > I'll comment on the bits I feel qualified on: the documentation bits. > > > > It's taken me while following the threads on lilypond-devel and > > lilypond-user to work out */why/*

Re: Dashed, variable-thickness slurs

2009-04-19 Thread Carl D. Sorensen
On 4/19/09 1:16 AM, "Graham Percival" wrote: > On Fri, Apr 17, 2009 at 07:31:26AM -0600, Carl D. Sorensen wrote: > I think it's been a great learning process for everybody involved, > but I personally would work on either personal stuff (I want it!), > popular-requested stuff (more people wa

Re: Dashed, variable-thickness slurs

2009-04-19 Thread Graham Percival
On Sun, Apr 19, 2009 at 08:29:45AM -0600, Carl D. Sorensen wrote: > > On 4/19/09 1:16 AM, "Graham Percival" > wrote: > > > I think it's been a great learning process for everybody > > involved, but I personally would work on either personal stuff > > (I want it!), popular-requested stuff (more p

Re: Variable substitution in postscript?

2009-05-25 Thread Mark Polesky
Eric Knapp wrote: > What I want to do is have the value of the "thickness" variable > replace the "0.25" in the postscript. Eric, the "ly:format" function http://lilypond.org/doc/v2.13/Documentation/user/lilypond-internals/Scheme-functions.html#index-ly_003a

Re: Variable substitution in postscript?

2009-05-25 Thread Eric Knapp
Thanks, Mark. This works and will really help with the custom things I want to do. -Eric On Monday, May 25, 2009, Mark Polesky wrote: > > Eric Knapp wrote: >> What I want to do is have the value of the "thickness" variable >> replace the "0.25" in the

Re: Strings as variable names

2015-12-27 Thread Andrew Bernard
Hi Jacques, Well, the NR states: The name of a variable must have alphabetic characters only, no numbers, underscores, or dashes. That excludes spaces explicitly. The fact that you can use a quoted string is undocumented and may therefore become unsupported at any time. In Scheme, you cannot

Re: Strings as variable names

2015-12-27 Thread Johan Vromans
On Mon, 28 Dec 2015 12:05:22 +1100 Andrew Bernard wrote: > The name of a variable must have alphabetic characters only, no numbers, > underscores, or dashes. > > Most lilypond users would write bellaMelodia, conventionally. In terms of > readability, it’s clearer to read than

Re: Strings as variable names

2015-12-28 Thread David Kastrup
Johan Vromans writes: > On Mon, 28 Dec 2015 12:05:22 +1100 > Andrew Bernard wrote: > >> The name of a variable must have alphabetic characters only, no numbers, >> underscores, or dashes. >> >> Most lilypond users would write bellaMelodia, conventionally.

Re: Strings as variable names

2015-12-28 Thread Andrew Bernard
Consistency with what actually? And so the NR should in fact therefore be updated? Andrew On 28/12/2015, 20:17, "David Kastrup" wrote: The quote syntax is a bit of an ugliness which was added for sort-of consistency reasons. ___ lilypond-user mail

Re: Strings as variable names

2015-12-28 Thread David Kastrup
Andrew Bernard writes: > d...@gnu.org> wrote: >> >> The quote syntax is a bit of an ugliness which was added for sort-of >> consistency reasons. > > Consistency with what actually? After xxx = ... you can refer to \xxx. And "xxx" = ... has always been allowed for arbitrary strings. >

Re: Strings as variable names

2015-12-28 Thread Johan Vromans
On Mon, 28 Dec 2015 12:51:51 +0100 David Kastrup wrote: > "xxx" = ... > > has always been allowed for arbitrary strings. > > > And so the NR should in fact therefore be updated? > > It's not really making stuff more readable. Now if only this would work: \version "2.19.33" bella_melodia_c

Re: Strings as variable names

2015-12-28 Thread David Sumbler
> > From: David Kastrup > > To: Andrew Bernard > > Cc: lilypond-user@gnu.org > > Subject: Re: Strings as variable names > > Date: Mon, 28 Dec 2015 12:51:51 +0100 > > > > Andrew Bernard writes: > > > > > > > d...@gnu.org> wrote

Re: Strings as variable names

2015-12-28 Thread David Kastrup
David Sumbler writes: >> > From: David Kastrup >> > To: Andrew Bernard >> > Cc: lilypond-user@gnu.org >> > Subject: Re: Strings as variable names >> > Date: Mon, 28 Dec 2015 12:51:51 +0100 >> > >> > Andrew Bernard writes: >&g

Re: Strings as variable names

2015-12-28 Thread Urs Liska
Am 28.12.2015 um 18:49 schrieb David Kastrup: >> Using the syntax with quotes is rather ugly, I agree. But it is >> > nonetheless potentially useful for two reasons: >> > (1) it enables us to use numbers etc. in variable names > Why would that be desirable? >

Re: Strings as variable names

2015-12-28 Thread Marc Hohl
Am 28.12.2015 um 18:49 schrieb David Kastrup: David Sumbler writes: [...] Using the syntax with quotes is rather ugly, I agree. But it is nonetheless potentially useful for two reasons: (1) it enables us to use numbers etc. in variable names Why would that be desirable? Well, speaking

Re: Strings as variable names

2015-12-28 Thread Urs Liska
_melodia_\part" > } > > I can think of some use cases for this. I think something like this should be achievable using a music function with two string arguments. It could concatenate them in an arbitrary fashion and find the appropriate variable through the parser commands. Urs >

Re: Strings as variable names

2015-12-28 Thread David Kastrup
Urs Liska writes: > Am 28.12.2015 um 18:49 schrieb David Kastrup: >>> Using the syntax with quotes is rather ugly, I agree. But it is >>> > nonetheless potentially useful for two reasons: >>> > (1) it enables us to use numbers etc. in variable

Re: Strings as variable names

2015-12-28 Thread Kieren MacMillan
"Violin II" for their parts than otherwise. Instrument names [presentation] and variable names [content] are independent… or at least should be. Best regards, Kieren. Kieren MacMillan, composer ‣ website: www.kie

Re: Strings as variable names

2015-12-28 Thread Thomas Morley
2015-12-28 18:49 GMT+01:00 David Kastrup : [...] > > Reading people's ideas about those things make them appear like > something we would be better without. They only lead to confusion. > > -- > David Kastrup I rarely use this possibility, but it's very nice to have numbers, etc in identifiers fo

Re: Strings as variable names

2015-12-28 Thread Johan Vromans
On Mon, 28 Dec 2015 19:01:47 +0100 Urs Liska wrote: > > part = cello > > > > \score { > > \"bella_melodia_\part" > > } > > I think something like this should be achievable using a music function > with two string arguments. Yes, but my suggestion was to have a mechanism for interpolation of

Re: Strings as variable names

2015-12-28 Thread Johan Vromans
On Mon, 28 Dec 2015 17:42:03 + David Sumbler wrote: > > > It's not really making stuff more readable. > > I think it would be useful to have it added to the NR. If it's part of the language syntax, it should be documented. If it's experimental, dangerous, or deprecated, it should be docum

Re: Strings as variable names

2015-12-28 Thread Malte Meyn
Am 28.12.2015 um 19:20 schrieb David Kastrup: > What's wrong with violinI ? lexicographical sorting (of file names) ≠ roman numeral sorting >> flute_phrase01 = >> flute_phrase02 = >> >> or similar. > > When would you ever want to do that? Variations (one score per variation): fluteTheme = … fl

Re: Strings as variable names

2015-12-28 Thread David Kastrup
nd #identifier into a string, and juxtaposed with other double-quoted strings they combine into a larger string I believe. But that's only for preprocessor constants, and those are not really part of the language proper. The strings in Python's regular expression replacements can interpolate

Re: Strings as variable names

2015-12-28 Thread Johan Vromans
On Mon, 28 Dec 2015 18:49:30 +0100 David Kastrup wrote: > > I have always been frustrated by the fact that I can't (or thought I > > couldn't) use underscores in variable names, > > Well, that is hopefully more or less documented though probably not >

Re: Strings as variable names

2015-12-28 Thread David Kastrup
Malte Meyn writes: > Am 28.12.2015 um 19:20 schrieb David Kastrup: >> What's wrong with violinI ? > > lexicographical sorting (of file names) ≠ roman numeral sorting File names are not variable names. -- David Kastrup ___ lilypo

Re: Strings as variable names

2015-12-28 Thread Johan Vromans
On Mon, 28 Dec 2015 20:27:22 +0100 David Kastrup wrote: > The above is mainly confused. Remember that \n in a string stands for > newline. So there's already some kind of processing done. \{varname} would be an alternative. But it is just a suggestion. > But what _programming_ languages allow

Re: Strings as variable names

2015-12-28 Thread Werner LEMBERG
> Reading people's ideas about those things make them appear like > something we would be better without. They only lead to confusion. +1 Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond

Re: Strings as variable names

2015-12-28 Thread Simon Albrecht
On 28.12.2015 20:28, Johan Vromans wrote: NR refers to http://www.lilypond.org/doc/v2.19/Documentation/learning/organizing-pieces-with-variables which does not mention the quoted syntax, and explicitly disallows dashes Ugh, that’s bad. Especially since it’s an important feature in interlocking

Re: Strings as variable names

2015-12-28 Thread Malte Meyn
Am 28.12.2015 um 20:30 schrieb David Kastrup: > Malte Meyn writes: > >> Am 28.12.2015 um 19:20 schrieb David Kastrup: >>> What's wrong with violinI ? >> >> lexicographical sorting (of file names) ≠ roman numeral sorting > > File names are not variab

Re: Strings as variable names

2015-12-28 Thread Werner LEMBERG
> Whenever you have variables pointing to indexed parts or to > consecutive snippets you may want to use variables like > > violin1 = > violin2 = > > or > > flute_phrase01 = > flute_phrase02 = > > or similar. This is expressive as LilyPond code per se, and would > be accessible for scripting, e.g

Re: Strings as variable names

2015-12-28 Thread Johan Vromans
On Mon, 28 Dec 2015 21:39:05 +0100 (CET) Werner LEMBERG wrote: > I suggest to use the m4 preprocessor > [https://en.wikipedia.org/wiki/M4_(computer_language)] to convert, Yikes. Speaking of overkill... > say, `violin1' to `violinI'. Add the line > > define(`violin1', `violinI') This will h

Re: Strings as variable names

2015-12-28 Thread David Kastrup
Simon Albrecht writes: > On 28.12.2015 20:28, Johan Vromans wrote: >> NR refers to >> http://www.lilypond.org/doc/v2.19/Documentation/learning/organizing-pieces-with-variables >> which does not mention the quoted syntax, and explicitly disallows dashes > > Ugh, that’s bad. > Especially since it’s

Re: Strings as variable names

2015-12-28 Thread David Kastrup
syntax from all traditional UNIX utilities anyway so that does not really count. JavaScript does not appear to do variable interpolation into string literals https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String> as far as I can see. That's a far cry fro

Re: Strings as variable names

2015-12-28 Thread David Kastrup
Johan Vromans writes: > On Mon, 28 Dec 2015 21:39:05 +0100 (CET) > Werner LEMBERG wrote: > >> I suggest to use the m4 preprocessor >> [https://en.wikipedia.org/wiki/M4_(computer_language)] to convert, > > Yikes. Speaking of overkill... > >> say, `violin1' to `violinI'. Add the line >> >> def

Re: Strings as variable names

2015-12-28 Thread Johan Vromans
On Mon, 28 Dec 2015 23:04:37 +0100 David Kastrup wrote: > You conveniently snipped shells so that you could mention them again. You can find a lot more on https://en.wikipedia.org/wiki/String_interpolation But does it really matter? The point is, is it something we would want (i.e., is useful)

Re: Strings as variable names

2015-12-28 Thread Johan Vromans
On Mon, 28 Dec 2015 23:52:27 +0100 David Kastrup wrote: > So, no. I stand corrected. It's a very long since ago that I stopped using m4. > It would not be my choice of tool here nevertheless. Preprocessors in general add the disadvantage of having unmaintainable sources (you cannot edit the un

Re: Strings as variable names

2015-12-29 Thread David Kastrup
Johan Vromans writes: > On Mon, 28 Dec 2015 23:04:37 +0100 > David Kastrup wrote: > >> You conveniently snipped shells so that you could mention them again. > > You can find a lot more on > https://en.wikipedia.org/wiki/String_interpolation About a third of the examples are not even string inte

Re: Strings as variable names

2015-12-29 Thread Simon Albrecht
On 28.12.2015 23:35, David Kastrup wrote: Simon Albrecht writes: On 28.12.2015 20:28, Johan Vromans wrote: NR refers to http://www.lilypond.org/doc/v2.19/Documentation/learning/organizing-pieces-with-variables which does not mention the quoted syntax, and explicitly disallows dashes Ugh, tha

Re: Strings as variable names

2015-12-29 Thread David Kastrup
Simon Albrecht writes: > To just give my personal opinion, it would be brilliant to have > > (define (foo arg) ) > (define-music-function (foo arg) (arg-type?) ) > [&c.] > (define-markup-command (foo arg) (arg-type?) ) I don't share your sentiments here. Now define-music-function is arguably mi

Re: Strings as variable names

2015-12-29 Thread Kieren MacMillan
Hi David, > the name define-music-function renders the "Extending LilyPond” > guide ineligible for the Nobel Prize in Literature. Oh, is *that* what’s keeping us out of the running?? :) Thanks for the giggle! Kieren. Kieren MacMillan, composer ‣ website: www.ki

Re: Strings as variable names

2016-01-03 Thread David Wright
bine into a larger > string I believe. But that's only for preprocessor constants, and those > are not really part of the language proper. > > The strings in Python's regular expression replacements can interpolate > variable values, but those are not part of the string s

Re: Strings as variable names

2016-01-03 Thread David Kastrup
David Wright writes: > On Mon 28 Dec 2015 at 20:27:22 (+0100), David Kastrup wrote: >> >> The strings in Python's regular expression replacements can interpolate >> variable values, but those are not part of the string syntax but of the >> regexp replacement sem

Re: Strings as variable names

2016-01-03 Thread Paul Morris
> On Jan 3, 2016, at 10:06 AM, David Wright wrote: > > Recognising the lack of this construct, python is currently adding string > interpolation to the language. Looks like a trend as Javascript also got it in the ECMAscript 2015 specification: https://developer.mozilla.org/en-US/docs/Web/Jav

Re: Strings as variable names

2016-01-03 Thread Johan Vromans
On Mon, 28 Dec 2015 20:28:58 +0100 Johan Vromans wrote: > NR refers to > http://www.lilypond.org/doc/v2.19/Documentation/learning/organizing-pieces-with-variables > which does not mention the quoted syntax, and explicitly disallows dashes > and underscores. > > === Suggested replacement text ===

Re: Strings as variable names

2016-01-03 Thread David Kastrup
Johan Vromans writes: > On Mon, 28 Dec 2015 20:28:58 +0100 > Johan Vromans wrote: > >> NR refers to >> http://www.lilypond.org/doc/v2.19/Documentation/learning/organizing-pieces-with-variables >> which does not mention the quoted syntax, and explicitly disallows dashes >> and underscores. >> >>

Re: Strings as variable names

2016-01-03 Thread Johan Vromans
On Sun, 03 Jan 2016 21:16:27 +0100 David Kastrup wrote: > Johan Vromans writes: > > Is this going to be taken seriously or can I spare the efforts? > There is a tracker issue for it and some discussion. [..] Have you > followed the discussion in the tracker? No, for the simple reasons that a

Re: Strings as variable names

2016-01-03 Thread Simon Albrecht
On 03.01.2016 21:34, Johan Vromans wrote: On Sun, 03 Jan 2016 21:16:27 +0100 David Kastrup wrote: Johan Vromans writes: Is this going to be taken seriously or can I spare the efforts? There is a tracker issue for it and some discussion. [..] Have you followed the discussion in the tracker?

Re: Strings as variable names

2016-01-03 Thread David Wright
On Sun 03 Jan 2016 at 16:22:29 (+0100), David Kastrup wrote: > David Wright writes: > > > On Mon 28 Dec 2015 at 20:27:22 (+0100), David Kastrup wrote: > >> > >> The strings in Python's regular expression replacements can interpolate > >> variable

Re: Strings as variable names

2016-01-03 Thread Johan Vromans
On Sun, 3 Jan 2016 21:36:30 +0100 Simon Albrecht wrote: > > No, for the simple reasons that a) noone mentioned on the list there was > > a tracker item and b) even though I know now, I have been unable to > > find it. > > > > May I kindly request mentioning the URL to the list? > >

Re: Strings as variable names

2016-01-04 Thread Simon Albrecht
On 04.01.2016 08:02, Johan Vromans wrote: On Sun, 3 Jan 2016 21:36:30 +0100 Simon Albrecht wrote: No, for the simple reasons that a) noone mentioned on the list there was a tracker item and b) even though I know now, I have been unable to find it. May I kindly request mentioning the URL to th

Re: Strings as variable names

2016-01-04 Thread Sharon Rosner
rings? Um, let's see: Ruby, PHP, Javascript (as of ES6), Swift, Scala, C#, Perl. Ah yes I forgot, Perl is not a _real_ programming language ;-) Sharon -- View this message in context: http://lilypond.1069038.n5.nabble.com/Strings-as-variable-names-tp185113p185529.html Sent from the Us

Re: Strings as variable names

2016-01-04 Thread Sharon Rosner
> > Using the syntax with quotes is rather ugly, I agree. But it is > > nonetheless potentially useful for two reasons: > > (1) it enables us to use numbers etc. in variable names > Why would that be desirable? Suppose you make an edition of the St Matthew Passion, in which

Re: Strings as variable names

2016-01-06 Thread Josiah Boothby
ve enumeration, and Arabic numbers are out of the question. So I have a legend at the top of each include file describing what my nomenclature means: % Trichord Variable Names % 012: A % 013: B % 014: C % 015: D

Re: Strings as variable names

2016-01-06 Thread David Kastrup
re and there: learning enough > scheme to do this is impractical. So in the meantime, I basically have > to give each three-note motive a variable with a coded name that allows > sufficient differentiation and can be searched reasonably easily. > Variables with Arabic numerals would mak

Passing along variable-number arguments

2016-02-01 Thread Urs Liska
Hi, I'm hitting a wall with Scheme once more. I need to create wrapper functions around (format) and other functions that need a variable number of arguments. I know that with #(define (my-proc fmt . vals) "vals" will be an arbitrary number of arguments that will be wrapped

Re: Termination of variable definitions

2016-04-19 Thread David Kastrup
mbarrassing myself, I should be grateful if somebody > would explain the following: how does Lilypond recognize the end of a > variable definition? One expression. > For instance, an example from the documentation shows: > > violin = \new Staff { > \relative { > a'

Re: Termination of variable definitions

2016-04-19 Thread David Sumbler
, very basic that I have never really > > understood. > > > > So at the risk of embarrassing myself, I should be grateful if somebody > > would explain the following: how does Lilypond recognize the end of a > > variable definition? > > One expression.

Re: Termination of variable definitions

2016-04-19 Thread David Kastrup
gt;> > found that there is something very, very basic that I have never really >> > understood. >> > >> > So at the risk of embarrassing myself, I should be grateful if somebody >> > would explain the following: how does Lilypond recognize the end of a >

Re: Termination of variable definitions

2016-04-19 Thread David Wright
On Tue 19 Apr 2016 at 19:38:14 (+0100), David Sumbler wrote: > So at the risk of embarrassing myself, I should be grateful if somebody > would explain the following: how does Lilypond recognize the end of a > variable definition? Oversimplifying, there are about four things you can defi

Re: Termination of variable definitions

2016-04-19 Thread Thomas Morley
David Kastrup, I >> > found that there is something very, very basic that I have never really >> > understood. >> > >> > So at the risk of embarrassing myself, I should be grateful if somebody >> > would explain the following: how does Lilypond recognize

Re: Termination of variable definitions

2016-04-19 Thread Johannes Waldmann
http://lists.gnu.org/archive/html/lilypond-user/2016-04/msg00465.html > ... But it's recursive. what does that mean? - J.W. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user

Re: Termination of variable definitions

2016-04-19 Thread David Kastrup
David Wright writes: > violin = \new Voice b > you can substitute again, this time for "b". > (Within limits: contexts have a parent/child ordering, so Staff > can contain Voice but not vice versa.) Semantically not, but syntactically this is not a problem: \relative \new Staff { \new Voice {

Re: Termination of variable definitions

2016-04-19 Thread David Sumbler
Thank you all for your help on this. My original question, "how does Lilypond recognize the end of the definition of a variable" has been answered: the definition has to be a single, complete expression. Which of course produces another question: "what is classed as a single exp

Re: Termination of variable definitions

2016-04-19 Thread Thomas Morley
2016-04-19 23:25 GMT+02:00 David Sumbler : > Thank you all for your help on this. > > My original question, "how does Lilypond recognize the end of the > definition of a variable" has been answered: the definition has to be a > single, complete expression. > > W

Re: Termination of variable definitions

2016-04-19 Thread David Kastrup
Thomas Morley writes: > Well, LilyPond uses an input-language, I don't think it qualifies as a > programming-language. > But you you can do a lot > > xx = \override NoteHead.color = #red > is one expression > yy = \override NoteHead.font-size = #5 > is one expression > zz = { > \override Not

Re: Termination of variable definitions

2016-04-22 Thread Anthonys Lists
On 19/04/2016 21:55, Johannes Waldmann wrote: http://lists.gnu.org/archive/html/lilypond-user/2016-04/msg00465.html ... But it's recursive. what does that mean? - J.W. Recursion: See "Recursion". To take the violin example, violin = \new Staff { \relative { a'4 b c b } } "violin

Re: ERROR: Unbound variable: remove ??

2013-05-08 Thread David Nalesnik
> Fitting music on 1 page... > Drawing systems...ERROR: Unbound variable: remove > > ?? > remove is not a LilyPond-procedure, it's guile _and_ it's used > elsewhere in the 2.14.2-source. > > What am I missing? > It seems that the functions in the module SRFI-1 wer

Re: ERROR: Unbound variable: remove ??

2013-05-08 Thread Thomas Morley
Hi David, 2013/5/9 David Nalesnik : > It seems that the functions in the module SRFI-1 weren't available within > music functions in 2.14. (I remember running into this problem when I tried > to use selectors like "first".) You can add this line within the #{ #} and > you'll have access to rem

use variable in \markup \override

2013-10-16 Thread Mark Knoop
Is there any way to use a variable in a \markup \override? I'm trying to find a way to include the same markup in different scores with different staff sizes, paper sizes, etc. Therefore some distances need to be scaled, including line-width, baseline-skip, etc. For commands such as \vspace,

\score block as variable/function

2011-03-14 Thread Xavier Scheuer
Hi, I use \score blocks inside \markup in constructions like this one: \markup { \fill-line { \score { c'1 \layout {} % required! } \score { d'1 \layout {} } } } but it is heavy. I would like to define the \score blocks as variables or as music

Re: control notelength via variable?

2011-03-21 Thread Dmytro O. Redchuk
On Sat 19 Mar 2011, 12:15 TaoCG wrote: > Hi, Hi! > I need to control the length of rest and notes with a variable. > something like: > len = 2 > r\len > > this doesn't work of course but is there a way to do this? > I tried overriding duration-log but it only

Re: control notelength via variable?

2011-03-21 Thread David Kastrup
"Dmytro O. Redchuk" writes: > On Sat 19 Mar 2011, 12:15 TaoCG wrote: >> Hi, > Hi! > >> I need to control the length of rest and notes with a variable. >> something like: >> len = 2 >> r\len >> >> this doesn't work of course but

Re: control notelength via variable?

2011-03-21 Thread Dmytro O. Redchuk
On Mon 21 Mar 2011, 09:30 David Kastrup wrote: > Not particularly. You can intersperse Scheme expressions with music > events, and they are evaluated and the value, in general, is ignored. > Nothing more, nothing less. With one exception: > > #(define len (ly:export (ly:make-duration 1 0))) > {

Re: control notelength via variable?

2011-03-21 Thread TaoCG
David Kastrup wrote: > >> On Sat 19 Mar 2011, 12:15 TaoCG wrote: >>> Hi, >> Hi! >> >>> I need to control the length of rest and notes with a variable. >>> something like: >>> len = 2 >>> r\len >>> >>> this d

Re: Chord from a variable

2011-08-07 Thread Neil Puttock
only the first expression yields a chord. > The second yields only one C note, and it is > surprisingly one octave deeper. > > Questions: > How can I get a chord from a variable? v = \chordmode { c } > Why doesn't it work this way? Probably because v = { c } is the s

Re: Chord from a variable

2011-08-07 Thread Volker Paul
> > How can I get a chord from a variable? > > v = \chordmode { c } The task is not to put a chord INTO a variable, but to get it FROM a variable. \chordmode's argument should be a variable (as in my example), and \chordmode should generate its output, a chord, from this vari

Re: Chord from a variable

2011-08-07 Thread David Kastrup
Volker Paul writes: > Then I must ask the other way: > Why is the c in the chord one octave higher? > I.e., why is the c in \chordmode { c } interpreted as c'? Because that's a more natural pitch to start a chord. I think that chordmode, for whatever reason, ignores octave specifications, eithe

Re: Chord from a variable

2011-08-07 Thread Christopher R. Maden
On 08/07/2011 02:14 PM, Volker Paul wrote: > The task is not to put a chord INTO a variable, but to get it FROM a > variable. \chordmode's argument should be a variable (as in my > example), and \chordmode should generate its output, a chord, from > this variable. I think this

Re: Chord from a variable

2011-08-07 Thread Neil Puttock
On 7 August 2011 19:14, Volker Paul wrote: > Is there such a thing as forcing a mode change when READING the variable? > Or is there another function that builds a chord on a > note stored in a variable? \version "2.14.2" v = { c } \musicMap #(lambda (m) (an

Re: Chord from a variable

2011-08-08 Thread Volker Paul
On Sunday, August 07, 2011 23:05:21 you wrote: > \version "2.14.2" > > v = { c } > > \musicMap #(lambda (m) > (and (music-has-type m 'event-chord) > (= (length (ly:music-property m 'elements)) 1) > (let ((elt (car (ly:music-property m 'elements

Re: Chord from a variable

2011-08-08 Thread Volker Paul
Hello Chris, > LilyPond is not a macro language. Languages like TeX and the C > preprocessor are, and that sets some people’s expectations: Exactly. Thanks for your explanations, they made things clearer for me. > I suspect you’ll need to get into Scheme to perform that kind of alchemy. Yes, Nei

Using a variable with \relative

2011-09-09 Thread Basso Ridiculoso
Is there a way to do something similar to this: \include "english.ly" x = { c } y = { g } \score { << \new Staff { \clef "bass" \relative \x { d e f g a } \relative \y { bf a c d } } >> } Perhaps I need to write a function that se

Making feathered beams more variable

2011-10-23 Thread harm6
Hi, the attached file is a first attempt to make feathered beams more variable. p.e.: http://old.nabble.com/file/p32705102/beam15.png Thanks to David Nalesnik, who answered several questions about the details of beams. Some problems persist: The function is limited up to 64th notes. (I&#

Variable assignment in music functions

2011-11-03 Thread Michael Ellis
What's the right way to define a function that assigns string values to LilyPond variables? I'm trying to create a function in an include file that allows me to assign different values to variables used as midi instrument specifiers. % setMain

special variable for compound meters

2012-09-02 Thread Stefan Thomas
Dear community, in 2.14. I've been quite frequently using a special variable for compound meters. I would like to use it in the same way as before, but unfortunately it doesn't work in 2.16. How can I update it? % SNIP \version "2.16.0" aksak = #(d

using if variable in lilypond

2012-11-29 Thread Stjepan Horvat
hi guys.. i would want to define my font sizes in the next order: \header { title = \markup { \fontsize #+4 "BEI MIR BIST DU SCHÖN"} subtitle = \markup { \fontsize #+1 "(Yiddish: Bay mir bistu sheyn)" } poet = \markup { \fontsize #+1 "Jacob Jacobs"

Reference variable in include file?

2009-12-24 Thread Tom Dickson
I have a \score block at the end of each file that is basically the same, so I want to move it to an \include. However, the one line that can change is the \tempo 4 = 72 line. I tried to define variables in the calling file: noteName = 4 noteTempo = 72 but \tempo \noteName = \noteTempo did

<    1   2   3   4   5   6   7   8   9   >