--- /dev/null
+\version "1.5.17"
+
+\score { \notes \context Staff \transpose c''' {
+ \key d \major
+ \property Staff.autoReminders = #'cautionary
+ \property Staff.Accidentals \override #'font-relative-size = #0
+ <dis1 c> cis2 d
+ \property Staff.Accidentals \override #'cautionary-size = #-1
+ <dis1 c> cis2 d
+ \property Staff.Accidentals \override #'paren-cautionaries = ##f
+ <dis1 c> cis2 d
+
+}
+}
+
\include "drumpitch-init.ly"
-\version "1.3.146"
+\version "1.5.1"
drh = \notes { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
drl = \notes {\repeat "unfold" 3 {bd4 sn8 bd bd4 <bd ss>} bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
}
\include "deutsch.ly"
+\version "1.5.18"
#(define (transform music)
(let* ((es (ly-get-mus-property music 'elements))
#(define ((trans pitches) music)
(let* ((es (ly-get-mus-property music 'elements))
(e (ly-get-mus-property music 'element))
- (p (ly-get-mus-property music 'pitch))
- (body (ly-get-mus-property music 'body))
- (alts (ly-get-mus-property music 'alternatives)))
+ (p (ly-get-mus-property music 'pitch)))
(if (pair? es)
(ly-set-mus-property
music 'elements
(map (trans pitches) es)))
- (if (music? alts)
- (ly-set-mus-property
- music 'alternatives
- ((trans pitches) alts)))
-
- (if (music? body)
- (ly-set-mus-property
- music 'body
- ((trans pitches) body)))
-
(if (music? e)
(ly-set-mus-property
music 'element
-\version "1.3.146"
+\version "1.5.18"
\header {
texidoc="
#(define (simplify music)
(let* ((es (ly-get-mus-property music 'elements))
(e (ly-get-mus-property music 'element))
- (p (ly-get-mus-property music 'pitch))
- (body (ly-get-mus-property music 'body))
- (alts (ly-get-mus-property music 'alternatives)))
+ (p (ly-get-mus-property music 'pitch)))
(if (pair? es)
(ly-set-mus-property
music 'elements
(map (lambda (x) (simplify x)) es)))
- (if (music? alts)
- (ly-set-mus-property
- music 'alternatives
- (simplify alts)))
-
- (if (music? body)
- (ly-set-mus-property
- music 'body
- (simplify body)))
-
(if (music? e)
(ly-set-mus-property
music 'element
virtual void acknowledge_grob (Grob_info);
virtual void stop_translation_timestep ();
virtual void initialize ();
- virtual int number_accidentals (SCM sig, Note_req *);
virtual void create_grobs ();
virtual void finalize ();
public:
daddy_trans_l_->set_property ("lazyKeySignature", last_keysig_);
}
-/** calculates the number of accidentals on basis of the current local time sig
+/** calculates the number of accidentals on basis of the current local key sig
* (passed as argument).
* Returns number of accidentals (0, 1 or 2).
* Negative (-1 or -2) if accidental has changed.
**/
-int
-Accidental_engraver::number_accidentals (SCM sig, Note_req * note_l)
+static int
+number_accidentals (SCM sig, Note_req * note_l)
{
- int n = unsmob_pitch (note_l->get_mus_property ("pitch"))->notename_i_;
- int o = unsmob_pitch (note_l->get_mus_property ("pitch"))->octave_i () ;
- int a = unsmob_pitch (note_l->get_mus_property ("pitch"))->alteration_i_;
+ Pitch *pitch = unsmob_pitch (note_l->get_mus_property ("pitch"));
+ int n = pitch->notename_i_;
+ int o = pitch->octave_i () ;
+ int a = pitch->alteration_i_;
SCM prev = scm_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), sig);
if (prev == SCM_BOOL_F)
always do the correct thing?
(???? -Rune )
*/
- int n = unsmob_pitch (note_l->get_mus_property ("pitch"))->notename_i_;
- int o = unsmob_pitch (note_l->get_mus_property ("pitch"))->octave_i () ;
- int a = unsmob_pitch (note_l->get_mus_property ("pitch"))->alteration_i_;
- SCM ON = gh_cons (gh_int2scm (o), gh_int2scm (n));
+
+ Pitch *pitch = unsmob_pitch (note_l->get_mus_property ("pitch"));
+ int n = pitch->notename_i_;
+ int o = pitch->octave_i () ;
+ int a = pitch->alteration_i_;
+ SCM on = gh_cons (gh_int2scm (o), gh_int2scm (n));
bool forget = to_boolean (get_property ("forgetAccidentals"));
if (tie_changes)
{
/*
Remember an alteration that is different both from
that of the tied note and of the key signature.
- (????? -Rune )
*/
- localsig = scm_assoc_set_x (localsig, ON, SCM_BOOL_T);
- lazysig = scm_assoc_set_x (lazysig, ON, SCM_BOOL_T);
+ localsig = scm_assoc_set_x (localsig, on, SCM_BOOL_T);
+ lazysig = scm_assoc_set_x (lazysig, on, SCM_BOOL_T);
}
else if (!forget)
{
not really really correct if there are more than one
noteheads with the same notename.
*/
- localsig = scm_assoc_set_x (localsig, ON, gh_int2scm (a));
- lazysig = scm_assoc_set_x (lazysig, ON, gh_int2scm (a));
+ localsig = scm_assoc_set_x (localsig, on, gh_int2scm (a));
+ lazysig = scm_assoc_set_x (lazysig, on, gh_int2scm (a));
}
}
with note heads), this needs to be in a context higher than Tie_engraver. FIXME",
/* creats*/ "Accidentals",
/* acks */ "rhythmic-head-interface tie-interface arpeggio-interface",
-/* reads */ "localKeySignature forgetAccidentals noResetKey",
+/* reads */ "localKeySignature forgetAccidentals noResetKey autoReminders",
/* write */ "");
Moment extend_mom_;
Moment beam_start_moment_;
Moment beam_start_location_;
+
+ bool subdivide_beams_;
// We act as if beam were created, and start a grouping anyway.
Beaming_info_list*grouping_p_;
grouping_p_ = new Beaming_info_list;
beam_start_moment_ = now_mom ();
beam_start_location_ = *unsmob_moment (get_property ("measurePosition"));
-
-
+ subdivide_beams_ = gh_scm2bool(get_property("subdivideBeams"));
}
if (finished_beam_p_)
{
finished_grouping_p_->beamify(*unsmob_moment (get_property ("beatLength")),
- (bool)gh_scm2bool(get_property("subdivideBeams")));
+ subdivide_beams_);
Beam::set_beaming (finished_beam_p_, finished_grouping_p_);
typeset_grob (finished_beam_p_);
finished_beam_p_ = 0;
",
/* creats*/ "Beam",
/* acks */ "stem-interface rest-interface beam-interface bar-line-interface",
-/* reads */ "noAutoBeaming autoBeamSettings",
+/* reads */ "noAutoBeaming autoBeamSettings subdivideBeams",
/* write */ "");
/// moment (global time) where beam started.
Moment beam_start_mom_;
-
+
+ bool subdivide_beams_;
+
void typeset_beam ();
void set_melisma (bool);
protected:
beam_info_p_ =0;
reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0;
prev_start_req_ =0;
+
}
bool
if (finished_beam_p_)
{
finished_beam_info_p_->beamify(*unsmob_moment (get_property ("beatLength")),
- (bool)gh_scm2bool(get_property("subdivideBeams")));
+ subdivide_beams_);
Beam::set_beaming (finished_beam_p_, finished_beam_info_p_);
typeset_grob (finished_beam_p_);
if (to_boolean (m) && to_boolean (b)) {
set_melisma (true);
}
+ subdivide_beams_ = gh_scm2bool(get_property("subdivideBeams"));
}
}
printed with flags instead of beams.",
/* creats*/ "Beam",
/* acks */ "stem-interface rest-interface",
-/* reads */ "beamMelismaBusy",
+/* reads */ "beamMelismaBusy subdivideBeams",
/* write */ "");
oct_b = true;
}
+
lastoct = p.octave_i () ;
+ bool cautionary = (scm_memq (ly_symbol2scm ("cautionary"), opts) != SCM_BOOL_F);
+ SCM font_rel_siz = me->get_grob_property("font-relative-size");
+ SCM caut_siz = me->get_grob_property("cautionary-size");
+ int frs = (gh_exact_p(font_rel_siz) ? gh_scm2int(font_rel_siz) : 0);
+ int cs = (gh_exact_p(caut_siz) ? gh_scm2int(caut_siz) : 0);
+
+
+ // Ugh. This will only work if only called once on each grob. --rz
+ if (cautionary && caut_siz!=0)
+ me->set_grob_property ("font-relative-size",gh_int2scm(frs+cs));
+
SCM c0 = me->get_grob_property ("c0-position");
Real dy = (gh_number_p (c0) ? gh_scm2int (c0) : 0 + p.notename_i_)
* note_distance;
acc.add_at_edge (X_AXIS, LEFT, Molecule (prefix), 0);
}
- if (scm_memq (ly_symbol2scm ("cautionary"), opts) != SCM_BOOL_F)
- acc = parenthesize (me, acc);
+ if (cautionary && to_boolean(me->get_grob_property("paren-cautionaries")))
+ acc = parenthesize (me, acc);
acc.translate_axis (dy, Y_AXIS);
octave_mol.add_at_edge (X_AXIS, RIGHT, acc, 0);
(mutehiconga cghm ,(make-pitch 0 1 0))
(openhiconga cgho ,(make-pitch 0 1 1))
(hiconga cgh ,(make-pitch 0 2 -1))
- (openloconga cglo ,(make-pitch 0 1 2))
+ (openloconga cglo ,(make-pitch 0 1 2))
(loconga cgl ,(make-pitch 0 2 0))
(hitimbale timh ,(make-pitch 0 3 0))
(lotimbale timl ,(make-pitch 0 3 1))
(music-property-description 'span-type symbol? "What kind of spanner should be created?")
(music-property-description 'articulation-type symbol? "key for scriptDefinitions alist")
(music-property-description 'bass boolean? "Set if this note is a bass note in a chord")
-(music-property-description 'body music? "The body of a repeat ")
(music-property-description 'cautionary boolean? "If set, this alteration needs cautionary accidental")
(music-property-description 'change-to-id string? "name of the context to change to ")
(music-property-description 'change-to-type string? "type of the context to change to.")