Re: modular "markup" and arguments

2013-11-07 Thread Paul Morris
x27;re trying to accomplish? There might be an easier way to do it... -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/modular-markup-and-arguments-tp153423p153505.html Sent from the User mailing list archive at Nabble.com. __

Re: modular "markup" and arguments

2013-11-07 Thread Bric
On 11/07/2013 05:57 AM, David Kastrup wrote: Bric writes: So, obviously, just to add a "^markup" to the music function is not trivial. I'm gathering that (text) markup belongs to an "event function", rather than a "music function", and the two can't be integrated ... although, that doesn't s

Re: modular "markup" and arguments

2013-11-07 Thread David Kastrup
Bric writes: > Development is moving insanely fast here. I just compiled 2.17.29, and > there's already 2.17.95 Which is the next release after 2.17.29. We are getting close to releasing 2.18, and the versioning reflects that. > I guess I need to build the latest frescobaldi, locally(?), so it

Re: modular "markup" and arguments

2013-11-07 Thread Urs Liska
Am 07.11.2013 11:19, schrieb Bric: Development is moving insanely fast here. I just compiled 2.17.29, and there's already 2.17.95 That's simply because 2.17.95 is regarded as a beta for the upcoming 2.18 release, and they are counting towards 100 ... I guess I need to build the latest fresco

Re: modular "markup" and arguments

2013-11-07 Thread Bric
On 11/07/2013 12:31 AM, Paul Morris wrote: Bric wrote So, can one throw in conditionals? (1) Can one, for instance, check/manifest the pitch and duration of '#the-music' ? And based on those values are, write something or not? (2) And how DOES one write something extra? For example, add a n

Re: modular "markup" and arguments

2013-11-06 Thread Paul Morris
tionally change it based on a note's pitch using scheme, for example: http://lsr.dsi.unimi.it/LSR/Item?id=572 But that's different than conditionally adding new items, like text (markup). HTH, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/modular-mar

Re: modular "markup" and arguments

2013-11-06 Thread Paul Morris
mmend giving it a try. I haven't done what you're trying to do, but I'm pretty sure it's doable, one way or another. Once you get into using scheme it's amazing what you can get LilyPond to do. This is one of the great things about it. HTH, -Paul -- View this me

Re: modular "markup" and arguments

2013-11-06 Thread Bric
On 11/05/2013 07:51 PM, David Kastrup wrote: Bric writes: On 11/05/2013 03:08 PM, David Kastrup wrote: Paul Morris writes: But I think what you really want is a music function: \version "2.17.29" boo = #(define-music-function (parser location the-music) (ly:music?) #{

Re: modular "markup" and arguments

2013-11-06 Thread David Kastrup
Ralph Palmer writes: > On Wed, Nov 6, 2013 at 5:34 AM, David Kastrup wrote: > >> David Kastrup writes: Did I dream this? >> >> Oh good grief. https://codereview.appspot.com/6742057/#msg7>. And >> that's all. > > > Thank you, David - for this Well, not for that. I wrote a detailed explanatio

Re: modular "markup" and arguments

2013-11-06 Thread Ralph Palmer
On Wed, Nov 6, 2013 at 5:34 AM, David Kastrup wrote: > David Kastrup writes: Did I dream this? > > Oh good grief. https://codereview.appspot.com/6742057/#msg7>. And > that's all. Thank you, David - for this and for all you do. Lilypond would be much worse off without your help! Ralph -- R

Re: modular "markup" and arguments

2013-11-06 Thread David Kastrup
David Kastrup writes: > David Kastrup writes: > >> Johan Vromans writes: > >>> Unfortunately, the relevant documentation page >>> http://lilypond.org/doc/v2.17/Documentation/notation/set-versus-override >>> is a bit, eh, empty... >> >> Uh, I'm pretty sure I wrote a rather carefully phrased trea

Re: modular "markup" and arguments

2013-11-06 Thread David Kastrup
David Kastrup writes: > Johan Vromans writes: >> Unfortunately, the relevant documentation page >> http://lilypond.org/doc/v2.17/Documentation/notation/set-versus-override >> is a bit, eh, empty... > > Uh, I'm pretty sure I wrote a rather carefully phrased treatise about > this in general. But

Re: modular "markup" and arguments

2013-11-06 Thread Jan-Peter Voigt
Aha, thank you! I wasn't aware of this before. Best, Jan-Peter Am 06.11.2013 10:29, schrieb Urs Liska: > \override and \revert a property will result in the default value of > that property > \temporary\override and \revert will result in the value the property > had before the override, but not

Re: modular "markup" and arguments

2013-11-06 Thread Jan-Peter Voigt
ah, thank you, now I see. I didn't ran into this before or probably just wondered, why it doesn't work as I expected and then did something else. Best, Jan-Peter Am 06.11.2013 10:33, schrieb David Kastrup: > If you use \override/\revert as previously, the behavior will be as > previously: any pre

Re: modular "markup" and arguments

2013-11-06 Thread David Kastrup
Jan-Peter Voigt writes: > Hello all, > > I didn't follow the discussions about temporary and push-+-pop. Is there > a simple explanation for the indroduction of \temporary? Why does > \override-\revert now has to be \temporary\override-\revert? Because it can. If you use \override/\revert as pr

