Hi,
I am a newbie struggling to get started. I can see a lot of potential
in using Geany to process my ".abc" music files so I am sure once I get
going it will be very useful.
I am finding the documentation a little frustrating, I spend all my time
following links to different parts of the documentation file without
ever finding any good examples. What I need right now is a good
tutorial on how to get syntax highlighting working on my new filedef.
Here is an example ".abc" file:
X:1
T:24 Carat
C:Hilary Herbert
N:3Cpl set
%%writefields Q 1
L:1/4
M:2/2
Q:1/2=100
K:F
V:1
"^A" |: "F"FA/G/ "/E"FC | "/D"FA "/C"c2 | "C"cc/d/ "C7"cB | "F/F"A2
"C"G2 | "F/F"A"/G"B "/A"cf |
"C/Bb"ed "/C"c2 | "F/F"f>F "/F"A"/A"F | "C"G2 "F/F"F2"^B" :||:
"F"cc/c/ cF | "C"BA GC | "F"cc/c/ cF |
"F"A2 "C"G2 | "F/C"FF/F/ F"/F"A | cA FC | "/F"FF/A/ "/A"c"/F"B/A/ |
"C"G2 "F"F2 :|
V:2
|: "F"A,C "/E"A,2 | "/D"A,C "/C"F2 | "C"EE/F/ "C7"E2 | "F/F"FC "C"EC
| "F/F"A"/G"G "/A"F2 | "C/Bb"GF "/C"E2 | "F/F"F>A, "/F"C"/A"A, | "C"EC
"F/F"F2 :|
|: "F"AC AC | "C"EC C2 | "F"AC AC | "F"FC "C"E2 | "F/C"A,A,/A,/A,C |
"/F"FC "/A"C2 | "/F"A,A,/C/ "/A"F"/F"C | "C"EC "F"F2 :|
X:2
T:Abbeygate
T:tune: Miss Sulyard's Delight
N:Play 16 bars AB, original tune had repeats
C:Ron Coxall
L:1/8
M:4/4
Q:1/4=100
K:Bb
V:1
"^A""Bb"f2 e/d/c/B/ "F"ABcd | "F7"ecBA "Bb7"Bd F>D | "Eb"EGBd egbg |
"Bb"fd"C7"cB "F"AcF2 |
"Bb"f2 e/d/c/B/ "F"ABcd | "F7"ecBA "Bb7"Bd F>D | "Eb"EGBd egbg |
"Bb"fd"F7"eA [Ec]2"Bb"[DB]2 ||
"^B""F7".FAcA "Bb".Bdfd | "F7"e2d/e/f/e/ "Bb"dfdB | "Cm"Gc=Bc
"Eb"e>df>e | "Cm"gec"C7"B "F"AcAF |
"F7".FAcA "Bb".Bdfd | "F7"e2d/e/f/e/ "Bb"dfdB | "Eb"gabg
"Bb"fd"C7"ec | "Bb"Bd"F"FA "F7"[Ec]2"Bb"[DB]2 |]
V:2
B2FD FGAB | cAF2 D2B,2 | G,2E2 G2E2 | D2E2 F2A,2 | B,2FD FGAB | cAF2
D2B,2 | G,2E2 G2E2 | D2C2 A,2B,2 ||
.A,2A,2 .B,2B,2 | C2F2 B3F | E2C2 G2E2 | C3=E F3A, | .A,2A,2 .B,2B,2
| C2F2 B3F | E2G2 B2G2 | DB,A,C A,2B,2 |]
X:3
T:Aberdeen
T:or The De'il's Dead
N:Original tune is just A&B parts, played 3x(AABB AABB)
N:C&D added by D Bearon 2019 - now play 3x(ABABCCDD)
L:1/4
%writefields Q
%%chords
|:F|Fx2 Bbx2|Fx2 Bbx2|C|F| |
Bbx2 Fx2|Gm||F| | |
Bbx2 Cx2|F| |Bbx2 Fx2|Gmx2 Gmx2:|
%%endchords
M:2/2
Q:1/2=110
K:F
V:1
|: "^A"F>G Ac | f2 ed | f2 ed | e/f/g GA | F>G Ac | f>g ag |
fd cA | G2 d2 || "^B"F>G AB | cF A/B/c/A/ | cF A/B/c/A/ |
d/c/B/A/ GA | F>G Ac | f>g ag | fd cA | G2 "Dm"d2 :|
V:2
|: A,>C F2 | A2 B2 | A2 B2 | cE2 C | A,>C F2 | A>B c2 |
B2 AF | B,D B,G, || A,>C FC | A,2 F2 | A,2F2 |
FD EC | A,>C FA | A>G F2 | B2 AF | D4 :|
%%newpage
%%chords
|:Gm| | |Dm|Gm|
Gm:|Dm|Gm|:Dm|Gm|]
Dm| |C|Gx2 Cx2|Dm|Dmx2 Gmx2|
Dmx2 A7x2|Dmx2 A7x2:|Dmx2 Cx2|Bbx2 A7x2|Gmx2 Fx2|Gm|]
%%endchords
V:1
|: "^C"G>A Bd | gG B/c/d | gG B/c/d | A/B/c BA | G>A Bd |
g>a bg |1 fd cA | G2 G2 :|2 fd ba | g2 g2 |]
|: "^D"d>e fg | ad f/g/a/f/ | gc e/f/g/e/ | g/f/e/d/ cg |1 d>e fg |
ad b2 |
a>g fe | d2 a2 :|2 d>e fg | ab ag | fd cA | G2 "(Bb)"d2 |]
V:2
|: DG, DG, | DG, DG, | DG, DG, | DA, D2 | DG, DG, |
DG, DG, |1 [A,D]3 [A,D] |[G,D]2 [G,D]2 :|2 [A,D]3 [A,D] |[G,D]2
[G,D]2 |]
|: AD AD | F2 AD | EG cG | =BG c2 |1 AD AD | F2 G2 |
F2 GA | F2 EG :|2 FF EE | DD ^CC | G,B, A,C | B,2 B,2 |]
As can be seen it has a very simple structure. Syntax highlighting would
consist of highlighting comment lines (beginning with a single %) -
colour A say, start-of-tune lines (X: lines) - colour B, Title (T:
lines) - colour C, directive lines (beginning %%) - colour D. Then key
words highlighted (M: K: etc) That is about it really, except I would
really like to see all my T:'s in the symbols tab so that I can quickly
go to those tunes (I guess that is a separate issue of tags that I have
not yet delved into)
Here is what I have done so far to make a start:
1) Created an entry in my filetype_extensions file to add:
[Extensions]
ABC=*.abc;
2) Created a filetypes.ABC.conf file as follows (removing preset comment
lines)
[styling]
comment=#c00;;;true
[keywords]
primary=X: T: M: K: C: L: Q: K: V: P:
secondary=N S B %%chords endchords staves
[settings]
extension=abc
lexer_filetype=ABC
comment_single=%
comment_use_indent=false
mime_type=text/vnd.abc
This has no effect as it stands, though it is clearly being read because
if I change BOTH [styling] to [styling=C] and "lexer_filetype=ABC"
"lexer_filetype=C" then I get some highlighting, though obviously not
what I am looking for. It is, however, interesting to note that it then
highlights "N", "B", "endchords" but NOT "%%chords" or "X:", "T:" etc -
which makes me think that ":" and "%" may need special treatment -
escaping in some way.
Clearly I am missing something that I am not doing correctly to get the
syntax highlighting to work.
Then there is the question of where to go for the symbols.
A noddy guide to getting started, with examples would be very useful.
Thanks in advance.
NornB