+pl 19.jcn2
+ - bf's mi2mu:
+ * Midi_track_parser::note_end_all
+ * staff output uses key, meter, tempo read
+ * command line read minor key
+ * minor key notenames
+
pl 19.jcn1
- small changes to sharp, fermata
- small changes to lilypond.lsm+doc, lelievijver.lsm
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 19.jcn1
+TOPLEVEL_PATCH_LEVEL = 19.jcn2
TOPLEVEL_MY_PATCH_LEVEL =
# use the above to send patches, always empty for released version:
Begin3
Titel: LilyPond
-Versie: 0.1.19.jcn1
-Inschrijf datum: 06OCT97
+Versie: 0.1.19.jcn2
+Inschrijf datum: 07OCT97
Beschrijving: LilyPond is de muziek typesetter van het GNU Project.
Het programma genereert muziek in zichtbare of
hoorbare vorm uit uit een muzikale definitie file:
jan@digicash.com (Jan Nieuwenhuizen)
Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys)
Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
- 395k lilypond-0.1.19.jcn1.tar.gz
+ 395k lilypond-0.1.19.jcn2.tar.gz
Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/
- 395k lilypond-0.1.19.jcn1.tar.gz
+ 395k lilypond-0.1.19.jcn2.tar.gz
Copi"eer politie: GPL
End
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 20
+PATCH_LEVEL = 21
# use to send patches, always empty for released version:
MY_PATCH_LEVEL =
#
class Mudela_staff {
public:
Mudela_staff (int number_i, String copyright_str, String track_name_str, String instrument_str);
- ~Mudela_staff();
void add_item (Mudela_item* mudela_item_p);
void eat_voice (Link_list<Mudela_item*>& items);
String name_str();
void output (Mudela_stream& mudela_stream_r);
void process();
- void set_meter (int num_i, int den_i, int clocks_i, int count_32_i);
- void set_tempo (int useconds_i);
String copyright_str_;
String instrument_str_;
String name_str_;
- Mudela_meter* mudela_meter_p_;
- Mudela_tempo* mudela_tempo_p_;
+ Mudela_key* mudela_key_l_;
+ Mudela_meter* mudela_meter_l_;
+ Mudela_tempo* mudela_tempo_l_;
int number_i_;
private:
int i = str.index_i (':');
i = (i >=0 ? i : str.length_i ());
key.accidentals_i_ = String_convert::dec2_i (str.left_str (i));
- key.minor_i_ = (int)(bool)String_convert::dec2_i (str.mid_str (i,1));
+ key.minor_i_ = (int)(bool)String_convert::dec2_i (str.mid_str (i + 1,1));
break;
}
case 'n':
if (!score_p)
return 1;
- if (!score_p->mudela_key_l_)
- score_p->mudela_key_l_ = &key;
+ // if given on command line: override
+ score_p->mudela_key_l_ = &key;
mudela_score_l_g = score_p;
score_p->process();
assert (col_l);
- for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); i++)
+ for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); )
{
if ((i->pitch_i_ == pitch_i) && (i->channel_i_ == channel_i))
{
i.remove_p();
return;
}
+ else
+ i++;
}
warning (String ("junking note-end event: ")
+ " channel = " + String_convert::i2dec_str (channel_i, 0, ' ')
{
// find
assert (col_l);
- for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); i++)
+ for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); )
{
i->end_column_l_ = col_l;
- i.remove_p();
- // ugh
- if (!i.ok())
- break;
+ i.remove_p ();
}
}
Mudela_tempo* p = new Mudela_tempo ( useconds_per_4_u );
item_p = p;
info_l_->score_l_->mudela_tempo_l_ = p;
+ mudela_staff_p_->mudela_tempo_l_ = p;
}
// SMPTE_OFFSET [\x54][\x05]
else if ((byte == 0x54) && (next == 0x05))
item_p = p;
info_l_->score_l_->mudela_meter_l_ = p;
info_l_->bar_mom_ = p->bar_mom ();
+ mudela_staff_p_->mudela_meter_l_ = p;
}
// KEY [\x59][\x02]
else if ((byte == 0x59) && (next == 0x02))
Mudela_key* p = new Mudela_key (accidentals_i, minor_i);
item_p = p;
info_l_->score_l_->mudela_key_l_ = p;
+ mudela_staff_p_->mudela_key_l_ = p;
}
// SSME [\0x7f][\x03]
else if ((byte == 0x7f) && (next == 0x03))
int notename_i = notename_i_a[ (minor_i_ * 5 + pitch_i) % 12 ];
static int accidentals_i_a[ 12 ] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 };
- int accidental_i = accidentals_i_a[ minor_i_ * 5 + pitch_i % 12 ];
+ int accidental_i = accidentals_i_a[ (minor_i_ * 5 + pitch_i) % 12 ];
if (accidental_i && (accidentals_i_ < 0))
{
accidental_i = - accidental_i;
mudela_stream << "\\midi{\n";
// let's not use silly 0 track
- mudela_staff_p_list_.bottom()->mudela_tempo_p_->output (mudela_stream);
+ mudela_staff_p_list_.bottom()->mudela_tempo_l_->output (mudela_stream);
mudela_stream << "}\n";
mudela_stream << "}\n";
copyright_str_ = copyright_str;
instrument_str_ = instrument_str;
name_str_ = track_name_str;
- mudela_meter_p_ = new Mudela_meter (4, 2, 24, 8);
- mudela_tempo_p_ = new Mudela_tempo (1000000);
-}
-
-Mudela_staff::~Mudela_staff()
-{
- delete mudela_meter_p_;
- delete mudela_tempo_p_;
+ mudela_key_l_ = 0;
+ mudela_meter_l_ = 0;
+ mudela_tempo_l_ = 0;
}
void
void
Mudela_staff::output_mudela_begin_bar (Mudela_stream& mudela_stream_r, Moment now_mom, int bar_i)
{
- Moment bar_mom = mudela_meter_p_->bar_mom();
+ Moment bar_mom = mudela_meter_l_->bar_mom();
Moment into_bar_mom = now_mom - Moment (bar_i - 1) * bar_mom;
if (bar_i > 1)
{
void
Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_mom, Moment end_mom)
{
- Moment bar_mom = mudela_meter_p_->bar_mom();
+ Moment bar_mom = mudela_meter_l_->bar_mom();
Moment now_mom = begin_mom;
int begin_bar_i = (int) (now_mom / bar_mom) + 1;
group items into voices
*/
+ assert (mudela_score_l_g);
+ mudela_key_l_ = mudela_score_l_g->mudela_key_l_;
+ mudela_meter_l_ = mudela_score_l_g->mudela_meter_l_;
+ mudela_tempo_l_ = mudela_score_l_g->mudela_tempo_l_;
+
Link_list<Mudela_item*> items;
for (PCursor<Mudela_item*> i (mudela_item_p_list_); i.ok(); i++)
items.bottom().add (*i);
eat_voice (items);
}
-void
-Mudela_staff::set_tempo (int useconds_per_4_i)
-{
- delete mudela_tempo_p_;
- mudela_tempo_p_ = new Mudela_tempo (useconds_per_4_i);
-}
-
-void
-Mudela_staff::set_meter (int num_i, int den_i, int clocks_i, int count_32_i)
-{
- delete mudela_meter_p_;
- mudela_meter_p_ = new Mudela_meter (num_i, den_i, clocks_i, count_32_i);
-}
-
mudela_stream_r << "\n";
int current_bar_i = 0;
- Moment bar_mom = mudela_staff_l_->mudela_meter_p_->bar_mom();
+ Moment bar_mom = mudela_staff_l_->mudela_meter_l_->bar_mom();
for (PCursor<Mudela_item*> i (mudela_item_l_list_); i.ok(); i++)
{