使用 Tikz 制作的专业萨克斯手指记谱法 Musixtex 图表

使用 Tikz 制作的专业萨克斯手指记谱法 Musixtex 图表

需要使用 Tikz 和 Musixtex 来复制专业萨克斯指法谱,起始代码如下:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{polyglossia}
\setmainlanguage{spanish}
\usepackage{etoolbox}
\usepackage{float} %Paquete para posicionar Tablas
\usepackage{tikz}
\usetikzlibrary{arrows.meta, math}
\usepackage{amsmath}%Para signo igual
\usepackage{musicography}
\usepackage{musixtex} 
\input{musixlyr}
\input {musixcho}
\input {musixdat}%fecha
\input {musixfll}
\input {musixgre}%gregoriano
\input {musixper}%percusión
\input {musixppff}
\input {musixstr}
\input {musixvbm}  % experimental vectorized beams
\input {musixdbr} % lineas de barras punteadas, discontinuas y arbitrariamente discontinuas


\begin{document}

\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {
%Description of the Saxophone finger chart
\begin{music}
    \setclef1\treble % Clave de Sol para el Instrumento 1
    \nobarnumbers % Omite la numeración en los compases
    \nostartrule % Inicia sin barra vertical
    \startextract % Se inicia el fragmento musical
    %Primer compás
    \NOtes \sh{a} \wh a 
    \zcharnote{-11}{\footnotesize \hspace*{-1.2cm} La\musSharp{}}\en
    \NOtes \fl{b} \wh b 
    \zcharnote{-11}{\footnotesize \hspace*{-1.2cm} Si\musFlat{}}\en\setdoublebar
    \endextract % Se finaliza el fragmento musical
\end{music}   
};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
    %Código para grillas
  %\draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
  %\foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
  %\foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }
  
  %Código para dibujar el Saxophone
  \draw [fill=blue] (0.67,1.0) ellipse (0.04cm and 0.09cm);
  \draw [fill=green] (0.685,0.95) ellipse (0.03cm and 0.13cm);
  \draw [fill=green] (0.69,0.90) ellipse (0.03cm and 0.13cm);
  \draw [fill=green] (0.68,0.85) ellipse (0.03cm and 0.13cm);
  \draw [fill=blue] (0.67,0.9) circle[radius=0.08cm];
  \draw [fill=purple] (0.65,0.9) circle[radius=0.08cm];
  \draw [fill=blue] (0.67,0.8) circle[radius=0.06cm];
  \draw [fill=gray] (0.67,0.7) circle[radius=0.08cm];
  \draw [fill=yellow] (0.67,0.6) circle[radius=0.08cm];
  \draw [fill=yellow] (0.69,0.6) ellipse (0.1cm and 0.03cm);
  \draw [fill=yellow,rounded corners=0.025cm] (0.683,0.54) rectangle (0.688,0.58);
  \draw [fill=yellow,rounded corners=0.025cm] (0.690,0.54) rectangle (0.695,0.58);
  \draw [fill=yellow] (0.69,0.52) ellipse (0.1cm and 0.03cm);
  \draw[] (0.635,0.6) -- ++(0.07,-0.2);

  \draw [fill=blue] (0.67,0.4) circle[radius=0.08cm];
  \draw [fill=gray] (0.67,0.3) circle[radius=0.08cm];
  \draw [fill=yellow] (0.67,0.2) circle[radius=0.08cm];
  \draw [fill=gray] (0.65,0.2) ellipse (0.1cm and 0.05cm);
  \draw [fill=green,rounded corners=0.025cm] (0.64,0.39) rectangle (0.645,0.44);
  \draw [fill=green,rounded corners=0.025cm] (0.64,0.32) rectangle (0.645,0.37);
  \draw [fill=green,rounded corners=0.025cm] (0.64,0.25) rectangle (0.645,0.3);
  \draw [fill=gray,rounded corners=0.025cm] (0.655,0.25) rectangle (0.66,0.35);
  \draw [fill=yellow,rounded corners=0.05cm] (0.64,0.15) rectangle (0.66,0.1);
  \draw [fill=yellow,rounded corners=0.05cm] (0.64,0.08) rectangle (0.66,0.03);


\end{scope}


\end{tikzpicture}

\end{document}

当前输出如下:

电流输出

预期输出应该是:

预期输出

答案1

除了圆圈,您不能指望circle画出任何其他东西。我不知道您要找的符号,但这是我从您的图片中能画出的最好的符号。

\documentclass[tikz, 11pt, border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}
\begin{scope}[xshift=-0.5cm]
\draw[fill=purple] (0.65,0.9) circle[radius=0.08cm];
\end{scope}
\draw[fill=purple] (0.65,0.9) ++(-0.05,0.1) to[bend left] ++(0.1,-0.25) to[bend right] ++(-0.1,0.05) to[bend right] cycle;
\end{tikzpicture}
\end{document}

紫色圆圈和紫色曲线三角形

找到代码中带有圆圈的行并替换它。

编辑:刚刚发现您的代码改变了正常的坐标向量,因此您需要使用其他数字或使用cm如下单位:

\draw[fill=purple] (0.65,0.9) ++(-0.05cm,0.1cm) to[bend left] ++(0.1cm,-0.25cm) to[bend right] ++(-0.1cm,0.05cm) to[bend right] cycle;

几个彩色的圆圈和形状

相关内容