summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/musixtex/musixdoc/barlines.tex
blob: 92cd5624c773a17d065a60c1b4d1ad0a7a23b3fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
\chapter{Bar Lines}
 \section{Single, double, and invisible bar lines}\label{doublebars}
The usual macro to typeset a single bar line is \keyindex{bar}.
There is a possibility of
confusion with a command in \TeX's math mode that has exactly the same name.
However, there will generally be no problem, because inside
\verb|\startpiece...\endpiece|,
\verb|\bar| will take the musical meaning, while outside, it will have the
mathematical one.
If for some reason you need the math \verb|\bar| inside, you can use
\verb|\endcatcodesmusic...\bar...\catcodesmusic|.

To typeset a double bar line with two thin rules, use \keyindex{doublebar}. You could
also issue \keyindex{setdoublebar} to cause the next \verb|\bar| (or
\keyindex{stoppiece}, \keyindex{alaligne}, or \keyindex{alapage}) to be replaced
by a double bar.
There is no specific command to print a thin-thick double bar line, but
\keyindex{setdoubleBAR} will cause one in the same cases where
\verb|\setdoublebar| would cause a thin-thin double bar line.
To typeset a double-bar line in the middle of a bar, use \keyindex{zdoublebar}.

To make the next bar line invisible, use \keyindex{setemptybar} before
\verb|\bar|.

You can suppress the beginning vertical rule with saying \keyindex{nostartrule}
and restore the default with \keyindex{startrule} after that. Note that
it is conventional practice to omit beginning rules for single-staff music.

\section{Simple discontinuous bar lines}
Normally, bars (as well as double bars, final bars and repeat bars) are
drawn continuously from the bottom of the lowest staff of the
lowest instrument to the top of the highest staff of the uppermost
instrument. However, if desired, they can be made discontinuous between
instruments by saying \keyindex{sepbarrules}. An example of this is given in
%avrb
%{\tt ANGESCAO} (or {\tt ANGESCAM}) example; it has also been used in the
%avre
\texttt{avemaria.tex} in Section~\ref{avemaria}\label{avemaria2}.

Continuous bar lines can be restored with \keyindex{stdbarrules}. In
the extension library are some more types of bar rules, mainly for very old
music, see Section~\ref{otherbars}.

% DAS. Andre, are there some other kinds of bars in an addon?

\section{Elementary asynchronous bar lines}

 Situations may arise where the bar lines in different instruments are not
aligned with one another.  To set this up, first say \verb|\sepbarrules|.
Then use a combination of the following five commands:

\begin{itemize}\setlength{\itemsep}{0ex}
\item\keyindex{hidebarrule}\onen~hides the bar rule for instrument $n$, until
this is changed by \verb|\showbarrule|\onen.
\item\keyindex{showbarrule}\onen~stops hiding the bar rule for instrument $n$,
until this is changed by \verb|\hidebarrule|\onen.
\item\keyindex{Hidebarrule}\onen~hides the bar rule for instrument $n$, only
for the next bar.
\item\keyindex{Showbarrule}\onen~shows the bar rule for instrument
$n$ once only,
and then resets it.
%
% DAS ???
%  and then resets it to \verb|hidebarrule|.
%
\item\keyindex{showallbarrules} resets all defined instruments to
\verb|\showbarrule|\onen. This command is automatically inserted with double
bars, final bars and repeats.
\end{itemize}

Thus, this example

\begin{music}
\instrumentnumber3
\setmeter3{{\meterfrac{3}{4}}}
\setmeter2{{\meterfrac{2}{4}}}
\setmeter1{{\meterfrac{3}{8}}}
\nobarnumbers
\sepbarrules

\startextract
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\hidebarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\showbarrule2\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\showbarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\showbarrule2\hidebarrule3\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\setdoublebar
\bar\hidebarrule3
\NOtes\pt f\qa f&\qa f&\qa f\en
\Hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\message{Showbarrule3 coming}%
\Hidebarrule2\Showbarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\Hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\setrightrepeat
\endextract
\end{music}

\noindent was obtained with the following coding:
\begin{quote}\begin{verbatim}
\instrumentnumber3
\setmeter3{{\meterfrac{3}{4}}}
\setmeter2{{\meterfrac{2}{4}}}
\setmeter1{{\meterfrac{3}{8}}}
\nobarnumbers
\sepbarrules

\startextract
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\hidebarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\showbarrule2\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\showbarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\showbarrule2\hidebarrule3\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\setdoublebar
\bar\hidebarrule3
\NOtes\pt f\qa f&\qa f&\qa f\en
\Hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\message{Showbarrule3 coming}%
\Hidebarrule2\Showbarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\Hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\setrightrepeat
\zendextract
\end{verbatim}\end{quote}

\section{Dotted, dashed, asynchronous and discontinuous bar lines}\label{musixdbr}

