\mudelafile{noteheadstyle.ly}
Multiple measure rests do not collide with barlines and clefs. They
-are not expanded when you set Score.SkipBars
+are not expanded when you set \verb+Score.SkipBars+. Although the
+multi-measure-rest is a Spanner, minimum distances are set to keep it
+colliding from barlines.
\mudelafile{multi-measure-rest.ly}
\mudelafile{collisions.ly}
The number of stafflines of a staff can be set with the property
-numberOfStaffLines. Ledger lines both on note heads and rests are adjusted.
+numberOfStaffLines. Ledger lines both on note heads and rests are
+adjusted. Barlines also are adjusted.
+
\mudelafile{number-staff-lines.fly}
following words are keywords:
verb(accepts duration midi relative textscript
alternative font mm remove time
-bar grouping musicalpitch repeat times
+bar musicalpitch repeat times
cadenza header name scm translator
chordmodifiers in notenames scmfile transpose
chords include notes score type
foo1 __ bar2. __ _4 baz1 __ }
> })
+If you want to have hyphens centred between syllables (rather than attached
+to the end of the first syllable) you can use the special code(--) lyric as
+separate word between syllables. This will result in a hyphen whose length
+varies depending on the space between syllables, and centred between the
+syllables. For example:
+mudela(verbatim)(\score{
+ < \notes \transpose c'' {c d e c | c d e c | e f g'2 |
+ e'4 f g'2 \bar "|."; }
+ \context Lyrics \lyrics {
+ DOEXPAND(Fr\)`e4 -- re Ja -- que DOEXPAND(Fr\)`e -- re Ja -- que
+ Dor -- mez vous?2 Dor4 -- mez vous?2 }
+ >
+})
+
+
sect(Time)
your music by typing code(|). Whenever LilyPond encounters a code(|)
that doesn't fall at a measure boundary, she prints a warning message.
-Rhythmic grouping is a concept closely associated with this.
-A default grouping is selected for the chosen time signature.
-The default consists of combinations of 2 and 3 beats with as many
-groups of 3 as possible, and the groups of 3 coming first. For
-example, 4/4 is divided into 2+2 and 8/8 is divided into 3+3+2. This
-default grouping can be changed using the \grouping keyword which
-takes a list of durations to specify the grouping.
-
COMMENT(
sect(Composition: forming bigger structures)
dit(code(\font) var(string)) Internal keyword. Used within
code(\paper) to specify the font.
-dit(code(\grouping) var(durationseq)code(;)) Sets the metric structure of
-the measure. Each argument specifies the duration of one metric unit.
-For example, code(\duration 16*5;) specifies a grouping of five beats
-together in 5/16 time. The default grouping is to have as many groups
-of 3 as possible followed by groups of two.
dit(code(\header) code({) var(key1) = var(val1); var(key2) = var(val2); ... code(}))
Specifies information about the music. A header should appear at the
-
+pl 53.jbr1
+ - scripts/ly2dvi.py: A fix for the multitude of file systems supported
+ by windows. As long as the paths that the cygwin apps use are
+ UNC style and the paths that the native windows apps use are DOS
+ style everybody is happy. I add quick and dirty unc2dos function
+ to facilitate this approach.
+
+pl 53.hwn1
+ - bf mudela-book.
+ - better min distance for multi measure rests.
+ - junk ATOM_SMOB
+ - control tuplet gap size from paper.
+ - bf: output header as PS strings for PS out.
+ - bf: cached-fontname
+ - control volta height from paper block.
+
+pl 53.jcn5
+ - \rhythm-ified and text bfs: standchen.ly
+ - walk rhythm through *_iterator::next_music_l ()
+
+pl 53.jcn4
+ - more abc2ly hacking, including lyrics and \rhythm
+ - bfs: \rhythm
+ - \rhythm-ified input/twinkle.ly
+
+pl 53.jcn3
+ - put rhythm A on pitches/lyrics B: \rhythm MUSICA MUSICB
+ input/test/rhythm-melody.fly
+ input/test/rhythm-lyrics.fly
+ - syntax changes:
+o * dot-only duration dropped: use c4 c4. iso now invalid: c4 c.
+ * chords: optional_dot now mandatory:
+ \chords { c-1.2.3 } iso now invalid: \chords { c-1 2 3 }
+ * @c@ (notemode_chords) syntax dropped. rather use:
+ \notes { c d \chords { e f } }
+
+pl 53.jcn2
+ - \property graceFraction: part of next note taken-up by grace(s).
+ - Note_performer: add moments for delayed notes,
+ fine for single grace notes: hear gnossienne-4.ly
+
+pl 53.jcn1
+ - grace performance
+ - fixed tie-performance
+ - bf: abe
+
+pl 53.gp1
+ - added Hyphen-engraver, Hyphen-spanner
+************
pl 52.jcn3
- bf: mi2mu: midi without key
- try at grace-performer-group; breaks MIDI output even when no \grace
* beam over barlines
* non-fitting stems handled gracefully (eg. [c8 c4 c8] )
- junked rhythmic grouping, \grouping and all associated bits.
- - bf: do try_visibility_lambda for nonbreakable items as well (fixes \nobreak on barline)
+ - bf: do try_visibility_lambda for nonbreakable items as well
+ (fixes \nobreak on barline)
- bf: Cons_list::truncate()
pl 52.hwn1
- Added barSize property. Junked barsize variable.
************
-i
pl 51.uu2
- grace note flags, move Lookup::flag into Stem
- faq updates: doc++, Matt's page
- Span_bar bugfix (there you go, Mats).
- bf: Score copy ctor (-> bf declaring score)
- new Tie behavior: only tie identical pitches, switchable with
-oldTieBehavior
+ oldTieBehavior
- junked cautionary_b_ from Musical_pitch
pl 32.jcn1
pl5.jcn3
- website fixes
-opl5.jcn2
+pl5.jcn2
- extender-*, see input/test/extender.ly
- bf: half-beam length (urg)
- fixes: standchen, star
- tex output support
- all output through scheme
- option: f, output-format=X
-o - geile placebox
+ - geile placebox
- mf/mfplain.ini
pl 17.jcn2
. * indent = 0.0 with linewidth=-1.0
. * music ending in grace notes.
. * PostScript
-. * header for PS enteredby = "bla <bla@bar.com>"
. * ps/lily.ps see comments.
. * didot / big point.
. * fix singleStaffBracket
-. * declare performers in \midi
. * check EGCS version
. * input/test/stem-spacing.ly: 12/4 touches first note
. * \shape 1st dim skipped?
. * We need feta-din*.mf files for more sizes than 10.
. * fix dynamics decently, ie. use kerning & ligatures.
. * dots & rest collisions?
-. * mudela-book.py
-. * fix \mudelafile{} to have decent functionality
-. * P.P.S. It can be cool in mudela-book to distinguish in
-pre,postMudelaExample, whether MudelaExample is epsed or not: ( if
-this fragment is floating eps, than 1, otherwise 2). say
-preMudelaExample[eps]{}, and change it in document body sometimes.
-. * use less RE's
-. * junk _ in lyric mode for " "
+. * behavior of "that the obvious solution
+\lyrics { foo1*4 __ _ }" is unintuitive.
. * Lyrics and scripts collide.
. * a note with a circle after it, meaning:
. * Remove non-free software links.
. * Remove meta article LilyPond.
. * break priority setting from SCM.
-. * Gade score
-. * remove [] in favour of auto-beamer
. * hangOnClef with non-breakable clefs.
-. * Aha, the problem is the new TeX code generation for changing fonts.
-> (The explanation below is mostly intended for Han-Wen and Jan)
-> Before, the font was changed with macros declared separately for
-> pure TeX and LaTeX, but now all the fonts are declared directly in
-> the generated code using the low-level TeX commands. This circumvents
-> the fontencoding mechanism of LaTeX and is a potential source of
-> problems also for us users of the Latin-1 character set.
-> I think it still works since the inputencoding latin1 is
-> declared by ly2dvi, but it still means that e.g. an o with
-> umlaut is typeset as a combination of the two symbols 'o' and
-> 'umlaut' instead of as a single character, as would be the case
-> if fontencoding OT1 had been used. This shouldn't give any
-> difference in layout, though. One of the main argument for using
-> fontencoding OT1 is for the hyphenation mechanism to work, an
-> argument that's clearly irrelevant in our application. Yet we
-> see the problem for August.
. * Abstraction for engravers:
. * make "in-between" engraver (Tie, Extender)
. * make wide_spanner_engraver (line_group_spanner, staff_symbol)
. * PS output
. * optimal pagebreaking.
-. * Unicode support? -> man 7 unicode
-. * 16 bit Strings
-. * -u switch
-. * detect of 16/8 bit files
-. * examples to go with it.
+. * internationalisation for input.
+. * Unicode support? -> man 7 unicode
+. * (The explanation below is mostly intended for Han-Wen and Jan)
+> Before, the font was changed with macros declared separately for
+> pure TeX and LaTeX, but now all the fonts are declared directly in
+> the generated code using the low-level TeX commands. This circumvents
+> the fontencoding mechanism of LaTeX and is a potential source of
+> problems also for us users of the Latin-1 character set.
+> I think it still works since the inputencoding latin1 is
+> declared by ly2dvi, but it still means that e.g. an o with
+> umlaut is typeset as a combination of the two symbols 'o' and
+> 'umlaut' instead of as a single character, as would be the case
+> if fontencoding OT1 had been used. This shouldn't give any
+> difference in layout, though. One of the main argument for using
+> fontencoding OT1 is for the hyphenation mechanism to work, an
+> argument that's clearly irrelevant in our application. Yet we
+> see the problem for August.
. * \header
. * output header info to MIDI too.
. * SMDL?
. * add to MIDI output:
-. * tied notes for MIDI
. * sharp / flat on trills (in MIDI ??)
. * tempo change
. * ornaments (and trills?)
. * specify number of lines
.* INPUTLANGUAGE
-. * \rhythms 4 16 16 16 16; c c c c c -> c4 c16 etc.
. * convention for slurs vs. phrasing marks.
. * Language:
. * \translator -> ?
. * fix confusing naming in Engraver vs Engraver_group_engraver (context)
-. * progress when creating MIDI elts.
-
. * A range for context errors (eg. mark both { and }. )
. * lyric in staff (sharpsharp in staff, text below)
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=1
-PATCH_LEVEL=53
+PATCH_LEVEL=54
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
dnl WARNING WARNING WARNING WARNING
dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
+dnl WARNING WARNING WARNING WARNING
+dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
dnl aclocal.m4 -*-shell-script-*-
dnl StepMake subroutines for configure.in
\score{
- \notes \context Voice {
+ \notes \context Voice \relative c'' {
\times 2/3 { \times 2/3 { a8 b c} c }
\times 3/4 { c4 c4 c4 c4 }
\time 6/8;
{
func_ = s;
}
-
-
-#ifdef ATOM_SMOB
-int
-Atom::smob_display (SCM smob, SCM port, scm_print_state*)
-{
- Atom* a =(Atom*) SCM_CDR(smob);
- String i (a->off_.str ());
-
- scm_puts ("#<Atom ", port);
- scm_puts (i.ch_C(), port);
- gh_display (a->func_);
- scm_puts (">", port);
-
- /* non-zero means success */
- return 1;
-}
-
-
-scm_sizet
-Atom::smob_free (SCM smob)
-{
- Atom * a= (Atom*) SCM_CDR(smob);
- delete a;
- return sizeof (Atom);
-}
-
-SCM
-Atom::smob_mark (SCM smob)
-{
- Atom * a= (Atom*) SCM_CDR(smob);
- scm_gc_mark (a->func_);
- return a->font_;
-}
-
-long Atom::smob_tag_;
-
-void
-Atom::init_smob ()
-{
- static scm_smobfuns type_rec;
-
- type_rec.mark = smob_mark;
- type_rec.free = smob_free;
- type_rec.print = smob_display;
- type_rec.equalp = 0;
-
- smob_tag_ = scm_newsmob (&type_rec);
-}
-
-
-SCM
-Atom::make_smob () const
-{
- SCM smob;
- SCM_NEWCELL (smob);
- SCM_SETCAR (smob, smob_tag_);
- SCM_SETCDR (smob, this);
- return smob;
-}
-
-SCM
-Atom::make_atom (SCM outputfunc)
-{
- Atom * a= new Atom(outputfunc);
- return a->make_smob ();
-}
-
-SCM
-Atom::copy_self () const
-{
- return (new Atom (*this))->make_smob ();
-}
-
-bool
-Atom::Atom_b (SCM obj)
-{
- return(SCM_NIMP(obj) && SCM_CAR(obj) == smob_tag_);
-}
-
-Atom*
-Atom::atom_l (SCM a)
-{
- assert (Atom_b (a));
- return (Atom*) SCM_CDR(a);
-}
-
-
-ADD_GLOBAL_CTOR_WITHNAME(atomsmob, Atom::init_smob);
-#endif
-
-
#include "lily-proto.hh"
#include "lily-guile.hh"
-//#define ATOM_SMOB
-
-#ifdef ATOM_SMOB
-
-/// a symbol which can be translated, and freely copied
-class Atom {
- static long smob_tag_;
-
- static SCM smob_mark (SCM);
- static scm_sizet smob_free (SCM);
- static int smob_display (SCM, SCM, scm_print_state*);
-public:
- SCM make_smob () const;
-
- Offset off_;
- Atom (SCM s);
-
- static SCM make_atom (SCM outputfunc);
- SCM copy_self () const;
- static Atom *atom_l (SCM);
-
- /// Is #obj# a Foo?
- static bool Atom_b(SCM obj);
- static void init_smob ();
-
- SCM func_;
- SCM font_;
-};
-
-#else
-
class Atom {
public:
Atom (SCM s);
Protected_scm font_;
};
-#endif
#endif
#include "direction.hh"
#include "box.hh"
-/** handy interface to symbol table
- TODO: move this into GUILE?
+/**
+ handy interface to symbol table
+ TODO: move this into GUILE?
*/
class Lookup
{
Molecule fill (Box b) const;
Molecule filledbox (Box b) const;
Molecule hairpin (Real width, Real height, bool decresc, bool continued) const;
- Molecule tuplet_bracket (Real dy, Real dx, Real thick,Real interline, Direction dir) const;
+ Molecule tuplet_bracket (Real dy, Real dx, Real gap, Real thick,Real interline, Direction dir) const;
Molecule rest (int, bool outside, String) const;
Molecule accordion (SCM arg, Real interline_f) const;
Molecule slur (Array<Offset> controls) const;
Molecule text (String style, String text, Paper_def*) const;
Molecule staff_brace (Real dy) const;
Molecule staff_bracket (Real dy) const;
- Molecule volta (Real w, Real h, Real il, bool last_b) const;
+ Molecule volta (Real h, Real w, Real thick, bool last_b) const;
Molecule special_time_signature (String, int,int, Paper_def*) const;
Molecule time_signature (int n,int d, Paper_def*) const;
}
Molecule
-Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real interline_f, Direction dir) const
+Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real gap, Real interline_f, Direction dir) const
{
Molecule m;
Atom at (gh_list(tuplet_scm_sym,
- gh_double2scm (interline_f),
+ gh_double2scm (interline_f),
+ gh_double2scm (gap),
gh_double2scm (dx),
gh_double2scm (dy),
gh_double2scm (thick),
}
Molecule
-Lookup::volta (Real w, Real thick, Real interline_f, bool last_b) const
+Lookup::volta (Real h, Real w, Real thick, bool last_b) const
{
Molecule m;
Atom at (gh_list (volta_scm_sym,
+ gh_double2scm (h),
gh_double2scm (w),
gh_double2scm (thick),
gh_int2scm (last_b),
SCM_UNDEFINED));
- m.dim_[Y_AXIS] = Interval (-interline_f, interline_f);
+ m.dim_[Y_AXIS] = Interval (- h/2, h/2);
m.dim_[X_AXIS] = Interval (0, w);
m.add_atom (&at);
source file of the GNU LilyPond music typesetter
- (c) 1998--1999, 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
*/
Real x_off = 0.0;
- Dimension_cache * col_ref = spanned_drul_[LEFT]->column_l ()->dim_cache_[X_AXIS];
+ // Dimension_cache * col_ref = spanned_drul_[LEFT]->column_l ()->dim_cache_[X_AXIS];
Real rx = spanned_drul_[LEFT]->absolute_coordinate (X_AXIS);
/*
if (!(spanned_drul_[LEFT] && spanned_drul_[RIGHT]))
{
programming_error ("Multi_measure_rest::get_rods (): I am not spanned!");
- return a;
+ return a;
}
- Rod r;
- r.item_l_drul_ = spanned_drul_;
- r.distance_f_ = paper_l ()->get_var ("mmrest_x_minimum");
- a.push (r);
+ Item * l = spanned_drul_[LEFT]->column_l ();
+ Item * r = spanned_drul_[RIGHT]->column_l ();
+ Item * lb = l->find_prebroken_piece (RIGHT);
+ Item * rb = r->find_prebroken_piece (LEFT);
- /*
- also set distances in case the left or right ending of the rest is
- a broken column. This is very common: it happens if the rest is in
- the beginning of the line, or at the end.
-
- TODO: merge this code with other discretionary handling code.
-
- TODO: calc mmrest_x_minimum (see brew_molecule_p ())
- */
-
- Drul_array<Item*> discretionaries;
- Direction d = LEFT;
- do
+ Item* combinations[4][2]={{l,r}, {lb,r}, {l,rb},{lb,rb}};
+ for (int i=0; i < 4; i++)
{
- Item *i = r.item_l_drul_[d]->find_prebroken_piece (-d);
- discretionaries[d] = i;
- if (i)
- {
- Rod k (r);
-
- k.item_l_drul_[d] = i;
- a.push (k);
- }
- }
- while ((flip (&d))!= LEFT);
-
- if (discretionaries[LEFT] && discretionaries[RIGHT])
- {
- Rod k(r);
- k.item_l_drul_ = discretionaries;
- a.push (k);
- }
+ Item * l = combinations[i][0];
+ Item *r = combinations[i][1];
+ if (!l || !r)
+ continue;
+ Rod rod;
+ rod.item_l_drul_[LEFT] = l;
+ rod.item_l_drul_[RIGHT] = r;
+ /*
+ should do something more advanced.
+ */
+ rod.distance_f_ = l->extent (X_AXIS)[BIGGER] - r->extent (X_AXIS)[SMALLER]
+ + paper_l ()->get_var ("mmrest_x_minimum");
+
+ a.push (rod);
+ }
+
return a;
}
#include "mudela-version.hh"
#include "scope.hh"
#include "relative-music.hh"
+#include "re-rhythmed-music.hh"
#include "transposed-music.hh"
#include "time-scaled-music.hh"
#include "new-repeated-music.hh"
%token CADENZA
%token CHORDMODIFIERS
%token CHORDS
+%token HYPHEN
%token CLEF
%token CM_T
%token CONSISTS
%token REMOVE
%token REPEAT
%token REPETITIONS
+%token RHYTHM
%token SCM_T
%token SCMFILE
%token SCORE
/* escaped */
%token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR
-%type <i> dots exclamations questions
+%type <i> exclamations questions
%token <i> DIGIT
%token <pitch> NOTENAME_PITCH
%token <pitch> TONICNAME_PITCH
%type <i> script_dir
%type <i> optional_modality
%type <id> identifier_init
-%type <duration> steno_duration notemode_duration
+%type <duration> steno_duration optional_notemode_duration
%type <duration> entered_notemode_duration explicit_duration
%type <intvec> int_list
%type <reqvec> pre_requests post_requests
%type <pitch> steno_tonic_pitch
%type <pitch_arr> pitch_list
-%type <music> chord notemode_chord
+%type <music> chord
%type <pitch_arr> chord_additions chord_subtractions chord_notes
-%type <pitch> chord_addsub chord_note chord_inversion notemode_chord_inversion
+%type <pitch> chord_addsub chord_note chord_inversion
%type <midi> midi_block midi_body
%type <duration> duration_length
%type <scalar> scalar
-%type <music> Music relative_music Sequential_music Simultaneous_music Music_sequence
+%type <music> Music Sequential_music Simultaneous_music Music_sequence
+%type <music> relative_music re_rhythmed_music
%type <music> property_def translator_change
%type <music_list> Music_list
%type <paper> paper_block paper_def_body
%type <request> post_request
%type <request> command_req verbose_command_req
%type <request> extender_req
+%type <request> hyphen_req
%type <string> string
%type <score> score_block score_body
%type <intarr> shape_array
-
%left '-' '+'
%left '*' '/'
%left UNARY_MINUS
;
-optional_dot:
- /* empty */
- | '.'
- ;
-
paper_def_body:
/* empty */ {
Paper_def *p = THIS->default_paper_p ();
}
| MIDI_IDENTIFIER {
$$ = $1-> access_content_Midi_def (true);
+ }
+ | midi_body assignment semicolon {
+
}
| midi_body translator_spec_block {
$$-> assign_translator ($2);
THIS->lexer_p_->pop_state ();
}
| relative_music { $$ = $1; }
+ | re_rhythmed_music { $$ = $1; }
;
relative_music:
}
;
+re_rhythmed_music:
+ RHYTHM Music Music {
+ $$ = new Re_rhythmed_music ($3, $2);
+ }
+ ;
+
translator_change:
TRANSLATOR STRING '=' STRING {
Change_translator * t = new Change_translator;
;
property_def:
- PROPERTY STRING '.' STRING '=' scalar {
+ PROPERTY STRING '.' STRING '=' scalar {
Translation_property *t = new Translation_property;
t-> var_str_ = *$4;
extender_req {
$$ = $1;
}
+ | hyphen_req {
+ $$ = $1;
+ }
| '|' {
$$ = new Barcheck_req;
}
;
musical_pitch:
- steno_musical_pitch
- | explicit_musical_pitch
+ steno_musical_pitch {
+ $$ = $1;
+ THIS->set_last_pitch ($1);
+ }
+ | explicit_musical_pitch {
+ $$ = $1;
+ THIS->set_last_pitch ($1);
+ }
;
explicit_duration:
}
;
+hyphen_req:
+ HYPHEN {
+ if (!THIS->lexer_p_->lyric_state_b ())
+ THIS->parser_error (_ ("have to be in Lyric mode for lyrics"));
+ $$ = new Hyphen_req;
+ }
+ ;
+
close_request:
close_request_parens {
$$ = $1;
;
entered_notemode_duration:
- dots {
- $$ = new Duration (THIS->default_duration_);
- if ($1)
- $$->dots_i_ = $1;
- }
- | steno_duration {
+ steno_duration {
THIS->set_last_duration ($1);
}
;
-notemode_duration:
- entered_notemode_duration {
+optional_notemode_duration:
+ {
+ $$ = new Duration (THIS->default_duration_);
+ }
+ | entered_notemode_duration {
$$ = $1;
}
;
simple_element:
- musical_pitch exclamations questions notemode_duration {
+ musical_pitch exclamations questions optional_notemode_duration {
if (!THIS->lexer_p_->note_state_b ())
THIS->parser_error (_ ("have to be in Note mode for notes"));
$$ = v;
}
- | RESTNAME notemode_duration {
+ /*
+ This rhythm option introduces a lot of shift/reduce conflicts;
+ ie, for every optional_notemode_duration.
+ However, we always want the default behaviour, which is to shift:
+ if an optional_notemode_duration is allowed, a following duration
+ is to be taken as this default duration. Thus
+
+ c4 c 8 4
+
+ are three notes, ie: c4 c8 c4.
+ Parsing whitespace is a snaky thing to do.
+ * /
+ | entered_notemode_duration {
+ if (!THIS->lexer_p_->note_state_b ())
+ THIS->parser_error (_ ("have to be in Note mode for notes"));
+
+ Note_req *n = new Note_req;
+
+ n->pitch_ = THIS->default_pitch_;
+ n->duration_ = *$1;
+ delete $1;
+
+ Simultaneous_music*v = new Request_chord;
+ v->set_spot (THIS->here_input ());
+ n->set_spot (THIS->here_input ());
+
+ v->add_music (n);
+
+ $$ = v;
+ }
+*/
+ | RESTNAME optional_notemode_duration {
$$ = THIS->get_rest_element (*$1, $2);
delete $1; // delete notename
}
- | MEASURES notemode_duration {
+ | MEASURES optional_notemode_duration {
Multi_measure_rest_req* m = new Multi_measure_rest_req;
m->duration_ = *$2;
delete $2;
velt_p->add_music (m);
$$ = velt_p;
}
- | REPETITIONS notemode_duration {
+ | REPETITIONS optional_notemode_duration {
Repetitions_req* r = new Repetitions_req;
r->duration_ = *$2;
delete $2;
velt_p->add_music (r);
$$ = velt_p;
}
- | STRING notemode_duration {
+ | STRING optional_notemode_duration {
if (!THIS->lexer_p_->lyric_state_b ())
THIS->parser_error (_ ("have to be in Lyric mode for lyrics"));
$$ = THIS->get_word_element (*$1, $2);
THIS->parser_error (_ ("have to be in Chord mode for chords"));
$$ = $1;
}
- | '@' notemode_chord '@' {
- if (!THIS->lexer_p_->note_state_b ())
- THIS->parser_error (_ ("have to be in Note mode for @chords"));
- $$ = $2;
- }
;
chord:
- steno_tonic_pitch notemode_duration chord_additions chord_subtractions chord_inversion {
- $$ = THIS->get_chord (*$1, $3, $4, $5, *$2);
- };
-
-notemode_chord:
- steno_musical_pitch notemode_duration chord_additions chord_subtractions notemode_chord_inversion {
+ steno_tonic_pitch optional_notemode_duration chord_additions chord_subtractions chord_inversion {
$$ = THIS->get_chord (*$1, $3, $4, $5, *$2);
};
-
chord_additions:
{
$$ = new Array<Musical_pitch>;
;
chord_notes:
- {
+ chord_addsub {
$$ = new Array<Musical_pitch>;
+ $$->push (*$1);
}
- | chord_notes chord_addsub {
+ | chord_notes '.' chord_addsub {
$$ = $1;
- $$->push (*$2);
+ $$->push (*$3);
}
;
chord_addsub:
- chord_note optional_dot
- | CHORDMODIFIER_PITCH optional_dot
+ chord_note
+ | CHORDMODIFIER_PITCH
;
chord_inversion:
}
;
-notemode_chord_inversion:
- {
- $$ = 0;
- }
- | '/' steno_musical_pitch {
- $$ = $2
- }
- ;
-
chord_note:
unsigned {
$$ = new Musical_pitch;
;
-
-
-dots:
- { $$ = 0; }
- | dots '.' { $$ ++; }
- ;
-
-
-
exclamations:
{ $$ = 0; }
| exclamations '!' { $$ ++; }
}
/*
- TODO. We should control the gap for lookup from here.
+ TODO.
*/
Molecule*
Tuplet_spanner::do_brew_molecule_p () const
Real thick = paper_l ()->get_realvar (tuplet_thick_scm_sym);
if (bracket_visibility)
{
- mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, interline, dir_));
+ Real gap = paper_l () -> get_var ("tuplet_spanner_gap");
+
+ mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, gap, interline, dir_));
}
if (number_visibility)
Real dx = internote_f;
Real w = extent (X_AXIS).length () - dx;
- Molecule volta (lookup_l ()->volta (w, t, interline_f, last_b_));
- Real h = volta.dim_.y ().length ();
+ Real h = paper_l()->get_var ("volta_spanner_height");
+ Molecule volta (lookup_l ()->volta (h, w, t, last_b_));
+
Molecule num (lookup_l ()->text ("volta", number_str_, paper_l ()));
Real dy = bar_arr_.top ()->extent (Y_AXIS) [UP] >
barthick_thin = 1.6*\staffline;
barthick_score = 1.6*\staffline;
+tuplet_spanner_gap = 2.0 * \interline;
tuplet_thick = 1.0*\staffline;
volta_thick = 1.6*\staffline;
+volta_spanner_height = 2.0 *\interline;
% relative thickness of thin lines 1.6 : 1 : 0.8
stemthickness = 0.8*\staffline;
extender_height = 0.8*\staffline;
+hyphen_thickness = 0.05*\font_normal;
+hyphen_height = 0.2*\font_normal;
+hyphen_minimum_length = 0.25*\font_normal;
+
% Multi-measure rests
mmrest_x_minimum = 2.0*\staffheight;
% deprecated!
postBreakPadding = 0.0;
+% optical correction amount.
stemSpacingCorrection = 0.5*\interline;
+
+
+
+
\include "engraver.ly";
% round cappings
1 setlinecap
-% URG
-% staffheight 4 div /interline exch def
-% interline 3 div /bracket_b exch def
-% interline 2 mul /bracket_w exch def
-% stafflinethickness 2 mul /bracket_t exch def
-% interline 1.5 mul /bracket_v exch def
-% bracket_v /bracket_u exch def
-% 50 /bracket_alpha exch def
/draw_beam % width slope thick
{
1 copy mul exch 1 copy mul add sqrt
} bind def
-/draw_tuplet % height dx dy thick dir
+/draw_tuplet % height gap dx dy thick dir
{
% urg: the only Level-2 PS, check effect in print
% true setstrokeadjust
1 setlinejoin
/tuplet_dy exch def
/tuplet_dx exch def
+ /tuplet_gapx exch def
/tuplet_h exch def
- staffheight 2 div /tuplet_gapx exch def
tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def
stroke
} bind def
-/draw_volta % w thick last
+/draw_volta % h w thick last
{
/last exch def
setlinewidth
/volta_w exch def
- staffheight 2 div /volta_h exch def
+ /volta_h exch def
% urg: the only Level-2 PS, check effect in print
% true setstrokeadjust
1 setlinecap
(string-append (number->string (cadr c)) " ")))
-(define
- (font i)
+(define (font i)
(string-append
"font"
(make-string 1 (integer->char (+ (char->integer #\A) i)))
(define (text s)
(string-append "\\hbox{" (output-tex-string s) "}"))
- (define (tuplet ht dx dy thick dir)
- (embedded-ps ((ps-scm 'tuplet) ht dx dy thick dir)))
+ (define (tuplet ht gapx dx dy thick dir)
+ (embedded-ps ((ps-scm 'tuplet) ht gapx dx dy thick dir)))
- (define (volta w thick last)
- (embedded-ps ((ps-scm 'volta) w thick last)))
+ (define (volta h w thick last)
+ (embedded-ps ((ps-scm 'volta) h w thick last)))
;; TeX
;; The procedures listed below form the public interface of TeX-scm.
(define (cached-fontname i)
(string-append
- " lilyfont"
+ "lilyfont"
(make-string 1 (integer->char (+ 65 i)))))
(define (select-font font-name)
(define (header-end) "")
(define (lily-def key val)
- (string-append
- "/" key " {" val "} bind def\n"))
+ (if (string=? (substring key 0 (string-length "mudelapaper") ) "mudelapaper")
+ (string-append "/" key " {" val "} bind def\n")
+ (string-append "/" key " (" val ") def\n")
+ )
+ )
(define (header creator generate)
(string-append
"%!PS-Adobe-3.0\n"
(string-append "(" s ") show "))
- (define (volta w thick last)
+ (define (volta h w thick last)
(string-append
- (numbers->string (list w thick (inexact->exact last)))
+ (numbers->string (list h w thick (inexact->exact last)))
" draw_volta"))
- (define (tuplet ht dx dy thick dir)
+ (define (tuplet ht gap dx dy thick dir)
(string-append
- (numbers->string (list ht dx dy thick (inexact->exact dir)))
+ (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
" draw_tuplet"))
"""
name = 'ly2dvi'
-version = '0.0.11'
+version = '0.0.12'
errorlog = ''
import sys
"""
os.environ['LILYPONDPREFIX'] = path
+ if os.name == 'nt' or os.name == 'dos':
+ path = unc2dos(path);
+
this.__set('root',path,requester)
+
#
# printProps
else:
return texfiles
+def unc2dos(path):
+ """
+ Convert a path of format //<drive>/this/that/the/other to
+ <drive>:\this\that\the\other
+ """
+ m=re.match('^//([A-Za-z])(/.*)$',path)
+ if m:
+ return m.group(1) + ':' + os.path.normpath(m.group(2))
+
+
+
def program_id ():
return name + ' ' + version;
# - bf: Default fragments have linewidth=-1.0
# - Added 'singleline' and 'multiline' options.
# 0.5.6:
-# - \mudelafile{} set linewith correct, -1 for .sly and texlinewidth for .fly
+# - \mudelafile{} set linewidth correct, -1 for .sly and texlinewidth for .fly
# - changes to Mudela_output
# - changed RE to search for pre/postMudelaExample to make it possible to
# comment out a definition.
20:'twenty', 26:'twentysix'}
fontsize_pt2i = {'11pt':11, '13pt':13, '16pt':16, '20pt':20, '26pt':26}
+# perhaps we can do without this?
+
begin_mudela_re = re.compile ('^ *\\\\begin{mudela}')
begin_verbatim_re = re.compile ('^ *\\\\begin{verbatim}')
end_verbatim_re = re.compile ('^ *\\\\end{verbatim}')
f = open (full_path, 'r')
lines =f.readlines ()
+ self.mudela.write ('%% This is a copy of file %s\n' % full_path)
for x in lines:
self.mudela.write (x)
r = file_ext_re.search(fn)
+dnl WARNING WARNING WARNING WARNING
+dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
dnl aclocal.m4 -*-shell-script-*-
dnl StepMake subroutines for configure.in
%% set up dimensions
% mudela-book don't like this:
%\parindent=0pt
-\newdimen\smallspace
\newdimen\interlinedist
-\newdimen\stemthickness
\newcount\n %duh. meaningful identifiers.
\newdimen\staffheight
-\newdimen\notewidth
-\newdimen\noteheight
\newdimen\stafflinethickness
-\newdimen\interstaffline
-\newdimen\dist
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set fonts and primary dimensions
% this has to be synced with the font definition
\def\musixcalc{
- \notewidth=\mudelapapernotewidth pt
- \smallspace=.3\interlinedist
- \interstaffline=\staffheight
- \divide\interstaffline by 4
\stafflinethickness=\mudelapaperrulethickness pt
- \stemthickness=\stafflinethickness
}