Phil Taylor writes:
|
| MusicXML has an interesting construct to deal with this kind of
situation.
| The <backup> and <forward> tags have the effect of moving the time
point,
| so you can use <backup> to go back to the start of a measure in order to
| add an extra layer of notes. This means that you can deal with
temporary
| voices which appear and disappear in the course of a piece.
|
| Maybe we need something similar in abc?
and John Chambers answers:
>I sorta recall reading about just such a feature in
>abc2mtex, with a comment that it probably wouldn't work
>with other abc programs. I've never read about anyone else
>ever implementing it.
>
>Now what was that syntax? ...
>
That was a hack, a quick-and-dirty way to get voices. It worked
because it took advantage of something already in MusixTeX. Here's how it
worked: write a group of notes (in abc) for each voice, i.e. in the
simplest case, write one measure for voice one, the same measure for voice
2, and so on. Separate them by "&" (this is a tab stop in TeX). When
you've finished with all the voices, put in a && and go back to the top,
and do the same for the next measure.
Ie, to write abc def for a couple of voices, you
could write
ABC & abc && DEF & def && etc..
This follows the way that MusixTeX is organized---in fact,
abc2mtex simply passes the "&" characters directly on to MusixTeX, and
lets it figure out what to do with them.
This did actually work, but one had to really need it to go to the
trouble of using it. I did once and found it was hard to write and
fiendish to debug the abc. After that, I found I didn't really need
multiple voices *that* badly. (So, before putting in any <backup>
directives, I recommend experimenting to see how difficult it makes
reading, writing, and, especially, correcting the abc.)
Nevertheless, the use of the & as a tab stop might be
something to think about for handling tricky alignment problems.
(After all, it's a bit much to expect these programs to be able
to solve *all* voice-alignment problems unaided.)
Here is an example where it might help, tho maybe there is
a way to write it in abc-as-is without ending up with something
unreadable. I think this particular example was just cooked up; it's in
the MusixTeX docs to illustrate how Musixtex can handle polyrhythmic
music, but it does show one of the problems with voices. Since I'm not
sure how to write it correctly in abc, I won't try. Three voices, each on
a separate staff, all in the key of C, but all with different meters. The
staves are joined by a bar at the left.
Voice 1:
[M:3/4] [L:1/4] F F F | F F F || F F F | F F F :|
Voice 2:
[M:2/4] [L:1/4] F F | F F | F F || F F | F F | F F :|
Voice 3:
[M:3/8] [L:1/8] F3 | FFF | F3 FFF | F3 | FFF || F3 | FFF | F3 | FFF | F3 | FFF :|
The tricky point is the alignment, since one wants the notes which
are played simultaneously to align vertically. The quarter and dotted
quarter notes should line up. This means that the bar lines *don't* line
up in general, except for the double bars.
Cheers,
John Walsh
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html