The extension
package \href{http://icking-music-archive.org/software/musixtex/add-ons/musixdbr.tex}
{\underline{\ttxem{musixdbr.tex}}} by Rainer {\sc Dunker} provides commands for
dashed, dotted, and arbitrarily discontinuous bar lines. It supports
individual bar line settings for each instrument, multi-staff instruments,
different sizes of staves, and even different numbers of lines per staff,

To use the package, you must \verb|\input musixdbr| after \verb|musixtex|, and
execute the macro \keyindex{indivbarrules} which activates individual bar line
processing. Then the following commands are available:

\begin{itemize}\setlength{\itemsep}{0ex}

\item  \keyindex{sepbarrule}\onen~separates bar lines of instrument $n$ from those of instrument $n-1$

\item \keyindex{condashbarrule}\onen~connects bar lines of instrument $n$ to those of instrument $n-1$
   with a dashed line

\item \keyindex{condotbarrule}\onen~connects bar lines of instrument $n$ to those of instrument $n-1$
   with a dotted line

\item \keyindex{conbarrule}\onen~connects bar lines of instrument $n$ to those of instrument $n-1$

\item \keyindex{hidebarrule}\onen~hides bar lines of instrument $n$

\item \keyindex{showdashbarrule}\onen~dashes bar lines of instrument $n$

\item \keyindex{showdotbarrule}\onen~dots bar lines of instrument $n$

\item \keyindex{showbarrule}\onen~shows bar lines of instrument $n$

\item \keyindex{sepmultibarrule}\onen~separates bar lines within multistaff instrument $n$

\item \keyindex{condashmultibarrule}\onen~dashes bar lines between staves of multistaff instrument $n$

\item \keyindex{condotmultibarrule}\onen~dots bar lines between staves of multistaff instrument $n$

\item \keyindex{conmultibarrule}\onen~ shows bar lines between staves of multistaff instrument $n$

\item \keyindex{allbarrules}[\ital{any of the above commands, without numerical parameter}] sets bar
line style for all instruments together.

\end{itemize}

Dashing and dotting style may be changed by redefining the macros
\verb|\barlinedash| or \verb|\barlinedots| respectively (see original definitions in \verb|musixdbr.tex|).

Here is an example of the use of these macros:

\begin{music}
\input musixdbr

\instrumentnumber4 \setstaffs23 \setstaffs32 \setlines14\setsize2\tinyvalue
\indivbarrules
\parindent0pt\startextract
%\startpiece
%\scale{2}
  % normal barlines
  \bar
  % separate instrument 2 from 1
  \sepbarrule2
  \notes\en\bar
  % barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showbarrule
  \NOTes\en\bar
  % barlines between staves
  \allbarrules\conbarrule
  \allbarrules\conmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % dashed barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showdashbarrule
  \NOTes\en\bar
  % dashed barlines between staves
  \allbarrules\condashbarrule
  \allbarrules\condashmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % dotted barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showdotbarrule
  \NOTes\en\bar
  % dotted barlines between staves
  \allbarrules\condotbarrule
  \allbarrules\condotmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % a wild mixture of all
  \showdotbarrule1\hidebarrule2\showdashbarrule3\showbarrule4%
  \condashbarrule2\conbarrule3\condotbarrule4%
  \condashmultibarrule2\sepmultibarrule3%
  \NOTes\en\bar
  % conventional ending
  \allbarrules\showbarrule
  \allbarrules\conbarrule
  \allbarrules\conmultibarrule
  \NOTes\en\setdoubleBAR\endextract
\end{music}

This is the code:

\begin{quote}\begin{verbatim}
\input musixdbr
\instrumentnumber4\setstaffs23\setstaffs32\setlines14\setsize2\tinyvalue
\indivbarrules\parindent0pt\startextract
  % normal barlines
  \bar
  % separate instrument 2 from 1
  \sepbarrule2
  \notes\en\bar
  % barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showbarrule
  \NOTes\en\bar
  % barlines between staves
  \allbarrules\conbarrule
  \allbarrules\conmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % dashed barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showdashbarrule
  \NOTes\en\bar
  % dashed barlines between staves
  \allbarrules\condashbarrule
  \allbarrules\condashmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % dotted barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showdotbarrule
  \NOTes\en\bar
  % dotted barlines between staves
  \allbarrules\condotbarrule
  \allbarrules\condotmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % a wild mixture of all
  \showdotbarrule1\hidebarrule2\showdashbarrule3\showbarrule4%
  \condashbarrule2\conbarrule3\condotbarrule4%
  \condashmultibarrule2\sepmultibarrule3%
  \NOTes\en\bar
  % conventional ending
  \allbarrules\showbarrule
  \allbarrules\conbarrule
  \allbarrules\conmultibarrule
  \NOTes\en\setdoubleBAR\zendextract
\end{verbatim}\end{quote}