lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arbitrary repeat counter


From: Simon Bailey
Subject: Re: arbitrary repeat counter
Date: Wed, 1 Jun 2022 18:03:00 +0100

On Wed, 1 Jun 2022 at 17:39, Jean Abou Samra <jean@abou-samra.fr> wrote:
> For what it's worth, while LilyPond's seldom uses it, Guile actually
> has an object-oriented layer.
>
> https://www.gnu.org/software/guile/manual/html_node/GOOPS.html
>
> You may find yourself liking that. This shows that OOP is or
> can be largely orthogonal to functional vs. imperative.

Java has streams and lamda functions, so the paradigms can definitely
co-exist. I'll have a look at the Guile stuff.

> > A further definition:
> >
> > repeatCountingWithTags = #(define-music-function (n music) (index? 
> > ly:music?)
> >    #{
> >      <<
> >        \tag #'score \repeat unfold #n { #music }
> >        \tag #'part \repeatCounting #n { #music \bar "!|" }
> >      >>
> >    #})
> >

Here's a weird one. Using this definition in the c,-octave, I get a
really weird output. Each note in the music drops down an octave. In
the c-octave, it works normally. Using the untagged version of
\repeatCounting doesn't show this issue in either octave.

Any ideas?

Thanks, kind regards,
sb

Attachment: 2022-06-01 18_02_17-~_Documents_sheetmusic_notabailey_ly_snippets_phraseCounter.ly – Frescobaldi.png
Description: PNG image

Attachment: phraseCounter.ly
Description: Text Data

Attachment: phraseCounter.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]