There is already a question here about a circle of fifths diagram (link) but I would like to include pictures of staves like this diagram here
Is this possible to make it all in LaTeX, I heard there are some packages for writing music (but I have no experience with this). Thank you for your advice.
I managed this using an answer from the linked question. Just labels.
\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\newcommand{\myangle}{30}
\foreach \nota/\text [count=\sector] in {C/C minor,G/G minor,D/D minor,A/A minor,E/E minor, B/B minor, FS/F$\sharp$ minor, CS/C$\sharp$ minor, GS/G$\sharp$ minor, EF/E$\flat$ minor, BF/B$\flat$ minor, F/F minor}
{
\draw[shorten >=3mm] (0,0) -- ++({(4-\sector)*\myangle+90}:3cm) node (\nota) {\text};
}
\end{tikzpicture}
\end{document}
Best Answer
Nice question! Using the MusiXTeX package, there is in fact a really elegant solution. The command for assigning the key signature,
\generalsignature{s}
, simply requires a number wheres > 0
is the number of sharps ands < 0
is the number of flats.Therefore, we can just create a
foreach
loop that goes from-6
to+5
. And using these integers it is straightforward to assign the required angle around a circle, using TikZ as our drawing tool.CODE
A rotating circle of fifths...