TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 49
+TOPLEVEL_PATCH_LEVEL = 50
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
Announcing
-
- LILYPOND
+
+ GNU LilyPond
The Music Typesetter
Do you pine for the nice days of Linux 0.95, when men were men and
wrote their own applications? Are you without a nice project and just
dying to cut your teeth into a bleeding edge application you can
-modify for your needs. Do you find it frustrating that everything
+modify for your needs? Do you find it frustrating that everything
works in LaTeX? No more all-nighters to get a nifty program working?
Then this post might be just for you!
I have been working very hard on a music typesetting system (called
-LilyPond) the past half year, and I finally think it is ready to be
+GNU LilyPond) the past half year, and I finally think it is ready to be
used and hacked at by a larger public than me and my co-developer.
-Sources for this project are on
+Sources for this project are on:
ftp://pcnov095.win.tue.nl/pub/lilypond/
[DETAILED DESCRIPTION]
-WHAT IS LILYPOND
+WHAT IS GNU LilyPond
Technically it is a preprocessor which generates TeX
(or LaTeX) output which contains information to typeset a musical
#
localclean:
+ rm -f out/*
rm -f $(TEXTFILES) $(HTMLFILES) $(GROFFFILES) $(HTMLFILES)
localinstall: $(outdir)/lilypond.1 $(outdir)/mudela.5
=head1 NAME
-LilyPond - a music typesetter
+lilypond - the GNU music typesetter
=head1 SYNOPSIS
=head1 DESCRIPTION
-Technically LilyPond is a preprocessor which generates TeX
+Technically GNU LilyPond is a preprocessor which generates TeX
(or LaTeX) output which contains information to typeset a musical
score. Practically it is a typesetter, which only uses TeX as an
output medium. (this is handy because there exist music fonts for TeX)
It translates script files (mudela files or F<*.ly>'s) into TeX input.
Typesetting music is a complex task, whereas the message that printed
-music conveys is usually a simple one. LilyPond is a try at providing
+music conveys is usually a simple one. GNU LilyPond is a try at providing
a simple interface for setting music.
=item B<-d,--debug>,
-Turn debugging info. LilyPond will read the file F<.dstreamrc>, which
+Turn debugging info. GNU LilyPond will read the file F<.dstreamrc>, which
tells for what functions and classes may produce copious debugging
output.
=item B<-w,--warranty>,
-Show the warranty with which LilyPond comes. (It comes with B<NO WARRANTY>!)
+Show the warranty with which GNU LilyPond comes. (It comes with B<NO WARRANTY>!)
=item B<-o,--output=>F<FILE>,
=head1 DESIGN CONSIDERATIONS
-LilyPond was written with some considerations in mind:
+GNU LilyPond was written with some considerations in mind:
=over 5
Describing a well-defined language for defining music. We call
this language (rather arrogantly) The Musical Definition Language
-(mudela for short). LilyPond reads a mudela sourcefile and outputs a
+(mudela for short). GNU LilyPond reads a mudela sourcefile and outputs a
TeX file.
=item *
=item *
-LilyPond uses MusiXTeX fonts and TeX for its output. This is not a key
-issue: in a future version, LilyPond might bypass TeX, but at the moment
+GNU LilyPond uses MusiXTeX fonts and TeX for its output. This is not a key
+issue: in a future version, GNU LilyPond might bypass TeX, but at the moment
TeX is very convenient for producing output.
=item *
=item *
-LilyPond does not display notes directly, nor will it be rehacked to be
-used interactively. LilyPond writes output to a file. It will not be
+GNU LilyPond does not display notes directly, nor will it be rehacked to be
+used interactively. GNU LilyPond writes output to a file. It will not be
extended to play music, or to recognize music.
=item *
-LilyPond is intended to run on Unix platforms, but it should
+GNU LilyPond is intended to run on Unix platforms, but it should
be portable to any platform which can run TeX and the GNU tools
=item *
-LilyPond is free. Commercial windows packages for setting music are
+GNU LilyPond is free. Commercial windows packages for setting music are
abundant. Free musicprinting software is scarce.
=item *
-LilyPond is written in GNU C++. It will not be downgraded/ported to fit
+GNU LilyPond is written in GNU C++. It will not be downgraded/ported to fit
broken systems.
=back
=head1
DISCLAIMER & COPYING POLICY
-LilyPond is copyright 1996,97 by its authors. LilyPond is
+GNU LilyPond is copyright 1996,97 by its authors. GNU LilyPond is
distributed under the terms of the GNU General Public
-License. LilyPond is provided without any warranty what so ever.
-LilyPond may be freely distributed. For further information consult
+License. GNU LilyPond is provided without any warranty what so ever.
+GNU LilyPond may be freely distributed. For further information consult
the GNU General Public License, which is in the file F<COPYING>
=head1 AUTHORS
=item *
-Han-Wen Nienhuys <hanwen@stack.nl>, Main author
+Han-Wen Nienhuys <hanwen@stack.nl>, http://www.stack.nl/~hanwen
+
+Main author
=item *
-Jan Nieuwenhuizen <jan@digicash.com>, Context errors, Lyrics,
-mi2mu, MIDI stuff, make structure, bits of FlowerLib, general
-comments, Mudela design.
+Jan Nieuwenhuizen <jan@digicash.com>, http://www.digicash.com/~jan.
+
+Context errors, Lyrics, mi2mu, MIDI stuff, make structure, bits of
+FlowerLib, general comments, Mudela design.
=item *
=head1 EXAMPLES
-At this time, LilyPond output looks nice, but is not of production
+At this time, GNU LilyPond output looks nice, but is not of production
quality. If you're not discouraged; this is what I type in my xterm:
lilypond someinput.ly
This is what the output looks like over here:
- LilyPond 0.0.40 #0/FlowerLib 1.1.7 #2. Compile: Mar 11 1997, 22:58:47 (g++ 2.7.2)
+ GNU LilyPond 0.0.40 #0/FlowerLib 1.1.7 #2. Compile: Mar 11 1997, 22:58:47 (g++ 2.7.2)
Parsing ... [./init//symbol.ini[./init//dynamic.ini][./init//dutch.ini]
[./init//script.ini][./init//table_sixteen.ini]][./input/wohltemperirt.ly]
Setting up music ...Processing music ............
=head1 PROBLEMS
-If LilyPond bombs out, then please recompile using with debugging info
+If GNU LilyPond bombs out, then please recompile using with debugging info
turned on, and send a copy of the input which causes the error and a
gdb stacktrace of the crash. It also helps if you can print the values
of the objects. So if your trace is
:
Than it would help if you send a dump of the Interval and the Item
-(use: C<print *this> or use LilyPond C<print()> methods).
+(use: C<print *this> or use GNU LilyPond C<print()> methods).
-This is a beta version of LilyPond. Please send your helpful comments
+This is a beta version of GNU LilyPond. Please send your helpful comments
and patches to me (see AUTHORS section)
-LilyPond is updated very frequently, the latest version is always available at:
+GNU LilyPond is updated very frequently, the latest version is always available at:
ftp://pcnov095.win.tue.nl/pub/lilypond.
=head1 REMARKS
-LilyPond has no connection with the music package RoseGarden, other
+GNU LilyPond has no connection with the music package Rosegarden, other
than the names being similar :-)
=head1 HISTORY
(for a detailed changelog, see F<NEWS>)
-LilyPond's roots lie in MPP, a preprocessor to the rather arcane
+GNU LilyPond's roots lie in MPP, a preprocessor to the rather arcane
MusiXTeX macro package for TeX. A friend of mine, Jan Nieuwenhuizen
wrote the first 44 versions (0.01 to 0.44), then his program caught my
attention, and I was slowly sucked in to the interesting problem of
In Normal mode, a word is looked up in the following order:
word identifier, string
- \word keyword, string
+ \word keyword, identifier, string
In normalmode, a word is assumed to start with an alphabetic
character, followed by alpha-numeric characters.
=item Note mode
-Note mode (and thus Simple mudela) is introduced by the keyword C<\music>.
+Note mode (and thus Simple mudela) is introduced by the keyword C<\melodic>.
In Note mode, a word is looked up in the following order:
- word identifier, string
- \word keyword, string
+ word notename, string
+ \word keyword, identifier, string
In Note mode a word is considered to have alphabetic characters only.
In Lyrics mode, a word is looked up in the following order:
word string
- \word keyword, string
+ \word keyword, identifier, string
In Lyric mode every sequence of non-digit and non-white characters
starting with an alphabetic character is considered a word.
=back
These modes are of a lexical nature. Normal and Note mode largely
-resemble each other, save the possibility of entering Reals, and
-meaning of C<_>
+resemble each other, save the possibility of entering Reals,
+meaning of C<_> and the resolution of words
=head2 Notes
a'4 % dutch names
-is a A-1 pitched quaver. The ' as well as the ' signify an octave change.
-A-1 is 440 Hz concert-pitch. C<c'> is also known as the central
-c. More examples:
+is a A-1 pitched quaver. The ' signifies an octave change. A-1 is 440
+Hz concert-pitch. C<c'> is also known as the central c. More examples:
'a % 110
a % 220
signifies that this note is part of a triplet (3 in stead of 2). The
duration is one and a half quaver (C<4.>) times 2/3.
-The default language for notenames is defined to be dutch,
+
+Notenames are just a special kind of identifiers, and can be declared
+for any language appropriate (see F<dutch.ini>). The default language
+for notenames is defined to be dutch,
% double sharp
cisis disis eisis fisis gisis aisis bisis
a^- % portato, direction: above note
a_. % staccato, direction: below note
a^\script { "symbolindex" . . . } % see script.ini for details.
+ a^\fermata % predefined identifier
Dynamics can be put after the notename:
\> % start decrescendo
\! % end crescendo/decrescendo
-=head2 General
+=head2 Text
+
+To accompany a note with a text (eg, "marcato"), you should say:
+
+ c_"marcato"
+ c^"marcato"
+ c-"marcato"
-The general form of a note is:
+the c- construct chooses the default up/down direction.
- post-requests de-octavate notename octavate duration pre-requests
-Notenames are just identifiers, and can be declared for any
-language appropriate (see F<dutch.ini>).
You can also put vertical music inside horizontal music:
- { c < c e > <c e g> <c e g c'> } % 4 increasing chords
+ { c <c e> <c e g> <c e g c'> } % 4 increasing chords
And vice versa
-3/Apr/97 LilyPond 0.0.48 1
+3/Apr/97 LilyPond 0.0.50 1
-3/Apr/97 LilyPond 0.0.48 2
+3/Apr/97 LilyPond 0.0.50 2
-3/Apr/97 LilyPond 0.0.48 3
+3/Apr/97 LilyPond 0.0.50 3
-pl 48.hwn1
+pl 50
+ - merge rest / notehead.
+ - Staff_side as a base class for most "staff-side" symbols.
+ - version check
+ - Note_column_register, Note_column
+ - multiple scripts
+********
+april 8
+pl 49.jcn1
+Bugfix
+ - configure[.in], make/Configure_variables.make.in c++ (=doze fix)
+ - "configure; make" ok for doze, win32 target may be removed now
+ - win32/gcc 2.7.2 compile fixes -- why does this all compile
+ (without warnings, why can-t i even trigger warnings) under
+ linux/gcc-2.7.2.1? it's quite a tedious job fixing this
+ shit _on doze_ all the time.
+ * fixed #includes global-regs.cc, staff-info.cc, staff.cc
+ * key.hh:Key() -> Octave_key()
+ * added missing lily/include/input.hh: Input( Input const& )
+
+pl 49
- lsm template
- clef in cadenza mode.
- notename clear
- \command bla; for \meter, \clef, \octave etc.
-
+*******
pl 48
- notenames init
- Duration order -> grouping
- broken key s
- default octave
+
******
april 3
pl 47
* help-lines
+ * help-lines for rests
+
* [c8. c32 c32]
* cis ( | ) cis
- * lilypond - ->
+ * lilypond - -> crash
SEVERELY LACKING:
INPUTLANGUAGE
+ * relative mode for pitch entering
+
* configure pitch_byte
* special key.
* rpm package buildroot
- * indentable stream for TeX stream, lily stream, Dstream.
+ * indentable stream as baseclass for TeX stream, lily stream, Dstream.
+
+ * caching Item/spanner dimensions.
* key transposition
* Decent TeX titledefs (\tempo, \metron, etc. )
* command priority into enum
-
+
+ * don't broadcast Staff_sym
+
* C meter iso 4/4
* textspanner: center position
FUTURE
+ * Reg_configure_request
+
+ * slurs per voicegroup.
+
* slur parts as a script
* multiple scripst.
* move MIDI io to a ANSI C libmidi library.
- * itemcolumns: Use dummy items.
-
* use an embedded language: scheme, lisp, S-lang, Perl, GUILE, ?
+ - Items/Spanners
+ - Registers
* y -dims in internote?
we get different keychanges in different staffs.
* Integrating (objectiveC) MusicKit with LilyPond
-
+
* MusixTeX output possible?
* PostScript output (esp. Beams, Slurs, etc)
* caching breakpoints
* use exceptions iso assert?
+
+ * #c <-> cis
+
+ * breath marks
# subdir level:
#
depth = ..
-#
-
-include ./$(depth)/make/Include.make
-# generic stuff/Makefile
-#
-#
-
+include $(depth)/make/Include.make
# list of distribution files:
-#
-SCRIPTS = clearlily cpgento genheader make_patch make_version make_website release
+
+SCRIPTS = clearlily cpgento genheader make_patch \
+ make_version make_website release convert-mudela
EXTRA_DISTFILES = $(SCRIPTS)
#
--- /dev/null
+#!/usr/bin/perl -w
+
+print "todo\n!";
* fix/junk ambiguous String constructor overloads, e.g.:
String( int ) and String( char )
+ * version numbering for shared lib.
+
* LGPL?
* disable this auto conv: const pointer -> bool -> string
* extend Interval
- * use template handle in handle.hh for strings.
+ * use template handle in handle.hh for strings?
* move towards gnu or STL?
\inputregister { Stem_beam_register }
\inputregister { Text_register }
\inputregister { Script_register }
+ \inputregister { Note_column_register }
\inputregister { Voice_registers
\inputregister { Notehead_register }
\inputregister { Slur_register }
% indexstring same_dir_as_stem above_below_staff symbol_can_beinverted }
%
-accent = \script { "sforzato" -1 0 0 }
-marcato = \script { "marcato" -1 0 1 }
-staccatissimo = \script { "staccatissimo" -1 0 1 }
-portato= \script { "portato" -1 0 1 }
-fermata = \script { "fermata" 1 0 1 }
-stopped = \script { "stopped" 0 1 0 }
-staccato = \script { "staccato" -1 0 0 }
-tenuto = \script {"tenuto" -1 0 0 }
-upbow = \script { "upbow" 0 1 0 }
-downbow = \script { "downbow" 0 1 0 }
+accent = \script { "sforzato" 0 -1 0 0 }
+marcato = \script { "marcato" 0 -1 0 1 }
+staccatissimo = \script { "staccatissimo" 0 -1 0 1 }
+portato= \script { "portato" 0 -1 0 1 }
+fermata = \script { "fermata" 0 1 0 1 }
+stopped = \script { "stopped" 0 0 1 0 }
+staccato = \script { "staccato" 1 -1 0 0 }
+tenuto = \script {"tenuto" 0 -1 0 0 }
+upbow = \script { "upbow" 0 0 1 0 }
+downbow = \script { "downbow" 0 0 1 0 }
mwa = \melodic{
- \meter{3/4}
+ \meter 3/4;
[ a8 a8 a8 a8 a8 ] %
[ a8 ] %
% segfault
%
% declare melody (which will be in *one* staff ) for the lead voice
-melodie = \melodic
+melodie = \melodic {
% switch Lilypond in note-mode
- \clef\violin
- \meter{ 2/4 ;
- \octave c ; % set the default octave
+ \clef\violin;
+ \meter 2/4 ;
+ \octave c'; % set the default octave
% the default note duratino is 4
%%% theme
c c | % the '|' checks if there is a new measure here.
}
% more of this.
-begeleiding = \melodic
- \clef "bass"
- \meter{ 2/4 ;
- \octave c ; % default octave: 1 below the first octave.
+begeleiding = \melodic{
+ \clef "bass";
+ \meter 2/4 ;
+ \octave c'; % default octave: 1 below the first octave.
%%% theme
'c % ' before note means one octave lower.
+++ /dev/null
-% midi.ly
-% test source for lilypond-s midi output
-
-melodie = \melodic{
- \clef\violin
- \meter{ 2/4 }
- c c | g g | a a | g2
- f f | e e | d d8.( e16 | )c2 | % :|
-
-}
-
-begeleiding = \melodic{
- \clef\bass
- \meter{ 2/4 }
- \octave{'c}
- c c' | e' c' | f' c' | e' c'
- d' b | c' a | f g | c2 |
-
-}
-
-\score{
- \staff{ melodie }
- \staff{ begeleiding }
- \midi{
- \tempo 4:120
- }
-}
-
+% urgh
-melanie = \melodic{
- \meter{2/4}
- \duration{8}
- [ c d ] { [ d d' } { c c' ] } |
- [ c d ] [ e { d g } c ]2/3 |
+melanie = \melodic{
+ \meter 2/4;
+ \duration 8;
+ [ c d ] < [ d d'>< c c' ] > |
+ [ c d ] [ e <d g > c ]2/3 |
[ c d ] [ c16 d16 e'16 e'16 d16 c16 ]4/6 |
[ c d e e d c ]4/6 |
[c d ] < { [ c d e ]2/3 } { [ f g a ]2/3 } > |
}
-michelle = \melodic{
- \meter{2/4}
- \duration{8}
+michelle = \melodic{
+ \meter 2/4;
+ \duration 8;
[ c c c c ] |
[ c c c c ] |
[ c c c c ] |
[ c c c c ] |
}
-mireille = \lyric{
- \meter{2/4}
- \duration{8}
+mireille = \lyric{
+ \meter 2/4;
+ \duration 8;
o o o o |
o o [ o o o ]2/3 |
[ o o o ]2/3 [ o16 o16 o16 o16 o16 o16 ]4/6 |
}
\score{
- \staff{ mireille }
- \staff{ melanie }
- \staff{ michelle }
+ \staff{ melodicregs mireille }
+ \staff{ melodicregs melanie }
+ \staff{ melodicregs michelle }
\paper{}
}
ritme = \staff {
melodicregs
- \melodic{ %\octave {c}
- \partial {8}
- \meter{ 4/4}
+ \melodic{ %\octave ;
+ \partial 8;
+ \meter 4/4;
c8 |
[a8() a8. a8 a16 a16 a16] c4. | % watch the beams!
r32 r32 r16 r8 r4 r2 |
- \meter{ 5/16}
+ \meter 5/16;
% divide measure in 5 equal parts. Usually it 2+3 or 3+2
- \grouping { 5*16 }
+ \grouping 16*5 ;
[c8 c16 c8 ] | % watch THIS!
[c16 c16 c16 c16]5/4 |
- \meter{ 2/8}
+ \meter 2/8;
c4 |
c4 c4 c4 c4
- \meter {4/4}
+ \meter 4/4;
c1 c1 c1
% [c16 c16 c16 c16 ] |
}
}
-another = \staff{ melodicregs
- \melodic{ \meter{ 4/4}
- c1 c1 c1 c4 c4 c4 c4 \meter{ 4/4} c1 c1 c1
+another = \staff {
+ melodicregs
+ \melodic{ \meter 4/4;
+ c1 c1 c1 c4 c4 c4 c4 \meter 4/4; c1 c1 c1
}
}
-yanother = \staff{ melodicregs
- \melodic{ \meter{ 4/4}
+yanother = \staff {
+ melodicregs
+ \melodic{ \meter 4/4;
c1 c1 c1 c4 c4 c4 c4 c1 c1 c1
}
}
\octave c; [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
[c-. d-. e-. f-.][g-. a-. b-. c'-.]
[c'-- b-- a-- g][f-- e-- d c--] % 5
- [c-portato d-portato e-portato f-portato]
- [g-portato a-portato b-portato c'-portato]
- [c'-upbow b-upbow a-downbow g-downbow]
- [f-downbow e-downbow d-upbow c-upbow]
+ [c-\portato d-\portato e-\portato f-\portato]
+ [g-\portato a-\portato b-\portato c'-\portato]
+ [c'-\upbow b-\upbow a-\downbow g-\downbow]
+ [f-\downbow e-\downbow d-\upbow c-\upbow]
[c-| d-| e-| f-|][g-| a-| b-| c'-|]
[c' b a g][f e d c]
[c d e f][g a b c'] % 10
% The purpose of this file is to demonstrate features of LilyPond.
% (there is an accompanying LaTeX file, scsii-menuetto.tex)
%
-
+\version "0.0.50";
%% Stuff from MPP version
% \lefttitle{Menuetto}
% \tempo{Moderato}
c'!4-. |
%%7
< a4-. f4>
- < d'4-.-upbow f4 'bes4 >
- < e'4-.-downbow g4 'g4 > |
+ < d'4-.-\upbow f4 'bes4 >
+ < e'4-.-\downbow g4 'g4 > |
%%8
- < cis'2.-upbow e2. 'a2. >
+ < cis'2.-\upbow e2. 'a2. >
\bar ":|:";
%%9
\clef "violin";
{ \stem -1; g4(\stem -1;) f4 e4 }% ugh
> |
%%14
- < [ a f > g a f ] < d'4-$upbow e4 'bes4 > |
+ < [ a f > g a f ] < d'4-\upbow e4 'bes4 > |
%%15
- < c'4-$downbow f4 'a4 > [ bes( )a g a ] |
+ < c'4-\downbow f4 'a4 > [ bes( )a g a ] |
%%16
[ f( e )f a-. g-. bes-. ] |
%%17
%%18
< { [ c'( )bes c' a ] } { [ es ] } > fis4 |
%%19
- < d'4-downbow g4 'bes4 > < c'4-upbow g4 c4 > < [ bes d > a ] |
+ < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes d > a ] |
%%20
< { [ c'( bes a )bes g( )bes ] } { [ d ] } { [ g ] } > |
%%21
}
\score{
- \staff{ melodicregs $ii_menuetto }
+ \staff{ melodicregs ii_menuetto }
\paper{
\width 195\mm
\unitspace 9\mm % to get lily to use only three lines
%%36
< a2. fis2. > |
%#%\volta2
-%#%:|
%%37
[ a8. a16 ] [ cis'8. cis'16 ] [ e'8. e'16 ] |
%%38
%%4
''a r4 |
-%#%:|
%%5
\duration 8 ;
< \multivoice { \stem 1 ; [ 'f 'a d 'a d 'a ] }
%%36
[ 'd 'fis 'a 'fis 'a 'fis ] |
%#%\volta2
-%#%:|
%%37
[ ''a 'e 'g 'e ''bes^> 'e ] |
%%38
%
% Public Domain -- typed by by HWN
%
+\version "0.0.50";
+
global = \melodic{
\meter 4/4 ;
\grouping 2*2;
String location_str()const;
Input(Source_file*, char const*);
Input();
+ Input( Input const& );
};
#endif // INPUT_HH
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 48
+PATCH_LEVEL = 49
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
Stem_info::Stem_info(Stem const *s)
{
x = s->hindex();
- int dir = s->dir;
+ int dir = s->dir_i_;
idealy = max(dir*s->top, dir*s->bot);
miny = max(dir*s->minnote, dir*s-> maxnote);
assert(miny <= idealy);
}
dir_i_ = (dirs[0] > dirs[1]) ? -1 : 1;
for (iter_top(stems,i); i.ok(); i++) {
- i->dir = dir_i_;
+ i->dir_i_ = dir_i_;
}
}
Interval
-Beam::width() const
+Beam::do_width() const
{
Beam * me = (Beam*) this; // ugh
return Interval( (*me->stems.top()) ->hindex(),
void
Clef_register::acknowledge_element(Staff_elem_info info)
{
- if (info.elem_p_->name() == Bar::static_name()) {
+ if (info.elem_l_->name() == Bar::static_name()) {
if (!clef_p_){
create_clef();
clef_p_->change = false;
#include "lookup.hh"
#include "paper-def.hh"
#include "debug.hh"
-Crescendo::Crescendo(int s)
+
+Crescendo::Crescendo()
+ : Staff_side(this)
{
- staff_size_i_ = s;
grow_dir_i_ =0;
dir_i_ = -1 ;
left_dyn_b_ = right_dyn_b_ =false;
}
Symbol s( paper()->lookup_l()->hairpin(w_dim, grow_dir_i_ < 0) );
m_p->add(Atom(s));
- int pos = (dir_i_ >0) ? staff_size_i_ + 4 : - 4 ;
- if(dir_i_<0 ) // should do something better anyway.
- m_p->translate(Offset(0, -m_p->extent().y.left ));
+ int pos = get_position_i();
m_p->translate(Offset(x_off_dim,pos * paper()->internote()));
}
#include "lookup.hh"
#include "paper-def.hh"
#include "score-column.hh"
+#include "staff-sym.hh"
Dynamic_register::Dynamic_register()
{
assert (!dynamic_p_) ; // TODO
- dynamic_p_ = new Text_item(td_p, 10 ); // TODO!
+ dynamic_p_ = new Text_item(td_p);
announce_element(Staff_elem_info(dynamic_p_, dreq_l));
} else if (dreq_l->span_dynamic()) {
} else if (span_l->spantype == Span_req::START) {
cresc_req_l_ = span_l;
assert(!new_cresc_p);
- new_cresc_p = new Crescendo(10);
+ new_cresc_p = new Crescendo;
new_cresc_p->grow_dir_i_ = span_l->dynamic_dir_i_;
announce_element(Staff_elem_info(new_cresc_p, span_l));
}
void
Dynamic_register::pre_move_processing()
{
+ Staff_symbol* s_l = get_staff_info().staff_sym_l_;
if (dynamic_p_) {
+ dynamic_p_->set_staffsym(s_l);
typeset_element(dynamic_p_);
dynamic_p_ = 0;
}
to_end_cresc_p_->right_dyn_b_=true;
to_end_cresc_p_->right_col_l_ = get_staff_info().musical_l()->pcol_l_;
-
+ to_end_cresc_p_->set_staffsym(s_l);
typeset_element(to_end_cresc_p_);
to_end_cresc_p_ = 0;
}
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
+#include "proto.hh"
+#include "plist.hh"
#include "input-register.hh"
#include "debug.hh"
#include "register.hh"
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-#include "rest.hh"
+
#include "notehead.hh"
-#include "headreg.hh"
+#include "head-reg.hh"
#include "paper-def.hh"
#include "complex-walker.hh"
#include "musical-request.hh"
if (!note_req_l_)
return;
+ Notehead*n_p = new Notehead(8); // ugh
+ note_p_ = n_p;
+ n_p->set_rhythmic(note_req_l_->rhythmic());
if (note_req_l_->note()) {
- Notehead*n_p = new Notehead(8); // ugh
- note_p_ = n_p;
- n_p->set_rhythmic(note_req_l_->rhythmic());
n_p->position = note_req_l_->note()->height() +
*get_staff_info().c0_position_i_l_;
- } else {
- note_p_ = new Rest ( note_req_l_->rhythmic()->duration_);
+ } else if (note_req_l_->rest()) {
+ n_p->rest_b_ = true;
if (note_req_l_->rhythmic()->duration_.type_i_ <= 2)
note_p_->translate(
Offset(0,
6 * paper()->internote()));
}
+
Staff_elem_info itinf(note_p_,note_req_l_);
announce_element(itinf);
}
Notehead_register::pre_move_processing()
{
if (note_p_) {
- if (dir_i_ && note_p_->name() == Rest::static_name())
- note_p_->translate(Offset(0, 4*dir_i_ * paper()->internote()));
+ if (dir_i_ && note_p_->rest_b_ && note_p_->balltype <= 2) {
+ note_p_->position +=4*dir_i_ ;
+ }
typeset_element(note_p_);
note_p_ = 0;
}
/* *************** */
NAME_MEMBERS(Beam);
- virtual Interval width()const;
+ virtual Interval do_width()const;
Offset center() const;
Spanner *do_break_at(PCol *, PCol *) const;
Beam();
#ifndef CRESCENDO_HH
#define CRESCENDO_HH
+#include "staff-side.hh"
#include "spanner.hh"
/**
The hairpin symbol. (cresc)
*/
-class Crescendo : public Spanner {
- int staff_size_i_;
+class Crescendo : public Spanner , public Staff_side {
+
public:
int grow_dir_i_;
- int dir_i_;
- /// if there is a dynamic at the end, make the sign smaller.
+
+/// if there is a dynamic at the end, make the sign smaller.
bool right_dyn_b_;
/// if there is a dynamic at the end, make the sign smaller.
bool left_dyn_b_;
- Crescendo(int staff_size_i);
+ Crescendo();
private:
Spanner* do_break_at( PCol*, PCol*) const;
Molecule*brew_molecule_p()const;
#include "register.hh"
-struct Dynamic_register : Request_register {
+class Dynamic_register : public Request_register {
int dir_i_;
Text_item * dynamic_p_;
Crescendo * to_end_cresc_p_;
Span_dynamic_req * cresc_req_l_;
Array<Dynamic_req*> dynamic_req_l_arr_;
/* ************** */
+public:
Dynamic_register();
~Dynamic_register();
+ NAME_MEMBERS(Dynamic_register);
+protected:
virtual bool try_request(Request *req_l);
virtual void process_requests();
virtual void pre_move_processing();
virtual void post_move_processing();
virtual bool acceptable_request_b(Request*) const;
virtual void set_feature(Features);
- NAME_MEMBERS(Dynamic_register);
};
#endif // DYNAMIC_REG_HH
#include "register.hh"
struct Notehead_register : Request_register {
- Item* note_p_;
+ Notehead* note_p_;
+ Rhythmic_req * note_req_l_;
int dir_i_;
+
/* *************** */
- Notehead_register(Complex_walker*);
+ Notehead_register();
virtual bool try_request(Request *req_l) ;
- virtual void process_request();
- virtual void do_pre_move_process();
- void set_dir(int);
+ virtual void process_requests();
+ virtual void pre_move_processing();
+ virtual void post_move_processing();
+ void set_feature(Features);
+ NAME_MEMBERS(Notehead_register);
};
+++ /dev/null
-/*
- headreg.hh -- part of LilyPond
-
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef HEADREG_HH
-#define HEADREG_HH
-#include "register.hh"
-
-struct Notehead_register : Request_register {
- Item* note_p_;
- Rhythmic_req * note_req_l_;
- int dir_i_;
-
- /* *************** */
- Notehead_register();
- virtual bool try_request(Request *req_l) ;
- virtual void process_requests();
- virtual void pre_move_processing();
- virtual void post_move_processing();
- void set_feature(Features);
- NAME_MEMBERS(Notehead_register);
-};
-
-
-#endif // HEADREG_HH
spacing calculation.
*/
-struct Item : Staff_elem {
+class Item : public Staff_elem {
+public:
/// indirection to the column it is in
PCol * pcol_l_;
public:
Array<int> accidental_i_arr_;
- Key();
+ Octave_key();
void set(int i, int acc);
int acc(int i)const { return accidental_i_arr_[i]; }
};
struct Terminate_voice_req;
struct Text_req;
struct Timing_req;
+struct Note_column_register;
+struct Note_column;
+struct Staff_side;
+struct Staff_symbol;
#endif // LILY_PROTO_HH
void set_debug();
void set_yydebug(bool);
void print_declarations();
+ bool ignore_version_b_;
public:
void parse_file ( String init_str, String file_str);
My_lily_parser(Sources * sources_l);
~My_lily_parser();
+ void set_version_check(bool ignore);
};
#endif // MY_LILY_PARSER_HH
--- /dev/null
+/*
+ note-column-reg.hh -- declare Note_column_register
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef NOTE_COLUMN_REG_HH
+#define NOTE_COLUMN_REG_HH
+
+#include "register.hh"
+
+class Note_column_register :public Request_register {
+ Note_column *ncol_p_;
+ /* *************** */
+ bool acceptable_elem_b(Staff_elem const*)const;
+protected:
+ virtual void acknowledge_element(Staff_elem_info);
+ virtual void pre_move_processing();
+
+public:
+ Note_column_register();
+ NAME_MEMBERS(Note_column_register);
+};
+#endif // NOTE_COLUMN_REG_HH
--- /dev/null
+/*
+ note-column.hh -- declare Note_column
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef NOTE_COLUMN_HH
+#define NOTE_COLUMN_HH
+#include "item.hh"
+
+/**
+ a struct for treating a group of noteheads (noteheads, stem, scripts )
+ as a single entity.
+ */
+class Note_column : public Item {
+ Stem * stem_l_;
+ Array<Notehead*> head_l_arr_;
+ Array<Script *> script_l_arr_;
+
+protected:
+ virtual void translate(Offset);
+ virtual Interval do_height()const;
+ virtual void do_print() const ;
+ virtual void do_pre_processing();
+ virtual Interval do_width()const;
+public:
+
+ NAME_MEMBERS(Note_column);
+ Note_column();
+ void add(Notehead *);
+ void add(Stem *);
+ void add(Script *);
+};
+#endif // NOTE_COLUMN_HH
#ifndef NOTEHEAD_HH
#define NOTEHEAD_HH
+
#include "item.hh"
-/**
- ball at the end of the stem
-takes care of:
+/** ball at the end of the stem takes care of:
* help lines
* proper placing of dots
+ It also is the item for a Rest
+
*/
-struct Notehead : Item {
+class Notehead : public Item {
+public:
NAME_MEMBERS(Notehead);
+ bool rest_b_;
int position;
/// -1 = lowest, 0 = inside, 1 = top
int extremal;
position of top line (5 linestaff: 8)
*/
Notehead(int staff_size);
- void do_print()const;
static int compare(Notehead * const &a, Notehead *const &b) ;
- Molecule* brew_molecule_p()const;
+protected:
+ virtual void do_print()const;
+ virtual Molecule* brew_molecule_p()const;
};
#endif // NOTEHEAD_HH
#ifndef REGISTER_HH
#define REGISTER_HH
-#include "proto.hh"
+#include "lily-proto.hh"
#include "varray.hh"
#include "request.hh"
#include "staff-elem-info.hh"
*/
Request_register(const Request_register&){}
protected:
+
/// utility
virtual Paper_def * paper() const;
+++ /dev/null
-/*
- rest.hh -- part of LilyPond
-
- (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef REST_HH
-#define REST_HH
-#include "item.hh"
-
-/** typeset a Rest. A "vanilla" item.
- */
-struct Rest : Item {
-
- int dots;
- int balltype;
-
- /// rests can be translated up and down.
- int pos_i_;
- /* *************** */
-
-
- Rest(Duration);
- void do_print()const;
-NAME_MEMBERS(Rest);
- Molecule* brew_molecule_p()const;
-};
-#endif
-
#define SCRIPTDEF_HH
#include "string.hh"
-struct Script_def{
- int stemdir;
- int staffdir;
+/** The characteristics of a certain kind of accent. It is not the
+ accent itself. */
+struct Script_def {
- bool invertsym;
+ /// on the other side of the stem?
+ int rel_stem_dir_i_;
+
+ /// below or above staff?
+ int staff_dir_i_;
+
+ /// how close to the note do we want to be?
+ int priority_i_;
+
+ /// follow the ball inside staff?
+ bool inside_staff_b_;
+
+ /// invert if below staff?
+ bool invertsym_b_;
String symidx;
/* *************** */
int compare(Script_def const &);
void print() const;
- Script_def(String, int, int ,bool);
+ Script_def(String, bool, int, int ,bool);
};
#include "register.hh"
-struct Script_register : Request_register {
- Script * script_p_;
- Script_req * script_req_l_;
- int dir_i_;
+class Script_register : public Request_register {
+ Array<Script *> script_p_arr_;
+ Array<Script_req *> script_req_l_arr_;
+
/* *************** */
- void set_feature(Features dir_i_);
+ bool acceptable_elem_b(Staff_elem*);
+public:
+ NAME_MEMBERS(Script_register);
Script_register();
+protected:
+ virtual void set_feature(Features dir_i_);
virtual bool try_request(Request*);
virtual void process_requests();
virtual void acknowledge_element(Staff_elem_info);
virtual void pre_move_processing();
virtual void post_move_processing();
- NAME_MEMBERS(Script_register);
+
};
#endif // SCRIPTREG_HH
#ifndef SCRIPT_HH
#define SCRIPT_HH
+#include "staff-side.hh"
#include "script-def.hh"
#include "item.hh"
-struct Script : Item {
- int dir;
- int symdir;
- int pos;
- int staffsize;
+/**
+ Accents that are put over a note-group.
+ */
+class Script : public Item, public Staff_side {
+ /**
+ Vertical dir of symbol. -1 means invert the symbol.
+ */
+ int symdir_i_;
+
+ int pos_i_;
+
Script_def *specs_l_;
Stem *stem_l_;
- Array<Item *> support;
/* *************** */
- NAME_MEMBERS(Script);
+protected:
Molecule *brew_molecule_p()const;
virtual void do_post_processing();
virtual void do_pre_processing();
- Script(Script_req*, int staffsize);
- void set_support(Item*);
- void set_stem(Stem*);
- Interval support_height()const;
- virtual Interval width() const;
+ virtual Interval do_width() const;
private:
void set_symdir();
void set_default_dir();
void set_default_index();
Symbol symbol()const;
+public:
+ static int compare(Script *const&, Script *const&) ;
+ Script(Script_req*);
+ void set_stem(Stem*);
+ NAME_MEMBERS(Script);
+
};
#include "staff-elem.hh"
-/** a symbol which is attached between two columns. A spanner is a symbol which spans across several columns, so its
- final appearance can only be calculated after the breaking problem
- is solved.
+/** a symbol which is attached between two columns. A spanner is a
+ symbol which spans across several columns, so its final appearance
+ can only be calculated after the breaking problem is solved.
Examples
- - (de)crescendo
- - slur
- - beam
- - bracket
+ \begin{itemize}
+ \item (de)crescendo
+ \item slur
+ \item beam
+ \item bracket
+ \end{itemize}
Spanner should know about the items which it should consider:
- e.g. slurs should be steep enough to "enclose" all those items. This
- is absolutely necessary for beams, since they have to adjust the
- length of stems of notes they encompass.
+ e.g. slurs should be steep enough to "enclose" all those items. This
+ is absolutely necessary for beams, since they have to adjust the
+ length of stems of notes they encompass.
*/
-struct Spanner:Staff_elem {
+class Spanner:public Staff_elem {
+public:
PCol *left_col_l_, *right_col_l_;
/* *************** */
-
+ NAME_MEMBERS(Spanner);
+ virtual Spanner* spanner() { return this; }
Spanner();
- virtual Interval width()const;
- void do_print()const;
-
Spanner *broken_at(PCol *c1, PCol *c2) const;
- virtual Spanner* spanner() { return this; }
protected:
+ virtual Interval do_width()const;
+ void do_print()const;
+
+
/**
- clone a piece of this spanner.
- PRE
- c1 >= start, c2 <= stop
+ clone a piece of this spanner.
+ PRE
+ c1 >= start, c2 <= stop
*/
virtual Spanner *do_break_at( PCol *c1, PCol *c2) const=0;
- NAME_MEMBERS(Spanner);
};
#endif
/// data container.
struct Staff_elem_info {
- Staff_elem * elem_p_;
+ Staff_elem * elem_l_;
Request*req_l_;
Voice const * voice_l_;
Array<Request_register*> origin_reg_l_arr_;
virtual ~Staff_elem();
Staff_elem();
NAME_MEMBERS(Staff_elem);
- void translate(Offset);
+
+ /**
+ translate the symbol. The symbol does not have to be created yet.
+ Overridable, since this staff-elem might act as a pseudo-list.
+ */
+ virtual void translate(Offset);
void add_processing();
void pre_processing();
void post_processing();
virtual Spanner* spanner() { return 0; }
virtual Item * item() { return 0; }
+ /**
+ add a dependency. It may be the 0 pointer, in which case, it is ignored.
+ */
void add_dependency(Staff_elem* );
void substitute_dependency(Staff_elem* old, Staff_elem * newdep);
protected:
-
+ virtual Interval do_height()const;
+ virtual Interval do_width()const;
/// do printing of derived info.
- virtual void do_print() const=0;
+ virtual void do_print() const {}
/// generate the molecule
- virtual Molecule* brew_molecule_p()const=0;
+ virtual Molecule* brew_molecule_p()const;
///executed directly after the item is added to the PScore
virtual void do_add_processing();
/// do calculations before determining horizontal spacing
struct Staff_info {
int *c0_position_i_l_;
Staff_walker *walk_l_;
-
+ Staff_symbol*staff_sym_l_;
/// when is now?
Time_description const *time_C_;
Input_register const *ireg_C_;
int base_position_i_;
Array<Voice_group_registers*> group_l_arr_;
-
+ Staff_symbol * staff_sym_l_;
+protected:
+ virtual bool try_request(Request * r);
+ virtual Staff_info get_staff_info();
+ virtual bool acceptable_request_b(Request*) const ;
+ virtual void acknowledge_element(Staff_elem_info);
public:
/* *************** */
Voice_group_registers * old_group);
Voice_group_registers * get_group(String id);
void terminate_register(Request_register * reg);
- virtual bool try_request(Request * r);
- virtual Staff_info get_staff_info();
Staff_registers(Input_register const*);
- virtual bool acceptable_request_b(Request*) const ;
};
#endif // STAFF_REGS_HH
--- /dev/null
+/*
+ staff-side.hh -- declare Staff_side
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef STAFF_SIDE_HH
+#define STAFF_SIDE_HH
+
+#include "staff-elem.hh"
+
+/// A symbol which sits along the staff
+class Staff_side {
+ Array<Staff_elem*> support_l_arr_;
+
+ Staff_symbol * staff_sym_l_;
+ Staff_elem * elem_l_;
+ Interval support_height()const;
+public:
+ /**
+ Vertical dir of symbol relative to staff. -1 = below staff?
+ */
+ int dir_i_;
+
+ /// follow the support inside the staff?
+ bool inside_staff_b_;
+
+ void set_staffsym(Staff_symbol*);
+
+ Staff_side(Staff_elem*);
+ void add_support(Staff_elem*);
+
+protected:
+ int get_position_i()const;
+};
+#endif // STAFF_SIDE_HH
Staff_symbol *span_p_;
Moment last_mom_;
public:
- ~Staff_sym_register();
Staff_sym_register();
NAME_MEMBERS(Staff_sym_register);
+protected:
+ virtual void process_requests();
+ ~Staff_sym_register();
virtual void pre_move_processing();
virtual void post_move_processing();
};
#ifndef STAFFSYM_HH
#define STAFFSYM_HH
#include "spanner.hh"
+
/**
This spanner draws the lines of a pstaff.
The bottom line is position 0.
*/
class Staff_symbol : public Spanner
{
-public:
/// this many lines.
int no_lines_i_;
+public:
+ void set_extent(PCol* p1, PCol* p2);
NAME_MEMBERS(Staff_symbol);
Staff_symbol(int lines);
+ Real inter_note_f()const;
+ int steps_i()const;
+protected:
virtual Molecule* brew_molecule_p() const;
- void set_extent(PCol* p1, PCol* p2);
virtual void do_print()const;
virtual Spanner *do_break_at( PCol *c1, PCol *c2) const;
};
-1 stem points down, +1: stem points up
*/
- int dir;
+ int dir_i_;
Real stem_xoffset;
Array<Notehead*> heads;
void set_noteheads();
void do_pre_processing();
- Interval width() const;
+ virtual Interval do_width() const;
Molecule* brew_molecule_p() const;
};
#include "text-def.hh"
#include "item.hh"
+#include "staff-side.hh"
/**
print a fixed width text above or below the staff.
*/
-class Text_item : public Item {
- void init(Text_def* tdef_l,int staffsize_i);
+class Text_item : public Item ,public Staff_side{
+ void init(Text_def* tdef_l);
Text_def* tdef_p_;
+
public:
Text_def * tdef_l();
int pos_i_;
- int staffsize_i_;
- int dir_i_;
/* ***************/
virtual void set_default_index();
Molecule* brew_molecule_p() const;
void do_pre_processing();
- Text_item(Text_def*,int);
- Text_item(Text_req*,int);
+ Text_item(Text_def*);
+ Text_item(Text_req*);
~Text_item();
};
change_key_b_ = true;
}
- if (info.elem_p_->name() == Bar::static_name())
+ if (info.elem_l_->name() == Bar::static_name())
default_key_b_ = true;
}
<*>{WHITE}+ {
}
-<notes>. {
+<INITIAL,notes>. {
return yylval.c = YYText()[0];
}
<INITIAL,lyrics,notes>\\. {
#include "version.hh"
#include <stdio.h>
-static char *s = "LilyPond " MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL MY_PATCH_LEVEL " #%d";
+static char *s = "GNU LilyPond " MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL MY_PATCH_LEVEL " #%d";
static const int build=
#include ".build"
if( note_l_->forceacc_b_ ||
local_key_.oct(note_l_->octave_i_).acc(note_l_->notename_i_)
!= note_l_->accidental_i_) {
- Item * support_l_ = info.elem_p_->item();
+ Item * support_l_ = info.elem_l_->item();
if (!key_item_p_) {
local_key_.oct(note_l_->octave_i_)
.set(note_l_->notename_i_, note_l_->accidental_i_);
}
- } else if (info.elem_p_->name()==Key_item::static_name()) {
+ } else if (info.elem_l_->name()==Key_item::static_name()) {
Key_register * key_reg_l =
(Key_register*)info.origin_reg_l_arr_[0];
key_C_ = &key_reg_l->key_;
#include "debug.hh"
Lyric_item::Lyric_item(Lyric_req* lreq_l, int voice_count_i)
- : Text_item(lreq_l,0)
+ : Text_item(lreq_l)
{
pos_i_ = -voice_count_i * 4 ; // 4 fontsize dependant. TODO
dir_i_ = -1;
Sources* source_l_g = 0;
bool only_midi = false;
+bool version_ignore_b_ = false;
+void destill_inname( String &name_str_r);
-void
-destill_inname( String &name_str_r);
Long_option_init theopts[] = {
{1, "output", 'o'},
{0, "warranty", 'w'},
{1, "init", 'i'},
{1, "include", 'I'},
{0, "midi", 'M'},
+ {0, "ignore-version", 'V'},
{0,0,0}
};
"Typeset and or produce midi output from mudela-file or stdin\n"
"\n"
"Options:\n"
- " -d, --debug enable debugging output\n"
- " -I, --include=DIR add DIR to search path\n"
- " -i, --init=FILE use FILE as init file\n"
- " -h, --help this help\n"
- " -w, --warranty show warranty and copyright\n"
- " -o, --output=FILE set FILE as default output\n"
- " -M, --midi produce midi output only\n"
+ " -d, --debug enable debugging output\n"
+ " -I, --include=DIR add DIR to search path\n"
+ " -i, --init=FILE use FILE as init file\n"
+ " -h, --help this help\n"
+ " -w, --warranty show warranty and copyright\n"
+ " -o, --output=FILE set FILE as default output\n"
+ " -M, --midi produce midi output only\n"
+ " -V, --ignore-version ignore mudela version\n"
"\n"
"LilyPond was compiled with the following settings:\n"
#ifdef NDEBUG
source_l_g->set_path(path_l);
{
My_lily_parser parser(source_l_g);
+ parser.set_version_check(version_ignore_b_);
parser.parse_file(init_str, file_str);
}
do_scores();
usage();
exit(0);
break;
+ case 'V':
+ version_ignore_b_ = false;
+ break;
case 'd':
set_debug(true);
break;
{"transpose", TRANSPOSE},
{"unitspace", UNITSPACE},
{"width", WIDTH},
+ {"version", VERSION},
{"grouping", GROUPING},
{0,0}
};
{
lexer_p_->clear_notenames();
}
-
+void
+My_lily_parser::set_version_check(bool ig)
+{
+ ignore_version_b_ = ig;
+}
void
My_lily_parser::set_debug()
{
--- /dev/null
+/*
+ note-column-reg.cc -- implement Note_column_register
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "note-column-reg.hh"
+#include "notehead.hh"
+#include "stem.hh"
+#include "note-column.hh"
+#include "script.hh"
+
+bool
+Note_column_register::acceptable_elem_b(Staff_elem const*elem_C)const
+{
+ char const*nC = elem_C->name();
+ return (nC == Script::static_name() || nC == Notehead::static_name()
+ || nC == Stem::static_name());
+}
+
+void
+Note_column_register::acknowledge_element(Staff_elem_info i)
+{
+ if (!acceptable_elem_b(i.elem_l_))
+ return;
+
+ if (!ncol_p_)
+ ncol_p_ = new Note_column;
+
+ char const*nC = i.elem_l_->name();
+
+ if (nC == Script::static_name())
+ ncol_p_->add((Script*)i.elem_l_);
+ else if (nC == Notehead::static_name())
+ ncol_p_->add((Notehead*)i.elem_l_);
+ else if (nC == Stem::static_name())
+ ncol_p_->add((Stem*)i.elem_l_);
+}
+
+void
+Note_column_register::pre_move_processing()
+{
+ if (ncol_p_) {
+ typeset_element(ncol_p_);
+ ncol_p_ =0;
+ }
+}
+Note_column_register::Note_column_register()
+{
+ ncol_p_=0;
+}
+IMPLEMENT_STATIC_NAME(Note_column_register);
+ADD_THIS_REGISTER(Note_column_register);
--- /dev/null
+/*
+ note-column.cc -- implement Note_column
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "note-column.hh"
+#include "debug.hh"
+#include "script.hh"
+#include "notehead.hh"
+#include "stem.hh"
+
+IMPLEMENT_STATIC_NAME(Note_column);
+
+
+void
+Note_column::add(Stem*stem_l)
+{
+ assert(!stem_l_);
+ stem_l_ = stem_l;
+ add_dependency(stem_l);
+}
+
+void
+Note_column::add(Notehead* n_l)
+{
+ head_l_arr_.push(n_l);
+ add_dependency(n_l);
+}
+
+void
+Note_column::add(Script*s_l)
+{
+ script_l_arr_.push(s_l);
+ add_dependency(s_l);
+}
+
+void
+Note_column::translate(Offset o)
+{
+ for (int i=0; i < head_l_arr_.size(); i++)
+ head_l_arr_[i]->translate(o);
+ for (int i=0; i < script_l_arr_.size(); i++)
+ script_l_arr_[i]->translate(o);
+ if (stem_l_)
+ stem_l_->translate(o);
+}
+
+
+void
+Note_column::do_print()const
+{
+ mtor << "heads: " << head_l_arr_.size() << '\n';
+ mtor << "scripts: " << script_l_arr_.size() << '\n';
+}
+
+Interval
+Note_column::do_height()const return r
+{
+ if (stem_l_)
+ r.unite(stem_l_->height());
+ for (int i=0; i < head_l_arr_.size(); i++)
+ r.unite(head_l_arr_[i]->height());
+ for (int i=0; i < script_l_arr_.size(); i++)
+ r.unite(script_l_arr_[i]->height());
+}
+
+Interval
+Note_column::do_width()const return r;
+{
+ if (stem_l_)
+ r.unite(stem_l_->width());
+ for (int i=0; i < head_l_arr_.size(); i++)
+ r.unite(head_l_arr_[i]->width());
+ for (int i=0; i < script_l_arr_.size(); i++)
+ r.unite(script_l_arr_[i]->width());
+}
+
+void
+Note_column::do_pre_processing()
+{
+ if (!script_l_arr_.size())
+ return;
+
+ Array<Script*> placed_l_arr_a[4];
+ for (int i=0; i < script_l_arr_.size(); i++) {
+ Script*s_l = script_l_arr_[i];
+ int j = (s_l->dir_i_ >0) ? 0 : 2;
+ if (!s_l->inside_staff_b_)
+ j ++;
+
+ placed_l_arr_a[j].push(s_l);
+ }
+ for (int j =0; j <4; j++) {
+ placed_l_arr_a[j].sort( Script::compare);
+ }
+
+ Notehead *top_head_l=0;
+ Notehead *bot_head_l=0;
+ for (int i=0; i< head_l_arr_.size(); i++) {
+ if (head_l_arr_[i]->extremal == -1)
+ bot_head_l = head_l_arr_[i];
+ else if (head_l_arr_[i]->extremal == 1)
+ top_head_l = head_l_arr_[i];
+ }
+ /* argh. This sux. */
+ if (!top_head_l)
+ top_head_l = bot_head_l;
+ if (!bot_head_l)
+ bot_head_l = top_head_l;
+ assert(bot_head_l && top_head_l);
+ Item *support_l=top_head_l;
+ int j;
+ for (j = 0; j < 2; j++ ) {
+ for (int i=0; i < placed_l_arr_a[j].size(); j++) {
+ placed_l_arr_a[j][i]->add_support(support_l);
+ support_l = placed_l_arr_a[j][i];
+ }
+ }
+
+ support_l=bot_head_l;
+ for (; j < 4; j++ ) {
+ for (int i=0; i < placed_l_arr_a[j].size(); i++) {
+ placed_l_arr_a[j][i]->add_support(support_l);
+ support_l = placed_l_arr_a[j][i];
+ }
+ }
+}
+Note_column::Note_column()
+{
+ stem_l_ =0;
+}
+
balltype = 0;
dots = 0;
extremal = 0;
+ rest_b_ = false;
}
void
Notehead::do_print()const
{
#ifndef NPRINT
+ if (rest_b_)
+ mtor << "REST! ";
mtor << "balltype "<< balltype << ", position = "<< position
<< "dots " << dots;
#endif
Paper_def *p = paper();
Real dy = p->internote();
- Symbol s = p->lookup_l()->ball(balltype);
+ Symbol s;
+ if (!rest_b_)
+ s = p->lookup_l()->ball(balltype);
+ else
+ s = p->lookup_l()->rest(balltype);
out = new Molecule(Atom(s));
if (dots) {
%{ // -*-Fundamental-*-
#include <iostream.h>
+#define MUDELA_VERSION "0.0.50"
#include "script-def.hh"
#include "symtable.hh"
%token TITLE
%token UNITSPACE
%token WIDTH
+%token VERSION
/* escaped */
%token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR
}
| mudela add_declaration { }
| mudela error
+ | mudela check_version { }
| mudela add_notenames { }
;
+check_version:
+ VERSION STRING ';' {
+ if (*$2 != MUDELA_VERSION) {
+ if (THIS->ignore_version_b_) {
+ THIS->here_input().error("Incorrect mudela version");
+ } else {
+ THIS->fatal_error_i_ = 1;
+ THIS->parser_error("Incorrect mudela version");
+ }
+ }
+ }
+ ;
+
add_notenames:
NOTENAMES '{' notenames_body '}'
;
;
script_body:
- STRING int int int {
- $$ = new Script_def(*$1,$2, $3,$4);
+ STRING int int int int {
+ $$ = new Script_def(*$1,$2, $3,$4,$5);
delete $1;
}
;
void
Register_group_register::acknowledge_element(Staff_elem_info info)
{
- if (!contains_b(info.origin_reg_l_arr_[0]))
+ Request_register* origin = info.origin_reg_l_arr_[0];
+ if (!contains_b(origin) && !origin->contains_b(this))
return;
for (iter_top(reg_list_, i); i.ok(); i++)
#include "register-group.hh"
#include "debug.hh"
-
bool
Request_register::try_request(Request*)
{
+++ /dev/null
-/*
- rest.cc -- implement Rest
-
- source file of the LilyPond music typesetter
-
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-#include "duration.hh"
-#include "rest.hh"
-#include "dimen.hh"
-#include "debug.hh"
-#include "paper-def.hh"
-#include "lookup.hh"
-#include "molecule.hh"
-#include "rest.hh"
-
-Rest::Rest(Duration d)
-{
- balltype = d.type_i_;
- dots = d.dots_i_;
- pos_i_ = 0;
-}
-
-
-IMPLEMENT_STATIC_NAME(Rest);
-
-void
-Rest::do_print()const
-{
-#ifndef NPRINT
- mtor << "Rest "<<balltype<< "dots " << dots;
- Item::print();
-#endif
-}
-
-Molecule*
-Rest::brew_molecule_p()const
-{
- Paper_def *p =paper();
-
- Symbol s;
- s = p->lookup_l()->rest(balltype);
-
- Molecule *m = new Molecule(Atom(s));
- if (dots) {
- Symbol d =p->lookup_l()->dots(dots);
- Molecule dm;
- dm.add(Atom(d));
- m->add_right(dm);
- }
- m->translate(Offset(0,pos_i_ * paper()->internote()));
- return m;
-}
-
#include "debug.hh"
#include "script-def.hh"
-Script_def::Script_def(String idx, int stem, int staff ,bool invert)
+Script_def::Script_def(String idx, bool follow, int stem, int staff ,bool invert)
{
+ inside_staff_b_ = follow;
symidx = idx ;
- stemdir =stem;
- staffdir = staff;
- invertsym = invert;
+ rel_stem_dir_i_ =stem;
+ staff_dir_i_ = staff;
+ invertsym_b_ = invert;
+ priority_i_ =0;
}
+
void
Script_def::print() const
{
mtor << "Script_def{ idx: " << symidx
- << " direction, stem: " << stemdir << " staff : " << staffdir << "}\n";
+ << " direction, stem: " << rel_stem_dir_i_ << " staff : " << staff_dir_i_ << "}\n";
}
int
Script_def::compare(Script_def const & c)
{
return !(symidx == c.symidx &&
- stemdir == c.stemdir&&
- staffdir == c.staffdir&&
- invertsym == c.invertsym);
+ rel_stem_dir_i_ == c.rel_stem_dir_i_&&
+ staff_dir_i_ == c.staff_dir_i_&&
+ invertsym_b_ == c.invertsym_b_);
}
#include "musical-request.hh"
#include "complex-walker.hh"
#include "stem.hh"
+#include "staff-sym.hh"
Script_register::Script_register()
{
- script_p_ = 0;
post_move_processing();
}
{
if (!r_l->script())
return false ;
-
- if (script_req_l_
- && Script_req::compare(*script_req_l_, *r_l->script()))
+ for (int i=0; i < script_req_l_arr_.size(); i++)
+ if ( !Script_req::compare(*script_req_l_arr_[i], *r_l->script())) {
+ return true;
+ }
- return false;
-
- script_req_l_ = r_l->script();
+ script_req_l_arr_.push( r_l->script());
return true;
}
void
Script_register::process_requests()
{
- if (script_req_l_) {
- script_p_ = new Script(script_req_l_, 10);
- announce_element(
- Staff_elem_info(script_p_, script_req_l_));
+ for (int i=0; i < script_req_l_arr_.size(); i++){
+ Script_req* l=script_req_l_arr_[i];
+ Script *p =new Script( l);
+ script_p_arr_.push(p);
+ announce_element(Staff_elem_info(p, l));
}
}
+bool
+Script_register::acceptable_elem_b(Staff_elem*s_l)
+{
+ char const *nC = s_l->name();
+ return (nC == Stem::static_name());
+}
+
void
Script_register::acknowledge_element(Staff_elem_info info)
{
- if (!script_p_)
+ Staff_elem *elem_l = info.elem_l_;
+ if (!acceptable_elem_b(elem_l))
return;
- if (info.elem_p_->name() == Stem::static_name())
- script_p_->set_stem((Stem*)info.elem_p_);
- else if (info.req_l_->rhythmic())
- script_p_->set_support(info.elem_p_->item());
+
+ for (int i=0; i < script_p_arr_.size(); i++) {
+ Script*script_l = script_p_arr_[i];
+ if (elem_l->name() == Stem::static_name())
+ script_l->set_stem((Stem*)elem_l);
+ }
}
void
Script_register::pre_move_processing()
{
- if (script_p_){
- script_p_->dir = dir_i_;
- typeset_element(script_p_);
- script_p_ = 0;
+ Staff_symbol* s_l = get_staff_info().staff_sym_l_;
+ for (int i=0; i < script_p_arr_.size(); i++) {
+
+ Script*script_p = script_p_arr_[i];
+ script_p->set_staffsym( s_l);
+ typeset_element(script_p);
}
+ script_p_arr_.set_size(0);
}
void
Script_register::post_move_processing()
{
- script_req_l_ = 0;
+ script_req_l_arr_.set_size(0);
}
void
-Script_register::set_feature(Features i)
+Script_register::set_feature(Features )
{
- if (i.direction_i_|| i.initialiser_b_)
- dir_i_ = i.direction_i_;
+// if (i.direction_i_|| i.initialiser_b_)
+ //dir_i_ = i.direction_i_;
}
IMPLEMENT_STATIC_NAME(Script_register);
ADD_THIS_REGISTER(Script_register);
+/*
+ script.cc -- implement Script
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include "musical-request.hh"
#include "paper-def.hh"
#include "script.hh"
Script::set_stem(Stem*st_l)
{
stem_l_ = st_l;
- add_dependency(st_l);
+ add_support(st_l);
}
-void
-Script::set_support(Item*i)
-{
- support.push(i);
- add_dependency(i);
-}
-Script::Script(Script_req* rq, int staflen)
+Script::Script(Script_req* rq)
+ :Staff_side(this)
{
- staffsize =staflen;
specs_l_ = rq->scriptdef_p_;
+ inside_staff_b_ = specs_l_->inside_staff_b_;
stem_l_ = 0;
- pos = 0;
- symdir=1;
- dir =rq->dir_i_;
+ pos_i_ = 0;
+ symdir_i_=1;
+ dir_i_ =rq->dir_i_;
}
void
Script::set_symdir()
{
- if (specs_l_->invertsym)
- symdir = (dir < 0) ? -1:1;
+ if (specs_l_->invertsym_b_)
+ symdir_i_ = (dir_i_ < 0) ? -1:1;
}
void
Script::set_default_dir()
{
- if (specs_l_->stemdir) {
- if (!stem_l_)
- dir = 1;
- else
- dir = stem_l_->dir * specs_l_->stemdir;
+ int s_i=specs_l_->rel_stem_dir_i_;
+ if (s_i && stem_l_)
+ dir_i_ = stem_l_->dir_i_ * s_i;
+ else {
+ dir_i_ =specs_l_->staff_dir_i_;
}
}
-Interval
-Script::support_height() const return r;
-{
- for (int i=0; i < support.size(); i++)
- r.unite(support[i]->height());
-}
-
void
Script::set_default_index()
{
- Real inter_f= paper()->internote();
- Interval dy = symbol().dim.y;
-
- int d = specs_l_->staffdir;
- Real y ;
- if (!d) {
- Interval v= support_height();
- y = v[dir] -dy[-dir] + 2*dir*inter_f;
- } else {
- y = (d > 0) ? staffsize + 2: -2; // ug
- y *=inter_f;
- Interval v= support_height();
-
- if (d > 0) {
- y = y >? v.max();
- } else if (d < 0) {
- y = y <? v.min();
- }
- }
-
- if (stem_l_) {
- Interval v= stem_l_->height();
-
- if (d > 0 || (!d && dir > 0)) {
- y = y >? v.max();
- }else if (d < 0 || (!d && dir < 0)) {
- y = y <? v.min();
- }
- }
-
- pos = int(rint(Real(y)/inter_f));
+ pos_i_ = get_position_i();
}
Interval
-Script::width() const
+Script::do_width() const
{
return symbol().dim.x;
}
Symbol
Script::symbol()const
{
- String preidx_str = (symdir < 0) ?"-" :"";
+ String preidx_str = (symdir_i_ < 0) ?"-" :"";
return paper()->lookup_l()->script(preidx_str + specs_l_->symidx);
}
Real dy = paper()->internote();
Molecule*out = new Molecule(Atom(symbol()));
- out->translate(Offset(0,dy * pos));
+ out->translate(Offset(0,dy * pos_i_));
return out;
}
IMPLEMENT_STATIC_NAME(Script);
+
+int
+Script::compare(Script *const&l1, Script *const&l2)
+{
+ return l1->specs_l_->priority_i_ - l2->specs_l_->priority_i_;
+}
+
void
Slur_register::acknowledge_element(Staff_elem_info info)
{
- if (info.elem_p_->name() == Notehead::static_name()) {
- Notehead *head_p =(Notehead*) info.elem_p_ ;// ugh
+ if (info.elem_l_->name() == Notehead::static_name()) {
+ Notehead *head_p =(Notehead*) info.elem_l_ ;// ugh
for (int i = 0; i < slur_l_stack_.size(); i++)
slur_l_stack_[i]->add(head_p );
for (int i = 0; i < end_slur_l_arr_.size(); i++)
Interval
-Spanner::width()const
+Spanner::do_width()const
{
Real r = right_col_l_->hpos;
Real l = left_col_l_->hpos;
Staff_elem_info::Staff_elem_info(Staff_elem*s_l, Request*r_l)
{
- elem_p_ = s_l;
+ elem_l_ = s_l;
voice_l_ = (r_l)?r_l->voice_l():0;
req_l_ = r_l;
}
Staff_elem_info::Staff_elem_info()
{
- elem_p_ = 0;
+ elem_l_ = 0;
voice_l_ = 0;
req_l_ = 0;
+/*
+ staff-elem.cc -- implement Staff_elem
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "paper-def.hh"
+#include "lookup.hh"
#include "p-score.hh"
#include "symbol.hh"
#include "p-staff.hh"
pstaff_l_ = s.pstaff_l_;
offset_ = Offset(0,0);
}
+
/**
TODO:
If deleted, then remove dependant_l_arr_ depency!
{
offset_ += O;
}
+
Interval
-Staff_elem::width() const
+Staff_elem::do_width() const return r;
{
- Interval r;
-
+
if (!output){
- Molecule*m = brew_molecule_p();
+ Molecule*m = brew_molecule_p();
r = m->extent().x;
delete m;
} else
r = output->extent().x;
-
+}
+Interval
+Staff_elem::width() const
+{
+ Interval r=do_width();
+
if (!r.empty_b()) // float exception on DEC Alpha
r+=offset_.x;
return r;
}
Interval
-Staff_elem::height() const
+Staff_elem::do_height() const return r
{
- Interval r;
-
if (!output){
Molecule*m = brew_molecule_p();
r = m->extent().y;
delete m;
} else
r = output->extent().y;
-
+}
+
+Interval
+Staff_elem::height() const
+{
+ Interval r=do_height();
+
if (!r.empty_b())
r+=offset_.y;
p->dependant_l_arr_.push(p);
}
IMPLEMENT_STATIC_NAME(Staff_elem);
+
+Molecule*
+Staff_elem::brew_molecule_p()const
+{
+ Atom a(paper()->lookup_l()->fill(Box(Interval(0,0), Interval(0,0))));
+ return new Molecule (a);
+}
source file of the LilyPond music typesetter
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-#include "staff.hh"
#include "proto.hh"
+#include "plist.hh"
+#include "staff.hh"
#include "staff-info.hh"
#include "score-column.hh"
#include "complex-walker.hh"
Staff_registers::get_staff_info() return inf;
{
inf = Request_register::get_staff_info();
+ inf.staff_sym_l_=staff_sym_l_;
inf.c0_position_i_l_ = &c0_position_i_;
}
Staff_registers::Staff_registers(Input_register const*ireg_C)
{
+ staff_sym_l_ =0;
c0_position_i_ = 0;
base_position_i_ =0;
add( ireg_C->get_nongroup_p_arr());
(r->command() && r->command()->groupchange());
}
+void
+Staff_registers::acknowledge_element(Staff_elem_info i)
+{
+ Register_group_register::acknowledge_element(i);
+ if ( i.elem_l_->name() == Staff_symbol::static_name())
+ staff_sym_l_ = (Staff_symbol*)i.elem_l_;
+}
--- /dev/null
+/*
+ staff-side.cc -- implement Staff_side
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "staff-side.hh"
+#include "staff-sym.hh"
+
+void
+Staff_side::set_staffsym(Staff_symbol* s_l)
+{
+ staff_sym_l_ = s_l;
+}
+
+Staff_side::Staff_side(Staff_elem * elem_l)
+{
+ elem_l_ = elem_l;
+ dir_i_ =0;
+ staff_sym_l_ =0;
+ inside_staff_b_ =false;
+}
+
+
+Interval
+Staff_side::support_height() const return r;
+{
+ for (int i=0; i < support_l_arr_.size(); i++)
+ r.unite(support_l_arr_[i]->height());
+}
+
+void
+Staff_side::add_support(Staff_elem*i)
+{
+ support_l_arr_.push(i);
+ elem_l_->add_dependency(i);
+}
+
+int
+Staff_side::get_position_i()const
+{
+ if (!staff_sym_l_)
+ return 0;
+
+ Real inter_f = staff_sym_l_->inter_note_f();
+ int staff_size_i = staff_sym_l_->steps_i();
+ Real y=0;
+ if (!inside_staff_b_) {
+ y = (dir_i_ > 0) ? staff_size_i + 2: -2;
+ y *=inter_f;
+ Interval v= support_height();
+
+ if (dir_i_ > 0) {
+ y = y >? (v.max() + 2*inter_f);
+ } else if (dir_i_ < 0) {
+ y = y <? (v.min() - 2*inter_f);
+ }
+ } else {
+ Interval v= support_height();
+ y = v[dir_i_] + 2*dir_i_*inter_f; // ugh
+ }
+ return int(rint(Real(y)/inter_f));
+}
}
}
+void
+Staff_sym_register::process_requests()
+{
+ announce_element(Staff_elem_info(span_p_, 0));
+}
void
Staff_sym_register::pre_move_processing()
left_col_l_ = p1;
right_col_l_ = p2;
}
+
+Real
+Staff_symbol::inter_note_f()const
+{
+ return paper()->internote();
+}
+
+int
+Staff_symbol::steps_i() const
+{
+ return no_lines_i_*2;
+}
if (!stem_p_)
return;
- if (info.elem_p_->name() == Notehead::static_name() &&
- stem_req_l_->duration() == info.req_l_->rhythmic()->duration())
-
- stem_p_->add((Notehead*)info.elem_p_);
+ if (info.elem_l_->name() == Notehead::static_name() &&
+ stem_req_l_->duration() == info.req_l_->rhythmic()->duration()){
+ Notehead * n_l= (Notehead*)info.elem_l_;
+ if (!n_l->rest_b_)
+ stem_p_->add((Notehead*)info.elem_l_);
+ }
}
-
void
Stem_beam_register::pre_move_processing()
{
if (stem_p_) {
if (default_dir_i_)
- stem_p_->dir = default_dir_i_;
+ stem_p_->dir_i_ = default_dir_i_;
typeset_element(stem_p_);
stem_p_ = 0;
maxnote = -1000;
bot = top = 0;
flag = 4;
- dir =0;
+ dir_i_ =0;
staff_center=c;
stemlen=0;
print_flag=true;
{
// todo: margins
- if (! ((dir > 0 && se >= maxnote) || (se <= minnote && dir <0)) )
+ if (! ((dir_i_ > 0 && se >= maxnote) || (se <= minnote && dir_i_ <0)) )
warning("Weird stem size; check for narrow beams");
- top = (dir < 0) ? maxnote : se;
- bot = (dir < 0) ? se : minnote;
- flag = dir*abs(flag);
+ top = (dir_i_ < 0) ? maxnote : se;
+ bot = (dir_i_ < 0) ? se : minnote;
+ flag = dir_i_*abs(flag);
}
void
int
Stem::get_default_dir()
{
- if (dir)
- return dir;
+ if (dir_i_)
+ return dir_i_;
Real mean = (minnote+maxnote)/2;
return (mean > staff_center) ? -1: 1;
}
void
Stem::set_default_dir()
{
- dir = get_default_dir();
+ dir_i_ = get_default_dir();
}
void
Stem::set_default_stemlen()
{
- if (!dir)
+ if (!dir_i_)
set_default_dir();
int stafftop = 2*staff_center;
stemlen = STEMLEN + (maxnote - minnote);
// uhh... how about non 5-line staffs?
- if (maxnote < -2 && dir == 1){
+ if (maxnote < -2 && dir_i_ == 1){
int t = staff_center - staff_center/2;
stemlen = t - minnote +2;
- } else if (minnote > stafftop + 2 && dir == -1) {
+ } else if (minnote > stafftop + 2 && dir_i_ == -1) {
int t = staff_center + staff_center/2;
stemlen = maxnote -t +2;
}
if (!stemlen)
set_default_stemlen();
- set_stemend((dir< 0) ? maxnote-stemlen: minnote +stemlen);
- if (dir > 0){
+ set_stemend((dir_i_< 0) ? maxnote-stemlen: minnote +stemlen);
+ if (dir_i_ > 0){
stem_xoffset = paper()->note_width()-paper()->rule_thickness();
} else
stem_xoffset = 0;
Interval
-Stem::width()const
+Stem::do_width()const
{
if (!print_flag || abs(flag) <= 4)
return Interval(0,0); // TODO!
#include "molecule.hh"
#include "lookup.hh"
-Text_item::Text_item(Text_def *tdef_l, int staffsize_i)
+Text_item::Text_item(Text_def *tdef_l)
+ : Staff_side(this)
{
dir_i_ =-1;
- init(tdef_l, staffsize_i);
+ init(tdef_l);
}
Text_def*
}
void
-Text_item::init(Text_def *tdef_l, int staffsize_i)
+Text_item::init(Text_def *tdef_l)
{
- staffsize_i_ = staffsize_i;
tdef_p_ = new Text_def (*tdef_l);
}
-Text_item::Text_item(Text_req* treq_l, int staffsize_i)
+Text_item::Text_item(Text_req* treq_l)
+ : Staff_side(this)
{
- init(treq_l->tdef_p_, staffsize_i);
+ init(treq_l->tdef_p_);
dir_i_ = treq_l->dir_i_;
if (!dir_i_)
dir_i_ = -1;
void
Text_item::set_default_index()
{
- pos_i_ = (dir_i_ > 0) ? staffsize_i_ + 4: -4;
+ pos_i_ = get_position_i();
}
void
void
Text_register::process_requests()
{
-
if (text_req_l_) {
- text_p_ = new Text_item(text_req_l_, 10); // UGH
+ text_p_ = new Text_item(text_req_l_); // UGH
announce_element(Staff_elem_info(text_p_, text_req_l_));
}
}
{
if (text_p_) {
text_p_->dir_i_ = dir_i_;
+ Staff_symbol* s_l = get_staff_info().staff_sym_l_;
+ text_p_->set_staffsym(s_l);
typeset_element(text_p_);
+
text_p_ = 0;
}
}
void
Walker_registers::announce_element(Staff_elem_info info)
{
- if (info.elem_p_->name() == Bar::static_name()) {
+ if (info.elem_l_->name() == Bar::static_name()) {
walk_l_->allow_break();
}
announce_info_arr_.push(info);
Request dummy_req;
for (int i = 0; i < announce_info_arr_.size(); i++){
Staff_elem_info info = announce_info_arr_[i];
+ mtor << "Announcing " << info.elem_l_->name()<<"\n";
if (!info.req_l_)
info.req_l_ = &dummy_req;
INSTALL = @INSTALL@
USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@
-#CXX = @CXX@
+CXX = @CXX@
libdir = @libdir@
prefix = @prefix@
TEXPREFIX = @TEXPREFIX@
#
include ./$(depth)/make/out/Configure_variables.make
-# ugh, for win32 make
-# leave me up here, or i won-t work
-export CXX
-
ifeq (0,${MAKELEVEL})
MAKE:=$(MAKE) --no-builtin-rules
endif
-
# directory names:
#
outdir = out# "objects" won-t do, used for libs and deps as well