钢琴包中的和声小调音阶结构

钢琴包中的和声小调音阶结构

需要打印钢琴键盘包中的字母音符,基本代码如下:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{polyglossia}
\setmainlanguage{english}

\usepackage{musixtex} 
\usepackage{piano} 
\usepackage{float} %Paquete para posicionar Tablas

\begin{document}

\begin{figure}[H]
    \centering
    \keyboard[Ao][Bo][Ct][Dt][Et][Ft][Gst][At]
    \caption{Harmonic minor scale structure in A}
    \label{Harmonic}
\end{figure}
  
\end{document}

当前的

期望的输出如下: 期望

答案1

piano软件包非常有限。以下是完整手册:

此包将 \keyboard[1][2]..[7] 命令添加到您的项目中。使用时,它会在您的文档上绘制一个小型 2 个八度钢琴键盘,最多可突出显示 7 个键。

按键:Co、Cso、Do、Dso、Eo、Fo、Fso、Go、Gso、Ao、Aso、Bo、Ct、Cst、Dt、Dst、Et、Ft、Fst、Gt、Gst、At、Ast 和 Bt。

建议使用:\begin{figure}[thpb]\ \centering
\keyboard[Co][Eo][Gso][Ct][Et] \caption{C aug chord}
\label{Chord1} \end{figure}

请注意,您最多可以突出显示 7 个键。空键盘在 TikZ 图片中使用起来有些困难,如下所示:

\documentclass[tikz, border=1cm]{standalone}
\usepackage{piano}
\usetikzlibrary{arrows.meta}
\tikzset{
blackkey/.style={
white, scale=0.8,
append after command={\pgfextra{\tikzset{every label/.append style={white, scale=0.8}}}}
}}
\begin{document}
\begin{tikzpicture}[
inner sep=1pt, 
every node/.style={circle, minimum width=14pt, font=\bf},
every label/.style={rectangle, label position=below, label distance=1pt, inner sep=0pt, font=\small}
]
\node[rectangle, anchor=south west, inner sep=0pt, outer sep=0pt, shift={(0.03,0.3)}, font=\normalsize, scale=2] {\keyboard};
\node[draw, label={Fun}] at (1,1) {C};
\node[fill=orange, label={[white, scale=0.8]Fun}] at (1.5,2) {};
\node[fill=red] at (2.5,2) {};
\node[fill=orange, label={Fun}] at (2,1) {D};
\node[draw=teal, very thick, fill=orange, label={Fun}] at (3,1) {E};
\node[label={R}] at (6,1) {A};
\node[label={m2}] at (7,1) {B};
\node[label={M3}] at (8,1) {C};
\node[label={p4}] at (9,1) {D};
\node[label={p5}] at (10,1) {E};
\node[label={m6}] at (11,1) {F};
\node[label={R(0)}] at (13,1) {A};
\node[blackkey, label={(m7)}] at (12.5,2.5) {G\#};
\draw[-Stealth]
(6,-0.2)    edge +(0,0.4) -- 
(7,-0.2)    edge +(0,0.4) --
(8,-0.2)    edge +(0,0.4) -- 
(9,-0.2)    edge +(0,0.4) -- 
(10,-0.2)   edge +(0,0.4) -- 
(11,-0.2)   edge +(0,0.4) -- 
(12.4,-0.2) edge +(0,1.4) --
(13,-0.2)   --   +(0,0.4);
\tikzset{every node/.style={font=\normalfont}}
\node at (6.5,-0.5)  {T};
\node at (7.5,-0.5)  {S};
\node at (8.5,-0.5)  {T};
\node at (9.5,-0.5)  {T};
\node at (10.5,-0.5) {S};
\node at (11.8,-0.5) {TS};
\node at (12.7,-0.5) {S};
\end{tikzpicture}
\end{document}

带有一些突出显示的键和音符的键盘

相关内容