Musixtex:用箭头和文本注释乐谱

Musixtex:用箭头和文本注释乐谱

需要用箭头和文字标注一个分数,代码如下:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{polyglossia}
\setmainlanguage{spanish}
\usepackage{etoolbox}
\usepackage{float} %Paquete para posicionar Tablas
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\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
%Rutinas para Musixtex
\newcommand{\BBBl}[5][0]%
{\ibbbl{#1}{#2}{#3}\qb{#1}{#4}\tqb{#1}{#5}}
\newcommand{\BBBBl}[5][0]%
{\ibbbbl{#1}{#2}{#3}\qb{#1}{#4}\tqb{#1}{#5}}

\begin{document}
%\begin{tikzpicture}
%\draw [red,-{Stealth}] (0,0)--(0.5,-1);
%\draw (0,0) circle (1cm);
%\draw (0,0) node {
%\node (image) at (0,0) {
%\begin{figure}[H]
\begin{center}
%\tikz{\node[scale=1]{
\begin{music}
        \normalmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startextract
        %\startpiece
        \notes \wh j \sk \en
        %\Endpiece
        \zendextract %Cierra de partitura sin barra vertical
        \startextract
        %\startpiece %\alaligne\alapage
        \notes \hl{j} \sk \hl{j} \sk \en%\alaligne
        %\Endpiece
        \zendextract %Cierra de partitura sin barra vertical
        \startextract
        %\startpiece
        \notes \ql{j} \ql{j} \ql{j} \ql{j} \sk \en %\alaligne
        %\Endpiece
        \zendextract %Cierra de partitura sin barra vertical
        \startextract
        %\startpiece
        \notes \Dqbl jj \Dqbl jj \Dqbl jj \Dqbl jj \en
        %\Endpiece
        \zendextract %Cierra de partitura sin barra vertical
        \startextract
        %\startpiece
        \notes \Qqbbl jjjj \Qqbbl jjjj \Qqbbl jjjj \Qqbbl jjjj \en
        %\Endpiece
        \zendextract %Cierra de partitura sin barra vertical
        \startextract
        %\startpiece
        \notes \BBBl{l}{0}{jjjjjjj}{j} \BBBl{l}{0}{jjjjjjj}{j} \BBBl{l}{0}{jjjjjjj}{j} \BBBl{l}{0}{jjjjjjj}{j} \en
        %\Endpiece
        \zendextract %Cierra de partitura sin barra vertical
\end{music}
%};}
\end{center}
%\end{figure}
 %\end{tikzpicture}
        
\begin{center}
\tikz{\node[scale=0.7]{
        \begin{music}
        \smallmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startextract
        %\startpiece
        \notes \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j}\en
        %\Endpiece
        \zendextract %Cierra de partitura sin barra vertical
        \end{music}    
        };}
\end{center}
\end{document}

输出应如下所示:

在此处输入图片描述

答案1

我不会使用\startextract和,\zendextract而是使用\startpiece\zendpiece来排版音乐,因为这会自动填充一行。然后,您可以使用text width来排版音乐,因为这会自动填充一行。然后,您可以使用Ti 的选项Z 节点。

您可以使用\scale{}宏来设置不同音乐部分之间的正确相对距离。不知何故,两个半音符之间的距离需要一些额外的手动调整。要手动在音符之间添加一些水平间距,您可以使用宏\off{}

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{musixtex} 
%Rutinas para Musixtex
\newcommand{\BBBl}[5][0]{%
    \ibbbl{#1}{#2}{#3}\qb{#1}{#4}\tqb{#1}{#5}%
}
\newcommand{\BBBBl}[5][0]{%
    \ibbbbl{#1}{#2}{#3}\qb{#1}{#4}\tqb{#1}{#5}%
}

\begin{document}
\begin{tikzpicture}[
        scale=0.67, 
        transform shape,
        score/.style={
            anchor=west,
            align=left, 
            text width=21.25cm,
            inner sep=0pt
        },
        label/.style={
            anchor=east,
            align=center,
            text width=7em
        },
        every path/.style={
            draw=red, 
            very thick,
            line cap=round
        }
    ]
    %Primera partitura 
    \node[score] (A) at (0,0) {
    \begin{music}
        \normalmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startpiece
        \scale{48}
        \notes 
            \off{0.5em}
            \wh j 
            \en
        \zendpiece %Cierra de partitura sin barra vertical
    \end{music}};
    %Segunda partitura 
    \node[score] (B) at (0,-1.5) {
    \begin{music}
        \normalmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startpiece
        \scale{24}
        \notes 
            \off{0.5em}
            \hl{j} 
            \off{0.25em}
            \hl{j} 
            \en
        \zendpiece %Cierra de partitura sin barra vertical
    \end{music}};
    %Tercera partitura 
    \node[score] (C) at (0,-3) {
    \begin{music}
        \normalmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startpiece
        \scale{12}
        \notes 
            \off{0.5em}
            \ql{j} 
            \ql{j}  
            \ql{j}  
            \ql{j} 
            \en
        \zendpiece %Cierra de partitura sin barra vertical
    \end{music}};
    %Cuarta partitura 
    \node[score] (D) at (0,-4.5) {
    \begin{music}
        \normalmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startpiece
        \scale{6}
        \notes 
            \off{0.5em}
            \Dqbl jj 
            \Dqbl jj 
            \Dqbl jj 
            \Dqbl jj 
            \en
        \zendpiece %Cierra de partitura sin barra vertical
    \end{music}};
    %Quinta partitura 
    \node[score] (E) at (0,-6) {
    \begin{music}
        \normalmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startpiece
        \scale{3}
        \notes 
            \off{0.5em}
            \Qqbbl jjjj 
            \Qqbbl jjjj 
            \Qqbbl jjjj 
            \Qqbbl jjjj 
            \en
        \zendpiece %Cierra de partitura sin barra vertical
    \end{music}};
    %Sexta partitura 
    \node[score] (F) at (0,-7.5) {
    \begin{music}
        \normalmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startpiece
        \scale{1.5}
        \notes 
            \off{0.5em}
            \BBBl{l}{0}{jjjjjjj}{j} 
            \BBBl{l}{0}{jjjjjjj}{j} 
            \BBBl{l}{0}{jjjjjjj}{j} 
            \BBBl{l}{0}{jjjjjjj}{j} 
            \en
        \zendpiece %Cierra de partitura sin barra vertical
    \end{music}};
    %Septima partitura 
    \node[score] (G) at (0,-9) {
    \begin{music}
        \normalmusicsize
        \setclefsymbol1\empty
        \nobarnumbers
        \nostartrule % Inicia sin barra vertical
        \startpiece
        \scale{0.75}
        \notes 
            \off{0.5em}
            \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} 
            \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} 
            \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} 
            \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j}
            \en
        \zendpiece %Cierra de partitura sin barra vertical
    \end{music}};
    %Lineas de redonda a blanca
    \draw 
        (0.6,-0.15) -- ++(0,-1)
        (0.8,-0.15) -- ++(10,-1);
    \draw 
        (0.6,-2) -- ++(0,-0.65)
        (0.8,-2) -- ++(5,-0.65)
        (10.95,-2) -- ++(0,-0.65)
        (11.15,-2) -- ++(5,-0.65);
    \draw 
        (0.6,-3.5) -- ++(0,-0.65)
        (0.8,-3.5) -- ++(2.33,-0.65)
        (5.8,-3.5) -- ++(0,-0.65)
        (6,-3.5) -- ++(2.33,-0.65);
    \draw 
        (0.6,-5.15) -- ++(0,-0.5)
        (0.8,-5.15) -- ++(1,-0.5)
        (3.2,-5.15) -- ++(0,-0.5)
        (3.4,-5.15) -- ++(1,-0.5);
    \draw 
        (0.6,-6.75) -- ++(0,-0.4)
        (0.8,-6.75) -- ++(0.5,-0.4)
        (1.85,-6.75) -- ++(0,-0.4)
        (2.05,-6.75) -- ++(0.5,-0.4)
        (3.1,-6.75) -- ++(0,-0.4)
        (3.3,-6.75) -- ++(0.5,-0.4)
        (4.35,-6.75) -- ++(0,-0.4)
        (4.55,-6.75) -- ++(0.5,-0.4);
    \draw 
        (0.6,-8.25) -- ++(0,-0.4)
        (0.8,-8.25) -- ++(0.1,-0.4)
        (1.2,-8.25) -- ++(0,-0.4)
        (1.4,-8.25) -- ++(0.1,-0.4);
    % annotations
    \node[label] at (A.west) {La redonda \\ vale};
    \node[label] at (B.west) {2 blancas \\ o};
    \node[label] at (C.west) {4 negras \\ o};
    \node[label] at (D.west) {8 corcheas \\ o};
    \node[label] at (E.west) {16 semicorcheas \\ o};
    \node[label] at (F.west) {32 fusas \\ o};
    \node[label] at (G.west) {64 semifusas};
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

现在箭头可以正常工作,只有谱表的宽度不起作用...对 Musixtex 代码有什么建议吗?

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{polyglossia}
\setmainlanguage{spanish}
\usepackage{etoolbox}
\usepackage{float} %Paquete para posicionar Tablas
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\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
%Rutinas para Musixtex
\newcommand{\BBBl}[5][0]%
{\ibbbl{#1}{#2}{#3}\qb{#1}{#4}\tqb{#1}{#5}}
\newcommand{\BBBBl}[5][0]%
{\ibbbbl{#1}{#2}{#3}\qb{#1}{#4}\tqb{#1}{#5}}

\begin{document}
\begin{tikzpicture}[remember picture,overlay]
    %Primera partitura 
    \node[text width=12cm,align=center, scale=0.9] at (6,0){
    \begin{music}
      \normalmusicsize
      \setclefsymbol1\empty
      \nobarnumbers
      \nostartrule % Inicia sin barra vertical
      \startextract
      \notes \sk \wh j \sk \en
      \zendextract %Cierra de partitura sin barra vertical
    \end{music}};
    %Segunda partitura 
    \node[text width=12cm,align=center, scale=0.9] at (6,-1.5){
    \begin{music}
    \normalmusicsize
    \setclefsymbol1\empty
    \nobarnumbers
    \nostartrule % Inicia sin barra vertical
    \startextract
    \notes \sk \hl{j} \sk \hl{j} \sk \en%\alaligne
    \zendextract %Cierra de partitura sin barra vertical
    \end{music}};
    %Tercera partitura 
    \node[text width=12cm,align=center, scale=0.9] at (6,-3){
    \begin{music}
    \normalmusicsize
    \setclefsymbol1\empty
    \nobarnumbers
    \nostartrule % Inicia sin barra vertical
    \startextract
    \notes \ql{j} \ql{j} \ql{j} \ql{j} \sk \en
    \zendextract %Cierra de partitura sin barra vertical
    \end{music}};
    %Cuarta partitura 
    \node[text width=12cm,align=center, scale=0.9] at (6,-4.5){
    \begin{music}
    \normalmusicsize
    \setclefsymbol1\empty
    \nobarnumbers
    \nostartrule % Inicia sin barra vertical
    \startextract
    \notes \Dqbl jj \Dqbl jj \Dqbl jj \Dqbl jj \en
    \zendextract %Cierra de partitura sin barra vertical
    \end{music}};
    %Quinta partitura 
    \node[text width=12cm,align=center, scale=0.9] at (6,-6){
    \begin{music}
    \normalmusicsize
    \setclefsymbol1\empty
    \nobarnumbers
    \nostartrule % Inicia sin barra vertical
    \startextract
    \notes \Qqbbl jjjj \Qqbbl jjjj \Qqbbl jjjj \Qqbbl jjjj \en
    \zendextract %Cierra de partitura sin barra vertical
    \end{music}};
    %Sexta partitura 
    \node[text width=12cm,align=center, scale=0.9] at (6,-7.5){
    \begin{music}
    \normalmusicsize
    \setclefsymbol1\empty
    \nobarnumbers
    \nostartrule % Inicia sin barra vertical
    \startextract
    \notes \BBBl{l}{0}{jjjjjjj}{j} \BBBl{l}{0}{jjjjjjj}{j} \BBBl{l}{0}{jjjjjjj}{j} \BBBl{l}{0}{jjjjjjj}{j} \en
    \zendextract %Cierra de partitura sin barra vertical
    \end{music}};
    %Septima partitura 
    \node[text width=12cm,align=center, scale=0.7] at (6,-9){
    \begin{music}
    \normalmusicsize
    \setclefsymbol1\empty
    \nobarnumbers
    \nostartrule % Inicia sin barra vertical
    \startextract
    \notes \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j} \BBBBl{l}{0}{jjjjjjjjjjjjjjj}{j}\en
    \zendextract %Cierra de partitura sin barra vertical
    \end{music}};
    %Lineas de redonda a blanca
    \draw[draw=red, line width=3pt] (6,-0.15)--(5.55,-1.25);
    \draw[draw=red, line width=3pt] (6.1,-0.15)--(6.45,-1.25);
    %Lineas de blanca a negra (par de izquierda)
    \draw[draw=red, line width=3pt] (5.45,-2.05)--(5.05,-2.8);
    \draw[draw=red, line width=3pt] (5.55,-2.05)--(5.55,-2.8);
    %Lineas de blanca a negra (par de derecha)
    \draw[draw=red, line width=3pt] (6.35,-2.05)--(6.05,-2.8);
    \draw[draw=red, line width=3pt] (6.45,-2.05)--(6.55,-2.8);
    %Lineas de negra a corchea
    \draw[draw=red, line width=3pt] (4.85,-3.55)--(4.45,-4.3);
    \draw[draw=red, line width=3pt] (4.95,-3.55)--(4.85,-4.3);
    
    \draw[draw=red, line width=3pt] (5.45,-3.55)--(5.35,-4.3);
    \draw[draw=red, line width=3pt] (5.50,-3.55)--(5.75,-4.3);
    
    \draw[draw=red, line width=3pt] (5.95,-3.55)--(6.25,-4.3);
    \draw[draw=red, line width=3pt] (6.0,-3.55)--(6.60,-4.3);
    
    \draw[draw=red, line width=3pt] (6.5,-3.55)--(7.1,-4.3);
    \draw[draw=red, line width=3pt] (6.63,-3.55)--(7.5,-4.3);
    %Lineas de corchea a semi corchea
    \draw[draw=red, line width=2pt] (4.40,-5.0)--(3.0,-5.8);
    \draw[draw=red, line width=2pt] (4.40,-5.0)--(3.5,-5.8);
    %Lineas de semi corchea a fusa
    \draw[draw=red, line width=1pt] (2.9,-6.67)--(-0.1,-7.3);
    \draw[draw=red, line width=1pt] (2.9,-6.67)--(0.3,-7.3);
    %Lineas de fusa a semi fusa
    \draw[draw=red, line width=1pt] (-0.15,-8.1)--(-3.4,-8.85);
    \draw[draw=red, line width=1pt] (-0.15,-8.1)--(-3.1,-8.85);
    
    \end{tikzpicture}
    



\end{document}

乐谱五线谱错误:应调整宽度

乐谱五线谱错误:应调整宽度

相关内容