]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 0.0.75.jcn1: mi2mu pats
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 22 Jul 1997 14:29:57 +0000 (16:29 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 22 Jul 1997 14:29:57 +0000 (16:29 +0200)
pl 75.jcn1
- all of the above

14 files changed:
.version
BUGS
NEWS
bin/conflily
lily/.version
mi2mu/.version
mi2mu/include/my-midi-lexer.hh
mi2mu/lily-stream.cc
mi2mu/midi-event.cc
mi2mu/midi-lexer.l
mi2mu/midi-parser.y
mi2mu/midi-score.cc
mi2mu/midi-track.cc
mi2mu/my-midi-lexer.cc

index 53178afdc678c3ed1500f90f4672b9df8723623e..cb59764d31574174637dfe786ba7dba58a75add6 100644 (file)
--- 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 f246b3a96b0767cbb8fd7dc7fc58997e4fa16361..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- 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 d013e18266b84607a264e98fb63af266a318f1e5..2656eca7b2eb8da4ca1e7e8f27df8c6bf51c9620 100644 (file)
--- 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 <snyder@d0sgif.fnal.gov> [sss]
+       - mi2mu update for mudela 0.0.61
+       - conflily fixes
+
 pl 74pre.jcn1
        - oversimplified midi output thru performer hierarchy
        - bf: Spanner::doprint
index 53c6cf65806515b187b71108d2ea5a1eb8bbe39d..4623edacf5c8c081e0631bd3135582ffbfa54fa4 100755 (executable)
@@ -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
index ae05f26ac5f6a5634bbc9f18103a95257a843d55..926922006b7c79e67653e28843a0e0e8ce016fa4 100644 (file)
@@ -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
index 0bd28567f076f9b64ec55a3b85eb67c726428c3a..5596987483e885411df781e0b6cbb62f1255d9ef 100644 (file)
@@ -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 = 
 #
index 67b53e85307bdf9ec775daef7dda822e4dad90de..fb6bf62926e425b65635af4e45a7f294b4dd4cfe 100644 (file)
@@ -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_;
 };
index 8e6806564bdda46edaa95ccc0c5bca8f192c55c2..eeb3c14189b93e830b9c5acdac3c4987430b5fc9 100644 (file)
@@ -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.
index e98149d597d96989dd2d424f0f368906549f6341..d96c6f7f1bbca3a7394937836cc349f850d0d306 100644 (file)
@@ -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;
 }
 
index a1cb3262a6eb97e495b2fafdff66a61be4505220..825f74453b397ed348ab455fcce2c88d9436742d 100644 (file)
@@ -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]
 }
 <event>{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;
 }
 <event>{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 );
index d87dba3cf0efd10907307dcd77164860ddc4032e..ce33c6bc83d4d18a46f7244efdf7ee79c7bbb104 100644 (file)
@@ -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 );
        }
        ;
 
index 1803cafc4c97503f650fad270cff4a53575957b1..62cc98910fd2453d5a68250336fb70921b55cb95 100644 (file)
@@ -42,21 +42,26 @@ Midi_score::output_mudela( String filename_str )
 
        lily_stream << "\\score{";
        lily_stream.indent();
-               for ( PCursor<Midi_track*> 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<Midi_track*> 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
index 10cd36d291dafce3e0e3c0f053152e4aa762ace6..f575ccfe68ca8f3445a6392e6d9675ee07a4d5ee 100644 (file)
@@ -481,7 +481,8 @@ Midi_track::tcol_l( Moment mom )
 #ifdef TCOL_LIST
        for ( PCursor<Track_column*> 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;
index 7109ebfbe402086e61ab43ad2db61874de55d20b..967bc858d9b601c70b92342c7ebbe43fa21caea2 100644 (file)
@@ -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()