on Tue, Feb 29, 2000 at 12:37:14PM +1100%, Peter Chubb said:
Peter> How about a
Peter> \tablature { <a2dd> ,,d8 }
Peter> My *ideal* would be to be able to input as either standard
Peter> mudela, or as tablature, and to output score, midi or
Peter> tablature.
it's not possible to machine-generate a score from tabulature.
tabulature doesn't reflect the lengths of each note in a chord, just
the length of the shortest one. put another way, it shows how much
time passes between any set of notes and the next note or set of
notes, but doesn't show whether any of the first set are still
sounding.
for a simple example, look at the fourth measure here:
ftp://sca.uwaterloo.ca/pub/Mutopia/MilanL/milan-pavan2/milan-pavan2-preview.png
if i rewrote this in guitar tablature (i'm not sure my memory of
vihuela tuning is correct), it would look like this:
x x x x x x
1 0 0
2 3 2 0 3 2
3 2
4 4
5 0 5
6
where each "x" would be replaced by a quarter note.
now what's tells you that there are three voices here, instead of
simply six events each lasting a quarter length? what tells you that
that those "e"s on top are half notes instead of quarters? what tells
you that the first note on the fifth string lasts all the way until
the second one? nothing but your ear. perhaps an ai algorithm could
be crafted to work out the polyphony of even this simple example based
on an understanding of the style of the period, but i don't think it
would be worth the time, and would guess wrongly more often than not.
going the other way, from score to tab, is no problem at all; so long
as you provide the string and fret on which each note should be
played, the score contains sufficient information to create the tab.
lily just has to line up all the simultaneous events on top of one
another and stick on top of them a note representing how much time
passes until the next event.
so if we want to be able to produce both score and tab from the same
source (and i think we should), i think the tab info should simply be
attached to notes in the same way as a dynamic or articulation
marking. this makes it easy to specify whether you want to generate
tab or score or both. if the music were in a notes context, lily
could ignore the tab information. if the music were in a tab context,
lily could use the tab information to generate a staff of tablature
instead of a score of what we've come to think of as "traditional"
music.
an advantage of this is that separate score blocks could be used to
create separate score and tab versions, or to place the score on one
staff with the tablature on a staff below it (a common practice). for
example:
\score {
\context Staff = nontab {
\context Voice = score { \music }
}
\paper {
output = "foo-score";
}
}
\score {
\context Staff = tab {
\context Tablature = tab { \music }
}
\paper {
output = "foo-tab";
}
}
\score {
\context StaffGroup = combined <
\context Voice = score { \music }
\context Tablature = tab { \music }
>
\paper {
output = "foo-score-and-tab";
}
}
we would need some debate on what would be an acceptable addition to
mudela for notating the course + fret info. (modern rock guitar tab
adds a ridiculous number of extra notations to indicate techniques,
but these could be safely ignored in the beginning.) since those two
pieces of information are all that are needed, it could be as simple
as:
-c[number]f[number]
or some character other than "-" if tab info needs to be better
isolated from other notations. so, for example, the measure of milan
mentioned earlier could be written as:
\context Staff = score <
\context Voice=melody {
\notes { e''2-c1f0 e''-c1f0 d''4-c2f3 cis''-c2f2 }
}
\context Voice=middlevoice {
\notes { a'4-c3f2 d''-c2f3 cis''-c2f2 b'-c2f0 fis'2-c4f4 }
}
\context Voice=bass {
\notes { a1-c5f0 d'2-c5f5 }
}
>
by someone who wanted both tab and score. someone who just wanted tab
could have it much easier:
\context Staff = score {
\context Tablature=tab {
<s4-c5f0 s-c3f2 s-c1f0>
s-c2f3
<s-c1f0 s-c2f2>
s-c2f0
<s-c5f5 s-c4f4 s-c2f3>
s-c2f2
}
}
(look at the png, and you'll see what's happening here, even if you
don't understand the tab part of it.)
if people are serious about doing this, we should get a lutenist or
two into the discussion. i wish ronn mcfarlane weren't such a hermit.
:)
--
|----------------------------------------------------------------------------|
| jeff covey [EMAIL PROTECTED] http://pobox.com/~jeff.covey/ 410-669-4926 |
|----------------------------------------------------------------------------|
| Worry is like a rocking chair -- it gives you something to do |
| but it doesn't get you anywhere. -- Dorothy Galyean |
|----------------------------------------------------------------------------|