Re: Splitting voices

2022-11-19 Thread Luca Fascione
Awesome, thanks Jean!
L

On Sun, 20 Nov 2022, 00:30 Jean Abou Samra,  wrote:

> Le 20/11/2022 à 00:02, Luca Fascione a écrit :
> > Hi all,
> > I have some 2 voice music coming from musicxml like this
> >
> > 4 8. 16 ~ ~ 2.
> >
> > and I'd like to split it into 2 voices instead:
> >
> > <<
> > \new Voice ... { ... a4 g8. d16~ d2. ... }
> > \new Voice ... { ... c4 b8. g16~ g2. ... }
> > >>
> >
> > is there any software / trick that I could use?
> > (I use Frescobaldi, but I couldn't find a transformation for this
> purpose)
>
>
> There are a number of snippets floating around for that IIRC, basically
> variations on the theme
>
> \version "2.22.2"
>
> #(use-modules (ice-9 receive))
>
> selectNote =
> #(define-music-function (index music) (index? ly:music?)
> (music-map
>  (lambda (m)
>(if (music-is-of-type? m 'event-chord)
>(let ((elts (ly:music-property m 'elements)))
>  (receive (rhythmic arts)
>(partition (music-type-predicate 'rhythmic-event)
>   elts)
>(if (< (1- index)
>   (length rhythmic))
>(let* ((elt (list-ref elts (1- index)))
>   (elt-arts (ly:music-property elt
> 'articulations)))
>  (set! (ly:music-property elt 'articulations)
>(append elt-arts (map ly:music-deep-copy arts)))
>  elt)
>#{ #})))
>m))
>  music))
>
> mus = \relative {
>4 8. 16~ 2.
> }
>
> \new Staff <<
>\new Voice {
>  \voiceOne
>  \selectNote 2 \mus
>}
>\new Voice {
>  \voiceTwo
>  \selectNote 1 \mus
>}
>  >>
>
>
> Best,
> Jean
>
>


Re: Splitting voices

2022-11-19 Thread Jean Abou Samra

Le 20/11/2022 à 00:02, Luca Fascione a écrit :

Hi all,
I have some 2 voice music coming from musicxml like this

4 8. 16 ~ ~ 2.

and I'd like to split it into 2 voices instead:

<<
\new Voice ... { ... a4 g8. d16~ d2. ... }
\new Voice ... { ... c4 b8. g16~ g2. ... }
>>

is there any software / trick that I could use?
(I use Frescobaldi, but I couldn't find a transformation for this purpose)



There are a number of snippets floating around for that IIRC, basically 
variations on the theme


\version "2.22.2"

#(use-modules (ice-9 receive))

selectNote =
#(define-music-function (index music) (index? ly:music?)
   (music-map
    (lambda (m)
  (if (music-is-of-type? m 'event-chord)
  (let ((elts (ly:music-property m 'elements)))
    (receive (rhythmic arts)
  (partition (music-type-predicate 'rhythmic-event)
 elts)
  (if (< (1- index)
 (length rhythmic))
  (let* ((elt (list-ref elts (1- index)))
 (elt-arts (ly:music-property elt 'articulations)))
    (set! (ly:music-property elt 'articulations)
  (append elt-arts (map ly:music-deep-copy arts)))
    elt)
  #{ #})))
  m))
    music))

mus = \relative {
  4 8. 16~ 2.
}

\new Staff <<
  \new Voice {
    \voiceOne
    \selectNote 2 \mus
  }
  \new Voice {
    \voiceTwo
    \selectNote 1 \mus
  }
>>


Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Splitting voices

2022-11-19 Thread Luca Fascione
Hi all,
I have some 2 voice music coming from musicxml like this

4 8. 16 ~ ~ 2.

and I'd like to split it into 2 voices instead:

<<
\new Voice ... { ... a4 g8. d16~ d2. ... }
\new Voice ... { ... c4 b8. g16~ g2. ... }
>>

is there any software / trick that I could use?
(I use Frescobaldi, but I couldn't find a transformation for this purpose)

Cheers,
Luca
-- 
Luca Fascione


Re[2]: Splitting voices

2022-02-17 Thread E Appeldoorn

Thanks Lukas, I would never have figured that out.

-- Origineel bericht --
Van: "Lukas-Fabian Moser" 
Aan: "E Appeldoorn" ; "Lilypond" 


Verzonden: 17-2-2022 22:08:09
Onderwerp: Re: Splitting voices


Hi Erik,

I have a score consisting of 5 strings. Near the end all instrument 
voices (except the bass) split into two. The top voice being a solo, 
and the bottom one the rest. I have managed this for one voice, but 
can't figure out how to add second violin, viola, and cello in the 
same manner, then adding the single line bass below that. Here's what 
I created.
All voices would need to be in the main group, Any help would be much 
appreciated.

How about:

\version "2.22.1"

\layout {
  indent = 20
  short-indent = 15
  \context {
\Score
\RemoveAllEmptyStaves
  }
}

\new StaffGroup <<
  \new GrandStaff \with {
instrumentName = "Vln. I"
shortInstrumentName = "Vln. I"
  }
  <<
\new Staff \with {
  shortInstrumentName = solo
} \relative {
  s1*6
  c'1 d e d
}
\new Staff \relative {
  c''1 | c | b | a | g | f | \break
  \set Staff.shortInstrumentName = tutti
  g | f | e | d
}
  >>

  \new GrandStaff \with {
instrumentName = "Vln. II"
shortInstrumentName = "Vln. II"
  }
  <<
\new Staff \with {
  shortInstrumentName = solo
} \relative {
  s1*6
  c'1 d e d
}
\new Staff \relative {
  c''1 | c | b | a | g | f | \break
  \set Staff.shortInstrumentName = tutti
  g | f | e | d
}
  >>

  \new GrandStaff \with {
instrumentName = "Vla"
shortInstrumentName = "Vla"
  }
  <<
\new Staff \with {
  \clef alto
  shortInstrumentName = solo
} \relative {
  s1*6
  c'1 d e d
}
\new Staff \with { \clef alto } \relative {
  c''1 | c | b | a | g | f | \break
  \set Staff.shortInstrumentName = tutti
  g | f | e | d
}
  >>
  \new Staff \with {
\clef bass
instrumentName = "Bassi"
shortInstrumentName = "Vc/Cb"
  }
  \relative {
c1 d e d c d e d c d
  }
>>

Lukas


Re: Splitting voices

2022-02-17 Thread Lukas-Fabian Moser

Hi Erik,

I have a score consisting of 5 strings. Near the end all instrument 
voices (except the bass) split into two. The top voice being a solo, 
and the bottom one the rest. I have managed this for one voice, but 
can't figure out how to add second violin, viola, and cello in the 
same manner, then adding the single line bass below that. Here's what 
I created.
All voices would need to be in the main group, Any help would be much 
appreciated.


How about:

\version "2.22.1"

\layout {
  indent = 20
  short-indent = 15
  \context {
    \Score
    \RemoveAllEmptyStaves
  }
}

\new StaffGroup <<
  \new GrandStaff \with {
    instrumentName = "Vln. I"
    shortInstrumentName = "Vln. I"
  }
  <<
    \new Staff \with {
  shortInstrumentName = solo
    } \relative {
  s1*6
  c'1 d e d
    }
    \new Staff \relative {
  c''1 | c | b | a | g | f | \break
  \set Staff.shortInstrumentName = tutti
  g | f | e | d
    }
  >>

  \new GrandStaff \with {
    instrumentName = "Vln. II"
    shortInstrumentName = "Vln. II"
  }
  <<
    \new Staff \with {
  shortInstrumentName = solo
    } \relative {
  s1*6
  c'1 d e d
    }
    \new Staff \relative {
  c''1 | c | b | a | g | f | \break
  \set Staff.shortInstrumentName = tutti
  g | f | e | d
    }
  >>

  \new GrandStaff \with {
    instrumentName = "Vla"
    shortInstrumentName = "Vla"
  }
  <<
    \new Staff \with {
  \clef alto
  shortInstrumentName = solo
    } \relative {
  s1*6
  c'1 d e d
    }
    \new Staff \with { \clef alto } \relative {
  c''1 | c | b | a | g | f | \break
  \set Staff.shortInstrumentName = tutti
  g | f | e | d
    }
  >>
  \new Staff \with {
    \clef bass
    instrumentName = "Bassi"
    shortInstrumentName = "Vc/Cb"
  }
  \relative {
    c1 d e d c d e d c d
  }
>>

Lukas


Splitting voices

2022-02-17 Thread E Appeldoorn
I have a score consisting of 5 strings. Near the end all instrument 
voices (except the bass) split into two. The top voice being a solo, and 
the bottom one the rest. I have managed this for one voice, but can't 
figure out how to add second violin, viola, and cello in the same 
manner, then adding the single line bass below that. Here's what I 
created.
All voices would need to be in the main group, Any help would be much 
appreciated.

Erik

\version "2.22.1"

\score {
  <<
\new PianoStaff \relative c'' {
  \set PianoStaff.instrumentName = \markup { tutti Vln.I}
  \set PianoStaff.shortInstrumentName = \markup { Vln.I}
  \new Staff {
c1 | c | b | a | g | f | \break % intro
<<
  {
 \set Staff.shortInstrumentName = \markup { solo }
c1 | d | e | d |
  }
  \new Staff {
\once \omit Staff.TimeSignature
  \set Staff.shortInstrumentName = \markup { others}
g1 | f | e | d |
  }
>>
  }
}
  >>
}

Re: soprano line with splitting voices and different lyrics

2006-04-18 Thread Mats Bengtsson

I spotted a few details:

- The line \context Lyrics = sopranoOne \lyricsto sopranoOne \new 
Lyrics \sopOneWords
 first creates a Lyrics context named "sopranoOne" but then  it 
immediately creates an anonymous Lyrics context which hosts

 the actual words, so the one named "sopranoOne" is never used.
 What you want is
\context Lyrics = sopranoOne \lyricsto sopranoOne \sopOneWords

- You want the two voices to appear in the same staff, right?
 Then you have to enclose them in double brackets to tell  LilyPond 
that the two should happen in parallel:

\context Staff = soprano <<
 \context Voice = sopranoOne { \voiceOne \sopOneMusic }
 \context Voice = sopranoTwo { ... }




  /Mats

Quoting Sterling Sympatico <[EMAIL PROTECTED]>:


Hi again,

I am trying to do the following for a soprano line that splits (div) 2x
and the second division has each part singing different lyrics with
different melisma.

I wonder if the following setup will work as I have yet to have success:

sopOneMusic \context Voice = "sopranoOne" { s1*14 one or two notes at the
second division with silence filling all bars on either side s*14 }

sopOneWords \lyricmode { words at the second division - really only one
vowel held for a few beats }

sopTwoMusic \context Voice = sopranoTwo" { all unison and second
soprano parts including both soprano parts at first division }

sopTwoWords \lyricmode { all unison and second soprano words except 
for at the 2nd division }


altoMusic etc...

altoWords etc...

---

other parts (five percussion and piano (two hands)

---

\score { <<
\context ChoirStaff <<
\context Lyrics = sopranoOne \lyricsto sopranoOne \new Lyrics
\sopOneWords
\context Staff = soprano
\context Voice = sopranoOne
{ \voiceOne \sopOneMusic }
\context Voice = sopranoTwo
{ \set Staff.printKeyCancellation = ##f \set
Staff.instrument = " Soprano " \set Staff.instr = " Sop
" \voiceTwo \sopTwoMusic }
\context Lyrics = sopranoTwo \lyricsto sopranoTwo \new
Lyrics \sopTwoWords
\context Voice = alto
{ \set Staff.printKeyCancellation = ##f \set
Staff.instrument = " Alto " \set Staff.instr = "
Alt " \altoMusic }
\context Lyrics = alto \lyricsto alto \new Lyrics
\altoWords
>>

---

percussion and piano here

---

>>


Everything prints out pretty well except that the sopOneWords, which I
hoped would print above the staff very briefly (only for a few beats at
the second div) don't show up.

I am guessing that I am missing some syntax somewhere.


Version 2.6.3 Debian "testing" here.


Thanks again for any help,

Sterling MacNay


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user







___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


soprano line with splitting voices and different lyrics

2006-04-18 Thread Sterling Sympatico
Hi again,

I am trying to do the following for a soprano line that splits (div) 2x
and the second division has each part singing different lyrics with
different melisma.

I wonder if the following setup will work as I have yet to have success:

sopOneMusic \context Voice = "sopranoOne" { s1*14 one or two notes at the
second division with silence filling all bars on either side s*14 }

sopOneWords \lyricmode { words at the second division - really only one
vowel held for a few beats }

sopTwoMusic \context Voice = sopranoTwo" { all unison and second
soprano parts including both soprano parts at first division }

sopTwoWords \lyricmode { all unison and second soprano words except for at the 
2nd division }

altoMusic etc...

altoWords etc...

---

other parts (five percussion and piano (two hands)

---

\score { <<
\context ChoirStaff <<
\context Lyrics = sopranoOne \lyricsto sopranoOne \new Lyrics
\sopOneWords
\context Staff = soprano 
\context Voice = sopranoOne
{ \voiceOne \sopOneMusic }
\context Voice = sopranoTwo
{ \set Staff.printKeyCancellation = ##f \set
Staff.instrument = " Soprano " \set Staff.instr = " Sop
" \voiceTwo \sopTwoMusic }
\context Lyrics = sopranoTwo \lyricsto sopranoTwo \new
Lyrics \sopTwoWords
\context Voice = alto
{ \set Staff.printKeyCancellation = ##f \set
Staff.instrument = " Alto " \set Staff.instr = "
Alt " \altoMusic }
\context Lyrics = alto \lyricsto alto \new Lyrics
\altoWords
>>

---

percussion and piano here

---

>>


Everything prints out pretty well except that the sopOneWords, which I
hoped would print above the staff very briefly (only for a few beats at
the second div) don't show up.

I am guessing that I am missing some syntax somewhere.


Version 2.6.3 Debian "testing" here.


Thanks again for any help,

Sterling MacNay


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user