Steve Wyrick wrote: | John Chambers wrote: | > I tried it with the original abc2ps, Jef Moine's abcm2ps, and my | > jcabc2ps. They all handled it. The original abc2ps had two minor | > problems: It doesn't accept V: lines in the header section, so I | > moved them to after the K: line. And it can't handle the spaces in | > the "name = " term, so I removed them. ... | > | > This worked without problems in all three abc2ps clones. There were | > some warnings about the unrecognized "transpose" term, but that's to | > be expected from a program that doesn't produce pitches, and it | > didn't effect the output at all. All three programs produced pages | > that look identical. | > | > Actually, the original abc2ps doesn't implement the middle= term, and | > it gave a warning about that. But it assumes middle=d for bass clef, | > so it worked. Jef and I have both implemented it. Tunes that expect a | > different mapping than middle=d for bass come out strange with the | > original abc2ps. Lots and lots of leger lines ... | | Thanks John, I like the way that looks on abc2ps; unfortunately BarFly | doesn't like the voice headers in that position and returns a score that's | blank except for title & composer!
Yeah; there is disagreement among programs as to where the V: "voice declaration" lines belong. The only way to successfully handle the abc that's out there is to just say that a declaration has to come before the first use of a voice in the music. Also, I came across another bug in the original abc2ps: If a voice isn't declared at all before its first use, strange things go wrong. I handled this by adding a test for a voice being defined, and if not, generated a default declaration. It only took a few lines of code. | As you mentioned, abc2ps doesn't need the middle=d term. BarFly doesn't | really need it either but I specified it for 2 reasons: to (hopefully) let | me write code that was readable by both programs, and to save me typing so | many commas in the bass line (e.g., without that term, C is written as C,,)! I'd say that abc2ps "doesn't accept the middle= term". This is a bit of a defect, because without it, there's no way to correct for abc that uses a different mapping. I added it as a way to handle some of the abc that I was seeing. Some time back, we had a bit of a discussion about the proper mapping of abc notes to staff lines for non-treble clefs. There were at least two factions. Those who type abc thought it was obvious that you always want abc notes to map onto the staff, since this minimizes the awkward typing of all those silly commas in bass lines. But there are a lot of users who never type abc directly and always use a GUI tool, and they don't much care. Among them are people working on abc players, and to them it's obvious that abc notes should have a fixed pitch. This simplifies writing software that deals with sound. The discussion showed that there was no way to compromise between the two approaches, and furthermore, both had been implemented. How to solve this impass? The solution was the middle= term, which states explicitly the abc note to staff position mapping (and the transpose= term to give the actual pitch relative to the treble-clef default). This lets people write the music in any octave they like, and by a simple change to a voice's clef=, middle= and transpose= terms, a voice can be retargeted for an instrument with a different range. This is a bit more complicated, but it makes abc more powerful and versatile. It's a little extra work for implementers, since it adds one more term to the expression to calculate a note's staff position or pitch. But from some users' viewpoint, it's very useful. So users should probably be happy that abc implementers couldn't agree on these mappings. One illustration of its use that I've come across: The recorder is one of my instruments, and I have a couple of very nice Dolmetsch altos in my collection. Alto recorder players have to get used to the fact that music for the instrument is routinely written in two octaves. The range is F to g', and you can see that no matter how you map this to the treble clef, half the range is on the staff and half is either above or below. Historically, music printers have never agreed which range to use on paper. Most music printed nowadays for alto recorder is written with the upper half of the range above the staff. But recorders have a strong affinity for human voices, and vocal music is conventionally written an octave lower. So alto recorder players learn to read vocal lines with the "lower" mapping. There's nothing to be done about this; it's just a fact of life for a recorder player. I've had several occasions to retarget vocal and alto recorder lines to the other. With abc now, you can convert a vocal line to the upper recorder form by saying "middle=B,", and you can convert a line written for recorder to a vocal line by saying "middle=b'". It's very handy. And not just for recorder, of course. It's common to see trad song tunes written an octave high as an instrumental tune. If you want to add words to make a vocal version, you also want to print the notes down in the usual vocal range. You can tranpose the entire tune, of course. But adding "middle=b" to the K: line is a faster way, and it leaves the notes unchanged for when you want to print the instrumental version. To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html