From: Jan Nieuwenhuizen Date: Fri, 15 Aug 1997 14:14:55 +0000 (+0200) Subject: patch::: 0.1.7.jcn1: het lelie gedeelte X-Git-Tag: release/0.1.8~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c096fc32f688080a3be3eb78ae92f7f1553584be;p=lilypond.git patch::: 0.1.7.jcn1: het lelie gedeelte pl 0.1.7.jcn1 - complete redo mid/back-end of mi2mu - bf: do not create/play empty Audio-{text,instrument} events --- diff --git a/NEWS b/NEWS index cdf96ae04f..ee3412f44c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +pl 0.1.7.jcn1 + - complete redo mid/back-end of mi2mu + - bf: do not create/play empty Audio-{text,instrument} events + pl 7 - Audio_element as base for Audio_item and Audio_staff. fixes midi-lyric segfault @@ -42,6 +46,7 @@ pl 0.1.3.jcn1 ********* aug 11 + pl 4 - correction of GNU Music Manifesto - moved lowlevel stuff of Source_file to Mapped_file_storage. @@ -57,6 +62,9 @@ Interface via File_storage. (Now using Simple_file_storage) - mudela: parse tempo requests, \midi{ \tempo 4= 60;} ****** +pl 0.1.3.jcn1 + - mi2mu: simplification +bf lily_stream: indentation and wordwrap + - mi2mu: bf: blunt: non-alpha(num) chars from identifiers aug 8 pl 3 - don't crash if no Clef_engraver. diff --git a/VERSION b/VERSION index a0f69a468e..d680f6bd6d 100644 --- a/VERSION +++ b/VERSION @@ -3,4 +3,4 @@ TOPLEVEL_MINOR_VERSION = 1 TOPLEVEL_PATCH_LEVEL = 7 # use to send patches, always empty for released version: -TOPLEVEL_MY_PATCH_LEVEL = +TOPLEVEL_MY_PATCH_LEVEL = .jcn1 diff --git a/bin/make-patch b/bin/make-patch index 4c98e9f35a..e11d7b8533 100755 --- a/bin/make-patch +++ b/bin/make-patch @@ -18,7 +18,7 @@ then echo untarring .. if [ ! -f $newarc ] then - echo cant find $newarc + echo "can't find $newarc" exit fi tar zfx $newarc @@ -29,7 +29,7 @@ then if [ ! -f $oldarc ] then - echo cant find $oldarc + echo "can't find $oldarc" exit fi tar zfx $oldarc diff --git a/flower/include/string-convert.hh b/flower/include/string-convert.hh index 9eb9869653..f83899a2e1 100644 --- a/flower/include/string-convert.hh +++ b/flower/include/string-convert.hh @@ -7,6 +7,8 @@ #ifndef STRING_CONVERT_HH #define STRING_CONVERT_HH +#include "string.hh" + /* ///a class which only has functions. //#define functor class // cute. docxx fucks up diff --git a/lib/duration.cc b/lib/duration.cc index fab55e756c..f81b3c2be9 100644 --- a/lib/duration.cc +++ b/lib/duration.cc @@ -27,6 +27,13 @@ Duration::Duration() ticks_i_ = 0; } +Duration::Duration( int type_i, int dots_i = 0 ) +{ + type_i_ = type_i; + dots_i_ = dots_i; + ticks_i_ = 0; +} + bool Duration::duration_type_b(int t) { diff --git a/lib/include/duration.hh b/lib/include/duration.hh index c46fc5a7c0..0c5b313e4b 100644 --- a/lib/include/duration.hh +++ b/lib/include/duration.hh @@ -41,6 +41,7 @@ struct Duration { Ctor of Duration. type_i should be a power of 2. */ Duration(); + Duration( int type_i, int dots_i = 0 ); /// is the "plet factor" of this note != 1 ? bool plet_b(); String str()const; diff --git a/lib/include/source.hh b/lib/include/source.hh index 9d443ed0db..1d199671ff 100644 --- a/lib/include/source.hh +++ b/lib/include/source.hh @@ -5,7 +5,10 @@ #ifndef SOURCE_HH #define SOURCE_HH + +#include "proto.hh" #include "plist.hh" + class Sources { public: diff --git a/lily/audio-item.cc b/lily/audio-item.cc index a041a7d2f3..4e05735013 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -18,7 +18,7 @@ Audio_instrument::Audio_instrument( String instrument_str ) Midi_item* Audio_instrument::midi_item_p() { - return new Midi_instrument( 0, str_ ); + return str_.length_i() ? new Midi_instrument( 0, str_ ) : 0; } Audio_item::Audio_item( Request* req_l ) @@ -83,7 +83,7 @@ Audio_text::Audio_text( Audio_text::Type type, String text_str ) Midi_item* Audio_text::midi_item_p() { - return new Midi_text( this ); + return text_str_.length_i() ? new Midi_text( this ) : 0; } diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index 08fa4c14e9..248f8a83bb 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -36,7 +36,7 @@ Lyric_performer::do_print() const void Lyric_performer::process_requests() { - if ( lreq_arr_.size() ) + if ( lreq_arr_.size() && lreq_arr_[ 0 ]->tdef_p_->text_str_.length_i() ) play( new Audio_text( Audio_text::LYRIC, lreq_arr_[ 0 ]->tdef_p_->text_str_ ) ); lreq_arr_.clear(); } diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 88ac41f6b4..53248be263 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -517,6 +517,7 @@ Midi_track::add( int delta_time_i, String event_str ) cout << String_convert::bin2hex_str( event_str ) << endl; } assert(delta_time_i >= 0); + assert(event_str.length_i()); Midi_chunk::add( i2varint_str( delta_time_i ) + event_str ); } diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index 4b4eed261d..968aab74cf 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -98,6 +98,8 @@ Midi_walker::process() do_stop_notes( ptr()->audio_column_l_->at_mom() ); Midi_item* p = ptr()->midi_item_p(); + if ( !p ) + return; p->channel_i_ = track_l_->number_i_; if ( p->name() != Midi_note::static_name() ) diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 3605653c38..edffec11c0 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -32,17 +32,19 @@ Staff_performer::do_creation_processing() { audio_staff_p_ = new Audio_staff; - // staff name - play(new Audio_text( Audio_text::TRACK_NAME, instrument_str())); - - // instrument description - play(new Audio_text( Audio_text::INSTRUMENT_NAME, instrument_str())); + if (instrument_str().length_i()) { + // staff name + play (new Audio_text ( Audio_text::TRACK_NAME, instrument_str ())); + // instrument description + play (new Audio_text (Audio_text::INSTRUMENT_NAME, instrument_str ())); + } // tempo play(new Audio_tempo(get_tempo_i())); - // instrument - play(new Audio_instrument(instrument_str())); + if (instrument_str ().length_i ()) + // instrument + play (new Audio_instrument (instrument_str ())); } void