# How to conceive a macro for drawing a pie-chart circle of fifths?

I would like to re-write parts of the book mentioned below on historic tuning temperaments, and therefore I need to draw a circle of fifths, represented in the book by hand-drawn schemata like this:

This seems like a good reason to use pie charts. There are about 30 temperaments, so a macro for input of a set of 11 labels and values would be useful. As you can see, different steps for tuning are explained with arrows for each temperament, angles between the radial lines are changed according to the interval size and that size alteration is indicated in-between using fractions and other math expressions. Please note that the upper note, usually C, should retain its vertical position, and that the circumferential step-arrows should step outwards like in the image.

I should be most obliged if someone presents a working example or an idea. Although I've experimented with much difficulty, I'm beginning to have some understanding of tikz/pgf. Still, I'm nowhere near the macro I would fancy, and I don't include any MWE's because they're not nearly intelligible.

ps. Today equal temperament is mostly used, meaning that the chart would consist of equal angles of 30 degrees as one would equally subtract 1/12 syntonic comma.

-
Please edit your question to show us your best attempt so far. – Jubobs Jun 4 '14 at 14:48

\degrees[13] defines a circle with 13 degrees. (r;phi) are polar coordinates:

\documentclass{article}
\usepackage{pst-node,multido}
\degrees[13]
\begin{document}

\begin{pspicture}(-5,-5)(5,5)
\multido{\iA=0+1,\rA=0.2+1.0,\rB=0.7+1.0}{13}{\ifnum\iA=7 \else
\psline[linestyle=dashed](3;\rA)%
\ifnum\iA=6 \else\rput(2;\rB){$\scriptscriptstyle-1/4$}\fi%
\fi}%
\rput(3;7.2){\shortstack{\scriptsize(Loop)\\$\scriptscriptstyle+1\,3/4$}}
\psarcn[arrowscale=2]{|*->|}{4}{0.2}{-4.8}\rput*(4;-3){\circlenode{A}{III}}
\psarc[arrowscale=2]{|*->|*}{3.8}{0.2}{4.2}\rput*(3.8;1.7){\circlenode{A}{I}}
\psarc[arrowscale=2]{|*->|}{3.9}{4.2}{6.2}\rput*(3.9;5.5){\circlenode{A}{II}}
\bfseries\sffamily\small
\pgfforeach \Label [count=\sector] in{LA,RE,SOL,DO,FA,Si$\flat$,Mi$\flat$,,Sol$\sharp$,DO$\sharp$,FA$\sharp$,SI,MI}
{\rput(! 3.4 \sector\space 0.8 sub 360 13 div mul PtoC){\Label}}
\end{pspicture}

\end{document}


-

It's not a macro but some TikZ code to start.

\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\newcommand{\myangle}{27.6923}
\foreach \nota/\text [count=\sector] in {Mib/Mi$\flat$,Sib/Si$\flat$,Fa/Fa,Do/Do,Sol/Sol,Re/Re,La/La, Mi/Mi,Si/Si,Fas/Fa$\sharp$,Dos/Do$\sharp$,Sols/Sol$\sharp$}
{
\draw[dashed, shorten >=3mm] (0,0) -- ++({(4-\sector)*\myangle+90}:2cm) node[font=\sffamily] (\nota) {\text};
}

\foreach \i [count=\xi] in {1,2,...,11}
{
\path (0,0) -- ++({(3.5-\xi)*\myangle+90}:15mm) node[font=\tiny\sffamily]  {-1/4};
}
\path (0,0) -- ++({4*\myangle+90}:15mm) node[font=\tiny\sffamily]  {+1 3/4};

\draw[thick] (Mib)--++({90+3*\myangle}:9mm);
\draw[thick] (Fa)--++({90+\myangle}:9mm);
\draw[thick] (La)--++({90-3*\myangle}:9mm);
\draw[thick] (Sols)--++({90-8*\myangle}:9mm);

\draw[->,thick] ({90+\myangle}:26mm) arc [start angle={90+\myangle}, delta angle={2*\myangle}, radius=26mm];
\node[draw, circle, fill=white, font=\small] at (90+2*\myangle:26mm) {II};

\draw[->,thick] ({90-3*\myangle}:27mm) arc [start angle={90-3*\myangle}, delta angle={4*\myangle}, radius=27mm];
\node[draw, circle, fill=white, font=\small] at (90-\myangle:27mm) {I};

\draw[->,thick] ({90-3*\myangle}:26mm) arc [start angle={90-3*\myangle}, delta angle={-5*\myangle}, radius=26mm];
\node[draw, circle, fill=white, font=\small] at (90-5.5*\myangle:26mm) {III};
\end{tikzpicture}
\end{document}


-