README_TOP_FILES=NEWS DEDICATION TODO ANNOUNCE-0.1 AIMS
INFO_FILES = $(wildcard $(outdir)/$(package).info*)
-EXTRA_DIST_FILES = gnu-music-history TODO
+
BLURBS=BLURB COPERTINA FLAPTEKST
sect(Goal)
-Provide musicians with free software for
-itemize(
-it()composing
-it()engraving
-it()playing
-it()sequencing
-it()interchanging music
-it()arranging
-it()performing
-it()Metacomposing
-)
-
-These systems should encourage laymen to take up composing, in the
-same way that GNU tools have created a whole new generation of
-programmers.
The public deserves free tools for composing and printing.
sect(Repeats)
+
+OUTDATED. FIXME
+
In order to specify repeats, use the code(\repeat) keyword. By
default, repeats are printed with repeat symbols.
mudela(fragment,verbatim,center)(
dit(code(barNonAuto)) If set to 1 then bar lines will not be printed
automatically; they must be explicitly created with code(\bar) keywords.
-dit(code(unfoldRepeats)) If set to 1 then repeats will be unfolded.
-Otherwise, they will be printed using repeat symbols.
-
dit(code(defaultClef)) Determines the default clef. See code(\clef)
keyword.
attribute whose value is the direction to use for stems. You can
change it to `up' by issuing the following phrase:
verb(
- \property "Voice"."ydirection" = "1"
+ \property "Voice"."verticalDirection" = "1"
)
This command should be read as ``change the property called
-code(ydirection) within the current code(Voice) context to the value
-code(-1).'' For the property code(ydirection) the value code(1) means
+code(verticalDirection) within the current code(Voice) context to the value
+code(-1).'' For the property code(verticalDirection) the value code(1) means
`up', and code(-1) means `down'. So, the
proper way to code the polyphonic example is given in
bind(Figure)ref(tutorial:multi-voice-fig).
mudela(fragment,verbatim,center)(
\context "Staff" <
\context "Voice" = "one" {
- \property Voice.ydirection = "1"
+ \property Voice.verticalDirection = "1"
r4 as'4 () as'4 g'4 }
\context "Voice" = "two" {
- \property Voice.ydirection = "-1"
+ \property Voice.verticalDirection = "-1"
g'2 f'4 e'4 }
>
)
meaning of a code(\property).
mudela(verbatim)(
-stemup = \property Voice.ydirection = "1"
-stemdown = \property Voice.ydirection = "-1"
+stemup = \property Voice.verticalDirection = "1"
+stemdown = \property Voice.verticalDirection = "-1"
shift = \property Voice.hshift = "1"
\score {
\context "Staff" \notes <
hardcoded into the language and they have to be terminated by
semicolons.
-
sect(Sound output)
label(tutorial:sound)
--- /dev/null
+Call for Volunteers -- The Mutopia project seeks YOUR help.
+
+
+WHAT IS MUTOPIA?
+
+Mutopia is an archive of public domain music, free for all to
+download, modify and redistribute. It should be based on free
+software. It is similar in spirit to the gutenberg archive.
+
+
+
+WHAT NEEDS TO BE DONE
+
+- write legal faq documents
+
+- setup submission guidelines,
+
+- acquire mutopia.org domain.
+
+- setup FTP server
+
+- cooperate with ABC folks, ftp.gmd.de
+
+
+
+WHO DO WE NEED
+
+Volunteers that want to setup and maintain a website and FTP site.
+
+Volunteers with enough legal knowledge to write submission guidelines.
+
+A project leader.
+
+
+
+WHO ARE WE?
+
+We are Han-Wen Nienhuys and Jan Nieuwenhuizen. We are working on the
+GNU project music typesetter, a program that does for sheet music what
+TeX does for text. We would like to help start this mutopia project.
+Unfortunately, maintaining and extending LilyPond does not leave us
+enough time to take up the task of setting up Mutopia
+
+
+Signed
+
+Han-Wen Nienhys
+Jan Nieuwenhuizen
+
+[other bigwigs?]
piece = "1. Overture";
}
-\version "1.0.19";
+\version "1.0.20";
global=\notes{
\time 2/2;
-\version "1.0.19";
+\version "1.0.20";
scales = \notes\transpose c''{
f2 f f f f f f f f f\break
-\version "1.0.19";
+\version "1.0.20";
one = \notes\relative c{
c'' d e f
}
}
-\version "1.0.18";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
blah = \notes {
Tested Features: example file with comments
%}
-\version "1.0.19";
+\version "1.0.20";
% the % is a comment.
-\version "1.0.19";
+\version "1.0.20";
part = \notes {
c-1 c c c
r1*3
% \lbheel \lbheel \lfheel \lftoe
% \rbheel \rbtoe \rfheel \rftoe
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes {
* organ staff...
%}
-\version "1.0.19";
+\version "1.0.20";
\translator {
\VoiceContext
\name "VoiceOne";
- ydirection = "1";
+ verticalDirection = "1";
}
\translator {
\VoiceContext
\name "VoiceTwo";
- ydirection = "-1";
+ verticalDirection = "-1";
}
\translator {
\VoiceContext
\name "VoiceThree";
- ydirection = "1";
+ verticalDirection = "1";
hshift = "1";
}
\translator {
\VoiceContext
\name "VoiceFour";
- ydirection = "-1";
+ verticalDirection = "-1";
hshift = "1";
}
\translator {
-\version "1.0.19";
+\version "1.0.20";
ritme = \notes\transpose c'' {
\time 4/4;
% scales with accents.
%
-\version "1.0.19";
+\version "1.0.20";
blah = \notes {
\time 6/8;
\transpose c {
-\version "1.0.19";
+\version "1.0.20";
blah = \notes{ \transpose c'' {
}
-\version "1.0.18";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes \transpose c'''{
\stemup
}
}
-\version "1.0.19";
+\version "1.0.20";
}}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
onestaff = \context Staff = foo\notes {
\property Staff.instr = instr
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes\transpose c'{
}
}
-\version "1.0.19";
+\version "1.0.20";
}
}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes\transpose c''{
TestedFeatures = "beams and beamflags";
}
-\version "1.0.19";
+\version "1.0.20";
\score{
<
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.19";
+\version "1.0.20";
shortlong = \notes{
c4()c( c c |
>
}
-\version "1.0.19";
+\version "1.0.20";
}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
%{
Would this be acceptable/good enough/convenient for entry?
-\version "1.0.19";
+\version "1.0.20";
\score {
\notes{
copyright = "public domain";
Tested = "test the Collision resolution ";
}
-\version "1.0.19";
+\version "1.0.20";
twovoice = \context Staff \notes <
\context Voice=i { \stemdown c4 d e f g2~ g4 a [c8 d e f] c2| }
-\version "1.0.19";
+\version "1.0.20";
\score {
\include "paper20.ly"
-\version "1.0.19";
+\version "1.0.20";
oden = \lyrics{
O8 |
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes{
>
}
-\version "1.0.19";
+\version "1.0.20";
}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes \relative c {
-\version "1.0.19";
+\version "1.0.20";
FontBody= \notes\transpose c''{
\bar "|:";
% "(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.19";
+\version "1.0.20";
\include "font-body.ly"
\score{
% "(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.19";
+\version "1.0.20";
\include "paper16.ly"
\include "font-body.ly"
gourlay_maxmeasures =5.;
}
}
-\version "1.0.19";
+\version "1.0.20";
TestedFeatures = "This file tests some nasty Gourlay spacings";
}
-\version "1.0.19";
+\version "1.0.20";
%{
-\version "1.0.19";
+\version "1.0.20";
\score{
<
-\version "1.0.19";
+\version "1.0.20";
toeter_i = \notes\relative c <{
\property Staff.instrument = "Toeters"
/Mats B
%}
-\version "1.0.19";
+\version "1.0.20";
incipit = \notes\relative c'{
<b1 fis' b d>
-\version "1.0.19";
+\version "1.0.20";
%{
test key itemv breaking
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes\relative c'{
[c16 \stemdown c'' \stemboth c,, d]
-\version "1.0.19";
+\version "1.0.20";
global = \notes {
s1 | \mark "A";
>
\paper { Gourlay_maxmeaures = 2.; }
}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
voice_one = \notes\transpose c''{ \stemup
R1 * 2 | f'4-. r r2 | R1 * 3 |
\context ThreadedVoice <
\context Thread = TA
{ \property Thread.noteHeadStyle = "cross"
- \property ThreadedVoice.ydirection = \up c16}
+ \property ThreadedVoice.verticalDirection = \up c16}
\context Thread = TB
{ \property Thread.noteHeadStyle = "" a16 }
}
}
}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes \transpose c''{
-\version "1.0.19";
+\version "1.0.20";
m = \notes \relative c''{
c1 | c2 c | c c | c c | c c | c c | c c | c c |
-\version "1.0.19";
+\version "1.0.20";
\score {
}
}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
onestaff = \context Staff = foo\notes {
\property Staff.instr = instr
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.19";
+\version "1.0.20";
shortlong = \notes{
c4()c( c c |
-\version "1.0.19";
+\version "1.0.20";
% bug
% excentric slur can't handle this ...
% test damping
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes\relative c'{
}
}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
% urg, the direction of the slur gets swapped!
\score{
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes\transpose c'{
\notes \relative c''
\context GrandStaff <
\context Staff = SA <
- \context Voice = VA { \property Voice.ydirection= 1
+ \context Voice = VA { \property Voice.verticalDirection= 1
e4 dis4 e2 }
- \context Voice = VB { \property Voice.ydirection= -1
+ \context Voice = VB { \property Voice.verticalDirection= -1
[cis8 a] [fis b] gis2 }
{\key e; }
>
}
>
-\paper
-{
-}
\paper
{
% linewidth = 5.0 \cm; % ly2dvi barfs on -1
linewidth = 8.0 \cm;
+% linewidth = 12.0 \cm;
}
}
-\version "1.0.19";
+\version "1.0.20";
TestedFeatures = "This file tests various spacings";
}
-\version "1.0.19";
+\version "1.0.20";
multipart = \notes \relative c'{
\context StaffGroup <
- \context Staff = one {
+ \context Staff = one \context Voice {
c4
c
c c
}
- \context Staff = two {
+ \context Staff = two \context Voice {
[c8 c]
[c c]
[c c] [c c]
}
- \context Staff = three {
+ \context Staff = three \context Voice {
\times 2/3 { [c8 c c] }
\times 2/3 { [c c c] }
- \times 2/3 { [c c c] } \times 2/3 { [c c c] }
+ \times 2/3 { [c c c] }
+ \times 2/3 { [c c c] }
}
- \context Staff = four {
+ \context Staff = four \context Voice {
\times 2/4 { [c8 c c c] }
\times 2/4 { [c c c c] }
\times 2/4 { [c c c c] } \times 2/4 { [c c c c] }
}
- \context Staff = five {
+ \context Staff = five \context Voice {
\times 2/5 { [c8 c c c c] }
\times 2/5 { [c c c c c] }
\times 2/5 { [c c c c c] } \times 2/5 { [c c c c c] }
}
- \context Staff = six {
+ \context Staff = six \context Voice {
\times 2/6 { [c8 c c c c c] }
\times 2/6 { [c c c c c c] }
\times 2/6 { [c c c c c c] } \times 2/6 { [c c c c c c] }
}
- \context Staff = seven {
+ \context Staff = seven \context Voice {
\times 2/7 { [c8 c c c c c c] }
\times 2/7 { [c c c c c c c] }
\times 2/7 { [c c c c c c c] }
\times 2/7 { [c c c c c c c] }
}
- \context Staff = eight {
+ \context Staff = eight \context Voice {
\times 2/8 { [c8 c c c c c c c] }
\times 2/8 { [c c c c c c c c] }
\times 2/8 { [c c c c c c c c] }
\times 2/8 { [c c c c c c c c] }
}
- \context Staff = nine {
+ \context Staff = nine \context Voice {
\times 2/9 { [c8 c c c c c c c c] }
\times 2/9 { [c c c c c c c c c] }
\times 2/9 { [c c c c c c c c c] }
\times 2/9 { [c c c c c c c c c] }
}
- \context Staff = ten {
+ \context Staff = ten \context Voice {
\times 2/10 { [c8 c c c c c c c c c] }
\times 2/10 { [c c c c c c c c c c] }
\times 2/10 { [c c c c c c c c c c] }
\times 2/10 { [c c c c c c c c c c] }
}
- \context Staff = eleven {
+ \context Staff = eleven \context Voice {
\times 2/11 { [c8 c c c c c c c c c c] }
\times 2/11 { [c c c c c c c c c c c] }
\times 2/11 { [c c c c c c c c c c c] }
-\version "1.0.19";
+\version "1.0.20";
nt = \notes { c1 \break c1 c1 }
stuff = \notes \relative c'' <
\context Staff = stone { \nt }
-\version "1.0.19";
+\version "1.0.20";
\score {
}
-\version "1.0.19";
+\version "1.0.20";
>
\paper { linewidth = -1.; }
}
-\version "1.0.19";
+\version "1.0.20";
}
-\version "1.0.19";
+\version "1.0.20";
beamintervals = \notes{
\time 7/4;
instrument= "Violoncello";
}
-\version "1.0.19";
+\version "1.0.20";
% this is an example of extreme dynamics
-\version "1.0.19";
+\version "1.0.20";
$somewhat_long = \lyrics{
\property Lyrics . textstyle = "roman"
% the thumb-script is used in cello music to indicate a note that should
% be played with your thumb.
-\version "1.0.19";
+\version "1.0.20";
\score { \notes \relative c'' {
[<a8_\thumb a'8-3(> <)b_\thumb b'-3>
-\version "1.0.19";
+\version "1.0.20";
% middle tie is wrong
-\version "1.0.19";
+\version "1.0.20";
tie = \notes\transpose c''{
instrument= "Instrument";
}
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes
}
-\version "1.0.19";
+\version "1.0.20";
vOne = \notes \relative c''{
\clef"violin";
}
}
-\version "1.0.19";
+\version "1.0.20";
{\voicetwo c}>
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
\score {
\notes <
}
}
-\version "1.0.19";
+\version "1.0.20";
}
}
-\version "1.0.19";
+\version "1.0.20";
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\version "1.0.19";
+\version "1.0.20";
\score{
\notes{
Tested Features lyrics and chords
%}
-\version "1.0.19";
+\version "1.0.20";
melodie = \notes\relative c'' {
\clef "violin";
Tested Features: lyrics, interleaving lyrics and staffs, repeats
%}
-\version "1.0.18";
+\version "1.0.20";
melody = \notes \relative c'' {
\clef violin;
/*
[stem up, stem up shifted, stem down shifted, stem down]
- */
- Array<Note_column*> clash_group_arr_a[4];
+ */
+ Array<Note_column*> clash_group_arr_a[4]; // TODO: use drul.
for (int i=0; i < clash_l_arr_.size(); i++)
{
void print () const;
};
+struct Spacer_spring
+{
+ Real distance_f_;
+ Real hooke_f_;
+ Real other_idx_;
+};
/// helper struct for #Spacing_problem#
struct Column_info {
bool ugh_b_;
Drul_array< Array<Spacer_rod> > rods_;
+ Drul_array< Array<Spacer_spring> > springs_;
Column_info();
Column_info (Paper_column *,Real const *);
struct Clef_performer;
struct Column_x_positions;
struct Column_info;
+struct Column_spring;
struct Collision;
struct Collision_engraver;
struct Command_req;
struct Slur;
struct Slur_engraver;
struct Slur_req;
-struct Spacing_req;
+struct Spacing_spanner;
struct Span_bar;
struct Span_score_bar;
struct Span_dynamic_req;
struct Span_req;
struct Spanner;
+struct Spring;
struct Spring_spacer;
struct Staff_bracket;
struct Staff_performer;
/// the columns of a score that form one line.
class Line_of_score : public Axis_group_spanner, public Super_element
{
- Link_array<Paper_column> cols_;
public:
+ Link_array<Paper_column> cols_;
Line_of_score();
/// is #c# contained in #*this#?
bool contains_b (Paper_column const *c) const;
- Link_array<Line_of_score> get_lines() const;
Line_of_score * set_breaking (Array<Column_x_positions> const&, int j) const;
- void output_all ();
+ void output_all (bool last_line);
void add_column (Paper_column*);
protected:
#include "axis-group-item.hh"
#include "rod.hh"
-
+#include "spring.hh"
/**
stuff grouped vertically.
void preprocess ();
/// set a minimum distance
void add_rod (Paper_column * to, Real distance);
+ void add_spring (Paper_column * to, Real dist, Real strength);
virtual Paper_column * column_l () const;
/// if lines are broken then this column is in #line#
#include "direction.hh"
#include "drul-array.hh"
-struct Column_rod {
+struct Column_rod
+{
Paper_column *other_l_;
Real distance_f_;
Rod ();
};
-
-struct Column_spring {
- Paper_column *other_l_;
- Real distance_f_;
- Real strength_f_;
-
- Column_spring ();
- static int compare (const Column_spring &r1, const Column_spring &r2);
- void print () const;
-};
-
-struct Spring{
-
-};
#endif /* ROD_HH */
--- /dev/null
+/*
+ spacing-engraver.hh -- declare Spacing_engraver
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef SPACING_ENGRAVER_HH
+#define SPACING_ENGRAVER_HH
+
+#include "engraver.hh"
+#include "pqueue.hh"
+
+struct Rhythmic_tuple
+{
+ Score_element_info info_;
+ Moment end_;
+
+ Rhythmic_tuple ()
+ {
+ }
+ Rhythmic_tuple (Score_element_info i, Moment m )
+ {
+ info_ = i;
+ end_ = m;
+ }
+ static int time_compare (Rhythmic_tuple const &, Rhythmic_tuple const &);
+};
+
+/**
+ Acknowledge rhythmic elements, for initializing spacing fields in
+ the columns.
+
+ should be the last one of the toplevel context
+*/
+class Spacing_engraver : public Engraver
+{
+ PQueue<Rhythmic_tuple> playing_durations_;
+ Array<Rhythmic_tuple> now_durations_;
+ Array<Rhythmic_tuple> stopped_durations_;
+
+ Spacing_spanner * spacing_p_;
+protected:
+ VIRTUAL_COPY_CONS(Translator);
+ virtual void acknowledge_element (Score_element_info);
+ virtual void do_post_move_processing ();
+ virtual void do_pre_move_processing ();
+ virtual void do_creation_processing ();
+ virtual void do_removal_processing ();
+public:
+ Spacing_engraver ();
+};
+
+#endif /* SPACING_ENGRAVER_HH */
+
#ifndef SPACING_SPANNER_HH
#define SPACING_SPANNER_HH
+#include "spanner.hh"
+
class Spacing_spanner : public Spanner
{
- Link_array<Paper_column> cols_;
-
+public:
Spacing_spanner ();
+ VIRTUAL_COPY_CONS(Score_element);
+ Score_column *scol (int) const;
+ Array<Spring> do_measure (int,int) const;
+ int col_count () const;
protected:
- virtual void do_space_processing ();
+ virtual Array<Spring> get_springs () const;
+
};
#endif /* SPACING_SPANNER_HH */
Spanner ();
Spanner (Spanner const &);
bool broken_b () const;
+
virtual Array<Rod> get_rods () const;
+ virtual Array<Spring> get_springs () const;
virtual Spanner* find_broken_piece (Line_of_score*) const;
protected:
void set_my_columns ();
Array<Breaking_information> broken_info_;
friend Axis_group_spanner; // UGH
- virtual void output_processing ();
virtual void do_space_processing ();
virtual void do_break_processing ();
virtual Interval do_width () const;
The quality is given by the total potential energy in the
springs. The lower the energy, the better the configuration.
- TODO: make item widths work per Staff.
+ TODO: too complicated. Revise.
+ Use force iso. energy. Also optimise for uniform density
*/
class Spring_spacer : public Line_spacer {
--- /dev/null
+/*
+ spring.hh -- declare Spring, Column_spring
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef SPRING_HH
+#define SPRING_HH
+
+#include "lily-proto.hh"
+#include "drul-array.hh"
+
+struct Column_spring {
+ Paper_column *other_l_;
+ Real distance_f_;
+ Real strength_f_;
+
+ Column_spring ();
+ static int compare (const Column_spring &r1, const Column_spring &r2);
+ void print () const;
+};
+
+struct Spring{
+ Drul_array<Item*> item_l_drul_;
+ Real distance_f_;
+ Real strength_f_;
+ void add_to_cols ();
+ Spring ();
+};
+
+
+#endif /* SPRING_HH */
+
Tie ();
void set_head (Direction, Note_head*head_l);
VIRTUAL_COPY_CONS(Score_element);
-
- bool same_pitch_b_;
- Drul_array<Note_head *> head_l_drul_;
+ Drul_array<Note_head *> head_l_drul_;
protected:
virtual void do_add_processing ();
virtual void do_post_processing ();
return cols_.find_l ((Paper_column*)(c));
}
+// const?
Line_of_score*
Line_of_score::set_breaking (Array<Column_x_positions> const &breaking, int j) const
{
}
void
-Line_of_score::output_all ()
+Line_of_score::output_all (bool last_line)
{
Interval i(extent(Y_AXIS));
if (i.empty_b())
pscore_l_->outputter_l_->start_line (i.length ());
Super_element::output_all ();
- pscore_l_->outputter_l_->stop_line ();
+ if (last_line)
+ pscore_l_->outputter_l_->stop_last_line();
+ else
+ pscore_l_->outputter_l_->stop_line ();
}
{
if (!key_item_p_ && mel_l_arr_.size())
{
+ bool forget = get_property ("forgetAccidentals",0).to_bool();
for (int i=0; i < mel_l_arr_.size(); i++)
{
Item * support_l = support_l_arr_[i];
key_item_p_->add_pitch (note_l->pitch_,
note_l->cautionary_b_);
key_item_p_->add_support (support_l);
- local_key_.set (note_l->pitch_);
+
+ if (!forget)
+ local_key_.set (note_l->pitch_);
}
-
}
}
}
else if (Tie * tie_l = dynamic_cast<Tie *> (info.elem_l_))
{
- if (tie_l->same_pitch_b_)
- tied_l_arr_.push (tie_l-> head_l_drul_[RIGHT]);
+ tied_l_arr_.push (tie_l-> head_l_drul_[RIGHT]);
}
}
Time_description const * time_C_ = get_staff_info().time_C_;
if (time_C_ && !time_C_->whole_in_measure_)
{
- if (key_C_)
+ bool no_res = get_property ("noResetKey",0).to_bool ();
+ if (!no_res && key_C_)
local_key_= *key_C_;
}
}
minimal_dists_arr_drul_[dir].push (cr);
}
+void
+Paper_column::add_spring (Paper_column * p, Real d, Real s)
+{
+ Direction dir = Direction (sign (p->rank_i () - rank_i ()));
+
+ if (!dir)
+ {
+ warning ("Must set spring between differing columns.");
+ return;
+ }
+
+ for (int i=0; i < spring_arr_drul_[dir].size (); i++)
+ {
+ Column_spring &spring = spring_arr_drul_[dir][i];
+ if (spring.other_l_ == p)
+ {
+ spring.distance_f_ = spring.distance_f_ >? d;
+ return ;
+ }
+ }
+
+ Column_spring cr;
+ cr.distance_f_ = d;
+ cr.strength_f_ = s;
+ cr.other_l_ = p;
+
+ spring_arr_drul_[dir].push (cr);
+}
+
int
Paper_column::rank_i() const
{
{
#ifndef NPRINT
DOUT << "rank: " << rank_i_ << '\n';
- for (int i=0; i < minimal_dists_arr_drul_[LEFT].size (); i++)
- {
- minimal_dists_arr_drul_[LEFT][i].print ();
- }
- DOUT << "Right: ";
- for (int i=0; i < minimal_dists_arr_drul_[RIGHT].size (); i++)
+ Direction d = LEFT;
+ do
{
- minimal_dists_arr_drul_[RIGHT][i].print ();
+ for (int i=0; i < minimal_dists_arr_drul_[d].size (); i++)
+ {
+ minimal_dists_arr_drul_[d][i].print ();
+ }
+ for (int i=0; i < spring_arr_drul_[d].size (); i++)
+ {
+ spring_arr_drul_[d][i].print ();
+ }
+
}
+ while ((flip (&d))!=LEFT);
Item::do_print ();
#endif
}
return (Paper_column*)(this);
}
-
+/*
+ ugh.
+ */
void
Paper_column::preprocess ()
{
minimal_dists_arr_drul_[LEFT].sort (Column_rod::compare);
minimal_dists_arr_drul_[RIGHT].sort (Column_rod::compare);
+ spring_arr_drul_[LEFT].sort (Column_spring::compare);
+ spring_arr_drul_[RIGHT].sort (Column_spring::compare);
}
Jan Nieuwenhuizen <janneke@gnu.org>
*/
+/*
+ Ambiguities:
+
+ * \alternative
+
+ * use of '-' in various places
+
+*/
+
+
#include <iostream.h>
#include "lily-guile.hh"
#include "notename-table.hh"
#include "new-repeated-music.hh"
// mmm
-Mudela_version oldest_version ("1.0.16");
-Mudela_version version ("1.0.19");
+Mudela_version oldest_version ("1.0.20");
+Mudela_version version ("1.0.20");
void
print_mudela_versions (ostream &os)
request_with_dir:
script_dir request_that_take_dir {
if (G_script_req * gs = dynamic_cast<G_script_req*> ($2))
- gs->dir_ = $1;
+ gs->dir_ = Direction ($1);
else if ($1)
$2->warning ("Can't specify direction for this request");
$$ = $2;
void
Rod::add_to_cols ()
{
- item_l_drul_[RIGHT]->column_l ()->add_rod
- (item_l_drul_[LEFT]->column_l (), distance_f_);
- item_l_drul_[LEFT]->column_l ()->add_rod
- (item_l_drul_[RIGHT]->column_l (), distance_f_);
+ Direction d = LEFT;
+ do {
+ item_l_drul_[-d]->column_l ()->add_rod
+ (item_l_drul_[d]->column_l (), distance_f_);
+ }while ((flip (&d))!=LEFT);
}
-void
-Column_spring::print () const
-{
-#ifndef NDEBUG
- DOUT << "Column_spring { rank = "
- << other_l_->rank_i () << ", dist = " << distance_f_ << "}\n";
-#endif
-}
-
-Column_spring::Column_spring ()
-{
- distance_f_ = 0;
- other_l_ = 0;
-}
-
-int
-Column_spring::compare (const Column_spring &r1, const Column_spring &r2)
-{
- return r1.other_l_->rank_i() - r2.other_l_->rank_i();
-}
void
Slur_engraver::do_pre_move_processing()
{
- Scalar dir (get_property ("slurydirection", 0));
- Scalar dir2 (get_property ("ydirection", 0));
+ Scalar dir (get_property ("slurVerticalDirection", 0));
+ Scalar dir2 (get_property ("verticalDirection", 0));
Direction slurdir = CENTER;
if (dir.length_i () && dir.isnum_b ())
*/
-#include "engraver.hh"
-#include "pqueue.hh"
#include "musical-request.hh"
#include "score-column.hh"
-
-struct Rhythmic_tuple
-{
- Score_element_info info_;
- Moment end_;
-
- Rhythmic_tuple ()
- {
- }
- Rhythmic_tuple (Score_element_info i, Moment m )
- {
- info_ = i;
- end_ = m;
- }
- static int time_compare (Rhythmic_tuple const &, Rhythmic_tuple const &);
-};
+#include "spacing-engraver.hh"
+#include "spacing-spanner.hh"
inline int
compare (Rhythmic_tuple const &a, Rhythmic_tuple const &b)
}
int
-Rhythmic_tuple::time_compare (Rhythmic_tuple const&h1,
+Rhythmic_tuple::time_compare (Rhythmic_tuple const &h1,
Rhythmic_tuple const &h2)
{
+
return (h1.end_ - h2.end_ ).sign ();
}
-/**
- Acknowledge rhythmic elements, for initializing spacing fields in
- the columns. */
-class Spacing_engraver : public Engraver
+Spacing_engraver::Spacing_engraver()
{
- PQueue<Rhythmic_tuple> playing_durations_;
- Array<Rhythmic_tuple> now_durations_;
- Array<Rhythmic_tuple> stopped_durations_;
-
-protected:
- VIRTUAL_COPY_CONS(Translator);
- virtual void acknowledge_element (Score_element_info);
- virtual void do_post_move_processing ();
- virtual void do_pre_move_processing ();
+ spacing_p_ = 0;
+}
-public:
+void
+Spacing_engraver::do_creation_processing ()
+{
+ spacing_p_ =new Spacing_spanner;
+ spacing_p_->set_bounds (LEFT, get_staff_info ().command_pcol_l ());
+ announce_element (Score_element_info (spacing_p_, 0));
+}
-};
+void
+Spacing_engraver::do_removal_processing ()
+{
+ Paper_column * p = get_staff_info ().command_pcol_l ();
+ spacing_p_->set_bounds (RIGHT, p);
+ typeset_element (spacing_p_);
+ spacing_p_ =0;
+}
void
Spacing_engraver::acknowledge_element (Score_element_info i)
shortest_playing = shortest_playing <? m;
}
- Moment starter;
- starter.set_infinite (1);
+ Moment starter, inf;
+ inf.set_infinite (1);
+ starter=inf;
for (int i=0; i < now_durations_.size (); i++)
{
Moment m = now_durations_[i].info_.req_l_->length_mom ();
sc->shortest_starter_mom_ = starter;
}
-
void
Spacing_engraver::do_post_move_processing ()
{
--- /dev/null
+/*
+ spacing-spanner.cc -- implement Spacing_spanner
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "spacing-spanner.hh"
+#include "score-column.hh"
+#include "dimensions.hh"
+#include "paper-def.hh"
+#include "warn.hh"
+#include "p-score.hh"
+#include "line-of-score.hh"
+
+Spacing_spanner::Spacing_spanner ()
+{
+ set_elt_property (break_helper_only_scm_sym, SCM_BOOL_T);
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+}
+
+int
+Spacing_spanner::col_count () const
+{
+ return pscore_l_->line_l_->cols_.size ();
+}
+
+Score_column *
+Spacing_spanner::scol (int i)const
+{
+ return dynamic_cast<Score_column*> (pscore_l_->line_l_->cols_[i]);
+}
+
+/*
+ cut 'n paste from spring-spacer.cc
+ */
+Array<Spring>
+Spacing_spanner::do_measure (int col1, int col2) const
+{
+ for (int i =col1; i < col2; i++)
+ {
+ scol (i)->preprocess ();
+ scol (i)->print ();
+ }
+
+ Moment shortest;
+ shortest.set_infinite (1);
+ for (int i =col1; i < col2; i++)
+ {
+ if (scol(i)->musical_b ())
+ {
+ shortest = shortest <? scol(i)->shortest_starter_mom_;
+ }
+ }
+
+ Array<Spring> meas_springs;
+
+ for (int i= col1; i < col2; i++)
+ {
+ if (!scol (i)->musical_b() && i+1 < col_count())
+ {
+ Real symbol_distance = scol (i)->extent (X_AXIS)[RIGHT] ;
+ Real durational_distance = 0;
+ Moment delta_t = scol (i+1)->when_mom () - scol (i)->when_mom () ;
+ /*
+ ugh should use shortest_playing distance
+ */
+ if (delta_t)
+ {
+ Real k= paper_l()->arithmetic_constant (shortest);
+ durational_distance = paper_l()->length_mom_to_dist (delta_t,k);
+ }
+ symbol_distance += -scol (i+1)->extent(X_AXIS)[LEFT];
+
+ Spring s ;
+ s.item_l_drul_[LEFT] = scol (i);
+ s.item_l_drul_[RIGHT] = scol (i+1);
+ s.distance_f_ = symbol_distance >? durational_distance;
+ meas_springs.push (s);
+
+ Item *l = s.item_l_drul_[LEFT]->find_prebroken_piece (RIGHT);
+ Item *r = s.item_l_drul_[RIGHT]->find_prebroken_piece (LEFT);
+ Spring sp_orig (s);
+
+ if (l)
+ {
+ s = sp_orig;
+ s.item_l_drul_[LEFT] =l ;
+ meas_springs.push (s);
+ }
+
+ if (l && r)
+ {
+ s = sp_orig;
+ s.item_l_drul_[RIGHT] = r;
+ s.item_l_drul_[LEFT] = l;
+ meas_springs.push (s);
+ }
+
+ }
+ }
+
+ for (int i=col1; i < col2; i++)
+ {
+ if (scol (i)->musical_b())
+ {
+ Moment shortest_playing_len = scol(i)->shortest_playing_mom_;
+ if (! shortest_playing_len)
+ {
+ warning (_f ("can't find a ruling note at %s",
+ scol (i)->when_mom ().str ()));
+ shortest_playing_len = 1;
+ }
+ if (! shortest)
+ {
+ warning (_f ("no minimum in measure at %s",
+ scol (i)->when_mom ().str ()));
+ shortest = 1;
+ }
+ Moment delta_t = scol (i+1)->when_mom () - scol (i)->when_mom ();
+ Real k= paper_l()->arithmetic_constant(shortest);
+ Real dist = paper_l()->length_mom_to_dist (shortest_playing_len, k);
+ dist *= (double)(delta_t / shortest_playing_len);
+
+
+ Spring sp;
+ sp.distance_f_ = dist;
+ sp.item_l_drul_[LEFT] = scol (i);
+ sp.item_l_drul_[RIGHT] = scol (i+1);
+
+ meas_springs.push (sp);
+
+ /*
+ UGH. TODO: more
+ advanced spacing here.
+ */
+ Spring sp_orig (sp);
+
+ Item *r = sp.item_l_drul_[RIGHT]->find_prebroken_piece (LEFT);
+
+ if (r)
+ {
+ sp = sp_orig;
+ sp.item_l_drul_[RIGHT] =r ;
+ meas_springs.push (sp);
+ }
+ }
+ }
+ return meas_springs;
+}
+
+Array<Spring>
+Spacing_spanner::get_springs () const
+{
+ Array<Spring> springs;
+ int last_break =0;
+ for (int i=1; i < col_count (); i++)
+ {
+ if (scol (i)->breakable_b ())
+ {
+ springs.concat (do_measure (last_break, i));
+ last_break = i;
+ }
+ }
+ return springs;
+}
+
+
#include "molecule.hh"
#include "paper-outputter.hh"
-
-
void
Spanner::do_print() const
{
break_points.insert (left,0);
break_points.push (right);
-
for (int i=1; i < break_points.size(); i++)
{
Breaking_information info;
while (flip(&i) != 1);
}
-
void
Spanner::set_bounds(Direction d, Item*i)
{
{
i->used_b_ = true;
}
+
+ if (d== LEFT)
+ {
+ dim_cache_[X_AXIS]->parent_l_ = i->dim_cache_[X_AXIS];
+ }
if (spanned_drul_[Direction(-d)] == spanned_drul_[d]
&& i)
}
Spanner::Spanner (Spanner const &s)
- :Score_element (s)
+ : Score_element (s)
{
spanned_drul_[LEFT] = spanned_drul_[RIGHT] =0;
}
-void
-Spanner::output_processing ()
-{
- if (get_elt_property (transparent_scm_sym) != SCM_BOOL_F)
- return;
-
- output_p_ = do_brew_molecule_p ();
- Offset left_off (spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), 0);
- Offset o (absolute_coordinate (X_AXIS), absolute_coordinate (Y_AXIS));
- o += left_off;
- pscore_l_->outputter_l_->output_molecule (output_p_, o, classname (this));
-}
Interval
Spanner::do_width() const
span_p->set_bounds(LEFT,info.bounds_[LEFT]);
span_p->set_bounds(RIGHT,info.bounds_[RIGHT]);
pscore_l_->typeset_element (span_p);
-
info.broken_spanner_l_ = span_p;
span_p->handle_broken_dependencies();
return broken_info_.size();
}
-
-
-
Array<Rod>
Spanner::get_rods () const
{
return r;
}
+Array<Spring>
+Spanner::get_springs () const
+{
+ Array<Spring> s;
+ return s;
+}
+
void
Spanner::do_space_processing ()
{
{
rs[i].add_to_cols ();
}
+
+ Array<Spring> ss (get_springs ());
+ for (int i=0; i < ss.size (); i++)
+ {
+ ss[i].add_to_cols ();
+ }
}
r_rod.other_idx_ = this_rank;
cols_[left_idx].rods_[RIGHT].push (r_rod);
}
+#if 1
+ if (experimental_features_global_b)
+ {
+ for (int i=0; i < col->spring_arr_drul_[LEFT].size (); i++)
+ {
+ Column_spring &cr = col->spring_arr_drul_[LEFT][i];
+ int idx = cr.other_l_->rank_i () - cols_[0].pcol_l_->rank_i ();
+ if (idx < 0)
+ continue;
+
+ if (cols_[idx].pcol_l_ != cr.other_l_)
+ continue;
+
+
+ connect (idx, this_rank, cr.distance_f_,
+ cr.strength_f_ / cr.distance_f_);
+ }
+ }
+#endif
cols_.push (c);
}
void
Spring_spacer::prepare()
{
- DOUT << "Preparing..";
- calc_idealspacing();
+ if (!experimental_features_global_b)
+ calc_idealspacing();
handle_loose_cols();
print();
- DOUT << "finished preparing.\n";
}
Line_spacer*
--- /dev/null
+/*
+ spring.cc -- implement Spring
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "spring.hh"
+#include "debug.hh"
+#include "item.hh"
+#include "p-col.hh"
+
+Spring::Spring ()
+{
+ item_l_drul_[LEFT] =item_l_drul_[RIGHT] =0;
+ distance_f_ =0.;
+ strength_f_ =1.0;
+}
+
+void
+Spring::add_to_cols ()
+{
+ Direction d = LEFT;
+ do
+ {
+ item_l_drul_[-d]->column_l ()->add_spring
+ (item_l_drul_[d]->column_l (),
+ distance_f_, strength_f_);
+ }
+ while ((flip (&d))!=LEFT);
+}
+
+
+Column_spring::Column_spring ()
+{
+ other_l_ = 0;
+ distance_f_ =0;
+ strength_f_ =1.0;
+}
+
+
+int
+Column_spring::compare (Column_spring const & r1, Column_spring const &r2)
+{
+ return r1.other_l_->rank_i() - r2.other_l_->rank_i();
+}
+
+void
+Column_spring::print () const
+{
+#ifndef NPRINT
+ DOUT << "Column_spring { rank = "
+ << other_l_->rank_i () << ", dist = " << distance_f_ << "}\n";
+
+#endif
+}
if (stem_p_)
{
- Scalar prop = get_property ("ydirection", 0);
+ Scalar prop = get_property ("verticalDirection", 0);
Direction dir = prop.isnum_b () ? (Direction)int(prop) : CENTER;
if (dir)
{
if (req_l_)
{
+
+ /*
+ JUNKME!
+ */
if (old_behavior)
{
if (now_heads_.size () != stopped_heads_.size ())
}
now_heads_.clear ();
- Scalar dir (get_property ("tieydirection", 0));
- Scalar dir2 (get_property ("ydirection", 0));
+ Scalar dir (get_property ("tieVerticalDirection", 0));
+ Scalar dir2 (get_property ("verticalDirection", 0));
Direction tie_dir = CENTER;
if (dir.length_i () && dir.isnum_b ())
{
head_l_drul_[RIGHT] =0;
head_l_drul_[LEFT] =0;
- same_pitch_b_ =false;
}
% Toplevel initialisation file.
-\version "1.0.19";
+\version "1.0.20";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.19";
+\version "1.0.20";
\include "declarations.ly";
% Toplevel initialisation file.
-\version "1.0.19";
+\version "1.0.20";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.19";
+\version "1.0.20";
\include "declarations.ly"
\accepts "Lyrics";
\accepts "ChordNames";
- \consistsend "Axis_group_engraver";
-
};
\translator { \StaffGroupContext }
% Toplevel initialisation file.
-\version "1.0.19";
+\version "1.0.20";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.19";
+\version "1.0.20";
\include "declarations.ly"
% Toplevel initialisation file.
-\version "1.0.19";
+\version "1.0.20";
\include "declarations.ly";
% Toplevel initialisation file.
-\version "1.0.19";
+\version "1.0.20";
\include "declarations.ly"
-\version "1.0.19";
+\version "1.0.20";
paper_sixteen = \paper {
staffheight = 16.0\pt;
% paper20.ly
-\version "1.0.19";
+\version "1.0.20";
paper_twenty = \paper {
staffheight = 20.0\pt;
%{
-PROPERTIES
-
-name value effect shorthand
-
-[Voice]
-ydirection -1 force stem down \stemdown
-ydirection 0 stem direction free \stemboth
-ydirection 1 force stem up \stemup
-
-pletvisibility 0 show nothing
-pletvisibility 1 show number
-pletvisibility 2 show (number and bracket)-if-no-beam
-pletvisibility 3 show number, and bracket-if-no-beam
-pletvisibility 4 show number, and bracket
-
-slurdash 0 normal slurs
-slurdash 1 dotted slurs
-slurdash >1 dashed slurs
-
-slurydirection -1 force stem down \slurdown
-slurydirection 0 stem direction free \slurboth
-slurydirection 1 force stem up \slurup
-
-slurydirection -1 force stem down \slurdown
-slurydirection 0 stem direction free \slurboth
-slurydirection 1 force stem up \slurup
-
-textalignment -1 left alignment of text
-textalignment 0 center alignment of text
-textalignment 1 right alignment of text
-
-beamAuto 0/1 auto-beam on/off
-beamAutoEnd "num/den" end auto-beam
-beamAutoEnd_8 "num/den" end auto-beam of 8ths
-beamAutoEnd_16 "num/den" end auto-beam of 16ths
-
-[Score?]
-beamslopedamping 0 no damping \beamslopeproportional
-beamslopedamping 1 damping1) \beamslopedamped
-beamslopedamping 100000 zero slope \beamslopezero
-
-[Score?]
-beamquantisation 0 no quantisations \beamposfree
-beamquantisation 1 quantise pos and slope \beamposnormal
-beamquantisation 2 quantise avoide wedge2) \beampostraditional
-
-[Staff]
-keyoctaviation 0 Key signature only for specified octave \specialkey
-keyoctaviation 1 Key signature for all octaves \normalkey
-
-[Staff]
-barAlways 0 none
-barAlways 1 generate bar at every moment
-
-[Staff]
-barAuto 0 none
-barAuto 1 auto-generate bar every measure
-barAtLineStart 0/1 generate bar at beginning of line
-
-[Staff]
-timeSignatureStyle C Use C and stroked C for 4/4,2/2
-timeSignatureStyle old Use old style mensuration marks
-timeSignatureStyle 1 Use single number
-timeSignatureStyle "" Use normal two-digit time signature
-timeSignatureStyle Cn/m Set symbol explicitly, n/m=2/2 or 4/4
-timeSignatureStyle oldn/m Set symbol explicitly,
- n/m=2/2,3/2,3/4,4/4,6/4 or 9/4.
-[Staff]
-voltaVisibility 0/1 on/off
-voltaSpannerDuration Rat. Coda kludge: set length of volta-spanner,
- typically set to one measure: "1"
-
-[Staff]
-clefStyle "fullSizeChanges" Clef changes typeset in full size
-clefStyle "transparent" No clef typeset
-
-[Staff?]
-instrument ascii midi instrument table lookup
-
-[Score]
-chordInversion 0/1 Find and display chord with inversion?
-
-
-1) after beam slope damping table suggested in [Wanske]
-2) [Wanske] as well as [Ross] suggests that beams sloped upward must not
- start sitting on a staffline, and beams sloped downward must not hang
- from a staffline (similar for beam-ends). This would create a wedge
- that is traditionally being avoided because it could easily be filled-up
- with ink.
- However, avoiding these wedges restricts the freedom of beams quite a lot
- while they don't seem to be a problem in modern printing.
- In no piece of sheetmusic engraved after 1953 (Baerenreiter) i've seen
- these wedges being avoided.
+SEE THE REFERENCE MANUAL FOR EXPLANATIONS.
%}
+\version "1.0.20";
+
%hmm, (these) abbrevs suck, imo
% i guess they're meant as some form of doco
% that's what i use them for...
-stemup = \property Voice.ydirection = \up
-stemboth= \property Voice.ydirection = \center
-stemdown = \property Voice.ydirection = \down
+stemup = \property Voice.verticalDirection = \up
+stemboth= \property Voice.verticalDirection = \center
+stemdown = \property Voice.verticalDirection = \down
slurup = \notes {
s1*0
- \property Voice.slurydirection = \up
+ \property Voice.slurVerticalDirection = \up
}
slurboth= \notes {
s1*0
- \property Voice.slurydirection = \center
+ \property Voice.slurVerticalDirection = \center
}
slurdown = \notes {
s1*0
- \property Voice.slurydirection = \down
+ \property Voice.slurVerticalDirection = \down
}
shifton = \property Voice.hshift = 1
staffone = {
\translator Staff=one
- \property Staff.ydirection = \center
+ \property Staff.verticalDirection = \center
\property Staff.hshift = 0
}
stafftwo = {
\translator Staff=two
- \property Staff.ydirection = \center
+ \property Staff.verticalDirection = \center
\property Staff.hshift = 0
}
staffthree = {
\translator Staff=three
- \property Staff.ydirection = \center
+ \property Staff.verticalDirection = \center
\property Staff.hshift = 0
}
stafffour = {
\translator Staff=four
- \property Staff.ydirection = \center
+ \property Staff.verticalDirection = \center
\property Staff.hshift = 0
}
\property Staff.clefStyle = "fullSizeChanges"
\nobreak \bar "";
}
+
COPYING NEWS-0.1 NEWS-1.0 NEWS-0.0 NEWS TODO AIMS
README_TXT_FILES = README.txt AUTHORS.txt INSTALL.txt PATCHES.txt
IN_FILES := $(wildcard *.in)
-EXTRA_DIST_FILES = dstreamrc mudela-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES)
+EXTRA_DIST_FILES = dstreamrc mudela-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) TASKS
NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
# bootstrap stepmake:
localinstall:
mkdir -p $(datadir)
$(LN_S) $(TEX_TFMDIR) $(datadir)/cmtfm
+
+
+local-WWW-clean:
+ $(depth)/buildscripts/out/clean-fonts
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "violoncello.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "clarinetti.ly"
}
-\version "1.0.19";
+\version "1.0.20";
\include "clarinetto-1.ly"
\include "clarinetto-2.ly"
}
-\version "1.0.19";
+\version "1.0.20";
clarinetto1 = \notes \relative c {
R1 *2 | d''4-.\ff r r2 | R1 *3 | e4-. r r2 | R1 *3 |
}
-\version "1.0.19";
+\version "1.0.20";
clarinetto2 = \notes \relative c {
R1*2 bes''4-.\ff r r2 | R1*3 | cis4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "contrabasso.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
contrabasso = \notes \relative c {
% \translator Staff=violoncello
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "corni.ly"
}
-\version "1.0.19";
+\version "1.0.20";
\include "corno-1.ly"
\include "corno-2.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
corno1 = \notes \relative c {
R1 *2 | f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
corno2 = \notes \relative c {
R1 *2 | d''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 |
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "fagotti.ly"
}
-\version "1.0.19";
+\version "1.0.20";
\include "fagotto-1.ly"
\include "fagotto-2.ly"
}
-\version "1.0.19";
+\version "1.0.20";
fagotto1 = \notes \relative c {
R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
fagotto2 = \notes \relative c {
R1 *2 | f4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "flauti.ly"
}
-\version "1.0.19";
+\version "1.0.20";
\include "flauto-1.ly"
\include "flauto-2.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
flauto1 = \notes \relative c {
R1 *2 | c'''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
flauto2 = \notes \relative c {
R1 *2 | as'''4-.\ff r r2 | R1 *3 | b4-. r r2 | R1 *3 |
}
-\version "1.0.19";
+\version "1.0.20";
global = \notes {
\time 4/4;
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
oboe1 = \notes \relative c'' {
R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 |
}
-\version "1.0.19";
+\version "1.0.20";
oboe2 = \notes \relative c{
R1 *2| f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 |
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "oboi.ly"
}
-\version "1.0.19";
+\version "1.0.20";
\include "oboe-1.ly"
\include "oboe-2.ly"
}
-\version "1.0.19";
+\version "1.0.20";
timpani = \notes \relative c {
R1 *2 | c4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "trombe.ly"
}
-\version "1.0.19";
+\version "1.0.20";
\include "trombo-1.ly"
\include "trombo-2.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
trombo1 = \notes \relative c {
R1 *2 | c''4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
trombo2 = \notes \relative c {
R1 *2 | c'4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 |
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
viola1 = \notes \relative c {
\context Voice=one
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
viola2 = \notes \relative c {
% starts on (actualy, most part is on) same staff as viola1
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "viola-1.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "violino-1.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
violino1 = \notes \relative c {
c'1\ff ~ | c | <f4-. c'-. as'-.> r r2 | R1 |
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "violino-2.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
violino2 = \notes \relative c {
c'1\ff ~ | c | <f4-. c'-. as'-.> r r2 | R1 |
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "violoncello.ly"
}
-\version "1.0.19";
+\version "1.0.20";
violoncello = \notes \relative c {
c1\ff ~ | c | f,4-. r r2 | r1 | c'1\ff ~ | c | f,4-. r r2 |
----------------------------------------------------
-\version "1.0.19";
+\version "1.0.20";
\paper{barsize=50.0; \translator {\StaffContext \consists
Bar_number_engraver;}}
}
-\version "1.0.19";
+\version "1.0.20";
Bar_number_engraver;}}
}
-\version "1.0.19";
+\version "1.0.20";
}
-\version "1.0.19";
+\version "1.0.20";
\paper{barsize=50.0; \translator {\StaffContext \consists
Bar_number_engraver;}}
}
-\version "1.0.19";
+\version "1.0.20";
under the Gnu Public Licence.
%}
-\version "1.0.19";
+\version "1.0.20";
$voice_one = \notes \relative c' {
a'2 bes4. [c16 bes] | a4 d ~ d c ~ | c b ~ [b8 a] a4 ~|
Tested Features: cross staff beams and slurs, grace notes, no bars
%}
-\version "1.0.19";
+\version "1.0.20";
\include "nederlands.ly"
lower = \context Voice=two \notes \relative c{
\stemdown
- \property Staff.slurydirection = 1
+ \property Staff.slurVerticalDirection = 1
% snapnie, hoevaak relative c heeft ze nodig?
< \notes\relative c \basloopje \bassbeam >
Tested Features:
%}
-\version "1.0.19";
+\version "1.0.20";
\include "nederlands.ly"
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
\include "standchen.ly"
description = "A schubert song in 20 pt";
}
-\version "1.0.19";
+\version "1.0.20";
% fool make-website
% \include "standchen.ly";
Note: Original key F.
%}
-\version "1.0.19";
+\version "1.0.20";
$vocal_verse1 = \notes\relative c''{
% ugh: treble/bass
title = "Diademata";
metre = "6 6. 8 6. D";
}
-\version "1.0.19";
+\version "1.0.20";
sop=\notes \transpose c''{
ees2 | ees4 ees4 g2 g2 | c'1. \bar "||";
metre = "10 10 . 11 11";
}
-\version "1.0.19";
+\version "1.0.20";
sop = \notes \transpose c''{
f4 | d' bes c' | f2 \bar "||";
metre = "10 11. 11 11. and refrain";
}
-\version "1.0.19";
+\version "1.0.20";
sop=\notes \relative c'' {
b2 gis4. a8 |b2 e,2 |
metre = "8 7 8 7 D";
}
-\version "1.0.19";
+\version "1.0.20";
sop=\notes \relative c'' {
b4 b c d | d c b a | g g a b | b4. a8 a2 \bar "||";
}
-\version "1.0.19";
+\version "1.0.20";
global=\notes {
\time 6/4;
piece = "Allemande";
}
-\version "1.0.19";
+\version "1.0.20";
global = \notes{
\time 4/4;
%%
%% Noe liknende skjer også i mellom andre og tredje stemme i takt 28
-\version "1.0.19";
+\version "1.0.20";
global = \notes{
\time 2/4;
copyright = "Public Domain";
}
-\version "1.0.19";
+\version "1.0.20";
global = \notes {
\time 4/4;
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
% upper = \context Staff \notes\relative c {
upper = \context Staff=upper \notes\relative c {
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
upper = \context Staff \notes\relative c{
\context Voice=i
\property Voice . textstyle = "italic"
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
one = \context Staff \notes\relative c {
\context Voice=i
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
upper = \context Staff \notes\relative c{
enteredby = "jcn";
copyright = "public domain";
}
-\version "1.0.19";
+\version "1.0.20";
one = \context Staff \notes\relative c{
>
-\version "1.0.19";
+\version "1.0.20";
\$courante_b
>
-\version "1.0.19";
+\version "1.0.20";
\$gigue_b
>
-\version "1.0.19";
+\version "1.0.20";
d2.
}
-\version "1.0.19";
+\version "1.0.20";
dotted slurs
%}
-\version "1.0.19";
+\version "1.0.20";
\include "prelude-urtext.ly";
\$prelude_b
>
-\version "1.0.19";
+\version "1.0.20";
dotted slurs
%}
-\version "1.0.19";
+\version "1.0.20";
\include "prelude-urtext.ly";
\$sarabande_b
>
-\version "1.0.19";
+\version "1.0.20";
\clef alto;
\$global_i
>
-\version "1.0.19";
+\version "1.0.20";
>
\$global_i
>
-\version "1.0.19";
+\version "1.0.20";
}
}
-\version "1.0.19";
+\version "1.0.20";
}
}
-\version "1.0.19";
+\version "1.0.20";
\clef bass;
\$global_i
>
-\version "1.0.19";
+\version "1.0.20";
%{
%}
-\version "1.0.19";
+\version "1.0.20";
global =
* auto beaming
%}
-\version "1.0.19";
+\version "1.0.20";
\include "nederlands.ly" % for correct parsing of note names
\voicetwo
\clef violin;
- \property Voice.ydirection = "-1"
+ \property Voice.verticalDirection = "-1"
r8 c16 b c8 g as c16 b c8 d |
g, c16 b c8 d f,16 g as4 g16 f |
copyright = "Public Domain";
}
-\version "1.0.19";
+\version "1.0.20";
global =
\notes {
\midi{ \tempo 4 = 100; }
}
-\version "1.0.19";
+\version "1.0.20";
-\version "1.0.19";
+\version "1.0.20";
corI=\notes\relative c'' {
\key c;
"Statens Musikbibliotek, Stockholm, Sweden";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "wood.ly"
"Statens Musikbibliotek, Stockholm, Sweden";
}
-\version "1.0.19";
+\version "1.0.20";
\include "global.ly"
\include "wood.ly"
-\version "1.0.19";
+\version "1.0.20";
viI=\notes\relative c'' {
-\version "1.0.19";
+\version "1.0.20";
oboe=\notes\relative c'' {
\clef "treble";
Ugh.. Wish we had grace notes.... It adds another dimension to this
piece of music. %}
-\version "1.0.19";
+\version "1.0.20";
cad = \notes \relative c' {
}
-\version "1.0.19";
+\version "1.0.20";
allegro =
\notes
copyright = "public domain";
latexheaders= "headers";
}
-\version "1.0.19";
+\version "1.0.20";
--- /dev/null
+#!@PYTHON@
+
+# once upon a rainy monday afternoon.
+#
+# ...
+#
+# (not finished.)
+#
+
+name = 'abc-to-ly'
+version = '0.1'
+
+import getopt
+import sys
+import re
+import string
+header = {}
+global_voice_stuff = []
+default_len = 4
+
+
+def dump_header (hdr):
+ print '\\header {'
+ for k in hdr.keys ():
+ print '%s = "%s";\n'% (k,hdr[k])
+ print '};'
+
+def set_default_length (s):
+ m = re.match ('1/(.*)$', s)
+ if m:
+ default_len = string.atoi ( m.group (1))
+
+def parse_timesig (s):
+ m = re.match ('^M: *(.*)$', s)
+ if m:
+ print '\meter %s; ' % m.group (1)
+
+def parse_key (s):
+ m = re.match ('^K: *(.*)$', s)
+ if m:
+ print '\key %s; ' % m.group (1)
+
+def gulp_file(f):
+ try:
+ i = open(f)
+ i.seek (0, 2)
+ n = i.tell ()
+ i.seek (0,0)
+ except:
+ print 'can\'t open file: ' + f + '\n'
+ return ''
+ s = i.read (n)
+ if len (s) <= 0:
+ print 'gulped empty file: ' + f + '\n'
+ i.close ()
+ return s
+
+
+def try_parse_header_line (ln):
+ m = re.match ('^(.): *(.*)$', ln)
+
+ if m:
+ g =m.group (1)
+ a = m.group (2)
+ if g == 'T':
+ header['title'] = a
+ if g == 'M':
+ global_voice_stuff.append ('\\time %s;' % a)
+ if g == 'K':
+ global_voice_stuff.append ('\\key %s;' % a)
+ if g == 'O':
+ header ['origin'] = a
+ if g == 'X':
+ header ['crossRefNumber'] = a
+
+ if g == 'A':
+ header ['area'] = a
+ if g == 'H':
+ header ['history'] = a
+ if g == 'B':
+ header ['book'] = a
+ if g == 'S':
+ header ['subtitle'] = a
+ if g == 'L':
+ set_default_length (ln)
+
+
+ return m
+
+
+# WAT IS ABC EEN ONTZETTENDE PROGRAMMEERPOEP !
+
+def try_parse_note (str):
+ mud = ''
+
+ slur_begin =0
+ if str[0] == '(':
+ slur_begin = 1
+ str = str[1:]
+
+ acc = None
+ if str[0] in '^=_':
+ c = str[0]
+ str = str[1:]
+ if c == '^':
+ acc = 1
+ if c == '=':
+ acc = 0
+ if c == '_':
+ acc = -1
+
+ octave = 0;
+ if str[0] in "ABCDEFG":
+ str = string.lower (str[0]) + str[1:]
+ octave = -1
+
+
+ notename = 0
+ if str[0] in "abcdefg":
+ notename = ord(str[0]) - ord('a')
+ str = str[1:]
+ else:
+ return str # failed; not a note!
+
+ while str[0] == ',':
+ octave = octave - 1
+ str = str[1:]
+ while str[0] == '\'':
+ octave = octave + 1
+ str = str[1:]
+ divide =0
+ if str[0] == '/':
+ divide =1
+ str = str[1:]
+ durstr = ''
+ while str[0] in "1234567890":
+ durstr = durstr + str[0]
+ str = str[1:]
+
+ duration_mult = 1
+ if durstr:
+ duration_mult = string.atoi (durstr)
+
+
+ slur_end =0
+ if str[0] == ')':
+ slur_begin = 1
+ str = str[1:]
+
+
+ return str
+
+def junk_space (str):
+ while str and str[0] in '\t\n ':
+ str = str[1:]
+
+ return str
+
+def try_parse_bar (str):
+ if str[0] == '|':
+ str = str[1:]
+ return str
+
+def try_parse_body_line (ln):
+ prev_ln = ''
+ while ln and ln != prev_ln:
+ prev_ln = ln
+ ln = try_parse_note (ln)
+ ln = try_parse_bar (ln)
+ ln = junk_space (ln)
+ if ln:
+ print 'Huh %s' % ln
+
+
+def parse_file (fn):
+ f = open (fn)
+ ls = f.readlines ()
+
+ head = 1
+ for l in ls:
+ if re.match ('^[\t ]*(%.*)?$', l):
+ continue
+
+ if head:
+ m = try_parse_header_line (l)
+ if not m:
+ head = 0
+
+ if not head:
+ m = try_parse_body_line (l)
+
+
+def identify():
+ print '%s %s' % (name, version)
+
+def help ():
+ print r"""
+This is a disfunctional ABC to mudela convertor. It only gulps input, and
+says huh when confused. Does not do chords. Go ahead and fix me.
+
+-h, --help this help.
+"""
+
+identify()
+(options, files) = getopt.getopt (sys.argv[1:], 'h', ['help'])
+
+for opt in options:
+ o = opt[0]
+ a = opt[1]
+ if o== '--help' or o == '-h':
+ help ()
+ else:
+ print o
+ raise getopt.error
+
+
+for f in files:
+ if f == '-':
+ f = ''
+
+ parse_file (f)
+ dump_header (header)
+ print global_voice_stuff, 1
+
'fontsize -> fontSize, midi_instrument -> midiInstrument, SkipBars -> skipBars')
+if 1:
+ def conv(lines):
+ newlines =[]
+ for x in lines:
+ x = re.sub ('tieydirection','tieVerticalDirection', x)
+ x = re.sub ('slurydirection','slurVerticalDirection', x)
+ x = re.sub ('ydirection','verticalDirection', x)
+ newlines.append (x)
+ return newlines
+
+ conversions.append ((1,0,20), conv,
+ '{,tie,slur}ydirection -> {v,tieV,slurV}erticalDirection')
+
+
############################
-#!/usr/bin/python
#!@PYTHON@
# mup-to-ly.py --