Jonathan Kulp schrieb:
Federico Bruni wrote:
I'm trying to write a bar for fingerstyle guitar (I'm using the
tablature.ly file, I'd be glad to test it...but I'm at the beginnings
with lilypond, please help).
Could you please tell me what's wrong here?
melody = \relative c {
\time 4/4
\key g \major
<< { <d g>4 <d g>8 <e a> <f b>4 g4 } \\ { g,2 g }
>>
}
\score {
<<
\new Staff { \clef "G_8" \melody }
\new TabStaff { \tabNumbersOnly \melody }
>>
}
I've used the information found here:
http://lilypond.org/doc/v2.13/Documentation/user/lilypond-learning/I_0027m-hearing-Voices#I_0027m-hearing-Voices
But I guess I'm doing a trivial error, probably related with basic
knowledge of Lilypond.
I went through the doc but I couldn't find the right page.
Any help much appreciated..
Thanks in advance,
Federico
Hi Federico,
It's failing to compile (at least on my end) because you have an
undefined variable "\tabNumbersOnly", which from what I can gather is
something in an \include file. I found the reference to it, as well
as the include file code, in an archived mailing list posting, and
when I included this file, the score compiled but I got a blank tabStaff.
Anyhow, if you get ride of the \tabNumbersOnly command then it should
compile. I believe this tablature.ly file is something that's in
development and not quite into the latest Lilypond source files yet.
I'm running Lilypond straight from the source files and it didn't find
"tablature.ly" when I tried to include it. I had to create the file
myself.
I posted this file to the list today for testing purposes, so it will
eventually become part
of one of the next releases.
Anyway, when you delete the \tabNumbersOnly, I doesn't compile right
here with version 2.13.0
(with and without including tablature.ly). It puts the TabStaff notes in
the normal staff, therefore
all notes are doubled and the tab staff is empty.
So the error has nothing to do with the tablature.ly file.
A possible solution would be to use different voices, like this:
\version "2.13.0"
\include "tablature.ly"
upper = \relative c {
\time 4/4
\key g \major
<d g>4 <d g>8 <e a> <f b>4 g4
}
lower = \relative c {
\time 4/4
\key g \major
g2 g
}
\score {
<<
\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 "tab" \voiceOne \upper }
\context TabVoice = "lower tab" { \clef "tab" \voiceTwo \lower } >>
>>
}
This looks fine without giving any error messages.
When you include tablature.ly, make sure to get the version I posted today.
You don't have to write \tabNumbersOnly explicitly, this is the default
when including
the file.
As I have written some guitar music in lilypond, I find it easier to do
so with seperate
voices for upper and lower notes. It's easier to read and to correct,
and all the
<< { } \\ { } >> stuff can get really annoying when you code more than a
few bars.
Thank you for giving the new tablature features a try!
Marc
HTH,
Jon
btw here's a link to the thread where this is discussed:
http://www.nabble.com/tablature.ly,-second-attempt-td23364444.html
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user