</a
>
+=head2 NEWS!
+
+This is what the latest version brings:
+
+top_of_NEWS
+
=head2 Documentation: Introduction
=over 4
=item Musictex, http://www.gmd.de/Misc/Music/
MusicTeX is a macro package for TeX to typeset polyphonic or
-instrumental music. It was written by Daniel Taupin. Now obsoleted
-by MusiXTeX and OpusTeX.
+instrumental music. It was originally written by Daniel Taupin.
It includes a full-featured set of fonts.
=item MusiXTeX, http://www.gmd.de/Misc/Music/
-Newer version of MusicTeX. It also contains contributions by Ross
-Mitchell and Andreas Egler. Daniel Taupin's branch still carries this
-name.
+A rewrite of MusicTeX, originally by Ross Mitchell and Andreas Egler.
+After quarrels, MusiXTeX has been split into two branches:
+
+=item MusiXTeX, http://www.gmd.de/Misc/Music/
+
+Daniel Taupin's now maintains the branch that still carries
+the name MusiXTeX.
=item OpusTeX, http://www.inf.ethz.ch/people/achermann/opustex
-Andreas Egler's branch of MusiXTeX.
+Andreas Egler's branch is called MusiXTeX.
=item ABC2MTeX, http://www.gre.ac.uk/~c.walshaw/abc
+pl 15
+ - put top of NEWS file in the webpage
+ - breadth first search for engravers.
+ - bf: coriolan-alto.ly
+ - Stem / Notehead width now properly calced
+ - Atom and Symbol merged
+
pl 14.jcn1
- - lily's own music bolletjes (font-en-tja*.mf)
- - {table,paper}* and taupindefs adaptions (when are we moving?)
+ - lily's own noteheads (balls/globes :) (font-en-tja*.mf)
+ - {table,paper}* and taupindefs adaptations (when are we moving?)
- fp, sf, sfz dynamics
- font.ly
- bf: dist mudela-mode
+*******
+sep 15
+
pl 14
- Simple but nifty mudela-mode.el for Emacs
- slightly better syntax for single-note-repeat, now default kept in
Most of the items are marked in the code as well, with full explanation.
grep for TODO and ugh/ugr
+ - naming Mozarella, Madeira, Muella, Fontaigna?
+
- bf: abbrevs over whole note
+ - scoping for properties
+
+ { \multi 2 < { \stemup .. } { \stemdown .. } >
+ c2 }
+
+ this modifies \stem for the c2
+
* use properties for:
- Text_style
- default_octave
- cadenza mode?
- MIDI instrument
- staff title
-
+
* check out egcs
-
+
* give Items/Spanners access to unbroken originals
3RD PARTY BUGS:
\score { <
\melodic \type Staff { c'4 g'4 }
- \lyric { \id "Lyric" ""; hello4 bye4 < a chord > }
- \lyric { \id "Lyric" ""; bye4 hello4 }
+ \lyric { \id "Lyric" ""; hello4 bye4 < a chord > }
+ \lyric { \id "Lyric" ""; bye4 hello4 }
\melodic { \id "Staff" ""; c'4 g'4 }
> }
(which is at Voice_gravs level)
- make encapsulated spacing problems.
- * On-demand loading of simple-engravers
+ * On-demand loading of simple-engravers?
* accidentals per Voice_group
* A range for context errors (eg. mark both { and }. )
- * merge Atom and Symbol
-
* lyric in staff (sharpsharp in staff, text below)
* write Dynamic_line (to group dynamics horizontally)
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 14
+TOPLEVEL_PATCH_LEVEL = 15
# use to send patches, always empty for released version:
-TOPLEVEL_MY_PATCH_LEVEL = .jcn1
+TOPLEVEL_MY_PATCH_LEVEL =
if (! $f =~ /.txt$/) {
$d = "$f.txt";
}
- print $f, $d;
+ print, $d;
}
+sub top_of_NEWS
+{
+ open NEWS, "NEWS.txt";
+ input_record_separator NEWS "****";
+ $desc = <NEWS>;
+ chop ($desc);
+ close NEWS;
+
+ return $desc;
+}
+
+sub edit_index
+{
+ $ton = top_of_NEWS();
+ $ton = "\n<XMP>\n$ton\n</XMP>\n";
+ open INDEX, "index.html";
+ input_record_separator NEWS undef;
+ $index = <INDEX>;
+ close INDEX;
+ $index =~ s/top_of_NEWS/$ton/;
+ open INDEX, ">index.html";
+ print INDEX $index;
+ close INDEX;
+}
+
+
sub copy_files
{
print "copying files\n";
gen_html;
copy_files;
+
if (! $opt_noexamples) {
gen_examples;
gen_list;
set_images;
edit_html;
+ edit_index;
docxx_update;
do_tar;
}
"tenor_change" "\caltoclef" 0.0\pt 11.2\pt 0.0\pt 16.0\pt
}
- % dimens are ignored?
"balls" = \table {
"-2" "\longaball" 0.0\pt 6.0\pt -2.0\pt 2.0\pt
"-1" "\breveball" 0.0\pt 6.0\pt -2.0\pt 2.0\pt
\version "0.1.6";
-alto = \melodic{
-
+alto1 = \melodic{
\meter 4/4;
\key bes es as;
\clef "alto";
% these are chords (i.e. non-divisi)
-
-%30
- <
- { \octave c ;
+ { \octave c ;
- [ c8 c-. ] c2.( |
+ [ c8 c8-. ] c2.( |
%31
- [ ) c8 c-. ] c2.( |
+ [ ) c8 c8-. ] c2.( |
%32
- [ ) c8 c-. ] c4. c-. c4( |
+ [ ) c8 c8-. ] c4. c8-. c4( |
%33
- [ ) c8 c-. ] c4. c-. c4
- \group "+bla";
- \stemup[ c16^"div." c16 c16 c16 ] c4 c2
- \group "-";
- }
+ [ ) c8 c8-. ] c4. c8-. c4 |
+
+ %% divisi
+ \type Voice="altodivisi1" {\stemup c4:16 ^"div." c4: c2: }
+ \stemboth
+ }
%30:2
- {
- \octave 'c ;
- \textstyle "italic";
- % this should be a \dynamic, rather than text
- [ c c_"cresc. \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
- - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
- - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
- - \ \ \ \ - \ \ \ \ -" ] c2.( |
- \textstyle "roman";
+}
+
+alto2 = \melodic{
+ \octave 'c ;
+ \textstyle "italic";
+ % this should be a \dynamic, rather than text
+ [ c8 c8_"cresc. \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
+ - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
+ - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
+ - \ \ \ \ - \ \ \ \ -" ] c2.( |
+ \textstyle "roman";
%31:2
- [ ) c8 c-. ] c2.( |
+ [ ) c8 c-. ] c2.( |
%32:2
- [ ) c8 c-. ] c4. c-. c4( |
+ [ ) c8 c-. ] c4. c8-. c4( |
%33:2
- [ ) c8 c-. ] c4. c-. c4 |
- \octave c ;
+ [ ) c8 c-. ] c4. c8-. c4 |
+ \octave c ;
%34
- \group "+b";
- % these are two \voices (i.e. divisi)
- % the c4 and c2, however are really 16th...
- % we-ll say "simile" for now...
+ % these are two \voices (i.e. divisi)
+ % the c4 and c2, however are really 16th...
+ % we-ll say "simile" for now...
%
- \octave 'c ;
- \textstyle "italic";
- \stemdown
- [ as16 \ff as16 as16 as16 ] as4_"simile" as2
- \textstyle "roman";
- \group "-";
- }
- >
-
+ \octave 'c ;
+ \type Voice="altodivisi2" {
+ \stemdown
+ as4: as4: as2}
+ \stemboth
}
\score{
- \staff{ melodicregs alto }
+ \type Voice < \alto1 \alto2 >
\paper{
- \unitspace 14\mm
- \geometric 1.4
}
}
c2 g c' a'
c4 g c' a'
a\ppp a\pp a\p a\mp a\mf a\f a\ff a\fff
- a\fp a\sf a\sfz
+ %a\fp a\sf a\sfz
}
\paper{
\paper_twenty
[snip]
-Here comes a sample score where I've tried to fiddle around with different
-spacing parameters to get a decent layout, but it still looks quite strange.
-For example is the second half of the bar more spread out than the first
-half in many cases.
Hopefully it could be useful input to future improvements. I've entered the
music directly from the 1637 manuscript and intend to publish it public
domain on for example ftp.gmd.de when finished. You could include it as an
\multi 2 <
{\stemup a4~ d'4 cis'4-. }
{ \stemdown f2 e4 } > |
+ \stemboth
%%12
< [ g'8^"4" d8 > f' e' f' d'^"3"~ c' ] |
%%13
{ \stemup bes2 c'4 }
{ \stemdown g4~ f4 e4 }% ugh
> |
+ \stemboth
%%14
< [ a8 f8 > g8 a8 f8 ] < d'4-\upbow e4 'bes4 > |
%%15
{\stemup d'4( \stemup )cis'4 d'4 }
{ \stemdown g2 f4 }
> |
+ \stemboth
%%22
< { [ g8 ~ f8 g8 e8 ] } cis8 > < f4 d4 > |
%%23
MAJOR_VERSION = 0
MINOR_VERSION = 1
-PATCH_LEVEL = 14
+PATCH_LEVEL = 15
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
#include "abbreviation-beam.hh"
#include "misc.hh"
#include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "molecule.hh"
#include "leastsquares.hh"
#include "stem.hh"
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-#include "symbol.hh"
+#include "atom.hh"
#include "tex.hh"
#include "interval.hh"
#include "dimen.hh"
Atom::print() const
{
#ifndef NPRINT
- DOUT << "texstring: " <<sym_.tex<<"\n";
+ DOUT << "texstring: " <<tex_<<"\n";
#endif
}
Box
Atom::extent() const
{
- Box b (sym_.dim);
+ Box b (dim_);
b.translate (off_);
return b;
}
-Atom::Atom (Symbol s)
+
+Atom::Atom()
+ : dim_ (Interval (0,0),Interval (0,0))
+{
+ tex_ = "\\unknown";
+}
+
+Atom::Atom (String s, Box b)
+ : dim_ (b)
{
- sym_=s;
+ tex_ = s;
}
+String
+Atom::str() const
+{
+ return "Atom (\'"+tex_+"\', (" + dim_.x().str () + ", "
+ + dim_.y ().str () + "))";
+}
+
String
Atom::TeX_string() const
{
- String tex_str = sym_.tex;
+ String tex_str = tex_;
Offset off = off_;
/* infinity checks. */
Bar::brew_molecule_p() const
{
Paper_def *p = paper();
- Symbol s = p->lookup_l()->bar (type_str_,
+ Atom s = p->lookup_l()->bar (type_str_,
p->get_var ("bar_size"));
Molecule*output = new Molecule (Atom (s));
return output;
#include "abbreviation-beam.hh"
#include "misc.hh"
#include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "molecule.hh"
#include "leastsquares.hh"
#include "stem.hh"
int lhalfs= lhalfs = here->beams_left_i_ - prev->beams_right_i_ ;
int lwholebeams= here->beams_left_i_ <? prev->beams_right_i_ ;
Real w = (here->hpos_f () - prev->hpos_f ())/4;
- Symbol dummy;
- Atom a (dummy);
+ Atom a;
if (lhalfs) // generates warnings if not
a = paper()->lookup_l ()->beam (sl, w);
a.translate (Offset (-w, -w * sl));
w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]) * nw_f ;
Real round_w = w; // slur lookup rounds the slurwidth .
- Symbol sl = paper()->lookup_l ()->slur (dy , round_w, dir_);
+ Atom a = paper()->lookup_l ()->slur (dy , round_w, dir_);
Real error = w-round_w;
-
- Atom a (sl);
- a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
+ a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
pos_i_drul_[LEFT] * nh_f));
output->add (a);
return output;
String t = type_;
if (change_b_)
t += "_change";
- Symbol s = paper()->lookup_l ()->clef (t);
+ Atom s = paper()->lookup_l ()->clef (t);
Molecule*output = new Molecule (Atom (s));
output->translate (paper()->internote_f () * y_off, Y_AXIS);
return output;
Interval
Crescendo::symbol_height() const
{
- return get_symbol().dim[Y_AXIS];
+ return get_symbol().dim_[Y_AXIS];
}
static Real absdyn_dim = 10 PT; // ugh
-Symbol
+Atom
Crescendo::get_symbol() const
{
Real w_dim = width().length ();
w_dim = 0;
}
- return Symbol (paper()->lookup_l ()->hairpin (w_dim, grow_dir_ < 0));
+ return Atom (paper()->lookup_l ()->hairpin (w_dim, grow_dir_ < 0));
}
Molecule*
x_off_dim += absdyn_dim;
m_p = new Molecule;
- Symbol s (get_symbol());
+ Atom s (get_symbol());
m_p->add (Atom (s));
m_p->translate (Offset (x_off_dim, pos_i_ * paper()->internote_f ()));
return m_p;
Molecule*
Dots::brew_molecule_p () const
{
- Symbol d = paper ()->lookup_l ()->dots (no_dots_i_);
+ Atom d = paper ()->lookup_l ()->dots (no_dots_i_);
Molecule *out = new Molecule (Atom (d));
Real inter_f = paper ()->internote_f ();
out->translate (inter_f * position_i_, Y_AXIS);
{
Text_def * td_p = new Text_def;
td_p->align_i_ = 0;
- String loud =Dynamic_req::loudness_str (
- dreq_l->absdynamic()->loudness_);
-
- td_p->text_str_ = paper()->lookup_l ()->dynamic (loud).tex;
+ String loud = dreq_l->absdynamic()->loudness_str ();
+ td_p->text_str_ = paper()->lookup_l ()->dynamic (loud).tex_;
td_p->style_str_ = "dynamic";
assert (!dynamic_p_) ; // TODO
#include "general-script-def.hh"
#include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
Direction
General_script_def::staff_dir() const
{
Atom
General_script_def::get_atom (Paper_def*, Direction) const
{
- Symbol s;
+ Atom s;
return Atom (s);
}
Array<Col_hpositions> lines;
- Real max_energy_f = 0;
-
/* skip 0-th element, since it is a "dummy" elt*/
for (int i = optimal_paths.size()-1; i> 0;)
{
--- /dev/null
+/*
+ atom.hh -- declare Atom
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#ifndef ATOM_HH
+#define ATOM_HH
+
+#include "string.hh"
+#include "boxes.hh"
+#include "lily-proto.hh"
+
+
+/// a symbol which can be translated, and freely copied
+struct Atom {
+ String tex_;
+ Box dim_;
+ Offset off_;
+
+ String str() const; // for printing.
+ Atom (String, Box);
+ Atom ();
+ void translate (Offset o) {
+ off_ += o;
+ }
+ void translate (Real r,Axis a){
+ off_[a] += r;
+ }
+ /// how big is #this#?
+ Box extent() const;
+ void print() const;
+ String TeX_string() const;
+};
+#endif
DECLARE_MY_RUNTIME_TYPEINFO;
private:
- Symbol get_symbol() const;
+ Atom get_symbol() const;
};
#endif // CRESCENDO_HH
struct Stem_req;
struct String;
struct Subtle_req;
-struct Symbol;
+struct Atom;
struct Symtable;
struct Symtables;
struct Super_elem;
#ifndef LOOKUPSYMS_HH
#define LOOKUPSYMS_HH
-#include "symbol.hh"
+#include "atom.hh"
#include "fproto.hh"
#include "scalar.hh"
#include "direction.hh"
-/// intuitive interface to symbol table
+/** handy interface to symbol table
+ */
struct Lookup {
Paper_def * paper_l_;
Symtables *symtables_;
void add (String, Symtable*);
void print() const;
- Symbol linestaff (int n, Real w) const;
- Symbol fill (Box b) const;
- Symbol beam_element (int,int,Real=0) const;
+ Atom linestaff (int n, Real w) const;
+ Atom fill (Box b) const;
+ Atom beam_element (int,int,Real=0) const;
/// round slope to closest TeXslope
- Symbol beam (Real&,Real) const;
+ Atom beam (Real&,Real) const;
/**
pos == 3 : 3 lines above staff (extending below note)
pos == -3: below staff
*/
- Symbol streepjes (int pos) const;
+ Atom streepjes (int pos) const;
- Symbol vbrace (Real &dy) const;
- Symbol meter (Array<Scalar>) const;
- Symbol stem (Real y1_pos, Real y2_pos) const;
- Symbol rule_symbol (Real height, Real width) const;
- Symbol accidental (int) const;
- Symbol ball (int) const;
- Symbol flag (int, Direction) const;
- Symbol rest (int, bool outside) const;
- Symbol clef (String) const;
- Symbol bar (String, Real height) const;
+ Atom vbrace (Real &dy) const;
+ Atom meter (Array<Scalar>) const;
+ Atom stem (Real y1_pos, Real y2_pos) const;
+ Atom rule_symbol (Real height, Real width) const;
+ Atom accidental (int) const;
+ Atom ball (int) const;
+ Atom flag (int, Direction) const;
+ Atom rest (int, bool outside) const;
+ Atom clef (String) const;
+ Atom bar (String, Real height) const;
- Symbol dots (int) const;
- Symbol slur (int dy, Real &dx, Direction dir) const;
- Symbol half_slur (int dy, Real &dx, Direction dir, int xpart) const;
- Symbol half_slur_middlepart (Real &dx, Direction dir) const;
- Symbol big_slur (int dy, Real &dx, Direction dir) const;
- Symbol text (String style, String text, int align = 1) const;
- Symbol script (String idx) const;
- Symbol hairpin (Real & width, bool decresc) const;
- Symbol dynamic (String) const;
+ Atom dots (int) const;
+ Atom slur (int dy, Real &dx, Direction dir) const;
+ Atom half_slur (int dy, Real &dx, Direction dir, int xpart) const;
+ Atom half_slur_middlepart (Real &dx, Direction dir) const;
+ Atom big_slur (int dy, Real &dx, Direction dir) const;
+ Atom text (String style, String text, int align = 1) const;
+ Atom script (String idx) const;
+ Atom hairpin (Real & width, bool decresc) const;
+ Atom dynamic (String) const;
Lookup();
Lookup (Lookup const &);
~Lookup();
class Dynamic_req : public virtual Musical_req {
public:
- /// for absolute dynamics
+ /**
+ for absolute dynamics
+
+ This sux. We'd want increasing numbers for FFF till PPP, but not
+ for FP, SF, SFZ (FP is *not* louder than FFF)
+ */
enum Loudness {
FFF, FF, F, MF, MP, P, PP, PPP, FP, SF, SFZ
};
- static String loudness_str (Loudness);
+ static String loudness_static_str (Loudness);
REQUESTMETHODS(Dynamic_req, dynamic);
};
class Absolute_dynamic_req : public Dynamic_req {
public:
Loudness loudness_;
+ String loudness_str () const;
Absolute_dynamic_req();
REQUESTMETHODS(Absolute_dynamic_req, absdynamic);
};
Note_head ();
static int compare (Note_head * const &a, Note_head *const &b) ;
protected:
+ virtual Interval do_width () const;
virtual void do_pre_processing();
virtual Molecule* brew_molecule_p() const;
};
/// thickness of the standard line
Real rule_thickness() const;
- Real whole_width() const;
Real linewidth_f() const;
/// height of the staff
Real standard_height() const;
virtual void do_substitute_dependency (Score_elem*,Score_elem*);
virtual Molecule * brew_molecule_p() const;
- virtual Symbol get_bar_sym (Real dy) const;
+ virtual Atom get_bar_sym (Real dy) const;
};
#endif // SPAN_BAR_HH
SCORE_ELEM_CLONE(Piano_brace);
protected:
virtual Interval do_width() const;
- virtual Symbol get_bar_sym (Real) const;
+ virtual Atom get_bar_sym (Real) const;
};
#endif // SPAN_SCORE_BAR_HH
Molecule abbrev_mol () const;
- Real stem_bottom_f_, stem_top_f_;
+ Drul_array<Real> yextent_drul_;
/// needed for determining direction/length
int staff_size_i_;
geen gedonder, jij gaat onder.
-1 stem points down, +1: stem points up
*/
- Real stem_xoffset_f_;
+ Direction stem_xdir_;
Link_array<Note_head> head_l_arr_;
Link_array<Rest> rest_l_arr_;
Real stem_length_f() const;
Real stem_end_f() const;
Real stem_start_f() const;
+ Real note_delta_f () const;
bool invisible_b() const;
-/*
- symbol.hh -- declare Symbol, Atom
- source file of the GNU LilyPond music typesetter
-
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#ifndef SYMBOL_HH
-#define SYMBOL_HH
-
-#include "string.hh"
-#include "boxes.hh"
-#include "lily-proto.hh"
-
-struct Symbol {
- String tex;
- Box dim;
-
- Symbol (String, Box);
- Symbol();
- String str() const; // for printing.
-};
-
-
-/// a symbol which can be translated, and freely copied
-struct Atom {
- Offset off_;
- Symbol sym_;
-
- /* *************** */
-
- void translate (Offset o) {
- off_ += o;
- }
- void translate (Real r,Axis a){
- off_[a] += r;
- }
- /// how big is #this#?
- Box extent() const;
- Atom (Symbol s);
-
- void print() const;
-
- String TeX_string() const;
-};
-#endif
+#error
/*
- lilypond, (c) 1996,97 Han-Wen Nienhuys
+ symtable.hh -- declare
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
+
+
#ifndef SYMTABLE_HH
#define SYMTABLE_HH
+
#include "dictionary.hh"
#include "string.hh"
-#include "symbol.hh"
+#include "atom.hh"
-struct Symtable : public Dictionary<Symbol> {
+struct Symtable : public Dictionary<Atom> {
String id_str;
- Symbol lookup (String) const;
+ Atom lookup (String) const;
void print() const;
};
const Array<int> &idx_arr =key_grav_r.accidental_idx_arr_;
for (int i = 0 ; i< idx_arr.size(); i++)
{
- int note = idx_arr[i];
- int acc = ((Key &) key_grav_r.key_).oct (0).acc (note);
+ int note = idx_arr[i];
+ int acc = ((Key &) key_grav_r.key_).oct (0).acc (note);
- add (note, acc);
+ add (note, acc);
}
}
{
if ((a<0 && p>FLAT_TOP_PITCH) ||
(a>0 && p>SHARP_TOP_PITCH))
- {
- p -= 7; /* Typeset below c_position */
+ {
+ p -= 7; /* Typeset below c_position */
}
pitch.push (p);
acc.push (a);
for (int i =0; i < pitch.size(); i++)
{
- Symbol s= paper()->lookup_l ()->accidental (acc[i]);
- Atom a (s);
- a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
- Molecule m (a);
- output->add_at_edge (X_AXIS, RIGHT, m);
+ Atom a =paper()->lookup_l ()->accidental (acc[i]);
+ a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
+ Molecule m (a);
+ output->add_at_edge (X_AXIS, RIGHT, m);
}
if (pitch.size())
{
- Molecule m (paper()->lookup_l ()->fill (Box (
- Interval (0, paper()->note_width ()),
- Interval (0,0))));
+ Molecule m (paper()->lookup_l ()->fill (Box (
+ Interval (0, paper()->note_width ()),
+ Interval (0,0))));
- output->add_at_edge (X_AXIS, RIGHT, m);
+ output->add_at_edge (X_AXIS, RIGHT, m);
}
return output;
}
{
if (default_b_)
{
- transparent_b_ = (break_status_i() != 1);
- set_empty (transparent_b_);
+ transparent_b_ = (break_status_i() != 1);
+ set_empty (transparent_b_);
}
}
octmol= new Molecule;
}
lastoct = accs[i].octave_i_;
- Symbol s =paper()->lookup_l ()->accidental (accs[i].accidental_i_);
- Atom a (s);
+
Real dy = (accs[i].name_i_ + c0_position) * paper()->internote_f ();
+ Atom a (paper()->lookup_l ()->accidental (accs[i].accidental_i_));
a.translate (dy, Y_AXIS);
-
- octmol->add_at_edge (X_AXIS, RIGHT, a);
+ Molecule m(a);
+ octmol->add_at_edge (X_AXIS, RIGHT, m);
}
if (octmol)
#endif
}
-Symbol
+Atom
Lookup::text (String style, String text, int dir) const
{
Array<String> a;
a.push (text);
- Symbol tsym = (*symtables_)("style")->lookup (style);
- a[0] = substitute_args (tsym.tex,a);
+ Atom tsym = (*symtables_)("style")->lookup (style);
+ a[0] = substitute_args (tsym.tex_,a);
- Symbol s = (*symtables_)("align")->lookup (dir);
- s.tex = substitute_args (s.tex,a);
- s.dim = tsym.dim;
+ Atom s = (*symtables_)("align")->lookup (dir);
+ s.tex_ = substitute_args (s.tex_,a);
+ s.dim_ = tsym.dim_;
return s;
}
-Symbol
+Atom
Lookup::ball (int j) const
{
if (j > 2)
return st->lookup (String (j));
}
-Symbol
+Atom
Lookup::rest (int j, bool o) const
{
return (*symtables_)("rests")->lookup (String (j) + (o ? "o" : ""));
}
-Symbol
+Atom
Lookup::fill (Box b) const
{
- Symbol s ((*symtables_)("param")->lookup ("fill"));
- s.dim = b;
+ Atom s ((*symtables_)("param")->lookup ("fill"));
+ s.dim_ = b;
return s;
}
-Symbol
+Atom
Lookup::accidental (int j) const
{
return (*symtables_)("accidentals")->lookup (String (j));
}
-Symbol
+Atom
Lookup::bar (String s, Real h) const
{
Array<String> a;
a.push (print_dimen (h));
- Symbol ret=(*symtables_)("bars")->lookup (s);;
- ret.tex = substitute_args (ret.tex, a);
- ret.dim.y() = Interval (0, h);
+ Atom ret=(*symtables_)("bars")->lookup (s);;
+ ret.tex_ = substitute_args (ret.tex_, a);
+ ret.dim_.y() = Interval (0, h);
return ret;
}
-Symbol
+Atom
Lookup::script (String s) const
{
return (*symtables_)("scripts")->lookup (s);
}
-Symbol
+Atom
Lookup::dynamic (String s) const
{
return (*symtables_)("dynamics")->lookup (s);
}
-Symbol
+Atom
Lookup::clef (String s) const
{
return (*symtables_)("clefs")->lookup (s);
}
-Symbol
+Atom
Lookup::dots (int j) const
{
if (j>3)
return (*symtables_)("dots")->lookup (j);
}
-Symbol
+Atom
Lookup::flag (int j, Direction d) const
{
char c = (d == UP) ? 'u' : 'd';
return (*symtables_)("flags")->lookup (c + String (j));
}
-Symbol
+Atom
Lookup::streepjes (int i) const
{
assert (i);
arg = i;
idx = "toplines";
}
- Symbol ret = (*symtables_)("streepjes")->lookup (idx);
+ Atom ret = (*symtables_)("streepjes")->lookup (idx);
Array<String> a;
a.push (arg);
- ret.tex = substitute_args (ret.tex, a);
+ ret.tex_ = substitute_args (ret.tex_, a);
return ret;
}
-Symbol
+Atom
Lookup::hairpin (Real &wid, bool decresc) const
{
int idx = int (rint (wid / 6 PT));
if (!idx) idx ++;
wid = idx*6 PT;
String idxstr = (decresc)? "decrescendosym" : "crescendosym";
- Symbol ret=(*symtables_)("param")->lookup (idxstr);
+ Atom ret=(*symtables_)("param")->lookup (idxstr);
Array<String> a;
a.push (idx);
- ret.tex = substitute_args (ret.tex, a);
- ret.dim.x() = Interval (0,wid);
+ ret.tex_ = substitute_args (ret.tex_, a);
+ ret.dim_.x() = Interval (0,wid);
return ret;
}
-Symbol
+Atom
Lookup::linestaff (int lines, Real wid) const
{
Real internote_f = paper_l_ ->internote_f();
- Symbol s;
+ Atom s;
Real dy = (lines >0) ? (lines-1)*internote_f : 0;
- s.dim = Box (Interval (0,wid), Interval (0,dy));
+ s.dim_ = Box (Interval (0,wid), Interval (0,dy));
Array<String> a;
a.push (lines);
a.push (print_dimen (wid));
- s.tex = (*symtables_)("param")->lookup ("linestaf").tex;
- s.tex = substitute_args (s.tex, a);
+ s.tex_ = (*symtables_)("param")->lookup ("linestaf").tex_;
+ s.tex_ = substitute_args (s.tex_, a);
return s;
}
-Symbol
+Atom
Lookup::meter (Array<Scalar> a) const
{
- Symbol s;
- s.dim.x() = Interval (0 PT, 10 PT);
- s.dim.y() = Interval (0, 20 PT); // todo
- String src = (*symtables_)("param")->lookup ("meter").tex;
- s.tex = substitute_args (src,a);
+ Atom s;
+ s.dim_.x() = Interval (0 PT, 10 PT);
+ s.dim_.y() = Interval (0, 20 PT); // todo
+ String src = (*symtables_)("param")->lookup ("meter").tex_;
+ s.tex_ = substitute_args (src,a);
return s;
}
-Symbol
+Atom
Lookup::stem (Real y1,Real y2) const
{
if (y1 > y2)
y1 = y2;
y2 = t;
}
- Symbol s;
+ Atom s;
- s.dim.x() = Interval (0,0);
- s.dim.y() = Interval (y1,y2);
+ s.dim_.x() = Interval (0,0);
+ s.dim_.y() = Interval (y1,y2);
Array<String> a;
a.push (print_dimen (y1));
a.push (print_dimen (y2));
- String src = (*symtables_)("param")->lookup ("stem").tex;
- s.tex = substitute_args (src,a);
+ String src = (*symtables_)("param")->lookup ("stem").tex_;
+ s.tex_ = substitute_args (src,a);
return s;
}
/*
- should be handled via TeX code and Lookup::bar()
+ should be handled via Tex_ code and Lookup::bar()
*/
-Symbol
+Atom
Lookup::vbrace (Real &y) const
{
if (y < 2* 20 PT)
int idx = int (rint ((y/2.0 - 20) + 148));
- Symbol s = (*symtables_)("param")->lookup ("brace");
+ Atom s = (*symtables_)("param")->lookup ("brace");
{
Array<String> a;
a.push (idx);
- s.tex = substitute_args (s.tex,a);
- s.dim.y() = Interval (0,y);
+ s.tex_ = substitute_args (s.tex_,a);
+ s.dim_.y() = Interval (0,y);
}
{
Array<String> a;
a.push (print_dimen (y/2));
a.push (print_dimen (0));
- a.push (s.tex);
- s.tex = substitute_args ("\\placebox{%}{%}{%}", a);
+ a.push (s.tex_);
+ s.tex_ = substitute_args ("\\placebox{%}{%}{%}", a);
}
Molecule*
Meter::brew_molecule_p() const
{
- Symbol s = paper()->lookup_l ()->meter (args);
+ Atom s = paper()->lookup_l ()->meter (args);
return new Molecule (Atom (s));
}
#include "dimen.hh"
#include "string.hh"
#include "molecule.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "debug.hh"
#include "tex.hh"
{
#ifndef NPRINT
Dynamic_req::do_print();
- DOUT << " loudness " <<loudness_str (loudness_);
+ DOUT << " loudness " <<loudness_str ();
#endif
}
String
-Dynamic_req::loudness_str (Loudness l)
+Dynamic_req::loudness_static_str (Loudness l)
{
switch (l)
{
- case FFF: return "fff";
- case FF: return "ff";
- case F: return "f";
- case MF: return "mf";
- case MP: return "mp";
- case P: return "p";
- case PP: return "pp";
- case PPP: return "ppp";
-
- case FP: return "fp";
- case SF: return "sf";
- case SFZ: return "sfz";
+ case FFF: return "fff";
+ case FF: return "ff";
+ case F: return "f";
+ case MF: return "mf";
+ case MP: return "mp";
+ case P: return "p";
+ case PP: return "pp";
+ case PPP: return "ppp";
+ case FP: return "fp";
+ case SF: return "sf";
+ case SFZ: return "sfz";
}
- assert (false);
return "";
}
+String
+Absolute_dynamic_req::loudness_str () const
+{
+ String s = loudness_static_str (loudness_);
+ if (!s)
+ {
+ s = "mf";
+ warning (String ("Never heard of dynamic scale ")
+ + loudness_ + " assuming mf");
+ }
+ return s;
+}
+
+
Absolute_dynamic_req::Absolute_dynamic_req()
{
loudness_ = MF;
get_script_req (int d , General_script_def*def)
{
Musical_script_req* script_req_p = new Musical_script_req;
- script_req_p->dir_ =d;
+ script_req_p->dir_ =(Direction)d;
script_req_p->scriptdef_p_=def;
return script_req_p;
}
return a->position_i_ - b->position_i_;
}
+Interval
+Note_head::do_width () const
+{
+ Atom a = paper ()->lookup_l()->ball (balltype_i_);
+ Interval i = a.dim_[X_AXIS];
+ i+= x_dir_ * i.length ();
+ return i;
+}
+
Molecule*
Note_head::brew_molecule_p() const
{
// ugh
bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
- Symbol s = p->lookup_l()->ball (balltype_i_);
+ Atom s = p->lookup_l()->ball (balltype_i_);
out = new Molecule (Atom (s));
- out->translate (x_dir_ * s.dim.x().length (), X_AXIS);
+ out->translate (x_dir_ * s.dim_[X_AXIS].length (), X_AXIS);
if (streepjes_b)
{
? -((-position_i_)/2)
: (position_i_-staff_size_i_)/2;
- Symbol str = p->lookup_l()->streepjes (s);
+ Atom str = p->lookup_l()->streepjes (s);
Molecule sm;
sm.add (Atom (str));
if (position_i_ % 2)
General_script_def * script;
Scalar *scalar;
String *string;
- Symbol * symbol;
+ Atom * symbol;
Symtable * symtable;
Symtables * symtables;
Text_def * textdef;
symboldef:
STRING box {
- $$ = new Symbol (*$1, *$2);
+ $$ = new Atom (*$1, *$2);
delete $1;
delete $2;
}
| STRING {
Box b (Interval (0,0), Interval (0,0));
- $$ = new Symbol (*$1, b);
+ $$ = new Atom (*$1, b);
delete $1;
}
;
int staff_size_i_ =8;
bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
- Symbol s(paper ()->lookup_l()->rest (balltype_i_, streepjes_b));
+ Atom s(paper ()->lookup_l()->rest (balltype_i_, streepjes_b));
Molecule * m = new Molecule ( Atom (s));
m->translate (position_i_ * paper ()->internote_f (), Y_AXIS);
return m;
remove_us_arr.uniq();
for (int i=0; i <remove_us_arr.size(); i++)
remove_dependency (remove_us_arr[i]);
-
- // status_i_= BROKEN;
}
/*
for (int i=0; i < old_arr.size(); i++)
if (old_arr[i])
substitute_dependency (old_arr[i], new_arr[i]);
-
-
- // status_i_= PREBROKEN;
}
#include "scoreline.hh"
#include "dimen.hh"
#include "spanner.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "paper-def.hh"
#include "p-col.hh"
#include "p-score.hh"
#include "debug.hh"
#include "script-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "paper-def.hh"
#include "lookup.hh"
#include "dimen.hh"
#include "span-bar.hh"
#include "lookup.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "paper-def.hh"
#include "molecule.hh"
#include "vertical-align-elem.hh"
Interval
Span_bar::do_width() const
{
- return paper()->lookup_l ()->bar (type_str_, 40 PT).dim.x (); // ugh
+ return paper()->lookup_l ()->bar (type_str_, 40 PT).dim_.x (); // ugh
}
+
void
Span_bar::do_pre_processing()
{
}
}
-Symbol
+Atom
Span_bar::get_bar_sym (Real dy) const
{
return paper()->lookup_l ()->bar (type_str_, dy);
y_int.unite (y + spanning_l_arr_[i]->height());
}
- Symbol s = get_bar_sym (y_int.length());
+ Atom s = get_bar_sym (y_int.length());
Molecule*output = new Molecule (Atom (s));
output->translate (y_int[-1], Y_AXIS);
return output;
*/
#include "span-score-bar.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "paper-def.hh"
#include "lookup.hh"
}
-Symbol
+Atom
Piano_brace::get_bar_sym (Real dy) const
{
return paper()->lookup_l ()->vbrace (dy);
#include "dimen.hh"
#include "misc.hh"
#include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "stem.hh"
#include "paper-def.hh"
#include "lookup.hh"
beams_left_i_ = 0;
beams_right_i_ = 0;
- stem_bottom_f_ = stem_top_f_ = 0;
+ yextent_drul_[DOWN] = yextent_drul_[UP] = 0;
flag_i_ = 2;
dir_ = CENTER;
+ stem_xdir_ = LEFT;
staff_size_i_ = 8;
- stem_xoffset_f_ =0;
beam_gap_i_ = 0;
}
Real
Stem::stem_length_f () const
{
- return stem_top_f_-stem_bottom_f_ ;
+ return yextent_drul_[UP]-yextent_drul_[DOWN] ;
}
Real
Stem::stem_start_f () const
{
- return (dir_ < 0)? stem_top_f_ : stem_bottom_f_;
+ return (dir_ < 0)? yextent_drul_[UP] : yextent_drul_[DOWN];
}
Real
Stem::stem_end_f () const
{
- return (dir_ < 0)? stem_bottom_f_ : stem_top_f_;
+ return (dir_ < 0)? yextent_drul_[DOWN] : yextent_drul_[UP];
}
(se <= min_head_i () && dir_ <0)))
warning ("Weird stem size; check for narrow beams");
- stem_top_f_ = (dir_ < 0) ? max_head_i () : se;
- stem_bottom_f_ = (dir_ < 0) ? se : min_head_i ();
+ yextent_drul_[UP] = (dir_ < 0) ? max_head_i () : se;
+ yextent_drul_[DOWN] = (dir_ < 0) ? se : min_head_i ();
}
int
set_stemend ((dir_< 0) ?
max_head_i ()-stem_length_f (): min_head_i () + stem_length_f ());
- // ugh, a whole ball is wider
+
+ if (dir_ == UP)
+ stem_xdir_ = RIGHT;
if (head_l_arr_[0]->balltype_i_ <= 0)
- stem_xoffset_f_ = paper ()->note_width () / 2;
- else if (dir_ > 0)
- stem_xoffset_f_ = paper ()->note_width () - paper ()->rule_thickness ();
- else
- stem_xoffset_f_ = 0;
+ stem_xdir_ = CENTER;
}
/*
if (dy <= 1)
{
if (parity)
- head_l_arr_[i]->x_dir_ = (stem_xoffset_f_>0) ? UP:DOWN;
+ head_l_arr_[i]->x_dir_ = (stem_xdir_ == LEFT) ? LEFT : RIGHT;
parity = !parity;
}
else
void
Stem::do_pre_processing ()
{
- if (stem_bottom_f_== stem_top_f_)
+ if (yextent_drul_[DOWN]== yextent_drul_[UP])
set_default_extents ();
set_noteheads ();
flag_i_ = flag_i_;
else
{
Paper_def*p= paper ();
- r = p->lookup_l ()->flag (flag_i_, dir_).dim.x ();
- r+= stem_xoffset_f_;
+ r = p->lookup_l ()->flag (flag_i_, dir_).dim_.x ();
+ r += note_delta_f ();
}
return r;
}
Molecule
- Stem::abbrev_mol () const
+Stem::abbrev_mol () const
{
Real dy = paper ()->interbeam_f ();
- Real w = 1.5 * paper ()->lookup_l ()->ball (2).dim.x ().length ();
+ Real w = 1.5 * paper ()->lookup_l ()->ball (2).dim_.x ().length ();
Real beamdy = paper ()->interline_f () / 2;
int beams_i = 0;
{
Molecule *mol_p =new Molecule;
- Real bot = stem_bottom_f_;
- Real top = stem_top_f_;
+ Real bot = yextent_drul_[DOWN];
+ Real top = yextent_drul_[UP];
assert (bot!=top);
Real dy = p->internote_f ();
if (!invisible_b ())
{
- Symbol ss =p->lookup_l ()->stem (bot*dy,top*dy);
+ Atom ss =p->lookup_l ()->stem (bot*dy,top*dy);
mol_p->add (Atom (ss));
}
if (!beam_l_ &&abs (flag_i_) > 2)
{
- Symbol fl = p->lookup_l ()->flag (flag_i_, dir_);
+ Atom fl = p->lookup_l ()->flag (flag_i_, dir_);
mol_p->add_at_edge (Y_AXIS, dir_, Molecule (Atom (fl)));
assert (!abbrev_flag_i_);
}
if (abbrev_flag_i_)
mol_p->add (abbrev_mol ());
-
- mol_p->translate (stem_xoffset_f_, X_AXIS);
+
+ if (head_l_arr_.size())
+ {
+ mol_p->translate (note_delta_f (), X_AXIS);
+ }
return mol_p;
}
+Real
+Stem::note_delta_f () const
+{
+ Real r=0;
+ if (head_l_arr_.size())
+ {
+ r += head_l_arr_[0]->width ().length() * (stem_xdir_+1.0)/2.0;
+ if (stem_xdir_ == RIGHT)
+ r -= paper ()->rule_thickness ();
+ }
+ return r;
+}
Real
- Stem::hpos_f () const
+Stem::hpos_f () const
{
- return Item::hpos_f () + stem_xoffset_f_;
+ return note_delta_f () +Item::hpos_f ();
}
+++ /dev/null
-#include "symbol.hh"
-#include "varray.hh"
-
-
-Symbol::Symbol()
- : dim (Interval (0,0),Interval (0,0))
-{
- tex = "\\unknown";
-}
-Symbol::Symbol (String s, Box b)
- : dim (b)
-{
- tex = s;
-}
-
-
-String
-Symbol::str() const
-{
- return "symbol (\'"+tex+"\', (" + dim.x().str () + ", " + dim.y ().str () + "))";
-}
#include "dimen.hh"
#include "debug.hh"
#include "real.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "assoc.hh"
#include "assoc-iter.hh"
#include "symtable.hh"
}
}
-Symbol
+Atom
Symtable::lookup (String s) const
{
if (elt_b (s))
else
{
warning ("Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n");
- Symbol sy;
+ Atom sy;
return sy;
}
}
void
Symtable::print() const
{
- for (Assoc_iter<String, Symbol> i (*this); i.ok(); i++)
+ for (Assoc_iter<String, Atom> i (*this); i.ok(); i++)
{
DOUT << "\'" << i.key() << "\'->" << i.val ().str () << "\n";
}
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-#include "symbol.hh"
+#include "atom.hh"
#include "molecule.hh"
#include "plist.tcc"
#include "pcursor.tcc"
*/
#include <math.h>
-#include "symbol.hh"
+#include "atom.hh"
#include "molecule.hh"
#include "tex.hh"
#include "symtable.hh"
#include "debug.hh"
#include "lookup.hh"
-Symbol
+Atom
Lookup::beam_element (int sidx, int widx, Real slope) const
{
- Symbol bs=(*symtables_)("beamslopes")->lookup ("slope");
+ Atom bs=(*symtables_)("beamslopes")->lookup ("slope");
Array<String> args;
args.push (sidx);
args.push (widx);
- bs.tex = substitute_args (bs.tex,args);
+ bs.tex_ = substitute_args (bs.tex_,args);
int w = 2 << widx;
Real width = w PT;
- bs.dim.x() = Interval (0,width);
- bs.dim.y() = Interval (0,width*slope);
+ bs.dim_.x() = Interval (0,width);
+ bs.dim_.y() = Interval (0,width*slope);
return bs;
}
return -6 * i+ 186;
}
-Symbol
+Atom
Lookup::rule_symbol (Real height, Real width) const
{
- Symbol bs=(*symtables_)("beamslopes")->lookup ("horizontal");
+ Atom bs=(*symtables_)("beamslopes")->lookup ("horizontal");
Array<String> args;
args.push (print_dimen (height));
args.push (print_dimen (width));
- bs.tex = substitute_args (bs.tex,args);
- bs.dim.x() = Interval (0,width);
- bs.dim.y() = Interval (0,height);
+ bs.tex_ = substitute_args (bs.tex_,args);
+ bs.dim_.x() = Interval (0,width);
+ bs.dim_.y() = Interval (0,height);
return bs;
}
-Symbol
+Atom
Lookup::beam (Real &slope, Real width) const
{
int sidx = slope_index (slope);
a.translate (Offset (last_x, (last_x) * slope));
m.add (a);
- Symbol ret;
- ret.tex = m.TeX_string();
- ret.dim.y() = Interval (0,width*slope);
- ret.dim.x() = Interval (0,width);
+ Atom ret;
+ ret.tex_ = m.TeX_string();
+ ret.dim_.y() = Interval (0,width*slope);
+ ret.dim_.x() = Interval (0,width);
return ret;
}
return c;
}
-Symbol
+Atom
Lookup::half_slur_middlepart (Real &dx, Direction dir) const
{
// todo
WARN << "slur too narrow\n";
}
- Symbol s;
+ Atom s;
- s.dim.y() = Interval (min (0,0), max (0,0)); // todo
- s.dim.x() = Interval (0,dx);
+ s.dim_.y() = Interval (min (0,0), max (0,0)); // todo
+ s.dim_.x() = Interval (0,dx);
String f = String ("\\hslurchar");
f += direction_char (CENTER);
assert (idx < 256);
- f+=String ("{") + String (idx) + "}";
- s.tex = f;
- Atom a (s);
- a.translate (dx/2, X_AXIS);
- s.tex = a.TeX_string();
+ f +=String ("{") + String (idx) + "}";
+ s.tex_ = f;
+ s.translate (dx/2, X_AXIS);
return s;
}
-Symbol
+Atom
Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
{
Real orig_dx = dx;
WARN << "slur too narrow " << print_dimen (orig_dx)<<"\n";
}
- Symbol s;
- s.dim.x() = Interval (0,dx);
- s.dim.y() = Interval (min (0,dy), max (0,dy));
+ Atom s;
+ s.dim_.x() = Interval (0,dx);
+ s.dim_.y() = Interval (min (0,dy), max (0,dy));
String f = String ("\\hslurchar");
f+=String ("{") + String (idx) + "}";
- s.tex = f;
+ s.tex_ = f;
return s;
}
-Symbol
+Atom
Lookup::slur (int dy , Real &dx, Direction dir) const
{
WARN<<"slur to steep: " << dy << " shrinking (ugh)\n";
}
- Symbol s;
- s.dim.x() = Interval (0,dx);
- s.dim.y() = Interval (min (0,dy), max (0,dy));
+ Atom s;
+ s.dim_.x() = Interval (-dx/2,dx/2);
+ s.dim_.y() = Interval (min (0,dy), max (0,dy));
String f = String ("\\slurchar") + String (direction_char (y_sign));
assert (idx < 256);
f+=String ("{") + String (idx) + "}";
- s.tex = f;
+ s.tex_ = f;
+
- Atom a (s);
- a.translate (dx/2, X_AXIS);
- s.dim = a.extent();
- s.tex = a.TeX_string();
+ s.translate (dx/2, X_AXIS);
return s;
}
-Symbol
+Atom
Lookup::big_slur (int dy , Real &dx, Direction dir) const
{
if (dx < 24 PT)
Atom r = half_slur (r_dy, right_wid, dir, 1);
Real mid_wid = dx - left_wid - right_wid;
- Atom m = half_slur (0, mid_wid, dir, 0);
-
Molecule mol;
mol.add (l);
- Atom a (m);
+ Atom a (half_slur (0, mid_wid, dir, 0));
a.translate (slur_extra * internote_f, Y_AXIS);
- mol.add_at_edge (X_AXIS, RIGHT, m);
+ mol.add_at_edge (X_AXIS, RIGHT, a);
mol.add_at_edge (X_AXIS, RIGHT, r);
mol.translate (l_dy * internote_f, Y_AXIS);
- Symbol s;
- s.tex = mol.TeX_string();
- s.dim = mol.extent();
+
+ Atom s;
+ s.tex_ = mol.TeX_string();
+ s.dim_ = mol.extent();
return s;
}
#include "dimen.hh"
#include "tex.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "varray.hh"
String
{
Atom a = get_atom (p,CENTER);
- Real guess_width_f = text_str_.length_i() * a.sym_.dim.x ().length (); // ugh
+ Real guess_width_f = text_str_.length_i() * a.dim_.x ().length (); // ugh
Interval i (0, guess_width_f);
i += - (align_i_ + 1)* i.center();
return i;
Interval
Text_item::symbol_height() const
{
- return tdef_p_->get_atom (paper(), dir_).sym_.dim.y ();
+ return tdef_p_->get_atom (paper(), dir_).dim_.y ();
}
Molecule*
#include "text-def.hh"
#include "debug.hh"
#include "paper-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
void
Link_array<Translator_group>
Translator_group::path_to_acceptable_translator (String type) const
{
- Link_array<Translator_group> retval;
-
- if (type_str_ == type)
- {
- retval.push (output_def_l ()->find_translator_l (type)->group_l ());
- }
- else for (int i=0; i < accepts_str_arr_.size (); i++)
+ Link_array<Translator_group> accepted_arr;
+ for (int i=0; i < accepts_str_arr_.size (); i++)
{
Translator *t = output_def_l ()->find_translator_l (accepts_str_arr_[i]);
if (!t || !t->group_l ())
continue;
-
- Translator_group * g = t->group_l ();
+ accepted_arr.push (t->group_l());
+ }
+
+
+ for (int i=0; i < accepted_arr.size (); i++)
+ if (accepted_arr[i]->type_str_ == type)
+ {
+ Link_array<Translator_group> retval;
+ retval.push (accepted_arr[i]);
+ return retval;
+ }
+
+ Link_array<Translator_group> best_result;
+ int best_depth= INT_MAX;
+ for (int i=0; i < accepted_arr.size (); i++)
+ {
+ Translator_group * g = accepted_arr[i];
Link_array<Translator_group> result
= g->path_to_acceptable_translator (type);
- if (result.size ())
+ if (result.size () && result.size () < best_depth)
{
- retval.push (output_def_l ()->find_translator_l (type_str_)->group_l ());
- retval.concat (result);
- break;
+ result.insert (g,0);
+ best_result = result;
}
}
- return retval;
+ return best_result;
}
Translator_group*
Link_array<Translator_group> path = path_to_acceptable_translator (n);
- /*
- if path.size () == 1, then
- type_str_ == n, but not id == id_str_
- */
- if (path.size () > 1)
+ if (path.size ())
{
- assert (path.size () > 1);
Translator_group * current = this;
// start at 1. The first one (index 0) will be us.
- for (int i=1; i < path.size (); i++)
+ for (int i=0; i < path.size (); i++)
{
Translator_group * new_group = path[i]->clone ()->group_l ();
current->add (new_group);
Begin3
Title: LilyPond
-Version: 0.1.14
-Entered-date: 14SEP97
+Version: 0.1.15
+Entered-date: 17SEP97
Description: LilyPond is the GNU Project music typesetter. This
program converts music definition files into
visual or auditive output: it can typeset formatted
jan@digicash.com (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps
- 395k lilypond-0.1.14.tar.gz
+ 395k lilypond-0.1.15.tar.gz
Original-site: pcnov095.win.tue.nl /pub/lilypond/
- 395k lilypond-0.1.14.tar.gz
+ 395k lilypond-0.1.15.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 0.1.14
+Version: 0.1.15
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.14.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.15.tar.gz
Summary: A preprocessor to make TeX typeset music.
URL: http://www.stack.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@stack.nl>
make -C Documentation gifs
make prefix="$RPM_BUILD_ROOT/usr" install
%files
-%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/internals.text Documentation/out/language.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/literature.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/mutopia.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README
-%doc input/abbrev.ly input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/gallina.ly input/gallina.tex input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen-16.tex input/standchen-20.tex input/standchen.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wtk1-fugue1.ly input/wtk1-fugue2.ly input/wtk1-prelude1.ly Documentation/mudela-course.doc Documentation/mudela-man.doc
+%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/internals.text Documentation/out/language.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/literature.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/mutopia.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README
+%doc input/abbrev.ly input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/font.ly input/gallina.ly input/gallina.tex input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen-16.tex input/standchen-20.tex input/standchen.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wtk1-fugue1.ly input/wtk1-fugue2.ly input/wtk1-prelude1.ly Documentation/mudela-course.doc Documentation/mudela-man.doc
%doc Documentation/out/lelie_logo.gif
/usr/bin/convert-mudela
/usr/bin/mudela-book
make -C Documentation gifs
make prefix="$RPM_BUILD_ROOT/usr" install
%files
-%doc @TEXT_DOCS@
+%doc @TEXT_DOCS@
%doc @EXAMPLE_LYS@
%doc Documentation/out/lelie_logo.gif
/usr/bin/convert-mudela