From 1d0c1b5899beabc7bc8a1f7b75a3387de08b9e92 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 21 Mar 2000 13:13:46 +0100 Subject: [PATCH] patch::: 1.3.37.jcn1 1.3.37.jcn1 =========== * Fixed performance of (de)crescendi. * Better documentation for arithmetic_multiplier and arithmetic_basicspace in params.ly. * Added instrument-equaliser for MIDI output, see scm/midi.scm, and properties midiMinimumVolume, midiMaximumVolume, ranges [0,1]. * Changed absolute midi volume settings into factor of full scale. * Fixed another dynamic-line-spanner bug, it gets hairy. * Added warning for spanners that are not fully contained in parent spanner. --- CHANGES | 17 +++ VERSION | 2 +- input/test/coriolan-margin.ly | 10 +- input/test/equaliser.ly | 151 ++++++++++++++++++++++ lily/audio-item.cc | 4 +- lily/dynamic-engraver.cc | 62 +++++---- lily/dynamic-performer.cc | 45 ++++++- lily/include/audio-item.hh | 4 +- lily/include/axis-group-engraver.hh | 3 +- lily/include/spanner.hh | 6 +- lily/midi-item.cc | 10 +- lily/span-dynamic-performer.cc | 116 +++++++++-------- lily/spanner.cc | 51 ++++++-- ly/engraver.ly | 4 +- ly/params.ly | 43 +++++-- ly/performer.ly | 20 --- mutopia/Coriolan/coriolan-midi.ly | 15 +++ mutopia/Coriolan/coriolan-paper.ly | 19 +-- mutopia/Coriolan/coriolan-part-paper.ly | 24 ++-- mutopia/Coriolan/violino-1.ly | 18 +-- mutopia/Coriolan/violino-2.ly | 16 +-- mutopia/Coriolan/violoncello.ly | 8 +- po/lilypond.pot | 32 +++-- po/nl.po | 159 ++++-------------------- scm/midi.scm | 48 +++++-- 25 files changed, 542 insertions(+), 345 deletions(-) create mode 100644 input/test/equaliser.ly diff --git a/CHANGES b/CHANGES index 4b4c02e510..48793fd84a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,20 @@ +1.3.37.jcn1 +=========== + +* Fixed performance of (de)crescendi. + +* Better documentation for arithmetic_multiplier and arithmetic_basicspace + in params.ly. + +* Added instrument-equaliser for MIDI output, see scm/midi.scm, and + properties midiMinimumVolume, midiMaximumVolume, ranges [0,1]. + +* Changed absolute midi volume settings into factor of full scale. + +* Fixed another dynamic-line-spanner bug, it gets hairy. + +* Added warning for spanners that are not fully contained in parent spanner. + 1.3.36.hwn1 =========== diff --git a/VERSION b/VERSION index b0b101c703..bda133cd29 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=37 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=jcn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly index ed5103356d..865543e8f1 100644 --- a/input/test/coriolan-margin.ly +++ b/input/test/coriolan-margin.ly @@ -1,6 +1,7 @@ flauti = \notes \relative c' { \property Staff.instrument = #"2 Flauti" \property Staff.instr = #"Fl." + \time 4/4; c1 \break c % \break c @@ -121,12 +122,15 @@ violoncello = \notes \relative c' { \HaraKiriStaffContext } \translator { - \ScoreContext + \OrchestralScoreContext + timeSignatureStyle = #"C" + % 16 pt instrumentScriptPadding = #55 %% urg, this is in pt instrScriptPadding = #35 + % 20pt + %instrumentScriptPadding = #60 %% urg, this is in pt + %instrScriptPadding = #40 marginScriptHorizontalAlignment = #1 - %marginScriptPadding = #15 - %marginScriptHorizontalAlignment = #0 } } } diff --git a/input/test/equaliser.ly b/input/test/equaliser.ly new file mode 100644 index 0000000000..384ad6606b --- /dev/null +++ b/input/test/equaliser.ly @@ -0,0 +1,151 @@ + +flauti = \notes \relative c' { + \property Staff.midiInstrument = #"flute" + \property Staff.instrument = #"2 Flauti" + \property Staff.instr = #"Fl." + + c1 R1*10 +} + +oboi = \notes \relative c' { + \property Staff.midiInstrument = #"oboe" + \property Staff.instrument = #"2 Oboi" + \property Staff.instr = #"Ob." + + R1*1 c1 R1*9 +} + +clarinetti = \notes \relative c' { + \property Staff.midiInstrument = #"clarinet" + \property Staff.instrument = #"2 Clarinetti\n(B\\textflat)" + \property Staff.instr = #"Cl.\n(B\\textflat)" + + R1*2 c1 R1*8 +} + +fagotti = \notes \relative c' { + \property Staff.midiInstrument = #"bassoon" + \property Staff.instrument = #"2 Fagotti" + \property Staff.instr = #"Fg." + + R1*3 c1 R1*7 +} + +corni = \notes \relative c' { + \property Staff.midiInstrument = #"french horn" + \property Staff.instrument = #"2 Corni\n(E\\textflat)" + \property Staff.instr = #"Cor.\n(E\\textflat)" + + R1*4 c1 R1*6 +} + +trombe = \notes \relative c' { + \property Staff.midiInstrument = #"trumpet" + \property Staff.instrument = #"2 Trombe\n(C)" + \property Staff.instr = #"Tbe.\n(C)" + + R1*5 c1 R1*5 +} + +timpani = \notes \relative c' { + \property Staff.midiInstrument = #"timpani" + \property Staff.instrument = #"Timpani\n(C-G)" + \property Staff.instr = #"Timp." + + R1*6 c1 R1*4 +} + +violino1 = \notes \relative c' { + \property Staff.midiInstrument = #"violin" + \property Staff.instrument = #"Violino I" + \property Staff.instr = #"Vl. I" + + R1*7 c1 R1*3 +} + +violino2 = \notes \relative c' { + \property Staff.midiInstrument = #"violin" + \property Staff.instrument = #"Violino II" + \property Staff.instr = #"Vl. II" + + R1*8 c1 R1*2 +} + +viola = \notes \relative c' { + \property Staff.midiInstrument = #"viola" + \property Staff.instrument = #"Viola" + \property Staff.instr = #"Vla." + + R1*9 c1 R1*1 +} + +violoncello = \notes \relative c' { + \property Staff.midiInstrument = #"cello" + %\property Staff.midiInstrument = #"contrabass" + \property Staff.instrument = #"Violoncello\ne\nContrabasso" + \property Staff.instr = #"Vc.\nCb." + + R1*10 c1 +} + +\include "paper16.ly" + +\score { + < + \context StaffGroup ="legni" < + \context Staff ="flauti" \flauti + \context Staff ="oboi" \oboi + \context Staff ="clarinetti" \clarinetti + \context Staff ="fagotti" \fagotti + > + \context StaffGroup ="ottoni" < + \context Staff ="corni" \corni + \context Staff ="trombe" \trombe + > + \context StaffGroup ="timpani" < + \context Staff ="timpani" \timpani + { + \skip 1; + % Hmm: this forces a staff-bracket, that's good! + % However, I can't find where is decided on staff-bracket yes/no + } + > + \context StaffGroup ="archi" < + \context GrandStaff ="violini" < + \context Staff ="violino1" \violino1 + \context Staff ="violino2" \violino2 + > + \context Staff ="viola" \viola + \context Staff ="violoncello" \violoncello + > + > + \header{ + title = "Coriolan"; + subtitle = "Ouverture"; + opus = "Opus 62"; + composer = "Ludwig van Beethoven (1770-1827)"; + enteredby = "JCN"; + copyright = "public domain"; + } + + \paper { + \paper_sixteen + indent=100.0\mm; + linewidth=150.0\mm; + \translator { + \HaraKiriStaffContext + } + \translator { + \ScoreContext + %instrumentScriptPadding = #55 %% urg, this is in pt + %instrScriptPadding = #35 + marginScriptHorizontalAlignment = #1 + %marginScriptPadding = #15 + %marginScriptHorizontalAlignment = #0 + } + } + \midi { + \tempo 1 = 60; + } +} + diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 60b15abb5c..5d78ec4bd5 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -45,9 +45,9 @@ Audio_key::Audio_key (Key_def const& k) key_ = k; } -Audio_dynamic::Audio_dynamic (int volume) +Audio_dynamic::Audio_dynamic (Real volume) { - volume_i_ = volume; + volume_ = volume; } Audio_tempo::Audio_tempo (int per_minute_4_i) diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 8309597e50..7ca99417dd 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -32,6 +32,8 @@ * direction of text-dynamic-request if not equalt to direction of line-spanner + + * FIXME: this has gotten a bit too hairy. */ class Dynamic_line_spanner : public Spanner @@ -87,7 +89,7 @@ class Dynamic_engraver : public Engraver Dynamic_line_spanner* finished_line_spanner_; Moment last_request_mom_; - Note_column* pending_column_; + Array pending_column_arr_; Link_array pending_element_arr_; void typeset_all (); @@ -126,7 +128,6 @@ Dynamic_engraver::Dynamic_engraver () finished_line_spanner_ = 0; span_start_req_l_ = 0; cresc_p_ =0; - pending_column_ = 0; text_req_l_ = 0; span_req_l_drul_[START] = 0; @@ -139,12 +140,6 @@ Dynamic_engraver::do_post_move_processing () text_req_l_ = 0; span_req_l_drul_[START] = 0; span_req_l_drul_[STOP] = 0; - - /* ugr; we must attach the Dynamic_line_spanner to something - to be sure that the linebreaker will not be confused - */ - // if (line_spanner_) - // line_spanner_->add_column (LEFT, get_staff_info ().command_pcol_l ()); } bool @@ -178,8 +173,9 @@ Dynamic_engraver::do_process_music () && pending_element_arr_.size ()) { line_spanner_ = new Dynamic_line_spanner; - assert (pending_column_); - line_spanner_->add_column (pending_column_); + for (int i = 0; i < pending_column_arr_.size (); i++) + line_spanner_->add_column (pending_column_arr_[i]); + pending_column_arr_.clear (); announce_element (Score_element_info (line_spanner_, text_req_l_ ? text_req_l_ : span_req_l_drul_[START])); @@ -193,13 +189,22 @@ Dynamic_engraver::do_process_music () pending_element_arr_.clear (); } + /* + TODO: This should be optionised: + * break when group of dynamic requests ends + * break now (only if no cresc. in progress) + * continue through piece */ if (span_req_l_drul_[START] || span_req_l_drul_[STOP] || text_req_l_) - last_request_mom_ = now_mom (); + { + last_request_mom_ = now_mom (); + } else { - -#if 0 /* + During a (de)crescendo, pending request will not be cleared, + and a line-spanner will always be created, as \< \! are already + two requests. + Maybe always creating a line-spanner for a (de)crescendo (see below) is not a good idea: @@ -212,15 +217,7 @@ Dynamic_engraver::do_process_music () Urg, but line-spanner must always have at least same duration as (de)crecsendo, b.o. line-breaking. */ - if (now_mom () > last_request_mom_) -#else - /* - During a (de)crescendo, pending request will not be cleared, - and a line-spanner will always be created, as \< \! are already - two requests. - */ if (now_mom () > last_request_mom_ && !span_start_req_l_) -#endif { for (int i = 0; i < pending_element_arr_.size (); i++) { @@ -250,8 +247,14 @@ Dynamic_engraver::do_process_music () e->set_elt_property ("minimum-space", s); } pending_element_arr_.clear (); - finished_line_spanner_ = line_spanner_; - line_spanner_ = 0; + if (line_spanner_) + { + for (int i = 0; i < pending_column_arr_.size (); i++) + line_spanner_->add_column (pending_column_arr_[i]); + pending_column_arr_.clear (); + finished_line_spanner_ = line_spanner_; + line_spanner_ = 0; + } } } @@ -284,7 +287,7 @@ Dynamic_engraver::do_process_music () else { assert (!finished_cresc_p_); - cresc_p_->set_bound(RIGHT, get_staff_info ().musical_pcol_l ()); + cresc_p_->set_bound (RIGHT, get_staff_info ().musical_pcol_l ()); finished_cresc_p_ = cresc_p_; cresc_p_ = 0; span_start_req_l_ = 0; @@ -326,7 +329,7 @@ Dynamic_engraver::do_process_music () + "Spanner", SCM_UNDEFINED); } - cresc_p_->set_bound(LEFT, get_staff_info ().musical_pcol_l ()); + cresc_p_->set_bound (LEFT, get_staff_info ().musical_pcol_l ()); /* @@ -400,13 +403,6 @@ Dynamic_engraver::typeset_all () typeset_element (text_p_); text_p_ = 0; } - - /* - TODO: This should be optionised: - * break when group of dynamic requests ends - * break now - * continue through piece */ - // if (line_spanner_ && last_request_mom_ < now_mom ()) if (finished_line_spanner_) { side_position (finished_line_spanner_).add_staff_support (); @@ -427,7 +423,7 @@ Dynamic_engraver::acknowledge_element (Score_element_info i) } else { - pending_column_ = n; + pending_column_arr_.push (n); } } } diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index 7fbca0dd69..e6daf5e310 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -71,10 +71,49 @@ Dynamic_performer::do_process_music () (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")); + Real volume = gh_scm2double (ly_eval_str ("dynamic-default-volume")); if (gh_number_p (s)) - volume = gh_scm2int (s); - + volume = gh_scm2double (s); + + /* + properties override default equaliser setting + */ + SCM min = get_property ("midiMinimumVolume"); + SCM max = get_property ("midiMaximumVolume"); + if (gh_number_p (min) || gh_number_p (max)) + { + Interval iv (0, 1); + if (gh_number_p (min)) + iv[MIN] = gh_scm2double (min); + if (gh_number_p (max)) + iv[MAX] = gh_scm2double (max); + volume = iv[MIN] + iv.length () * volume; + } + else + { + /* + urg, code duplication:: staff_performer + */ + s = get_property ("midiInstrument"); + + if (!gh_string_p(s)) + s = get_property ("instrument"); + + if (!gh_string_p(s)) + s = ly_str02scm ("piano"); + + + s = scm_eval (gh_list (ly_symbol2scm ("instrument-equaliser"), + s, SCM_UNDEFINED)); + if (gh_pair_p (s)) + { + Interval iv; + iv[MIN] = gh_scm2double (gh_car (s)); + iv[MAX] = gh_scm2double (gh_cdr (s)); + volume = iv[MIN] + iv.length () * volume; + } + } + audio_p_ = new Audio_dynamic (volume); Audio_element_info info (audio_p_, text_script_req_l_); announce_element (info); diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index fd465f9f4c..9b59283804 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -40,9 +40,9 @@ private: class Audio_dynamic : public Audio_item { public: - Audio_dynamic (int volume); + Audio_dynamic (Real volume); - int volume_i_; + Real volume_; }; class Audio_key : public Audio_item diff --git a/lily/include/axis-group-engraver.hh b/lily/include/axis-group-engraver.hh index f790997d85..23d8793a21 100644 --- a/lily/include/axis-group-engraver.hh +++ b/lily/include/axis-group-engraver.hh @@ -14,7 +14,8 @@ #include "engraver.hh" /** - Put stuff in a Axis_group_spanner. Use as last element of a context. + Put stuff in a Spanner with an Axis_group_interface. + Use as last element of a context. */ class Axis_group_engraver : public Engraver { diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index b67d63d7dc..f7c058b701 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -12,8 +12,6 @@ #include "drul-array.hh" #include "rod.hh" - -class Axis_group_spanner; /** A symbol which is attached between two columns. A spanner is a symbol which spans across several columns, so its final appearance can only be calculated after the breaking problem is solved. @@ -32,10 +30,14 @@ class Axis_group_spanner; */ class Spanner : public Score_element { + // SCMify me Drul_array spanned_drul_; public: + // SCMify me Link_array broken_into_l_arr_; + + Interval_t spanned_rank_iv (); void set_bound (Direction d, Item*); Item *get_bound (Direction d) const; diff --git a/lily/midi-item.cc b/lily/midi-item.cc index b822a6655e..a5921325e2 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -476,8 +476,16 @@ Midi_dynamic::str () const 07 MSB 27 LSB */ + static Real const full_scale = 127; + + int volume = (int)(audio_l_->volume_*full_scale); + if (volume <= 0) + volume = 1; + if (volume > full_scale) + volume = (int)full_scale; + str += to_str ((char)0x07); - str += to_str ((char)audio_l_->volume_i_); + str += to_str ((char)volume); return str; } diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index b4807e3a9d..deef286259 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -28,14 +28,16 @@ public: Span_dynamic_performer (); protected: - virtual bool do_try_music (Music* req_l); + virtual bool do_try_music (Music*); virtual void acknowledge_element (Audio_element_info); + virtual void process_acknowledged (); virtual void do_process_music (); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); private: Audio_dynamic* audio_p_; + Real last_volume_; Span_req* span_start_req_l_; Drul_array span_req_l_drul_; Array dynamic_tuple_arr_; @@ -52,6 +54,7 @@ Span_dynamic_performer::Span_dynamic_performer () span_req_l_drul_[STOP] = 0; span_start_req_l_ = 0; audio_p_ = 0; + last_volume_ = 0; } void @@ -59,23 +62,72 @@ Span_dynamic_performer::acknowledge_element (Audio_element_info i) { if (Audio_dynamic * d = dynamic_cast (i.elem_l_)) { - Audio_dynamic_tuple a = { d, now_mom () }; - if (!span_req_l_drul_[START]) - dynamic_tuple_arr_.clear (); - dynamic_tuple_arr_.push (a); - if (finished_dynamic_tuple_arr_.size ()) - finished_dynamic_tuple_arr_.push (a); + last_volume_ = d->volume_; } } void Span_dynamic_performer::do_process_music () { - if (finished_dynamic_tuple_arr_.size () > 1 - && finished_dynamic_tuple_arr_.top ().audio_l_->volume_i_) + if (span_start_req_l_ || span_req_l_drul_[START]) + { + audio_p_ = new Audio_dynamic (0); + Audio_element_info info (audio_p_, span_req_l_drul_[START] + ? span_req_l_drul_[START] + : span_req_l_drul_[STOP]); + announce_element (info); + Audio_dynamic_tuple a = { audio_p_, now_mom () }; + dynamic_tuple_arr_.push (a); + } + + if (span_req_l_drul_[STOP]) + { + if (!span_start_req_l_) + { + span_req_l_drul_[STOP]->warning (_ ("can't find start of (de)crescendo")); + } + else + { + finished_dir_ = dir_; + finished_dynamic_tuple_arr_ = dynamic_tuple_arr_; + } + dynamic_tuple_arr_.clear (); + span_start_req_l_ = 0; + } + + if (span_req_l_drul_[START]) + { + dir_ = span_req_l_drul_[START]->span_type_str_ == "crescendo" + ? RIGHT : LEFT; + span_start_req_l_ = span_req_l_drul_[START]; + + dynamic_tuple_arr_.clear (); + Audio_dynamic_tuple a = { audio_p_, now_mom () }; + dynamic_tuple_arr_.push (a); + } +} + +void +Span_dynamic_performer::process_acknowledged () +{ + if (span_req_l_drul_[STOP]) + { + finished_dynamic_tuple_arr_.top ().audio_l_->volume_ = last_volume_; + } + + if (span_req_l_drul_[START]) + { + dynamic_tuple_arr_[0].audio_l_->volume_ = last_volume_; + } +} + +void +Span_dynamic_performer::do_pre_move_processing () +{ + if (finished_dynamic_tuple_arr_.size () > 1) { - Real start_volume = finished_dynamic_tuple_arr_[0].audio_l_->volume_i_; - Real dv = finished_dynamic_tuple_arr_.top ().audio_l_->volume_i_ + Real start_volume = finished_dynamic_tuple_arr_[0].audio_l_->volume_; + Real dv = finished_dynamic_tuple_arr_.top ().audio_l_->volume_ - start_volume; /* urg. @@ -90,11 +142,11 @@ Span_dynamic_performer::do_process_music () */ if (!dv || sign (dv) != finished_dir_) { - // urg. about one volume step - dv = (int)finished_dir_ * 13; + // urg. 20%: about two volume steps + dv = (Real)finished_dir_ * 0.2; if (!start_volume) start_volume = finished_dynamic_tuple_arr_.top - ().audio_l_->volume_i_ - dv; + ().audio_l_->volume_ - dv; } Moment start_mom = finished_dynamic_tuple_arr_[0].mom_; Moment dt = finished_dynamic_tuple_arr_.top ().mom_ - start_mom; @@ -103,45 +155,11 @@ Span_dynamic_performer::do_process_music () Audio_dynamic_tuple* a = &finished_dynamic_tuple_arr_[i]; Real volume = start_volume + dv * (Real)(a->mom_ - start_mom) / (Real)dt; - a->audio_l_->volume_i_ = (int)volume; + a->audio_l_->volume_ = volume; } finished_dynamic_tuple_arr_.clear (); } - if (span_req_l_drul_[STOP]) - { - finished_dir_ = dir_; - if (!span_start_req_l_) - { - span_req_l_drul_[STOP]->warning (_ ("can't find start of (de)crescendo")); - } - else - { - span_start_req_l_ = 0; - finished_dynamic_tuple_arr_ = dynamic_tuple_arr_; - dynamic_tuple_arr_.clear (); - if (finished_dynamic_tuple_arr_.size ()) - dynamic_tuple_arr_.push (finished_dynamic_tuple_arr_.top ()); - } - } - - if (span_req_l_drul_[START]) - { - dir_ = span_req_l_drul_[START]->span_type_str_ == "crescendo" - ? RIGHT : LEFT; - span_start_req_l_ = span_req_l_drul_[START]; - audio_p_ = new Audio_dynamic (0); - Audio_element_info info (audio_p_, 0); - announce_element (info); - - Audio_dynamic_tuple a = { audio_p_, now_mom () }; - dynamic_tuple_arr_.push (a); - } -} - -void -Span_dynamic_performer::do_pre_move_processing () -{ if (audio_p_) { play_element (audio_p_); diff --git a/lily/spanner.cc b/lily/spanner.cc index 222a391496..7b6a4d0f08 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -18,21 +18,42 @@ #include "line-of-score.hh" #include "break-align-item.hh" + void -Spanner::do_break_processing() +Spanner::do_break_processing () { //break_into_pieces + Item * left = spanned_drul_[LEFT]; + Item * right = spanned_drul_[RIGHT]; + + if (left == right) + { + warning (_f ("Spanner `%s' has equal left and right spanpoints", + classname (this))); + } + + /* + Check if our parent in X-direction spans equally wide + or wider than we do. + */ + for (int a = X_AXIS; a < NO_AXES; a ++) + { + if (Spanner* parent = dynamic_cast (parent_l ((Axis)a))) + { + if (!parent->spanned_rank_iv ().contains_b (this->spanned_rank_iv ())) + { + programming_error (to_str ("Spanner `%s' is not fully contained in parent spanner `%s'.", + classname (this), + classname (parent))); + } + } + } if (line_l () || broken_b ()) return; - - Item * left = spanned_drul_[LEFT]; - Item * right = spanned_drul_[RIGHT]; if (left == right) { - warning (_ ("Left spanpoint is right spanpoint")); - /* FIXME: this is broken. */ @@ -99,6 +120,21 @@ Spanner::set_my_columns() while (flip(&i) != LEFT); } +Interval_t +Spanner::spanned_rank_iv () +{ + Interval_t iv (0, 0); + + if (spanned_drul_[LEFT]) + { + iv[LEFT] = spanned_drul_[LEFT]->column_l ()->rank_i (); + } + if ( spanned_drul_[RIGHT]) + { + iv[RIGHT] = spanned_drul_[RIGHT]->column_l ()->rank_i (); + } + return iv; +} Item* Spanner::get_bound (Direction d) const @@ -125,7 +161,8 @@ Spanner::set_bound(Direction d, Item*i) if (spanned_drul_[Direction(-d)] == spanned_drul_[d] && i) - warning (_f ("Spanner `%s' has equal left and right spanpoints", classname (this))); + warning (_f ("Spanner `%s' has equal left and right spanpoints", + classname (this))); } diff --git a/ly/engraver.ly b/ly/engraver.ly index c8f6b73bdb..4d867868af 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -118,8 +118,8 @@ VoiceContext = \translator { \type "Engraver_group_engraver"; \name Voice; - dynamicPadding = #5 % urg, in \pt - dynamicMinimumSpace = #10 % urg, in \pt + dynamicPadding = #3 % urg, in \pt + dynamicMinimumSpace = #6 % urg, in \pt Generic_property_list = #generic-voice-properties \consists "Output_property_engraver"; diff --git a/ly/params.ly b/ly/params.ly index c57a1120d5..a0f86cdf28 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -27,16 +27,45 @@ interbeam4 = (3.0 * \staffspace - \beam_thickness) / 3.0; %{ The space taken by a note is determined by the formula -arithmetic_multiplier * ( c + log2 (time) )) + SPACE = arithmetic_multiplier * ( C + log2 (TIME) )) + +where TIME is the amount of time a note occupies. The value of C is +chosen such that the smallest space within a measure is +arithmetic_basicspace: + + C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) + +The smallest space is the one following the shortest note in the +measure, or the space following a hypothetical 1/8 note. Typically +arithmetic_basicspace is set to a value so that the shortest note +takes about two noteheads of space (ie, is followed by a notehead of +space): + + 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) )) + + { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) } + { assuming: SHORTEST <= 1/8 } + + = arithmetic_multiplier * + ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) ) + + = arithmetic_multiplier * arithmetic_basicspace + + { choose: arithmetic_multiplier = 0.9*quartwidth (why?)} + + = 0.9*quartwidth * arithmetic_basicspace + + => + + arithmetic_basicspace = 2/0.9 = 2.2 + +If you want to space your music wider, use something like: + + arithmetic_basicspace = 4.; -where code(time) is the amount of time a note occupies. The value -of code(c) is chosen such that the smallest space within a measure is -arithmetic_basicspace. The smallest space is the one following the -shortest note in the measure. Typically arithmetic_basicspace is set -to the width of a quarter note head. %} -arithmetic_basicspace = 2.; arithmetic_multiplier = 0.9 * \quartwidth ; +arithmetic_basicspace = 2.2; #'Stem_tremolo::beam-width = 1.5 * \quartwidth ; diff --git a/ly/performer.ly b/ly/performer.ly index 37ba5b1252..ff373d5219 100644 --- a/ly/performer.ly +++ b/ly/performer.ly @@ -18,26 +18,6 @@ StaffContext = \translator { }; \translator { \StaffContext } -%% urg, why (needs praeludium-*.ly) these? -\translator -{ - \type "Performer_group_performer"; - \consists "Note_performer"; - \name VoiceFour; -} - -\translator -{ - \type "Performer_group_performer"; - \consists "Note_performer"; - \name VoiceThree; -} -\translator { - \type "Performer_group_performer"; - \consists "Note_performer"; - \name VoiceOne; -} - VoiceContext = \translator { \type "Performer_group_performer"; \name Voice; diff --git a/mutopia/Coriolan/coriolan-midi.ly b/mutopia/Coriolan/coriolan-midi.ly index a7086cbe80..ba81ffaf75 100644 --- a/mutopia/Coriolan/coriolan-midi.ly +++ b/mutopia/Coriolan/coriolan-midi.ly @@ -1,3 +1,18 @@ \midi{ \tempo 4 = 150; + \translator { + \VoiceContext + \name "VoiceOne"; + } + \translator { + \VoiceContext + \name "VoiceTwo"; + %\remove "Span_dynamic_engraver"; + %\remove "Dynamic_engraver"; + } + \translator { + \StaffContext + \accepts "VoiceOne"; + \accepts "VoiceTwo"; + } } diff --git a/mutopia/Coriolan/coriolan-paper.ly b/mutopia/Coriolan/coriolan-paper.ly index 2b3b88b76d..0c87cdff7d 100644 --- a/mutopia/Coriolan/coriolan-paper.ly +++ b/mutopia/Coriolan/coriolan-paper.ly @@ -8,13 +8,16 @@ \translator { \VoiceContext - dynamicPadding = #3 % urg, in \pt + dynamicPadding = #2 % urg, in \pt dynamicMinimumSpace = #6 % urg, in \pt } \translator { \VoiceContext \name "VoiceOne"; + dynamicPadding = #2 % urg, in \pt + dynamicMinimumSpace = #6 % urg, in \pt + %%\consists "Line_number_engraver"; verticalDirection = #1 stemVerticalDirection = #1 @@ -32,17 +35,17 @@ } \translator { \HaraKiriStaffContext - instrumentScriptPadding = #55 %% urg, this is in pt - instrScriptPadding = #35 %% urg, this is in pt - maximumRestCount = #1 \accepts "VoiceOne"; \accepts "VoiceTwo"; } \translator { - \ScoreContext - %textEmptyDimension = ##t - textStyle = #"italic" + \OrchestralScoreContext + %% URG: this changes dynamics too + %%textStyle = #"italic" timeSignatureStyle = #"C" + instrumentScriptPadding = #55 %% urg, this is in pt + instrScriptPadding = #35 %% urg, this is in pt + marginScriptHorizontalAlignment = #1 + maximumRestCount = #1 } - \translator { \OrchestralScoreContext } } diff --git a/mutopia/Coriolan/coriolan-part-paper.ly b/mutopia/Coriolan/coriolan-part-paper.ly index 7ec5642f26..b9ed1f401d 100644 --- a/mutopia/Coriolan/coriolan-part-paper.ly +++ b/mutopia/Coriolan/coriolan-part-paper.ly @@ -7,8 +7,8 @@ \translator { \VoiceContext - dynamicPadding = #3 % urg, in \pt - dynamicMinimumSpace = #6 % urg, in \pt + %dynamicPadding = #5 % urg, in \pt + %dynamicMinimumSpace = #10 % urg, in \pt } \translator { \VoiceContext @@ -28,27 +28,19 @@ %% Aargh: absulute dynamics: \remove "Text_engraver"; } - % Hmm - \translator { - \StaffContext - \accepts "VoiceOne"; - \accepts "VoiceTwo"; - instrumentScriptPadding = #55 %% urg, this is in pt - instrScriptPadding = #35 %% urg, this is in pt - maximumRestCount = #1 - } \translator { \OrchestralPartStaffContext \accepts "VoiceOne"; \accepts "VoiceTwo"; - instrumentScriptPadding = #55 %% urg, this is in pt - instrScriptPadding = #35 %% urg, this is in pt - maximumRestCount = #1 } \translator { \ScoreContext skipBars = ##t - %textEmptyDimension = ##t - textStyle = #"italic" + %% URG: this changes dynamics too + %%textStyle = #"italic" timeSignatureStyle = #"C" + instrumentScriptPadding = #60 %% urg, this is in pt + instrScriptPadding = #40 %% urg, this is in pt + marginScriptHorizontalAlignment = #1 + maximumRestCount = #1 } } diff --git a/mutopia/Coriolan/violino-1.ly b/mutopia/Coriolan/violino-1.ly index f9cd07a6d3..a088719548 100644 --- a/mutopia/Coriolan/violino-1.ly +++ b/mutopia/Coriolan/violino-1.ly @@ -75,8 +75,8 @@ violino1 = \notes \relative c { )f2. ges4\sf(| %50 )f1\>~ | - f4 d( bes)\!as | - g2.\p( as4 | + f4 d( bes)as | + \!g2.\p( as4 | g f d ) bes | bes'2.( c4 | @@ -112,9 +112,9 @@ violino1 = \notes \relative c { \property Voice.crescendoSpanner = "dashed-line" bes2.\p\<( c4 | bes a fis ) d | - \!d'\sf\>( as g )\!f | + \!d'\sf\>( as g )f | %75 - r8[es\p(c)es]r[d(bes)d] | + \!r8[es\p(c)es]r[d(bes)d] | r[c(g)c]r[bes(g)bes] | r[a(g)a]r[bes(g)bes]| [fis-.\pp a-.] a4. a8-. a4~| @@ -260,8 +260,8 @@ violino1 = \notes \relative c { %175 )d2. es4\sf(| )d1\> ~ | - d4( b g \!)f - e2.\p( f4 | + d4( b g )f + \!e2.\p( f4 | e d b ) g | %180 g'2.( a4 | @@ -295,9 +295,9 @@ violino1 = \notes \relative c { g\< fis dis ) b | %200 b'1 ~ | - \!b - [c8\f\>c,(g)c]r[c(bes)\!c] | - r[c\p(as)c]r[c(g)c] | + b + [\!c8\f\>c,(g)c]r[c(bes)c] | + r[\!c\p(as)c]r[c(g)c] | r[c(f,)c']r[c(g)c] | %205 r[c(as)c]r[c(a)c] | diff --git a/mutopia/Coriolan/violino-2.ly b/mutopia/Coriolan/violino-2.ly index 41ef2e4a8a..e2243cf427 100644 --- a/mutopia/Coriolan/violino-2.ly +++ b/mutopia/Coriolan/violino-2.ly @@ -75,7 +75,7 @@ violino2 = \notes \relative c { R1*5 | \property Voice.crescendoText = "cresc." \property Voice.crescendoSpanner = "dashed-line" - g'2.\p\<( a4 | + g'2.\p\<( as4 | g f d ) bes | bes'2.( c4 | bes2 )as | @@ -105,10 +105,10 @@ violino2 = \notes \relative c { \property Voice.crescendoSpanner = "dashed-line" bes2.\p\<( c4 | bes a fis ) d | - \!d'\sf\>( as g )\!f | + \!d'\sf\>( as g )f | %75 % nono, only looks like transpose - r8[c'\p(g)c]r[bes(g)bes] | + r8[\!c'\p(g)c]r[bes(g)bes] | r[g(es)g]r[g(d)g] | r[g(es)g]r[g(e)g]|r8 fis-.\pp fis4. fis8-. fis4~| % urg, can't copy: \transpose g \violino-1(75,91) @@ -266,8 +266,8 @@ violino2 = \notes \relative c { r4 [fis8-.as-.][as()g] es'4\sf(| % copied violino-1(176,201) )d1\> ~ | - d4( b g \!)f - e2.\p( f4 | + d4( b g )f + \!e2.\p( f4 | e d b ) g | %180 @@ -304,10 +304,10 @@ violino2 = \notes \relative c { %200 b'1 ~ | - \!b + b % similar violino-1 only until 219 - [c8\f\>g(c)g]r[bes(g)\!bes] | - r[as\p(f)as]r[g(es)g] | + [\!c8\f\>g(c)g]r[bes(g)bes] | + r[\!as\p(f)as]r[g(es)g] | r[f(c)f]r[g(es)g] | %205 diff --git a/mutopia/Coriolan/violoncello.ly b/mutopia/Coriolan/violoncello.ly index 578ceb41d1..7609b49090 100644 --- a/mutopia/Coriolan/violoncello.ly +++ b/mutopia/Coriolan/violoncello.ly @@ -113,10 +113,10 @@ violoncello = \notes \relative c { \property Voice.crescendoSpanner = "dashed-line" [g8\p\<(bes' g bes][d bes g)d~] | [d8(a' fis a][d a fis)d] | - [\!f!8\sf\>(as f as][f g d)\!g] | + [\!f!8\sf\>(as f as][f g d)g] | %75 - c,4\p r d r | + \!c,4\p r d r | es r d r | c r cis r | d\pp r8 d d4. d8 | @@ -316,8 +316,8 @@ violoncello = \notes \relative c { %200 [b8\<( fis' dis fis ][b fis dis )b!~] | [b8\p( g' e g][e g e )g] | - [f(g f g][f g f)\!g] | - es!4\fp r e r | + [f(g f g][f g f)g] | + \!es!4\fp r e r | f r g r | %205 diff --git a/po/lilypond.pot b/po/lilypond.pot index 10301acea2..bfac979168 100644 --- a/po/lilypond.pot +++ b/po/lilypond.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-03-15 19:34+0100\n" +"POT-Creation-Date: 2000-03-21 11:40+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -207,7 +207,7 @@ msgstr "" msgid "unknown clef type" msgstr "" -#: collision.cc:99 +#: collision.cc:102 msgid "Too many clashing notecolumns. Ignoring them." msgstr "" @@ -219,7 +219,7 @@ msgstr "" msgid "too small" msgstr "" -#: cross-staff.cc:18 +#: cross-staff.cc:19 msgid "" "minVerticalAlign != maxVerticalAlign: cross staff spanners may be broken" msgstr "" @@ -236,19 +236,19 @@ msgstr "" msgid "NaN" msgstr "" -#: dynamic-engraver.cc:244 span-dynamic-performer.cc:114 +#: dynamic-engraver.cc:285 span-dynamic-performer.cc:87 msgid "can't find start of (de)crescendo" msgstr "" -#: dynamic-engraver.cc:263 +#: dynamic-engraver.cc:304 msgid "already have a crescendo" msgstr "" -#: dynamic-engraver.cc:264 +#: dynamic-engraver.cc:305 msgid "already have a decrescendo" msgstr "" -#: dynamic-engraver.cc:339 +#: dynamic-engraver.cc:380 msgid "unterminated (de)crescendo" msgstr "" @@ -272,7 +272,7 @@ msgstr "" msgid "no Grace context available" msgstr "" -#: grace-position-engraver.cc:91 +#: grace-position-engraver.cc:93 msgid "Unattached grace notes. Attaching to last musical column." msgstr "" @@ -545,20 +545,20 @@ msgstr "" msgid "Braces don't match" msgstr "" -#: paper-column.cc:48 +#: paper-column.cc:49 msgid "Must set spring between differing columns" msgstr "" -#: paper-def.cc:69 +#: paper-def.cc:70 #, c-format msgid "unknown paper variable: `%s'" msgstr "" -#: paper-def.cc:73 +#: paper-def.cc:74 msgid "not a real variable" msgstr "" -#: paper-def.cc:180 +#: paper-def.cc:184 #, c-format msgid "paper output to %s..." msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "too many notes for rest collision" msgstr "" -#: score-engraver.cc:139 +#: score-engraver.cc:141 #, c-format msgid "unbound spanner `%s'" msgstr "" @@ -704,11 +704,7 @@ msgstr "" msgid "Slur over rest?" msgstr "" -#: spanner.cc:34 -msgid "Left spanpoint is right spanpoint" -msgstr "" - -#: spanner.cc:128 +#: spanner.cc:31 spanner.cc:164 #, c-format msgid "Spanner `%s' has equal left and right spanpoints" msgstr "" diff --git a/po/nl.po b/po/nl.po index 56a2d4a944..2964fd72dd 100644 --- a/po/nl.po +++ b/po/nl.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"POT-Creation-Date: 2000-03-15 19:34+0100\n" +"POT-Creation-Date: 2000-03-21 11:40+0100\n" "Content-Type: text/plain; charset=\n" "Date: 1998-05-26 11:26:28+0200\n" "From: \n" @@ -205,7 +205,7 @@ msgstr "ongeldige inversie toon: geen onderdeel van accoord: %s" msgid "unknown clef type" msgstr "onbekend type sleutel" -#: collision.cc:99 +#: collision.cc:102 msgid "Too many clashing notecolumns. Ignoring them." msgstr "Te veel botsende nootkolommen. Negeer ze." @@ -217,7 +217,7 @@ msgstr "crescendo" msgid "too small" msgstr "te klein" -#: cross-staff.cc:18 +#: cross-staff.cc:19 msgid "" "minVerticalAlign != maxVerticalAlign: cross staff spanners may be broken" msgstr "" @@ -236,19 +236,19 @@ msgstr "kan geheugen controle niet zetten!" msgid "NaN" msgstr "NaN" -#: dynamic-engraver.cc:244 span-dynamic-performer.cc:114 +#: dynamic-engraver.cc:285 span-dynamic-performer.cc:87 msgid "can't find start of (de)crescendo" msgstr "kan start van (de)crescendo niet vinden" -#: dynamic-engraver.cc:263 +#: dynamic-engraver.cc:304 msgid "already have a crescendo" msgstr "heb al een crescendo" -#: dynamic-engraver.cc:264 +#: dynamic-engraver.cc:305 msgid "already have a decrescendo" msgstr "heb al een decrescendo" -#: dynamic-engraver.cc:339 +#: dynamic-engraver.cc:380 msgid "unterminated (de)crescendo" msgstr "onbeëindigd (de)crescendo" @@ -273,7 +273,7 @@ msgstr "Geen doenbare regelafbreuk gevonden" msgid "no Grace context available" msgstr "geen Grace context voor handen" -#: grace-position-engraver.cc:91 +#: grace-position-engraver.cc:93 msgid "Unattached grace notes. Attaching to last musical column." msgstr "Losse grace noten. Maak ze vast aan vorige muziekale kolom." @@ -335,6 +335,7 @@ msgstr "vals:" #: local-key-engraver.cc:83 time-signature-engraver.cc:29 #: translator-group.cc:416 translator-group.cc:425 +#, c-format msgid "can't find: `%s'" msgstr "kan niet vinden: `%s'" @@ -536,6 +537,7 @@ msgid "Interpretation context with empty type" msgstr "Vertolk context met leeg type" #: music-output-def.cc:84 +#, c-format msgid "can't find `%s' context" msgstr "kan `%s' context niet vinden" @@ -567,20 +569,20 @@ msgstr "Ontleden..." msgid "Braces don't match" msgstr "Haakjes paren niet" -#: paper-column.cc:48 +#: paper-column.cc:49 msgid "Must set spring between differing columns" msgstr "Moet veertje zetten tussen verschillende kolommen" -#: paper-def.cc:69 +#: paper-def.cc:70 #, c-format msgid "unknown paper variable: `%s'" msgstr "onbekende papier veranderlijke: `%s'" -#: paper-def.cc:73 +#: paper-def.cc:74 msgid "not a real variable" msgstr "niet een reële veranderlijke" -#: paper-def.cc:180 +#: paper-def.cc:184 #, c-format msgid "paper output to %s..." msgstr "papier uitvoer naar %s..." @@ -643,6 +645,7 @@ msgid "Huh? Not a Request: `%s'" msgstr "Huh? Geen Request: `%s'" #: request-iterator.cc:20 +#, c-format msgid "Junking music: `%s'" msgstr "Schroot muziek: `%s'" @@ -654,7 +657,7 @@ msgstr "te veel botsende rusten" msgid "too many notes for rest collision" msgstr "te veel noten voor bosting met rusten" -#: score-engraver.cc:139 +#: score-engraver.cc:141 #, c-format msgid "unbound spanner `%s'" msgstr "ongebonden spanner `%s'" @@ -709,6 +712,7 @@ msgid "unterminated slur" msgstr "onbeëindigde bindingsboog" #: slur-engraver.cc:77 +#, c-format msgid "can't find both ends of %s" msgstr "kan niet beide uiteinden vinden van %s" @@ -724,11 +728,7 @@ msgstr "Zet bindingsboog over rust. Negeer." msgid "Slur over rest?" msgstr "Boogje over rust?" -#: spanner.cc:34 -msgid "Left spanpoint is right spanpoint" -msgstr "Linker spanpunt is rechter spanpunt" - -#: spanner.cc:128 +#: spanner.cc:31 spanner.cc:164 #, c-format msgid "Spanner `%s' has equal left and right spanpoints" msgstr "Spanner `%s' heeft gelijke linker en rechter spanpunten" @@ -754,6 +754,7 @@ msgstr "" "%s: TFM bestand heeft %u parameters, wat meer is dan de %u die ik aan kan" #: tfm.cc:70 +#, c-format msgid "can't find ascii character: `%d'" msgstr "kan teken niet vinden: `%s'" @@ -801,10 +802,12 @@ msgid "Already contains: `%s'" msgstr "Bevat reeds: `%s'" #: translator-group.cc:210 +#, c-format msgid "can't find or create `%s' called `%s'" msgstr "kan niet vinden of scheppen `%s' genaamd `%s'" #: translator-group.cc:322 +#, c-format msgid "can't find or create: `%s'" msgstr "kan niet vinden of scheppen: `%s'" @@ -1085,123 +1088,3 @@ msgstr "% Automatisch gegenereerd" #, c-format msgid "% from input file: " msgstr "% van invoerbestand: " - -#~ msgid "(search path: `%s'" -#~ msgstr "(zoekpad: `%s')" - -#~ msgid "Can't find font: `%s'" -#~ msgstr "Kan font niet vinden: `%s'" - -#~ msgid "(search path `%s')" -#~ msgstr "(zoekpad: `%s')" - -#~ msgid "Debug output disabled. Compiled with NPRINT." -#~ msgstr "Ontluisberichten zijn uitgeschakeld. Vertaald met NPRINT." - -#~ msgid "no beam to end" -#~ msgstr "geen waardestreep te beëindigen" - -#~ msgid "unfinished beam" -#~ msgstr "onbeëindigde waardestreep" - -#~ msgid "0 lines" -#~ msgstr "0 regels" - -#~ msgid "1 line (of %.0f columns)" -#~ msgstr "1 regel (van %.0f kolommen)" - -#~ msgid "%d lines (with an average of %.1f columns)" -#~ msgstr "%d regels (van gemiddeld %.1f kolommen)" - -#~ msgid "approximated %s" -#~ msgstr "geschat: %s" - -#~ msgid "calculated %s exactly" -#~ msgstr "exact berekend: %s" - -#~ msgid "elapsed time %.2f seconds" -#~ msgstr "duur: %.2f seconden" - -#~ msgid "no tremolo beam to end" -#~ msgstr "geen tremolo waardestreep te beëindigen" - -#~ msgid "unfinished tremolo beam" -#~ msgstr "onbeëindigde tremolo waardestreep" - -#~ msgid "Got a dynamic already. Continuing dazed and confused." -#~ msgstr "Heb al een dynamiek. Ga verder, verstrooid en verward" - -#~ msgid "Too many crescendi here" -#~ msgstr "Te veel cescendi hier" - -#~ msgid "Huh? Empty Line_of_score?" -#~ msgstr "Huh? Lege Line_of_score?" - -#~ msgid "improbable offset for object type: `%s'" -#~ msgstr "onwaarschijnlijke verschuiving voor object type: `%s'" - -#~ msgid "Can't solve this casting problem exactly; reverting to Word_wrap" -#~ msgstr "Kan breekprobleem niet exact oplossen; verval naar Word_wrap" - -#~ msgid "%s elements" -#~ msgstr "%s elementen" - -#~ msgid "Line ... " -#~ msgstr "Regel ..." - -#~ msgid "degenerate constraints" -#~ msgstr "voorwaarde is gedegenerederd" - -#~ msgid "spanner with negative length" -#~ msgstr "spanner met negatieve lengte" - -#~ msgid "I'm too fat; call Oprah" -#~ msgstr "Ben te dik; roep Catherine" - -#~ msgid "Solution doesn't satisfy constraints" -#~ msgstr "Oplossing voldoet niet aan voorwaarden" - -#~ msgid "Improbable distance: %f point, setting to 10 mm" -#~ msgstr "Onwaarschijnlijke afstand: %f punten, zet op 10 mm" - -#~ msgid "Negative distance, setting to 10 mm" -#~ msgstr "Negatieve afstand, zet op 10 mm" - -#~ msgid "stem direction set already!" -#~ msgstr "stokrichting is al gezet!" - -#~ msgid "unequal number of note heads for tie" -#~ msgstr "ongelijk aantal notebolletjes voor overbinding" - -#~ msgid "cadenza" -#~ msgstr "cadens" - -#~ msgid "Partial measure must be non-negative" -#~ msgstr "Deelmaat moet niet-negatief zijn" - -#~ msgid "partial measure too large" -#~ msgstr "deelmaat te groot" - -#~ msgid "time signature change not allowed here" -#~ msgstr "maatwisseling is hier niet geoorloofd" - -#~ msgid "Ugh, this measure is too long, breakpoint: %d" -#~ msgstr "Ugh, deze maat is te lang, breukpunt: %d" - -#~ msgid "Generating stupido solution" -#~ msgstr "Genereer sullige oplossing" - -#~ msgid "I don't fit; put me on Montignac" -#~ msgstr "Ik ben te dik; zet me op Montignac" - -#~ msgid "Need even number of args for shape array" -#~ msgstr "Heb even aantal argumenten nodig voor shape array" - -#~ msgid "Can't abbreviate" -#~ msgstr "Kan niet afkorten" - -#~ msgid "Can't abbreviate tuplet" -#~ msgstr "Kan x-ool niet afkorten" - -#~ msgid "assume no tuplets" -#~ msgstr "gebruik geen antimetrische figuren" diff --git a/scm/midi.scm b/scm/midi.scm index 0e42d834a2..94ceeb50e2 100644 --- a/scm/midi.scm +++ b/scm/midi.scm @@ -5,19 +5,21 @@ ;;; (c) 2000 Jan Nieuwenhuizen +;; define factor of total volume per dynamic marking (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) + ("sf" . 1.00) + ("ffff" . 0.91) + ("fff" . 0.81) + ("ff" . 0.71) + ("f" . 0.61) + ("mf" . 0.50) + ("mp" . 0.40) + ("p" . 0.30) + ("pp" . 0.20) + ("ppp" . 0.10) ) absolute-volume-alist)) @@ -26,6 +28,30 @@ (if entry (cdr entry)))) -;; 90 is supposed to be the default value +;; define factors of total volume of minimum and maximum volume +(define instrument-equaliser-alist '()) +(set! instrument-equaliser-alist + (append + '( + ("flute" . (0 . 0.6)) + ("oboe" . (0 . 0.7)) + ("clarinet" . (0 . 0.7)) + ("bassoon" . (0 . 0.6)) + ("french horn" . (0.1 . 0.7)) + ("trumpet" . (0.1 . 0.8)) + ("timpani" . (0.2 . 0.9)) + ("violin" . (0.2 . 1.0)) + ("viola" . (0.1 . 0.7)) + ("cello" . (0.2 . 0.8)) + ("contrabass" . (0.2 . 0.8)) + ) + instrument-equaliser-alist)) + +(define (instrument-equaliser s) + (let ((entry (assoc s instrument-equaliser-alist))) + (if entry + (cdr entry)))) + +;; 90 == 90/127 == 0.71 is supposed to be the default value ;; urg: we should set this at start of track -(define dynamic-default-volume 90) +(define dynamic-default-volume 0.71) -- 2.39.2