Re: modular "markup" and arguments

2013-11-06 Thread Urs Liska
Am 06.11.2013 10:27, schrieb Jan-Peter Voigt: Hello all, I didn't follow the discussions about temporary and push-+-pop. Is there a simple explanation for the indroduction of \temporary? On a user-level (apart from push and pop) it means: \override and \revert a property will result in the de

Re: modular "markup" and arguments

2013-11-06 Thread Jan-Peter Voigt
Hello all, I didn't follow the discussions about temporary and push-+-pop. Is there a simple explanation for the indroduction of \temporary? Why does \override-\revert now has to be \temporary\override-\revert? AFAICS it was introduced sometime in the 2.17 development and it will be for better lil

Re: modular "markup" and arguments

2013-11-06 Thread David Kastrup
Johan Vromans writes: > David Kastrup writes: > >> Correct. In stack terms, \revert is a "pop" while "\override" is "pop, >> push" (each context has its own stack). In contrast, >> "\temporary\override" is just "push". So a sequence of > > So we have, for context properties: > > \set

Re: modular "markup" and arguments

2013-11-06 Thread Johan Vromans
David Kastrup writes: > Correct. In stack terms, \revert is a "pop" while "\override" is "pop, > push" (each context has its own stack). In contrast, > "\temporary\override" is just "push". So a sequence of So we have, for context properties: \setset prop to value \unset

Re: modular "markup" and arguments

2013-11-05 Thread David Kastrup
Bric writes: > On 11/05/2013 03:08 PM, David Kastrup wrote: >> Paul Morris writes: >> >>> But I think what you really want is a music function: >>> >>> \version "2.17.29" >>> >>> boo = >>> #(define-music-function >>> (parser location the-music) >>> (ly:music?) >>> #{ >>> \o

Re: modular "markup" and arguments

2013-11-05 Thread Bric
On 11/05/2013 03:08 PM, David Kastrup wrote: Paul Morris writes: But I think what you really want is a music function: \version "2.17.29" boo = #(define-music-function (parser location the-music) (ly:music?) #{ \override NoteHead.color = #red #the-music \re

Re: modular "markup" and arguments

2013-11-05 Thread David Kastrup
Johan Vromans writes: > David Kastrup writes: > >> For such fixed override/revert pairings you should write >> \temporary\override in the music function instead of just \override: >> otherwise any previous \override NoteHead.color = #blue will get >> overwritten and not get restored afterwards.

Re: modular "markup" and arguments

2013-11-05 Thread Johan Vromans
David Kastrup writes: > For such fixed override/revert pairings you should write > \temporary\override in the music function instead of just \override: > otherwise any previous \override NoteHead.color = #blue will get > overwritten and not get restored afterwards. You mean this will not work:

Re: modular "markup" and arguments

2013-11-05 Thread Paul Morris
mentation/notation/available-music-functions#index-undo http://lilypond.org/doc/v2.17/Documentation/notation/available-music-functions#index-temporary -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/modular-markup-and-arguments-tp153423p153431.html Sent from the User mai

Re: modular "markup" and arguments

2013-11-05 Thread David Kastrup
Paul Morris writes: > Paul Morris wrote >> \version "2.17.29" >> >> boo = { \override NoteHead.color = #red } >> revertboo = { \revert NoteHead.color } >> >> { a' \boo dis' e' fis' g \revertboo b } > > And this can even be simplified to this: > > \version "2.17.29" > > boo = \override NoteHead.

Re: modular "markup" and arguments

2013-11-05 Thread David Kastrup
Paul Morris writes: > But I think what you really want is a music function: > > \version "2.17.29" > > boo = > #(define-music-function > (parser location the-music) > (ly:music?) >#{ > \override NoteHead.color = #red > #the-music > \revert NoteHead.color >#}) > >

Re: modular "markup" and arguments

2013-11-05 Thread Paul Morris
boo = \override NoteHead.color = #red revertboo = \revert NoteHead.color { a' \boo dis' e' fis' g \revertboo b } -- View this message in context: http://lilypond.1069038.n5.nabble.com/modular-markup-and-arguments-tp153423p153426.html Sent from the User mailing list archive

Re: modular "markup" and arguments

2013-11-05 Thread Paul Morris
or = #red #the-music \revert NoteHead.color #}) \relative c' { c4 d e f \boo { g a b } c d e } For more about music functions, see the docs: http://lilypond.org/doc/v2.17/Documentation/extending/music-functions HTH, -Paul -- View this message in context: http://lilyp

Re: modular "markup" and arguments

2013-11-05 Thread Urs Liska
The key to what you want to achieve is called "music function" Bric schrieb: >Hi, all > >I was pleasantly astounded that lilypond allows for things like > >boo = { \once { \override NoteHead.color = #red } } > > >and then "mark up" notes sporadically, with \boo cis' \boo d > >But he

modular "markup" and arguments

2013-11-05 Thread Bric
Hi, all I was pleasantly astounded that lilypond allows for things like boo = { \once { \override NoteHead.color = #red } } and then "mark up" notes sporadically, with \boo cis' \boo d But here's what I want (give me an inch, I'll want a lightyear!) I want the ability to distribu