Looking for documentation for constants

2024-05-19 Thread Ken Ledeen
Hello,

This is a very basic question.  I have see some examples that use
constants like "$SELECTION" or ""$CURSOR'$ANCHOR". but despite doing all
the obvious things (searching the documentation, etc.) I've not found any
relevant information.

I would sincerely appreciate being pointed in the right direction.

Many thanks.

Ken Ledeen

Mobile:   617-817-3183

www.nevo.com
www.bitsbook.com
tiny.cc/KenLedeen <https://kledeen.wixsite.com/kenledeen/>


Re: Conditional Complilation

2023-11-15 Thread Ken Ledeen
THanks to all who have offered ideas.  I think the "bookpart" approach will
be quite effective for me.

I sincerely appreciate both the competence and the willingness to share of
this fantastic community.

Ken Ledeen

Mobile:   617-817-3183

www.nevo.com
www.bitsbook.com
tiny.cc/KenLedeen <https://kledeen.wixsite.com/kenledeen/>


On Wed, Nov 15, 2023 at 10:50 AM Knute Snortum  wrote:

> On Tue, Nov 14, 2023 at 9:21 PM Vaughan McAlley 
> wrote:
>
>> On Wed, 15 Nov 2023 at 12:09, Ken Ledeen  wrote:
>>
>>> Hi All,
>>>
>>> From time to time I would like to include / exclude portions of the
>>> total score.
>>>
>>>  ...
>
>>
>> Hi Ken,
>>
>> For big projects I use something like this. You change a string set at
>> the top of the file, and it compiles the movements you ask for. My Requiem
>> was in 7 movements. It was fiddly to set up, but once that was done, it was
>> easy to just work on one movement.
>>
>
> [code excluded] ...
>
> This is a really nice solution to compiling multiple movements, thanks!
> One thing I noticed is that you get warnings about zero duration scores
> when compiling less than the full piece.  To avoid this, you could add a
> spacer rest to your EmptyBookpart variable like this:
>
> EmptyBookpart = { s4 }
>
> That gets rid of the warnings, but it also creates little scores with just
> a clef and time signature.  It's a trade-off.  Personally, I don't want
> spurious warnings in my LilyPond log, so I choose the spacer rest solution.
>
> --
> Knute Snortum
>
>
>


Conditional Complilation

2023-11-14 Thread Ken Ledeen
Hi All,

>From time to time I would like to include / exclude portions of the total
score. For now, in the crudest of ways, I just comment out the parts I
don't want (%{ . %}).  That works, of course, but I was wondering if
there was a more elegant way.

Ideally I would have some variable that I set to boolean #t or #f to
indicate what I want included.  Then, instead of the  %{  %} if would
be something like

if includeFlag {   ...   }

Then I wouldn't have to search around for where I'd included the comment
start and end brackets.

I found the scheme if function but it didn't seem like an option.

Many thanks in advance.


Ken Ledeen

Mobile:   617-817-3183

www.nevo.com
www.bitsbook.com
tiny.cc/KenLedeen <https://kledeen.wixsite.com/kenledeen/>


define-markup-command

2023-04-07 Thread Ken Ledeen
Hi All,

Thanks to Jean Abou Samra I can now create \markup that goes to a place in
a youtube video.

These are of the form:

fis4^\markup \with-url#"https://youtu.be...?t=SEC"; {ref} where "SEC" is
replaced with the number of seconds in from the start.

I would like to create a function to simplify things so instead of having
the entire URL repeated everywhere, would have something that looks like

fis4^\mymk "215".

So far, I remain entirely confused about creating a new markup command.  I
won't bother describing my many failed attempts.  I am clearly missing some
basic concepts. I have no problem creating scheme functions to do various
manipulations, but extending the markup function has eluded me.

Any guidance would be most appreciated!

Ken Ledeen

Mobile:   617-817-3183

www.nevo.com
www.bitsbook.com
tiny.cc/KenLedeen <https://kledeen.wixsite.com/kenledeen/>


Creating Text with Hyperlinks

2023-04-03 Thread Ken Ledeen
Hello All,

I would like to be able to add conventional text to a score, but provide
associated hyperlinks in the PDF.  FOr example, the title might have a
hyperlink to a youtube video of the score being performed.

So far, I've not found anything in the documentation that would support
this functionality

Ken Ledeen

Mobile:   617-817-3183

www.nevo.com
www.bitsbook.com
tiny.cc/KenLedeen <https://kledeen.wixsite.com/kenledeen/>


Re: Lilypond Substitution Function

2021-02-27 Thread Ken Ledeen
Jean,

Merci

This is a perfect solution, and, a clear explanation about why my solution
failed.

Thank you very much


Ken Ledeen

Mobile:617-817-3183
www.nevo.com
www.bitsbook.com
tiny.cc/KenLedeen
tiny.cc/KenLedeenAmazon

ᐧ

On Sat, Feb 27, 2021 at 10:43 AM Jean Abou Samra  wrote:

> Le 27/02/2021 à 02:16, Ken Ledeen a écrit :
>
> > I am struggling to understand the restrictions on substitution functions.
> >
> > For example:
> >
> > 1) can a function include "\score { ...}"  or can it only be invoked
> > INSIDE a \score?
> >
> > 2) is it possible to include \header { ...}  inside a substitution
> > function?  It fails when I try, but I don't understand why.
> >
> > I assume I am missing some basic concepts regarding their use.
> >
> > Thanks!
>
>
> Hello,
>
> Music functions must return music objects; \score blocks are not music
> but general containers that enclose music as well as other objects such
> as \header and \layout blocks.
>
> However, replacing define-music-function with define-scheme-function,
> you can define more versatile functions that are allowed to return any
> kind of object for interpretation. For example:
>
> \version "2.23.1"
>
> failingFunction =
> #(define-music-function () ()
> #{
>   \score {
> \header {
>   piece = "Piece A"
> }
> { c' }
>   }
> #})
>
> % \failingFunction
>
> succeedingFunction =
> #(define-scheme-function () ()
> #{
>   \score {
> \header {
>   piece = "Piece B"
> }
> { c' }
>   }
> #})
>
> \succeedingFunction
>
>
> Hope that helps,
> Jean
>
>


Lilypond Substitution Function

2021-02-27 Thread Ken Ledeen
I am struggling to understand the restrictions on substitution functions.

For example:

1) can a function include "\score { ...}"  or can it only be invoked INSIDE
a \score?

2) is it possible to include \header { ...}  inside a substitution
function?  It fails when I try, but I don't understand why.

I assume I am missing some basic concepts regarding their use.

Thanks!


Ken Ledeen

Mobile:617-817-3183
www.nevo.com
www.bitsbook.com
tiny.cc/KenLedeen
tiny.cc/KenLedeenAmazon
ᐧ