 |
 |
QotD |
"To be or not to be" – Shakespeare
|
|
        |
 |
ABCParser
Last updated at 7:49 am UTC on 31 August 2022
An ABCParser is part of the Musical objects for Squeak.
ABC is a music notation system designed to be comprehensible by both people and computers.
An ABCParser implements some of the specifications in
http://abcnotation.com/wiki/abc:standard:v2.0.
Examples how to use it may be found in class ABCParserTest in the Musical objects for Squeak image.
The notation
https://abcnotation.com
Editors
simple:
https://www.abcjs.net/abcjs-editor.html
https://editor.drawthedots.com/
Encoding of pitch
d'
-c'- ----
b
-a- --- ---- ----
g
------------------------------------f-------------------
e
--------------------------------d-----------------------
c
----------------------------B---------------------------
A
------------------------G-------------------------------
F
--------------------E-----------------------------------
D
---- ---- ---- -C-
B,
---- -A,-
G,
Example
The following example may be executed in a workspace in the Musical objects for Squeak image:
"1"
(ABCParser read: '
X:190
T: Amei jinri ba lu shang
N: C1682
O: China,Jiangxi, Ganxian
S: IV, 244]
R: Xiaodiao, Chage, Shuzhuang]
M: 2/4
L: 1/16
K: C
E2e2d2Ac | dcd6 | d2g2e2z2 | E2e2dcA2 | cAG6 |
c2AGEGE2 | d3ge4 | d3ge4 | dedcAcGA | cAd6 |
E2e2d2A2 | cAG4Ac | AGEGE4 |
E2e2d2Ac | dcd4Ac | GAcAc4 | AcG2A2d2 | c2A2c4
') asMusicalPhrase play
"2"
(ABCParser read: '
X:4
T:Kerryman''s Fling, The
R:fling
H:Also as reel#206
D:Patrick Street: Irish Times
Z:id:hn-hf-4
M:C|
K:D
A2AF ABde|fdef edBd|A2AF ABde|1 fd (3efe d2dB:|2 fd (3efe d2de||
f<aaf bfbf|afef edBd|1 f<aaf bfbf|af (3efe d2de:|2 A2AF ABde|fd (3efe d2dB||
') asMusicalPhrase play
"3"
(ABCParser read: '
X:39
T:Am Bodach a chianamh
S:Petrie''s Collection of Strathspey Reels and Country Dances &c., 1790
Z:Steve Wyrick <sjwyrick''at''astound''dot''net>, 3/19/04
N:Petrie''s First Collection, page 18
L:1/8
M:9/8
R:Slip Jig
K:D
"^Slow"
A, |D>EF AFD E2B,|D>EF AFE D2A,|D>EF AFD E2B,|\
D>EF AFA f2d |e2B d2F E2B,|D3/2(E/F/G/) AFD D2 :|
|:f |d>ef dfd e2B |d>ef dfe d2A |d>ef dfd e2B |\
d>ef dfd f2d |e2B d2F E2B,|D/D/DF D/D/DF D2 :|
|:A, |D/D/DF D/D/DF E2B,|D/D/DF D/D/DF D2A,|D/D/DF D/D/DF E2B,|\
D/D/DF A/A/Ad f2d |e2B d2F E2B,|D3/2(E/F/G/) AFE D2 :|
|:f/g/|afd afd e2B |afd aef d2A |afd afd e2B |\
afd afd f2d |e2B d2F E2B,|D3/2(E/F/G/) AFE D2 :|
%Petrie left the final repeat sign off the last part -SW
') asMusicalPhrase play