I have abc notation file and I want to convert it to midi or mp3 format.
I did find music21 (docs) library to that says it can convert abc to midi but I could not figure out how.
I also found a website mandolintab that can convert the file below to midi. I am looking to do the same in python.
Can some one Help?
p6
E (G/A/) \
| eAFE ~Ez | D2 zB AG | E2 EE ED |
EE E2 | (EA) A2 | Ac ef | g2 fe | (e3 d) ec |
d2 BA Bd | c2 BA ^c/d/ | e2 A/A/ cA/A/ | Ad c2 ||
((3c/d/e/)) | f2 ff e2 dc | d^c de f2 (gf/e/) | f2 ed cAGE | F2 D2 D2 ((3ABc)|
dcdA GFGB | Adfe dcAc | dcde fedc | A2 A>G A2 :|
X:1758
T:The Sirit Peallow
M:C|
L:1/8
N:"collected by J. O'Neill"
B:O'Neill's 1429
Z:"Transcribed by Bob Safranek, [email protected]"
K:D
(D | F)ABA FAFD | (F2{A}GF) DFAF | DEFE DEFD | EFAF DFAF |
dD ((3DDD) (FA) BcdF| E2 ((3EFG) A2 ||
d2 (fd) cBAG | F2 (AG) FDAD | ((3FED) (AD) CEEG | FEFG AB G2 :|
((3fgf) (df) (ed) B2 | A2 (Ac) BcdB | Adfa gfe^d | e2 (ae) fedc |
BGDF GABc d2 (ga) | ((3fga) (fd) efge | ((3fga) (ec)
In general if you have a file as xyz.abc, you can convert it to MIDI in music21 in python with:
or if it's a collection of abc scores, you can get a specific one with:
and that will do it (and from there you can convert it to mp3.
Pieces in O'Neill's collection should already be in music21's corpus, but this piece seems to be absent in our version.