Or just learn a little bit of Elisp, and do this:
M-: (loop for i from ?a
for j below 12
do (insert (format "#define %c %d\n" i j)))
For your example, I write this:
Select it and press Ctrl+Alt+p and have it replaced by: https://gist.github.com/1355548