abcjs
abcjs copied to clipboard
first `P:` is ignored after `V:` definition
The ABC code below is printed without the first P: A.
T: Swing guitars
M: 4/4
L: 1/8
K: Cmaj
%
V: chords
P: A
"C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 | "C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 |
"C"x4 "C7"x4 | "F"x4 "F-"x4 | "D-7"x4 "G7"x4 | "C"x4 "G7"x4 ||
P: A
"C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 | "C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 |
"C"x4 "C7"x4 | "F"x4 "F-"x4 | "D-7"x4 "G7"x4 | "C"x4 "C7"x4 ||
However, inline [P: A] works fine:
T: Swing guitars
M: 4/4
L: 1/8
K: Cmaj
%
V: chords
[P: A] "C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 | "C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 |
"C"x4 "C7"x4 | "F"x4 "F-"x4 | "D-7"x4 "G7"x4 | "C"x4 "G7"x4 ||
P: A
"C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 | "C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 |
"C"x4 "C7"x4 | "F"x4 "F-"x4 | "D-7"x4 "G7"x4 | "C"x4 "C7"x4 ||
Related, lower priority issue: [P: B] on its own line sometimes results in a formatting error.

T: Swing guitars
M: 4/4
L: 1/8
K: Cmaj
%
V: chords
[P: A]
"C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 | "C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 |
"C"x4 "C7"x4 | "F"x4 "F-"x4 | "D-7"x4 "G7"x4 | "C"x4 "G7"x4 ||
[P: B]
"C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 | "C"x4 "Eb°7"x4 | "D-7"x4 "G7"x4 |
"C"x4 "C7"x4 | "F"x4 "F-"x4 | "D-7"x4 "G7"x4 | "C"x4 "C7"x4 ||
Agree that's a bug. A work around is to switch these two lines:
P: A
V: chords
Another way to do the second example is to leave off the brackets:
P: B
Having the part inline makes the music want to put it right at the end of the last line.
Hey Paul,
I'm still hoping for a solution to this. It seems that the relationship between P and V is not entirely clear in the 2.2 standard. However, I believe it is common for V to have multiple P.
Testing using beta.21, this doesn't look right:
X:1
K:C
%
V:1
[P:A] C8 |
[P:B] C8 |
and neither does this:
X:1
K:C
%
V:1
P:A
C8 |
P:B
C8 |
It would be really nice to be able to rely on one or the other syntax and to have it display as expected.
Thanks for your help.
Ok, look for it in a couple weeks.