+-*- text -*-
+
[DRAFT]
Keywords: midi notation music typesetting gnu font engraving
* --safe option for the paranoid
-* Exact spacing for text (eg. Lyrics)
+* More elegant spacing. Text is spaced exactly.
-* mutopia archive is now a separate effort
+* The Mutopia archive is now a separate effort
* lots of bugfixes
)
the last c being an octave higher than the first. If you have to
-enter an interval that is greater than a fourth, you must specify
+enter an interval that is greater than a fifth, you must specify
whether the pitch goes up, using post-quotes:
verb(
c c' % octave up
- c g' % fourth up
+ c g' % fifth up
)
or down, using pre-quotes:
verb(
c c, % octave down
- c f, % fourth down
+ c f, % fifth down
)
nsect(CONVERTING)
+COMMENT(Old? don't understand -- jcn
To convert a piece of music from the old absolute-octave notation to
-relative octaves, lilypond provides the bf(-Q, --find-fourths) feature
-to locate all big intervals in your music (sorry, fully automated convert
-is too complex).
+)
+To convert a piece of music from absolute-octave notation to
+relative octaves, lilypond provides the bf(-Q, --find-old-relative)
+COMMENT(
+urg, name was changed to 'old-relative'? It simply helps convert
+from absolute to relative, ie handy for mi2mu output?
+)
+feature to locate all big intervals in your music.
First, edit the .ly file, add "\relative c" to all melodic chunks:
)
and remove all "\octave " commands. See the example file
-file(input/test/find-fourths.ly).
+file(input/test/find-fifths.ly).
-Use lily to find the fourths
+Use lily to find the fifths:
verb(
- lilypond -Q find-fourths.ly 2>&1 | tee fourths
+ lilypond -Q find-fifths.ly 2>&1 | tee fifths
...
- find-fourths.ly:3:18: warning: Interval greater than fourth, relative: g':
+ find-fifths.ly:3:18: warning: Interval greater than fourth, relative: g':
c d c f c g
c b, c g, c f, c c'' c
- find-fourths.ly:3:20: warning: Interval greater than fourth, relative: c,:
+ find-fifths.ly:3:20: warning: Interval greater than fourth, relative: c,:
c d c f c g c
b, c g, c f, c c'' c
)
\vskip5mm
-\listfont{\fetatwenty}{0}{123}
+\listfont{\fetatwenty}{0}{102}
% urg
\vskip-\charheight
\listfont{\fetanumber}{48}{58}
section. Slurs that start within a grace section, but aren't ended are
attached to the next normal note. Grace notes have zero duration
+
+
\mudelafile{grace.ly}
\section{Beams, slurs and other spanners}
+Beaming is generated automatically. Beams may cross bar lines. In that
+case, line breaks are forbidden. Yet clef and key signatures are
+hidden just as with breakable bar lines.
+
+\mudelafile{beaming.ly}
+
%Beams should not interfere with various items on the staff (amongst
%others repeat signs)
%
Beams can be typeset over fixed distance aligned staffs, beam
beautification doesn't really work, but knees do. Beams should be
-behave well, whereever the switching point is.
+behave well, wherever the switching point is.
\mudelafile{beam-interstaff.ly}
\mudelafile{repeat-unfold.ly}
-Semi (un)folded behavior:
+Semi (un)folded behavior. Voltas can start on non-barline moments.
\mudelafile{repeat-semifold.ly}
c''-\open c''-\flageolet c''-\reverseturn
c''-\trill
c''-\prall c''-\mordent c''-\prallprall c''-\prallmordent
- c''-\upprall c''-\downprall c''-\thumb }
+ c''-\upprall c''-\downprall c''-\thumb c''-\segno c''-\wheel}
\context Lyrics \lyrics{
accent__ marcato__ staccatissimo__ fermata stopped__
staccato__ tenuto__ upbow downbow__ lheel__ rheel__ ltoe
rtoe__ turn__ open__ flageolet reverseturn__ trill__ prall__
- mordent prallprall__ prallmordent__ uprall__ downprall thumb }
+ mordent prallprall__ prallmordent__ uprall__ downprall thumb
+ segno wheel}
>
\paper{ linewidth = 5.875\in;
indent = 0.0; }
dit(code(barNumberScriptPadding)) Sets extra space between the bar
number and the bar it labels.
+dit(code(barSize)) Specify the height of the bar lines if it should be
+different than the staff height.
+
dit(code(markHangOnClef)) Set to 1 to cause marks to appear by clefs
instead of by bar lines.
dit(code(staffLineLeading)) Specifies the distance (in points) between lines
of the staff.
+dit(code(numberOfStaffLines)) Specifies the number of staff lines. The
+default is 5.
+
dit(code(postBreakPadding)) Extra space in points to be added after
the clef, time signature and key signature on the staff.
shortest note in the measure. Typically arithmetic_basicspace is set
to the width of a quarter note head.
-dit(code(barsize)) Specify height of bars. This value may need to be
-adjusted if you change the number of lines in the staff.
dit(code(beam_dir_algorithm)) Specify algorithm for determining
whether beams go up or down. It is real valued. If set to 2.0 then
majority selection is used. If set to 3.0, then mean selection is
testing
it()nemail(Franc,ois Pinard)(pinard@iro.umontreal.ca),
parts of Documentation/Vocab*, started internationalization stuff
+it()nemail(Glen Prideaux)(glenprideaux@iname.com),
+ minor bug fix to script used to generate doc++ documentation
it()nemail(Jeffrey B. Reed)(daboys@austin.rr.com),
Windows-NT support.
it()Shay Rojanski
itemize(
it()The -O2 option triggers bugs on various platforms (PowerPC, Alpha).
- If you experience problems, you should first try turning off this.
+ If you experience problems, you should first try turning off
+ this.
+it() On PPC you need at least EGCS-1.1.2f.
)
nsect(EXAMPLE)
showln -sf $LILYPOND_SOURCEDIR/mi2mu/out/mi2mu $prefix/bin/mi2mu
showln -sf $LILYPOND_SOURCEDIR/scripts/out/ly2dvi $prefix/bin/ly2dvi
showln -sf $LILYPOND_SOURCEDIR/scripts/out/mudela-book $prefix/bin/mudela-book
+showln -sf $LILYPOND_SOURCEDIR/buildscripts/out/genheader $prefix/bin/genheader
chmod 755 $LILYPOND_SOURCEDIR/buildscripts/ps-to-gifs.sh
showln -sf $LILYPOND_SOURCEDIR/buildscripts/ps-to-gifs.sh $prefix/bin/ps-to-gifs
}
+
+ T& boundary (int dir, int idx)
+ {
+ assert (dir);
+ if (dir == 1)
+ return top (idx);
+ else
+ return elem_ref (idx);
+ }
+ T boundary (int dir, int idx) const
+ {
+ assert (dir);
+ if (dir == 1)
+ return top (idx);
+ else
+ return elem (idx);
+ }
void swap (int i,int j)
{
T t ((*this)[i]);
#ifdef __powerpc__
{
/*
- urg: wierd egcs-1.1.2 bug on ppc
+ urg: wierd egcs-1.1.2-12c (stock LinuxPPC R5) bug on ppc
bug report filed
+ fixed in egcs-1.1.2-12f
+ ftp://dev.linuxppc.org/users/fsirl/R5/RPMS/ppc/
*/
*dest = *src;
dest++, src++;
head_ =0;
nil_pointer_address_ = &head_;
}
+ void append (T *c)
+ {
+ append (new Cons<T> (c,0));
+ }
void append (Cons<T> *c)
{
assert (!c->next_);
return ::remove_cons (pp);
}
+
+ /// junk everything after the first I elements.
+ void truncate (int i)
+ {
+ Cons<T> **p = &head_;
+ for (; *p && i; p = &((*p)->next_))
+ {
+ i--;
+ }
+
+ if (*p)
+ {
+ delete *p;
+ *p = 0;
+ }
+ nil_pointer_address_ = p;
+ }
+
void junk ()
{
delete head_;
piece = "1. Overture";
}
-\version "1.0.21";
+\version "1.1.52";
global=\notes{
\time 2/2;
--- /dev/null
+\score { \notes\context Staff\relative c'' {
+
+% less alts than body
+\repeat semi 4 { c^"4$\\times$ 2alt" d } \alternative { e f } \repeat "semi" 2 c4
+}}
\score {
- \notes \transpose c''{ c\longa*1/4 c\breve*1/2 c1 c2 c4 c8 c16 c32 c64 }
+ \notes \transpose c'' \context Staff { c\longa*1/4 c\breve*1/2 c1 c2 c4 c8 c16 c32 c64 }
\paper {
\translator {
\StaffContext
- \remove "Staff_symbol_engraver";
+ % \remove "Staff_symbol_engraver";
\remove "Time_signature_engraver";
\remove "Bar_engraver";
\remove "Clef_engraver";
-
+%
+% Jan -> dit is Auto_B_E bug, niet grouping bug.
+%
\score{
\notes{ \time 13/8;
-\version "1.0.21";
+\version "1.1.52";
one = \notes\relative c{
c'' d e f
}
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
blah = \notes {
Tested Features: example file with comments
%}
-\version "1.0.21";
+\version "1.1.52";
% the % is a comment.
-\version "1.0.21";
+\version "1.1.52";
part = \notes {
c-1 c c c
r1*3
% \lbheel \lbheel \lfheel \lftoe
% \rbheel \rbtoe \rfheel \rftoe
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes {
* organ staff...
%}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
ritme = \notes\transpose c'' {
\time 4/4;
\time 5/16;
% divide measure in 5 equal parts. Usually it 2+3 or 3+2
- \grouping 16*5 ;
+
[c8 c16 c8 ] | % watch THIS!
\times 5/4 { [ c16 c16 c16 c16] } |
\time 2/8;
% scales with accents.
%
-\version "1.0.21";
+\version "1.1.52";
blah = \notes {
\time 6/8;
\transpose c {
-\version "1.0.21";
+\version "1.1.52";
blah = \notes{ \transpose c'' {
}
-\version "1.0.21";
+\version "1.1.52";
}
}
-\version "1.0.21";
+\version "1.1.52";
--- /dev/null
+global = \notes {
+ \key a \minor;
+ \time 6/4;
+% \skip 1.*34;
+% \bar ".|";
+}
+
+melody = \notes\relative c''{
+ r2 r r
+ r2 r r
+ r4 a'8-- \< a-- a-- a-- c-- \!b-- a--\> gis f \!e
+ es8 \grace b c r4 r2 r
+}
+
+basloopje = \notes\relative c{
+ d,8( a' d f a d f d a f d )a
+}
+
+accompany = \notes \relative c{
+ \notes\relative c \basloopje
+ \notes\relative c \basloopje
+ \notes\relative c \basloopje
+ \notes\relative c \basloopje
+}
+
+\score{
+ \notes{
+ \context AutoSwitchGrandStaff \relative c <
+ \global
+ \context Staff=upper {
+ \context Voice=foo
+ \property Voice.verticalDirection = 1
+ \property Voice.scriptVerticalDirection = 1
+ \melody
+ }
+ \context AutoSwitchContext \accompany
+ >
+ }
+
+ \paper {
+ gourlay_maxmeasures = 4.;
+ indent = 8.\mm;
+ textheight = 295.\mm;
+
+ % no slur damping
+ slur_slope_damping = 100.0;
+
+ \translator{
+ \StaffContext
+ % don't auto-generate bars: not a good idea: -> no breakpoints
+ % barAuto = "0";
+ % urg defaultBarType = "";
+ defaultBarType = "empty";
+ \remove "Time_signature_engraver";
+ }
+ \translator{
+ \GraceContext
+ \remove "Local_key_engraver";
+ }
+ \translator {
+ \ScoreContext
+ \accepts AutoSwitchGrandStaff;
+ }
+ \translator{
+ \type "Engraver_group_engraver";
+ \name AutoSwitchGrandStaff;
+ \consists "Span_bar_engraver";
+ \consists "Vertical_align_engraver";
+ \consists "Piano_bar_engraver";
+ \consistsend "Axis_group_engraver";
+ minVerticalAlign = 2.*\staffheight;
+ maxVerticalAlign = 2.*\staffheight;
+ switcherName = "Voice";
+ acceptorName = "Thread";
+ staffContextName = "Staff";
+
+ \accepts "AutoSwitchContext";
+ \accepts "Staff";
+ slurVerticalDirection = 1;
+ verticalDirection = -1;
+ beamAutoEnd = "1/2";
+ }
+ \translator {
+ \type "Engraver_group_engraver";
+ \name "AutoSwitchContext";
+ \consists "Staff_switching_translator";
+ }
+ }
+% broken 1.1.51.hwn2
+% \midi {
+% \tempo 4 = 54;
+% }
+}
+
}}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
onestaff = \context Staff = foo\notes {
\property Staff.instr = instr
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes\transpose c'{
}
}
-\version "1.0.21";
+\version "1.1.52";
}
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes\transpose c''{
--- /dev/null
+
+\score { \context Staff \notes \relative c'' {
+ [c8. c16]
+ [c8. c16 c8. c16]
+ [c16 c8.] |
+ [c8. c16 c16 c8.]
+ [c8. c32 c32]
+ [c8 c8] |
+ [c16 c16]
+ [c32 c32]
+ [c64 c64]
+ c32
+ [c8 c,4 c'8] % should warn here!
+ [c8 c c] c8 % over barline
+ [c16 c8 c16]
+ [c32 c16 c16 c16 c32]
+ [c32 c16 c8 c32] % hmm ?
+
+ }}
+
TestedFeatures = "beams and beamflags";
}
-\version "1.0.21";
+\version "1.1.52";
\score{
<
-\version "1.0.21";
+\version "1.1.52";
\score {
\notes \relative c' {
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.21";
+\version "1.1.52";
shortlong = \notes{
c4()c( c c |
>
}
-\version "1.0.21";
+\version "1.1.52";
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
%{
Would this be acceptable/good enough/convenient for entry?
-\version "1.0.21";
+\version "1.1.52";
\score {
\notes{
copyright = "public domain";
Tested = "test the Collision resolution ";
}
-\version "1.0.21";
+\version "1.1.52";
twovoice = \context Staff \notes <
\context Voice=i { \stemdown c4 d e f g2~ g4 a [c8 d e f] c2| }
-\version "1.0.21";
+\version "1.1.52";
\score {
\include "paper20.ly"
-\version "1.0.21";
+\version "1.1.52";
oden = \lyrics{
O8 |
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes{
>
}
-\version "1.0.21";
+\version "1.1.52";
}
-\version "1.0.21";
+\version "1.1.52";
--- /dev/null
+\version "1.0.21";
+
+\score{
+ \notes \relative c {
+ c d c f c g c b, c g, c f, c c'' c
+% run with find-quarts should suggest:
+% c d c f c g' c, b c g c f, c' c'' c,,
+ }
+}
+
-\version "1.0.21";
+\version "1.1.52";
FontBody= \notes\transpose c''{
\bar "|:";
a\mf_\fermata a\f-\stopped a\ff-\open a\fff^\trill|
a\fp-\reverseturn a4.\sf a4.\sfz | a4\fz % a\rf
[c8-\prall c-\mordent] [a'-\prallmordent a'-\prallprall]
- [c8-\upprall a'8-\downprall] [a' c] |
+ [c8-\upprall a'8-\downprall] [a'-\segno c-\wheel] |
[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.21";
+\version "1.1.52";
\include "font-body.ly"
\score{
% "(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.21";
+\version "1.1.52";
\include "paper16.ly"
\include "font-body.ly"
gourlay_maxmeasures =5.;
}
}
-\version "1.0.21";
+\version "1.1.52";
TestedFeatures = "This file tests some nasty Gourlay spacings";
}
-\version "1.0.21";
+\version "1.1.52";
%{
-\version "1.0.21";
+\version "1.1.52";
toeter_i = \notes\relative c <{
\property Staff.instrument = "Toeters"
/Mats B
%}
-\version "1.0.21";
+\version "1.1.52";
incipit = \notes\relative c'{
<b1 fis' b d>
-\version "1.0.21";
+\version "1.1.52";
%{
test key itemv breaking
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes\relative c'{
[c16 \stemdown c'' \stemboth c,, d]
-\version "1.0.21";
+\version "1.1.52";
global = \notes {
s1 | \mark "A";
>
\paper { Gourlay_maxmeaures = 2.; }
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
voice_one = \notes\transpose c''{ \stemup
R1 * 2 | f'4-. r r2 | R1 * 3 |
}
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes \transpose c''{
-c' c c \property Staff . numberOfStaffLines = 3
+c' c c c | g' g g g \property Staff . numberOfStaffLines = 3
-\version "1.0.21";
+\version "1.1.52";
m = \notes \relative c''{
c1 | c2 c | c c | c c | c c | c c | c c | c c |
-\version "1.0.21";
+\version "1.1.52";
\score {
--- /dev/null
+c8 c c ~ c c c c ~ c ~ c ~ c ~ c c c
+%\grace { d16 c16 d16 } c8
--- /dev/null
+c'' d e f | \repetitions1*3 |
+\time 3/4;
+g4 a b | R2.*2 |
}
}
-\version "1.0.21";
+\version "1.1.52";
--- /dev/null
+\score{
+ \context RhythmicStaff {
+ \notes\relative c''{
+ \time 4/4;
+ r4 r g2 | r4 g r2 | g1:32 | r1 |
+ }
+ }
+}
--- /dev/null
+% sharp-major
+% c g d a e b fis cis
+
+\key c;
+c' d e f g a b c
+
+\key g;
+g a b c d e fis g
+
+\key d;
+d, e fis g a b cis d
+
+\key a;
+a b cis d e fis gis a
+
+\key e;
+e, fis gis a b cis dis e
+
+\key b;
+b cis dis e fis gis ais b
+
+\key fis;
+fis, gis ais b cis dis eis fis
+
+\key cis;
+cis, dis eis fis gis ais bis cis
+
+% sharp-minor
+% a e b fis cis gis dis ais
+
+\key a\minor;
+a b c d e f gis a
+
+\key e\minor;
+e, fis g a b c dis e
+
+\key b\minor;
+b cis d e fis g ais b
+
+\key fis\minor;
+fis, gis a b cis d eis fis
+
+\key cis\minor;
+cis, dis e fis gis a bis cis
+
+\key gis\minor;
+gis ais b cis dis e fisis gis
+
+\key dis\minor;
+dis, eis fis gis ais b cisis dis
+
+\key ais\minor;
+ais bis cis dis eis fis gisis ais
+
+% flat-major
+% c f bes es as des ges ces
+
+\key f;
+f, g a bes c d e f
+
+\key bes;
+bes, c d es f g a bes
+
+\key es;
+es,, f g as bes c d es
+
+\key as;
+as, bes c des es f g as
+
+\key des;
+des,, es f ges as bes c des
+
+\key ges;
+ges, as bes ces des es f ges
+
+\key ces;
+ces,, des es fes ges as bes ces
+
+% flat-minor
+% a d g c f bes es as
+
+\key d\minor;
+d, e f g a bes cis d
+
+\key g\minor;
+g, a bes c d es fis g
+
+\key c\minor;
+c,, d es f g as b c
+
+\key f\minor;
+f, g as bes c des e f
+
+\key bes\minor;
+bes, c des es f ges a bes
+
+\key es\minor;
+es,, f ges as bes ces d es
+
+\key as\minor;
+as, bes ces des es fes g as
+
-\version "1.0.21";
+\version "1.1.52";
onestaff = \context Staff = foo\notes {
\property Staff.instr = instr
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.21";
+\version "1.1.52";
shortlong = \notes{
c4()c( c c |
-\version "1.0.21";
+\version "1.1.52";
% bug
% excentric slur can't handle this ...
% test damping
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes\relative c'{
}
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
% urg, the direction of the slur gets swapped!
\score{
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes\transpose c'{
}
}
-\version "1.0.21";
+\version "1.1.52";
TestedFeatures = "This file tests various spacings";
}
-\version "1.0.21";
+\version "1.1.52";
multipart = \notes \relative c'{
\context StaffGroup <
-\version "1.0.21";
+\version "1.1.52";
nt = \notes { c1 \break c1 c1 }
stuff = \notes \relative c'' <
\context Staff = stone { \nt }
-\version "1.0.21";
+\version "1.1.52";
\score {
}
-\version "1.0.21";
+\version "1.1.52";
>
\paper { linewidth = -1.; }
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes \transpose c'''{
\stemup
}
-\version "1.0.21";
+\version "1.1.52";
beamintervals = \notes{
\time 7/4;
instrument= "Violoncello";
}
-\version "1.0.21";
+\version "1.1.52";
% this is an example of extreme dynamics
-\version "1.0.21";
+\version "1.1.52";
$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.21";
+\version "1.1.52";
\score { \notes \relative c'' {
[<a8_\thumb a'8-3(> <)b_\thumb b'-3>
-\version "1.0.21";
+\version "1.1.52";
% middle tie is wrong
-\version "1.0.21";
+\version "1.1.52";
tie = \notes\transpose c''{
instrument= "Instrument";
}
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes
}
-\version "1.0.21";
+\version "1.1.52";
vOne = \notes \relative c''{
\clef"violin";
}
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
\score {
\notes <
}
}
-\version "1.0.21";
+\version "1.1.52";
}
}
-\version "1.0.21";
+\version "1.1.52";
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.21";
+\version "1.1.52";
\score{
\notes{
copyright = "public domain";
}
-%{
-Tested Features lyrics and chords
-%}
-
-\version "1.0.21";
+\version "1.1.52";
melodie = \notes\relative c'' {
\clef "violin";
text = \lyrics{
\property Lyrics . textStyle = "italic"
- Ah!4 vous dir- ai_- je ma man2
+ Ah!4 vous dir- ai- je ma man2
Ce4 qui cau- se mon tour- ment2
Pa-4 pa veut que je rai- so- nne
Comme4 un- e grand- e per- so- nne
Tested Features: lyrics, interleaving lyrics and staffs, repeats
%}
-\version "1.0.21";
+\version "1.1.52";
melody = \notes \relative c'' {
\clef violin;
tekst = \lyrics{
Al-4 tijd is Kort- jak- je ziek,2
- midden4 in_de week maar s,_zon- dags niet.2
- s,_Zon-4 dags gaat ze naar de kerk,2
+ midden4 "in de" week maar "'s zon-" dags niet.2
+ "'s Zon-"4 dags gaat ze naar de kerk,2
met4 een boek vol zil- ver werk.2
Al-4 tijd is Kort- jak- je ziek,2
- midden8 _8 in_de8 _8 week4 maar s,_zon- dags niet.2
+ mid-8 den in de week4 maar "'s zon-" dags niet.2
}
hegedraagjetekst = \lyrics{
Al-4 tijd zuigt Bill Gates mijn piek,2
"\TeX"4 is slecht- ser dan mu- ziek.2
- s,_Zon-4 dags gaat het door een raam,2
+ "'s Zon-"4 dags gaat het door een raam,2
Weet4 dat ik me er- voor schaam.2
Al-4 tijd zuigt Bill Gates mijn piek,2
"\TeX"4 is slecht- ser dan mu- ziek.2
texte = \lyrics{
\property Lyrics . textStyle" = "italic"
% \property Lyrics . textStyle" = "roman"
- Ah!4 vous dir- ai_- je ma- man2
+ Ah!4 vous dir- ai- je ma- man2
Ce4 qui cau- se mon tour- ment2
Pa-4 pa veut que je rai- son- ne
Comm' u- ne gran- de per- son- ne
textiii = \lyrics{
Then4 the tra- veler in the dark2
Thanks4 you for your ti- ny spark;2
- He_could4 not see which way to go,2
+ He4 could not see which way8 to8 go,2
If4 you did not twin- kle so.2
Twin-4 kle, twin- kle, lit- tle star,2
How4 I won- der what you are!2
#include "audio-element.hh"
#include "debug.hh"
-
+Audio_element::Audio_element ()
+{
+}
Audio_element::~Audio_element()
{
#include "debug.hh"
#include "audio-item.hh"
#include "midi-item.hh"
-#include "request.hh"
#include "audio-column.hh"
Audio_instrument::Audio_instrument (String instrument_str)
- : Audio_item (0)
{
str_ = instrument_str;
}
-Midi_item*
-Audio_instrument::midi_item_p()
-{
- return str_.length_i() ? new Midi_instrument(0, str_) : 0;
-}
-
-
-Audio_item::Audio_item (Request* req_l)
+Audio_item::Audio_item ()
{
audio_column_l_ = 0;
- req_l_ = req_l;
-}
-
-Audio_key::Audio_key (Request* req_l)
- : Audio_item (req_l)
-{
}
-Midi_item*
-Audio_key::midi_item_p()
-{
- return new Midi_key (this);
-}
-
-
-Audio_note::Audio_note (Request* req_l, int transposing_i)
- : Audio_item (req_l)
+Audio_note::Audio_note (Musical_pitch p, Moment m, int transposing_i)
{
+ pitch_ = p;
+ length_mom_ = m;
transposing_i_ = transposing_i;
}
-Midi_item*
-Audio_note::midi_item_p()
+Audio_key::Audio_key (Key_def const& k)
{
- return new Midi_note (this);
+ key_ = k;
}
-
-
Audio_tempo::Audio_tempo (int per_minute_4_i)
- : Audio_item (0)
{
per_minute_4_i_ = per_minute_4_i;
}
-Midi_item*
-Audio_tempo::midi_item_p()
+Audio_time_signature::Audio_time_signature (int beats, int one_beat)
{
- return new Midi_tempo (this);
+ beats_i_ = beats;
+ one_beat_i_ = one_beat;
}
-
-
-Audio_time_signature::Audio_time_signature (Request* req_l)
- : Audio_item (req_l)
+Audio_text::Audio_text (Audio_text::Type type, String text_str)
{
+ text_str_ = text_str;
+ type_ = type;
}
-Midi_item*
-Audio_time_signature::midi_item_p()
+Audio_tie::Audio_tie ()
{
- return new Midi_time_signature (this);
+ note_l_drul_[RIGHT] = 0;
+ note_l_drul_[LEFT] = 0;
}
-
-
-Audio_text::Audio_text (Audio_text::Type type, String text_str)
- : Audio_item (0)
+void
+Audio_tie::set_note (Direction d, Audio_note* note_l)
{
- text_str_ = text_str;
- type_ = type;
-}
+ assert (!note_l_drul_[d]);
+ note_l_drul_[d] = note_l;
+ //set_bounds (d, head_l);
-Midi_item*
-Audio_text::midi_item_p()
-{
- return text_str_.length_i() ? new Midi_text(this) : 0;
+ // add_dependency (head_l);
}
void
{
DOUT << "at: "<< audio_column_l_->at_mom ();
}
- if (req_l_)
- {
- DOUT << "from: ";
- req_l_->print ();
- }
#endif
}
(c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
*/
-
+#include "new-beaming.hh"
#include "auto-beam-engraver.hh"
#include "musical-request.hh"
#include "bar.hh"
#include "beam.hh"
-#include "rhythmic-grouping.hh"
#include "rest.hh"
#include "stem.hh"
#include "debug.hh"
-#include "time-description.hh"
+#include "timing-engraver.hh"
+#include "engraver-group-engraver.hh"
ADD_THIS_TRANSLATOR (Auto_beam_engraver);
finished_beam_p_ = 0;
finished_grouping_p_ = 0;
grouping_p_ = 0;
+ timer_l_ =0;
+}
+
+void
+Auto_beam_engraver::do_creation_processing ()
+{
+ Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver");
+ timer_l_ = dynamic_cast<Timing_engraver*> (t);
}
void
void
Auto_beam_engraver::consider_end_and_begin ()
{
- Time_description const *time = get_staff_info().time_C_;
+ if (!timer_l_)
+ return;
+
+ Time_description const *time = &timer_l_->time_;
int num = time->whole_per_measure_ / time->one_beat_;
int den = time->one_beat_.den_i ();
String time_str = String ("time") + to_str (num) + "_" + to_str (den);
assert (!stem_l_arr_p_);
stem_l_arr_p_ = new Array<Stem*>;
assert (!grouping_p_);
- grouping_p_ = new Rhythmic_grouping;
+ grouping_p_ = new Beaming_info_list;
+ beam_start_moment_ = now_mom ();
+ beam_start_location_ = timer_l_->time_.whole_in_measure_;
}
Beam*
{
if (finished_beam_p_)
{
- Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_;
- rg_C->extend (finished_grouping_p_->interval());
- finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_);
+ finished_grouping_p_->beamify ();
+ finished_beam_p_->set_beaming (finished_grouping_p_);
typeset_element (finished_beam_p_);
finished_beam_p_ = 0;
void
Auto_beam_engraver::acknowledge_element (Score_element_info info)
{
+ if (!same_grace_state_b (info.elem_l_) || !timer_l_)
+ return;
+
if (stem_l_arr_p_)
{
if (Beam *b = dynamic_cast<Beam *> (info.elem_l_))
{
- if (same_grace_state_b (b))
- junk_beam ();
+ junk_beam ();
}
else if (Bar *b = dynamic_cast<Bar *> (info.elem_l_))
{
- if (same_grace_state_b (b))
- junk_beam ();
+ junk_beam ();
}
- else if (Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_))
+ else if (Rest* rest_l = dynamic_cast<Rest *> (info.elem_l_))
{
- if (Rest* rest_l = dynamic_cast<Rest *> (info.elem_l_))
+ end_beam ();
+ }
+ else if (Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_))
+ {
+ Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_);
+ if (!rhythmic_req)
{
- if (same_grace_state_b (rest_l))
- end_beam ();
+ programming_error ("Stem must have rhythmic structure");
+ return;
}
- else if (Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_))
+
+ if (stem_l->beam_l_)
{
+ junk_beam ();
+ return ;
+ }
+
/*
- if we're a nice grace beam, but the new note is regular,
- gracefully end beam, and consider starting a regular one.
- */
+ now that we have last_add_mom_, perhaps we can (should) do away
+ with these individual junk_beams
+ */
+
+ int durlog =rhythmic_req->duration_.durlog_i_;
+ if (durlog <= 2)
+ end_beam ();
+ else
+ {
/*
- When does that happen !? --hwn
- */
-#if 0
- if (stem_l_arr_p_ && stem_l_arr_p_->size ()
- && grace_b (stem_l_arr_p_->top ())
- && !grace_b (stem_l))
- {
- end_beam ();
- consider_end_and_begin ();
- if (!stem_l_arr_p_)
- return;
- }
-#endif
- if (same_grace_state_b (stem_l))
+ if shortest duration would change
+ reconsider ending/starting beam first.
+ */
+ Moment mom = rhythmic_req->duration_.length_mom ();
+ if (mom < shortest_mom_)
{
- if (stem_l->beam_l_)
- junk_beam ();
- /*
- now that we have last_add_mom_, perhaps we can (should) do away
- with these individual junk_beams
- */
- else if (rhythmic_req->duration_.durlog_i_ <= 2)
- end_beam ();
- else
+ if (stem_l_arr_p_->size ())
{
- Moment start = get_staff_info().time_C_->whole_in_measure_;
- if (!grouping_p_->child_fit_b (start))
- end_beam ();
- else
- {
- /*
- if shortest duration would change
- reconsider ending/starting beam first.
- */
- Moment mom = rhythmic_req->duration_.length_mom ();
- if (mom < shortest_mom_)
- {
- if (stem_l_arr_p_->size ())
- {
- shortest_mom_ = mom;
- consider_end_and_begin ();
- }
- shortest_mom_ = mom;
- }
- grouping_p_->add_child (start, rhythmic_req->length_mom ());
-
- stem_l_arr_p_->push (stem_l);
- Moment now = now_mom ();
- last_add_mom_ = now;
- extend_mom_ = extend_mom_ >? now + rhythmic_req->length_mom ();
- }
+ shortest_mom_ = mom;
+ consider_end_and_begin ();
}
+ shortest_mom_ = mom;
}
+ Moment now = now_mom ();
+
+ grouping_p_->add_stem (now - beam_start_moment_ + beam_start_location_, durlog - 2);
+ stem_l_arr_p_->push (stem_l);
+ last_add_mom_ = now;
+ extend_mom_ = extend_mom_ >? now + rhythmic_req->length_mom ();
}
}
}
(c) 1997, 1998, 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
-
+#include "score-engraver.hh"
#include "bar-engraver.hh"
#include "staff-bar.hh"
#include "musical-request.hh"
#include "command-request.hh"
#include "time-description.hh"
#include "engraver-group-engraver.hh"
+#include "warn.hh"
Bar_engraver::Bar_engraver()
{
}
return false;
-
}
{
bar_p_->set_elt_property (at_line_start_scm_sym, SCM_BOOL_T);
}
+ prop = get_property ("barSize", 0);
+ if (prop.isnum_b ())
+ {
+ bar_p_->set_elt_property (bar_size_scm_sym,
+ gh_double2scm (Real(prop)));
+ }
announce_element (Score_element_info (bar_p_, bar_req_l_));
}
}
+/**
+ Make a barline. If there are both |: and :| requested, merge them
+ to :|:
+
+*/
void
Bar_engraver::request_bar (String type_str)
{
return;
}
create_bar ();
+
if (((type_str == "|:") && (bar_p_->type_str_ == ":|"))
|| ((type_str == ":|") && (bar_p_->type_str_ == "|:")))
bar_p_->type_str_ = ":|:";
- else
+ else if (type_str_.length_i ())
bar_p_->type_str_ = type_str;
}
if (!bar_p_)
{
- Break_req r;
- r.penalty_i_ = Break_req::DISALLOW;
- daddy_grav_l ()->try_music (&r);
+ Score_engraver * e = 0;
+ Translator * t = daddy_grav_l ();
+ for (; !e && t; t = t->daddy_trans_l_)
+ {
+ e = dynamic_cast<Score_engraver*> (t);
+ }
+
+ if (!e)
+ programming_error ("No score engraver!");
+ else
+ e->forbid_breaks ();
}
}
Real
Bar::get_bar_size () const
{
- return paper_l ()->get_var ("barsize");
+ // Never called!
+ return 0;
}
(c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-
+#include "timing-engraver.hh"
+#include "engraver-group-engraver.hh"
#include "beam-engraver.hh"
#include "musical-request.hh"
#include "beam.hh"
-#include "rhythmic-grouping.hh"
#include "stem.hh"
#include "warn.hh"
#include "time-description.hh"
+#include "new-beaming.hh"
+#include "score-engraver.hh"
Beam_engraver::Beam_engraver ()
{
beam_p_ = 0;
finished_beam_p_ =0;
- finished_grouping_p_ = 0;
- grouping_p_ =0;
+ finished_beam_info_p_=0;
+ beam_info_p_ =0;
reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0;
prev_start_req_ =0;
}
reqs_drul_[STOP]->warning (_("No beam to end"));
prev_start_req_ =0;
finished_beam_p_ = beam_p_;
- finished_grouping_p_ = grouping_p_;
+ finished_beam_info_p_ = beam_info_p_;
+ beam_info_p_ =0;
beam_p_ = 0;
- grouping_p_ = 0;
+ }
+
+
+ if (beam_p_)
+ {
+ Score_engraver * e = 0;
+ Translator * t = daddy_grav_l ();
+ for (; !e && t; t = t->daddy_trans_l_)
+ {
+ e = dynamic_cast<Score_engraver*> (t);
+ }
+
+ if (!e)
+ programming_error ("No score engraver!");
+ else
+ e->forbid_breaks ();
}
if (reqs_drul_[START])
prev_start_req_ = reqs_drul_[START];
beam_p_ = new Beam;
- grouping_p_ = new Rhythmic_grouping;
+
+ Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver");
+ Timing_engraver *timer = dynamic_cast<Timing_engraver*> (t);
+ beam_start_location_ = (t) ? timer->time_.whole_in_measure_ : Moment (0);
+ beam_start_mom_ = now_mom();
+ beam_info_p_ = new Beaming_info_list;
+
+
Scalar prop = get_property ("beamslopedamping", 0);
if (prop.isnum_b ())
{
if (finished_beam_p_)
{
- Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_;
- rg_C->extend (finished_grouping_p_->interval());
- finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_);
+ finished_beam_info_p_->beamify ();
+
+ finished_beam_p_->set_beaming (finished_beam_info_p_);
typeset_element (finished_beam_p_);
+ delete finished_beam_info_p_;
+ finished_beam_info_p_ =0;
finished_beam_p_ = 0;
- delete finished_grouping_p_;
- finished_grouping_p_= 0;
-
reqs_drul_[STOP] = 0;
}
}
{
prev_start_req_->warning (_ ("Unfinished beam"));
finished_beam_p_ = beam_p_;
- finished_grouping_p_ = grouping_p_;
+ finished_beam_info_p_ = beam_info_p_;
typeset_beam ();
}
}
return;
}
- /*
- TODO: do something sensible if it doesn't fit in the beam.
- */
- Moment start = get_staff_info().time_C_->whole_in_measure_;
-
- if (!grouping_p_->child_fit_b (start))
- {
- String s (_ ("please fix me") + ": "
- + _f ("stem at %s doesn't fit in beam", now_mom ().str ()));
-
- if (info.req_l_)
- info.req_l_->warning(s);
- else
- warning (s);
- }
- else
- {
- grouping_p_->add_child (start, rhythmic_req->length_mom ());
- stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
- beam_p_->add_stem (stem_l);
- }
+ stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
+ Moment stem_location = now_mom () - beam_start_mom_ + beam_start_location_;
+ beam_info_p_->add_stem (stem_location, rhythmic_req->duration_.durlog_i_ - 2);
+ beam_p_->add_stem (stem_l);
}
}
#include <math.h>
+#include "new-beaming.hh"
#include "proto.hh"
#include "dimensions.hh"
#include "beam.hh"
#include "stem.hh"
#include "paper-def.hh"
#include "lookup.hh"
-#include "rhythmic-grouping.hh"
Beam::Beam ()
{
// enge floots
Real epsilon_f = staffline_f / 8;
+
+ // je bent zelf eng --hwn.
Real dy_f = check_stemlengths_f (false);
for (int i = 0; i < 2; i++)
{
test_pos %= 4;
}
-/*
- FIXME
- ugh. this is broken and should be rewritten.
- - [c8. c32 c32]
- */
void
-Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur)
+Beam::set_beaming (Beaming_info_list *beaming)
+{
+ Direction d = LEFT;
+ for (int i=0; i < stems_.size (); i++)
+ {
+ do
+ {
+ if (stems_[i]->beams_i_drul_[d] < 0)
+ stems_[i]->beams_i_drul_[d] = beaming->infos_.elem (i).beams_i_drul_[d];
+ }
+ while (flip (&d) != LEFT);
+ }
+}
+
+
+void
+Beam::do_add_processing ()
{
- def.OK ();
- cur.OK ();
- assert (cur.children.size () == stems_.size ());
-
- cur.split (def);
-
- Array<int> b;
- {
- Array<int> flags;
- for (int j=0; j <stems_.size (); j++)
- {
- Stem *s = stems_[j];
-
- int f = s->flag_i_ - 2;
- assert (f>0);
- flags.push (f);
- }
- int fi =0;
- b= cur.generate_beams (flags, fi);
- b.insert (0,0);
- b.push (0);
- assert (stems_.size () == b.size ()/2);
- }
-
- for (int j=0, i=0; i < b.size () && j <stems_.size (); j++)
+ for (int i=0; i < stems_.size () ; i++)
{
- Stem *s = stems_[j];
Direction d = LEFT;
do {
- if (s->beams_i_drul_[d] < 0)
- s->beams_i_drul_[d] = b[i];
-
- multiple_i_ = multiple_i_ >? s->beams_i_drul_[d];
- i++;
+ multiple_i_ = multiple_i_ >? stems_[i]->beams_i_drul_[d];
} while ((flip (&d)) != LEFT);
}
+
+ if (stems_.size ())
+ {
+ stems_[0]->beams_i_drul_[LEFT] =0;
+ stems_.top()->beams_i_drul_[RIGHT] =0;
+ }
}
+
+
/*
beams to go with one stem.
*/
#include "musical-request.hh"
void
-Cadenza_req::do_print() const
+Cadenza_req::do_print () const
{
#ifndef NPRINT
- DOUT << on_b_;
+ DOUT << (int)on_b_;
#endif
}
}
void
-Bar_req::do_print() const
+Bar_req::do_print () const
{
#ifndef NPRINT
DOUT << type_str_;
}
void
-Clef_change_req::do_print() const
+Clef_change_req::do_print () const
{
#ifndef NPRINT
DOUT << clef_str_ ;
}
void
-Partial_measure_req::do_print() const
+Partial_measure_req::do_print () const
{
DOUT << length_mom_;
}
void
-Time_signature_change_req::do_print() const
+Time_signature_change_req::do_print () const
{
#ifndef NPRINT
DOUT << beats_i_ << "/" << one_beat_i_;
&& one_beat_i_ == m->one_beat_i_;
}
-Time_signature_change_req::Time_signature_change_req()
+Time_signature_change_req::Time_signature_change_req ()
{
beats_i_ = 0;
one_beat_i_ =0;
}
-Tempo_req::Tempo_req()
+Tempo_req::Tempo_req ()
{
metronome_i_ = 60;
dur_. durlog_i_ = 2;
}
void
-Tempo_req::do_print() const
+Tempo_req::do_print () const
{
- DOUT << dur_.str() << " = " << metronome_i_;
+ DOUT << dur_.str () << " = " << metronome_i_;
}
return t&& t->dur_.length_mom ()== dur_.length_mom () && metronome_i_ == t->metronome_i_;
}
-void
-Measure_grouping_req::do_print() const
-{
- for (int i=0; i < elt_length_arr_.size(); i++)
- {
- DOUT << beat_i_arr_[i] << "*" << elt_length_arr_[i].str () << " ";
- }
-}
-bool
-Measure_grouping_req::do_equal_b (Request*) const
-{
- return false; // todo
-}
-
-void
-Key_change_req::transpose (Musical_pitch d)
-{
- if (ordinary_key_b_ )
- {
- if (pitch_arr_.size () > 0)
- pitch_arr_[0].transpose(d);
- else
- {
- warning(_ ("don't know how handle empty keys")); // TODO
- }
- }
- else
- {
- Array<Musical_pitch> old_pitch_arr_;
- for (int i = 0; i < pitch_arr_.size(); i++)
- {
- old_pitch_arr_.push(pitch_arr_[i]);
- }
- // set accidentals for \key d (as in Key_engraver::read_req)
- // (later called "new accidentals")
- int p = d.semitone_pitch ();
- /* Solve the equation 7*no_of_acc mod 12 = p, -6 <= no_of_acc <= 5 */
- int no_of_acc = (7*p) % 12;
- no_of_acc = (no_of_acc + 18) % 12 -6;
-
- /* Correct from flats to sharps or vice versa */
- if (no_of_acc * d.accidental_i_ < 0)
- no_of_acc += 12 * sign (d.accidental_i_);
-
- pitch_arr_.clear ();
- if (no_of_acc < 0)
- {
- int accidental = 6 ; // First accidental: bes
- for ( ; no_of_acc < 0 ; no_of_acc++ )
- {
- Musical_pitch m;
- m.accidental_i_ = -1;
- m.notename_i_ = accidental;
- pitch_arr_.push(m);
-
- accidental = (accidental + 3) % 7 ;
- }
- }
- else
- {
- int accidental = 3 ; // First accidental: fis
- for ( ; no_of_acc > 0 ; no_of_acc-- )
- {
- Musical_pitch m;
- m.accidental_i_ = 1;
- m.notename_i_ = accidental;
- pitch_arr_.push(m);
-
- accidental = (accidental + 4) % 7 ;
- }
- }
- // Check if transposed old accidentals and the new ones coincide
- no_of_acc = pitch_arr_.size();
- int acc_found;
- Musical_pitch mm;
- for (int i=0; i < old_pitch_arr_.size(); i++)
- {
- acc_found = 0;
- mm = old_pitch_arr_[i];
- mm.transpose(d);
- for (int j=0; ((j < no_of_acc) && (acc_found == 0)); j++)
- {
- if (pitch_arr_[j].notename_i_ == mm.notename_i_)
- {
- if (mm.accidental_i_ == 0)
- {
- // remove new accidental
- pitch_arr_.del(j);
- no_of_acc--;
- acc_found = 1;
- }
- else
- {
- // change new accidental
- pitch_arr_[j].accidental_i_ = mm.accidental_i_;
- acc_found = 1;
- }
- }
- }
- if (acc_found == 0)
- {
- // add transposed old accidental
- pitch_arr_.push(mm);
- }
- }
- }
-}
-
-
-void
-Key_change_req::squash_octaves()
-{
- for (int i=0; i < pitch_arr_.size(); i++)
- {
- pitch_arr_[i].octave_i_ = 0;
- }
-}
void
-Key_change_req::do_print() const
+Key_change_req::do_print () const
{
#ifndef NPRINT
- for (int i=0; i < pitch_arr_.size(); i++)
+ for (int i=0; i < key_.pitch_arr_.size (); i++)
{
- pitch_arr_[i].print();
+ key_.pitch_arr_[i].print ();
}
#endif
}
-Key_change_req::Key_change_req()
+Key_change_req::Key_change_req ()
{
- modality_i_ = 0;
- ordinary_key_b_= false;
}
-
-
Break_req::Break_req ()
{
penalty_i_ = 0;
{
DOUT << str_;
}
-
-int
-Key_change_req::flats_i()
-{
- int flats_i = 0;
- for (int i = 0; i < pitch_arr_.size(); i++)
- {
- if (pitch_arr_[i].accidental_i_ < 0)
- flats_i -= pitch_arr_[i].accidental_i_;
- }
- return flats_i;
-}
-
-bool
-Key_change_req::minor_b() const
-{
- return modality_i_ == 3;
-}
-
-int
-Key_change_req::sharps_i()
-{
- int sharps_i = 0;
- for (int i = 0; i < pitch_arr_.size(); i++)
- {
- if (pitch_arr_[i].accidental_i_ > 0)
- sharps_i += pitch_arr_[i].accidental_i_;
- }
- return sharps_i;
-}
--- /dev/null
+/*
+ grace-performer-group.cc -- implement Grace_performer_group
+
+ source file of the GNU LilyPond music playter
+
+ (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ */
+#include "grace-performer-group.hh"
+#include "lily-guile.hh"
+#include "ly-symbols.hh"
+#include "audio-element.hh"
+
+ADD_THIS_TRANSLATOR (Grace_performer_group);
+
+void
+Grace_performer_group::start ()
+{
+}
+/*
+ We're really finished with this context. Get rid of everything.
+ */
+void
+Grace_performer_group::finish ()
+{
+ calling_self_b_ = true;
+ removal_processing (); // ugr. We'd want to have this done by our parents.g
+ for (int i=0; i < announce_to_top_.size (); i++)
+ {
+ Performer::announce_element (announce_to_top_[i]);
+ }
+
+ for (int i=0; i < play_us_.size (); i++)
+ {
+ Performer::play_element (play_us_[i]);
+ }
+ play_us_.clear ();
+ calling_self_b_ = false;
+}
+
+void
+Grace_performer_group::do_removal_processing ()
+{
+ Performer_group_performer::do_removal_processing ();
+}
+
+void
+Grace_performer_group::announce_element (Audio_element_info inf)
+{
+ announce_info_arr_.push (inf);
+ // do not propagate to top
+ announce_to_top_.push (inf);
+
+ //inf.elem_l_->set_elt_property (grace_scm_sym, SCM_BOOL_T);
+}
+
+void
+Grace_performer_group::play_element (Audio_element*e)
+{
+ play_us_.push (e);
+}
+
+
+Grace_performer_group::Grace_performer_group()
+{
+ calling_self_b_ = false;
+}
+
+void
+Grace_performer_group::process ()
+{
+ calling_self_b_ = true;
+ process_requests ();
+ do_announces();
+ pre_move_processing();
+ check_removal();
+ calling_self_b_ = false;
+}
+
+
+void
+Grace_performer_group::each (Method_pointer method)
+{
+ if (calling_self_b_)
+ Performer_group_performer::each (method);
+}
+
+
+void
+Grace_performer_group::each (Const_method_pointer method) const
+{
+ if (calling_self_b_)
+ Performer_group_performer::each (method);
+}
+
+/*
+ don't let the commands trickle up.
+ */
+bool
+Grace_performer_group::do_try_music (Music *m)
+{
+ bool hebbes_b =false;
+
+ Link_array<Translator> nongroups (nongroup_l_arr ());
+
+ for (int i =0; !hebbes_b && i < nongroups.size() ; i++)
+ hebbes_b =nongroups[i]->try_music (m);
+
+ return hebbes_b;
+}
Graphical_axis_group::Graphical_axis_group ()
{
ordered_b_ = false;
- axes_[0] = -1 ;
- axes_[1] = -1 ;
+ axes_[0] = (Axis)-1 ;
+ axes_[1] = (Axis)-1 ;
}
void
#include "virtual-methods.hh"
-struct Audio_element {
- void print ()const;
-
- virtual ~Audio_element();
+class Audio_element
+{
+public:
+ Audio_element ();
+ virtual ~Audio_element ();
+
+ void print () const;
protected:
virtual void do_print () const;
};
+
#endif // AUDIO_ELEMENT_HH
#include "lily-proto.hh"
#include "string.hh"
#include "audio-element.hh"
+#include "key-def.hh"
+#include "musical-pitch.hh"
+#include "moment.hh"
+#include "drul-array.hh"
/**
Any piece of audio information.
- We need virtual constructors,
+ We need virtual conclassors,
let's try decentralised factory for specific audio implemenations.
*/
-struct Audio_item : public Audio_element {
- Audio_item (Request* req_l);
-
- /// Create a midi-item from myself.
- virtual Midi_item* midi_item_p() = 0;
+class Audio_item : public Audio_element
+{
+public:
+ Audio_item ();
Audio_column* audio_column_l_;
- /*
- THIS SUX. This ties the output system to the input system. Bad move.
- */
- Request* req_l_;
-
protected:
virtual void do_print () const;
Audio_item& operator=( Audio_item const&);
};
-struct Audio_key : public Audio_item {
- Audio_key (Request* req_l);
-
- virtual Midi_item* midi_item_p();
+class Audio_key : public Audio_item
+{
+public:
+ Audio_key (Key_def const& key);
+
+ Key_def key_;
};
-struct Audio_instrument : public Audio_item {
+class Audio_instrument : public Audio_item
+{
+public:
Audio_instrument (String instrument_str);
- virtual Midi_item* midi_item_p();
+
String str_;
-
};
-struct Audio_note : public Audio_item {
-
- Audio_note (Request* req_l, int transposing_i = 0);
- virtual Midi_item* midi_item_p();
+class Audio_note : public Audio_item
+{
+public:
+ Audio_note (Musical_pitch p, Moment m, int transposing_i = 0);
+
+ Musical_pitch pitch_;
+ Moment length_mom_;
int transposing_i_;
};
-struct Audio_text : Audio_item {
+class Audio_text : public Audio_item
+{
+public:
enum Type {
TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC,
MARKER, CUE_POINT
};
Audio_text (Audio_text::Type type, String text_str);
- virtual Midi_item* midi_item_p();
Type type_;
String text_str_;
};
-struct Audio_tempo : Audio_item {
+class Audio_tempo : public Audio_item
+{
+public:
Audio_tempo (int per_minute_4_i);
- virtual Midi_item* midi_item_p();
-
+
int per_minute_4_i_;
};
-struct Audio_time_signature : Audio_item {
- Audio_time_signature (Request* req_l);
- virtual Midi_item* midi_item_p();
-
+class Audio_tie : public Audio_item
+{
+public:
+ Audio_tie ();
+ void set_note (Direction, Audio_note*);
+ Drul_array<Audio_note*> note_l_drul_;
+};
+
+class Audio_time_signature : public Audio_item
+{
+public:
+ Audio_time_signature (int beats, int one_beat);
+
+ int beats_i_;
+ int one_beat_i_;
};
#endif // AUDIO_ITEM_HH
virtual void acknowledge_element (Score_element_info);
virtual void do_process_requests ();
virtual void process_acknowledged ();
-
+ virtual void do_creation_processing ();
private:
void begin_beam ();
void consider_end_and_begin ();
Moment shortest_mom_;
Beam *finished_beam_p_;
Array<Stem*>* stem_l_arr_p_;
+
Moment last_add_mom_;
Moment extend_mom_;
+
+
+ Moment beam_start_moment_;
+ Moment beam_start_location_;
+ Timing_translator * timer_l_;
// We act as if beam were created, and start a grouping anyway.
- Rhythmic_grouping*grouping_p_;
- Rhythmic_grouping*finished_grouping_p_;
+ Beaming_info_list*grouping_p_;
+ Beaming_info_list*finished_grouping_p_;
};
#endif /* AUTO_BEAM_ENGRAVER_HH */
Beam *finished_beam_p_;
Beam *beam_p_;
Span_req * prev_start_req_;
- Rhythmic_grouping*grouping_p_;
- Rhythmic_grouping*finished_grouping_p_;
+
+ Beaming_info_list * beam_info_p_;
+ Beaming_info_list * finished_beam_info_p_;
+
+ /// location within measure where beam started.
+ Moment beam_start_location_;
+
+ /// moment (global time) where beam started.
+ Moment beam_start_mom_;
void typeset_beam ();
protected:
Stem_info get_stem_info (Stem*);
void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
+ void set_beaming (Beaming_info_list *);
void set_stemlens ();
VIRTUAL_COPY_CONS(Score_element);
virtual void do_pre_processing ();
virtual void do_post_processing ();
virtual void do_substitute_element_pointer (Score_element*, Score_element*);
+ virtual void do_add_processing ();
virtual void do_print() const;
- virtual void quantise_left_y (bool extend_b);
- virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
- virtual void calculate_slope ();
- virtual Real check_stemlengths_f (bool set_b);
- virtual void solve_slope ();
- virtual void quantise_dy ();
virtual Molecule*do_brew_molecule_p () const;
+
+ Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
+
+private:
+ void calculate_slope ();
+ Real check_stemlengths_f (bool set_b);
+ void solve_slope ();
+
+ void quantise_left_y (bool extend_b);
+ void quantise_dy ();
+
};
#endif // BEAM_HH
#include "array.hh"
#include "duration.hh"
#include "musical-pitch.hh"
+#include "key-def.hh"
class Break_req : public Request {
public:
VIRTUAL_COPY_CONS(Music);
};
-class Measure_grouping_req : public Timing_req {
-public:
- Array<int> beat_i_arr_;
- Array<Moment> elt_length_arr_;
-protected:
- virtual void do_print () const;
- bool do_equal_b (Request *) const;
- VIRTUAL_COPY_CONS(Music);
-};
/** draw a (repeat)-bar. This something different than #Barcheck_req#,
the latter should only happen at the start of a measure. */
Routines for sharps and flats are separated,
so that caller may identify non-conventional keys.
*/
-class Key_change_req : public Request {
+class Key_change_req : public Request
+{
public:
- Array<Musical_pitch> pitch_arr_;
- int modality_i_;
- bool ordinary_key_b_;
-
- Key_change_req();
-
- /// squash the octaves to 1
- void squash_octaves();
- /// return number of flats in key
- int flats_i();
-
- /// return number of sharps in key
- int sharps_i();
- bool minor_b() const;
+ Key_change_req ();
+ Key_def key_;
protected:
VIRTUAL_COPY_CONS(Music);
- void transpose (Musical_pitch d);
+ // void transpose (Musical_pitch d);
virtual void do_print () const;
};
--- /dev/null
+/*
+ grace-performer-group.hh -- declare
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ */
+
+#ifndef GRACE_PERFORMER_GROUP_HH
+#define GRACE_PERFORMER_GROUP_HH
+
+#include "performer-group-performer.hh"
+#include "global-translator.hh"
+
+class Grace_performer_group : public Performer_group_performer, public Global_translator
+{
+ Link_array<Audio_element> play_us_;
+ Array<Audio_element_info> announce_to_top_;
+ bool calling_self_b_;
+public:
+ VIRTUAL_COPY_CONS(Translator);
+ Grace_performer_group ();
+protected:
+ virtual void announce_element (Audio_element_info);
+ virtual void start ();
+ virtual void finish ();
+ virtual void process ();
+ virtual void each (Method_pointer);
+ virtual void each (Const_method_pointer) const;
+ virtual void do_removal_processing () ;
+ virtual void play_element (Audio_element*);
+ virtual bool do_try_music (Music *m);
+};
+
+
+#endif /* GRACE_PERFORMER_GROUP_HH */
--- /dev/null
+/*
+ key-def.hh -- declare
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ */
+
+#ifndef KEY_DEF_HH
+#define KEY_DEF_HH
+
+#include "array.hh"
+#include "musical-pitch.hh"
+
+/**
+ Universal key definition (Should rename class Key to 'Accidentals'?)
+ */
+class Key_def
+{
+public:
+ Key_def ();
+
+ Array<Musical_pitch> pitch_arr_;
+ int modality_i_;
+ bool ordinary_key_b_;
+
+ /// squash the octaves to 1
+ void squash_octaves ();
+
+ /// return number accidentals in key; ordinary key only
+ int ordinary_accidentals_i () const;
+
+ /// return number of flats in key
+ int flats_i () const;
+
+ /// return number of sharps in key
+ int sharps_i () const;
+
+ /// modality == 3
+ bool minor_b () const;
+
+ void transpose (Musical_pitch d);
+};
+
+#endif /* KEY_DEF_HH */
#include "lily-proto.hh"
#include "performer.hh"
-class Key_performer : public Performer {
+class Key_performer : public Performer
+{
public:
VIRTUAL_COPY_CONS(Translator);
protected:
void do_print() const;
virtual bool do_try_music (Music* req_l);
- virtual void do_process_requests();
+ virtual void do_process_requests ();
+ virtual void do_pre_move_processing ();
private:
Key_change_req* key_req_l_;
+ Audio_key* audio_p_;
};
#endif // KEY_PERFOMER_HH
struct Audio_element_info;
struct Audio_column;
struct Audio_item;
+struct Audio_instrument;
struct Audio_key;
+struct Audio_text;
struct Audio_time_signature;
struct Audio_note;
struct Audio_note_off;
+struct Audio_tie;
struct Audio_staff;
struct Audio_tempo;
struct Auto_beam_engraver;
struct Beam;
struct Beam_engraver;
struct Beam_req;
+struct Beaming_info;
+struct Beaming_info_list;
struct Blank_req;
struct Bow;
struct Box;
struct Note_head;
struct Note_head_engraver;
struct Notename_table;
-struct New_repeated_music;
+struct Repeated_music;
struct Unfolded_repeat_iterator;
struct Folded_repeat_iterator;
struct Offset;
struct Translator;
struct Translator_group;
struct Timing_req;
+struct Timing_translator;
+struct Timing_engraver;
struct Vertical_brace;
struct Vertical_spanner;
#define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym
#endif
+DECLARE_LY_SYMBOL(alt_symbol);
DECLARE_LY_SYMBOL(at_line_start);
+DECLARE_LY_SYMBOL(bar_size);
DECLARE_LY_SYMBOL(beam);
DECLARE_LY_SYMBOL(beam_thickness);
DECLARE_LY_SYMBOL(beam_dir);
class Lyric_performer : public Performer {
public:
VIRTUAL_COPY_CONS(Translator);
-
+ Lyric_performer ();
protected:
void do_print() const;
virtual bool do_try_music (Music* req_l);
virtual void do_process_requests();
+ virtual void do_pre_move_processing ();
private:
Link_array<Lyric_req> lreq_arr_;
+ Audio_text* audio_p_;
};
#endif // LYRIC_PERFOMER_HH
Maybe use base classes for RIFF files?
*/
-struct Midi_item {
- Midi_item (Audio_item* audio_item_l);
+class Midi_item
+{
+public:
+ Midi_item ();
virtual ~Midi_item ();
+
+ /// factory
+ static Midi_item* midi_p (Audio_item* a);
+
static String i2varint_str (int i);
+
virtual String str () const = 0;
- Audio_item* audio_item_l_;
int channel_i_;
-
-private:
- Midi_item (Midi_item const&);
- Midi_item& operator = ( Midi_item const&);
};
/**
timed MIDI event
*/
-struct Midi_event
+class Midi_event
{
- Midi_event (Moment delta_mom, Midi_item* mitem_l);
- ~Midi_event ();
+public:
+ Midi_event (Moment delta_mom, Midi_item* midi_l);
+
Moment delta_mom_;
- Midi_item* mitem_p_;
+ Midi_item* midi_p_;
String str () const;
};
/**
variable sized MIDI data
*/
-struct Midi_chunk : Midi_item {
-
- Midi_chunk ();
-
+class Midi_chunk : public Midi_item
+{
+public:
void set (String header_str, String data_str, String footer_str);
virtual String str () const;
virtual String data_str () const;
String header_str_;
};
-struct Midi_duration : public Midi_item {
+class Midi_duration : public Midi_item
+{
+public:
Midi_duration (Real seconds_f);
virtual String str () const;
Real seconds_f_;
};
-struct Midi_header : Midi_chunk {
+class Midi_header : public Midi_chunk
+{
+public:
Midi_header (int format_i, int tracks_i, int clocks_per_4_i);
};
/**
Change instrument event
*/
-struct Midi_instrument : public Midi_item {
- Midi_instrument (int channel_i, String instrument_str);
+class Midi_instrument : public Midi_item
+{
+public:
+ Midi_instrument (Audio_instrument*);
virtual String str () const;
- String instrument_str_;
+
+ Audio_instrument* audio_l_;
};
-struct Midi_key : public Midi_item {
- Midi_key (Audio_item* audio_item_l);
+class Midi_key : public Midi_item
+{
+public:
+ Midi_key (Audio_key*);
virtual String str () const;
+
+ Audio_key* audio_l_;
};
-struct Midi_time_signature : Midi_item {
- Midi_time_signature (Audio_item* audio_item_l);
+class Midi_time_signature : public Midi_item
+{
+public:
+ Midi_time_signature (Audio_time_signature*);
virtual String str () const;
+
+ Audio_time_signature* audio_l_;
int clocks_per_1_i_;
};
/**
Turn a note on.
*/
-struct Midi_note : public Midi_item {
- Midi_note (Audio_item* audio_item_l);
+class Midi_note : public Midi_item
+{
+public:
+ Midi_note (Audio_note*);
Moment length_mom () const;
int pitch_i () const;
virtual String str () const;
+ Audio_note* audio_l_;
+
static int const c0_pitch_i_c_ = 60;
Byte dynamic_byte_;
};
/**
Turn a note off
*/
-struct Midi_note_off : public Midi_item {
+class Midi_note_off : public Midi_item
+{
+public:
Midi_note_off (Midi_note*);
int pitch_i () const;
virtual String str () const;
+ Midi_note* on_l_;
Byte aftertouch_byte_;
};
-struct Midi_text : Midi_item {
-
-
+class Midi_text : public Midi_item
+{
+public:
enum Type {
TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC,
MARKER, CUE_POINT
};
- Midi_text (Midi_text::Type type, String text_str);
- Midi_text (Audio_item* audio_item_l);
+
+ Midi_text (Audio_text*);
virtual String str () const;
- Type type_;
- String text_str_;
+ Audio_text* audio_l_;
};
-struct Midi_tempo : Midi_item {
- Midi_tempo (int per_minute_4_i);
- Midi_tempo (Audio_item* audio_item_l);
+class Midi_tempo : public Midi_item
+{
+public:
+ Midi_tempo (Audio_tempo*);
virtual String str () const;
- int per_minute_4_i_;
+ Audio_tempo* audio_l_;
};
-struct Midi_track : Midi_chunk {
+class Midi_track : public Midi_chunk
+{
+public:
int number_i_;
Cons_list<Midi_event> event_p_list_;
Midi_track ();
- ~Midi_track ();
- void add (Moment delta_time_mom, Midi_item* mitem_l);
+ void add (Moment delta_time_mom, Midi_item* midi_l);
virtual String data_str () const;
-
-private:
- // copy trap
- Midi_track (Midi_track const&);
};
#endif // MIDI_ITEM_HH
~Midi_stream();
Midi_stream& operator <<( String str);
- Midi_stream& operator <<( Midi_item const& mitem_c_r);
+ Midi_stream& operator <<( Midi_item const& midi_c_r);
Midi_stream& operator <<( int i);
void open();
Drul_array<Moment> rest_moments_;
int start_measure_i_;
- Multi_measure_rest_req* multi_measure_req_l_;
+ Rhythmic_req* multi_measure_req_l_;
Multi_measure_rest* mmrest_p_;
Multi_measure_rest* lastrest_p_;
};
/**
Part: typeset a measure with the number of measures rest
- Score: typeset all individual measures ass full rests
+ Score: typeset all individual measures as full rests
*/
class Multi_measure_rest_req : public Rhythmic_req {
public:
VIRTUAL_COPY_CONS(Music);
};
+/**
+ Typeset a repetition sign in each bar.
+ */
+class Repetitions_req : public Rhythmic_req {
+public:
+ VIRTUAL_COPY_CONS(Music);
+};
+
/// an extender line
class Extender_req : public Request {
public:
--- /dev/null
+/*
+ new-beaming.hh -- declare New_beaming.hh
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef NEW_BEAMING_HH
+#define NEW_BEAMING_HH
+
+#include "parray.hh"
+#include "drul-array.hh"
+#include "moment.hh"
+
+struct Beaming_info
+{
+ Moment start_mom_;
+ Drul_array<int> beams_i_drul_;
+
+ Beaming_info (Moment, int);
+ int count (Direction d);
+ Beaming_info ();
+};
+
+struct Beaming_info_list
+{
+ Array<Beaming_info> infos_;
+
+ int beam_extend_count (Direction) const;
+ int min_denominator_index () const;
+ void beamify ();
+ void add_stem (Moment d, int beams);
+};
+
+
+#endif /* NEW_BEAMING_HH */
+
/*
- new-repeated-music.hh -- declare New_repeated_music
+ new-repeated-music.hh -- declare Repeated_music
source file of the GNU LilyPond music typesetter
*/
-#ifndef NEW_REPEATED_MUSIC_HH
-#define NEW_REPEATED_MUSIC_HH
+#ifndef RepEATED_MUSIC_HH
+#define RepEATED_MUSIC_HH
#include "music.hh"
the first alternative is assumed to be repeated.
*/
-class New_repeated_music : public Music
+class Repeated_music : public Music
{
public:
bool fold_b_;
virtual void compress (Moment factor);
VIRTUAL_COPY_CONS(Music);
- New_repeated_music (Music*, int , Music_sequence*);
- New_repeated_music (New_repeated_music const&);
- ~New_repeated_music ();
+ Repeated_music (Music*, int , Music_sequence*);
+ Repeated_music (Repeated_music const&);
+ ~Repeated_music ();
protected:
virtual void do_print() const;
};
-#endif /* NEW_REPEATED_MUSIC_HH */
+#endif /* RepEATED_MUSIC_HH */
Note_performer();
protected:
- virtual void do_process_requests();
+ virtual void do_process_requests ();
virtual bool do_try_music (Music *req_l) ;
- virtual void do_print() const;
+ virtual void do_print () const;
+ virtual void do_pre_move_processing ();
private:
- Array<Melodic_req *> note_req_l_;
+ Array<Note_req*> note_req_l_arr_;
+ Array<Audio_note*> note_p_arr_;
};
#endif // NOTE_PERFORMER_HH
*/
class Paper_outputter
{
-#ifdef __powerpc__
- Protected_scm port_;
-#endif
public:
Paper_outputter (Paper_stream *);
~Paper_outputter ();
Convert a music definition into a audio representation.
A baseclass
*/
-class Performer : public virtual Translator{
+class Performer : public virtual Translator
+{
public:
VIRTUAL_COPY_CONS(Translator);
friend class Performer_group_performer;
Performer_group_performer* daddy_perf_l() const;
+
protected:
virtual void announce_element (Audio_element_info);
virtual void acknowledge_element (Audio_element_info);
virtual void process_acknowledged ();
virtual int get_tempo_i() const;
- virtual void play (Audio_element * elem_p );
+ virtual void play_element (Audio_element * elem_p );
};
#define REPEAT_ENGRAVER_HH
#include "engraver.hh"
+#include "cons.hh"
+
+struct Bar_create_event
+{
+ Moment when_;
+ bool bar_b_;
+ bool last_b_;
+ String type_;
+ Bar_create_event();
+ Bar_create_event (Moment w, String s);
+ Bar_create_event (Moment w, int i, int j);
+};
+
+int compare (Bar_create_event const & c1, Bar_create_event const &c2)
+{
+ return (c1.when_ - c2.when_).sign();
+}
/**
Generate repeat-bars |: :| for repeated-music
class Repeat_engraver : public Engraver
{
public:
-
VIRTUAL_COPY_CONS(Translator);
-
+ Repeat_engraver ();
protected:
virtual void acknowledge_element (Score_element_info i);
virtual void do_removal_processing ();
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 ();
+ void queue_events ();
private:
- Link_array<New_repeated_music> repeated_music_arr_;
- Link_array<Music> alternative_music_arr_;
-
- Array<bool> bar_b_arr_;
- Link_array<Volta_spanner> volta_p_arr_;
- Array<Moment> stop_mom_arr_;
- Array<Moment> alternative_start_mom_arr_;
- Array<Moment> alternative_stop_mom_arr_;
- Array<String> alternative_str_arr_;
+ Repeated_music *repeated_music_l_;
+ bool done_this_one_b_;
+
+ /*
+ Royal_brackla_create_queue is only two Whiskies away. :-)
+ */
+ Cons<Bar_create_event> *create_barmoments_queue_;
+
+ Volta_spanner * volta_span_p_;
+ Volta_spanner* end_volta_span_p_;
};
#endif // REPEAT_ENGRAVER_HH
VIRTUAL_COPY_CONS(Translator);
Paper_score * pscore_p_;
-
+ void forbid_breaks ();
Score_engraver();
virtual Music_output *get_output_p ();
protected:
virtual void process();
virtual void start();
virtual void do_add_processing ();
+ virtual void announce_element (Audio_element_info);
virtual int get_tempo_i() const;
- virtual void play (Audio_element* p);
+ virtual void play_element (Audio_element* p);
virtual Music_output *get_output_p ();
+
private:
void header (Midi_stream&);
*/
struct Staff_info {
Time_description const *time_C_;
- Rhythmic_grouping const *rhythmic_C_;
Score_column *musical_l_;
Score_column *command_l_;
#include "performer-group-performer.hh"
/** Perform a staff. Individual notes should have their instrument
- (staff-wide) set, so we override play()
+ (staff-wide) set, so we override play_element()
*/
class Staff_performer : public Performer_group_performer
String instrument_str_;
protected:
- virtual void play (Audio_element* p);
+ virtual void play_element (Audio_element* p);
virtual void do_removal_processing ();
virtual void do_creation_processing ();
virtual void do_process_requests ();
+ virtual void do_pre_move_processing ();
private:
Audio_staff* audio_staff_p_;
+ Audio_instrument* instrument_p_;
+ Audio_text* instrument_name_p_;
+ Audio_text* name_p_;
+ Audio_tempo* tempo_p_;
};
#endif // STAFF_PERFORMER_HH
#include "performer.hh"
-class Swallow_performer : public Performer {
+class Swallow_performer : public Performer
+{
public:
VIRTUAL_COPY_CONS(Translator);
--- /dev/null
+/*
+ tie-performer.hh -- declare
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ */
+
+#ifndef TIE_PERFORMER_HH
+#define TIE_PERFORMER_HH
+
+#include "pqueue.hh"
+#include "performer.hh"
+
+struct CNote_melodic_tuple {
+ Melodic_req *req_l_ ;
+ Audio_note *note_l_;
+ Moment end_;
+ CNote_melodic_tuple ();
+ CNote_melodic_tuple (Audio_note*, Melodic_req*, Moment);
+ static int pitch_compare (CNote_melodic_tuple const &, CNote_melodic_tuple const &);
+ static int time_compare (CNote_melodic_tuple const &, CNote_melodic_tuple const &);
+};
+
+inline int compare (CNote_melodic_tuple const &a, CNote_melodic_tuple const &b)
+{
+ return CNote_melodic_tuple::time_compare (a,b);
+}
+
+
+/**
+ Manufacture ties. Acknowledge notes, and put them into a
+ priority queue. If we have a Tie_req, connect the notes that finish
+ just at this time, and note that start at this time.
+
+ TODO: should share code with Tie_engraver ?
+ */
+class Tie_performer : public Performer
+{
+public:
+ VIRTUAL_COPY_CONS(Translator);
+ Tie_performer ();
+
+private:
+ PQueue<CNote_melodic_tuple> past_notes_pq_;
+ Tie_req *req_l_;
+ Array<CNote_melodic_tuple> now_notes_;
+ Array<CNote_melodic_tuple> stopped_notes_;
+ Link_array<Audio_tie> tie_p_arr_;
+
+protected:
+ virtual void do_post_move_processing ();
+ virtual void do_pre_move_processing ();
+ virtual void acknowledge_element (Audio_element_info);
+ virtual bool do_try_music (Music*);
+ virtual void do_process_requests ();
+ virtual void process_acknowledged ();
+
+};
+
+
+#endif /* TIE_PERFORMER_HH */
+
struct Time_description {
Moment when_;
- /// found an error so far?
- bool error_b_ ;
-
/// if true, no bars needed, no reduction of whole_in_measure
bool cadenza_b_;
/// current measure info
Moment whole_per_measure_;
+ /*
+ ugh: naming! junk whole_ prefixes.
+ */
/// where am i
Moment whole_in_measure_;
#define TIME_SIG_ENGRAVER_HH
#include "engraver.hh"
#include "time-description.hh"
-#include "rhythmic-grouping.hh"
/**
generate time_signatures.
(c) 1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#ifndef METER_PERFOMER_HH
-#define METER_PERFOMER_HH
+#ifndef TIME_SIGNATURE_PERFORMER_HH
+#define TIME_SIGNATURE_PERFORMER_HH
#include "lily-proto.hh"
#include "performer.hh"
-class Time_signature_performer : public Performer {
+class Time_signature_performer : public Performer
+{
public:
VIRTUAL_COPY_CONS(Translator);
void do_print() const;
virtual bool do_try_music (Music* req_l);
virtual void do_process_requests();
+ virtual void do_pre_move_processing ();
private:
Time_signature_change_req* time_signature_req_l_;
+ Audio_time_signature* audio_p_;
};
-#endif // METER_PERFOMER_HH
+#endif // TIME_SIGNATURE_PERFORMER_HH
#define TIMING_GRAV_HH
#include "timing-translator.hh"
+#include "engraver.hh"
/**
Do time bookkeeping
#include "translator.hh"
#include "time-description.hh"
-#include "rhythmic-grouping.hh"
#include "parray.hh"
class Timing_translator : public virtual Translator
public:
VIRTUAL_COPY_CONS(Translator);
Time_signature_change_req * time_signature_req_l () const;
- Timing_translator ();
Time_description time_;
- Rhythmic_grouping default_grouping_;
+
Link_array<Timing_req> timing_req_l_arr_;
protected:
virtual void do_print () const;
Volta_spanner ();
void add_column (Note_column*);
- void add_column (Bar*);
+ void add_bar (Bar*);
String number_str_;
- Link_array<Bar> column_arr_;
+ Link_array<Bar> bar_arr_;
Link_array<Note_column> note_column_arr_;
bool last_b_;
void
Item::copy_breakable_items()
{
- if (broken_to_drul_[LEFT] || broken_to_drul_[RIGHT]
- || ! breakable_b ())
- return;
+ if (broken_to_drul_[LEFT] || broken_to_drul_[RIGHT]
+ || !breakable_b ())
+ return ;
Drul_array<Item *> new_copies;
Direction i=LEFT;
{
if (breakable_b ())
do_break ();
-
+ else
+ try_visibility_lambda ();
}
Item*
Item::find_prebroken_piece (Line_of_score*l) const
--- /dev/null
+/*
+ key-def.cc -- implement
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ */
+
+#include "key-def.hh"
+#include "debug.hh"
+
+Key_def::Key_def ()
+{
+ modality_i_ = 0;
+ ordinary_key_b_ = false;
+}
+
+int
+Key_def::ordinary_accidentals_i () const
+{
+ if (!ordinary_key_b_)
+ {
+ programming_error ("Accidentals requested for non-conventional key");
+ return 0;
+ }
+
+ int p;
+ if (pitch_arr_.size () < 1)
+ {
+ warning (_ ("No key name: assuming `C'"));
+ p = 0;
+ }
+ else
+ {
+ p = pitch_arr_[0].semitone_pitch ();
+ p += modality_i_;
+ }
+ /* Solve the equation 7*accidentals_i mod 12 = p, -6 <= accidentals_i <= 5 */
+ int accidentals_i = (7*p) % 12;
+ accidentals_i = (accidentals_i + 18) % 12 -6;
+
+ /* Correct from flats to sharps or vice versa */
+ if (accidentals_i * pitch_arr_[0].accidental_i_ < 0)
+ accidentals_i += 12 * sign (pitch_arr_[0].accidental_i_);
+ return accidentals_i;
+}
+
+int
+Key_def::flats_i () const
+{
+ if (ordinary_key_b_)
+ return 0 >? -ordinary_accidentals_i ();
+ int flats_i = 0;
+ for (int i = 0; i < pitch_arr_.size (); i++)
+ {
+ if (pitch_arr_[i].accidental_i_ < 0)
+ flats_i -= pitch_arr_[i].accidental_i_;
+ }
+ return flats_i;
+}
+
+bool
+Key_def::minor_b () const
+{
+ return modality_i_ == 3;
+}
+
+int
+Key_def::sharps_i () const
+{
+ if (ordinary_key_b_)
+ return 0 >? ordinary_accidentals_i ();
+ int sharps_i = 0;
+ for (int i = 0; i < pitch_arr_.size (); i++)
+ {
+ if (pitch_arr_[i].accidental_i_ > 0)
+ sharps_i += pitch_arr_[i].accidental_i_;
+ }
+ return sharps_i;
+}
+
+void
+Key_def::transpose (Musical_pitch d)
+{
+ if (ordinary_key_b_ )
+ {
+ if (pitch_arr_.size () > 0)
+ pitch_arr_[0].transpose (d);
+ else
+ {
+ warning (_ ("don't know how handle empty keys")); // TODO
+ }
+ }
+ else
+ {
+ Array<Musical_pitch> old_pitch_arr_;
+ for (int i = 0; i < pitch_arr_.size (); i++)
+ {
+ old_pitch_arr_.push (pitch_arr_[i]);
+ }
+ // set accidentals for \key d (as in Key_engraver::read_req)
+ // (later called "new accidentals")
+ int p = d.semitone_pitch ();
+ /* Solve the equation 7*accidentals_i mod 12 = p, -6 <= accidentals_i <= 5 */
+ int accidentals_i = (7*p) % 12;
+ accidentals_i = (accidentals_i + 18) % 12 -6;
+
+ /* Correct from flats to sharps or vice versa */
+ if (accidentals_i * d.accidental_i_ < 0)
+ accidentals_i += 12 * sign (d.accidental_i_);
+
+ pitch_arr_.clear ();
+ if (accidentals_i < 0)
+ {
+ int accidental = 6 ; // First accidental: bes
+ for ( ; accidentals_i < 0 ; accidentals_i++ )
+ {
+ Musical_pitch m;
+ m.accidental_i_ = -1;
+ m.notename_i_ = accidental;
+ pitch_arr_.push (m);
+
+ accidental = (accidental + 3) % 7 ;
+ }
+ }
+ else
+ {
+ int accidental = 3 ; // First accidental: fis
+ for ( ; accidentals_i > 0 ; accidentals_i-- )
+ {
+ Musical_pitch m;
+ m.accidental_i_ = 1;
+ m.notename_i_ = accidental;
+ pitch_arr_.push (m);
+
+ accidental = (accidental + 4) % 7 ;
+ }
+ }
+ // Check if transposed old accidentals and the new ones coincide
+ accidentals_i = pitch_arr_.size ();
+ int acc_found;
+ Musical_pitch mm;
+ for (int i=0; i < old_pitch_arr_.size (); i++)
+ {
+ acc_found = 0;
+ mm = old_pitch_arr_[i];
+ mm.transpose (d);
+ for (int j=0; ( (j < accidentals_i) && (acc_found == 0)); j++)
+ {
+ if (pitch_arr_[j].notename_i_ == mm.notename_i_)
+ {
+ if (mm.accidental_i_ == 0)
+ {
+ // remove new accidental
+ pitch_arr_.del (j);
+ accidentals_i--;
+ acc_found = 1;
+ }
+ else
+ {
+ // change new accidental
+ pitch_arr_[j].accidental_i_ = mm.accidental_i_;
+ acc_found = 1;
+ }
+ }
+ }
+ if (acc_found == 0)
+ {
+ // add transposed old accidental
+ pitch_arr_.push (mm);
+ }
+ }
+ }
+}
+
+void
+Key_def::squash_octaves ()
+{
+ for (int i=0; i < pitch_arr_.size (); i++)
+ {
+ pitch_arr_[i].octave_i_ = 0;
+ }
+}
accidental_idx_arr_.clear ();
- if (r->ordinary_key_b_)
+ if (r->key_.ordinary_key_b_)
{
- int p;
- if (r->pitch_arr_.size () < 1)
- {
- r->warning (_ ("No key name: assuming `C'"));
- p = 0;
- }
- else
- {
- p = r->pitch_arr_[0].semitone_pitch ();
- p += r->modality_i_;
- }
- /* Solve the equation 7*no_of_acc mod 12 = p, -6 <= no_of_acc <= 5 */
- int no_of_acc = (7*p) % 12;
- no_of_acc = (no_of_acc + 18) % 12 -6;
-
- /* Correct from flats to sharps or vice versa */
- if (no_of_acc * r->pitch_arr_[0].accidental_i_ < 0)
- no_of_acc += 12 * sign (r->pitch_arr_[0].accidental_i_);
+ int no_of_acc = r->key_.ordinary_accidentals_i ();
+ // Hmm, can't these be handled/constructed by Key_change_req?
if (no_of_acc < 0)
{
int accidental = 6 ; // First accidental: bes
}
else // Special key
{
- for (int i = 0; i < r->pitch_arr_.size (); i ++)
+ for (int i = 0; i < r->key_.pitch_arr_.size (); i ++)
{
- Musical_pitch m_l =r->pitch_arr_[i];
+ Musical_pitch m_l =r->key_.pitch_arr_[i];
if (key_.multi_octave_b_)
key_.set (m_l);
else
-ADD_THIS_TRANSLATOR(Key_performer);
+ADD_THIS_TRANSLATOR (Key_performer);
-Key_performer::Key_performer()
+Key_performer::Key_performer ()
{
key_req_l_ = 0;
+ audio_p_ = 0;
}
-Key_performer::~Key_performer()
+Key_performer::~Key_performer ()
{
}
void
-Key_performer::do_print() const
+Key_performer::do_print () const
{
#ifndef NPRINT
if (key_req_l_)
- key_req_l_->print();
+ key_req_l_->print ();
#endif
}
void
-Key_performer::do_process_requests()
+Key_performer::do_process_requests ()
{
if (key_req_l_)
- play (new Audio_key (key_req_l_));
- key_req_l_ = 0;
+ {
+ audio_p_ = new Audio_key (key_req_l_->key_);
+ Audio_element_info info (audio_p_, key_req_l_);
+ announce_element (info);
+ key_req_l_ = 0;
+ }
+}
+
+void
+Key_performer::do_pre_move_processing ()
+{
+ if (audio_p_)
+ {
+ play_element (audio_p_);
+ audio_p_ = 0;
+ }
}
bool
#include "musical-request.hh"
#include "audio-item.hh"
+ADD_THIS_TRANSLATOR (Lyric_performer);
-
-
-ADD_THIS_TRANSLATOR(Lyric_performer);
+Lyric_performer::Lyric_performer ()
+{
+ audio_p_ = 0;
+}
void
-Lyric_performer::do_print() const
+Lyric_performer::do_print () const
{
#ifndef NPRINT
- if (lreq_arr_.size())
- lreq_arr_[0]->print();
+ if (lreq_arr_.size ())
+ lreq_arr_[0]->print ();
#endif
}
void
-Lyric_performer::do_process_requests()
+Lyric_performer::do_process_requests ()
{
- if (lreq_arr_.size() && lreq_arr_[0]->text_str_.length_i())
- play (new Audio_text (Audio_text::LYRIC, lreq_arr_[0]->text_str_));
+ if (lreq_arr_.size () && lreq_arr_[0]->text_str_.length_i ())
+ {
+ audio_p_ = new Audio_text (Audio_text::LYRIC, lreq_arr_[0]->text_str_);
+ Audio_element_info info (audio_p_, lreq_arr_[0]);
+ announce_element (info);
+ }
+ lreq_arr_.clear();
+}
+
+void
+Lyric_performer::do_pre_move_processing ()
+{
+ if (audio_p_)
+ {
+ play_element (audio_p_);
+ audio_p_ = 0;
+ }
lreq_arr_.clear();
}
#include "misc.hh"
#include "string.hh"
#include "string-convert.hh"
-#include "command-request.hh"
-#include "musical-request.hh"
#include "midi-item.hh"
#include "midi-stream.hh"
#include "audio-item.hh"
+#include "duration.hh"
#include "killing-cons.tcc"
-Midi_chunk::Midi_chunk ()
- : Midi_item (0)
+Midi_item*
+Midi_item::midi_p (Audio_item* a)
{
+ if (Audio_key* i = dynamic_cast<Audio_key*> (a))
+ return new Midi_key (i);
+ else if (Audio_instrument* i = dynamic_cast<Audio_instrument*> (a))
+ return i->str_.length_i () ? new Midi_instrument (i) : 0;
+ else if (Audio_note* i = dynamic_cast<Audio_note*> (a))
+ return new Midi_note (i);
+ else if (Audio_tempo* i = dynamic_cast<Audio_tempo*> (a))
+ return new Midi_tempo (i);
+ else if (Audio_time_signature* i = dynamic_cast<Audio_time_signature*> (a))
+ return new Midi_time_signature (i);
+ else if (Audio_text* i = dynamic_cast<Audio_text*> (a))
+ return i->text_str_.length_i () ? new Midi_text (i) : 0;
+ else
+ assert (0);
+
+ // isn't C++ grand?
+ return 0;
}
void
{
String str = header_str_;
String dat = data_str ();
-#if 1
String length_str = String_convert::i2hex_str (dat.length_i ()
-#else
- // huh, huh??
- String length_str = String_convert::i2hex_str (data_str_.length_i ()
-#endif
+ footer_str_.length_i (), 8, '0');
length_str = String_convert::hex2bin_str (length_str);
str += length_str;
}
Midi_duration::Midi_duration (Real seconds_f)
- : Midi_item (0)
{
seconds_f_ = seconds_f;
}
return String ("<duration: ") + to_str (seconds_f_) + ">";
}
-Midi_event::Midi_event (Moment delta_mom, Midi_item* mitem_p)
+Midi_event::Midi_event (Moment delta_mom, Midi_item* midi_p)
{
delta_mom_ = delta_mom;
- mitem_p_ = mitem_p;
-}
-
-Midi_event::~Midi_event ()
-{
-// uhuh
-// delete mitem_p_;
+ midi_p_ = midi_p;
}
String
{
int delta_i = delta_mom_ * Moment (Duration::division_1_i_s);
String delta_str = Midi_item::i2varint_str (delta_i);
- String mitem_str = mitem_p_->str ();
- assert (mitem_str.length_i ());
- return delta_str + mitem_str;
+ String midi_str = midi_p_->str ();
+ assert (midi_str.length_i ());
+ return delta_str + midi_str;
}
Midi_header::Midi_header (int format_i, int tracks_i, int clocks_per_4_i)
- : Midi_chunk ()
{
String str;
0
};
-Midi_instrument::Midi_instrument (int channel_i, String instrument_str)
- : Midi_item (0)
-{
- instrument_str_ = instrument_str;
- instrument_str_.to_lower ();
- channel_i_ = channel_i;
-}
-
-Midi_item::~Midi_item ()
+Midi_instrument::Midi_instrument (Audio_instrument* a)
{
+ audio_l_ = a;
+ audio_l_->str_.to_lower ();
}
String
Byte program_byte = 0;
bool found = false;
for (int i = 0; !found && instrument_name_sz_a_[i]; i++)
- if (instrument_str_ == String (instrument_name_sz_a_[ i ]))
+ if (audio_l_->str_ == String (instrument_name_sz_a_[ i ]))
{
program_byte = (Byte)i;
found = true;
if (!found)
{
- warning (_f("No such instrument: `%s'", instrument_str_.ch_C ()));
+ warning (_f("No such instrument: `%s'", audio_l_->str_.ch_C ()));
}
String str = to_str ((char) (0xc0 + channel_i_));
return str;
}
-Midi_item::Midi_item (Audio_item* audio_item_l)
+Midi_item::Midi_item ()
{
- audio_item_l_ = audio_item_l;
channel_i_ = 0;
}
+Midi_item::~Midi_item ()
+{
+}
+
String
Midi_item::i2varint_str (int i)
{
return str;
}
-Midi_key::Midi_key (Audio_item* audio_item_l)
- : Midi_item (audio_item_l)
+Midi_key::Midi_key (Audio_key*a)
{
+ audio_l_ = a;
}
String
Midi_key::str () const
{
- Key_change_req* k = dynamic_cast <Key_change_req *> (audio_item_l_->req_l_);
- int sharps_i = k->sharps_i ();
- int flats_i = k->flats_i ();
+ int sharps_i = audio_l_->key_.sharps_i ();
+ int flats_i = audio_l_->key_.flats_i ();
// midi cannot handle non-conventional keys
if (flats_i && sharps_i)
String str = "ff5902";
str += String_convert::i2hex_str (accidentals_i, 2, '0');
- int minor_i = k->minor_b ();
- str += String_convert::i2hex_str (minor_i, 2, '0');
+ str += String_convert::i2hex_str ((int)audio_l_->key_.minor_b (), 2, '0');
return String_convert::hex2bin_str (str);
}
-Midi_time_signature::Midi_time_signature (Audio_item* audio_item_l)
- : Midi_item (audio_item_l)
+Midi_time_signature::Midi_time_signature (Audio_time_signature* a)
{
+ audio_l_ = a;
clocks_per_1_i_ = 18;
}
String
Midi_time_signature::str () const
{
- Time_signature_change_req* m = dynamic_cast <Time_signature_change_req *> (audio_item_l_->req_l_);
- int num_i = m->beats_i_;
- int den_i = m->one_beat_i_;
+ int num_i = audio_l_->beats_i_;
+ int den_i = audio_l_->one_beat_i_;
String str = "ff5804";
str += String_convert::i2hex_str (num_i, 2, '0');
return String_convert::hex2bin_str (str);
}
-Midi_note::Midi_note (Audio_item* audio_item_l)
- : Midi_item (audio_item_l)
+Midi_note::Midi_note (Audio_note* a)
{
+ audio_l_ = a;
dynamic_byte_ = 0x7f;
- assert (dynamic_cast<Audio_note*> (audio_item_l));
}
Moment
Midi_note::length_mom () const
{
- Moment m = dynamic_cast <Rhythmic_req *> (audio_item_l_->req_l_)->length_mom ();
+ Moment m = audio_l_->length_mom_;
+#if 0
if (m < Moment (1, 1000))
{
warning (_ ("silly duration"));
m = 1;
}
+#endif
return m;
}
int
Midi_note::pitch_i () const
{
- int p = dynamic_cast <Melodic_req*> (audio_item_l_->req_l_)->pitch_.semitone_pitch ()
- + dynamic_cast<Audio_note*>(audio_item_l_)->transposing_i_;
+ int p = audio_l_->pitch_.semitone_pitch () + audio_l_->transposing_i_;
if (p == INT_MAX)
{
warning (_ ("silly pitch"));
return str;
}
-Midi_note_off::Midi_note_off (Midi_note* midi_note_l)
- : Midi_item (midi_note_l->audio_item_l_)
+Midi_note_off::Midi_note_off (Midi_note* n)
{
+ on_l_ = n;
+ channel_i_ = n->channel_i_;
+
+ // Anybody who hears any difference, or knows how this works?
+
// 0x64 is supposed to be neutral, but let's try
- aftertouch_byte_ = 0x64;
- channel_i_ = midi_note_l->channel_i_;
+ //aftertouch_byte_ = 0x64;
+
+ static int i = 0;
+ aftertouch_byte_ = i;
+ i += 0x10;
}
int
Midi_note_off::pitch_i () const
{
- return dynamic_cast <Melodic_req *> (audio_item_l_->req_l_)->pitch_.semitone_pitch ()
- + dynamic_cast<Audio_note*>(audio_item_l_)->transposing_i_;
+ return on_l_->pitch_i ();
}
String
return str;
}
-Midi_tempo::Midi_tempo (Audio_item* audio_item_l)
- : Midi_item (audio_item_l)
-{
- per_minute_4_i_ = dynamic_cast<Audio_tempo*>(audio_item_l_)->per_minute_4_i_;
-}
-
-Midi_tempo::Midi_tempo (int per_minute_4_i)
- : Midi_item (0)
+Midi_tempo::Midi_tempo (Audio_tempo* a)
{
- per_minute_4_i_ = per_minute_4_i;
+ audio_l_ = a;
}
String
Midi_tempo::str () const
{
- int useconds_per_4_i = 60 * (int)1e6 / per_minute_4_i_;
+ int useconds_per_4_i = 60 * (int)1e6 / audio_l_->per_minute_4_i_;
String str = "ff5103";
str += String_convert::i2hex_str (useconds_per_4_i, 6, '0');
return String_convert::hex2bin_str (str);
}
-Midi_text::Midi_text (Audio_item* audio_item_l)
- : Midi_item (audio_item_l)
+Midi_text::Midi_text (Audio_text* a)
{
- text_str_ = dynamic_cast<Audio_text*>(audio_item_l_)->text_str_;
- type_ = (Type) dynamic_cast<Audio_text*>(audio_item_l_)->type_;
+ audio_l_ = a;
}
+#if 0
Midi_text::Midi_text (Midi_text::Type type, String text_str)
- : Midi_item (0)
+ : Audio_text ()
{
text_str_ = text_str;
type_ = type;
}
+#endif
String
Midi_text::str () const
{
- String str = "ff" + String_convert::i2hex_str (type_, 2, '0');
+ String str = "ff" + String_convert::i2hex_str (audio_l_->type_, 2, '0');
str = String_convert::hex2bin_str (str);
- str += i2varint_str (text_str_.length_i ());
- str += text_str_;
+ str += i2varint_str (audio_l_->text_str_.length_i ());
+ str += audio_l_->text_str_;
return str;
}
}
void
-Midi_track::add (Moment delta_time_mom, Midi_item* mitem_p)
+Midi_track::add (Moment delta_time_mom, Midi_item* midi_p)
{
assert (delta_time_mom >= Moment (0));
- Midi_event * e = new Midi_event (delta_time_mom, mitem_p);
+ Midi_event * e = new Midi_event (delta_time_mom, midi_p);
event_p_list_.append (new Killing_cons<Midi_event> (e, 0));
}
}
return str;
}
-
-Midi_track::~Midi_track ()
-{
-}
}
Midi_stream&
-Midi_stream::operator << (Midi_item const& mitem_c_r)
+Midi_stream::operator << (Midi_item const& midi_c_r)
{
-// *this <<mitem_c_r.str ();
- String str = mitem_c_r.str ();
+// *this <<midi_c_r.str ();
+ String str = midi_c_r.str ();
if (check_debug && !monitor->silent_b ("Midistrings"))
{
str = String_convert::bin2hex_str (str) + "\n";
void
Midi_walker::process()
{
- Audio_item* ptr = (*item_l_arr_l_)[index_];
- do_stop_notes (ptr->audio_column_l_->at_mom ());
+ Audio_item* audio_p = (*item_l_arr_l_)[index_];
+ do_stop_notes (audio_p->audio_column_l_->at_mom ());
/*
THIS IS A MEMORY LEAK. FIXME.
*/
- Midi_item* p = ptr->midi_item_p ();
- if (!p)
- return;
- p->channel_i_ = track_l_->number_i_;
-
- if (Midi_note *mi = dynamic_cast<Midi_note*>(p))
- do_start_note (mi);
- else
- output_event (ptr->audio_column_l_->at_mom (), p);
+ //Midi_item* p = ptr->midi_item_p ();
+ if (Midi_item* midi_p = Midi_item::midi_p (audio_p))
+ {
+ midi_p->channel_i_ = track_l_->number_i_;
+ if (Midi_note* note_p = dynamic_cast<Midi_note*>(midi_p))
+ {
+ if (note_p->length_mom ())
+ do_start_note (note_p);
+ }
+ else
+ output_event (audio_p->audio_column_l_->at_mom (), midi_p);
+ }
}
+
bool
Midi_walker::ok () const
{
return index_ <item_l_arr_l_->size ();
}
+
void
Midi_walker::operator ++(int)
{
bool
Multi_measure_rest_engraver::do_try_music (Music* req_l)
{
- if (Multi_measure_rest_req *mr = dynamic_cast<Multi_measure_rest_req *> (req_l))
- {
- if (multi_measure_req_l_)
- if (!multi_measure_req_l_->equal_b (mr)
- || rest_moments_[START] != now_mom ())
- return false;
-
- multi_measure_req_l_ = mr;
- rest_moments_[START] = now_mom ();
-
- rest_moments_[STOP] = rest_moments_[START] + multi_measure_req_l_->duration_.length_mom ();
- return true;
- }
- return false;
+ Rhythmic_req *r=0;
+ if (Multi_measure_rest_req *mr =
+ dynamic_cast<Multi_measure_rest_req *> (req_l))
+ r=mr;
+ else if (Repetitions_req *rr =
+ dynamic_cast<Repetitions_req *> (req_l))
+ r=rr;
+ if (r)
+ {
+ if (multi_measure_req_l_)
+ if (!multi_measure_req_l_->equal_b (r)
+ || rest_moments_[START] != now_mom ())
+ return false;
+
+ multi_measure_req_l_ = r;
+ rest_moments_[START] = now_mom ();
+
+ rest_moments_[STOP] = rest_moments_[START] +
+ multi_measure_req_l_->duration_.length_mom ();
+ return true;
+ }
+ return false;
}
void
{
Time_description const *time = get_staff_info().time_C_;
mmrest_p_ = new Multi_measure_rest;
+ if(dynamic_cast<Repetitions_req *> (multi_measure_req_l_))
+ mmrest_p_->set_elt_property (alt_symbol_scm_sym,
+ gh_str02scm("scripts-repeatsign"));
announce_element (Score_element_info (mmrest_p_, multi_measure_req_l_));
start_measure_i_ = time->bars_i_;
}
Molecule s;
- if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4)
+ bool rest_symbol=true;
+ SCM alt_symbol_sym =get_elt_property (alt_symbol_scm_sym);
+ if (alt_symbol_sym != SCM_BOOL_F)
+ {
+ s = lookup_l () -> afm_find (ly_scm2string (SCM_CDR(alt_symbol_sym)));
+ rest_symbol = false;
+ }
+ else if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4)
{
s = lookup_l ()->rest (- intlog2(measures_i_), 0, "");
s.translate_axis (-s.extent ()[X_AXIS].length () / 2, X_AXIS);
}
mol_p->add_molecule (s);
Real interline_f = staff_line_leading_f ();
- if (measures_i_ == 1)
+ if (measures_i_ == 1 && rest_symbol)
{
mol_p->translate_axis (interline_f, Y_AXIS);
}
s.translate_axis (3.0 * interline_f, Y_AXIS);
mol_p->add_molecule (s);
}
-
mol_p->translate_axis (x_off, X_AXIS);
return mol_p;
}
p = new Grace_iterator;
else if (dynamic_cast<Music_wrapper const *> (m))
p = new Music_wrapper_iterator;
- else if (New_repeated_music const * n = dynamic_cast<New_repeated_music const *> (m))
+ else if (Repeated_music const * n = dynamic_cast<Repeated_music const *> (m))
{
if (n->fold_b_)
p = new Folded_repeat_iterator;
}
-
void
Music_sequence::compress (Moment m)
{
{"context", CONTEXT},
{"duration", DURATION},
{"font", FONT},
- {"grouping", GROUPING},
{"grace", GRACE},
{"header", HEADER},
{"in", IN_T},
{"relative", RELATIVE},
{"remove", REMOVE},
{"repeat", REPEAT},
+ {"repetitions", REPETITIONS},
{"scm", SCM_T},
{"scmfile", SCMFILE},
{"score", SCORE},
--- /dev/null
+/*
+ new-beaming.cc -- implement Beaming_info, Beaming_info_list
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "new-beaming.hh"
+
+Beaming_info::Beaming_info( )
+{
+ start_mom_ = 0;
+ beams_i_drul_[LEFT] = 0;
+ beams_i_drul_[RIGHT] = 0;
+}
+
+Beaming_info::Beaming_info(Moment m, int i)
+{
+ start_mom_ = m;
+ beams_i_drul_[LEFT] = i;
+ beams_i_drul_[RIGHT] = i;
+}
+
+const int infinity_i = 1000; // guh.
+
+int
+Beaming_info_list::min_denominator_index () const
+{
+ int minden = infinity_i;
+ int minidx = -1;
+
+ for (int i=1; i < infos_.size ( ); i++)
+ {
+ if (infos_[i].start_mom_.den_i () < minden)
+ {
+ minidx = i;
+ minden = infos_[i].start_mom_.den_i ();
+ }
+ }
+
+ return minidx;
+}
+
+int
+Beaming_info_list::beam_extend_count (Direction d) const
+{
+ if (infos_.size () == 1)
+ return infos_[0].beams_i_drul_[d];
+
+ Beaming_info thisbeam = infos_.boundary (d, 0);
+ Beaming_info next = infos_.boundary (d, 1);
+
+ return thisbeam.beams_i_drul_[-d] <? next.beams_i_drul_[d];
+}
+
+void
+Beaming_info_list::beamify ()
+{
+ if (infos_.size () <= 1)
+ return;
+
+ Drul_array<Beaming_info_list> splits;
+ int m = min_denominator_index ();
+ splits[LEFT].infos_ = infos_.slice (0,m);
+ splits[RIGHT].infos_ = infos_.slice (m, infos_.size ());
+
+ Direction d = LEFT;
+
+ do
+ {
+ splits[d].beamify ();
+ }
+ while (flip (&d) != LEFT);
+
+ int middle_beams = splits[RIGHT].beam_extend_count (LEFT) <?
+ splits[LEFT].beam_extend_count (RIGHT);
+
+ do
+ {
+ if (splits[d].infos_.size () != 1)
+ {
+ splits[d].infos_.boundary (-d, 0).beams_i_drul_[-d] = middle_beams;
+ }
+ }
+ while (flip (&d) != LEFT);
+
+ infos_ = splits[LEFT].infos_;
+ infos_.concat (splits[RIGHT].infos_);
+}
+
+void
+Beaming_info_list::add_stem (Moment m, int b)
+{
+ infos_.push (Beaming_info (m, b));
+}
else if (head_l_arr_.size ())
return sign (head_positions_interval().center ());
- programming_error ("Note column without heads and stem!");
+ programming_error ("Note column without heads and stem!");
return CENTER;
}
Note_performer::do_print () const
{
#ifndef NPRINT
- if (note_req_l_.size()>0)
- for(int i=0;i<note_req_l_.size();i++)
- note_req_l_[i]->print ();
+ if (note_req_l_arr_.size()>0)
+ for(int i=0;i<note_req_l_arr_.size();i++)
+ note_req_l_arr_[i]->print ();
#endif
}
void
Note_performer::do_process_requests ()
{
- if (note_req_l_.size()>0)
+ if (note_req_l_arr_.size ())
{
int transposing_i = 0;
//urg
if (!prop.empty_b () && prop.isnum_b ())
transposing_i = prop;
- while(note_req_l_.size()>0)
- play (new Audio_note (note_req_l_.pop(), transposing_i));
-
+ while(note_req_l_arr_.size ())
+ {
+ Note_req* n = note_req_l_arr_.pop ();
+ Audio_note* p = new Audio_note (n->pitch_, n->length_mom (), transposing_i);
+ Audio_element_info info (p, n);
+ announce_element (info);
+ note_p_arr_.push (p);
+ }
}
}
-bool
+void
+Note_performer::do_pre_move_processing ()
+{
+ for (int i=0; i < note_p_arr_.size (); i++)
+ {
+ play_element (note_p_arr_[i]);
+ }
+ note_p_arr_.clear ();
+ note_req_l_arr_.clear ();
+}
+
+bool
Note_performer::do_try_music (Music* req_l)
{
if (Note_req *nr = dynamic_cast <Note_req *> (req_l))
{
- note_req_l_.push(nr);
+ note_req_l_arr_.push (nr);
return true;
}
return false;
}
if (experimental_features_global_b)
- *mlog << elem_p_arr_.size () + span_p_arr_.size () << " elements. ";
+ *mlog << elem_p_arr_.size () + span_p_arr_.size () << _ (" elements. ");
- *mlog << "\nLine ... ";
+ *mlog << "\n";
+ *mlog << _ ("Line ... ");
line_l_->break_processing ();
for (int i=0; i < lines.size (); i++)
{
Line_of_score *line_l = lines[i];
line_l->post_processing ();
- *mlog << i << flush;
+ *mlog << i << flush;
line_l->output_all (i + 1 == lines.size());
if (experimental_features_global_b)
*mlog << '(' << elem_p_arr_.size () + span_p_arr_.size () << ')';
outstream_l_ = s;
output_header ();
-#ifdef __powerpc__
- if (output_global_ch == String ("scm"))
- {
- int fd = 1;
- ofstream * of = dynamic_cast<ofstream*> (outstream_l_->os);
- if (of)
- fd = of->rdbuf()->fd();
- FILE *file = fdopen (fd, "a");
- port_ = scm_standard_stream_to_port (file, "a", "");
- scm_display (gh_str02scm (
- "(primitive-load-path 'lily.scm)\n"
- "(eval (tex-scm 'all-definitions))\n"
- ";(eval (ps-scm 'all-definitions))\n"
- "(display (map (lambda (x) (string-append (eval x) \"%\\n\")) '(\n"
- ), port_);
-
- scm_fflush (port_);
- }
-#else
if (output_global_ch == String ("scm"))
*outstream_l_->os << ""
"(primitive-load-path 'lily.scm)\n"
";(eval (ps-scm 'all-definitions))\n"
"(display (map (lambda (x) (string-append (eval x) \"\\n\")) '(\n"
;
-#endif
}
Paper_outputter::~Paper_outputter ()
SCM scm = gh_list (ly_symbol ("end-output"), SCM_UNDEFINED);
output_scheme (scm);
-#ifdef __powerpc__
- if (String (output_global_ch) == "scm")
- {
- scm_display (gh_str02scm (")))\n"), port_);
- scm_fflush (port_);
- }
-#else
if (String (output_global_ch) == "scm")
{
*outstream_l_->os << ")))";
}
-#endif
}
void
void
Paper_outputter::output_scheme (SCM scm)
{
-#ifdef __powerpc__
- if (String (output_global_ch) == "scm")
- {
- scm_write (scm, port_);
- scm_display (gh_str02scm ("\n"), port_);
- scm_fflush (port_);
- }
-#else
if (String (output_global_ch) == "scm")
{
SCM result = scm_eval (scm_listify (ly_symbol ("scm->string"), ly_quote_scm (scm), SCM_UNDEFINED));
*outstream_l_->os << ly_scm2string (result) << endl;
}
-#endif
else
{
SCM result = scm_eval (scm);
#include "grace-music.hh"
// mmm
-Mudela_version oldest_version ("1.0.20");
+Mudela_version oldest_version ("1.1.52");
Mudela_version version ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
void
print_mudela_versions (ostream &os)
{
- os << "Mudela versions: oldest " << oldest_version.str () << " current " << version.str () <<endl;
+ os << "Oldest supported input version: " << oldest_version.str () << endl;
}
// needed for bison.simple's malloc() and free()
#include <malloc.h>
%token DURATION
%token EXTENDER
%token FONT
-%token GROUPING
%token GRACE
%token HEADER
%token IN_T
%token RELATIVE
%token REMOVE
%token REPEAT
+%token REPETITIONS
%token SCM_T
%token SCMFILE
%token SCORE
%type <id> identifier_init
%type <duration> steno_duration notemode_duration
%type <duration> entered_notemode_duration explicit_duration
-%type <intvec> intastint_list int_list
+%type <intvec> int_list
%type <reqvec> pre_requests post_requests
%type <request> gen_text_def
%type <pitch> explicit_musical_pitch steno_musical_pitch musical_pitch absolute_musical_pitch
}
;
-intastint_list:
- /* */ { $$ =new Array<int>; }
- | intastint_list int '*' int {
- $$->push ($2); $$->push ($4);
- }
- | intastint_list int {
- $$->push ($2); $$->push (1);
- }
- ;
-
/*
PAPER
}
| ALTERNATIVE Music_sequence {
$$ = $2;
+ $2->set_spot (THIS->here_input ());
}
;
REPEAT STRING unsigned Music Alternative_music
{
Music_sequence* m = dynamic_cast <Music_sequence*> ($5);
+ if (m && $3 < m->length_i ())
+ $5->warning ("More alternatives than repeats. Junking excess alternatives.");
- New_repeated_music * r = new New_repeated_music ($4, $3 >? 1, m);
+ Repeated_music * r = new Repeated_music ($4, $3 >? 1, m);
$$ = r;
r->fold_b_ = (*$2 == "fold");
r->semi_fold_b_ = (*$2 == "semi");
delete $2;
+ r->set_spot (THIS->here_input ());
+
}
;
}
| KEY NOTENAME_PITCH optional_modality {
Key_change_req *key_p= new Key_change_req;
- key_p->pitch_arr_.push(*$2);
- key_p->ordinary_key_b_ = true;
- key_p->modality_i_ = $3;
+ key_p->key_.pitch_arr_.push (*$2);
+ key_p->key_.ordinary_key_b_ = true;
+ key_p->key_.modality_i_ = $3;
$$ = key_p;
delete $2;
}
| KEYSIGNATURE pitch_list {
Key_change_req *key_p= new Key_change_req;
- key_p->pitch_arr_ = *$2;
- key_p->ordinary_key_b_ = false;
+ key_p->key_.pitch_arr_ = *$2;
+ key_p->key_.ordinary_key_b_ = false;
$$ = key_p;
delete $2;
}
- | GROUPING intastint_list {
- Measure_grouping_req * mr_p = new Measure_grouping_req;
- for (int i=0; i < $2->size();)
- {
- mr_p->elt_length_arr_.push (Moment (1, $2->elem(i++)));
- mr_p->beat_i_arr_.push ($2->elem(i++));
- }
-
- $$ = mr_p;
- delete $2;
- }
;
post_requests:
velt_p->add_music (m);
$$ = velt_p;
}
+ | REPETITIONS notemode_duration {
+ Repetitions_req* r = new Repetitions_req;
+ r->duration_ = *$2;
+ delete $2;
+
+ Simultaneous_music*velt_p = new Request_chord;
+ velt_p->set_spot (THIS->here_input ());
+ velt_p->add_music (r);
+ $$ = velt_p;
+ }
| STRING notemode_duration {
if (!THIS->lexer_p_->lyric_state_b ())
THIS->parser_error (_ ("have to be in Lyric mode for lyrics"));
#include "midi-item.hh"
#include "midi-stream.hh"
#include "audio-column.hh"
+#include "audio-item.hh"
#include "audio-staff.hh"
#include "performance.hh"
#include "score.hh"
midi_stream << Midi_header (1, tracks_i, clocks_per_4_i);
output_header_track (midi_stream);
+ *mlog << "\n";
+ *mlog << _ ("Track ... ");
int channel = 1;
for (int i =0; i < audio_staff_l_arr_.size (); i++)
{
+ *mlog << '[' << flush;
Audio_staff *s = audio_staff_l_arr_[i];
+ *mlog << i << flush;
+
/*
Aargh, let's hear it for the MIDI standard.
MIDI players tend to ignore instrument settings on
if (channel == 9)
channel++;
s->output (midi_stream, channel++);
+ *mlog << ']' << flush;
}
}
str += gnu_lilypond_version_str();
str += "\n";
- Midi_text creator (Midi_text::TEXT, str);
+ /*
+ This seems silly, but in fact the audio elements should
+ be generated elsewhere: not midi-specific.
+ */
+ Audio_text creator_a (Audio_text::TEXT, str);
+ Midi_text creator (&creator_a);
midi_track.add (Moment (0), &creator);
str = _("Automatically generated");
str += ctime (&t);
str = str.left_str (str.length_i() - 1);
}
- Midi_text generate (Midi_text::TEXT, str);
+ Audio_text generate_a (Audio_text::TEXT, str);
+ Midi_text generate (&generate_a);
midi_track.add (Moment (0), &generate);
str = _f ("from musical definition: %s", origin_str_);
- Midi_text from (Midi_text::TEXT, str);
+ Audio_text from_a (Audio_text::TEXT, str);
+ Midi_text from (&from_a);
midi_track.add (Moment (0), &from);
- Midi_text track_name (Midi_text::TRACK_NAME, "Track "
- + String_convert::i2dec_str (0, 0, '0'));
+ Audio_text track_name_a (Audio_text::TRACK_NAME, "Track "
+ + String_convert::i2dec_str (0, 0, '0'));
+ Midi_text track_name (&track_name_a);
+
midi_track.add (Moment (0), &track_name);
- Midi_tempo tempo (midi_l_->get_tempo_i (Moment (1, 4)));
+ Audio_tempo tempo_a (midi_l_->get_tempo_i (Moment (1, 4)));
+ Midi_tempo tempo (&tempo_a);
midi_track.add (Moment (0), &tempo);
midi_stream << midi_track;
for (int i=0; i < nongroups.size(); i++)
{ // Is this good enough?
Performer * eng = dynamic_cast<Performer*> (nongroups[i]);
- if (eng && eng!= info.origin_trans_l_arr_[0])
+ // urg, huh? core dump?
+ //if (eng && eng!= info.origin_trans_l_arr_[0])
+ if (eng && info.origin_trans_l_arr_.size ()
+ && eng!= info.origin_trans_l_arr_[0])
eng->acknowledge_element (info);
}
}
#include "debug.hh"
void
-Performer::play (Audio_element* p)
+Performer::play_element (Audio_element* p)
{
- daddy_perf_l ()->play (p);
+ daddy_perf_l ()->play_element (p);
}
int
ADD_THIS_TRANSLATOR (Repeat_engraver);
/*
- Urg. Hairy. Needs redesign?
+ Needs redesign?
+
+ - Logic needs to be moved out of do_try_music(),
+
+ - don't try to do multiple repeated music. Lets assume repeats don't nest.
+
*/
bool
Repeat_engraver::do_try_music (Music* m)
{
- if (New_repeated_music* r = dynamic_cast<New_repeated_music *> (m))
+ if (Repeated_music* r = dynamic_cast<Repeated_music *> (m))
{
- if (!r->semi_fold_b_)
- return true;
+ if (repeated_music_l_)
+ {
+ m->warning ("Already have repeated music.");
+ return false;
+ }
+
+ if (r->semi_fold_b_)
+ {
+ repeated_music_l_ = r;
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ Walk through repeat music, and generate events for appropriate times.
+*/
+void
+Repeat_engraver::queue_events ()
+{
+ Music_sequence* alt = repeated_music_l_->alternatives_p_;
+ Moment walk_mom = now_mom () + repeated_music_l_->repeat_body_p_->length_mom ();
+
+
+ Cons_list<Bar_create_event> becel;
+ becel.append (new Bar_create_event (now_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 (!alt)
+ {
+ becel.append (new Bar_create_event (walk_mom, ":|"));
+ becel.append (new Bar_create_event (walk_mom, "stop"));
+ }
+ else
+ {
+ int last_number = 0;
+ int volta_number = repeated_music_l_->repeats_i_ - alt->length_i () + 1;
/*
- if there's a repeat block, we'll need a stop-repeat :|
- */
- if (repeat_length_mom)
+ all repeat alternatives, and generate events with
+ appropriate timestamps. The volta spanner event (a number string)
+ happens at the begin of the alt. The :| bar event at the ending.
+ */
+ for (Cons<Music> *i = alt->music_p_list_p_->head_; i; i = i->next_)
{
+
/*
- if there are alternatives, the :| comes before last alternative
- (only for semi-unfolded, but otherwise we're not here anyway?)
- */
- if (alt)
+ some idiot might typeset a repeat not starting on a
+ barline. Make sure there is one.
+
+ (todo: should try to avoid line breaks?)
+ */
+ if (last_number == 0)
{
- for (Cons<Music> *i (alt->music_p_list_p_->head_); i && i->next_; i = i->next_)
- {
- stop_mom += i->car_->length_mom ();
- if (r->fold_b_)
- break;
- }
- }
- repeated_music_arr_.push (r);
- stop_mom_arr_.push (stop_mom);
+ becel.append (new Bar_create_event (walk_mom, ""));
+ }
+
+
+ Bar_create_event * c = new Bar_create_event (walk_mom, last_number+ 1,
+ volta_number);
+
+ if (!i->next_)
+ c->last_b_ = true;
+
+ becel.append (c);
+ last_number = volta_number;
+ volta_number ++;
+
+ // should think about voltaSpannerDuration
+ walk_mom += i->car_->length_mom();
+
+ if (i->next_)
+ becel.append (new Bar_create_event (walk_mom, ":|"));
+ else
+ becel.append (new Bar_create_event (walk_mom, "stop"));
}
+ }
+ create_barmoments_queue_ = becel.head_ ;
+ becel.head_ = 0;
+}
- /*
- Counting nested repeats, it seems safest to forbid
- two pieces of alternative music to start at the same time.
- */
- for (int i = 0; i < alternative_start_mom_arr_.size (); i++)
- if (alternative_start_mom_arr_[i] == alt_mom)
- return false;
+void
+Repeat_engraver::do_process_requests ()
+{
+ if (repeated_music_l_ && !done_this_one_b_)
+ {
+ queue_events ();
+ done_this_one_b_ = true;
+ }
+
+
+ Cons<Bar_create_event> * head = create_barmoments_queue_;
+ if (!head)
+ return;
- /*
- Coda kludge: see input/test/coda-kludge.ly
- */
- Moment span_mom;
- Scalar prop = get_property ("voltaSpannerDuration", 0);
- if (prop.length_i ())
- span_mom = prop.to_rat ();
-
- if (!alt)
- return true;
-
- int alt_i = r->repeats_i_ + 1 - cons_list_size_i (alt->music_p_list_p_->head_ ) >? 1;
- for (Cons<Music> *i = alt->music_p_list_p_->head_; i ; i = i->next_)
- {
- alternative_music_arr_.push (i->car_);
- alternative_start_mom_arr_.push (alt_mom);
- if (span_mom)
- alternative_stop_mom_arr_.push (alt_mom + span_mom);
+ Bar_engraver* bar_engraver_l = dynamic_cast <Bar_engraver*>
+ (daddy_grav_l ()->get_simple_translator ("Bar_engraver"));
+
+ /*
+ Do all the events that need to be done now.
+ */
+ bool stop = false;
+ while (head && now_mom () == head->car_->when_)
+ {
+ create_barmoments_queue_ = create_barmoments_queue_->next_;
+ head->next_ =0;
+ if (bar_engraver_l)
+ {
+ String t = head->car_->type_;
+ if (head->car_->bar_b_)
+ {
+ if (t == "stop" || t == ":|")
+ {
+ end_volta_span_p_ = volta_span_p_;
+ volta_span_p_ =0;
+ }
+
+ if (t != "stop")
+ bar_engraver_l->request_bar (t);
+ }
else
- alternative_stop_mom_arr_.push (alt_mom + i->car_->length_mom ());
- String str;
- if ((alt_i != 1) && (alt_i != r->repeats_i_) && (i == alt->music_p_list_p_->head_))
- str = "1.-";
- str += to_str (alt_i) + ".";
- alt_i++;
- alternative_str_arr_.push (str);
- if (!dynamic_cast<Simultaneous_music *> (alt))
- alt_mom += i->car_->length_mom ();
+ {
+ assert (!volta_span_p_);
+ volta_span_p_ = new Volta_spanner;
+ announce_element (Score_element_info (volta_span_p_,0));
+ volta_span_p_->number_str_ = t;
+ volta_span_p_->last_b_ = head->car_->last_b_;
+ // voltaSpannerDuration stuff here.
+ // other property stuff here.
+ }
+
+ }
+ else
+ {
+ warning ("No bar engraver found. Ignoring repeats.");
}
- return true;
+
+ delete head->car_;
+ delete head;
+
+ head = create_barmoments_queue_;
}
- return false;
-}
+
+ assert (!head || head->car_->when_ > now_mom ());
+}
+
void
Repeat_engraver::acknowledge_element (Score_element_info i)
{
- Moment now = now_mom ();
if (Note_column *c = dynamic_cast<Note_column *> (i.elem_l_))
{
- for (int i = 0; i < volta_p_arr_.size (); i++)
- if (volta_p_arr_[i] && (now >= alternative_start_mom_arr_[i]))
- volta_p_arr_[i]->add_column (c);
+ if (volta_span_p_)
+ volta_span_p_->add_column (c);
+ if (end_volta_span_p_)
+ end_volta_span_p_->add_column (c);
}
if (Bar *c = dynamic_cast<Bar*> (i.elem_l_))
{
- for (int i = 0; i < volta_p_arr_.size (); i++)
- if (volta_p_arr_[i] && (now >= alternative_start_mom_arr_[i]))
- volta_p_arr_[i]->add_column (c);
+ if (volta_span_p_)
+ volta_span_p_->add_bar (c);
+ if (end_volta_span_p_)
+ end_volta_span_p_ ->add_bar(c);
}
}
+
void
Repeat_engraver::do_removal_processing ()
{
- for (int i = 0; i < volta_p_arr_.size (); i++)
- if (volta_p_arr_[i])
- typeset_element (volta_p_arr_[i]);
-}
-
-void
-Repeat_engraver::do_process_requests ()
-{
- Moment now = now_mom ();
- Bar_engraver* bar_engraver_l = dynamic_cast <Bar_engraver*>
- (daddy_grav_l ()->get_simple_translator ("Bar_engraver"));
- for (int i = bar_b_arr_.size (); i < repeated_music_arr_.size (); i++)
+ if (volta_span_p_)
{
- if (bar_engraver_l)
- bar_engraver_l->request_bar ("|:");
- bar_b_arr_.push (true);
+ typeset_element(volta_span_p_);
}
- for (int i = 0; i < bar_b_arr_.size (); i++)
+ if (end_volta_span_p_)
{
- if (!bar_b_arr_[i] && (now >= stop_mom_arr_[i]))
- {
- if (bar_engraver_l)
- bar_engraver_l->request_bar (":|");
- }
- }
- for (int i = volta_p_arr_.size (); i < alternative_music_arr_.size (); i++)
- {
- Volta_spanner* v = new Volta_spanner;
- Scalar prop = get_property ("voltaVisibility", 0);
- if (!prop.to_bool ())
- v->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
- prop = get_property ("voltaSpannerDuration", 0);
- if ((i == alternative_music_arr_.size () - 1) || prop.length_i ())
- v->last_b_ = true;
-
- v->number_str_ = alternative_str_arr_[i];
- volta_p_arr_.push (v);
- announce_element (Score_element_info (v, alternative_music_arr_[i]));
+ typeset_element (end_volta_span_p_);
}
+ // todo: the paranoid may also delete create_barmoments_queue_
+}
+
+void
+Repeat_engraver::do_post_move_processing ()
+{
+ for (Cons<Bar_create_event> *p = create_barmoments_queue_;
+ p && p->car_->when_ == now_mom (); p = p->next_)
+ if (p->car_->type_ == "stop")
+ {
+ repeated_music_l_ = 0;
+ done_this_one_b_ = false;
+ }
}
void
Repeat_engraver::do_pre_move_processing ()
{
- Moment now = now_mom ();
- for (int i = bar_b_arr_.size (); i--; )
+ if (end_volta_span_p_)
{
- if (bar_b_arr_[i])
- bar_b_arr_[i] = false;
- if (now >= stop_mom_arr_[i])
- {
- bar_b_arr_.del (i);
- stop_mom_arr_.del (i);
- repeated_music_arr_.del (i);
- }
- }
- for (int i = volta_p_arr_.size (); i--; )
- {
- if (volta_p_arr_[i] && (now >= alternative_stop_mom_arr_[i])
- && (volta_p_arr_[i]->column_arr_.size () >= 1))
- {
- typeset_element (volta_p_arr_[i]);
- volta_p_arr_[i] = 0;
- volta_p_arr_.del (i);
- alternative_music_arr_[i] = 0;
- alternative_music_arr_.del (i);
- alternative_start_mom_arr_.del (i);
- alternative_stop_mom_arr_.del (i);
- alternative_str_arr_.del (i);
- }
+ typeset_element (end_volta_span_p_ );
+ end_volta_span_p_ =0;
}
+
+}
+
+
+Repeat_engraver::Repeat_engraver()
+{
+ repeated_music_l_ =0;
+ end_volta_span_p_ =0;
+ volta_span_p_ =0;
+ done_this_one_b_ = false;
+ create_barmoments_queue_ =0;
+}
+
+/* ************** */
+Bar_create_event::Bar_create_event()
+{
+ last_b_ =false;
+ bar_b_ = true;
+}
+
+Bar_create_event::Bar_create_event (Moment w, String s)
+{
+ last_b_ =false;
+ when_ = w;
+ type_ = s;
+ bar_b_ = true;
+}
+
+Bar_create_event::Bar_create_event (Moment w, int i, int j)
+{
+ last_b_ =false;
+ when_ = w ;
+ bar_b_ = false;
+
+ if (i!=j)
+ type_ = to_str (i) + ".-" ;
+
+ type_ += to_str(j) + ".";
}
void
Folded_repeat_iterator::construct_children ()
{
- New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_);
+ Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
main_iter_p_ = get_iterator_p (mus->repeat_body_p_);
if (!main_iter_p_->ok())
{
music_l_->warning ( _("No one to print a volta bracket"));
}
- New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_);
+ Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
if (main_iter_p_)
{
void
Folded_repeat_iterator::leave_body ()
{
- New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_);
+ Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
delete main_iter_p_;
main_iter_p_ = 0;
main_length_mom_ += mus->repeat_body_p_->length_mom ();
void
Folded_repeat_iterator::enter_alternative ()
{
- New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_);
+ Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
if (mus->alternatives_p_)
{
Simultaneous_music_iterator * s = new Simultaneous_music_iterator;
/*
- new-repeated-music.cc -- implement New_repeated_music
+ new-repeated-music.cc -- implement Repeated_music
source file of the GNU LilyPond music typesetter
#include "musical-pitch.hh"
#include "debug.hh"
-New_repeated_music::New_repeated_music(Music *beg, int times, Music_sequence * alts)
+Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts)
{
repeat_body_p_ = beg;
fold_b_ = false;
repeats_i_ = times;
alternatives_p_ = alts;
semi_fold_b_ = true;
+ if (alts)
+ alts->music_p_list_p_->truncate (times);
}
-New_repeated_music::New_repeated_music (New_repeated_music const &s)
+Repeated_music::Repeated_music (Repeated_music const &s)
: Music (s)
{
repeats_i_ = s.repeats_i_;
? dynamic_cast<Music_sequence*> (s.alternatives_p_->clone ()):0;
}
-New_repeated_music::~New_repeated_music ()
+Repeated_music::~Repeated_music ()
{
delete repeat_body_p_;
delete alternatives_p_;
}
void
-New_repeated_music::do_print () const
+Repeated_music::do_print () const
{
#ifndef NPRINT
DOUT << "Fold = " << fold_b_ << " reps: " << repeats_i_;
}
Musical_pitch
-New_repeated_music::to_relative_octave (Musical_pitch p)
+Repeated_music::to_relative_octave (Musical_pitch p)
{
if (repeat_body_p_)
p = repeat_body_p_->to_relative_octave (p);
void
-New_repeated_music::transpose (Musical_pitch p)
+Repeated_music::transpose (Musical_pitch p)
{
if (repeat_body_p_)
repeat_body_p_->transpose (p);
}
void
-New_repeated_music::compress (Moment p)
+Repeated_music::compress (Moment p)
{
if (repeat_body_p_)
repeat_body_p_->compress (p);
}
Moment
-New_repeated_music::alternatives_length_mom () const
+Repeated_music::alternatives_length_mom () const
{
if (!alternatives_p_ )
return 0;
}
Moment
-New_repeated_music::length_mom () const
+Repeated_music::length_mom () const
{
Moment m =0;
if (fold_b_)
if (!gotcha)
{
+ /*
+ UGH! THIS IS NOT SYMMETRIC. CLEAN ME UP!
+ */
if (Break_req* b = dynamic_cast<Break_req *> (r))
{
gotcha = true;
}
}
return gotcha;
-
}
+void
+Score_engraver::forbid_breaks ()
+{
+ break_penalty_i_ = Break_req::DISALLOW;
+}
ADD_THIS_TRANSLATOR(Score_engraver);
#include "audio-staff.hh"
-ADD_THIS_TRANSLATOR(Score_performer);
+ADD_THIS_TRANSLATOR (Score_performer);
-Score_performer::Score_performer()
+Score_performer::Score_performer ()
{
- performance_p_ =0;
+ performance_p_ = 0;
}
-Score_performer::~Score_performer()
+Score_performer::~Score_performer ()
{
}
void
-Score_performer::play (Audio_element * p)
+Score_performer::play_element (Audio_element * p)
{
if (Audio_item * i=dynamic_cast<Audio_item *> (p))
{
performance_p_->add_element (p);
}
+void
+Score_performer::announce_element (Audio_element_info info)
+{
+ announce_info_arr_.push (info);
+ info.origin_trans_l_arr_.push (this);
+
+ /*
+ huh?
+ copied from score-engraver, but
+ this way staff gets in list twice
+ if (Audio_item* i = dynamic_cast<Audio_item*> (info.elem_l_))
+ performance_p_->add_element (i);
+ */
+}
+
void
Score_performer::prepare (Moment m)
{
Global_translator::prepare (m);
audio_column_l_ = new Audio_column (m);
- play (audio_column_l_);
+ play_element (audio_column_l_);
post_move_processing ();
}
+#if 0
+// not finished yet.
/*
specialty-engraver.cc -- implement Specialty_engraver
void
-Specialty_engraver::acknowledge_element (Score_element_info i)
+Specialty_engraver::acknowledge_element (Score_element_info )
{
/*
We could do groovy stuff, by inserting our own custom (FUNC,FONT)
But not yet. This would be cleaner if we had SCM as properties.
*/
}
+#endif
Real
Staff_bar::get_bar_size () const
{
- return 4 * staff_line_leading_f ();
+ SCM size_sym = get_elt_property (bar_size_scm_sym);
+ if (size_sym != SCM_BOOL_F)
+ return gh_scm2double (SCM_CDR(size_sym));
+ else
+ return (lines_i () -1) * staff_line_leading_f ();
}
Staff_info::Staff_info()
{
time_C_ = 0;
- rhythmic_C_ =0;
command_l_ =0;
musical_l_ =0;
}
Staff_performer::Staff_performer ()
{
audio_staff_p_ = 0;
+ instrument_p_ = 0;
+ instrument_name_p_ = 0;
+ name_p_ = 0;
+ tempo_p_ = 0;
}
Staff_performer::~Staff_performer ()
{
- delete audio_staff_p_;
}
void
Staff_performer::do_creation_processing ()
{
audio_staff_p_ = new Audio_staff;
+ announce_element (Audio_element_info (audio_staff_p_, 0));
- play (new Audio_text (Audio_text::TRACK_NAME, id_str_));
+ name_p_ = new Audio_text (Audio_text::TRACK_NAME, id_str_);
+ announce_element (Audio_element_info (name_p_, 0));
-#if 1
- String str = new_instrument_str ();
- if (str.length_i ())
- // instrument description
- play (new Audio_text (Audio_text::INSTRUMENT_NAME, str));
-#endif
-
- // tempo
- play (new Audio_tempo (get_tempo_i ()));
+ tempo_p_ = new Audio_tempo (get_tempo_i ());
+ announce_element (Audio_element_info (tempo_p_, 0));
-#if 1
- if (str.length_i ())
- // instrument
- play (new Audio_instrument (str));
-#endif
-
Performer_group_performer::do_creation_processing ();
}
String str = new_instrument_str ();
if (str.length_i ())
{
- play (new Audio_text (Audio_text::INSTRUMENT_NAME, str));
- play (new Audio_instrument (str));
+ instrument_name_p_ = new Audio_text (Audio_text::INSTRUMENT_NAME, str);
+ announce_element (Audio_element_info (instrument_name_p_, 0));
+ instrument_p_ = new Audio_instrument (str);
+ announce_element (Audio_element_info (instrument_p_, 0));
}
Performer_group_performer::do_process_requests ();
}
+void
+Staff_performer::do_pre_move_processing ()
+{
+ if (name_p_)
+ {
+ play_element (name_p_);
+ name_p_ = 0;
+ }
+ if (tempo_p_)
+ {
+ play_element (tempo_p_);
+ tempo_p_ = 0;
+ }
+ if (instrument_name_p_)
+ {
+ play_element (instrument_name_p_);
+ instrument_name_p_ = 0;
+ }
+ if (instrument_p_)
+ {
+ play_element (instrument_p_);
+ instrument_p_ = 0;
+ }
+ Performer_group_performer::do_pre_move_processing ();
+}
void
Staff_performer::do_removal_processing ()
{
Performer_group_performer::do_removal_processing ();
- Performer::play (audio_staff_p_);
+ Performer::play_element (audio_staff_p_);
audio_staff_p_ = 0;
}
}
void
-Staff_performer::play (Audio_element* p)
+Staff_performer::play_element (Audio_element* p)
{
if (Audio_item *ai = dynamic_cast<Audio_item *> (p))
{
audio_staff_p_->add_audio_item (ai);
}
- Performer::play (p);
+ Performer::play_element (p);
}
{
Interpretation_context_handle my_voice_;
Drul_array<Interpretation_context_handle> staff_handle_drul_;
+
+ int switch_pitch_i_ ;
protected:
virtual bool do_try_music (Music* m);
virtual void do_creation_processing ();
Staff_switching_translator::Staff_switching_translator ()
{
+ switch_pitch_i_ =0;
}
void
{
Translator_group * daddy =daddy_grav_l (); // staff switching context
+
+ Scalar pit = get_property ("switchPitch", 0);
+ if (pit.isnum_b ())
+ switch_pitch_i_ = int (pit);
Scalar s = get_property("staffContextName", 0);
- staff_handle_drul_[UP].set_translator (daddy->daddy_trans_l_ -> find_create_translator_l (s, "upper"));
- staff_handle_drul_[DOWN].set_translator (daddy->daddy_trans_l_-> find_create_translator_l (s, "lower"));
+ Scalar up = get_property ("upStaffName",0);
+ Scalar down = get_property ("downStaffName",0);
+ if (!up.length_i()) up = "upper";
+ if (!down.length_i()) up = "lower";
+
+ staff_handle_drul_[UP].set_translator (daddy->daddy_trans_l_ -> find_create_translator_l (s, up));
+ staff_handle_drul_[DOWN].set_translator (daddy->daddy_trans_l_-> find_create_translator_l (s, down));
staff_handle_drul_[DOWN].report_to_l ()->set_property ("defaultClef", "bass");
{
if (Note_req*nr = dynamic_cast<Note_req*> (m))
{
- Direction staff = (nr->pitch_.semitone_pitch () >= 0)
+ Direction staff = (nr->pitch_.semitone_pitch () >= switch_pitch_i_)
? UP
: DOWN;
--- /dev/null
+/*
+ tie-performer.cc -- implement
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ */
+
+#include "tie-performer.hh"
+#include "command-request.hh"
+#include "audio-item.hh"
+#include "musical-request.hh"
+
+
+ADD_THIS_TRANSLATOR (Tie_performer);
+
+Tie_performer::Tie_performer()
+{
+ req_l_ = 0;
+}
+
+bool
+Tie_performer::do_try_music (Music *m)
+{
+ if (Tie_req * c = dynamic_cast<Tie_req*> (m))
+ {
+ req_l_ = c;
+ return true;
+ }
+ return false;
+}
+
+void
+Tie_performer::acknowledge_element (Audio_element_info i)
+{
+ if (Audio_note *nh = dynamic_cast<Audio_note *> (i.elem_l_))
+ {
+ Note_req * m = dynamic_cast<Note_req* > (i.req_l_);
+ if (!m)
+ return;
+ now_notes_.push (CNote_melodic_tuple (nh, m, now_mom()+ m->length_mom ()));
+ }
+}
+
+void
+Tie_performer::do_process_requests ()
+{
+ if (req_l_)
+ {
+ Moment now = now_mom ();
+ Link_array<Audio_note> nharr;
+
+ stopped_notes_.clear ();
+ while (past_notes_pq_.size ()
+ && past_notes_pq_.front ().end_ == now)
+ stopped_notes_.push (past_notes_pq_.get ());
+ }
+}
+
+void
+Tie_performer::process_acknowledged ()
+{
+ if (req_l_)
+ {
+ now_notes_.sort (CNote_melodic_tuple::pitch_compare);
+ stopped_notes_.sort(CNote_melodic_tuple::pitch_compare);
+ int i=0;
+ int j=0;
+ int tie_count=0;
+ while ( i < now_notes_.size () && j < stopped_notes_.size ())
+ {
+ int comp
+ = Musical_pitch::compare (now_notes_[i].req_l_->pitch_ ,
+ stopped_notes_[j].req_l_->pitch_);
+
+ if (comp)
+ {
+ (comp < 0) ? i ++ : j++;
+ continue;
+ }
+ else
+ {
+ tie_count ++;
+
+ /* don't go around recreating ties that were already
+ made. Not infallible. Due to reordering in sort (),
+ we will make the wrong ties when notenotes are
+ added. */
+ if (tie_count > tie_p_arr_.size ())
+ {
+ Audio_tie * p = new Audio_tie;
+ p->set_note (LEFT, stopped_notes_[j].note_l_);
+ p->set_note (RIGHT, now_notes_[i].note_l_);
+ tie_p_arr_.push (p);
+ announce_element (Audio_element_info (p, req_l_));
+ }
+ i++;
+ j++;
+
+ }
+ }
+
+ if (!tie_p_arr_.size ())
+ {
+ req_l_->warning (_("No ties were created!"));
+ }
+
+ }
+}
+
+void
+Tie_performer::do_pre_move_processing ()
+{
+ for (int i=0; i < now_notes_.size (); i++)
+ {
+ past_notes_pq_.insert (now_notes_[i]);
+ }
+ now_notes_.clear ();
+
+ for (int i=0; i< tie_p_arr_.size (); i++)
+ {
+ //play_element (tie_p_arr_[i]);
+ /*
+ urg.
+ doesn't work for c ~ c ~ c
+ */
+ tie_p_arr_[i]->note_l_drul_[LEFT]->length_mom_ +=
+ tie_p_arr_[i]->note_l_drul_[RIGHT]->length_mom_;
+ tie_p_arr_[i]->note_l_drul_[RIGHT]->length_mom_ = 0;
+ }
+ tie_p_arr_.clear ();
+}
+
+void
+Tie_performer::do_post_move_processing ()
+{
+ req_l_ =0;
+ Moment now = now_mom ();
+ while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now)
+ past_notes_pq_.delmin ();
+}
+
+
+CNote_melodic_tuple::CNote_melodic_tuple ()
+{
+ note_l_ =0;
+ req_l_ =0;
+ end_ = 0;
+}
+
+CNote_melodic_tuple::CNote_melodic_tuple (Audio_note *h, Melodic_req*m, Moment mom)
+{
+ note_l_ = h;
+ req_l_ = m;
+ end_ = mom;
+}
+
+int
+CNote_melodic_tuple::pitch_compare (CNote_melodic_tuple const&h1,
+ CNote_melodic_tuple const &h2)
+{
+ return Melodic_req::compare (*h1.req_l_, *h2.req_l_);
+}
+
+int
+CNote_melodic_tuple::time_compare (CNote_melodic_tuple const&h1,
+ CNote_melodic_tuple const &h2)
+{
+ return (h1.end_ - h2.end_ ).sign ();
+}
Time_description::Time_description()
{
- error_b_ = false;
whole_per_measure_ = 1;
whole_in_measure_ =0;
one_beat_ = Moment (1,4);
#include "command-request.hh"
#include "audio-item.hh"
+ADD_THIS_TRANSLATOR (Time_signature_performer);
-ADD_THIS_TRANSLATOR(Time_signature_performer);
-
-Time_signature_performer::Time_signature_performer()
+Time_signature_performer::Time_signature_performer ()
{
time_signature_req_l_ = 0;
+ audio_p_ = 0;
}
-Time_signature_performer::~Time_signature_performer()
+Time_signature_performer::~Time_signature_performer ()
{
}
void
-Time_signature_performer::do_print() const
+Time_signature_performer::do_print () const
{
#ifndef NPRINT
if (time_signature_req_l_)
- time_signature_req_l_->print();
+ time_signature_req_l_->print ();
#endif
}
void
-Time_signature_performer::do_process_requests()
+Time_signature_performer::do_process_requests ()
{
if (time_signature_req_l_)
- play (new Audio_time_signature (time_signature_req_l_));
- time_signature_req_l_ = 0;
+ {
+ audio_p_ = new Audio_time_signature (time_signature_req_l_->beats_i_, time_signature_req_l_->one_beat_i_);
+ Audio_element_info info (audio_p_, time_signature_req_l_);
+ announce_element (info);
+ time_signature_req_l_ = 0;
+ }
+}
+
+void
+Time_signature_performer::do_pre_move_processing ()
+{
+ if (audio_p_)
+ {
+ play_element (audio_p_);
+ audio_p_ = 0;
+ }
}
bool
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+
#include "score-engraver.hh"
#include "timing-engraver.hh"
#include "command-request.hh"
#include "score-element-info.hh"
#include "multi-measure-rest.hh"
-
void
Timing_engraver::fill_staff_info (Staff_info &inf)
{
inf.time_C_ = &time_;
- inf.rhythmic_C_ = &default_grouping_;
}
#include "global-translator.hh"
#include "multi-measure-rest.hh"
-Timing_translator::Timing_translator ()
-{
- default_grouping_ = Rhythmic_grouping (MInterval (0, 1), 4); // ugh
-}
-
bool
Timing_translator::do_try_music (Music*r)
{
else
{
time_.set_time_signature (b_i, o_i);
-
- default_grouping_ =
- Rhythmic_grouping (MInterval (0,Moment (b_i, o_i)),
- b_i == 1 ? 2 : b_i);
}
}
else if (Partial_measure_req *pm = dynamic_cast <Partial_measure_req *> (tr_l))
time_.whole_in_measure_.str ()));
time_.whole_in_measure_ = 0; // resync
- time_.error_b_ = true;
}
}
else if (Cadenza_req *cr = dynamic_cast <Cadenza_req *> (tr_l))
{
time_.set_cadenza (cr->on_b_);
}
- else if (Measure_grouping_req *mg=dynamic_cast <Measure_grouping_req *> (tr_l))
- {
- default_grouping_ =
- parse_grouping (mg->beat_i_arr_,
- mg->elt_length_arr_);
-
- }
}
Translator_group * tr=0;
{
#ifndef NPRINT
time_.print ();
- default_grouping_.print ();
#endif
}
void
Unfolded_repeat_iterator::next_element ()
{
- New_repeated_music const* mus =dynamic_cast<New_repeated_music const*> (music_l_);
+ Repeated_music const* mus =dynamic_cast<Repeated_music const*> (music_l_);
delete current_iter_p_;
current_iter_p_ =0;
void
Unfolded_repeat_iterator::construct_children ()
{
- New_repeated_music const* mus =dynamic_cast<New_repeated_music const*> (music_l_);
+ Repeated_music const* mus =dynamic_cast<Repeated_music const*> (music_l_);
alternative_cons_l_ = (mus->alternatives_p_)
? mus->alternatives_p_->music_p_list_p_->head_
: 0;
{
Molecule* mol_p = new Molecule;
- if (!column_arr_.size ())
+ if (!bar_arr_.size ())
return mol_p;
Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
Real h = volta.dim_.y ().length ();
Molecule num (lookup_l ()->text ("volta", number_str_, paper_l ()));
- Real dy = column_arr_.top ()->extent (Y_AXIS) [UP] >
- column_arr_[0]->extent (Y_AXIS) [UP];
+ Real dy = bar_arr_.top ()->extent (Y_AXIS) [UP] >
+ bar_arr_[0]->extent (Y_AXIS) [UP];
dy += 2 * h;
for (int i = 0; i < note_column_arr_.size (); i++)
void
Volta_spanner::do_add_processing ()
{
- if (column_arr_.size ())
+ if (bar_arr_.size ())
{
- set_bounds (LEFT, column_arr_[0]);
- set_bounds (RIGHT, column_arr_.top ());
+ set_bounds (LEFT, bar_arr_[0]);
+ set_bounds (RIGHT, bar_arr_.top ());
}
}
void
Volta_spanner::do_post_processing ()
{
- if (column_arr_.size())
- translate_axis (column_arr_[0]->extent (Y_AXIS)[UP], Y_AXIS);
+ if (bar_arr_.size())
+ translate_axis (bar_arr_[0]->extent (Y_AXIS)[UP], Y_AXIS);
}
void
if (Note_column* c = dynamic_cast <Note_column*> (o))
note_column_arr_.substitute (c, dynamic_cast<Note_column*> (n));
else if (Bar* c = dynamic_cast <Bar*> (o))
- column_arr_.substitute (c, dynamic_cast<Bar*> (n));
+ bar_arr_.substitute (c, dynamic_cast<Bar*> (n));
}
void
-Volta_spanner::add_column (Bar* c)
+Volta_spanner::add_bar (Bar* c)
{
- column_arr_.push (c);
+ bar_arr_.push (c);
add_dependency (c);
}
% Toplevel initialisation file.
-\version "1.0.21";
+\version "1.1.52";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.21";
+\version "1.1.52";
\include "declarations.ly";
% Toplevel initialisation file.
-\version "1.0.21";
+\version "1.1.52";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.21";
+\version "1.1.52";
\include "declarations.ly"
RhythmicStaffContext=\translator{
\type "Engraver_group_engraver";
numberOfStaffLines = "1";
+ barSize = \staffheight;
\consists "Pitch_squash_engraver";
\consists "Separating_line_group_engraver";
\name RhythmicStaff;
% Toplevel initialisation file.
-\version "1.0.21";
+\version "1.1.52";
\include "declarations.ly"
-\version "1.0.21";
+\version "1.1.52";
paper_sixteen = \paper {
staffheight = 16.0\pt;
% paper20.ly
-\version "1.0.21";
+\version "1.1.52";
paper_twenty = \paper {
staffheight = 20.0\pt;
notewidth = (\quartwidth + \wholewidth) / 2.0;
% ugh
-barsize = \staffheight;
rulethickness = \staffline;
gourlay_energybound = 100000.;
%
\translator {
\type "Staff_performer";
+ \name Staff;
\accepts Voice;
+
\accepts VoiceOne; % ugh.
\accepts VoiceTwo;
\accepts VoiceThree;
\accepts VoiceFour;
- \name Staff;
\consists "Key_performer";
\consists "Time_signature_performer";
}
+%% urg, why (needs praeludium-*.ly) these?
\translator
{
\type "Performer_group_performer";
\consists "Note_performer";
- \name VoiceFour;
+ \name VoiceFour;
}
\translator
{
\type "Performer_group_performer";
\consists "Note_performer";
-\name VoiceThree;
+ \name VoiceThree;
}
\translator
{
\type "Performer_group_performer";
\consists "Note_performer";
- \name VoiceOne;
+ \name VoiceOne;
}
+
\translator
{
\type "Performer_group_performer";
+ \name Voice;
\consists "Note_performer";
-\name Voice;
+ \consists "Tie_performer";
+% \accepts Grace;
}
+
+\translator {
+ \type "Grace_performer_group";
+ \name "Grace";
+ \consists "Note_performer";
+ \consists "Tie_performer";
+ weAreGraceContext = "1";
+}
+
\translator
{
\type "Performer_group_performer";
%}
-\version "1.0.20";
+\version "1.1.52";
%hmm, (these) abbrevs suck, imo
% i guess they're meant as some form of doco
prallmordent = \script "prallmordent"
upprall = \script "upprall"
downprall = \script "downprall"
+segno = \script "segno"
+wheel = \script "wheel"
\ No newline at end of file
(hip_width, foot_depth),
hip_depth_ratio, foot_width_ratio, hip_thickness, foot_thickness);
- pickup pencircle scaled stemthickness;
+ pickup pencircle scaled 1.5 stemthickness;
draw (0, 0) .. (0,-2 interline);
draw (-b ,-foot_depth * hip_depth_ratio) ..
(w, -flare);
hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
- pickup pencircle scaled stemthickness;
+ pickup pencircle scaled 1.5 stemthickness;
draw (0, 0) .. (0,-2 interline);
draw (-b, -foot_depth * hip_depth_ratio) .. (w,-flare);
y_mirror_char;
textdomain (name.ch_C ()) ;
#endif
+ bool key_override_b = false;
Mudela_key key (0, 0);
Long_option_init long_option_init_a[] =
int i = str.index_i (':');
i = (i >=0 ? i : str.length_i ());
key.accidentals_i_ = String_convert::dec2_i (str.left_str (i));
- key.minor_i_ = (int)(bool)String_convert::dec2_i (str.cut_str (i + 1,1));
+ key.minor_i_ = (int)(bool)String_convert::dec2_i (str.cut_str (i + 1, str.length_i ()));
+ key_override_b = true;
break;
}
case 'n':
return 1;
// if given on command line: override
- score_p->mudela_key_l_ = &key;
+ if (key_override_b || !score_p->mudela_key_l_)
+ score_p->mudela_key_l_ = &key;
mudela_score_l_g = score_p;
score_p->process();
else if ((byte == 0x59) && (next == 0x02))
{
next_byte ();
- int accidentals_i = (int)next_byte ();
- int minor_i = (int)next_byte ();
+ int accidentals_i = (int)(signed char)next_byte ();
+ int minor_i = (int)(bool)next_byte ();
Mudela_key* p = new Mudela_key (accidentals_i, minor_i);
item_p = p;
+#if 0
info_l_->score_l_->mudela_key_l_ = p;
mudela_staff_p_->mudela_key_l_ = p;
+#endif
}
// SSME [\0x7f][\x03]
else if ((byte == 0x7f) && (next == 0x03))
minor_i_ = minor_i;
}
+char const *accname[] = {"eses", "es", "", "is" , "isis"};
+
String
Mudela_key::str ()
{
- int key_i = 0;
- if (accidentals_i_ >= 0)
- key_i = ((accidentals_i_ % 7)[ "cgdaebf" ] - 'a' - 2) % 7;
- else
- key_i = ((-accidentals_i_ % 7)[ "cfbeadg" ] - 'a' - 2) % 7;
+ int key_i = accidentals_i_ >= 0
+ ? ((accidentals_i_ % 7) ["cgdaebf"] - 'a' - 2 -2 * minor_i_ + 7) % 7
+ : ((-accidentals_i_ % 7) ["cfbeadg"] - 'a' - 2 -2 * minor_i_ + 7) % 7;
- String keyname = (1) // !minor_i_)
- ? to_str ((char) ((key_i + 2) % 7 + 'A'))
- : to_str ((char) ((key_i + 2 - 2) % 7 + 'a'));
- // heu, -2: should be - 1 1/2: A -> fis
-
- return String("\\key " + keyname + ";\n");
+ String notename_str = !minor_i_
+ ? to_str ((char) ((key_i + 2) % 7 + 'A'))
+ : to_str ((char) ((key_i + 2) % 7 + 'a'));
+
+ // fis cis gis dis ais eis bis
+ static int sharps_i_a [7] = { 2, 4, 6, 1, 3, 5, 7 };
+ // bes es as des ges ces fes
+ static int flats_i_a [7] = { 6, 4, 2, 7, 5, 3, 1 };
+ int accidentals_i = accidentals_i_ >= 0
+ ? sharps_i_a [key_i] <= accidentals_i_ ? 1 : 0
+ : flats_i_a [key_i] <= -accidentals_i_ ? -1 : 0;
+
+ if (accidentals_i)
+ notename_str += String (accname [accidentals_i + 2]);
+
+ return "\\key " + notename_str + (minor_i_ ? "\\minor" : "") + ";\n";
}
String
// major scale: do-do
// minor scale: la-la (= + 5)
- static int notename_i_a[ 12 ] = { 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6 };
- int notename_i = notename_i_a[ (minor_i_ * 5 + pitch_i) % 12 ];
+ static int notename_i_a [12] = { 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6 };
+ int notename_i = notename_i_a [pitch_i % 12];
- static int accidentals_i_a[ 12 ] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 };
- int accidental_i = accidentals_i_a[ (minor_i_ * 5 + pitch_i) % 12 ];
+ static int accidentals_i_a [12] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 };
+ int accidental_i = accidentals_i_a [(minor_i_ * 5 + pitch_i) % 12];
if (accidental_i && (accidentals_i_ < 0))
{
- accidental_i = - accidental_i;
+ accidental_i *= -1;
notename_i = (notename_i + 1) % 7;
}
String notename_str = to_str ((char)(((notename_i + 2) % 7) + 'a'));
- while (accidental_i-- > 0)
- notename_str += "is";
- accidental_i++;
- while (accidental_i++ < 0)
- if ((notename_str == "a") || (notename_str == "e"))
- notename_str += "s";
- else
- notename_str += "es";
- accidental_i--;
+ if (accidental_i)
+ notename_str += String (accname [accidental_i + 2]);
/*
By tradition, all scales now consist of a sequence of 7 notes each
John Sankey <bf250@freenet.carleton.ca>
+ Let's also do a-minor: a b c d e f gis a
+
+ --jcn
+
*/
- /* ok, bit ugly, but here we go */
+ /* ok, bit ugly, but here we go -- jcn */
- if (minor_i_ && (accidentals_i_ == -1))
- if (notename_str == "des")
- notename_str = "cis";
-
- if (minor_i_ && (accidentals_i_ == -2))
- if (notename_str == "ges")
+
+ if (minor_i_)
+ {
+ if ((accidentals_i_ == 0) && (notename_str == "as"))
+ notename_str = "gis";
+ else if ((accidentals_i_ == -1) && (notename_str == "des"))
+ notename_str = "cis";
+ else if ((accidentals_i_ == -2) && (notename_str == "ges"))
notename_str = "fis";
-
+ else if ((accidentals_i_ == 5) && (notename_str == "g"))
+ notename_str = "fisis";
+ else if ((accidentals_i_ == 6) && (notename_str == "d"))
+ notename_str = "cisis";
+ else if ((accidentals_i_ == 7) && (notename_str == "a"))
+ notename_str = "gisis";
+
+ if ((accidentals_i_ <= -6) && (notename_str == "b"))
+ notename_str = "ces";
+ if ((accidentals_i_ <= -7) && (notename_str == "e"))
+ notename_str = "fes";
+ }
+
String de_octavate_str = to_str (',', (Mudela_note::c0_pitch_i_c_ + 11 - pitch_i) / 12);
String octavate_str = to_str ('\'', (pitch_i - Mudela_note::c0_pitch_i_c_) / 12);
return notename_str +de_octavate_str + octavate_str;
#include "mudela-staff.hh"
#include "mudela-stream.hh"
#include "mudela-voice.hh"
+#include "mudela-score.hh"
+
+extern Mudela_score* mudela_score_l_g;
Mudela_voice::Mudela_voice (Mudela_staff* mudela_staff_l)
{
}
mudela_stream_r << *i->car_;
+ if (Mudela_key* k = dynamic_cast<Mudela_key*> (i->car_))
+ mudela_staff_l_->mudela_key_l_ = mudela_score_l_g->mudela_key_l_ = k;
}
if (mudela_item_l_list_.size_i () > FAIRLY_LONG_VOICE_i)
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "violoncello.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "clarinetti.ly"
}
-\version "1.0.21";
+\version "1.1.52";
\include "clarinetto-1.ly"
\include "clarinetto-2.ly"
}
-\version "1.0.21";
+\version "1.1.52";
clarinetto1 = \notes \relative c {
R1 *2 | d''4-.\ff r r2 | R1 *3 | e4-. r r2 | R1 *3 |
}
-\version "1.0.21";
+\version "1.1.52";
clarinetto2 = \notes \relative c {
R1*2 bes''4-.\ff r r2 | R1*3 | cis4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "contrabasso.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
contrabasso = \notes \relative c {
% \translator Staff=violoncello
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "corni.ly"
}
-\version "1.0.21";
+\version "1.1.52";
\include "corno-1.ly"
\include "corno-2.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
corno1 = \notes \relative c {
R1 *2 | f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
corno2 = \notes \relative c {
R1 *2 | d''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 |
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "fagotti.ly"
}
-\version "1.0.21";
+\version "1.1.52";
\include "fagotto-1.ly"
\include "fagotto-2.ly"
}
-\version "1.0.21";
+\version "1.1.52";
fagotto1 = \notes \relative c {
R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
fagotto2 = \notes \relative c {
R1 *2 | f4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "flauti.ly"
}
-\version "1.0.21";
+\version "1.1.52";
\include "flauto-1.ly"
\include "flauto-2.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
flauto1 = \notes \relative c {
R1 *2 | c'''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
flauto2 = \notes \relative c {
R1 *2 | as'''4-.\ff r r2 | R1 *3 | b4-. r r2 | R1 *3 |
}
-\version "1.0.21";
+\version "1.1.52";
global = \notes {
\time 4/4;
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
oboe1 = \notes \relative c'' {
R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 |
}
-\version "1.0.21";
+\version "1.1.52";
oboe2 = \notes \relative c{
R1 *2| f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "oboi.ly"
}
-\version "1.0.21";
+\version "1.1.52";
\include "oboe-1.ly"
\include "oboe-2.ly"
}
-\version "1.0.21";
+\version "1.1.52";
timpani = \notes \relative c {
R1 *2 | c4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "trombe.ly"
}
-\version "1.0.21";
+\version "1.1.52";
\include "trombo-1.ly"
\include "trombo-2.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
trombo1 = \notes \relative c {
R1 *2 | c''4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
trombo2 = \notes \relative c {
R1 *2 | c'4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
viola1 = \notes \relative c {
\context Voice=one
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
viola2 = \notes \relative c {
% starts on (actualy, most part is on) same staff as viola1
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "viola-1.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "violino-1.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
violino1 = \notes \relative c {
c'1\ff ~ | c | <f4-. c'-. as'-.> r r2 | R1 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "violino-2.ly"
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
violino2 = \notes \relative c {
c'1\ff ~ | c | <f4-. c'-. as'-.> r r2 | R1 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "violoncello.ly"
}
-\version "1.0.21";
+\version "1.1.52";
violoncello = \notes \relative c {
c1\ff ~ | c | f,4-. r r2 | r1 | c'1\ff ~ | c | f,4-. r r2 |
----------------------------------------------------
-\version "1.0.21";
+\version "1.1.52";
\paper{barsize=50.0; \translator {\StaffContext \consists
Bar_number_engraver;}}
}
-\version "1.0.21";
+\version "1.1.52";
Bar_number_engraver;}}
}
-\version "1.0.21";
+\version "1.1.52";
}
-\version "1.0.21";
+\version "1.1.52";
\paper{barsize=50.0; \translator {\StaffContext \consists
Bar_number_engraver;}}
}
-\version "1.0.21";
+\version "1.1.52";
under the Gnu Public Licence.
%}
-\version "1.0.21";
+\version "1.1.52";
$voice_one = \notes \relative c' {
a'2 bes4. [c16 bes] | a4 d ~ d c ~ | c b ~ [b8 a] a4 ~|
Tested Features: cross staff auto beams and slurs, grace notes, no bars
%}
-\version "1.0.20";
+\version "1.1.52";
\include "nederlands.ly"
\bar ".|";
}
-upper = \context Staff=treble \notes\relative c''{
+melody = \notes\relative c''{
\clef violin;
\property Voice.verticalDirection = 1
r2 r r
r2 r r
r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e
- es8 \grace b({ ))c r4 r2 r
+ es8 \grace b( ))c r4 r2 r
r2 r r
r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e
- es8 } \grace b({ ))c r4 r2 r
+ es8 \grace b( ))c r4 r2 r
r4 g16( a bes a g a bes a g a bes a g a bes a g fis es fis
- )d4 } \grace fis8()gis4 ~ gis8 r r4 r2
+ )d4 \grace fis8()gis4 ~ gis8 r r4 r2
r4 g16( a bes a g a bes a g a bes a g a bes a g fis es fis
)d4 \grace fis8()gis4 ~ gis8 r r4 r2
\grace a8()f4 ~ f8 r r2 r
}
basloopje = \notes\relative c{
-% d,8( a' d f a d f d a f d )a
- d,8( a' d f a \translator Staff=treble d f d \translator Staff=bass a f d )a
+% d,8( a' d f a \translator Staff=treble d f d \translator Staff=bass a f d )a
+ d,8( a' d f a d f d a f d )a
}
-lower = \context Voice=two \notes \relative c{
- \stemdown
- \property Staff.slurVerticalDirection = 1
-
+accompany = \notes \relative c{
% snapnie, hoevaak relative c heeft ze nodig?
\notes\relative c \basloopje
\notes\relative c \basloopje
< e1 b' e> ~ < e b' e>
}
-\score {
- \context PianoStaff <
- \context Staff = treble <
- \global
- \upper
- >
- \context Staff = bass <
- \global
- \clef bass;
- \lower
- >
- >
+\score{
+ \notes{
+ \context AutoSwitchGrandStaff \relative c <
+ \global
+ \context Staff=upper {
+ \context Voice=foo
+ \property Voice.verticalDirection = 1
+ \property Voice.scriptVerticalDirection = 1
+ \melody
+ }
+ \context AutoSwitchContext \accompany
+ >
+ }
\paper {
gourlay_maxmeasures = 4.;
indent = 8.\mm;
% no slur damping
slur_slope_damping = 100.0;
- \translator{
- \VoiceContext
- beamAutoEnd = "1/2";
- }
\translator{
\StaffContext
% don't auto-generate bars: not a good idea: -> no breakpoints
defaultBarType = "empty";
\remove "Time_signature_engraver";
}
+ \translator{
+ \GraceContext
+ \remove "Local_key_engraver";
+ }
+ \translator {
+ \ScoreContext
+ \accepts AutoSwitchGrandStaff;
+ }
+ \translator{
+ \type "Engraver_group_engraver";
+ \name AutoSwitchGrandStaff;
+ \consists "Span_bar_engraver";
+ \consists "Vertical_align_engraver";
+ \consists "Piano_bar_engraver";
+ \consistsend "Axis_group_engraver";
+ minVerticalAlign = 2.*\staffheight;
+ maxVerticalAlign = 2.*\staffheight;
+ switcherName = "Voice";
+ acceptorName = "Thread";
+ staffContextName = "Staff";
+
+ \accepts "AutoSwitchContext";
+ \accepts "Staff";
+ slurVerticalDirection = 1;
+ verticalDirection = -1;
+ beamAutoEnd = "1/2";
+ }
+ \translator {
+ \type "Engraver_group_engraver";
+ \name "AutoSwitchContext";
+ \consists "Staff_switching_translator";
+ }
+ }
+ \midi {
+ \tempo 4 = 54;
}
-% broken 1.1.51.hwn2
-% \midi {
-% \tempo 4 = 54;
-% }
}
Tested Features:
%}
-\version "1.0.21";
+\version "1.1.52";
\include "nederlands.ly"
}
-\version "1.0.20";
+\version "1.1.52";
\include "paper16.ly";
\include "paper13.ly";
r1 \bar "|.";
}
-fourbars=\lyrics { _1 | _1 | _1 | _1 | }
+fourbars=\lyrics { "_"1*5 }
verseOne=\lyrics {
Who2. is4 | Syl- via, _2 |
- What2. is4 | she, _ _ That |
+ What2. is4 | she,2 That4 |
all our swains com- |
- mend2 her?4 _ |
- _1 |
+ mend2 her?4 " " |
+ " "1 |
Ho-4 - - ly, |
fair,2 _4 and |
wise2. is4 |
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
\include "standchen.ly"
\header{
filename = "standchen.ly";
-title = "St\"andchen (Serenade) Leise flehen meine Lieder\"";
+title = "St\\\"andchen";
+subtitle = "(Serenade)\\\\``Leise flehen meine Lieder''";
opus = "D. 957 No. 4";
-composer = "Franz Schubert (1797-1828)"
- "Text by Ludwig Rellstab (1799-1860)";
+date = "August 1828";
+composer = "Franz Schubert (1797-1828)";
+poet= "Text by Ludwig Rellstab (1799-1860)";
enteredby = "JCN";
copyright = "public domain";
-description = "A schubert song in 20 pt";
}
-\version "1.0.21";
+\version "1.1.52";
% fool make-website
% \include "standchen.ly";
Note: Original key F.
%}
-\version "1.0.21";
+\version "1.1.52";
vocalVerse = \notes\relative c''{
- \property Voice.dynamicdir=1
+ \property Voice.dynamicDir=1
\times 2/3 { [ g8( )as] g } c4. g8 |
\times 2/3 { [ f8( )g] f } c'4 f,8 r |
g4.-> f8 \times 2/3 { [ f( )es] d } |
g8. b16 es4. d8 |
c8. g16 es4. c8 |
% \times 2/3 { [ as\grace( bes ] )
-% \tiny [as'16*1/16 bes16*1/16 ]
-% \normalsize \times 2/3 { [as8 g8] as8 } c4. as8 |
- \times 2/3 { [ as'8( )g] as } c4. as8 |
+ \grace { as'16 bes } \times 2/3 { [ )as8( )g] as } c4. as8 |
g2. |
- %\times 2/3 { [ f\grace( g] )
- \times 2/3 { [ f8( )e] f } as4. f8 |
- %\tiny \times 2/3 { [f`16*1/16 g16*1/16] \normalsize
+ \grace { f16( g } \times 2/3 { [ )f8( )e] f } as4. f8 |
+
es!2. |
g8. b16 es4. d8 |
c8. g16 e4. c8 |
- % \times 2/3 { [ a\grace( b] )
- \times 2/3 { [ a'!8( ) gis] a } c4. a8 |
+ \grace { a'16( b } \times 2/3 { [ )a!8( ) gis] a } c4. a8 |
g!2. |
% \times 2/3 { [ a\grace( b] )
\times 2/3 { [ d'8\f cis] d } f4. b,8 |
}
vocalThrough = \notes\relative c{
- \property Voice.dynamicdir=1
+ \property Voice.dynamicDir=1
g''8. g16 b8. b16 d8. d16 |
c4 b r |
g4. b8 d8. c16 |
a8. b16 c4-> a8 r |
R2. |
R2. |
- % 4 bars copied from end verse 1
- % \times 2/3 { [ a\grace( b] )
- \times 2/3 { [ a!8( ) gis] a } c4. a8 |
+ \grace { a16( b } \times 2/3 { [ )a!8( ) gis] a } c4. a8 |
g!2. |
- % \times 2/3 { [ a\grace( b] )
\times 2/3 { [ d'8\f cis] d } f4. b,8 |
c!2. ~ |
c4 r c |
\times 2/3 { mei-4 ne8 } Lie-4 der8 " "8 |
Durch4. die8 \times 2/3 { Nacht4 zu8 } |
dir;2 " "4 |
- " "4 " " " " |
- " " " " " " |
+ " "2.*2
+%{ " "4 " " " " |
+ " " " " " " |%}
% 11
\times 2/3 { In4 den8 } stil-4. len8 |
\times 2/3 { Hain4 her-8 } nie-4. der8 |
Lieb-4. chen,8 \times 2/3 { komm4 zu8 } |
mir!2 " "4 |
- " "4 " " " " |
- " " " " " " |
+ " "2.*2
+%{ " "4 " " " " |
+ " " " " " " |%}
% 17
Fl\"us-8. ternd16 schlan-4. ke8 |
Wip-8. fel16 rau-4. schen8 |
\times 2/3 { gal-4 len8 } schla-4 gen?8 " "8
ach!4. sie8 \times 2/3 { fleh-4 en8 }
dich,2 " "4
- " "4 " " " "
+ " "2.*2
+%{ " "4 " " " "
" "4" " " "
-
+%}
% 11
\times 2/3 { Mit4 der8 } T\"o-4. ne8
\times 2/3 { s\"u-4 "\ss en"8 } Kla-4. gen8
Fleh-4. en8 \times 2/3 { sie4 f\"ur8 }
mich2 " "4
- " "4" " " "
+ " "2.*2
+%{ " "4" " " "
" "4" " " "
-
+%}
% 17
Sie-8. ver-16 stehn4. des8
Bus-8. ens16 Seh-4. nen8
}
trebleIntro = \notes\relative c{
- \clef violin;
- % ugh: id like to type this!
- r8^"\bf m\\\"assig"\pp [<g'-. c-.> <c-. es-.> <g-. c-.> <c-. es-.> <g-. c-.>] |
- r8 [<as-. c-.> <c-. es-.> <as-. c-.> <c-. es-.> <as-. c-.>] |
- r8 [<as-. c-.> <c-. d-.> <as-. c-.> <c-. d-.> <as-. c-.>] |
- r8 [<g-. b-.> <b-. d-.> <g-. b-.> <b-. d-.> <g-. b-.>] |
+ r8^"\bf m\\\"a\\\ss ig"\pp <g'-. c-.> <c-. es-.> <g-. c-.> <c-. es-.> <g-. c-.> |
+ r8 <as-. c-.> <c-. es-.> <as-. c-.> <c-. es-.> <as-. c-.> |
+ r8 <as-. c-.> <c-. d-.> <as-. c-.> <c-. d-.> <as-. c-.> |
+ r8 <g-. b-.> <b-. d-.> <g-. b-.> <b-. d-.> <g-. b-.> |
\break
}
trebleVerse1 = \notes\relative c{
%5
- r8 [<g' c> <c es> <g c> <c es> <g c>] |
- r8 [<f c'> <c' d> <f, c'> <c' d> <f, c'>] |
- r8 [<f g b> <g b d> <f g b> <g b d> <f g b>] |
- r8 [<es g c> <g c es> <es g c> <g c es> <es g c>] |
+ r8 <g' c> <c es> <g c> <c es> <g c> |
+ r8 <f c'> <c' d> <f, c'> <c' d> <f, c'> |
+ r8 <f g b> <g b d> <f g b> <g b d> <f g b> |
+ r8 <es g c> <g c es> <es g c> <g c es> <es g c> |
<g''4.( b,> <)f8 d>
- \times 2/3 { < [ f( d> <es c> <)d b] > } |
+ \times 2/3 { < [ f( d> <es c> <)d b] > } |
%10
<c2. es> |
- r8 [<g, c> <c es> <g c> <c es> <g c>] |
- r8 [<f c'> <c' d> <f, c'> <c' d> <f, c'>] |
- r8 [<f as bes> <as bes d> <f g bes> <as bes d> <f g bes>] |
- r8 [<es g bes> <g bes es> <es g bes> <g bes es>]
+ r8 <g, c> <c es> <g c> <c es> <g c> |
+ r8 <f c'> <c' d> <f, c'> <c' d> <f, c'> |
+ r8 <f as bes> <as bes d> <f g bes> <as bes d> <f g bes> |
+ r8 <es g bes> <g bes es> <es g bes> <g bes es>
<{ es'( ) d4.() f8}{ c' | bes4. as8 } >
- \times 2/3 { < [f( as> <es g> <)d f] > } |
+ \times 2/3 { < [f( as> <es g> <)d f] > } |
%16
<es2. g> |
- r8 [<f, g> <g b> <f g> <g b> <f g>] |
- r8 [<es g> <g c> <es g> <g c> <es g>] |
- r8\pp [<es as c> <as c es> <es as c> <as c es> <es as c>] |
+ r8 <f, g> <g b> <f g> <g b> <f g> |
+ r8 <es g> <g c> <es g> <g c> <es g> |
+ r8\pp <es as c> <as c es> <es as c> <as c es> <es as c> |
%20
- r8 [<es g bes> <g bes es> <es g bes> <g bes es> <es g bes>] |
- % \times 2/3 { [ as\grace( bes )
- \times 2/3 { [ as'8( g as] } c4.-> ) as8 |
+ r8 <es g bes> <g bes es> <es g bes> <g bes es> <es g bes> |
+ \grace { as'16( bes } \times 2/3 { [ )as8( g as] } c4.-> ) as8 |
g2. |
- r8 [<f, g> <g b> <f g> <g b> <f g>] |
- r8 [<e g> <g c> <e g> <g c> <e g>] |
- r8 [<f a c> <a c f> <f a c> <a c f> <f a c>] |
- r8 [<e g c> <g c e> <e g c> <g c e> <e g c>] |
+ r8 <f, g> <g b> <f g> <g b> <f g> |
+ r8 <e g> <g c> <e g> <g c> <e g> |
+ r8 <f a c> <a c f> <f a c> <a c f> <f a c> |
+ r8 <e g c> <g c e> <e g c> <g c e> <e g c> |
\times 2/3 <
{ [ f'8\f( e f] }
{ f' e f } >
- < {a4.- > )f8} { a4. f8 } > |
+ < {a4.- > )f8} { a'4. f8 } > |
}
trebleEentje = \notes \relative c'{
+ \context Voice=one \property Voice.verticalDirection = 0
<e2 e'> <e4 g>|
- <f2\mf as!(> [<as8.->( c> <)f16 )as>] |
- <e4. g> [<e8-. g-.(> <e-. g-.> <e-. )g-.>] |
- <f4. g> [<b,8-. g'-.(> <d-. g-.> <f-. )g-.>] |
+ <f2\mf as!(> <as8.->( c> <)f16 )as> |
+ <e4. g> <e8-. g-.(> <e-. g-.> <e-. )g-.> |
+ <f4. g> <b,8-. g'-.(> <d-. g-.> <f-. )g-.> |
<e2 g> <e4\pp g> |
- <f2 a(> [<a8. c> <f16 )a>] |
- <e4. g> [<e8-. g-.(> <e-. g-.> <e-. )g-.>] |
- <f4. g> [<b,8-. g'-.(> <d-. g-.> <f-. )g-.>] |
+ <f2 a(> <a8. c> <f16 )a> |
+ <e4. g> <e8-. g-.(> <e-. g-.> <e-. )g-.> |
+ <f4. g> <b,8-. g'-.(> <d-. g-.> <f-. )g-.> |
%60
<e2. g> |
}
trebleThrough = \notes \relative c'{
+ \context Voice=one \property Voice.verticalDirection = 0
<e2. e'> |
%61
R2. |
< { d,2.\f a'2} { e2. ~ e2 } { b'2. c,2 }> r4 |
\context Staff <
{
- \voiceone
- [a8. b16] c4-> () a8 r |
- [a8. b16] c4-> () a8 r |
+ \context Voice=one \property Voice.verticalDirection = 1
+ a8. b16 c4-> () a8 r |
+ a8. b16 c4-> () a8 r |
}
{
- \voicetwo
+ \context Voice=two \property Voice.verticalDirection = -1
<d,4 f> <d2 f> |
<c!4 es> <c2 es> |
}
>
+ \context Voice=one \property Voice.verticalDirection = 0
% 4 bars copied from end verse1
- r8 [<f, a c> <a c f> <f a c> <a c f> <f a c>] |
+ r8 <f, a c> <a c f> <f a c> <a c f> <f a c> |
%70
- r8 [<e g c> <g c e> <e g c> <g c e> <e g c>] |
+ r8 <e g c> <g c e> <e g c> <g c e> <e g c> |
\times 2/3 < { [ f'8\f( e f] }
{ f' e f }>
- < { a4.-> )f8 } { a4. f8 } > |
+ < { a4.-> )f8 } { a'4. f8 } > |
<e2 e'> r4 |
<es!2 es'! > r4 |
\property Voice . textStyle = "italic"
<c2 c'> <e4\pp g> |
% four copied from begin eentje
- <f2 as!(> [<as8.-> c> <f16 )as>] |
- <e4. g> [<e8-. g-.(> <e-. g-.> <e-. )g-.>] |
- <f4. g> [<b,8-. g'-.(> <d-. g-.> <f-. )g-.>] |
+ <f2 as!(> <as8.-> c> <f16 )as> |
+ <e4. g> <e8-. g-.(> <e-. g-.> <e-. )g-.> |
+ <f4. g> <b,8-. g'-.(> <d-. g-.> <f-. )g-.> |
%80
\property Voice . textStyle = "italic"
<e2._"dim." g> |
}
bassIntro = \notes\relative c{
- \clef bass;
- \property Voice.dynamicdir=1
+ \property Voice.dynamicDir=1
%1
<c,2 c'> r4 |
<as2 as'> r4 |
bassVerse1 = \notes\relative c{
% \clef bass;
- \property Voice.dynamicdir=1
+ \property Voice.dynamicDir=1
%5
<c,2 c'> r4 |
<as2 as'> r4 |
}
bassEentje = \notes\relative c{
- \property Voice.dynamicdir=1
+ \property Voice.dynamicDir=1
<c,8 c'> [<c' f as!> <f as c> <c f as> <f as c> <c f as>] |
c,8 [<c' e g> <e g c> <c e g> <e g c> <c e g>] |
<g,8 g'> [<d'' g> <g b> <d g> <g b> <d g>] |
}
bassThrough = \notes\relative c{
- \property Voice.dynamicdir=1
+ \property Voice.dynamicDir=1
%61
<g,8^"cresc." g'> [<g' b d> <b d f> <g b d> <as!-> b-> d->> <b d f>] |
<g,8 g'> [<g' d'> <d' f> <g, d'> <as-> b-> d->> <b d f>] |
}
-lyricFour = \lyrics{
- " "4 " " " "
- " " " " " "
+lyricFour = \lyrics{
+ " "2.*4
+%{ " "4 " " " "
" " " " " "
" " " " " "
+ " " " " " "%}
}
allLyrics = {
vocals = \notes{
\clef treble;
- \property Voice.dynamicdir=UP
+ % certainly no auto-beaming for vocals
+ \property Voice.beamAuto=0
+
+
+ \property Voice.dynamicDir = \up
\skip 4 * 12;
\vocalVerse
\skip 4 * 24;
>
treble = {
+ \clef treble;
+ \property Voice.beamAutoBegin=0
\trebleIntro
\trebleVerse1
\trebleEentje
>
bass = {
+ \clef bass;
\bassIntro
\bassVerse1
\bassEentje
\bass
>
-grandStaff = \context GrandStaff<
+grandStaff = \context PianoStaff <
\trebleStaff
\bassStaff
>
% \translator { \OrchestralPartStaffContext }
\translator { \HaraKiriStaffContext }
}
- \midi{
- \tempo 4 = 54;
- }
+%broken 1.1.51
+% \midi{
+% \tempo 4 = 54;
+% }
}
title = "Diademata";
metre = "6 6. 8 6. D";
}
-\version "1.0.21";
+\version "1.1.52";
sop=\notes \transpose c''{
ees2 | ees4 ees4 g2 g2 | c'1. \bar "||";
metre = "10 10 . 11 11";
}
-\version "1.0.21";
+\version "1.1.52";
sop = \notes \transpose c''{
f4 | d' bes c' | f2 \bar "||";
metre = "10 11. 11 11. and refrain";
}
-\version "1.0.21";
+\version "1.1.52";
sop=\notes \relative c'' {
b2 gis4. a8 |b2 e,2 |
metre = "8 7 8 7 D";
}
-\version "1.0.21";
+\version "1.1.52";
sop=\notes \relative c'' {
b4 b c d | d c b a | g g a b | b4. a8 a2 \bar "||";
}
-\version "1.0.21";
+\version "1.1.52";
global=\notes {
\time 6/4;
piece = "Allemande";
}
-\version "1.0.21";
+\version "1.1.52";
global = \notes{
\time 4/4;
%%
%% Noe liknende skjer også i mellom andre og tredje stemme i takt 28
-\version "1.0.21";
+\version "1.1.52";
global = \notes{
\time 2/4;
copyright = "Public Domain";
}
-\version "1.0.21";
+\version "1.1.52";
global = \notes {
\time 4/4;
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
% upper = \context Staff \notes\relative c {
upper = \context Staff=upper \notes\relative c {
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
upper = \context Staff \notes\relative c{
\context Voice=i
\property Voice . textStyle = "italic"
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
one = \context Staff \notes\relative c {
\context Voice=i
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
upper = \context Staff \notes\relative c{
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.21";
+\version "1.1.52";
one = \context Staff \notes\relative c{
dotted slurs
%}
-\version "1.0.21";
+\version "1.1.52";
\include "allemande-urtext.ly";
>
-\version "1.0.21";
+\version "1.1.52";
\$courante_b
>
-\version "1.0.21";
+\version "1.1.52";
\$gigue_b
>
-\version "1.0.21";
+\version "1.1.52";
dotted slurs
%}
-\version "1.0.21";
+\version "1.1.52";
\include "menuetto-urtext.ly";
d2.
}
-\version "1.0.21";
+\version "1.1.52";
dotted slurs
%}
-\version "1.0.21";
+\version "1.1.52";
\include "prelude-urtext.ly";
\$prelude_b
>
-\version "1.0.21";
+\version "1.1.52";
dotted slurs
%}
-\version "1.0.21";
+\version "1.1.52";
\include "prelude-urtext.ly";
\$sarabande_b
>
-\version "1.0.21";
+\version "1.1.52";
\clef alto;
\$global_i
>
-\version "1.0.21";
+\version "1.1.52";
>
\$global_i
>
-\version "1.0.21";
+\version "1.1.52";
}
}
-\version "1.0.21";
+\version "1.1.52";
}
}
-\version "1.0.21";
+\version "1.1.52";
\clef bass;
\$global_i
>
-\version "1.0.21";
+\version "1.1.52";
%{
%}
-\version "1.0.21";
+\version "1.1.52";
global =
}
-beamkludge = \property Voice. stemLeftBeamCount = "1"
tenor =
\notes \relative c' {
\clef "violin";
\stemdown
- r8 [c8 d e] [f. \beamkludge g32 f] [e8 a] |
+ r8 [c8 d e] [f. g32 f] [e8 a] |
[d, g] ~ [g16 a g f] [e f e d] [c d c b ] |
[a 8 fis'] g4 ~ [g8 fis16 e] [f8 d] |
[g f! e d] c r r g' ~ |
[c8 f] r16 [g f e] [f8 d] g4 ~ |
g4 r4 r2 |
r1 |
- r8 [g8 a b] [c . \beamkludge d 32 c ] [b8 e ]
+ r8 [g8 a b] [c . d 32 c ] [b8 e ]
%% 10
[a, d ] ~ [d 16 e d c ] b8 r8 r d, |
- [e fis] [g. \beamkludge a32 g] [fis8 b e, a] ~ |
+ [e fis] [g. a32 g] [fis8 b e, a] ~ |
[a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] |
[a gis a b] [gis fis gis a] b8 r8 r4 |
- r8 [c,8 d e] \stemup [f. \beamkludge g32 f] [e8 a] |
+ r8 [c,8 d e] \stemup [f. g32 f] [e8 a] |
%% 15
[d, g] ~ [g16 a g f] e8 \stemdown [e fis g] ~ |
[g8 fis] [gis8 a] ~ [a g! a b] |
\stemboth
- [c . \beamkludge d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] |
+ [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] |
[b8 g' cis, d ] [e cis d e ] |
- \stemdown a,8 r8 r e [fis g] \stemboth [a. \beamkludge b32 a] |
+ \stemdown a,8 r8 r e [fis g] \stemboth [a. b32 a] |
%% 20
[g8 c fis, b] ~ [b16 c b a] \stemdown [g fis e d] \stemboth |
e4 \stemdown d ~ [d16 a' g f!] [e g f! a] |
\stemboth g4. f8 ~ [f e] d4 |
\stemdown e8 a4 g8 ~ [g8 f g a] |
%% 25
- [bes8. \beamkludge c32 b] [a8 d ] [g, c ] ~ [c 16 d c bes] |
+ [bes8. c32 b] [a8 d ] [g, c ] ~ [c 16 d c bes] |
[a bes a g] [f g f e] d4 ~ [d8. g16] |
a4 r16 [f' 16 d 8] e 2 |
}
\stemup
r1 |
r2 r8 [g'8 a b] |
- [c . \beamkludge d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] |
+ [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] |
[b g a b] [c b c d ] [e d e fis ] [g 8 b,] |
%% 5
[c a] [d 16 c b a] [g8. g16] [f e f g] |
[a g a b] c 2 b4 |
- r8 [c8 d e] [f. \beamkludge g32 f] [e8 a] |
+ r8 [c8 d e] [f. g32 f] [e8 a] |
[d, g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] |
f2 [e8. fis16] g4 ~
%% 10
a 4 r4 r2 |
%% 15
r2 r8 [g 8 a b ] |
- [c8. \beamkludge d32 c] [b 8 c] [d e] [f!. \beamkludge g32 f!] |
+ [c8. d32 c] [b 8 c] [d e] [f!. g32 f!] |
[e8 a d, g] ~ [g16 a g f] [e8 a] |
- [d,8 bes'] [a g16 f] [g f g e] [f g g \beamkludge f32 g] |
+ [d,8 bes'] [a g16 f] [g f g e] [f g g f32 g] |
[a16 cis, d g] [e8. d16] d8 r8 r4 |
%% 20
r2 r4 r8 g, |
- [a b ] [c. \beamkludge d32 c] [b 8 e a, d] ~ |
+ [a b ] [c. d32 c] [b 8 e a, d] ~ |
[e16 e d c] [b c d e] [f g a g] [f e d c] |
b 4 [c,8 d] g c4 b 8 |
c4 [b 8 bes 8] a d4 c8 |
r1 |
r |
r |
- r8 [g'8 a b] [c . \beamkludge d32 c ] [b8 e ] |
+ r8 [g'8 a b] [c . d32 c ] [b8 e ] |
%% 5
[a, d ] ~ [d 16 e d c ] [b8 c ~ c bes8] |
[a d g, c ] r16 [a16 b c ] d 4 |
- g,4 r8 g8 [a b] [c . \beamkludge d32 c ] |
+ g,4 r8 g8 [a b] [c . d32 c ] |
[b8 e a, d ] ~ [d 16 e d c !] [b!8 e ] ~ |
e 4 d 4 [c 16 b c a] [e' d c b] |
%% 10
[c 16 a b c ] [d c b a] g4 r4 |
r1 |
- r8 [e8 fis gis] [a. \beamkludge b32 a] [gis8 c ] |
+ r8 [e8 fis gis] [a. b32 a] [gis8 c ] |
[fis, b] ~ [b16 c b a] gis8 a4 gis8 |
a4 r8 g8 [a b] c . [d32 c ] |
%% 15
[b8 e a, d ] ~ [d' g,] d 4 |
[c 8 a] e' 4 d 8 r8 r4 |
- r8 [a8 b cis ] [d . \beamkludge e32 d ] [c !8 f ] |
+ r8 [a8 b cis ] [d . e32 d ] [c !8 f ] |
[b,8 e ] ~ [e 16 f e d ] cis 8 r8 r4 |
- r8 [a8 b cis ] [d . \beamkludge e32 d ] [c !8 fis ] |
+ r8 [a8 b cis ] [d . e32 d ] [c !8 fis ] |
%% 20
[b, e ] ~ [e 16 fis e d ] c 2 ~ |
[c 16 d c b] [a g a fis] [g8 b c d ] |
- [e . \beamkludge f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] |
+ [e . f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] |
d 4 [e 8 d ] ~ [d g,] g4 ~
- [g8 c, d e] [f. \beamkludge g32 f] [e8 a] |
+ [g8 c, d e] [f. g32 f] [e8 a] |
%% 25
[d, g] ~ [g16 a g f] [e d e f] [g a bes g] |
[a e f g] [a b c a] b2 |
r |
%% 5
r2 r8 [c8 d e] |
- [f. \beamkludge g32 f] [e8 a] [d, g] ~ [g16 a g f] |
+ [f. g32 f] [e8 a] [d, g] ~ [g16 a g f] |
[e f e d] [c d c b ] [a' 8 d a fis] |
[g16 a bes g] [cis,8 d] a'4 e4 |
[a16 b c d ] [c b a g] c 8 r8 r4 |
%% 10
r2 r8 [g, 8 a b ] |
- [c. \beamkludge d32 c] [b 8 e] [a, d] ~ [d16 e d c] |
+ [c. d32 c] [b 8 e] [a, d] ~ [d16 e d c] |
b 8 e4 d8 c f!4 e8 ~ |
e d4 e8 [f! e16 d] e4 |
a, 4 r4 r2 |
%% 15
- r8 [g 8 a b ] [c. \beamkludge d32 c] [b 8 e] |
+ r8 [g 8 a b ] [c. d32 c] [b 8 e] |
[a, 8 d] ~ [d16 e d c] [b 8 bes a g'' ] |
[a,, 8 fis' g e] d4 [e8 f!] |
- [g8. \beamkludge a32 g] [f8 bes] [e, a] ~ [a16 bes a g] |
+ [g8. a32 g] [f8 bes] [e, a] ~ [a16 bes a g] |
[f e f d] [g8 a] d,2 ~ |
%% 20
[d16 e d c] [b a g fis ] [e' 8 e fis g] ~ |
* auto beaming
%}
-\version "1.0.21";
+\version "1.1.52";
\include "nederlands.ly" % for correct parsing of note names
copyright = "Public Domain";
}
-\version "1.0.21";
+\version "1.1.52";
global =
\notes {
\midi{ \tempo 4 = 100; }
}
-\version "1.0.21";
+\version "1.1.52";
-\version "1.0.21";
+\version "1.1.52";
corI=\notes\relative c'' {
\key c;
% Process with 'ly2dvi -s parts.ly' to get the separate parts.
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "wood.ly"
"Statens Musikbibliotek, Stockholm, Sweden";
}
-\version "1.0.21";
+\version "1.1.52";
\include "global.ly"
\include "wood.ly"
-\version "1.0.21";
+\version "1.1.52";
viI=\notes\relative c'' {
-\version "1.0.21";
+\version "1.1.52";
oboe=\notes\relative c'' {
\clef "treble";
Tested Features: cadenza mode
%}
-\version "1.0.21";
+\version "1.1.52";
cad = \notes \relative c' {
\property Score.instrument = "french horn"
\context Staff {
\cadenza 1;
- \grouping 1*4;
+
\clef "violin";
c'4.\mf g8
}
-\version "1.0.21";
+\version "1.1.52";
allegro =
\notes
\partial 8;
g'8 |
\time 6/8;
- \grouping 8*3 8*3;
+
\rondotheme
R2.*13 |
definition below. --MB
%}
-\version "1.0.21";
+\version "1.1.52";
global = \notes {
\property StaffGroup.timeSignatureStyle = "old"
copyright = "public domain";
latexheaders= "headers";
}
-\version "1.0.21";
+\version "1.1.52";
("prallprall" . ((feta . ("prallprall" . "prallprall")) #f 0 1 0))
("prallmordent" . ((feta . ("prallmordent" . "prallmordent")) #f 0 1 0))
("upprall" . ((feta . ("upprall" . "upprall")) #f 0 1 0))
- ("downprall" . ((feta . ("downprall" . "downprall")) #f 0 1 0)))
+ ("downprall" . ((feta . ("downprall" . "downprall")) #f 0 1 0))
+ ("segno" . ((feta . ("segno" . "segno")) #f 0 1 0))
+ ("wheel" . ((feta . ("wheel" . "wheel")) #f 0 1 0)))
script-alist)
)
'hshift -> horizontalNoteShift')
+if 1:
+ def conv(lines):
+ newlines =[]
+ for x in lines:
+ x = re.sub ('\\\\grouping[^;]*;','', x)
+ newlines.append (x)
+ return newlines
+
+ conversions.append ((1,1,52), conv,
+ 'deprecate \\grouping')
+
+
############################
rm -rf $TAROUTDIR
mkdir -p $TAROUTDIR
echo untarring ...
-tar -C $TAROUTDIR -zxf $TARBALL '*cc' '*.c' '*.hh' '*.h'
+tar -C $TAROUTDIR -zxf $TARBALL '*.hh' '*.h'
cd $TAROUTDIR
DATE=`date`
$(YODL2TEXINFO) -doutdir=$(outdir) --live-data=3 -o $@ $<
$(outdir)/%.txt: %.yo
-# $(YODL2TXT) -doutdir=$(outdir) --live-data=3 -o $@ $<
- $(YODL2MSLESS) -doutdir=$(outdir) --live-data=3 $< > $@
- rm -f $(basename $<).ms
+ $(YODL2TXT) -doutdir=$(outdir) --live-data=3 -o $@ $<
+# $(YODL2MSLESS) -doutdir=$(outdir) --live-data=3 $< > $@
+# rm -f $(basename $<).ms