更改仪表时隐藏栏

更改仪表时隐藏栏

使用musitex,我尝试制作一段有两个五线谱的音乐片段,我想删除上方五线谱上的竖线。此外,我想更改每个小节的节拍。

在不改变仪表的情况下,我能够用 从上部谱表中删除条形图\sepbarrules\hidebarrule{2},但是当我添加仪表变化时,它们会重新出现!

下面是带有输出的 MWE

\documentclass{report}

\usepackage{musixtex}

\begin{document}
    \begin{music}
      \instrumentnumber{2} % 2 instruments
      \nobarnumbers
      \generalmeter{}
      \setclefsymbol{1}\empty % Remove the clefs from the lower staff
      \setclefsymbol{2}\empty % Remove the clefs from the upper staff
      \setlines{1}{0}         % Remove the staff lines from the lower staff
      \setlines{2}{0}         % Remove the staff lines from the upper staff
      \interinstrument=-6\internote
      \nostartrule            % Remove the starting bar, does not work with '\changecontext'
      \sepbarrules\hidebarrule{2} % Does not work with '\changecontext'
      \startextract
        \setmeter2{}
        \setmeter1{{\meterfrac{2}{4}}}
        \hidebarrule{2}             % Does not work with '\changecontext'
        \changecontext
        \sepbarrules\hidebarrule{2} % Does not work with '\changecontext'
        \notes\ql{l} \ql{l}&\hl{l}\en
        \setmeter2{}
        \setmeter1{{\meterfrac{3}{4}}}
        \changecontext%
        \notes\ql{l} \ql{l} \ql{l}&\hlp{l}\en
        \setmeter2{}
        \setmeter1{\meterC}
        \changecontext
        \notes\ql{l} \ql{l} \ql{l} \ql{l}&\wh{l}\en
      \endextract
    \end{music}
\end{document}

带酒吧的员工

答案1

可以通过重新定义来抑制顶部垂直条\changecontext

A

\documentclass{report}

\usepackage{musixtex}

%**************************************** added <<<<<<
\makeatletter
\def\changecontext{\n@wbar\updat@context}
\makeatother
%***************************************

\begin{document}
    \begin{music}
        \instrumentnumber{2} % 2 instruments
        \nobarnumbers
        \generalmeter{}
        \setclefsymbol{1}\empty % Remove the clefs from the lower staff
        \setclefsymbol{2}\empty % Remove the clefs from the upper staff
        \setlines{1}{0}         % Remove the staff lines from the lower staff
        \setlines{2}{0}         % Remove the staff lines from the upper staff
        \interinstrument=-6\internote
        \nostartrule            % Remove the starting bar, now works with '\changecontext'
        \sepbarrules\hidebarrule{2} % Now works with '\changecontext'
        \startextract
        \setmeter2{}
        \setmeter1{{\meterfrac{2}{4}}}
        \hidebarrule{2}             % Now works with '\changecontext'
        \changecontext
        \hidebarrule{2}             %Now works with '\changecontext'
        \notes\ql{l} \ql{l}&\hl{l}\en
        \setmeter2{}
        \setmeter1{{\meterfrac{3}{4}}}
        \changecontext%
        \notes\ql{l} \ql{l} \ql{l}&\hlp{l}\en
        \setmeter2{}
        \setmeter1{\meterC}
        \changecontext
        \notes\ql{l} \ql{l} \ql{l} \ql{l}&\wh{l}\en
        \endextract
    \end{music}
\end{document}

为了避免使用\Changecontext或类似物时出现顶部垂直条,您可以使用更激烈的方法,而不是使用

\renewcommand{\showallbarrules}{}

相关内容