Musixtex 中的节奏听写乐谱(全音符的插入字体)

Musixtex 中的节奏听写乐谱(全音符的插入字体)

节奏听写要求,写下以下乐谱:

\documentclass[tikz,border=3mm]{standalone}
\usepackage[T1]{fontenc}
\usepackage{polyglossia}
\setmainlanguage{spanish}

\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc}
\tikzstyle{every picture}+=[remember picture]

\usepackage{pifont} % Para usar simbolos ding
\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
\input {musixbm} % compatibilidad garrapateas con ganchos o con barras
\input {musixbbm} % compatibilidad semi garrapateas con ganchos o con barras

\newlength{\musicwidth}%new
\setlength{\musicwidth}{0.95\textwidth}%new, can be set for each instance of a figure environment 

\begin{document}
The student sees the score and hear the rythm dictation:

\begin{music}
    \resetlyrics
    \instrumentnumber{1}
    \nostartrule
    \generalmeter{\meterfrac{2}4} %Compás en 2/4
    \hsize=\musicwidth
    \nobarnumbers
    \sepbarrules%
    \startpiece% g k
    \notes\wh{cdefg} \sk \wh{gfgfg} \sk \wh{gfefgfgfedc}\en%
    \Endpiece
 \end{music}

After that, student resolve the exercise:

 \begin{music}
    \resetlyrics
    \instrumentnumber{1}
    \nostartrule
    \generalmeter{\meterfrac{2}4} %Compás en 2/4
    \hsize=\musicwidth
    \nobarnumbers
    \sepbarrules%
    \startpiece%
    \notes\ibu0c3\qb0{c}\tbu0\qb0{d}\ibu0e3\qb0{e}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qp\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qp\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0e{3}\qb0{e}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qu f\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0e{-3}\qb0{e}\tbu0\qb0{d}\en\bar%
    \notes\hu c\en
    \Endpiece
 \end{music}

\end{document}

当前输出如下: 当前的

预期的输出应该是(请注意,需要在第一个五角星中实现交叉全音符,并在第二个五角星中突出显示四分静默符号): 预期的

答案1

包 XITS 中有\dottedcircle字形,可\resizeboxgraphicx包中导入,然后使用 调整大小。然后可使用 将虚线椭圆放在五线谱上\zcn

下面的代码包含一个宏\beats,它以一串音符(以逗号分隔)作为参数。例如,前五个节拍是用 产生的\beat{c,d,e,f,g}

在此处输入图片描述

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{polyglossia}
\setmainlanguage{spanish}

\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\setmathfont[range={\dottedcircle}]{XITS Math}

\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc}
\tikzstyle{every picture}+=[remember picture]

\usepackage{pifont} % Para usar simbolos ding
\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
\input {musixbm} % compatibilidad garrapateas con ganchos o con barras
\input {musixbbm} % compatibilidad semi garrapateas con ganchos o con barras

\newlength{\musicwidth}%new
\setlength{\musicwidth}{0.95\textwidth}%new, can be set for each instance of a figure environment 

\newcommand{\beat}[1]{\foreach \n in {#1}{\zcn{\n}{\raisebox{-.35ex}{\resizebox{1.75ex}{.95ex}{$\dottedcircle$}}}\sk}}

\begin{document}
The student sees the score and hear the rythm dictation:

\begin{music}
    \resetlyrics
    \instrumentnumber{1}
    \nostartrule
    \generalmeter{\meterfrac{2}4} %Compás en 2/4
    \hsize=\musicwidth
    \nobarnumbers
    \sepbarrules%
    \startpiece% g k
    \notes\beat{c,d,e,f,g} \sk \beat{g,f,g,f,g} \sk \beat{g,f,e,f,g,f,g,f,e,d,c}\en%
    \Endpiece
 \end{music}

After that, student resolve the exercise:

 \begin{music}
    \resetlyrics
    \instrumentnumber{1}
    \nostartrule
    \generalmeter{\meterfrac{2}4} %Compás en 2/4
    \hsize=\musicwidth
    \nobarnumbers
    \sepbarrules%
    \startpiece%
    \notes\ibu0c3\qb0{c}\tbu0\qb0{d}\ibu0e3\qb0{e}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qp\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qp\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0e{3}\qb0{e}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qu f\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0e{-3}\qb0{e}\tbu0\qb0{d}\en\bar%
    \notes\hu c\en
    \Endpiece
 \end{music}

\end{document}

答案2

一个简单的替代方案是\usepackage{color},也许可以用 等来代替\wh\textcolor{lightgray}{\nh参见第一组和第二组注释之间的区别)。对于第二行中其余部分周围的方框,您已经在对其他问题的回答中得到了答案。

\documentclass[tikz,border=3mm]{standalone}
\usepackage[T1]{fontenc}
\usepackage{polyglossia}
\setmainlanguage{spanish}

\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc}
\tikzstyle{every picture}+=[remember picture]

\usepackage{pifont} % Para usar simbolos ding
\usepackage{musicography}
\usepackage{musixtex} 
\usepackage{color}% new
\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
\input {musixbm} % compatibilidad garrapateas con ganchos o con barras
\input {musixbbm} % compatibilidad semi garrapateas con ganchos o con barras

\newlength{\musicwidth}%new
\setlength{\musicwidth}{0.95\textwidth}%new, can be set for each instance of a figure environment 

\begin{document}
The student sees the score and hear the rythm dictation:

\begin{music}
\parindent0pt%
\textcolor{lightgray}%
    \resetlyrics
    \instrumentnumber{1}
    \nostartrule
    \generalmeter{\meterfrac{2}4} %Compás en 2/4
    \hsize=\musicwidth
    \nobarnumbers
    \sepbarrules%
    \startpiece% g k
    \notes\textcolor{lightgray}{\nh{cdefg}\sk\wh{gfgfg} \sk \wh{gfefgfgfedc}}\en%
    \Endpiece
 \end{music}

After that, student resolve the exercise:

 \begin{music}
    \resetlyrics
    \parindent0pt%
    \instrumentnumber{1}
    \nostartrule
    \generalmeter{\meterfrac{2}4} %Compás en 2/4
    \hsize=\musicwidth
    \nobarnumbers
    \sepbarrules%
    \startpiece%
    \notes\ibu0c3\qb0{c}\tbu0\qb0{d}\ibu0e3\qb0{e}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qp\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qp\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0e{3}\qb0{e}\tbu0\qb0{f}\en\bar%
    \notes\qu g \qu f\en\bar
    \notes\ibu0g{-3}\qb0{g}\tbu0\qb0{f}\ibu0e{-3}\qb0{e}\tbu0\qb0{d}\en\bar%
    \notes\hu c\en
    \Endpiece
 \end{music}

\end{document}

在此处输入图片描述

答案3

据我所知,您需要为虚线音符定义自己的一组字形。

常见的做法有

  • 用宽度为 0pt 的框覆盖注释,并在其中放置例如字母“X”或“+”(如果足够大)以及文本颜色,以模仿破折号
  • 例如使用 tikz、metafont 和类似软件绘制您自己的字形。

(查看 musixtex 文件了解它们如何定义和使用用于排版的音符。)

这是可以做到的,但需要付出一些努力和小心。所以我在寻找更简单的替代方案,以达到类似的效果。

例如,您可以用更浅的灰色文本颜色打印整个笔记,即根本不使用任何破折号。

相关内容