+++ /dev/null
-%{
-Converted from star.mup with the aid of mup-to-ly.py
-http://www.Arkkra.com/doc/star.html
-http://www.Arkkra.com/doc/star.ps
-%}
-\header{
-title="The Star Spangled Banner";
-subtitle="(The United States National Anthem)";
-poet="Text by Francis Scott Key";
-composer="J. S. Smith";
-arranger="Arranged by William J. Krauss";
-enteredby="jcn";
-copyright="public domain";
-}
-
-$staff1_voice_1 = \notes {
- [a8.()fis16] d4 fis4 a4 d'2 [fis'8. e'16] d'4 fis4 gis4 a2 [a8 a8] fis'4. e'8
- d'4 cis'2 [b8. cis'16] d'4 d'4 a4 fis4 d4 [a8. fis16] fis4 d4 [fis'8.
- fis'16] fis'4 g'4 a'4 a'2 [g'8 fis'8] e'4 fis'4 g'4 g'2 g'4 fis'4. e'8 d'4
- cis'2 [b8. cis'16] d'4 fis4 gis4 a2 a4 d'4 d'4 [d'8()cis'8] b4 b4 b4 e'4 [g'8
-()fis'8] [e'8()d'8] d'4~cis'4 [a8. a16] d'4.~e'8 [fis'8 g'8] a'2 [d'8 e'8]
- fis'4. g'8 e'4 d'2 s4 }
-
-$staff1_voice_2 = \notes {
- [a8.()fis16] a,4 d4 e4 d4~fis4 [fis8. fis16] fis4 d4 d4 cis2 [e8 e8] a4. a8
- a4 a2 [a8. a16] a4 a4 a4 fis4 d4 [a8. fis16] fis4 d4 r4 a4 a4 d'4 d'2
- [a8 a8] cis'4 cis'4 cis'4 cis'2 a4 a4. a8 a4 a2 [a8. a16] d4 d4 d4
- cis2 e4 fis4 e4 d4 d4 d4 dis4 g4 [g8()dis8] e4 e2 [e8. e16] d4.~a8 [a8 a8]
- a2 [g8 g8] a4. a8 g4 fis2 s4 }
-
-$staff2_voice_1 = \notes {
- r4 fis4 a4 a4 b2 [cis'8. cis'16] b4 b4 b4 a2 [cis'8 cis'8] d'4. cis'8
- d'4 e'2 [e'8. e'16] d'4 d'4 a4 fis4 d4 r4 fis4 d4 r4 d4 e4 fis4 fis'2
- [e'8 d'8] e'4 e'4 e'4 e'2 cis'4 d'4. cis'8 d'4 e'2 [e'8. e'16] a4 a4
- e4 e2 cis'4 a4 a4 a4 g4 g4 b4 b4 b4 b4 a2 [cis'8. cis'16] a4.~cis'8
- [d'8 d'8] d'2 [d'8 d'8] d'4. d'8 cis'4 a2 s4 }
-
-$staff2_voice_2 = \notes {
- r4 d4 d4 cis4 b,2 [ais,8. ais,16] b,4 b,4 e4 a,2 [a8 a8] d4. e8 [fis8 g8]
- a2 [g8. g16] fis4 fis4 a4 fis4 d4 r4 fis4 d4 r4 d4 d4 d4 d2 [d8 d8] a4
- a4 a4 a2 a,4 d4. e8 [fis8 g8] a2 [g8. g16] fis4 d4 e4 a,2 a4 d4 e4 fis4
- g4 g4 fis4 e4 [e8()fis8] [g8()gis8] a2 [g8. g16] fis4.~a,8 [d8 e8] fis2 [b8 b8]
- a4. a8 a,4 d2 s4 }
-
-$text1 = \lyrics{
- Oh4 say. can you see,2 by8. the16 dawn's4 ear- ly light2 What8 so8 proud-4. ly8 we4 hailed,2
- At8. the16 twi-4 light's last gleam- ing. Whose8. broad16
-}
-
-$text2 = \lyrics{
- _4 stripes and bright stars,2 through8 the8 per-4 il- ous fight,2 O'er8 the8 ram-4. parts8
- we4 watched,2 were8. so16 gal-4 lant- ly _ _ _
-}
-
-$text3 = \lyrics{
- stream-4 ing. And8. the16 rock-4 ets' red glare,2 the8 bombs8 burst-4 ing in air,2 gave4
- proof4. through8 the4 night2 that8. our16 flag4 was still there,2 Oh4 say, does that
- star- span- gled ban- ner yet wave,2 O'er8. the16 land2 of8 the8 free2 and8 the8
- home4. of8 the4 brave.2
-}
-
-global = \notes {
- \time 3/4;
- \key D;
- \partial 4;
- \skip 4;
- \bar "|:";
- \skip 2.*8;
- \bar ":|";
- \skip 2.*16;
- \skip 2.;
- \bar "|.";
- }
-
-\include "paper16.ly";
-
-\score{
- \type GrandStaff <
- \type Staff=staffA <
- % urg, ugly bug
- %\global
- \notes \transpose c'' \global
- \notes \transpose c'' {\voiceone \$staff1_voice_1 }
- \notes \transpose c'' {\voicetwo \$staff1_voice_2 }
- >
- \type Lyrics = one \lyrics <
-% urg, too much distance between two texts; fixme first
-% \$text1
-% { \$text2 \$text3 }
- { \$text1 \$text3 }
- >
- \type Staff=staffB <
- \global
- \clef bass;
- {\voiceone \$staff2_voice_1 }
- {\voicetwo \$staff2_voice_2 }
- >
- >
- \paper{
- \paper_sixteen;
- textheight = 230.\mm;
- linewidth= 180.\mm;
- \translator {
- \GrandStaffContext
- \accepts "Lyrics";
- }
- \translator {
- \BarNumberingStaffContext
- }
- }
-}
+++ /dev/null
-/*
- auto-plet-engraver.cc -- implement Auto_plet_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#include "auto-plet-engraver.hh"
-#include "command-request.hh"
-#include "plet-spanner.hh"
-#include "note-column.hh"
-
-bool
-Tuplet_engraver::do_try_request (Request *r)
-{
- if (Bracket_req * b = dynamic_cast <Bracket_req *> (r))
- {
- bracket_req_arr_.push (b);
- return true;
- }
- return false;
-}
-
-void
-Tuplet_engraver::do_process_requests ()
-{
- int stopcount =0;
- Link_array<Plet_spanner> start_arr;
-
- for (int i=0; i < bracket_req_arr_.size (); i++)
- {
- if (bracket_req_arr_[i]->spantype == Span_req::STOP)
- stopcount++;
- if (bracket_req_arr_[i]->spantype == Span_req::START)
- {
- Plet_spanner* glep = new Plet_spanner ();
- start_arr.push (glep);
-// lots of stuff does info->elem_l_->is_type ()
-// announce_element (Score_element_info (glep, bracket_req_arr_[i]));
- }
- }
-
- for (; stopcount--; )
- {
- Plet_spanner* glep = started_span_p_arr_.pop ();
- stop_now_span_p_arr_.push (glep);
- }
-
- for (int i=0; i < start_arr.size (); i++)
- started_span_p_arr_.push (start_arr.pop ());
-}
-
-void
-Tuplet_engraver::acknowledge_element (Score_element_info i)
-{
- if (Note_column *nc = dynamic_cast<Note_column *> (i.elem_l_))
- {
-
- for (int j =0; j <started_span_p_arr_.size (); j++)
- // started_span_p_arr_[j]->add_column (nc);
- ;
- }
-}
-
-void
-Tuplet_engraver::do_pre_move_processing ()
-{
- typeset_all ();
-}
-
-void
-Tuplet_engraver::typeset_all ()
-{
- for (int i=0; i < stop_now_span_p_arr_.size (); i++)
- {
- typeset_element (stop_now_span_p_arr_[i]);
- }
-
- stop_now_span_p_arr_.clear ();
-}
-
-void
-Tuplet_engraver::do_removal_processing ()
-{
- typeset_all ();
- for (int i=0; i < started_span_p_arr_.size (); i++)
- {
- typeset_element (started_span_p_arr_[i]);
- }
-}
-
-ADD_THIS_TRANSLATOR(Tuplet_engraver);
-IMPLEMENT_IS_TYPE_B1(Tuplet_engraver, Engraver);
-
-Tuplet_engraver::Tuplet_engraver()
-{
-}
-
-
-void
-Tuplet_engraver::do_post_move_processing ()
-{
- bracket_req_arr_.clear ();
-}
+++ /dev/null
-/*
- auto-plet-engraver.hh -- declare Auto_plet_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#ifndef AUTO_PLET_ENGRAVER_HH
-#define AUTO_PLET_ENGRAVER_HH
-
-#include "engraver.hh"
-
-class Tuplet_engraver : public Engraver
-{
- void typeset_all ();
-public:
- Tuplet_engraver ();
- DECLARE_MY_RUNTIME_TYPEINFO;
- TRANSLATOR_CLONE(Tuplet_engraver);
-
-protected:
- Link_array<Bracket_req> bracket_req_arr_;
-
- Link_array<Plet_spanner> started_span_p_arr_;
- Link_array<Plet_spanner> stop_now_span_p_arr_;
-
- virtual void do_removal_processing ();
- virtual void acknowledge_element (Score_element_info);
- virtual void do_pre_move_processing ();
- virtual bool do_try_request (Request*r);
- virtual void do_process_requests ();
- virtual void do_post_move_processing ();
-};
-
-
-
-#endif /* AUTO_PLET_ENGRAVER_HH */
+++ /dev/null
-/*
- plet-spanner.hh -- part of GNU LilyPond
-
- (c) 1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef PLET_SPANNER_HH
-#define PLET_SPANNER_HH
-
-#include "bow.hh"
-
-/** supportable plet: triplets, eentweetjes, ottava, etc. */
-
-class Plet_spanner : public Bow
-{
-public:
-
- Plet_spanner ();
- virtual ~Plet_spanner ();
-
- void set_stem (Direction, Stem*);
-
- Text_def* tdef_p_;
- Drul_array<Stem *> stem_l_drul_;
- int visibility_i_;
-
-protected:
- virtual Molecule* brew_molecule_p () const;
-
- DECLARE_MY_RUNTIME_TYPEINFO;
- SCORE_ELEMENT_CLONE(Plet_spanner);
-
- virtual void do_add_processing ();
- virtual void do_post_processing ();
- virtual void set_default_dir ();
- virtual void do_substitute_dependency (Score_element*,Score_element*);
- Plet_spanner (Plet_spanner const&);
-};
-
-#endif // PLET_SPANNER_HH
-
+++ /dev/null
-/*
- plet-spanner.cc -- implement Plet_spanner
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "atom.hh"
-#include "box.hh"
-#include "debug.hh"
-#include "lookup.hh"
-#include "molecule.hh"
-#include "p-col.hh"
-#include "paper-def.hh"
-#include "plet-spanner.hh"
-#include "stem.hh"
-#include "text-def.hh"
-
-
-/*
- UHGUGH THIS IS BROKEN! do not derive from Bow
- */
-IMPLEMENT_IS_TYPE_B1 (Plet_spanner,Bow);
-
-Plet_spanner::Plet_spanner ()
- : Bow ()
-{
- stem_l_drul_[RIGHT] =0;
- stem_l_drul_[LEFT] =0;
- visibility_i_ = 3;
-
- tdef_p_ = new Text_def;
- tdef_p_->align_dir_ = CENTER;
- tdef_p_->style_str_ = "italic";
-}
-
-Plet_spanner::Plet_spanner (Plet_spanner const& c)
- : Bow (c)
-{
- tdef_p_ = new Text_def (*c.tdef_p_);
- stem_l_drul_ = c.stem_l_drul_;
- visibility_i_ = c.visibility_i_;
-}
-
-Plet_spanner::~Plet_spanner ()
-{
- delete tdef_p_;
-}
-
-Molecule*
-Plet_spanner::brew_molecule_p () const
-{
- Molecule* mol_p = new Molecule;
-
- Real w = width ().length ();
-
- Real dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
-
- w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
-
- Atom a = lookup_l ()->plet (dy_f, w, dir_);
-
- a.translate (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]));
-
- if (visibility_i_ >= 2)
- mol_p->add_atom (a);
-
- Real interline_f = paper ()->interline_f ();
- Real numy_f = (dir_ > 0 ? 0 : -interline_f) + dir_ * interline_f / 2;
- Atom num (tdef_p_->get_atom (paper (), CENTER));
- num.translate (Offset (width ().length () / 1.8 + dx_f_drul_[LEFT],
- dy_f_drul_[LEFT] + dy_f / 2 + numy_f));
-
- if (visibility_i_ >= 1)
- mol_p->add_atom (num);
-
- return mol_p;
-}
-
-void
-Plet_spanner::do_add_processing ()
-{
- if (! (stem_l_drul_[LEFT] && stem_l_drul_[RIGHT]))
- warning (_ ("lonely plet"));
-
- Direction d = LEFT;
- Drul_array<Stem *> new_stem_drul = stem_l_drul_;
- do {
- if (!stem_l_drul_[d])
- new_stem_drul[d] = stem_l_drul_[(Direction)-d];
- } while (flip(&d) != LEFT);
- stem_l_drul_ = new_stem_drul;
-}
-
-void
-Plet_spanner::do_post_processing ()
-{
- Real interline_f = paper ()->interline_f ();
- Real nh_f = interline_f / 2;
- assert (stem_l_drul_[LEFT] || stem_l_drul_[RIGHT]);
-
- // ugh
- Real nw_f = paper ()->note_width () * 0.8;
-
- Direction d = LEFT;
- do
- {
- Stem* s = stem_l_drul_[d] ? stem_l_drul_[d] : stem_l_drul_[(Direction)-d];
-
- dy_f_drul_[d] = dir_ == s->get_dir () ? s->stem_end_f ()
- : s->stem_begin_f () + dir_ * nh_f / 2;
- dy_f_drul_[d] *= .5 * interline_f;
- dy_f_drul_[d] += dir_ * interline_f;
- if (d == RIGHT)
- dx_f_drul_[d] = nw_f;
- }
- while (flip(&d) != LEFT);
- do {
- if (stem_l_drul_[d]->empty_b ())
- {
- Direction u = d;
- flip (&u);
- dy_f_drul_[d] = dy_f_drul_[u]; // ughugh \[/3 r8 c8 r8 \]/1
- }
- }
- while (flip(&d) != LEFT);
-}
-
-void
-Plet_spanner::do_substitute_dependency (Score_element* o, Score_element* n)
-{
- Stem* new_l = n ? dynamic_cast<Stem *> (n) : 0;
- if (dynamic_cast <Item *> (o) == stem_l_drul_[LEFT])
- stem_l_drul_[LEFT] = new_l;
- else if (dynamic_cast <Item *> (o) == stem_l_drul_[RIGHT])
- stem_l_drul_[RIGHT] = new_l;
-}
-
-void
-Plet_spanner::set_default_dir ()
-{
- Real m = (stem_l_drul_[LEFT]->stem_end_f ()
- + stem_l_drul_[RIGHT]->stem_end_f ()) / 2;
- dir_ = (m < 0) ? DOWN : UP;
-}
-
-void
-Plet_spanner::set_stem (Direction d, Stem* stem_l)
-{
- assert (!stem_l_drul_[d]);
- stem_l_drul_[d] = stem_l;
- set_bounds (d, stem_l);
-
- add_dependency (stem_l);
-}
-