---- ../lilypond-1.3.30/CHANGES Mon Mar 6 12:10:00 2000
+--- ../lilypond-1.3.30.jcn1/CHANGES Tue Mar 7 23:59:44 2000
+++ b/CHANGES Wed Mar 8 15:35:43 2000
+@@ -1,3 +1,10 @@
+1.3.30.jcn2
+===========
+
+* Dynamic_performer: performs absolute dynamic requests.
+
+* David's comments on opus47
+
+ 1.3.30.jcn1
+ ===========
+ --- ../lilypond-1.3.30/CHANGES Mon Mar 6 12:10:00 2000
++ b/CHANGES Tue Mar 7 23:59:44 2000
@@ -1,3 +1,9 @@
1.3.30.jcn1
. * hard constraints for broken slurs to.
. * Staff_margin_engraver placement is broken for Staff.instr(ument)
. * Bracket/brace placement and stacking is broken
+. * Lattermann:
+
+ 2. There dynamic markings of the cello part are set in roman (maybe
+ because of pizz. and arco in roman?)
+
+ 4. Bar 41/42, violins: the ties should be the same direction, pref.
+ down in bar 42.
+ -- dir of broken ties
+
+ 7. This is a bug: there's a colon in the middle of the two harmonium
+ staves
+
+ 12. bars 82 to 84 and 88: the ties of upper harmonium should all bend down.
+ -- stemdown ~ stemup and at linebreak
+
+ 15. bar 89, harmonium, the ties coming from the previous line look strangely
+ asymmetric.
+
+
. * Mondrup:
- In some cases I don't get the large textsize within note examples I request.
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=30
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
--- /dev/null
+\score{
+\notes\relative c''{
+%segfault in engraver
+a1\ppp
+a1\pp
+a\p
+a\mp
+a\mf
+a\f
+a\ff
+a\fff
+a\sf
+}
+\paper{
+}
+\midi{
+\tempo 1 = 60;
+}
+}
key_ = k;
}
+Audio_dynamic::Audio_dynamic (int volume)
+{
+ volume_i_ = volume;
+}
+
Audio_tempo::Audio_tempo (int per_minute_4_i)
{
per_minute_4_i_ = per_minute_4_i;
#include "note-head.hh"
#include "group-interface.hh"
+/*
+ TODO:
+ multiple type of span dynamic:
+ * hairpin
+ * text:
+ - `cresc. -- -- --'
+ - `cresc. poco a poco -- -- --'
+ */
+
/**
print text & hairpin dynamics.
*/
--- /dev/null
+/*
+ dynamic-performer.cc -- implement Dynamic_performer
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include "performer.hh"
+#include "command-request.hh"
+#include "musical-request.hh"
+#include "audio-item.hh"
+
+/*
+ TODO:
+ handle multiple requests
+ handle span requests (crescendo/decrescendo)
+ */
+
+/**
+ perform absolute (text) dynamics
+ */
+class Dynamic_performer : public Performer
+{
+public:
+ VIRTUAL_COPY_CONS (Translator);
+
+ Dynamic_performer ();
+ ~Dynamic_performer ();
+
+protected:
+ void do_print () const;
+ virtual bool do_try_music (Music* req_l);
+ virtual void do_process_requests ();
+ virtual void do_pre_move_processing ();
+
+private:
+ Text_script_req* text_script_req_l_;
+ Audio_dynamic* audio_p_;
+};
+
+ADD_THIS_TRANSLATOR (Dynamic_performer);
+
+Dynamic_performer::Dynamic_performer ()
+{
+ text_script_req_l_ = 0;
+ audio_p_ = 0;
+}
+
+Dynamic_performer::~Dynamic_performer ()
+{
+}
+
+void
+Dynamic_performer::do_print () const
+{
+#ifndef NPRINT
+ if (text_script_req_l_)
+ text_script_req_l_->print ();
+#endif
+}
+
+void
+Dynamic_performer::do_process_requests ()
+{
+ if (text_script_req_l_)
+ {
+
+ SCM s = scm_eval
+ (gh_list
+ (ly_symbol2scm ("dynamic-absolute-volume"),
+ ly_quote_scm (ly_str02scm (text_script_req_l_->text_str_.ch_C ())),
+ SCM_UNDEFINED));
+ int volume = gh_scm2int (ly_eval_str ("dynamic-default-volume"));
+ if (gh_number_p (s))
+ volume = gh_scm2int (s);
+
+ audio_p_ = new Audio_dynamic (volume);
+ Audio_element_info info (audio_p_, text_script_req_l_);
+ announce_element (info);
+ text_script_req_l_ = 0;
+ }
+}
+
+void
+Dynamic_performer::do_pre_move_processing ()
+{
+ if (audio_p_)
+ {
+ play_element (audio_p_);
+ audio_p_ = 0;
+ }
+}
+
+bool
+Dynamic_performer::do_try_music (Music* r)
+{
+ if (!text_script_req_l_)
+ {
+ // urg, text script, style `dynamic' is how absolute dynamics appear
+ if(Text_script_req* t = dynamic_cast <Text_script_req*> (r))
+ {
+ if (t->style_str_ == "dynamic")
+ {
+ text_script_req_l_ = t;
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
Audio_item& operator=( Audio_item const&);
};
+class Audio_dynamic : public Audio_item
+{
+public:
+ Audio_dynamic (int volume);
+
+ int volume_i_;
+};
+
class Audio_key : public Audio_item
{
public:
struct All_font_metrics;
struct Articulation_req;
struct Audio_column;
+struct Audio_dynamic;
struct Audio_element;
struct Audio_element_info;
struct Audio_instrument;
struct Command_tie_engraver;
struct Crescendo ;
struct Dimension_cache;
+struct Dynamic_performer;
struct Spanner;
struct Dot_column;
struct Dots;
struct Melodic_req;
struct Midi_def;
struct Midi_duration;
+struct Midi_dynamic;
struct Midi_header;
struct Midi_item;
struct Midi_key;
struct Single_malt_grouping_item;
struct Skip_req;
struct Slur;
+struct Slur_bezier_bow;
struct Slur_engraver;
struct Spacing_spanner;
struct Span_bar;
Audio_text* audio_l_;
};
+class Midi_dynamic : public Midi_item
+{
+public:
+ Midi_dynamic (Audio_dynamic*);
+
+ virtual String str () const;
+
+ Audio_dynamic* audio_l_;
+};
+
class Midi_tempo : public Midi_item
{
public:
Array<Rod> get_rods () const;
private:
- void de_uglyfy (class Slur_bezier_bow* bb, Real default_height);
+ void de_uglyfy (Slur_bezier_bow* bb, Real default_height);
void set_extremities ();
void set_control_points ();
int cross_staff_count () const;
return i->str_.length_i () ? new Midi_instrument (i) : 0;
else if (Audio_note* i = dynamic_cast<Audio_note*> (a))
return new Midi_note (i);
+ else if (Audio_dynamic* i = dynamic_cast<Audio_dynamic*> (a))
+ return new Midi_dynamic (i);
else if (Audio_tempo* i = dynamic_cast<Audio_tempo*> (a))
return new Midi_tempo (i);
else if (Audio_time_signature* i = dynamic_cast<Audio_time_signature*> (a))
return str;
}
+Midi_dynamic::Midi_dynamic (Audio_dynamic* a)
+{
+ audio_l_ = a;
+}
+
+String
+Midi_dynamic::str () const
+{
+ Byte status_byte = (char) (0xB0 + channel_i_);
+ String str = to_str ((char)status_byte);
+
+ /*
+ Main volume controller (per channel):
+ 07 MSB
+ 27 LSB
+ */
+ str += to_str ((char)0x07);
+ str += to_str ((char)audio_l_->volume_i_);
+ return str;
+}
+
Midi_tempo::Midi_tempo (Audio_tempo* a)
{
audio_l_ = a;
+#(eval-string (ly-gulp-file "midi.scm"))
+
\midi {
\tempo 4=60;
\include "performer.ly"
\consists "Key_performer";
\consists "Time_signature_performer";
\consists "Tempo_performer";
+ dynamicStyle = #"dynamic"
};
\translator { \StaffContext }
\type "Performer_group_performer";
\name Voice;
% All notes fall to Grace if you leave Thread out (huh?)
+ \consists "Dynamic_performer"; % must come before text_engraver.
\consists "Grace_position_performer";
\accepts Thread;
\accepts Grace;
--- /dev/null
+;;; midi.scm -- scm midi variables and functions
+;;;
+;;; source file of the GNU LilyPond music typesetter
+;;;
+;;; (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+
+
+(define absolute-volume-alist '())
+(set! absolute-volume-alist
+ (append
+ '(
+ ("sf" . 115)
+ ("fff" . 102)
+ ("ff" . 90)
+ ("f" . 77)
+ ("mf" . 64)
+ ("mp" . 51)
+ ("p" . 38)
+ ("pp" . 26)
+ ("ppp" . 13)
+ )
+ absolute-volume-alist))
+
+(define (dynamic-absolute-volume s)
+ (let ((entry (assoc s absolute-volume-alist)))
+ (if entry
+ (cdr entry))))
+
+;; 90 is supposed to be the default value
+;; urg: we should set this at start of track
+(define dynamic-default-volume 90)