parallelMusic

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

parallelMusic

Federico Bruni
Hi all,

I have some questions for you ;-)

Some days ago I needed to insert a double glissando and I used the
trick explained here (add a new voice with hidden notes):
http://lsr.dsi.unimi.it/LSR/Snippet?id=303

My problem was how to implement it in the template I often use, which
is set - I think - to be with two voices only. Here it is:

upper= {
}

lower= {
}

\score {
    \new StaffGroup <<
      \new Staff = "guitar" <<
        \context Voice = "upper guitar" { \clef "G_8" \voiceOne \upper }
        \context Voice = "lower guitar" { \clef "G_8" \voiceTwo \lower }
      >>
      \new TabStaff = "tab" <<
        \context TabVoice = "upper tab" { \clef "moderntab" \voiceOne
\upper }
        \context TabVoice = "lower tab" { \clef "moderntab" \voiceTwo
\lower }
      >>
    >>
}

I guess I could add a third variable which acts as a third voice, but
it would not be that handy to write.. and it's not worth to add a new
variable just because I need a third voice in one or two measures in
the whole piece.

So I found out \parallelMusic, which is very interesting and handy
because you can see all the voices in a measure with a single glance
(no need to scroll from one variable to another).
And using \parallelMusic I managed to get what I wanted (double
glissando): please see the easy example attached.

As I'm thinkig I'll use it as my new default template, I wonder which
could be the drawbacks if I use \parallelMusic instead of the template
above..
I mean, I was never recommended to use it by expert users.. so that's
why I'm suspicious ;-)

Thanks for your help!

Federico

--
http://gnurag.net/blog/
http://fsfe.org/
http://groups.fsf.org/wiki/LibrePlanetItalia


\version "2.13.8"



\parallelMusic #'(VoiceA VoiceB VoiceC) {
  % Bar 1
  <a c>4 \glissando <b\3 d>2. |
  r4  e,,2. |
  \hideNotes a'4 \glissando b2.\3 |
 
  % Bar 2
 
}

% New template
\new StaffGroup <<
\new Staff { \clef "G_8" \relative c' << \VoiceA \\ \VoiceB \\ \VoiceC  >> }
\new TabStaff { \clef "moderntab" \relative c' << \VoiceA \\ \VoiceB \\ \VoiceC  >> }
>>

%% Old template
%{
  \score {
    \new StaffGroup <<
      \new Staff = "guitar" <<
        \context Voice = "upper guitar" { \clef "G_8" \voiceOne  \upper }
        \context Voice = "lower guitar" { \clef "G_8" \voiceTwo  \lower }
      >>
      \new TabStaff = "tab" <<
        \context TabVoice = "upper tab" { \clef "moderntab" \voiceOne \upper }
        \context TabVoice = "lower tab" { \clef "moderntab" \voiceTwo \lower }
      >>
    >>
  }
%}
Reply | Threaded
Open this post in threaded view
|

Re: parallelMusic

Federico Bruni
Federico Bruni wrote:

> As I'm thinkig I'll use it as my new default template, I wonder which
> could be the drawbacks if I use \parallelMusic instead of the template
> above..
> I mean, I was never recommended to use it by expert users.. so that's
> why I'm suspicious ;-)
>

I'm doing some more testing and I can see that \parallelMusic has a
kind of unpredictable support for \relative mode (except for very easy
input files).
According to my few tests, the notes in the first voice are always
interpreted well, the problem is with the second voice: sometimes it
works, then all of the sudden it does not work anymore.

In the user mailing list I can see there were issues with
\parallelMusic and \relative:
http://lists.gnu.org/archive/html/lilypond-user/2006-03/msg00289.html

I guess this has not been solved yet. Could you confirm it?

Cheers,
Federico

--
http://gnurag.net/blog/
http://fsfe.org/
http://groups.fsf.org/wiki/LibrePlanetItalia



Reply | Threaded
Open this post in threaded view
|

Re: parallelMusic

Federico Bruni
A small update:
I've found out that problems come if I use \repeat.
If I remove it and use \bar "|:" ":|" instead, it works again.

There's any way to set the alternate endings "manually", i.e. without
using \repeat and \alternative?

I'd really like to use \parallelMusic for polyphonic pieces, so if I
manage to solve these problems somehow I'll be very glad.

Thanks in advance for your help,

Federico



Reply | Threaded
Open this post in threaded view
|

Re: parallelMusic

Valentin Villenave
Administrator
On Sun, Dec 6, 2009 at 7:19 PM, Federico Bruni <[hidden email]> wrote:
> There's any way to set the alternate endings "manually", i.e. without
> using \repeat and \alternative?

Hi Federico,

since the \parallelMusic is being discussed right now with Alexander
Kobel and Nicolas Sceaux, -user might be a better place for this
particular issue. (Feel free to Cc Alexander, Nicolas, and the
tablatures list) :-)

Cheers,
Valentin


Reply | Threaded
Open this post in threaded view
|

Re: parallelMusic

Federico Bruni
In reply to this post by Federico Bruni
Federico Bruni wrote:

> I guess I could add a third variable which acts as a third voice, but
> it would not be that handy to write.. and it's not worth to add a new
> variable just because I need a third voice in one or two measures in
> the whole piece.
>

I think I'll have to use this method, as it seems that \parallelMusic
is not meant for complex music.. at least not yet, we'll see in the
future..

So here's an example of my current template, with a third voice
istantiated to enable double glissando:

\version "2.13.8"


upper=  \relative c' {
        <a c>4 \glissando <b\3 d>2.
       
}

lower=  \relative c {
  r4  e,2.
}

thirdvoice= \relative c' {
        \hideNotes a4 \glissando b2.\3
}

  \score {
    \new StaffGroup <<
      \new Staff = "guitar" <<
        \context Voice = "upper guitar" { \clef "G_8" \voiceOne  \upper }
        \context Voice = "lower guitar" { \clef "G_8" \voiceTwo  \lower }
        \context Voice = "thirdguitar" { \clef "G_8" \voiceThree
\thirdvoice }
      >>
      \new TabStaff = "tab" <<
        \context TabVoice = "upper tab" { \clef "moderntab" \voiceOne
\upper }
        \context TabVoice = "lower tab" { \clef "moderntab" \voiceTwo
\lower }
        \context TabVoice = "thirdguitar" { \clef "moderntab"
\voiceThree  \thirdvoice }
      >>
    >>
  }

--
http://gnurag.net/blog/
http://fsfe.org/
http://groups.fsf.org/wiki/LibrePlanetItalia