lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatic cross-staff chords - testing help


From: Davide Bonetti
Subject: Re: Automatic cross-staff chords - testing help
Date: Fri, 8 Jan 2021 21:50:35 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

Hi Harm,

many thanks for testing.
thanks to you for the reply.

Below is an improved function which will simply returns the input, if
it's not an event-chord, avoiding the blank space.
\autoSplitChord << b \\ e' \\ g'' >> will stop working as well, all
notes are returned unchanged.
I see you've put an if condition to exclude input that is not event-chord.

There is now a problem: the below staff  is not printed when there is not an event-chord, and when an event-chord returns, a new staff is printed (with treble clef).

Pippo = <c e g c' e'>1
PippoDue = \chordmode {c1:/g}
PippoTre = c1
PippoQuattro = {<c e g>}

\new PianoStaff
\with { \consists #Span_stem_engraver }
<<
  \new Staff = "up"
  {
    \key c\major
    \autoSplitChord #UP <f a a' f'>2
    \autoSplitChord <g c' e'>4
    \autoSplitChord #DOWN <g c' e'>
    \autoSplitChord <c g e' c''>1
    \autoSplitChord \chordmode {c:/g}
    \autoSplitChord {<c g e' c''>}
    \autoSplitChord {<c e g> <d     f a>}
    \autoSplitChord c
    \autoSplitChord <c'>
    \autoSplitChord <<c\\e'\\g''\\g,>>
    \autoSplitChord <<c1\\e'2\\g''\\g,>>
    \autoSplitChord <<c1 \\ {e2 f}\\d'1>>
    \autoSplitChord <<
      {c4 d e f}
      \\
      {c' d' e' f'}
    >>
    \autoSplitChord \Pippo
    \autoSplitChord \PippoDue
    \autoSplitChord \PippoTre
    \autoSplitChord \PippoQuattro
  }
  \new Staff = "down"
  {
    \key c\major
    \clef bass
    s1 %bass staff appear only at the beginning, then reappears as another staff with treble clef
  }
>>

To avoid the problem, one can declare the lenght of the bass staff:

[...]
  \new Staff = "down"
  {
    \key c\major
    \clef bass
    \repeat unfold 16 s1 %bass staff is shown correctly
  }
>>

As shown in the attached files.

Perhaps there is a method to let the second staff to be printed without having to declare it's lenght.

\autoSplitChord is supposed to work on a single chord of a single
Voice. Like \autochange works an single notes of  a single Voice.
Maybe there's a recursive (or something similar) method so \autoSplitChord can work with chord sequences.
\autochange accepts sequential input.

Best would be a combination, I'll continue thinking about it.

Me too. Scheme is not so intuitive for me, but sometimes I find a solution.

Thank you

Davide





--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus

Attachment: autoSplitChord test2.ly
Description: Text Data

Attachment: autoSplitChord test2.pdf
Description: Adobe PDF document


reply via email to

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