lilypond-user
[Top][All Lists]
Advanced

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

Re: OOoLilypond instilation problems and coding help


From: Mats Bengtsson
Subject: Re: OOoLilypond instilation problems and coding help
Date: Wed, 09 Apr 2008 10:44:26 +0200
User-agent: Thunderbird 2.0.0.5 (X11/20070716)



Trevor Daniels wrote:
Hi Levi

You have taken this example from a section of the manual which has not been updated recently, and I can see why it might be confusing - if you remove the two statements which create the Voice contexts the example still works perfectly in the more recent versions of the LilyPond.
No! If you try it yourself, you'll see that it fails. The reason that these lines are needed here is quite intricate and has to do with the fact that you want two DrumVoice contexts, not ordinary Voice contexts. The <<{...} \\ {...}>> construct that's used here, will automatically create two Voice contexts named "1" and "2", if these don't already exist. If you explicitly defining contexts with these names yourself, then LilyPond will use these two contexts in the <<{...} \\ {...}>> construct. This trick is used here to fool LilyPond to use DrumVoice contexts instead.

  /Mats
If you have not already done so, please read section 3.2.1 in the 2.11 Learning Manual called "I'm hearing Voices", but here's an explanation of this particular piece of code.

First, all notes -must- be contained in a Voice. If a Voice is not defined explicitly one is created behind the scenes.

To explain, first consider the example with the two lines beginning \new DrumVoice removed.

The construction following \drummode contains two bars of music. The first bar ( bd4 sn4 bd4 sn4) goes into a default Voice context, as one has not been explicitly created for it. This is followed by a << ...\\ ...>> construct for the second bar. This construct places { \repeat unfold 16 hh16 } in a Voice called "1" and { bd4 sn4 bd4 sn4 } in a Voice called "2". If these voices have not been explicitly defined they are created "behind the scenes" automatically with these names. The music in these two voices is then played in parallel, both in bar 2. Two voices are required because the rhythms are different.

Finally, in earlier versions of LilyPond, the voices "1" and "2" had to be explicitly defined before they could be used, hence the explicit declarations \new Voice etc in the example you quoted. The {s1*2} following simply enters two bars of skip notes, and these are in parallel with the rest of the music due to the << .. >> round the contents of \DrumStaff.

HTH.  I'm afraid I can't help with Open Office though.

Trevor D

----- Original Message ----- From: "Levi Hendricks" <address@hidden>
To: <address@hidden>; <address@hidden>
Sent: Wednesday, April 09, 2008 4:14 AM
Subject: OOoLilypond instilation problems and coding help


I am running windows XP (with sp2) and open office v 2.0.2 . I followed the instructions on using lilypad with open office. I have downloaded (and written in) the lilypond script as well as the open office macro, i installed the macro as said in the instructions, but when i press alt m an error orccurs. The message is this: "BASIC syntax error. Dimension specifications do not match." it highlights a portion of the code:"SortStringArray(sTemplate" approximately 4/5ths the way down the page. I cant get the macro to work, can anyone help me?

On another note, I am reading the tutorial and manuals for lilypond, but am having trouble assimilating all the information. I have done some html and java programing so im no stranger to computer code, but the "voices" concept is giving me trouble. I am using this program to write percussion music for lessons that I am giving, and if someone could help me disect some code this would be great:
    \new DrumStaff <<
      \new DrumVoice = "1" { s1 *2 }
      \new DrumVoice = "2" { s1 *2 }
      \drummode {
        bd4 sn4 bd4 sn4
        <<
          { \repeat unfold 16 hh16 }
          \\
          { bd4 sn4 bd4 sn4 }
        >>
      }
    >>

here is what I understand: DrumStaff creates a staff, thats simple. drummode initiates the acceptance of sn bd hh etc. as valid input. I also understand that there is a measure of alternating bd/sn hits for 4 beats before the 'polyphonic' measures. I understand that the polyphonic measure uses two 'voices, one that is just the hh and one that is the bd and sn.

Here is what I don't understand: the creation of \new DrumVoice = "1" { s1 *2 }. Why do i need to create new drum voices. And if im not referencing them later, how does the code know which one is which. Are "1" and "2" simply names, or do they have do do with stem directions, or what? and what in heck does {s1 *2} mean?

Thank you for your help. I am new at using lilypad, i stumble across it and don't know anyone else who can help me. This is the first time I've used this mailing list so even if you cant help me, letting me know that I've succeeded in asking for help would be nice. thanks.





_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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