OthersMusixTeX: Extend \crescendo across bars

Information and discussion about other tools not listed above.
Post Reply
kajetandolinar
Posts: 4
Joined: Sat Apr 25, 2020 10:20 am

MusixTeX: Extend \crescendo across bars

Post by kajetandolinar »

Hi there,

I'm new to forums, but have been using LaTeX for math and MusixTeX for music for a very long time; I'm also a programmer, so you can hit me with some fancy answers as well; however, I have only a limited knowledge of TeX.

I have one problem irritating me. Namely, does anybody know any trick (or preferrably a proper MusixTeX solution) to code a crescendo hairpin (macros \crescendo, or \icresc \tcresc pair) that would extend multiple bars (would escape \notes ... \en jail) in a MusixTeX score. I can't find a way of doing this. Crescendo hairpin just always ends at the end of the bar where it was placed, and you cannot code the hairpin macros outside \notes ... \en.

Thanks for all answers ...
Kajetan
Last edited by cgnieder on Sun Apr 26, 2020 3:16 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

MusixTeX: Extend \crescendo across bars

Post by cgnieder »

I don't see a problem:

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{musixtex}

\begin{document}

\begin{music}
  \instrumentnumber{1}
  \setstaffs{1}{2}
  \generalmeter{\meterfrac44}
  \startextract
    \Notes\cmidstaff\ppp|\ca c\en
    \Notes\icresc|\ca{defgh'ab}\en\bar
    \Notes|\ca{'cde}\en
    \Notes\zmidstaff{\loff\tcresc}\cmidstaff\fff|\ca{'f}\en
  \zendextract
\end{music}

\end{document}

test.png
test.png (10.11 KiB) Viewed 15826 times
site moderator & package author
kajetandolinar
Posts: 4
Joined: Sat Apr 25, 2020 10:20 am

MusixTeX: Extend \crescendo across bars

Post by kajetandolinar »

Hi,

Thanks for your answer. I was never using MusixTeX within LaTeX. To typeset lenghty music scores, I have only ever used plain TeX, no LaTeX involved. Curiously enough, your example does not work in TeX only mode of MusixTeX, as consistent with my years old experience:

Code: Select all

\input musixtex

\instrumentnumber{1}
\setstaffs{1}{2}
\generalmeter{\meterfrac44}

\startpiece%
\Notes\cmidstaff\ppp|\ca c\en%
\Notes\icresc|\ca{defgh'ab}\en\bar%
\Notes|\ca{'cde}\en%
\Notes\zmidstaff{\loff\tcresc}\cmidstaff\fff|\ca{'f}\en%
\endpiece

\bye
On my MikTeX setup with standard MusixTeX package instalation, this gives the following output:
cresc.png
cresc.png (44.28 KiB) Viewed 15641 times
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

MusixTeX: Extend \crescendo across bars

Post by cgnieder »

My best guess is that this is a font-setup problem but since I actually never really use MusixTeX I can't really help.
site moderator & package author
kajetandolinar
Posts: 4
Joined: Sat Apr 25, 2020 10:20 am

MusixTeX: Extend \crescendo across bars

Post by kajetandolinar »

Thanks for your time. My other idea was that this may also be some MusixTeX counter or parameter setting, but I could never figure out which one exactly.

Do you know any MusixTeX related forums where people scrutinize usability or technical performance of MusixTeX specifically?
kajetandolinar
Posts: 4
Joined: Sat Apr 25, 2020 10:20 am

MusixTeX: Extend \crescendo across bars

Post by kajetandolinar »

Hi,

As an aftermath to this question, I have found a solution to this. The aforementioned problem that macros \crescendo, or \icresc \tcresc pair cannot span across bars (which is obviously not true, as pointed out by cgnieder), has nothing to do with bars but with the fact that those macros produce font-based hairpins with certain limitations such as that a font-based hairpin can only reach maximal length of about 192 points (about 68mm) and that those symbols cannot span lines. This problem is far from unknown and has been explicitly pointed out in MusixTex documentation on topic of Font-based hairpins (Section 10.7). The solution is to use type-K Postscript hairpins, as explained in section 11.6.
Post Reply