From: Jan Nieuwenhuizen Date: Tue, 22 Jul 1997 14:29:57 +0000 (+0200) Subject: patch::: 0.0.75.jcn1: mi2mu pats X-Git-Tag: release/0.0.76~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d3ff1f98cc25a15436809c9769e1138c814e071c;p=lilypond.git patch::: 0.0.75.jcn1: mi2mu pats pl 75.jcn1 - all of the above --- diff --git a/.version b/.version index 53178afdc6..cb59764d31 100644 --- a/.version +++ b/.version @@ -4,4 +4,4 @@ TOPLEVEL_PATCH_LEVEL = 75 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -TOPLEVEL_MY_PATCH_LEVEL = +TOPLEVEL_MY_PATCH_LEVEL = .jcn1 diff --git a/BUGS b/BUGS index f246b3a96b..e69de29bb2 100644 --- a/BUGS +++ b/BUGS @@ -1,10 +0,0 @@ -This file documents bugs which were "re-introduced" in various pl's - -pl69 - * slurs.ly - -pl68: - * opening rests of wohltemperirt - - - * midi broken diff --git a/NEWS b/NEWS index d013e18266..2656eca7b2 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,15 @@ +pl 75.jcn1 + - all of the above pl 75 - inbook.ly & book.tex example. - natural width: linewidth = -1.0\cm +pl 74pre.jcn2 + - mi2mu fixes after scott snyder [sss] + - mi2mu update for mudela 0.0.61 + - conflily fixes + pl 74pre.jcn1 - oversimplified midi output thru performer hierarchy - bf: Spanner::doprint diff --git a/bin/conflily b/bin/conflily index 53c6cf6580..4623edacf5 100755 --- a/bin/conflily +++ b/bin/conflily @@ -2,26 +2,31 @@ # conflily # ugh: must be executed from lilypond-x.x.x (bin/conflily) -root=$HOME -lelie=music/lily +# the lilypond root dir looks like this: +# current -> ./lilypond-x.x.x symlink to current source +# lilypond-x.x.x the lilypond source +# patches gzipped patches +# releases gzipped releases -if [ ! -e $root/lelie ] -then - echo ln -s $root/$lelie/current $root/lelie - ln -s $root/$lelie/current $root/lelie +# the lily root dir +# +lelie=$HOME/music/lily +# + +if [ ! -e $HOME/lelie ]; then + ln -s $lelie $HOME/lelie fi -rm $root/$lelie/current >& /dev/null +rm $lelie/current >& /dev/null current=`basename \`pwd\`` -echo ln -s $root/$lelie/$current $root/$lelie/current -ln -s $root/$lelie/$current $root/$lelie/current +echo ln -s $lelie/$current $lelie/current +ln -s $lelie/$current $lelie/current -ln -sf $root/lelie/lily/out/lilypond bin/lilypond -ln -sf $root/lelie/mi2mu/out/mi2mu bin/mi2mu +ln -sf $lelie/current/lily/out/lilypond bin/lilypond +ln -sf $lelie/current/mi2mu/out/mi2mu bin/mi2mu -if [ "x$LILYINCLUDE" = "x" ] -then - export LILYINCLUDE=$root/lelie/init +if [ "x$LILYINCLUDE" = "x" ]; then + export LILYINCLUDE=$lelie/current/init fi configure --prefix=$root --enable-debugging --enable-printing --enable-checking diff --git a/lily/.version b/lily/.version index ae05f26ac5..926922006b 100644 --- a/lily/.version +++ b/lily/.version @@ -4,4 +4,4 @@ PATCH_LEVEL = 75 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -MY_PATCH_LEVEL = +MY_PATCH_LEVEL = .jcn1 diff --git a/mi2mu/.version b/mi2mu/.version index 0bd28567f0..5596987483 100644 --- a/mi2mu/.version +++ b/mi2mu/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 17 +PATCH_LEVEL = 18 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # diff --git a/mi2mu/include/my-midi-lexer.hh b/mi2mu/include/my-midi-lexer.hh index 67b53e8530..fb6bf62926 100644 --- a/mi2mu/include/my-midi-lexer.hh +++ b/mi2mu/include/my-midi-lexer.hh @@ -18,7 +18,7 @@ void yyerror(const char *s); /// (midi_lexer) class My_midi_lexer : yyFlexLexer { public: - My_midi_lexer( String &filename_str ,Sources * ); + My_midi_lexer( String& filename_str, Sources* ); ~My_midi_lexer(); int close_i(); @@ -26,9 +26,12 @@ public: char const* here_ch_C(); static int varint2_i( String str ); int yylex(); - Source_file * source_file_l_ ; + Source_file* source_file_l_ ; + private: - int char_count_; + int char_count_; + int running_status_i_; + public: // ugh int errorlevel_i_; }; diff --git a/mi2mu/lily-stream.cc b/mi2mu/lily-stream.cc index 8e6806564b..eeb3c14189 100644 --- a/mi2mu/lily-stream.cc +++ b/mi2mu/lily-stream.cc @@ -107,7 +107,8 @@ Lily_stream::header() *os_p_ << "% from input file: "; *os_p_ << midi_parser_l_g->filename_str_; *os_p_ << "\n\n"; - *os_p_ << "\\version \"0.0.58\";\n"; + // ugh + *os_p_ << "\\version \"0.0.61\";\n"; } /* snapnie: dit kan toch automaties? Zie ook dstream. diff --git a/mi2mu/midi-event.cc b/mi2mu/midi-event.cc index e98149d597..d96c6f7f1b 100644 --- a/mi2mu/midi-event.cc +++ b/mi2mu/midi-event.cc @@ -39,7 +39,7 @@ Midi_key::mudela_str( bool command_mode_bo ) str += String( (char)( ( key_i_ + 2 ) % 7 + 'A' ) ); else // heu, -2: should be - 1 1/2: A -> fis str += String( (char)( ( key_i_ + 2 - 2 ) % 7 + 'a' ) ); - str = String( "%" ) + str + "\n"; // "\key\F" not supported yet... + str = String( "%" ) + str + ";\n"; // "\key\F" not supported yet... return str; } @@ -144,6 +144,7 @@ Midi_tempo::mudela_str( bool command_mode_bo ) return ""; String str = "\\tempo 4:"; str += String( get_tempo_i( Moment( 1, 4 ) ) ); + str += ";"; return str; } diff --git a/mi2mu/midi-lexer.l b/mi2mu/midi-lexer.l index a1cb3262a6..825f74453b 100644 --- a/mi2mu/midi-lexer.l +++ b/mi2mu/midi-lexer.l @@ -26,6 +26,7 @@ #include "midi-parser.hh" #define YY_USER_ACTION char_count_ += YYLeng(); // ugh + %} %option c++ @@ -65,7 +66,6 @@ BACKUP_TOP_0 MT BACKUP_TOP_1 MTh BACKUP_TOP_2 MTr -XRUNNING_STATUS [\x30-\x4f] RUNNING_STATUS [\x00-\x5f] DATA_ENTRY [\x60-\x79] ALL_NOTES_OFF [\x7a-\x7f] @@ -100,7 +100,7 @@ SSME [\0x7f][\x03] %% -{HEADER} { // huh? using {HEADER}/{INT32}; longer match than {INT32} +{HEADER} { tor( DEBUG_ver ) << "lex: header" << endl; yy_push_state( int16 ); yy_push_state( int16 ); @@ -109,7 +109,7 @@ SSME [\0x7f][\x03] return HEADER; } -{TRACK} { // huh? using {TRACK}/{INT32}; longer match than {INT32} +{TRACK} { tor( DEBUG_ver ) << "lex: track" << endl; yy_push_state( track ); yy_push_state( int32 ); @@ -219,11 +219,16 @@ SSME [\0x7f][\x03] } {RUNNING_STATUS} { // yylval.byte = *(Byte*)YYText(); - yylval.i = *(Byte*)YYText(); +// yylval.i = *(Byte*)YYText(); + yylval.i = running_status_i_; tor( DEBUG_ver ) << String ( "lex: running status: " ) + String( yylval.i ) << endl; - yy_pop_state(); -// yy_push_state( u8 ); - yy_push_state( u8 ); + /* + 'running status' rather means 'missing status'. + we'll put the running status data back, prepend (unput) + the running status, and try again. + */ + yyless( 0 ); + unput( running_status_i_ ); return RUNNING_STATUS; } {DATA_ENTRY} { @@ -248,6 +253,7 @@ SSME [\0x7f][\x03] tor( DEBUG_ver ) << "lex: note off" << endl; // yylval.byte = *(Byte*)YYText(); yylval.i = *(Byte*)YYText(); + running_status_i_ = yylval.i; yy_pop_state(); yy_push_state( u8 ); yy_push_state( u8 ); @@ -257,6 +263,7 @@ SSME [\0x7f][\x03] tor( DEBUG_ver ) << "lex: note on" << endl; // yylval.byte = *(Byte*)YYText(); yylval.i = *(Byte*)YYText(); + running_status_i_ = yylval.i; yy_pop_state(); yy_push_state( u8 ); yy_push_state( u8 ); @@ -266,6 +273,7 @@ SSME [\0x7f][\x03] tor( DEBUG_ver ) << "lex: polyphonic aftertouch" << endl; // yylval.byte = *(Byte*)YYText(); yylval.i = *(Byte*)YYText(); + running_status_i_ = yylval.i; yy_pop_state(); yy_push_state( u8 ); yy_push_state( u8 ); @@ -275,6 +283,7 @@ SSME [\0x7f][\x03] tor( DEBUG_ver ) << "lex: controlmode change" << endl; // yylval.byte = *(Byte*)YYText(); yylval.i = *(Byte*)YYText(); + running_status_i_ = yylval.i; yy_pop_state(); yy_push_state( u8 ); yy_push_state( u8 ); @@ -284,6 +293,7 @@ SSME [\0x7f][\x03] tor( DEBUG_ver ) << "lex: program change" << endl; // yylval.byte = *(Byte*)YYText(); yylval.i = *(Byte*)YYText(); + running_status_i_ = yylval.i; yy_pop_state(); yy_push_state( u8 ); return PROGRAM_CHANGE; @@ -292,6 +302,7 @@ SSME [\0x7f][\x03] tor( DEBUG_ver ) << "lex: channel aftertouch" << endl; // yylval.byte = *(Byte*)YYText(); yylval.i = *(Byte*)YYText(); + running_status_i_ = yylval.i; yy_pop_state(); yy_push_state( u8 ); yy_push_state( u8 ); @@ -301,6 +312,7 @@ SSME [\0x7f][\x03] tor( DEBUG_ver ) << "lex: pitchwheel range" << endl; // yylval.byte = *(Byte*)YYText(); yylval.i = *(Byte*)YYText(); + running_status_i_ = yylval.i; yy_pop_state(); yy_push_state( u8 ); yy_push_state( u8 ); diff --git a/mi2mu/midi-parser.y b/mi2mu/midi-parser.y index d87dba3cf0..ce33c6bc83 100644 --- a/mi2mu/midi-parser.y +++ b/mi2mu/midi-parser.y @@ -235,8 +235,8 @@ midi_event: ; running_status: - RUNNING_STATUS U8 { //U8 { - $$ = 0; + RUNNING_STATUS midi_event { + $$ = $2; } ; @@ -265,7 +265,14 @@ note_on: int i = $1; i = i & ~0x90; $$ = 0; - midi_parser_l_g->note_begin( $1 & ~0x90, $2, $3 ); + if ( $3 ) + midi_parser_l_g->note_begin( $1 & ~0x90, $2, $3 ); + /* + sss: some broken devices encode NOTE_OFF as + NOTE_ON with zero volume + */ + else + $$ = midi_parser_l_g->note_end_midi_event_p( $1 & ~0x90, $2, $3 ); } ; diff --git a/mi2mu/midi-score.cc b/mi2mu/midi-score.cc index 1803cafc4c..62cc98910f 100644 --- a/mi2mu/midi-score.cc +++ b/mi2mu/midi-score.cc @@ -42,21 +42,26 @@ Midi_score::output_mudela( String filename_str ) lily_stream << "\\score{"; lily_stream.indent(); - for ( PCursor i( midi_track_p_list_.top() ); i.ok(); i++ ) { - if ( ( midi_track_p_list_.size() != 1 ) - && ( i == midi_track_p_list_.top() ) ) - continue; - lily_stream << "\\staff{ melodicregs "; - lily_stream << i->name_str(); - lily_stream << " }"; - lily_stream.newline(); - } + lily_stream << " < \\multi 3;"; + lily_stream.indent(); + for ( PCursor i( midi_track_p_list_.top() ); i.ok(); i++ ) { + if ( ( midi_track_p_list_.size() != 1 ) + && ( i == midi_track_p_list_.top() ) ) + continue; + lily_stream << "\\melodic{ "; + lily_stream << "\\$" << i->name_str(); + lily_stream << " }"; + lily_stream.newline(); + } + lily_stream.tnedni(); + lily_stream << ">"; lily_stream.newline(); lily_stream << "\\paper{"; lily_stream.indent(); - lily_stream << "\\unitspace 20\\mm"; + lily_stream << "unitspace = 20.0\\mm;"; lily_stream.tnedni(); lily_stream << "}"; + lily_stream.newline(); lily_stream << "\\midi{"; lily_stream.indent(); // not use silly 0 track diff --git a/mi2mu/midi-track.cc b/mi2mu/midi-track.cc index 10cd36d291..f575ccfe68 100644 --- a/mi2mu/midi-track.cc +++ b/mi2mu/midi-track.cc @@ -481,7 +481,8 @@ Midi_track::tcol_l( Moment mom ) #ifdef TCOL_LIST for ( PCursor i( tcol_p_list_.top() ); i.ok(); i++ ) { if ( i->mom() > mom ) { //not used, let's use array! - assert( 0 ); +// assert( 0 ); +// 97-07-21; it's used now! cannot use array Track_column* tcol_p = new Track_column( mom ); i.insert( tcol_p ); return tcol_p; diff --git a/mi2mu/my-midi-lexer.cc b/mi2mu/my-midi-lexer.cc index 7109ebfbe4..967bc858d9 100644 --- a/mi2mu/my-midi-lexer.cc +++ b/mi2mu/my-midi-lexer.cc @@ -19,6 +19,7 @@ My_midi_lexer::My_midi_lexer( String &filename_str, Sources * sources ) switch_streams( source_file_l_->istream_l() ); errorlevel_i_ = 0; char_count_ = 0; + running_status_i_ = 0; } My_midi_lexer::~My_midi_lexer()