Automatically splitting long notes according to the beat?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatically splitting long notes according to the beat?

David Bellows
Lilypond groups beams automatically according to the beat. If you use
the "Completion_heads_engraver" you can get Lilypond to automatically
split long notes at bar lines tying them together.

So I'm wondering if Lilypond can automatically split long notes
according to the beat and if I am just missing something?

If you have something like:

{c'8 c'2 c'4 c'8}

then you might want it to automatically split at the middle of the bar:

{c'8 c'4.~c'8 c'4 c'8}

or even on every beat:

{c'8 c'8~c'4~c'8 c'8~c'8 c'8}

And if it's  compound meter then it seems less optional:

{\time 6/8 c'8 c'2 c'8} should be:
{\time 6/8 c'8 c'4~c'4 c'8}

Elaine Gould says on the first example:
"When the rhythms are not part of a regular pattern, the long duration may
be divided to expose the beats or half—bar, to make the rhythm easier to count
and therefore to place."

and
"Compound Time: No note-value should be written across the beat, ..."

I've been searching for a while but I haven't been able to find
mention of this anywhere though I might not be using the correct
search terms.

Dave

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatically splitting long notes according to the beat?

Aaron Hill
On 2019-04-04 5:24 pm, David Bellows wrote:

> Lilypond groups beams automatically according to the beat. If you use
> the "Completion_heads_engraver" you can get Lilypond to automatically
> split long notes at bar lines tying them together.
>
> So I'm wondering if Lilypond can automatically split long notes
> according to the beat and if I am just missing something?
>
> If you have something like:
>
> {c'8 c'2 c'4 c'8}
>
> then you might want it to automatically split at the middle of the bar:
>
> {c'8 c'4.~c'8 c'4 c'8}
>
> or even on every beat:
>
> {c'8 c'8~c'4~c'8 c'8~c'8 c'8}
>
> And if it's  compound meter then it seems less optional:
>
> {\time 6/8 c'8 c'2 c'8} should be:
> {\time 6/8 c'8 c'4~c'4 c'8}
>
> Elaine Gould says on the first example:
> "When the rhythms are not part of a regular pattern, the long duration
> may
> be divided to expose the beats or half—bar, to make the rhythm easier
> to count
> and therefore to place."
>
> and
> "Compound Time: No note-value should be written across the beat, ..."
>
> I've been searching for a while but I haven't been able to find
> mention of this anywhere though I might not be using the correct
> search terms.

This is of course a total hack, but basically you could pretend that the
measures are 2/4 rather than 4/4.  Then by hiding every other bar line,
it *looks* like it is 4/4:

%%%%
\version "2.19.82"
\new Staff
   <<
     { \tweak stencil
         #(lambda (grob) (grob-interpret-markup grob #{
             \markup \override #'(baseline-skip . 0)
                     \column { \number 4 \number 4 } #}))
       \time 2/4
       \repeat unfold 3 { s2 \bar "" \noBreak s2 \bar "|" } }

     \new Voice \with { \remove "Note_heads_engraver"
                        \consists "Completion_heads_engraver" }
     \fixed c' { c8 c2 c4 c4 c1 c4 c2 c8 | }
   >>
%%%%

But there are almost certainly problems with such a kludge.


-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatically splitting long notes according to the beat?

David Bellows
> This is of course a total hack, but basically you could pretend that the measures are 2/4 rather than 4/4. Then by hiding every other bar line, it *looks* like it is 4/4.

That's pretty clever. I'll play around with that approach to see how
flexible it is. I generate Lilypond files automatically from a program
I've written that generates music so I will have to find a way to
automate the process. I was hoping that this was already a feature
that I wasn't aware of.

On Thu, Apr 4, 2019 at 6:08 PM Aaron Hill <[hidden email]> wrote:

>
> On 2019-04-04 5:24 pm, David Bellows wrote:
> > Lilypond groups beams automatically according to the beat. If you use
> > the "Completion_heads_engraver" you can get Lilypond to automatically
> > split long notes at bar lines tying them together.
> >
> > So I'm wondering if Lilypond can automatically split long notes
> > according to the beat and if I am just missing something?
> >
> > If you have something like:
> >
> > {c'8 c'2 c'4 c'8}
> >
> > then you might want it to automatically split at the middle of the bar:
> >
> > {c'8 c'4.~c'8 c'4 c'8}
> >
> > or even on every beat:
> >
> > {c'8 c'8~c'4~c'8 c'8~c'8 c'8}
> >
> > And if it's  compound meter then it seems less optional:
> >
> > {\time 6/8 c'8 c'2 c'8} should be:
> > {\time 6/8 c'8 c'4~c'4 c'8}
> >
> > Elaine Gould says on the first example:
> > "When the rhythms are not part of a regular pattern, the long duration
> > may
> > be divided to expose the beats or half—bar, to make the rhythm easier
> > to count
> > and therefore to place."
> >
> > and
> > "Compound Time: No note-value should be written across the beat, ..."
> >
> > I've been searching for a while but I haven't been able to find
> > mention of this anywhere though I might not be using the correct
> > search terms.
>
> This is of course a total hack, but basically you could pretend that the
> measures are 2/4 rather than 4/4.  Then by hiding every other bar line,
> it *looks* like it is 4/4:
>
> %%%%
> \version "2.19.82"
> \new Staff
>    <<
>      { \tweak stencil
>          #(lambda (grob) (grob-interpret-markup grob #{
>              \markup \override #'(baseline-skip . 0)
>                      \column { \number 4 \number 4 } #}))
>        \time 2/4
>        \repeat unfold 3 { s2 \bar "" \noBreak s2 \bar "|" } }
>
>      \new Voice \with { \remove "Note_heads_engraver"
>                         \consists "Completion_heads_engraver" }
>      \fixed c' { c8 c2 c4 c4 c1 c4 c2 c8 | }
>    >>
> %%%%
>
> But there are almost certainly problems with such a kludge.
>
>
> -- Aaron Hill
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatically splitting long notes according to the beat?

Rudi Guggt
In reply to this post by Aaron Hill
Hello,


Aaron Hill wrote
> But there are almost certainly problems with such a kludge.

the bar numbering is two times to fast!

greetings





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatically splitting long notes according to the beat?

Kieren MacMillan
Hi Rudi,

>> But there are almost certainly problems with such a kludge.
> the bar numbering is two times to fast!

Good point!

Fortunately, there’s a function out there (LSR?) to decrement the bar number — just throw that in the function after the first invisible bar.  =)

Cheers,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatically splitting long notes according to the beat?

David Kastrup
In reply to this post by David Bellows
David Bellows <[hidden email]> writes:

> Lilypond groups beams automatically according to the beat. If you use
> the "Completion_heads_engraver" you can get Lilypond to automatically
> split long notes at bar lines tying them together.
>
> So I'm wondering if Lilypond can automatically split long notes
> according to the beat and if I am just missing something?

When all else fails, try reading the documentation.

<http://lilypond.org/doc/v2.19/Documentation/notation/displaying-rhythms#automatic-note-splitting>

> If you have something like:
>
> {c'8 c'2 c'4 c'8}
>
> then you might want it to automatically split at the middle of the bar:
>
> {c'8 c'4.~c'8 c'4 c'8}
>
> or even on every beat:
>
> {c'8 c'8~c'4~c'8 c'8~c'8 c'8}
\new Voice \with { \remove "Note_heads_engraver"
                   \consists "Completion_heads_engraver"
                   completionUnit = #(ly:make-moment 1/4)
                 }
{c'8 c'2 c'4 c'8}



> I've been searching for a while but I haven't been able to find
> mention of this anywhere though I might not be using the correct
> search terms.

completionUnit is likely a v2.19 feature.  At least the v2.18
documentation does not mention it yet.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

db.preview.png (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatically splitting long notes according to the beat?

David Bellows
Hey David,

> When all else fails, try reading the documentation.

> <http://lilypond.org/doc/v2.19/Documentation/notation/displaying-rhythms#automatic-note-splitting>

>\new Voice \with { \remove "Note_heads_engraver"
                   \consists "Completion_heads_engraver"
                   completionUnit = #(ly:make-moment 1/4)
                 }
>{c'8 c'2 c'4 c'8}

Wow. I actually read through that section many times and never picked
up on the fact that completionUnit would help out in this case -- I
thought it only affected the split when it happened across bar lines.

Anyway, this works perfectly and gives one a lot of control on how to
split things up. Thanks!


On Fri, Apr 5, 2019 at 6:27 AM David Kastrup <[hidden email]> wrote:

>
> David Bellows <[hidden email]> writes:
>
> > Lilypond groups beams automatically according to the beat. If you use
> > the "Completion_heads_engraver" you can get Lilypond to automatically
> > split long notes at bar lines tying them together.
> >
> > So I'm wondering if Lilypond can automatically split long notes
> > according to the beat and if I am just missing something?
>
> When all else fails, try reading the documentation.
>
> <http://lilypond.org/doc/v2.19/Documentation/notation/displaying-rhythms#automatic-note-splitting>
>
> > If you have something like:
> >
> > {c'8 c'2 c'4 c'8}
> >
> > then you might want it to automatically split at the middle of the bar:
> >
> > {c'8 c'4.~c'8 c'4 c'8}
> >
> > or even on every beat:
> >
> > {c'8 c'8~c'4~c'8 c'8~c'8 c'8}
>
> \new Voice \with { \remove "Note_heads_engraver"
>                    \consists "Completion_heads_engraver"
>                    completionUnit = #(ly:make-moment 1/4)
>                  }
> {c'8 c'2 c'4 c'8}
>
>
> > I've been searching for a while but I haven't been able to find
> > mention of this anywhere though I might not be using the correct
> > search terms.
>
> completionUnit is likely a v2.19 feature.  At least the v2.18
> documentation does not mention it yet.
>
> --
> David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user