lilypond-user
[Top][All Lists]
Advanced

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

Re: "Pausing" Voice


From: Thomas Morley
Subject: Re: "Pausing" Voice
Date: Sun, 12 Jul 2020 13:05:31 +0200

Am Do., 9. Juli 2020 um 11:46 Uhr schrieb Maurits Lamers
<maurits@weidestraat.nl>:
>
> Interesting, as it is something that I am also trying to solve. My current 
> approach is to match the start of the voice itself and the end of any notes 
> from existing voices at that moment.
> Not entirely implemented yet though...
>
> cheers
>
> Maurits
>
> > Op 8 jul. 2020, om 19:20 heeft Thomas Morley <thomasmorley65@gmail.com> het 
> > volgende geschreven:
> >
> > Hi all,
> >
> > if temporary Voices occur, then the main Voice may not contain
> > rhythmic-events for the duration of those temporary Voices.
> > I'd like to identify where the main Voice "pauses", like in this test-code:
> >
> > My_test_engraver =
> > #(lambda (context)
> >  (let* ((mus-event #f))
> >    (make-engraver
> >      (listeners
> >        ((rhythmic-event this-engraver event)
> >          (set! mus-event
> >                (cons
> >                  (ly:context-current-moment context)
> >                  (ly:prob-property event 'length)))))
> >      ((process-music this-engraver)
> >        (if (and mus-event
> >                 (equal? (ly:context-current-moment context) (car 
> > mus-event)))
> >            (begin
> >              (format #t
> >                "\nEvent seen starting at ~a ending at ~a"
> >                (car mus-event) (ly:moment-add (car mus-event) (cdr 
> > mus-event)))
> >              (set! mus-event #f))
> >            (format #t
> >              "\nCurrent context has no rhythmic-event starting at ~a"
> >              (ly:context-current-moment context)))))))
> > \new Voice
> >  \with { \consists \My_test_engraver }
> >  {
> >    b1
> >    R
> >    \new Voice d''
> >    s
> >    << e' \\ c' >>
> >    r
> >  }
> >
> > ==>
> > Event seen starting at #<Mom 0> ending at #<Mom 1>
> > Event seen starting at #<Mom 1> ending at #<Mom 2>
> > Current context has no rhythmic-event starting at #<Mom 2>
> > Event seen starting at #<Mom 3> ending at #<Mom 4>
> > Current context has no rhythmic-event starting at #<Mom 4>
> > Event seen starting at #<Mom 5> ending at #<Mom 6>
> > Current context has no rhythmic-event starting at #<Mom 6>
> >
> > Questions
> > (a) Is there a better possibility than calculating, based on
> > current-moment and 'length of the event?
> > (b) Are there other possibilities where a Voice-context "pauses"? I.e.
> > staying alive, but not containing rhythmic-events?
> >
> > Thanks,
> >  Harm
> >
>

Hi Maurits,

my use-case is little different.
I try to code a new spanner-grob, it should end automatically under
certain circumstances. In this regard it will have similarities with
Glissando or Tie.
One of those conditions is a "pausing" Voice.

Cheers,
  Harm



reply via email to

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