--- /dev/null
+
+
+So to answer your question about staff sizes:
+
+You're asking the wrong question.
+
+Since the 1850's music has bee blown up and shot down to any size you want.
+This is, for reasons I'll get into later, often a really bad mistake. This
+is also the reason why looking at scores and trying to measure their size,
+and then trying to make sense out to the result can be so frustrating.
+
+In real engraving, everything, and I do mean everything, is set up on a
+horizontal AND vertical grid. The real question is not how large is the
+staff, but how many spaces across.
+
+If you take the height of the staff and divide it into the length, and then
+multiply by 4 you will have the number of units on the staff. Different
+publishing houses have different engraving areas. The old Breitkopf
+classical piano format was 107 accross x 154 high. The modern piano format
+is about 119 accross. The vertical varies with the kind of music and the
+publisher. Because C.F. Peters has a horizontal engraving size of 7 3/8
+inches, there staff is 118 accross. G.Schirmer is 7 5/8 so they wind up with
+121. Score's default is 7.5 inches so you wind up with 119. This is what is
+usualy called a Rastral 3. Rastral 2 is about 107 or 108, Rastral 4 is about
+127 - 132.
+
+Rastral 3 translates in SCORE to a Code 8 P5 value of .72. This is very
+convienent since the staff is already locked on the grid (which means you
+can move the staff by intering only two digits, rather than four, or using
+the cursor arrows.
+
+In SCORE, the P5 value multiplied by .35 will give you the staff height in
+inches (FORTRAN'S default resolution is 4000 x 4000 dpi). Again divide the
+height into the satff width (7.5 inches for SCORE) and multiply by four for
+the staff width in units that are the same as the vertical space between two
+adjacent staff lines.
+
+Since the default spacing for P5=1 is five spaces between staves, and this
+(for reasons that I will never, ever understand) remains constant when the
+staff sizes is changed, if you want to lock onto the vertical grid you have
+to divide 18 by the P5 value and multiply by -1. For P5 = .72 this will give
+you a value of -25. If you set Code 8 P4 staff Nr. 2 to -25, staff one and
+two will print right on top of each other. If you set the P4 of staff Nr. 3
+to -50 all three staves will print on top of each other. And so on. This is
+very handy for engraving more than one voice on a line since the edit
+function (EDI) will always work. Otherwise it doesn't.
+
+Now this is getting too long. Think about it, and I'll answer your
+questions. Don't look for any of this in the manuals, it isn't there.
+
+To close up, the trouble with reducing and enlarging is that, as
+typographers figured out in the 16th century, when you change the size of a
+font, the shapes of the symbols have to change too. A nice fat serif in 72
+points will dissapear if the symbol is reduced to 7 points. SCORE's font
+isn't too bad around Rastral 5. Otherwise it needs help. If you look at good
+engraving in SCORE you will notice that different engravers have their own
+symbol libraries. A real music engraving program would have to have a least
+8 different sets of symbols. Which is a bit of work.
+
+george mcguire
+
+****
+
+
+There isn'y really anything usefull written by high quality engraving. The
+reason is simple - the whole system was based on apprenticeship, and if you
+want to sell it, you can't give it away.
+
+Also engravers don't tend to be very verbal. The one great teacher I had,
+Walter Boelke who apprenticed at Roeder and became the chief engraver at
+G.Schirmer in New York, never told me anything. But he would sit next to me
+and grunt when I did something right.
+
+
+*******
+
+
+>
+>My best reference (Wanske) says that Rastral are fixed sizes of
+>staffs, so you are saying that the staff lengths come in fixed sets as
+>well.
+>
+
+The sizes were fixed for the publisher she was working for (Schott), which
+are very close to Breitkopf.
+But the Roeder sizes were different. There is a long history behind this -
+starting with the fact that the first German engraving workshop (methods,
+machinery, tools and engravers) was imported from England (?).
+
+
+******
+
+>If I understand you correctly, you are saying that the scaleable part
+>of msuic isn't so much the height, but how many symbols you can cramp
+>onto one line, and how many lines (systems) on one page. Or do you
+>mean that I should not be thinking in "dimensions" but "ratios".
+>
+
+Yes, basically the rations are what is important. The horizontal size was
+dependent on the piece of metal.
+On the other hand metal was expensive and the sizes and layout had
+everything to do with how much you could cram on a page.
+
+****
+
+That's okay as far as it goes. But if you look at different size noteheads
+you will notice that they are ovals, and that the angles from the horizontal
+of the main axises change with the size. Of course this is something Tex
+deals with easily and well.
+
+****
+
+Table from Wanske:
+
+
+16.5 15.5 14.5 13.5 12 11.5 9
+143 12 11 10 9 8.5 7
+11 10 9 8 7 6.5 5
+
+
CONTENTS is copied into the TeX source enclosed in a verbatim block.
dit(11pt, 13pt, 16pt, 20pt, 26pt)
set the fontsize to use for the music
+dit(singleline)
+ linewidth = -1.
+dit(multiline)
+ linewidth = textwidth
dit(fragment)
dit(nonfragment)
Override mudela-book autodetection of what type of code is in the
Ignores almost all LaTeX commands that changes margins and linewidths.
-file(\begin{verbatim}) is ignored.
manpageauthor()
nemail(Han-Wen Nienhuys)(hanwen@cs.uu.nl), lurl(http://www.cs.uu.nl/people/hanwen)
\subsection{Tangent method correction}
A somewhat more elaborate\footnote{While staying in the realm
-of emperic computer science} way of having a slur avoid
+of empiric computer science} way of having a slur avoid
disturbing notes is by first defining the slur's ideal shape
and then using the height correction. The ideal shape of a
slur can be guessed by calculating the tangents of the disturbing
\usepackage[rflt]{floatflt}
%\usepackage{showframe}
%\sloppy
-\def\postMudelaExample{\setlength{\parindent}{1em}}
+\def\postMudelaExample{\setlength{\parindent}{3.25ex}}
\title{Mudela-book tutorial}
\begin{document}
\maketitle
will make the music as short as possible but without breaking the
line. Here is a well know harmonic progression:
\begin{mudela}[veryverbatim, intertext="produce a well known harmonic progression:"]
-\context Voice { <c' e' g'> <b d' g'> <c'2 e' g'>}
+ <c' e g> <b d g> <c2 e g>
\end{mudela}
If you want to place music examples in the text,
\begin{mudela}[eps]
-\context Voice { <c' e' g'> <b d' g'> <c'2 e' g'>}
+ <c' e g> <b d g> <c2 e g>
\end{mudela}
, you can use the \verb|eps| option. This will create the music as
eps graphics and include it into the document with the
The code used look like this:
\begin{verbatim}
\begin{mudela}[eps]
-\context Voice { <c' e' g'> <b d' g'> <c'2 e' g'>}
+ <c' e g> <b d g> <c2 e g>
\end{mudela}
\end{verbatim}
environment.
You can also use \verb|mudelafile| (on a separate line, FIXME), to
-include another file.
+include another file. Files with name ending with \verb|.sly|
\mudelafile{testje.fly}
\section{Fontsize options}
You can use all lilypond fontsizes in mudela-book.
% LONG line just to test multiple \mudela on one line
-The default 16pt fontsize, \mudela{<c' e' g'>}, is probably to big to be included in the middle of the text. 11pt, \mudela[11pt]{<c' e' g'>} or 13pt, \mudela[13pt]{<c' e' g'>} is probably better.
+The default 16pt fontsize, \mudela{<c' e g>}, is probably to big to be included in the middle of the text. 11pt, \mudela[11pt]{<c' e g>} or 13pt, \mudela[13pt]{<c' e g>} is probably better.
The code can look like this:
\begin{verbatim}
\begin{mudela}[13pt, eps]
-<c' e' g'>
+<c' e g>
\end{mudela}
\end{verbatim}
\section{User defined commands}
There is an even shorter way to write small musical fragments. This
-triad, \mudela{<c' e' g'>}, was created with this code:
-\verb|\mudela{<c' e' g'>}|
+triad, \mudela{<c' e g>}, was created with this code:
+\verb|\mudela{<c' e g>}|
Mudela-book defines the \verb|\mudela| command, and let you define
your own commands in a file specified by
}
\end{mudela}
+\section{More options}
+\begin{itemize}
+\item The \verb|singleline| option set \verb|linewidth| to -1.0.
+\item The \verb|multiline| option set \verb|linewidth| to a value letting
+the music be aligned to the right margin. The music can span several
+lines.
+\end{itemize}
+
\section{Just in case...}
The options \verb|fragment| and \verb|nonfragment| will override
-mudela-book when it scans the mudela code to see if it is staff
+mudela-book when it scans the mudela code to see if it is voice
contents or complete code. This might be useful if mudela-book choose
wrong.
This was all options to \verb|\begin{mudela}|. The rest of the
document will show some ways you can use mudela in
\LaTeX~documents. It will also act as a simple test-suite for
-mudela-book. You \marginpar{
+mudela-book. You
+\marginpar{
marginpar!
\begin{mudela}[eps, 11pt]
\relative c'' {\key c \minor; r4 [g8 g g] es2}
\hline
dur &
-\begin{mudela}[eps]
-\context Voice {<c' e' g'>}
+\begin{mudela}[eps, fragment]
+<c' e g>
\end{mudela}
\\
\hline moll &
\begin{mudela}[eps]
-\context Voice {<c' ees' g'>}
+<c' es g>
\end{mudela}
\\
\hline forminsket &
\begin{mudela}[eps]
-\context Voice {<c' es' ges'>}
+<c' es ges>
\end{mudela}
\\
\hline forstørret &
\begin{mudela}[eps]
-\context Voice {<c' e' gis'>}
+<c' e gis>
\end{mudela}
\\
\hline
increased between the lines where you have music printed with the
smallest font size.
-Since the version number is low, you should be careful not to
+Since the version number is quite low, you should be careful not to
mix braces that belongs to mudela-book and \LaTeX~on the same
line. The following code will probably break:
environment when you don't want \LaTeX~to do any linebreaking)
+\end{document}
+
+
+
+
-\end{document}
mudela(fragment,verbatim,center)(
r1 r1*3 R1*3
)
-If you set the code(Score.SkipBars) property, then only one measure will be
+If you set the code(Score.skipBars) property, then only one measure will be
printed; with code(R), a number indicating the length of the rest will be
displayed.
mudela(fragment,verbatim,center)(
-\property Score.SkipBars=1
+\property Score.skipBars=1
r1 r1*3 R1*3
)
Even though the code(\times) command is not explicit, it is still
Normally you should use the more user friendly abbreviations defined
in the init file file(dynamic.ly).
+FIXME: Changed to code(\textscript) var(text) var(style). Defines
+a text-request.
+
dit(code(\accepts) var(string)code(;)) This keyword can appear only within a
code(\translator) block. It specifies what contexts are allowed with the
context that is being defined. See Section ref(translators).
printed. It works in Note Mode or Lyrics Mode (but generates a
mysterious error in lyrics).
+OBSOLETE
+
dit(code(\spandynamic) code({) var(kind) var(toggle) code(})) Internal
keyword for crescendo and decrescendo symbols. The first parameter
var(kind) is set to 1 for a crescendo and -1 for a decrescendo. The
Users should use the abbreviations which are defined in the
initialization file file(dynamic.ly).
+FIXME:
+
+code(\spanrequest) var(startstop) var(type). Define a
+spanning request var(startstop) is either -1 (start) or 1
+(stop). var(type) is a string that describes what should be started.
+Supported types are "crescendo", "decrescendo", "beam", "slur".
+
dit(code(\tempo) var(duration) = var(perminute)code(;)) Used within
code(\midi) or within music to specify the tempo. For example,
`code(\midi { \tempo 4 = 76;})' requests output with 76 quarter notes
}
)
-dit(code("midi_instrument")) Sets the instrument for MIDI output. This
+
+dit(code(restStyle)) Change the layout of rests shorter than quarter notes.
+Currently, the standard layout code(restStyle="") and mensural notation
+code(restStyle="mensural") are available.
+
+dit(code("midiInstrument")) Sets the instrument for MIDI output. This
property name must be quoted because of the embedded underscore. If
this property is not set then LilyPond will use the code(instrument)
property. This must be set to one of the strings on the list of MIDI
dit(code(textScriptPadding)) Determines the extra space added between
super-/subscripted text and the closest staff line or note.
-dit(code(fontsize)) Can be used to select smaller font sizes for
+dit(code(fontSize)) Can be used to select smaller font sizes for
music. The normal font size is 0, and the two smaller sizes are -1
and -2.
+dit(code(abbrev)) Set length for tremolo to be used if no length is
+explicitly specified.
+
GONE dit(code(markScriptPadding)) Determines the extra space added between
the mark and the closest staff line or note.
is added to the Staff translator, then the code(instrument) property
is used to label the first line of the staff and the code(instr)
property is used to label subsequent lines. If the
-code(midi_instrument) property is not set then code(instrument) is
+code(midiInstrument) property is not set then code(instrument) is
used to determine the instrument for MIDI output.
COMMENT(This prints the instrument name on top of the staff lines.)
-dit(code(abbrev)) Set length for tremolo to be used if no length is
-explicitly specified.
-
dit(code(createKeyOnClefChange)) Set to a nonempty string if you want key
signatures to be printed when the clef changes. Set to the empty string (the
default) if you do not want key signatures printed.
}
)
-dit(code(restStyle)) Change the layout of rests shorter than quarter notes.
-Currently, the standard layout code(restStyle="") and mensural notation
-code(restStyle="mensural") are available.
-
dit(code(clefStyle)) Determines how clefs are typeset. When set to
code(transparent), the clefs are not printed at all, when set to
code(fullSizeChanges), clef changes in the middle of a line are
description(
-dit(code(SkipBars)) Set to 1 to skip the empty bars that are produced
+dit(code(skipBars)) Set to 1 to skip the empty bars that are produced
by multimeasure notes and rests. These bars will not appear on the
printed output. Set to zero (the default) to expand multimeasure
notes and rests into their full length, printing the appropriate
dit(var(integer)) If an integer appears on the left side of an
assignment then a code(\font) keyword must appear on the right
side. This defines a music font at a particular size. See Voice
-property code(\fontsize).
+property code(fontSize).
dit(code(arithmetic_basicspace) and code(arithmetic_multiplier))
The space taken by a note is determined by the formula
subsect(MIDI Instrument Names)
label(midilist)
-The MIDI instrument name is set by the code(Staff."midi_instrument")
+The MIDI instrument name is set by the code(Staff."midiInstrument")
property or, if that property is not set, the code(Staff.instrument)
property. The instrument name should be chosen from this list. If
string does not exactly match one from this list then LilyPond uses
piece = "1. Overture";
}
-\version "1.0.16";
+\version "1.0.19";
global=\notes{
\time 2/2;
-\version "1.0.16";
+\version "1.0.19";
scales = \notes\transpose c''{
f2 f f f f f f f f f\break
-\version "1.0.16";
+\version "1.0.19";
one = \notes\relative c{
c'' d e f
\context ChordNames \chords{
\property Score.chordInversion = 1
\property Score.barAtLineStart = 1
- \repeat 2 {
+ \repeat semi 2 {
f1-maj f-maj f-7 bes-7
c-maj c-maj es es
d-7 g-7 b2-7/fis e-7 a1-7\break
}
}
-\version "1.0.16";
+\version "1.0.18";
-\version "1.0.16";
+\version "1.0.19";
blah = \notes {
Tested Features: example file with comments
%}
-\version "1.0.16";
+\version "1.0.19";
% the % is a comment.
\key g;
\time 3/8;
<
- \dynamics
- \repeat 2 { s4.*8 }
+ \dynamics
+ s4. * 8
+ s4. * 8
+ % \repeat semi 2 { s4.*8 }
>
}
-\version "1.0.16";
+\version "1.0.19";
part = \notes {
c-1 c c c
r1*3
% \lbheel \lbheel \lfheel \lftoe
% \rbheel \rbtoe \rfheel \rftoe
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes {
* organ staff...
%}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
ritme = \notes\transpose c'' {
\time 4/4;
% scales with accents.
%
-\version "1.0.16";
+\version "1.0.19";
blah = \notes {
\time 6/8;
\transpose c {
-\version "1.0.16";
+\version "1.0.19";
blah = \notes{ \transpose c'' {
$staff1_voice_1 = \notes {
a8.()fis16
- \repeat 2 { d4 fis4 a4 d'2 fis'8. e'16 d'4 fis4 gis4 a2 a8 a8
+ \repeat semi 2 { d4 fis4 a4 d'2 fis'8. e'16 d'4 fis4 gis4 a2 a8 a8
fis'4. e'8 d'4 cis'2 b8. cis'16 d'4 d'4 a4 }
\alternative { { fis4 d4 a8. fis16 } { fis4 d4 fis'8. fis'16 } }
fis'4 g'4 a'4 a'2 g'8 fis'8 e'4 fis'4
g'4 g'2 g'4 fis'4. e'8 d'4 cis'2 b8. cis'16 d'4 fis4 gis4 a2 a4
d'4 d'4 d'8()cis'8 b4 b4 b4 e'4 g'8 ()fis'8 e'8()d'8
- d'4~cis'4 a8. a16 d'4.~e'8 fis'8 g'8 a'2 d'8 e'8 fis'4. g'8
+ d'4()cis'4 a8. a16 d'4.()e'8 fis'8 g'8 a'2 d'8 e'8 fis'4. g'8
e'4 d'2 s4
}
$staff1_voice_2 = \notes {
a8.()fis16
- \repeat 2 { a,4 d4 e4 d4~fis4 fis8. fis16 fis4 d4 d4 cis2
+ \repeat semi 2 { a,4 d4 e4 d4 () fis4 fis8. fis16 fis4 d4 d4 cis2
e8 e8 a4. a8 a4 a2 a8. a16 a4 a4 a4 }
\alternative { { fis4 d4 a8. fis16 } { fis4 d4 r4 } }
a4 a4 d'4 d'2 a8 a8 cis'4 cis'4 cis'4 cis'2 a4 a4. a8 a4 a2
a8. a16 d4 d4 d4 cis2 e4 fis4 e4 d4 d4 d4 dis4 g4 g8()dis8 e4 e2
- e8. e16 d4.~a8 a8 a8 a2 g8 g8 a4. a8 g4 fis2 s4
+ e8. e16 d4.()a8 a8 a8 a2 g8 g8 a4. a8 g4 fis2 s4
}
$staff2_voice_1 = \notes {
r4
- \repeat 2 { fis4 a4 a4 b2 cis'8. cis'16 b4 b4 b4 a2 cis'8 cis'8
+ \repeat semi 2 { fis4 a4 a4 b2 cis'8. cis'16 b4 b4 b4 a2 cis'8 cis'8
d'4. cis'8 d'4 e'2 e'8. e'16 d'4 d'4 a4 }
\alternative { { fis4 d4 r4 } { fis4 d4 r4 } }
d4 e4 fis4 fis'2 e'8 d'8 e'4 e'4 e'4 e'2 cis'4 d'4. cis'8 d'4 e'2
e'8. e'16 a4 a4 e4 e2 cis'4 a4 a4 a4 g4 g4 b4 b4 b4 b4 a2
- cis'8. cis'16 a4.~cis'8 d'8 d'8 d'2 d'8 d'8 d'4. d'8 cis'4
+ cis'8. cis'16 a4.()cis'8 d'8 d'8 d'2 d'8 d'8 d'4. d'8 cis'4
a2 s4
}
$staff2_voice_2 = \notes {
r4
- \repeat 2 { d4 d4 cis4 b,2 ais,8. ais,16 b,4 b,4 e4 a,2 a8 a8
+ \repeat semi 2 { d4 d4 cis4 b,2 ais,8. ais,16 b,4 b,4 e4 a,2 a8 a8
d4. e8 fis8 g8 a2 g8. g16 fis4 fis4 a4 }
\alternative { { fis4 d4 r4 } { fis4 d4 r4 } }
d4 d4 d4 d2 d8 d8 a4 a4 a4 a2 a,4 d4. e8 fis8 g8 a2 g8. g16
fis4 d4 e4 a,2 a4 d4 e4 fis4 g4 g4 fis4 e4 e8()fis8 g8()gis8 a2
- g8. g16 fis4.~a,8 d8 e8 fis2 b8 b8 a4. a8 a,4 d2 s4
+ g8. g16 fis4.()a,8 d8 e8 fis2 b8 b8 a4. a8 a,4 d2 s4
}
text = \lyrics
-\context LyricVoice { Oh4 __ \repeat 2 { }
- \alternative <
- { say. can you see,2 by8. the16 dawn's4 ear- ly light2 What8
+ { Oh4 __ \repeat fold 2 { }
+ \alternative {
+ { say.4 can you | see,2 by8. the16 dawn's4 ear- ly light2 What8
so8 proud-4. ly8 we4 hailed,2 At8. the16 twi-4 light's last gleam-
ing. Whose8. broad16 }
- \context LyricVoice = LVB
{ stripes4 and bright stars,2 through8. the16 per-4 il- ous fight,2
O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly }
- >
+ }
stream-4 ing. And8. the16 rock-4 ets' red glare,2 the8 bombs8
burst-4 ing in air,2 gave4 proof4. through8 the4 night2 that8.
our16 flag4 was still there,2 Oh4 say, does that star- span-
\notes \transpose c'' {\voiceone \$staff1_voice_1 }
\notes \transpose c'' {\voicetwo \$staff1_voice_2 }
>
- \context Lyrics = one \text
- \context Staff=staffB <
+ \context LyricVoice \text
+ \context Staff=staffB <
+
\global
\clef bass;
\property Staff.voltaVisibility = "0"
\GrandStaffContext
\accepts "Lyrics";
}
- \translator {
- \BarNumberingStaffContext
- }
+% castingalgorithm = \Wordwrap;
}
+ \midi {}
}
-\version "1.0.16";
+\version "1.0.18";
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes \transpose c'''{
\stemup
}
}
-\version "1.0.16";
+\version "1.0.19";
}}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
onestaff = \context Staff = foo\notes {
\property Staff.instr = instr
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes\transpose c'{
}
}
-\version "1.0.16";
+\version "1.0.19";
}
}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes\transpose c''{
TestedFeatures = "beams and beamflags";
}
-\version "1.0.16";
+\version "1.0.19";
\score{
<
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.16";
+\version "1.0.19";
shortlong = \notes{
c4()c( c c |
>
}
-\version "1.0.16";
+\version "1.0.19";
}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
%{
Would this be acceptable/good enough/convenient for entry?
-\version "1.0.16";
+\version "1.0.19";
\score {
\notes{
copyright = "public domain";
Tested = "test the Collision resolution ";
}
-\version "1.0.16";
+\version "1.0.19";
twovoice = \context Staff \notes <
\context Voice=i { \stemdown c4 d e f g2~ g4 a [c8 d e f] c2| }
-\version "1.0.16";
+\version "1.0.19";
\score {
\include "paper20.ly"
-\version "1.0.16";
+\version "1.0.19";
oden = \lyrics{
O8 |
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes{
>
}
-\version "1.0.16";
+\version "1.0.19";
}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes \relative c {
-\version "1.0.16";
+\version "1.0.19";
FontBody= \notes\transpose c''{
\bar "|:";
c4 g c' a' \bar ":|";
a\ppp-\upbow a\pp-\downbow a\p^\turn a\mp^\fermata |
a\mf_\fermata a\f-\stopped a\ff-\open a\fff^\trill|
- a\fp-\reverseturn a4.\sf a4.\sfz | a\fz % a\rf
+ a\fp-\reverseturn a4.\sf a4.\sfz | a4\fz % a\rf
[c8-\prall c-\mordent] [a'-\prallmordent a'-\prallprall]
- [c-\upprall a'-\downprall] [a' c] |
+ [c8-\upprall a'8-\downprall] [a' c] |
[c \< d e f] [as' ges' f' e']
[cis' dis' c' des'] [cisis' disis' \! ceses' deses'] |
\clef "bass";
% "(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.16";
+\version "1.0.19";
\include "font-body.ly"
\score{
% "(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.16";
+\version "1.0.19";
\include "paper16.ly"
\include "font-body.ly"
gourlay_maxmeasures =5.;
}
}
-\version "1.0.16";
+\version "1.0.19";
TestedFeatures = "This file tests some nasty Gourlay spacings";
}
-\version "1.0.16";
+\version "1.0.19";
%{
-\version "1.0.16";
+\version "1.0.19";
\score{
<
-\version "1.0.16";
+\version "1.0.19";
toeter_i = \notes\relative c <{
\property Staff.instrument = "Toeters"
/Mats B
%}
-\version "1.0.16";
+\version "1.0.19";
incipit = \notes\relative c'{
<b1 fis' b d>
-\version "1.0.16";
+\version "1.0.19";
%{
test key itemv breaking
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes\relative c'{
[c16 \stemdown c'' \stemboth c,, d]
-\version "1.0.16";
+\version "1.0.19";
global = \notes {
s1 | \mark "A";
>
\paper { Gourlay_maxmeaures = 2.; }
}
-\version "1.0.16";
+\version "1.0.19";
\score { \notes { \time 3/4; \key cis; R2. R2.*5 }
\paper {
- \translator { \ScoreContext SkipBars = 1; }
+ \translator { \ScoreContext skipBars = 1; }
linewidth = -1.;
}
}
-\version "1.0.16";
+\version "1.0.19";
voice_one = \notes\transpose c''{ \stemup
R1 * 2 | f'4-. r r2 | R1 * 3 |
f'4-. r r2 | R1 * 3 |
es'4-. r r2 | r1 |
- \property Score.SkipBars = 1
+ \property Score.skipBars = 1
g4-. r r2 | g4-. r r2 |
R1 * 5 |
r2 r4 g4-. |
R1 * 2 | f'4-. r r2 | R1 * 3 |
f'4-. r r2 | R1 * 3 |
es'4-. r r2 | r1 |
- \property Score.SkipBars = 1
+ \property Score.skipBars = 1
g4-. r r2 | g4-. r r2 |
R1 * 5 |
r2 r4 g4-. |
}
}
}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes \transpose c''{
-\version "1.0.16";
+\version "1.0.19";
m = \notes \relative c''{
c1 | c2 c | c c | c c | c c | c c | c c | c c |
-\version "1.0.16";
+\version "1.0.19";
\score {
<
\context Staff \notes\relative c'{
c d e f
- \repeat 2 { g a b c }
+ \repeat semi 2 { g a b c }
\alternative { { c b a g } { f e d c } }
}
\context Lyrics \lyrics {
De eer- ste < { maat } { moet } >
- \repeat 2 { }
- \alternative <
+ \repeat fold 2 { }
+ \alternative {
{ en dan twee keer }
{ een koe- plet _ }
- >
+ }
en dan nog dit er ach- ter aan
}
>
}
}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
onestaff = \context Staff = foo\notes {
\property Staff.instr = instr
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.16";
+\version "1.0.19";
shortlong = \notes{
c4()c( c c |
-\version "1.0.16";
+\version "1.0.19";
% bug
% excentric slur can't handle this ...
% test damping
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes\relative c'{
}
}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
% urg, the direction of the slur gets swapped!
\score{
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes\transpose c'{
}
}
-\version "1.0.16";
+\version "1.0.19";
TestedFeatures = "This file tests various spacings";
}
-\version "1.0.16";
+\version "1.0.19";
multipart = \notes \relative c'{
\context StaffGroup <
-\version "1.0.16";
+\version "1.0.19";
nt = \notes { c1 \break c1 c1 }
stuff = \notes \relative c'' <
\context Staff = stone { \nt }
-\version "1.0.16";
+\version "1.0.19";
\score {
}
-\version "1.0.16";
+\version "1.0.19";
--- /dev/null
+\score {
+ \notes \relative c' < \context Voice {
+ \property Staff.staffLineLeading = "4"
+ \property Staff.fontSize = "-1"
+ \property Voice.fontSize = "-1"
+
+ \property Voice . dynamicDir = \up \stemdown
+%\key gis;
+ c8 d [e f g a] b c \ff
+ }
+
+\context Staff = VB { \property Voice . dynamicDir = \down c,,4 \ff c c c }
+
+>
+\paper { linewidth = -1.; }
+}
+\version "1.0.19";
}
-\version "1.0.16";
+\version "1.0.19";
beamintervals = \notes{
\time 7/4;
instrument= "Violoncello";
}
-\version "1.0.16";
+\version "1.0.19";
% this is an example of extreme dynamics
-\version "1.0.16";
+\version "1.0.19";
$somewhat_long = \lyrics{
\property Lyrics . textstyle = "roman"
% the thumb-script is used in cello music to indicate a note that should
% be played with your thumb.
-\version "1.0.16";
+\version "1.0.19";
\score { \notes \relative c'' {
[<a8_\thumb a'8-3(> <)b_\thumb b'-3>
-\version "1.0.16";
+\version "1.0.19";
% middle tie is wrong
-\version "1.0.16";
+\version "1.0.19";
tie = \notes\transpose c''{
instrument= "Instrument";
}
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes
}
-\version "1.0.16";
+\version "1.0.19";
vOne = \notes \relative c''{
\clef"violin";
}
}
-\version "1.0.16";
+\version "1.0.19";
{\voicetwo c}>
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
\score {
\notes <
}
}
-\version "1.0.16";
+\version "1.0.19";
}
}
-\version "1.0.16";
+\version "1.0.19";
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.16";
+\version "1.0.19";
\score{
\notes{
Tested Features lyrics and chords
%}
-\version "1.0.16";
+\version "1.0.19";
melodie = \notes\relative c'' {
\clef "violin";
Tested Features: lyrics, interleaving lyrics and staffs, repeats
%}
-\version "1.0.16";
+\version "1.0.18";
melody = \notes \relative c'' {
\clef violin;
\score{
<
- \context Staff=i \repeat 2 < \global\melody >
- \context Lyrics=top \repeat 2 {} \alternative < \tekst \texte >
+ \context Staff=i \repeat semi 2 < \global\melody >
+ \context Lyrics=top \context LyricVoice \repeat semi 2 {} \alternative < \tekst \texte >
\context GrandStaff <
- \context Staff=ii \repeat 2 < \global\melody >
- \context Staff=iii \repeat 2 < \global\accompany >
+ \context Staff=ii \repeat semi 2 < \global\melody >
+ \context Staff=iii \repeat semi 2 < \global\accompany >
>
- \context Lyrics=bottom \repeat 3 {}
+ \context Lyrics =bottom \context LyricVoice \repeat semi 3 {}
\alternative < \texti \textii \textiii >
>
\paper{
#include <assert.h>
#include "proto.hh"
-#include "plist.hh"
#include "string.hh"
#include "source-file.hh"
#include "binary-source-file.hh"
(c) 1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+
+ UGH. Duration is broken.
*/
#include <assert.h>
+
#include "proto.hh"
-#include "plist.hh"
#include "string.hh"
#include "source-file.hh"
#include "source.hh"
#include "string.hh"
#include "proto.hh"
-#include "plist.hh"
#include "warn.hh"
#include "thank-you-cygnus.hh"
#include "source-file.hh"
+#if 0
+
/*
abbreviation-beam-engraver.cc -- implement Abbreviation_beam_engraver
if (!b)
return false;
- if (bool (abeam_p_) == bool (b->spantype_ == START))
+ if (bool (abeam_p_) == bool (b->span_dir_ == START))
return false;
Direction d = (!abeam_p_) ? LEFT : RIGHT;
abeam_p_->add_stem (s);
}
+
+#endif
-#include "pointer.hh"
+
#include "main.hh"
#include "all-fonts.hh"
#include "debug.hh"
const char * default_font_sz_ = "cmr10";
-
-
All_font_metrics::All_font_metrics (String path)
{
search_path_.parse_path (path);
}
-
Adobe_font_metric *
All_font_metrics::find_afm (String name)
{
void
Auto_beam_engraver::end_beam ()
{
- DOUT << String ("ending autobeam at: ") + now_mom ().str () + "\n";
if (stem_l_arr_p_->size () < 2)
{
- DOUT << "junking autombeam: less than two stems\n";
junk_beam ();
}
else
typeset_beam ();
if (stem_l_arr_p_ && stem_l_arr_p_->size ())
{
- DOUT << "Unfinished beam\n";
junk_beam ();
}
}
{
if (stem_l_arr_p_)
{
- DOUT << "junking autobeam: beam encountered\n";
junk_beam ();
}
}
{
if (stem_l_arr_p_)
{
- DOUT << "junking autobeam: bar encountered\n";
junk_beam ();
}
}
if (dynamic_cast<Rest *> (info.elem_l_))
{
- DOUT << "junking autobeam: rest encountered\n";
end_beam ();
return;
}
if (stem_l->beam_l_)
{
- DOUT << "junking autobeam: beamed stem encountered\n";
junk_beam ();
return;
}
*/
if (rhythmic_req->duration_.durlog_i_ <= 2)
{
- DOUT << "ending autobeam: stem doesn't fit in beam\n";
end_beam ();
return;
}
Moment start = get_staff_info().time_C_->whole_in_measure_;
if (!grouping_p_->child_fit_b (start))
{
- DOUT << "ending autobeam: stem doesn't fit in group\n";
end_beam ();
}
else
if ((extend_mom_ < now)
|| ((extend_mom_ == now) && (last_add_mom_ != now )))
{
- DOUT << String ("junking autobeam: no stem added since: ")
- + last_add_mom_.str () + "\n";
end_beam ();
}
else if (!stem_l_arr_p_->size ())
{
- DOUT << "junking started autobeam: no stems\n";
junk_beam ();
}
}
#include "command-request.hh"
#include "time-description.hh"
#include "engraver-group.hh"
-#include "repeated-music.hh"
Bar_engraver::Bar_engraver()
{
bool
Beam_engraver::do_try_music (Music *m)
{
- if (Beam_req * c = dynamic_cast<Beam_req*>(m))
+ if (Span_req * c = dynamic_cast<Span_req*>(m))
{
- Direction d =c->spantype_;
+ if (c->span_type_str_ != "beam")
+ return false;
+
+ Direction d =c->span_dir_;
if (d == STOP && !beam_p_)
{
return b && type_str_ == b->type_str_;
}
-
-
-
-
-
void
Bar_req::do_print() const
{
#endif
}
-
Bar_req::Bar_req (String s)
{
type_str_ = s;
return p&& p->length_mom_ == length_mom_;
}
-
-
bool
Barcheck_req::do_equal_b (Request*r) const
{
Crescendo * to_end_cresc_p_;
Crescendo * cresc_p_;
- Span_dynamic_req * cresc_req_l_;
- Array<Dynamic_req*> dynamic_req_l_arr_;
+ Span_req * cresc_req_l_;
+ Array<Request*> dynamic_req_l_arr_;
void typeset_all ();
public:
VIRTUAL_COPY_CONS(Translator);
}
bool
-Dynamic_engraver::do_try_music (Music * r)
+Dynamic_engraver::do_try_music (Music * m)
{
- if(Dynamic_req * d = dynamic_cast <Dynamic_req *> (r))
+ Request * r = dynamic_cast<Request*> (m);
+
+ if(Text_script_req * d = dynamic_cast <Text_script_req *> (r))
{
- for (int i=0; i < dynamic_req_l_arr_.size (); i++)
- if (d->equal_b (dynamic_req_l_arr_[i]))
- return true;
-
- dynamic_req_l_arr_.push (d);
- return true;
+ if (d->style_str_ != "dynamic")
+ return false;
+ }
+ else if (Span_req * s = dynamic_cast <Span_req*> (r))
+ {
+ if (s-> span_type_str_ != "crescendo"
+ && s->span_type_str_ != "decrescendo")
+ return false;
}
- return false;
+ else
+ return false;
+
+ for (int i=0; i < dynamic_req_l_arr_.size (); i++)
+ if (r->equal_b (dynamic_req_l_arr_[i]))
+ return true;
+
+ dynamic_req_l_arr_.push (r);
+ return true;
}
+
+
void
Dynamic_engraver::do_process_requests()
{
Crescendo* new_cresc_p=0;
for (int i=0; i < dynamic_req_l_arr_.size(); i++)
{
- Dynamic_req *dreq_l = dynamic_req_l_arr_[i];
- if (Absolute_dynamic_req *absd = dynamic_cast<Absolute_dynamic_req *> (dreq_l))
+ if (Text_script_req *absd =
+ dynamic_cast<Text_script_req *> ( dynamic_req_l_arr_[i]))
{
if (text_p_)
{
continue;
}
- String loud = absd->loudness_str_;
+ String loud = absd->text_str_;
text_p_ = new G_text_item;
text_p_->text_str_ = loud; // ugh
}
- announce_element (Score_element_info (text_p_, dreq_l));
- announce_element (Score_element_info (staff_side_p_, dreq_l));
+ announce_element (Score_element_info (text_p_, absd));
+ announce_element (Score_element_info (staff_side_p_, absd));
}
- else if (Span_dynamic_req *span_l
- = dynamic_cast <Span_dynamic_req *> (dreq_l))
+ else if (Span_req *span_l
+ = dynamic_cast <Span_req *> (dynamic_req_l_arr_[i]))
{
- if (span_l->spantype_ == STOP)
+ if (span_l->span_dir_ == STOP)
{
if (!cresc_p_)
{
}
}
- else if (span_l->spantype_ == START)
+ else if (span_l->span_dir_ == START)
{
cresc_req_l_ = span_l;
assert (!new_cresc_p);
new_cresc_p = new Crescendo;
- new_cresc_p->grow_dir_ = span_l->dynamic_dir_;
+ new_cresc_p->grow_dir_ = (span_l->span_type_str_ == "crescendo") ? BIGGER : SMALLER;
announce_element (Score_element_info (new_cresc_p, span_l));
}
}
void
Font_size_engraver::do_process_requests ()
{
- Scalar s (get_property ("fontsize", 0));
+ Scalar s (get_property ("fontSize", 0));
if (s.length_i () && s.isnum_b ())
{
#include "drul-array.hh"
class Beam_engraver : public Engraver {
- Drul_array<Beam_req*> reqs_drul_;
+ Drul_array<Span_req*> reqs_drul_;
Beam *finished_beam_p_;
Beam *beam_p_;
- Beam_req * prev_start_req_;
+ Span_req * prev_start_req_;
Rhythmic_grouping*grouping_p_;
Rhythmic_grouping*finished_grouping_p_;
VIRTUAL_COPY_CONS(Music);
};
-class Bracket_req : public Span_req {
-
-public:
- VIRTUAL_COPY_CONS(Music);
-};
-
#endif // COMMANDREQUEST_HH
--- /dev/null
+/*
+ folded-repeat-iterator.hh -- declare Folded_repeat_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef FOLDED_REPEAT_ITERATOR_HH
+#define FOLDED_REPEAT_ITERATOR_HH
+
+#include "music-iterator.hh"
+
+/**
+ Iterate through a repeated section: first do the body, then
+ all alternatives in parallel.
+ */
+class Folded_repeat_iterator : public Music_iterator
+{
+ Music_iterator * main_iter_p_;
+ Music_iterator * alternative_iter_p_;
+ int count_;
+ Moment main_length_mom_;
+public:
+ Folded_repeat_iterator ();
+ ~Folded_repeat_iterator ();
+
+ virtual void construct_children ();
+ virtual Moment next_moment () const;
+ virtual bool ok () const;
+
+protected:
+ void enter_alternative ();
+ void leave_body ();
+
+ virtual void do_print () const;
+ virtual void do_process_and_next (Moment);
+};
+#endif /* FOLDED_REPEAT_ITERATOR_HH */
+
struct Note_head;
struct Note_head_engraver;
struct Notename_table;
+struct New_repeated_music;
+struct Unfolded_repeat_iterator;
+struct Folded_repeat_iterator;
struct Offset;
struct Paper_column;
struct Paper_def;
extern int default_count_global;
extern All_font_metrics *all_fonts_global_p;
-
+class ostream;
+void print_mudela_versions (ostream &os);
#endif
protected:
Music const * music_l_;
+
+ /// ugh. JUNKME
bool first_b_;
/**
Get an iterator for MUS, inheriting the translation unit from THIS.
*/
Music_iterator* get_iterator_p (Music const*mus) const;
- void set_translator (Translator_group*);
/** Do the actual reporting. This should be overriden in derived
classes. It is called by #process_and_next#, the public interface
*/
Translator_group*report_to_l() const;
+ void set_translator (Translator_group*);
/** Get an iterator matching the type of MUS, and use TRANS to find
an accompanying translation unit
*/
- static Music_iterator* static_get_iterator_p (Music const* mus,Translator_group* trans);
+ static Music_iterator* static_get_iterator_p (Music const* mus);
+ void init_translator (Music const *, Translator_group *);
Music_iterator();
/*
- music-list.hh -- declare Music_sequence, Simultaneous_music and Sequential_music
+ music-list.hh -- declare Music_sequence,
+ Simultaneous_music and Sequential_music
source file of the GNU LilyPond music typesetter
virtual void compress (Moment);
void add_music (Music *music_p);
-
Moment cumulative_length () const;
Moment maximum_length () const;
protected:
+ virtual Musical_pitch to_relative_octave (Musical_pitch);
virtual void do_print() const;
};
class Sequential_music : public Music_sequence
{
public:
-
VIRTUAL_COPY_CONS(Music);
- virtual Musical_pitch to_relative_octave (Musical_pitch);
Sequential_music(Music_list*);
virtual Moment length_mom () const;
};
Duration duration_;
virtual void do_print () const;
-
bool do_equal_b (Request*) const;
void compress (Moment);
virtual Moment length_mom () const;
class Multi_measure_rest_req : public Rhythmic_req {
public:
VIRTUAL_COPY_CONS(Music);
-
-};
-
-
-/**
- Start / stop an abbreviation beam at this note.
- */
-class Abbreviation_beam_req : public Span_req {
-public:
- VIRTUAL_COPY_CONS(Abbreviation_beam_req);
-
- Abbreviation_beam_req ();
-
- int type_i_;
-};
-
-
-
-/// a slur
-class Slur_req : public Span_req {
-public:
- VIRTUAL_COPY_CONS(Music);
-
};
/// an extender line
class Extender_req : public Request {
public:
VIRTUAL_COPY_CONS(Music);
-
-};
-
-
-class Dynamic_req : public virtual Request {
-public:
- VIRTUAL_COPY_CONS(Music);
-};
-/*
- merge with Articulation_req?
- */
-class Absolute_dynamic_req : public Dynamic_req {
-public:
- String loudness_str_;
- Absolute_dynamic_req();
-
-protected:
- virtual void do_print () const;
- virtual bool do_equal_b (Request*) const;
- VIRTUAL_COPY_CONS(Music);
-};
-
-class Span_dynamic_req : public Dynamic_req, public Span_req {
-public:
-
- /// Grow or shrink the volume: 1=cresc, -1 = decresc
- Direction dynamic_dir_;
-
- Span_dynamic_req();
-protected:
- virtual bool do_equal_b (Request*) const;
- virtual void do_print () const;
- VIRTUAL_COPY_CONS(Music);
};
#endif // MUSICALREQUESTS_HH
#include "music.hh"
+
+/**
+ Musical repeats.
+
+ A repeat, when played has the form of BODY A BODY B BODY C.
+
+ In this examples, the list {A B C} is put in ALTERNATIVES_P_. BODY
+ is put in REPEAT_BODY_P_. Either the body or the alternative may
+ be omitted.
+
+ There are three modes of representing this music:
+
+ BODY A
+ B
+ C
+
+ is called "folded". Mostly used for lyrics.
+
+
+ BODY A B C
+
+ is called "semi" folded. This is common notation
+
+ BODY A BODY B BODY C
+
+ is called unfolded. Useful for MIDI.
+
+*/
class New_repeated_music : public Music
{
public:
- bool unfold_b_;
+ bool fold_b_;
+ /// if FOLD_B_ is false, semifold this.
+ bool semi_fold_b_;
+
+ /// how often do we repeat?
int repeats_i_;
- Music * repeat_begin_p_;
+ Music * repeat_body_p_;
Music_sequence * alternatives_p_;
virtual Musical_pitch to_relative_octave (Musical_pitch);
/// The duration of this piece of music
virtual Moment length_mom () const;
+ Moment alternatives_length_mom () const;
void print() const;
/// Transpose, with the interval central C to #p#
virtual void compress (Moment factor);
VIRTUAL_COPY_CONS(Music);
- New_repeated_music ();
+ New_repeated_music (Music*, int , Music_sequence*);
New_repeated_music (New_repeated_music const&);
~New_repeated_music ();
protected:
virtual void do_print() const;
-
};
#define NOTE_PERFORMER_HH
#include "performer.hh"
-#include "list.hh"
/**
+Convert reqs to audio notes.
*/
-
class Note_performer : public Performer {
public:
VIRTUAL_COPY_CONS(Translator);
protected:
virtual void do_process_requests();
-
virtual bool do_try_music (Music *req_l) ;
virtual void do_print() const;
class Repeat_engraver : public Engraver
{
public:
- Repeat_engraver ();
+
VIRTUAL_COPY_CONS(Translator);
protected:
virtual bool do_try_music (Music *req_l);
virtual void do_process_requests();
virtual void do_pre_move_processing();
- virtual void do_post_move_processing();
private:
- Link_array<Repeated_music> repeated_music_arr_;
+ Link_array<New_repeated_music> repeated_music_arr_;
Link_array<Music> alternative_music_arr_;
- // Link_array<Bar> bar_p_arr_;
+
Array<bool> bar_b_arr_;
Link_array<Volta_spanner> volta_p_arr_;
Array<Moment> stop_mom_arr_;
VIRTUAL_COPY_CONS(Music);
};
+#if 0
/** Put a script above or below this ``note'' or bar. eg upbow, downbow. Why
a request? These symbols may conflict with slurs and brackets, so
this also a request */
~Script_req();
Script_req (Script_req const&);
};
-
+#endif
/**
Requests to start or stop something.
class Span_req : public virtual Request {
public:
/// should the spanner start or stop, or is it unwanted?
- Direction spantype_;
-
+ Direction span_dir_;
+ String span_type_str_;
+
Span_req();
protected:
virtual bool do_equal_b (Request*) const;
VIRTUAL_COPY_CONS(Music);
};
-/** Start / stop a beam at this note */
-class Beam_req : public Span_req {
-public:
- VIRTUAL_COPY_CONS(Music);
-};
-
#endif
private:
Moment here_mom_;
+
+ /// don't go into next element when you finish.
+ bool per_elt_b_;
Cons<Music> *cursor_;
Music_iterator * iter_p_;
class Simultaneous_music_iterator : public Music_list_iterator
{
public:
+
+ /// make a new context for every child.
+ bool separate_contexts_b_;
+
Simultaneous_music_iterator ();
virtual ~Simultaneous_music_iterator ();
#include "engraver.hh"
class Slur_engraver :public Engraver {
- Link_array<Slur_req> requests_arr_;
- Link_array<Slur_req> new_slur_req_l_arr_;
+ Link_array<Span_req> requests_arr_;
+ Link_array<Span_req> new_slur_req_l_arr_;
Link_array<Slur> slur_l_stack_;
Link_array<Slur> end_slur_l_arr_;
class Translator : public Input {
public:
Music_output_def * output_def_l_;
- String type_str_;
+ String type_str_;
virtual const char *name() const;
bool is_alias_b (String) const;
--- /dev/null
+/*
+ unfolded-repeat-iterator.hh -- declare Unfolded_repeat_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef UNFOLDED_REPEAT_ITERATOR_HH
+#define UNFOLDED_REPEAT_ITERATOR_HH
+
+#include "music-iterator.hh"
+
+/**
+ Iterate repeats. First do body, then alternatives one by one,
+ optionally interspersed by the body.
+ */
+class Unfolded_repeat_iterator : public Music_iterator
+{
+public:
+ /**
+ How often have we done the body (assuming bodies are interspersed.)?
+ */
+ int done_count_;
+
+ /// are we busy doing the body?
+ bool do_main_b_;
+
+ /** How far have we progressed into the repeat.
+ This excludes the elt currently being iterated.
+ */
+ Moment done_mom_;
+
+ Music_iterator * current_iter_p_;
+ Cons<Music> *alternative_cons_l_;
+ ~Unfolded_repeat_iterator();
+ Unfolded_repeat_iterator ();
+
+
+protected:
+ virtual void construct_children ();
+ virtual Moment next_moment () const;
+ virtual void do_process_and_next (Moment);
+ virtual bool ok () const;
+ virtual void next_element ();
+ virtual void do_print () const;
+};
+#endif /* UNFOLDED_REPEAT_ITERATOR_HH */
+
text_p_= new G_text_item;
text_p_->text_str_ = req_l_->text_str_;
+ text_p_->text_str_ += " "; // ugh.
+
Scalar style = get_property ("textStyle", 0);
if (style.length_i ())
text_p_->style_str_ = style;
"\n";
;
+
+ print_mudela_versions (cout);
}
void
Midi_instrument::str () const
{
Byte program_byte = 0;
- for (int i = 0; instrument_name_sz_a_[i]; i++)
+ bool found = false;
+ for (int i = 0; !found && instrument_name_sz_a_[i]; i++)
if (instrument_str_ == String (instrument_name_sz_a_[ i ]))
{
program_byte = (Byte)i;
- break;
+ found = true;
}
+ if (!found)
+ {
+ warning (_f("No such instrument: `%s'", instrument_str_.ch_C ()));
+ }
+
String str = to_str ((char) (0xc0 + channel_i_));
str += to_str ((char)program_byte);
return str;
#include "music-wrapper-iterator.hh"
#include "time-scaled-music-iterator.hh"
#include "time-scaled-music.hh"
-#include "repeated-music.hh"
-#include "repeated-music-iterator.hh"
#include "context-specced-music.hh"
+#include "new-repeated-music.hh"
+#include "folded-repeat-iterator.hh"
+#include "unfolded-repeat-iterator.hh"
void
Music_iterator::do_print() const
}
Music_iterator*
-Music_iterator::static_get_iterator_p (Music const *m, Translator_group *report_l)
+Music_iterator::static_get_iterator_p (Music const *m)
{
Music_iterator * p =0;
+
if (dynamic_cast<Request_chord const *> (m))
p = new Request_chord_iterator;
else if (dynamic_cast<Simultaneous_music const *> (m))
p = new Time_scaled_music_iterator;
else if (dynamic_cast<Music_wrapper const *> (m))
p = new Music_wrapper_iterator;
- else if (dynamic_cast<Repeated_music const *> (m))
- p = new Repeated_music_iterator;
+ else if (New_repeated_music const * n = dynamic_cast<New_repeated_music const *> (m))
+ {
+ if (n->fold_b_)
+ p = new Folded_repeat_iterator;
+ else
+ p = new Unfolded_repeat_iterator;
+ }
else
assert (0);
+
p->music_l_ = m;
+ return p;
+}
+void
+Music_iterator::init_translator (Music const *m, Translator_group *report_l)
+{
+ music_l_ = m;
if (Context_specced_music const * csm =dynamic_cast<Context_specced_music const*>(m))
{
Translator_group* a =report_l->
find_create_translator_l (csm->translator_type_str_, csm->translator_id_str_);
- p->set_translator (a);
- }
- if (! p->report_to_l())
- p ->set_translator (report_l);
+ set_translator (a);
+
+ }
-
- return p;
+ if (! report_to_l())
+ set_translator (report_l);
}
Music_iterator*
Music_iterator::get_iterator_p (Music const*m) const
{
- Music_iterator*p = static_get_iterator_p (m, report_to_l());
+ Music_iterator*p = static_get_iterator_p (m);
+ p->init_translator (m, report_to_l());
+
p->construct_children();
return p;
}
return cumulative_length ();
}
-Musical_pitch
-Sequential_music::to_relative_octave (Musical_pitch p)
-{
- return do_relative_octave (p, false);
-}
Musical_pitch
Simultaneous_music::to_relative_octave (Musical_pitch p)
return last;
}
+Musical_pitch
+Music_sequence::to_relative_octave (Musical_pitch p)
+{
+ return do_relative_octave (p, false);
+}
+
+
Moment
Music_sequence::maximum_length () const
{
Span_req::do_print () const
{
#ifndef NPRINT
- DOUT << spantype_;
+ DOUT << span_dir_;
#endif
}
void
Lyric_req::do_print () const
{
+#ifndef NPRINT
Rhythmic_req::do_print ();
+ DOUT << "text = " << text_str_;
+#endif
}
}
-Abbreviation_beam_req::Abbreviation_beam_req ()
-{
- type_i_ = 0;
-}
-
bool
Span_req::do_equal_b (Request*r) const
{
Span_req * s = dynamic_cast <Span_req *> (r);
- return s && spantype_ == s->spantype_;
+ return s && span_dir_ == s->span_dir_;
}
Span_req::Span_req ()
{
- spantype_ = CENTER;
-}
-
-
-void
-Absolute_dynamic_req::do_print () const
-{
-#ifndef NPRINT
- DOUT << " loudness " <<loudness_str_ ;
-#endif
-}
-
-bool
-Absolute_dynamic_req::do_equal_b (Request *r) const
-{
- Absolute_dynamic_req *a = dynamic_cast <Absolute_dynamic_req *> (r);
- return a&& loudness_str_ == a->loudness_str_;
-}
-
-Absolute_dynamic_req::Absolute_dynamic_req ()
-{
- loudness_str_ = "fm"; // yes, "illegal" on purpose.
-}
-
-
-
-bool
-Span_dynamic_req::do_equal_b (Request *req) const
-{
- Span_dynamic_req * s = dynamic_cast <Span_dynamic_req *> (req);
-
- return s&& Span_req::do_equal_b (req) && s->dynamic_dir_ == dynamic_dir_;
-}
-
-Span_dynamic_req::Span_dynamic_req ()
-{
- dynamic_dir_ = CENTER;
+ span_dir_ = CENTER;
}
-void
-Span_dynamic_req::do_print () const
-{
-#ifndef NPRINT
- Span_req::do_print ();
- DOUT << "softer/louder: " << dynamic_dir_;
-#endif
-}
void
Text_script_req::do_print () const
Articulation_req::do_equal_b (Request*r) const
{
Articulation_req * a = dynamic_cast<Articulation_req*>(r);
- return articulation_str_ == a->articulation_str_;
+
+ return a && articulation_str_ == a->articulation_str_;
}
#include "scope.hh"
static Keyword_ent the_key_tab[]={
- {"absdynamic", ABSDYNAMIC},
+ {"spanrequest", SPANREQUEST},
{"accepts", ACCEPTS},
{"alternative", ALTERNATIVE},
{"bar", BAR},
{"script", SCRIPT},
{"shape", SHAPE},
{"skip", SKIP},
- {"spandynamic", SPANDYNAMIC},
+ {"textscript", TEXTSCRIPT},
{"tempo", TEMPO},
{"translator", TRANSLATOR},
{"transpose", TRANSPOSE},
-#if 0
/*
- new-repeated-music-iterator.cc -- implement New_repeated_music_iterator
+ new-repeated-music-iterator.cc -- implement Folded_repeat_iterator
source file of the GNU LilyPond music typesetter
*/
-#include "music-iterator.hh"
+#include "folded-repeat-iterator.hh"
+#include "new-repeated-music.hh"
+#include "music-list.hh"
+#include "simultaneous-music-iterator.hh"
+#include "translator-group.hh"
+Folded_repeat_iterator::Folded_repeat_iterator ()
+{
+ main_iter_p_ = 0;
+ alternative_iter_p_ = 0;
+}
-/**
-
- */
-class New_repeated_music_iterator : public Music_iterator
+bool
+Folded_repeat_iterator::ok () const
+{
+ return main_iter_p_ || alternative_iter_p_;
+}
+
+Folded_repeat_iterator::~Folded_repeat_iterator ()
+{
+ delete main_iter_p_;
+ delete alternative_iter_p_;
+}
+
+Moment
+Folded_repeat_iterator::next_moment () const
+{
+ if (main_iter_p_)
+ {
+ return main_iter_p_->next_moment ();
+ }
+ else
+ return main_length_mom_ + alternative_iter_p_->next_moment ();
+}
+
+void
+Folded_repeat_iterator::construct_children ()
+{
+ New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_);
+ main_iter_p_ = get_iterator_p (mus->repeat_body_p_);
+ if (!main_iter_p_->ok())
+ {
+ leave_body ();
+ enter_alternative ();
+ }
+}
+
+void
+Folded_repeat_iterator::do_process_and_next (Moment m)
{
- Music_iterator * main_iter_p_;
- Music_iterator * alternative_iter_p_;
- int count_;
+ if (!m)
+ {
+ bool success = report_to_l ()->try_music (music_l_);
+ if (!success)
+ music_l_->warning ( _("No one to print a volta bracket"));
+ }
-public:
- New_repeated_music_iterator ();
- ~New_repeated_music_iterator ();
+ New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_);
+ if (main_iter_p_)
+ {
+ main_iter_p_->process_and_next (m);
+ if (!main_iter_p_->ok ())
+ leave_body ();
+ }
+
+ if (!main_iter_p_ && !alternative_iter_p_)
+ {
+ enter_alternative ();
+ }
- virtual void construct_children ();
- virtual Moment next_moment () const;
- virtual bool ok () const;
+ if (alternative_iter_p_)
+ {
+ alternative_iter_p_->process_and_next (m - main_length_mom_);
+ if (!alternative_iter_p_->ok ())
+ {
+ delete alternative_iter_p_;
+ alternative_iter_p_ =0;
+ }
+ }
+}
-protected:
- virtual void do_print () const;
- virtual void do_process_and_next (Moment);
-};
+void
+Folded_repeat_iterator::leave_body ()
+{
+ New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_);
+ delete main_iter_p_;
+ main_iter_p_ = 0;
+ main_length_mom_ += mus->repeat_body_p_->length_mom ();
+}
-New_repeated_music_iterator::New_repeated_music_iterator ()
+void
+Folded_repeat_iterator::enter_alternative ()
{
+ New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_);
+ Simultaneous_music_iterator * s = new Simultaneous_music_iterator;
+ s->separate_contexts_b_ = true;
+ s->init_translator (mus->alternatives_p_, report_to_l ());
+ alternative_iter_p_ = s;
+ alternative_iter_p_->construct_children ();
}
+
+void
+Folded_repeat_iterator::do_print () const
+{
+#ifndef NPRINT
#endif
+}
#include "new-repeated-music.hh"
#include "music-list.hh"
#include "musical-pitch.hh"
+#include "debug.hh"
-New_repeated_music::New_repeated_music()
+New_repeated_music::New_repeated_music(Music *beg, int times, Music_sequence * alts)
{
- repeat_begin_p_ = 0;
- unfold_b_ = false;
- repeats_i_ =0;
- alternatives_p_ = 0;
+ repeat_body_p_ = beg;
+ fold_b_ = false;
+ repeats_i_ = times;
+ alternatives_p_ = alts;
+ semi_fold_b_ = true;
}
New_repeated_music::New_repeated_music (New_repeated_music const &s)
: Music (s)
{
repeats_i_ = s.repeats_i_;
- unfold_b_ = s.unfold_b_;
-
- repeat_begin_p_ = s.repeat_begin_p_ ? s.repeat_begin_p_->clone () : 0;
+ fold_b_ = s.fold_b_;
+ semi_fold_b_ = s.semi_fold_b_;
+
+ repeat_body_p_ = s.repeat_body_p_ ? s.repeat_body_p_->clone () : 0;
alternatives_p_ = s.alternatives_p_
? dynamic_cast<Music_sequence*> (s.alternatives_p_->clone ()):0;
}
New_repeated_music::~New_repeated_music ()
{
- delete repeat_begin_p_;
+ delete repeat_body_p_;
delete alternatives_p_;
}
void
New_repeated_music::do_print () const
{
- if (repeat_begin_p_)
- repeat_begin_p_->print();
+#ifndef NPRINT
+ DOUT << "Fold = " << fold_b_ << " reps: " << repeats_i_;
+
+ if (repeat_body_p_)
+ repeat_body_p_->print();
if (alternatives_p_)
alternatives_p_->print();
+#endif
}
Musical_pitch
New_repeated_music::to_relative_octave (Musical_pitch p)
{
- if (repeat_begin_p_)
- p = repeat_begin_p_->to_relative_octave (p);
+ if (repeat_body_p_)
+ p = repeat_body_p_->to_relative_octave (p);
if (alternatives_p_)
p = alternatives_p_->do_relative_octave (p, true);
void
New_repeated_music::transpose (Musical_pitch p)
{
- if (repeat_begin_p_)
- repeat_begin_p_->transpose (p);
+ if (repeat_body_p_)
+ repeat_body_p_->transpose (p);
if (alternatives_p_)
alternatives_p_->transpose (p);
void
New_repeated_music::compress (Moment p)
{
- if (repeat_begin_p_)
- repeat_begin_p_->compress (p);
+ if (repeat_body_p_)
+ repeat_body_p_->compress (p);
if (alternatives_p_)
alternatives_p_->compress (p);
}
+Moment
+New_repeated_music::alternatives_length_mom () const
+{
+ if (alternatives_p_)
+ {
+ return (fold_b_)
+ ? alternatives_p_->maximum_length ()
+ : alternatives_p_->cumulative_length ();
+ }
+ return 0;
+}
Moment
New_repeated_music::length_mom () const
{
Moment m =0;
- if (unfold_b_)
+ if (fold_b_)
{
- if (repeat_begin_p_)
- m += Rational (repeats_i_) * repeat_begin_p_->length_mom ();
-
- if (alternatives_p_)
- m += alternatives_p_->cumulative_length ();
+ if (repeat_body_p_)
+ m += repeat_body_p_->length_mom ();
}
else
{
- if (repeat_begin_p_)
- m += repeat_begin_p_->length_mom ();
-
- if (alternatives_p_)
- m += alternatives_p_->maximum_length ();
+ Moment beg = (repeat_body_p_) ? repeat_body_p_->length_mom () : Rational(0);
+ if (!semi_fold_b_)
+ beg *= Rational (repeats_i_);
+ m += beg;
}
+
+ m += alternatives_length_mom ();
return m;
}
#include "relative-music.hh"
#include "transposed-music.hh"
#include "time-scaled-music.hh"
-#include "repeated-music.hh"
+#include "new-repeated-music.hh"
// mmm
Mudela_version oldest_version ("1.0.16");
-Mudela_version version ("1.0.16");
-
+Mudela_version version ("1.0.19");
+void
+print_mudela_versions (ostream &os)
+{
+ os << "Mudela versions: oldest " << oldest_version.str () << " current " << version.str () <<endl;
+}
// needed for bison.simple's malloc() and free()
#include <malloc.h>
/* tokens which are not keywords */
-%token ABSDYNAMIC
+%token TEXTSCRIPT
%token ACCEPTS
%token ALTERNATIVE
%token BAR
%token SCRIPT
%token SHAPE
%token SKIP
-%token SPANDYNAMIC
+%token SPANREQUEST
%token TEMPO
%token TIME_T
%token TIMES
%type <duration> duration_length
%type <scalar> scalar
-%type <music> Music relative_music Sequential_music Simultaneous_music
+%type <music> Music relative_music Sequential_music Simultaneous_music Music_sequence
%type <music> property_def translator_change
%type <music_list> Music_list
%type <paper> paper_block paper_def_body
Alternative_music:
/* empty */ {
-
- /* UGH*/
- Music_list* m = new Music_list;
- $$ = new Sequential_music (m);
+ $$ = 0;
}
- | ALTERNATIVE Simultaneous_music {
+ | ALTERNATIVE Music_sequence {
$$ = $2;
}
- | ALTERNATIVE Sequential_music {
- $$ = $2;
+ ;
+
+
+
+
+Repeated_music:
+ REPEAT STRING unsigned Music Alternative_music
+ {
+ Music_sequence* m = dynamic_cast <Music_sequence*> ($5);
+
+ New_repeated_music * r = new New_repeated_music ($4, $3 >? 1, m);
+ $$ = r;
+ r->fold_b_ = (*$2 == "fold");
+ r->semi_fold_b_ = (*$2 == "semi");
+ delete $2;
}
;
-Repeated_music: REPEAT unsigned Music Alternative_music {
- Music_sequence* m = dynamic_cast <Music_sequence*> ($4);
- assert (m);
- $$ = new Repeated_music ($3, $2 >? 1, m);
+Music_sequence: '{' Music_list '}' {
+ $$ = new Music_sequence ($2);
}
;
$$ = new Tie_req;
}
| '[' {
- Beam_req*b= new Beam_req;
- b->spantype_ = START;
+ Span_req*b= new Span_req;
+ b->span_dir_ = START;
+ b->span_type_str_ = "beam";
$$ =b;
}
| ']' {
- Beam_req*b= new Beam_req;
- b->spantype_ = STOP;
+ Span_req*b= new Span_req;
+ b->span_dir_ = STOP;
+ b->span_type_str_ = "beam";
$$ = b;
}
;
$$ = (Request*)$1->access_content_Request (true);
$$->set_spot (THIS->here_input ());
}
- | ABSDYNAMIC '{' STRING '}' {
- Absolute_dynamic_req *ad_p = new Absolute_dynamic_req;
- ad_p ->loudness_str_ = *$3;
- ad_p->set_spot (THIS->here_input ());
+ | TEXTSCRIPT STRING STRING {
+ Text_script_req *ts_p = new Text_script_req;
+ ts_p-> text_str_ = *$2;
+ ts_p-> style_str_ = *$3;
+ ts_p->set_spot (THIS->here_input ());
delete $3;
- $$ =ad_p;
+ delete $2;
+ $$ = ts_p;
}
- | SPANDYNAMIC '{' int int '}' {
- Span_dynamic_req * sp_p = new Span_dynamic_req;
- sp_p-> dynamic_dir_ = Direction($3);
- sp_p->spantype_ = Direction($4);
+ | SPANREQUEST int STRING {
+ Span_req * sp_p = new Span_req;
+ sp_p-> span_dir_ = Direction($2);
+ sp_p->span_type_str_ = *$3;
sp_p->set_spot (THIS->here_input ());
$$ = sp_p;
}
close_request:
close_request_parens {
$$ = $1;
- dynamic_cast<Span_req*> ($$)->spantype_ = START;
+ dynamic_cast<Span_req*> ($$)->span_dir_ = START;
}
close_request_parens:
'(' {
- $$= new Slur_req;
+ Span_req* s= new Span_req;
+ $$ = s;
+ s->span_type_str_ = "slur";
}
| E_SMALLER {
- Span_dynamic_req*s =new Span_dynamic_req;
+ Span_req*s =new Span_req;
$$ = s;
- s->dynamic_dir_ = UP;
+ s->span_type_str_ = "crescendo";
}
| E_BIGGER {
- Span_dynamic_req*s =new Span_dynamic_req;
+ Span_req*s =new Span_req;
$$ = s;
- s->dynamic_dir_ = DOWN;
+ s->span_type_str_ = "decrescendo";
}
;
open_request:
open_request_parens {
$$ = $1;
- dynamic_cast<Span_req*> ($$)->spantype_ = STOP;
+ dynamic_cast<Span_req*> ($$)->span_dir_ = STOP;
}
;
open_request_parens:
E_EXCLAMATION {
- Span_dynamic_req *s = new Span_dynamic_req;
- s->dynamic_dir_ = SMALLER;
+ Span_req *s = new Span_req;
+ s->span_type_str_ = "crescendo";
$$ = s;
-
}
| ')' {
- $$= new Slur_req
+ Span_req* s= new Span_req;
+ $$ = s;
+ s->span_type_str_ = "slur";
}
;
#include "command-request.hh"
#include "time-description.hh"
#include "engraver-group.hh"
-#include "repeated-music.hh"
+#include "new-repeated-music.hh"
#include "time-description.hh"
#include "volta-spanner.hh"
#include "note-column.hh"
#include "paper-def.hh"
-
+#include "music-list.hh"
ADD_THIS_TRANSLATOR (Repeat_engraver);
-Repeat_engraver::Repeat_engraver ()
-{
-}
-
/*
- urg. Way too complicated. needs redesign.
+ Urg. Hairy. Needs redesign?
*/
bool
Repeat_engraver::do_try_music (Music* m)
{
- if (Repeated_music* r = dynamic_cast<Repeated_music *> (m))
+ if (New_repeated_music* r = dynamic_cast<New_repeated_music *> (m))
{
- r->unfold_b_ = get_property ("unfoldRepeats", 0).to_bool ();
- if (r->unfold_b_)
- return true;
-
- Music_sequence* alt = r->alternative_p_;
- Moment repeat_length_mom = r->repeat_p_->length_mom ();
+ Music_sequence* alt = r->alternatives_p_;
+ Moment repeat_length_mom = r->repeat_body_p_->length_mom ();
Moment stop_mom = now_mom () + repeat_length_mom;
Moment alt_mom = now_mom () + repeat_length_mom;
if (repeat_length_mom)
{
- for (Cons<Music> *i (alt->music_p_list_p_->head_); i && i->next_; i = i->next_)
- {
- stop_mom += i->car_->length_mom ();
- if (dynamic_cast<Simultaneous_music *> (alt))
- break;
- }
+ stop_mom += r->alternatives_length_mom ();
repeated_music_arr_.push (r);
stop_mom_arr_.push (stop_mom);
}
}
}
}
-
-void
-Repeat_engraver::do_post_move_processing ()
-{
-}
-
*mlog << '\n' << _("Interpreting music...") << flush;
trans_p->last_mom_ = music_p_->length_mom ();
- Music_iterator * iter = Music_iterator::static_get_iterator_p (music_p_, trans_p);
-
+ Music_iterator * iter = Music_iterator::static_get_iterator_p (music_p_);
+ iter->init_translator(music_p_, trans_p);
iter->construct_children();
cursor_ = 0;
here_mom_ = 0;
iter_p_ =0;
+ per_elt_b_ = false;
}
void
void
Sequential_music_iterator::do_process_and_next (Moment until)
{
+ if (!iter_p_)
+ return;
+
while (1)
{
Moment local_until = until - here_mom_;
iter_p_->process_and_next (local_until);
}
-
+
if (!iter_p_->ok())
{
leave_element();
{
start_next_element();
set_sequential_music_translator();
+
+ if (per_elt_b_)
+ goto loopexit; // ugh.
}
else
{
Simultaneous_music_iterator::Simultaneous_music_iterator ()
{
+ separate_contexts_b_ = false;
}
Simultaneous_music_iterator::~Simultaneous_music_iterator ()
for (Cons<Music> *i = sim->music_p_list_p_->head_; i; i = i->next_, j++)
{
- Music_iterator * mi = get_iterator_p (i->car_);
+ Music_iterator * mi = static_get_iterator_p (i->car_);
+
+ /* if separate_contexts_b_ is set, create a new context with the
+ number number as name */
+
+ Translator_group * t = (j && separate_contexts_b_)
+ ? report_to_l ()->find_create_translator_l (report_to_l()->type_str_,
+ to_str (j))
+ : report_to_l ();
+
+ mi->init_translator (i->car_, t);
+ mi->construct_children ();
+
if (mi->ok())
{
-#if 0
- if (sim->translator_type_str_.empty_b ())
- set_translator (mi->report_to_l()->ancestor_l (0)); // huh?
-#endif
-
children_p_list_.append (new Killing_cons<Music_iterator> (mi,0));
}
else
}
}
-
void
Simultaneous_music_iterator::do_print() const
{
bool
Slur_engraver::do_try_music (Music *req_l)
{
- if (Slur_req *sl = dynamic_cast <Slur_req *> (req_l))
+ if (Span_req *sl = dynamic_cast <Span_req *> (req_l))
{
+ if (sl->span_type_str_ != "slur")
+ return false;
new_slur_req_l_arr_.push (sl);
return true;
}
Array<Slur*> start_slur_l_arr_;
for (int i=0; i< new_slur_req_l_arr_.size(); i++)
{
- Slur_req* slur_req_l = new_slur_req_l_arr_[i];
+ Span_req* slur_req_l = new_slur_req_l_arr_[i];
// end slur: move the slur to other array
- if (slur_req_l->spantype_ == STOP)
+ if (slur_req_l->span_dir_ == STOP)
{
if (slur_l_stack_.empty())
requests_arr_.pop();
}
}
- else if (slur_req_l->spantype_ == START)
+ else if (slur_req_l->span_dir_ == START)
{
// push a new slur onto stack.
//(use temp. array to wait for all slur STOPs)
Staff_performer::new_instrument_str ()
{
// mustn't ask Score for instrument: it will return piano!
- String str = get_property ("midi_instrument", 0);
+ String str = get_property ("midiInstrument", 0);
if (!str.length_i ())
str = get_property ("instrument", 0);
if (str == instrument_str_)
/* allbars == ! skipbars */
- bool allbars = ! get_property ("SkipBars", 0).to_bool ();
+ bool allbars = ! get_property ("skipBars", 0).to_bool ();
// urg: multi bar rests: should always must process whole of first bar?
if (!time_.cadenza_b_ && allbars)
return properties_dict_[id];
}
-#if 0
+#if 1
if (daddy_trans_l_)
return daddy_trans_l_->get_property (id, where_l);
#endif
DECLARE_REQUEST_SWALLOWER(Skip_req);
-DECLARE_REQUEST_SWALLOWER(Beam_req);
accBayanbaseTEE = \script "accBayanbaseTEE"
accStdbase = \script "accStdbase"
-accStdbaseTp = \script "accStdbaseTp"
-accStdbaseT = \script "accStdbaseT"
-accStdbaseBp = \script "accStdbaseBp"
-accStdbaseM = \script "accStdbaseM"
+accStdbaseFE = \script "accStdbaseFE"
+accStdbaseTFE = \script "accStdbaseTFE"
+accStdbaseMES = \script "accStdbaseMES"
+accStdbaseTFMES = \script "accStdbaseTFMES"
accSB = \script "accSB"
accBB = \script "accBB"
% Toplevel initialisation file.
-\version "1.0.16";
+\version "1.0.19";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.16";
+\version "1.0.19";
\include "declarations.ly";
% Toplevel initialisation file.
-\version "1.0.16";
+\version "1.0.19";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.16";
+\version "1.0.19";
\include "declarations.ly"
% declare the standard dynamic identifiers.
%
-pppppp = \absdynamic { "pppppp" }
-ppppp = \absdynamic { "ppppp" }
-pppp = \absdynamic { "pppp" }
-ppp = \absdynamic { "ppp" }
-pp = \absdynamic { "pp" }
-p = \absdynamic { "p" }
-mp = \absdynamic { "mp" }
-mf = \absdynamic { "mf" }
-f = \absdynamic { "e" } % see feta-din layout
-ff = \absdynamic { "ff" }
-fff = \absdynamic { "fff" }
-ffff = \absdynamic { "ffff" }
-fffff = \absdynamic { "fffff" }
-ffffff = \absdynamic { "ffffff" }
-fp = \absdynamic { "fp" }
-sf = \absdynamic { "sf" }
-sff = \absdynamic { "sff" }
-sfz = \absdynamic { "sfz" }
-fz = \absdynamic { "fz" }
-sp = \absdynamic { "sp" }
-spp = \absdynamic { "spp" }
-rfz = \absdynamic { "rfz" }
+pppppp = \textscript"pppppp" "dynamic"
+ppppp = \textscript"ppppp" "dynamic"
+pppp = \textscript "pppp" "dynamic"
+ppp = \textscript "ppp" "dynamic"
+pp = \textscript "pp" "dynamic"
+p = \textscript "p" "dynamic"
+mp = \textscript "mp" "dynamic"
+mf = \textscript "mf" "dynamic"
+f = \textscript "e" "dynamic" % see feta-din layout
+ff = \textscript "ff" "dynamic"
+fff = \textscript "fff" "dynamic"
+ffff = \textscript "ffff" "dynamic"
+fffff = \textscript "fffff" "dynamic"
+ffffff = \textscript "ffffff" "dynamic"
+fp = \textscript "fp" "dynamic"
+sf = \textscript "sf" "dynamic"
+sff = \textscript "sff" "dynamic"
+sfz = \textscript "sfz" "dynamic"
+fz = \textscript "fz" "dynamic"
+sp = \textscript "sp" "dynamic"
+spp = \textscript "spp" "dynamic"
+rfz = \textscript "rfz" "dynamic"
% 1st arg dynamic (louder/softer). 2nd arg spantype
-cr = \spandynamic { \bigger \start }
-decr = \spandynamic { \smaller \start }
-rc = \spandynamic { \bigger \stop }
-rced = \spandynamic { \smaller \stop }
+cr = \spanrequest \start "crescendo"
+decr = \spanrequest \start "decrescendo"
+rc = \spanrequest \stop "crescendo"
+rced = \spanrequest \stop "decrescendo"
\consists "Separating_line_group_engraver";
+ \consists "Font_size_engraver";
\accepts "Voice";
dynamicStyle = "dynamic";
\name ChoirStaff;
alignmentReference = \center;
\consists "Staff_group_bar_engraver";
+
\consistsend "Axis_group_engraver";
\accepts "Staff";
\accepts "RhythmicStaff";
\accepts "GrandStaff";
\accepts "PianoStaff";
-
+
+
\accepts "Lyrics";
\accepts "ChordNames";
}
\translator{\RhythmicStaffContext}
VoiceContext = \translator {
\type "Engraver_group_engraver";
- \consists "Dynamic_engraver";
+ \consists "Dynamic_engraver"; % must come before text_engraver.
\name Voice ;
beamAuto = "1";
\consists "Beam_engraver";
\consists "Auto_beam_engraver";
\include "auto-beam-settings.ly";
- \consists "Abbreviation_beam_engraver";
+% \consists "Abbreviation_beam_engraver";
% \consists "Multi_measure_rest_engraver";
% ugh. Order matters here.
\consists "Separating_line_group_engraver";
\consists "Lyric_engraver";
\consists "Extender_engraver";
- \consists "Beam_req_swallow_translator";
}
\translator {
\type "Engraver_group_engraver";
\name Lyrics;
+ \consists Vertical_align_engraver;%need this for getting folded repeats right.
+
\consistsend "Axis_group_engraver";
\accepts "LyricVoice";
% Toplevel initialisation file.
-\version "1.0.16";
+\version "1.0.19";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.16";
+\version "1.0.19";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.16";
+\version "1.0.19";
\include "declarations.ly";
% Toplevel initialisation file.
-\version "1.0.16";
+\version "1.0.19";
\include "declarations.ly"
-\version "1.0.16";
+\version "1.0.19";
paper_sixteen = \paper {
staffheight = 16.0\pt;
% paper20.ly
-\version "1.0.16";
+\version "1.0.19";
paper_twenty = \paper {
staffheight = 20.0\pt;
\name Score;
- instrument = piano;
+ instrument = "bright acoustic";
\accepts Staff;
\accepts GrandStaff;
\accepts PianoStaff;
% -*- Fundamental -*-
-accreg_dot_size# := .6interline#;
+accreg_dot_size# := .5interline#;
accreg_linethickness# := 1.3stafflinethickness#;
% This dimention is the same on all registersymbols.
(let* ((keywords '("alternative" "repeat"
"accepts" "accidentals" "break" "bar" "cadenza"
"clef" "cm" "consists" "consistsend" "contains" "duration"
- "absdynamic" "scmfile" "lyrics"
+ "spanrequest" "scmfile" "lyrics"
"in" "translator" "context" "key" "maininput" "notes"
"musical_pitch" "time" "midi" "mm" "header"
"notenames" "octave" "output" "partial" "paper" "plet" "name"
"property" "pt" "shape" "relative" "include" "score"
"scm" "scmfile"
- "script" "skip" "table" "times" "spandynamic" "symboltables" "type"
+ "script" "skip" "table" "times" "textscript" "symboltables" "type"
"tempo" "transpose" "version" "grouping"
))
(kwregex (mapconcat (lambda (x) (concat "\\\\" x)) keywords "\\|")))
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "violoncello.ly"
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "clarinetti.ly"
}
-\version "1.0.16";
+\version "1.0.19";
\include "clarinetto-1.ly"
\include "clarinetto-2.ly"
$clarinetti_staff = \context Staff = clarinetti <
- \property Staff.midi_instrument = "clarinet"
+ \property Staff.midiInstrument = "clarinet"
\property Staff.instrument = "2 Clarinetti (B\\textflat)"
\property Staff.instr = "Cl. (B\\textflat)"
% urg: can't; only My_midi_lexer:<non-static> () parses pitch?
}
-\version "1.0.16";
+\version "1.0.19";
clarinetto1 = \notes \relative c {
R1 *2 | d''4-.\ff r r2 | R1 *3 | e4-. r r2 | R1 *3 |
}
-\version "1.0.16";
+\version "1.0.19";
clarinetto2 = \notes \relative c {
R1*2 bes''4-.\ff r r2 | R1*3 | cis4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "contrabasso.ly"
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
contrabasso = \notes \relative c {
% \translator Staff=violoncello
}
$contrabasso_staff = \context Staff = contrabasso <
- \property Staff.midi_instrument = "contrabass"
+ \property Staff.midiInstrument = "contrabass"
\property Staff.instrument = "Contrabasso"
\property Staff.instr = "Cb."
\clef "bass";
\paper {
\translator { \OrchestralPartStaffContext }
\translator { \ScoreContext
- SkipBars = 1;
+ skipBars = 1;
}
castingalgorithm = \Wordwrap;
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "corni.ly"
}
-\version "1.0.16";
+\version "1.0.19";
\include "corno-1.ly"
\include "corno-2.ly"
$corni_staff = \context Staff = corni <
- \property Staff.midi_instrument = "french horn"
+ \property Staff.midiInstrument = "french horn"
\property Staff.instrument = "2 Corni (E\\textflat)"
\property Staff.instr = "Cor. (E\\textflat)"
% urg: can't; only My_midi_lexer:<non-static> () parses pitch?
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
corno1 = \notes \relative c {
R1 *2 | f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
corno2 = \notes \relative c {
R1 *2 | d''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 |
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "fagotti.ly"
}
-\version "1.0.16";
+\version "1.0.19";
\include "fagotto-1.ly"
\include "fagotto-2.ly"
$fagotti_staff = \context Staff = fagotti <
- \property Staff.midi_instrument = "bassoon"
+ \property Staff.midiInstrument = "bassoon"
\property Staff.instrument = "2 Fagotti"
\property Staff.instr = "Fg."
\clef "bass";
}
-\version "1.0.16";
+\version "1.0.19";
fagotto1 = \notes \relative c {
R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
fagotto2 = \notes \relative c {
R1 *2 | f4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "flauti.ly"
}
-\version "1.0.16";
+\version "1.0.19";
\include "flauto-1.ly"
\include "flauto-2.ly"
$flauti_staff = \context Staff = flauti <
- \property Staff.midi_instrument = "flute"
+ \property Staff.midiInstrument = "flute"
\property Staff.instrument = "2 Flauti"
\property Staff.instr = "Fl."
\notes \context Voice=flauti <
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
flauto1 = \notes \relative c {
R1 *2 | c'''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
flauto2 = \notes \relative c {
R1 *2 | as'''4-.\ff r r2 | R1 *3 | b4-. r r2 | R1 *3 |
}
-\version "1.0.16";
+\version "1.0.19";
global = \notes {
\time 4/4;
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
oboe1 = \notes \relative c'' {
R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 |
}
-\version "1.0.16";
+\version "1.0.19";
oboe2 = \notes \relative c{
R1 *2| f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "oboi.ly"
}
-\version "1.0.16";
+\version "1.0.19";
\include "oboe-1.ly"
\include "oboe-2.ly"
$oboi_staff = \context Staff = oboi <
- \property Staff.midi_instrument = "oboe"
+ \property Staff.midiInstrument = "oboe"
\property Staff.instrument = "2 Oboi"
\property Staff.instr = "Ob."
\notes \context Voice=oboi <
}
-\version "1.0.16";
+\version "1.0.19";
timpani = \notes \relative c {
R1 *2 | c4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
}
$timpani_staff = \context Staff = timpani <
- \property Staff.midi_instrument = "timpani"
+ \property Staff.midiInstrument = "timpani"
\property Staff.instrument = "2 Timpani (C-G)"
\property Staff.instr = "Timp."
\clef "bass";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "trombe.ly"
}
-\version "1.0.16";
+\version "1.0.19";
\include "trombo-1.ly"
\include "trombo-2.ly"
$trombe_staff = \context Staff = trombe <
- \property Staff.midi_instrument = "trumpet"
+ \property Staff.midiInstrument = "trumpet"
\property Staff.instrument = "2 Trombe (C)"
\property Staff.instr = "Tbe."
\notes \context Voice=trombe <
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
trombo1 = \notes \relative c {
R1 *2 | c''4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
trombo2 = \notes \relative c {
R1 *2 | c'4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
viola1 = \notes \relative c {
\context Voice=one
% $viola1_staff = \context Staff = viola1 <
$viola1_staff = \context Staff = violai <
- \property Staff.midi_instrument = "viola"
+ \property Staff.midiInstrument = "viola"
\property Staff.instrument = "Viola"
\property Staff.instr = "Vla."
\clef "alto";
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
viola2 = \notes \relative c {
% starts on (actualy, most part is on) same staff as viola1
% $viola2_staff = \context Staff = viola_2 <
$viola2_staff = \context Staff = violaii <
- \property Staff.midi_instrument = "viola"
+ \property Staff.midiInstrument = "viola"
\property Staff.instrument = "Viola II"
\property Staff.instr = "Vla. II"
\clef "alto";
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "viola-1.ly"
\include "viola-2.ly"
$viola_staff = \context Staff = violai <
- \property Staff.midi_instrument = "viola"
+ \property Staff.midiInstrument = "viola"
\property Staff.instrument = "Viola"
\property Staff.instr = "Vla."
\clef "alto";
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "violino-1.ly"
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
violino1 = \notes \relative c {
c'1\ff ~ | c | <f4-. c'-. as'-.> r r2 | R1 |
}
$violino1_staff = \context Staff = violino1 <
- \property Staff.midi_instrument = "violin"
+ \property Staff.midiInstrument = "violin"
\property Staff.instrument = "Violino I"
\property Staff.instr = "Vl. I"
\notes<
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "violino-2.ly"
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
violino2 = \notes \relative c {
c'1\ff ~ | c | <f4-. c'-. as'-.> r r2 | R1 |
$violino2_staff = \context Staff = violino2 <
% MIDI hoort geeneens verschil tussen een
% eerste en tweede viool ;-)
- \property Staff.midi_instrument = "violin"
+ \property Staff.midiInstrument = "violin"
\property Staff.instrument = "Violino II"
\property Staff.instr = "Vl. II"
\notes<
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "violoncello.ly"
}
-\version "1.0.16";
+\version "1.0.19";
violoncello = \notes \relative c {
c1\ff ~ | c | f,4-. r r2 | r1 | c'1\ff ~ | c | f,4-. r r2 |
}
$violoncello_staff = \context Staff = violoncello <
- \property Staff.midi_instrument = "cello"
+ \property Staff.midiInstrument = "cello"
\property Staff.instrument = "Violoncello"
\property Staff.instr = "Vc."
\clef "bass";
----------------------------------------------------
-\version "1.0.16";
+\version "1.0.19";
\paper{barsize=50.0; \translator {\StaffContext \consists
Bar_number_engraver;}}
}
-\version "1.0.16";
+\version "1.0.19";
Bar_number_engraver;}}
}
-\version "1.0.16";
+\version "1.0.19";
}
-\version "1.0.16";
+\version "1.0.19";
\paper{barsize=50.0; \translator {\StaffContext \consists
Bar_number_engraver;}}
}
-\version "1.0.16";
+\version "1.0.19";
under the Gnu Public Licence.
%}
-\version "1.0.16";
+\version "1.0.19";
$voice_one = \notes \relative c' {
a'2 bes4. [c16 bes] | a4 d ~ d c ~ | c b ~ [b8 a] a4 ~|
Tested Features: cross staff beams and slurs, grace notes, no bars
%}
-\version "1.0.16";
+\version "1.0.19";
\include "nederlands.ly"
Tested Features:
%}
-\version "1.0.16";
+\version "1.0.19";
\include "nederlands.ly"
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
\include "standchen.ly"
description = "A schubert song in 20 pt";
}
-\version "1.0.16";
+\version "1.0.19";
% fool make-website
% \include "standchen.ly";
Note: Original key F.
%}
-\version "1.0.16";
+\version "1.0.19";
$vocal_verse1 = \notes\relative c''{
% ugh: treble/bass
title = "Diademata";
metre = "6 6. 8 6. D";
}
-\version "1.0.16";
+\version "1.0.19";
sop=\notes \transpose c''{
ees2 | ees4 ees4 g2 g2 | c'1. \bar "||";
metre = "10 10 . 11 11";
}
-\version "1.0.16";
+\version "1.0.19";
sop = \notes \transpose c''{
f4 | d' bes c' | f2 \bar "||";
metre = "10 11. 11 11. and refrain";
}
-\version "1.0.16";
+\version "1.0.19";
sop=\notes \relative c'' {
b2 gis4. a8 |b2 e,2 |
metre = "8 7 8 7 D";
}
-\version "1.0.16";
+\version "1.0.19";
sop=\notes \relative c'' {
b4 b c d | d c b a | g g a b | b4. a8 a2 \bar "||";
}
-\version "1.0.16";
+\version "1.0.19";
global=\notes {
\time 6/4;
piece = "Allemande";
}
-\version "1.0.16";
+\version "1.0.19";
global = \notes{
\time 4/4;
%%
%% Noe liknende skjer også i mellom andre og tredje stemme i takt 28
-\version "1.0.16";
+\version "1.0.19";
global = \notes{
\time 2/4;
copyright = "Public Domain";
}
-\version "1.0.16";
+\version "1.0.19";
global = \notes {
\time 4/4;
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
% upper = \context Staff \notes\relative c {
upper = \context Staff=upper \notes\relative c {
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
upper = \context Staff \notes\relative c{
\context Voice=i
\property Voice . textstyle = "italic"
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
one = \context Staff \notes\relative c {
\context Voice=i
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
upper = \context Staff \notes\relative c{
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.16";
+\version "1.0.19";
one = \context Staff \notes\relative c{
>
-\version "1.0.16";
+\version "1.0.19";
\$courante_b
>
-\version "1.0.16";
+\version "1.0.19";
\$gigue_b
>
-\version "1.0.16";
+\version "1.0.19";
d2.
}
-\version "1.0.16";
+\version "1.0.19";
dotted slurs
%}
-\version "1.0.16";
+\version "1.0.19";
\include "prelude-urtext.ly";
\$prelude_b
>
-\version "1.0.16";
+\version "1.0.19";
dotted slurs
%}
-\version "1.0.16";
+\version "1.0.19";
\include "prelude-urtext.ly";
\$sarabande_b
>
-\version "1.0.16";
+\version "1.0.19";
\clef alto;
\$global_i
>
-\version "1.0.16";
+\version "1.0.19";
>
\$global_i
>
-\version "1.0.16";
+\version "1.0.19";
}
}
-\version "1.0.16";
+\version "1.0.19";
}
}
-\version "1.0.16";
+\version "1.0.19";
\clef bass;
\$global_i
>
-\version "1.0.16";
+\version "1.0.19";
%{
%}
-\version "1.0.16";
+\version "1.0.19";
global =
* auto beaming
%}
-\version "1.0.16";
+\version "1.0.19";
\include "nederlands.ly" % for correct parsing of note names
copyright = "Public Domain";
}
-\version "1.0.16";
+\version "1.0.19";
global =
\notes {
\midi{ \tempo 4 = 100; }
}
-\version "1.0.16";
+\version "1.0.19";
-\version "1.0.16";
+\version "1.0.19";
corI=\notes\relative c'' {
\key c;
-\property Staff."midi_instrument" = "french horn"
+\property Staff."midiInstrument" = "french horn"
[g8. \f ( a16 ] ) g2 |
[g8. ( a16 ] ) g2_"dim." |
corII=\notes\relative c'' {
\key c;
-\property Staff."midi_instrument" = "french horn"
+\property Staff."midiInstrument" = "french horn"
R2.*19 |
r4 r [g8^"solo" \p (\< \! ) e'] |
trpI=\notes\relative c'' {
\key c;
-\property Staff."midi_instrument" = "trumpet"
+\property Staff."midiInstrument" = "trumpet"
[d8. ( \f e16 ] ) d2 |
R2.*30 |
trpII=\notes\relative c' {
\key c;
-\property Staff."midi_instrument" = "trumpet"
+\property Staff."midiInstrument" = "trumpet"
R2.*31 |
r4 r^\fermata r8 ^\fermata r |
timpani=\notes\relative c, {
\clef "bass";
-\property Staff."midi_instrument" = "timpani"
+\property Staff."midiInstrument" = "timpani"
r2. | % Ensure that the staff is printed on page 1 of the score.
R2.*5 |
"Statens Musikbibliotek, Stockholm, Sweden";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "wood.ly"
}
\translator {
\ScoreContext
- SkipBars = 1;
+ skipBars = 1;
markScriptPadding = "6.0";
textstyle = "italic";
textEmptyDimension = 1;
"Statens Musikbibliotek, Stockholm, Sweden";
}
-\version "1.0.16";
+\version "1.0.19";
\include "global.ly"
\include "wood.ly"
-\version "1.0.16";
+\version "1.0.19";
viI=\notes\relative c'' {
-\property Staff."midi_instrument" = "violin"
+\property Staff."midiInstrument" = "violin"
r4 r [g8.-> \mf ( a16 ] |
) g4 r c, \p |
viII=\notes\relative c' {
-\property Staff."midi_instrument" = "violin"
+\property Staff."midiInstrument" = "violin"
r4 r e-> \mf ~ |
e r e ( \p |
vla=\notes\relative c' {
\clef "alto";
-\property Staff."midi_instrument" = "viola"
+\property Staff."midiInstrument" = "viola"
[c8. \f ( d16 ] ) c2_"dim." |
\context Staff <{\voiceone s4 c2 |
vlc=\notes\relative c' {
\clef "bass";
-\property Staff."midi_instrument" = "cello"
+\property Staff."midiInstrument" = "cello"
r4 r [bes8. \mf ( c16] |
) bes4 r bes \p ( |
cb=\notes\relative c {
\clef "bass";
-\property Staff."midi_instrument" = "contrabass"
+\property Staff."midiInstrument" = "contrabass"
r4 r c-> \mf ~ |
c r c \p ( |
-\version "1.0.16";
+\version "1.0.19";
oboe=\notes\relative c'' {
\clef "treble";
-\property Staff."midi_instrument" = "oboe"
+\property Staff."midiInstrument" = "oboe"
[c8. \f ( d16] ) c2_"dim." |
[c8. ( d16] ) c2 |
flauto=\notes\relative c''' {
\clef "treble";
-\property Staff."midi_instrument" = "flute"
+\property Staff."midiInstrument" = "flute"
[c8. \f ( d16] c2 |
)c,8 r r4 r |
clarI=\notes\relative c'' {
\key G;
\clef "treble";
-\property Staff."midi_instrument" = "clarinet"
+\property Staff."midiInstrument" = "clarinet"
[d8. \fp ( e16 ] ) d2 |
[d8._"dim." ( e16 ] ) d2 |
clarII=\notes\relative c'' {
\key G;
\clef "treble";
-\property Staff."midi_instrument" = "clarinet"
+\property Staff."midiInstrument" = "clarinet"
[d8. \fp ( e16 ] ) d2 |
[d8._"dim." ( e16 ] ) d2 |
fagotto=\notes\relative c' {
\clef "bass";
-\property Staff."midi_instrument" = "bassoon"
+\property Staff."midiInstrument" = "bassoon"
[c8. \f ( d16 ] ) c2_"dim." |
[c8. ( d16 ] ) c4 r |
Ugh.. Wish we had grace notes.... It adds another dimension to this
piece of music. %}
-\version "1.0.16";
+\version "1.0.19";
cad = \notes \relative c' {
}
-\version "1.0.16";
+\version "1.0.19";
allegro =
\notes
\score
{
- { \property Score.SkipBars = 1
+ { \property Score.skipBars = 1
\romanze
}
\paper{ \tempo 4 = 70; }
copyright = "public domain";
latexheaders= "headers";
}
-\version "1.0.16";
+\version "1.0.19";
-%{
-Silly latex file dropped; use ly2dvi
-Converted to relative octave from los-toros-oboe.ly:
- :s/[^\}'/'x/g
- :s/'x//g
- (511 substitutions on 155 lines)
-
- lilypond -f los-toros-oboe 2> bla
- wc -l bla
- 138
- 138 / 3 = 46 octave quotes of 511 remain!
-
-%}
\include "paper16.ly"
\global
\property Staff.instrument = "oboe"
% don't expand multi-bar rest
- \property Score.SkipBars = 1
+ \property Score.skipBars = 1
\hoboone
>
("accBayanbaseE" . ((accordion "Bayanbase" "E") #f 0 -1 0))
("accBayanbaseTE" . ((accordion "Bayanbase" "TE") #f 0 -1 0))
("accBayanbaseEE" . ((accordion "Bayanbase" "EE") #f 0 -1 0))
- ("accBayanbaseTEE" . ((accordion "Bayanbase" "TFEE") #f 0 -1 0))
-;; I don't know what naming of standard base registers is best?
-;; The 'tenor-piano' style of names has been used in some old accordion
-;; scores I have seen. But you never name the registers. These four are
-;; the symbols that are most used then typesetting music, but in the real
-;; world it differs a lot from instrument to instrument what registers
-;; are available.
+ ("accBayanbaseTEE" . ((accordion "Bayanbase" "TEE") #f 0 -1 0))
("accStdbase" . ((accordion "Stdbase" "") #f 0 -1 0))
-;; tenor-piano
- ("accStdbaseTp" . ((accordion "Stdbase" "FE") #f 0 -1 0))
-;; tenor
- ("accStdbaseT" . ((accordion "Stdbase" "TFE") #f 0 -1 0))
-;; bass-piano
- ("accStdbaseBp" . ((accordion "Stdbase" "MES") #f 0 -1 0))
-;; master (changed from accStdbaseM)
- ("accStdbaseMa" . ((accordion "Stdbase" "TFMES") #f 0 -1 0))
-
("accStdbaseFE" . ((accordion "Stdbase" "FE") #f 0 -1 0))
("accStdbaseTFE" . ((accordion "Stdbase" "TFE") #f 0 -1 0))
("accStdbaseMES" . ((accordion "Stdbase" "MES") #f 0 -1 0))
newlines =[]
for x in lines:
x = re.sub ('\\\\type','\\\\context', x)
+ x = re.sub ('textstyle','textStyle', x)
newlines.append (x)
return newlines
- conversions.append ((1,0,16), conv, '\\type -> \\context')
+ conversions.append ((1,0,16), conv, '\\type -> \\context, textstyle -> textStyle')
+
+
+if 1:
+ def conv(lines):
+ newlines =[]
+ found = None
+ for x in lines:
+ found = re.search ('\\\\repeat',x)
+ newlines.append (x)
+ if found: break
+ if found:
+ sys.stderr.write ('\nNot smart enough to convert \\repeat')
+ raise FatalConversionError()
+ return newlines
+
+ conversions.append ((1,0,18), conv,
+ '\\repeat NUM Music Alternative -> \repeat FOLDSTR Music Alternative')
+
+if 1:
+ def conv(lines):
+ newlines =[]
+ for x in lines:
+ x = re.sub ('SkipBars','skipBars', x)
+ x = re.sub ('fontsize','fontSize', x)
+ x = re.sub ('midi_instrument','midiInstrument', x)
+ newlines.append (x)
+ return newlines
+
+ conversions.append ((1,0,19), conv,
+ 'fontsize -> fontSize, midi_instrument -> midiInstrument, SkipBars -> skipBars')
# bug-gnu-music@gnu.org
# help-gnu-music@gnu.org
#
-# All non-english comments are NOT in swedish, they are norwegian!
# TODO:
-# * output various stuff either via sys.stderr or sys.stdout, not using print.
+# * Spacing before and after mudela blocks should be fixed. No empy lines
+# before and after the mudela block should make just little space between
+# music and text, one or more empy lines should make bigger space, like
+# between paragraphs.
# * center option (??)
# * make mudela-book understand usepackage{geometry}
# * check that linewidth set in \paper is not wider than actual linewidth?
# 0.5.5: (Mats B)
# - bf: Default fragments have linewidth=-1.0
# - Added 'singleline' and 'multiline' options.
-
+# 0.5.6:
+# - \mudelafile{} set linewith correct, -1 for .sly and texlinewidth for .fly
+# - changes to Mudela_output
+# - changed RE to search for pre/postMudelaExample to make it possible to
+# comment out a definition.
+# - use sys.stderr and sys.stdout instead of print
import os
import string
import re
outdir = 'out'
initfile = ''
-program_version = '0.5.3'
+program_version = '0.5.6'
include_path = ['.']
out_files = []
onecolumn_re = re.compile('\\\\onecolumn')
mudela_file_re = re.compile('\\\\mudelafile{([^}]+)}')
file_ext_re = re.compile('.+\\.([^.}]+$)')
-preMudelaExample_re = re.compile('\\\\def\\\\preMudelaExample')
-postMudelaExample_re = re.compile('\\\\def\\\\postMudelaExample')
+preMudelaExample_re = re.compile('^\s*\\\\def\\\\preMudelaExample')
+postMudelaExample_re = re.compile('^\s*\\\\def\\\\postMudelaExample')
boundingBox_re = re.compile('%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)')
intertext_re = re.compile("intertext=\"([^\"]*)\"")
class Mudela_output:
+ """ Using only self.code_type to deside both value of linewith and
+ if we have to put code into \score{...} was silly. Now we use:
+ self.code_type: show us what need to be added.
+ None : init value
+ 'NOTES' : add \context Voice{ ... }
+ 'CONTEXT' : add \score{ ... }
+ 'COMPLETE' : jupp
+ self.single_line_b: 0 : linewidth=-1 1: linewith=textwidth
+ """
def __init__ (self, basename):
self.basename = basename
self.temp_filename = "%s/%s" %(outdir, 'mudela-temp.ly')
self.__lines = []
# 'tex' or 'eps'
self.graphic_type = 'tex'
- self.code_type = 'unknown'
- self.code_type_override = None
+ self.code_type = None
+ self.single_line_b = 1
+ self.optlist = []
def write (self, line):
- # match only if there is nothing but whitespace before \begin HACK
+ # match only if there is nothing but whitespace before \begin.
+ # we should not have to do this RE for every line
if re.search('^\s*\\\\begin{mudela}', line):
- self.scan_begin_statement(line)
- else:
- if self.code_type == 'unknown':
- if re.search('^\s*\\\\score', line) or \
- re.search('^\s*\\\\paper', line) or \
- re.search('^\s*\\\\header', line) or \
- re.search('^\s*[A-Za-z]*\s*=', line):
- self.code_type = 'ly'
+ r = begin_mudela_opts_re.search(line)
+ if r:
+ o = r.group()[1:-1]
+ self.optlist = re.compile('[\s,]*').split(o)
+ else:
+ self.optlist = []
+ else: # ugh this is NOT bulletproof...
+ if not self.code_type:
+ if re.search('^\s*%', line) or re.search('^\s*$', line):
+ pass
+ elif re.search('^\s*\\\\context', line):
+ self.code_type = 'CONTEXT'
+ self.single_line_b = 0
+ elif re.search('^\s*\\\\score', line) or \
+ re.search('^\s*\\\\paper', line) or \
+ re.search('^\s*\\\\header', line) or \
+ re.search('^\s*\\\\version', line) or \
+ re.search('^\s*\\\\include', line) or \
+ re.search('^\s*[A-Za-z]*\s*=', line):
+ self.code_type = 'COMPLETE'
+ self.single_line_b = 0
+ else:
+ self.code_type = 'NOTES'
+ self.single_line_b = 1
self.__lines.append(line)
- def scan_begin_statement(self, line):
- r = begin_mudela_opts_re.search(line)
- if r:
- o = r.group()[1:-1]
- optlist = re.compile('[\s,]*').split(o)
- else:
- optlist = []
- if 'fragment' in optlist:
- self.code_type_override = 'sly'
- if 'nonfragment' in optlist:
- self.code_type_override = 'ly'
- if 'singleline' in optlist:
- self.code_type_override = 'sly'
- if 'multiline' in optlist:
- self.code_type_override = 'fly'
- if 'eps' in optlist:
+ def write_red_tape(self):
+ if 'eps' in self.optlist:
self.graphic_type = 'eps'
+ #self.single_line_b = 1
+ if 'fragment' in self.optlist:
+ self.code_type = 'NOTES'
+ if 'nonfragment' in self.optlist:
+ self.code_type = 'COMPLETE'
+ if 'multiline' in self.optlist:
+ self.single_line_b = 0
for pt in fontsize_pt2i.keys():
- if pt in optlist:
+ if pt in self.optlist:
Props.setMudelaFontsize(fontsize_pt2i[pt], 'block')
- def write_red_tape(self):
self.file.write ('\\include \"paper%d.ly\"\n' \
% Props.getMudelaFontsize())
s = fontsize_i2a[Props.getMudelaFontsize()]
- if self.code_type == 'sly':
+ if 'singleline' in self.optlist:
+ self.single_line_b = 1
+ if self.single_line_b:
linewidth_str = 'linewidth = -1.\cm;'
- self.code_type = 'fly'
else:
linewidth_str = 'linewidth = %i.\\pt;' % Props.getLineWidth()
self.file.write("\\paper {"
+ linewidth_str
+ "castingalgorithm = \Gourlay; \n}")
#+ "castingalgorithm = \Wordwrap; indent = 2.\cm; \n}")
- if self.code_type == 'fly':
+ if self.code_type == 'CONTEXT':
self.file.write('\\score{\n\\notes\\relative c{')
+ if self.code_type == 'NOTES' :
+ self.file.write('\\score{\n\\notes\\relative c{\\context Voice{')
def close (self):
- if self.code_type == 'unknown':
- self.code_type = 'sly'
- if self.code_type_override:
- self.code_type = self.code_type_override
self.write_red_tape()
for l in self.__lines:
self.file.write(l)
- if self.code_type == 'fly':
+ if self.code_type == 'CONTEXT':
self.file.write('}}')
-
+ elif self.code_type == 'NOTES':
+ self.file.write('}}}')
self.file.close()
inf = outdir + self.basename + '.ly'
return recompile_b
def insert_me_string(self):
- "Returns a string that can be used directly in latex."
+ "ugh the name of this function is wrong"
if self.graphic_type == 'tex':
return ['tex', self.basename]
elif self.graphic_type == 'eps':
if s != '':
e = os.system('cd %s; lilypond %s' %(outdir, s))
if e:
- print "error: lilypond exited with value", e
+ sys.stderr.write("error: lilypond exited with value %i\n" % e)
sys.exit(e)
for g in g_vec:
if g[0] == 'eps':
for line in self.__lines:
if type(line)==type([]):
if line[0] == 'tex':
- file.write('\\preMudelaExample\\input %s\n\postMudelaExample '\
+ #\\def\\interscoreline{}
+ file.write('\\preMudelaExample \\input %s \\postMudelaExample\n'\
# TeX applies the prefix of the main source automatically.
% (line[1]+'.tex'))
# % (outdir+line[1]+'.tex'))
if line[0] == 'eps':
ps_dim = ps_dimention(outdir+line[1]+'.eps')
- file.write('\\parbox{%ipt}{\includegraphics{%s}}\n' \
+ file.write('\\noindent\\parbox{%ipt}{\includegraphics{%s}}\n' \
% (ps_dim[0], line[1]+'.eps'))
# % (ps_dim[0], outdir+line[1]+'.eps'))
else:
retlines = retlines + ls[0]
retdeps = retdeps + ls[1]
except:
- print "warning: can't find %s, let's hope latex will" \
- % r_inp.groups()[0]
+ sys.stderr.write("warning: can't find %s, let's hope latex will\n" % r_inp.groups()[0])
retlines.append (line)
elif r_inc:
try:
retlines = retlines + ls[0]
retdeps = retdeps + ls[1]
except:
- print "warning: can't find %s, let's hope latex will" \
- % r_inc.groups()[0]
+ sys.stderr.write("warning: can't find %s, let's hope latex will" % r_inc.groups()[0])
retlines.append (line)
else:
# This code should be rewritten, it looks terrible
fn = r.group (1)
full_path = find_file (fn)
if not full_path:
- print 'error: can\'t find file `%s\'.' % fn
+ sys.stderr.write("error: can't find file '%s'\n" % fn)
sys.exit (1)
-
- r = file_ext_re.search(fn)
- if r:
- self.code_type = r.group(1)
-
f = open (full_path, 'r')
lines =f.readlines ()
for x in lines:
self.mudela.write (x)
+ r = file_ext_re.search(fn)
+ if r:
+ if r.group(1) == 'fly':
+ self.mudela.optlist.append('multiline')
stat =self.mudela.close ()
if stat:
- print "(File %s needs recompiling)\n" % full_path
+ sys.stdout.write("(File %s needs recompiling)\n" % full_path)
self.mudtex.write (self.mudela.insert_me_string())
self.deps.append (full_path)
del self.mudela
def write_deps (fn, out, deps):
out_fn = os.path.join (outdir, fn)
- print 'writing `%s\'\n' % out_fn
+ sys.stdout.write('writing `%s\'\n' % out_fn)
f = open (out_fn, 'w')
target = re.sub (os.sep + os.sep, os.sep, os.path.join (outdir, out + '.latex'))
'help', 'dependencies', 'include=',
'force-verbatim', 'init='])
except getopt.error, msg:
- print "error:", msg
+ sys.stderr.write("error: %s" % msg)
sys.exit(1)
do_deps = 0
elif o == '--outname' or o == '-o':
if len(files) > 1:
#HACK
- print "Mudela-book is confused by --outname on multiple files"
+ sys.stderr.write("Mudela-book is confused by --outname on multiple files")
sys.exit(1)
outname = a
elif o == '--outdir' or o == '-d':
do_deps = 1
elif o == '--default-mudela-fontsize':
if not fontsize_pt2i.has_key(a):
- print "Error: illegal fontsize:", a
- print " accepted fontsizes are: 11pt, 13pt, 16pt, 20pt, 26pt"
+ sys.stderr.write("Error: illegal fontsize: %s" % a)
+ sys.stderr.write(" accepted fontsizes are: 11pt, 13pt, 16pt, 20pt, 26pt")
sys.exit()
Props.setMudelaFontsize(fontsize_pt2i[a], 'init')
elif o == '--force-mudela-fontsize':
if not fontsize_pt2i.has_key(a):
- print "Error: illegal fontsize:", a
- print " accepted fontsizes are: 11pt, 13pt, 16pt, 20pt, 26pt"
+ sys.stderr.write("Error: illegal fontsize: %s" % a)
+ sys.stderr.write(" accepted fontsizes are: 11pt, 13pt, 16pt, 20pt, 26pt")
sys.exit()
Props.force_mudela_fontsize = fontsize_pt2i[a]
elif o == '--force-verbatim':
# r""" ... """ means: leave escape seqs alone.
defined_mudela_cmd = {'mudela': r"""
-\begin{mudela}[eps \fontoptions]
+\begin{mudela}[eps, singleline \fontoptions]
\context Staff <
\context Voice{
\maininput