by przemoc · 13y ago · 0 comments
first 3-digit number is integer - tempo (bpm)
next are space seperated values TOL, where:
T is letter - tone: C,d(des),D,e(es),E,F,g(ges),G,a(as),A,B,H,P(pause)
O is digit - octave: 0-9
L is digit/letter - length: L=0-9,A-Z <=> 1/(L+1)
J.S.Bach - Fugue in D minor (fragment): 240 A47 G47 A47 F47 A47 E47 A47 D47 A47 d47 A47 D47 A47 E47 A47 F47 A47 A37 A47 H37 A47 d47 A47 D47 A47 d47 A47 D47 A47 E47 A47 D43
I've written also Siemens ringtone converter to above format in gawk (GNU awk).EDIT: I just realized that you may wonder what is H there. For conciseness I'll quote Wikipedia on that matter http://en.wikipedia.org/wiki/B_(musical_note)
> However, in Germany, Central and Eastern Europe, and Scandinavia, the label B is used for what, above, is called B-flat, and the note a semitone below C is called H.
To be honest, today I would slightly change my notation, to make it more readable, consistent and friendlier for English-speaking people:
OTD[.]
O - octave: [0-9]
T - tone: C,d(es),D,e(s),E,F,g(es),G,a(s),A,b(es),B,P(ause)
D - duration: [0-9A-Z] meaning:
breve (double whole note) // for D==0
1/D note // for D!=0
. - dotted note, changes duration to: // d - duration
d(2 - 1/2^n) // n - number of dots
Same fugue would start like: 4A8 4G8 4A8 4F8 4A8 4E8 4A8 4D8 4A8 4d8 4A8 4D8 4A8
which is so much more better...Why I didn't do it like that from the beginning? No idea...