]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.18
authorfred <fred>
Wed, 27 Mar 2002 01:21:45 +0000 (01:21 +0000)
committerfred <fred>
Wed, 27 Mar 2002 01:21:45 +0000 (01:21 +0000)
input/test/midi-tuplets.ly [new file with mode: 0644]
lily/performance.cc

diff --git a/input/test/midi-tuplets.ly b/input/test/midi-tuplets.ly
new file mode 100644 (file)
index 0000000..875bc97
--- /dev/null
@@ -0,0 +1,35 @@
+\version "1.3.146"
+
+\header {
+texidoc = "
+
+Midi2ly tuplet test.
+
+@example
+  python scripts/midi2ly.py --duration-quant=32 \
+      --allow-tuplet=4*2/3 \
+      --allow-tuplet=8*2/3 \
+      --allow-tuplet=4*3/5 \
+      --allow-tuplet=8*3/5 \
+      tu.midi 
+@end example
+"
+
+}
+
+
+\score { 
+  \context Voice \notes {
+
+    a1 a2 a2. a4 a4. a8 a8. a16 a16. a32 a32. a64
+
+    \times 2/3 { b4 b4 b4 }
+    \times 3/5 { b4 b4 b4 b4 b4 }
+
+    \times 2/3 { c8 c8 c8 }
+    \times 3/5 { c8 c8 c8 c8 c8 }
+
+  }
+  \paper { }  
+  \midi { }
+}
index f77674fe5508043c84c88003d1c91c3507a1be44..cb16e8f7516d0b5c70f16e2f633eb10c1148a808 100644 (file)
@@ -81,9 +81,8 @@ Performance::output_header_track (Midi_stream& midi_stream)
   // perhaps multiple text events?
   String id_str;
   String str = String (_ ("Creator: "));
-  id_str = String_convert::pad_to (gnu_lilypond_version_str (), 40);
+  id_str = String_convert::pad_to (gnu_lilypond_version_str (), 30);
   str += id_str;
-  str += "\n";
 
   /*
     This seems silly, but in fact the audio elements should
@@ -96,20 +95,22 @@ Performance::output_header_track (Midi_stream& midi_stream)
   /* Better not translate this */
   str = "Generated automatically by: ";
   str += id_str;
-  str += _ (", at ");
-  time_t t (time (0));
-  str += ctime (&t);
-  str = str.left_str (str.length_i () - 1);
-
-  /*
-    Pad out time stamps to 120 chars.  */
-  
-  str = String_convert::pad_to (str, 120);
   
   Audio_text generate_a (Audio_text::TEXT, str);
   Midi_text generate (&generate_a);
   midi_track.add (Moment (0), &generate);
+  
+  str = _ ("at ");
+  time_t t (time (0));
+  str += ctime (&t);
+  str = str.left_str (str.length_i () - 1);
+  str = String_convert::pad_to (str, 60);
+  
+  Audio_text at_a (Audio_text::TEXT, str);
+  Midi_text at (&at_a);
+  midi_track.add (Moment (0), &at);
 
+  
   str = _f ("from musical definition: %s", origin_str_);
 
   Audio_text from_a (Audio_text::TEXT, str);