detect \lyrics and \melodic, and do substitution accordingly.
count <> and {} ?
+
+Ugh . Perl sux. Anybody for Python?
=cut
use Getopt::Long;
+sub version_compare
+{
+ local ($a,$b)=@_;
+ return &cmpver;
+}
+
sub cmpver
{
-
my(@a)= split /\./,$a;
my(@b)= split /\./,$b;
-
+
for $i (0,1,2) {
return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]);
}
{
die "Not smart enough to convert 0.0.58 to 0.0.59\n";
}
+
+sub convert_0_0_59_to_0_0_60
+{
+ s/(\\unitspace [0-9.mcptin\\ ]+|\\geometric [0-9.]+|\\width [0-9.mcp\\tin]+)/$1;/g;
+ s/(\\output \"[^\"]+\")/$1;/;
+ s/(\\tempo [0-9: ]+)/$1;/;
+}
+
###############################################################
sub last_conversion
"0.0.56" => \&convert_0_0_55_to_0_0_56,
"0.0.57" => \&convert_0_0_56_to_0_0_57,
"0.0.58" => \&convert_0_0_57_to_0_0_58,
- "0.0.59" => \&convert_0_0_58_to_0_0_59
+ "0.0.59" => \&convert_0_0_58_to_0_0_59,
+ "0.0.60" => \&convert_0_0_59_to_0_0_60
);
my @applicable_conversion;
my @mudela_levels;
- die "This is too old to convert " if $from < 50;
+# die "This is too old to convert " if $from < 50;
my @v = versions;
- foreach $a (@v) {
- if ($a > $from && $a <= $to ){
- push @applicable_conversion, $minor_conversions{$a};
- push @mudela_levels, $a;
+ foreach $ver (@v) {
+ if (version_compare($ver, $from) > 0 && version_compare($ver,$to) <= 0 ){
+ push @applicable_conversion, $minor_conversions{$ver};
+ push @mudela_levels, $ver;
}
}
($to_version = last_conversion) unless (defined($opt_to));
-
die "can't open \`$infile\'" unless open INLY,$infile ;
die "can't open \`$outfile\'" unless open OUTLY, ">$outfile";
identify;
+
GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules");
if ($opt_help) {
EndMudelaHeader
%}
-\version "0.0.59";
+
+\version "0.0.60";
%% Stuff from MPP version
% \lefttitle{Menuetto}
% \key\F % \key is F ( f-major )
%
% \slope{30} % Fool MusiXTeX into 30 / 10 steeper beam
-% \stemlength3 % shorter \stemlength
% % because piece is set very tightly
IImenuetto = \melodic{
\duration 8;
< a2 f2 d2 \f > bes4-. |
%%2
- < [ bes^"1" e c_"2"_"4" >
+ < [ bes8^"1" e c_"2"_"4" >
a bes-. g-. ] a4-.^"4" |
%%3
- < d4 'bes4-. > g4-. [ f-. e-. ] |
+ < d4 'bes4-. > g4-. [ f8-. e-. ] |
%%4
< [ f 'a > e d cis-. 'b-. 'a-. ]
%%5
< a2 f2 d2 > bes!4-. |
%%6
- < [ bes e > a bes-. g-. ]
+ < [ bes8 e > a bes-. g-. ]
c'!4-. |
%%7
< a4-. f4>
%%9
\clef "violin";
< e'2 a2 \f >
- [ d'( e'16 )f'16 ] |
+ [ d'8( e'16 )f'16 ] |
%%10
- < [ e' g > d' cis'_"2" e' a~ g ] |
+ < [ e'8 g > d' cis'_"2" e' a~ g ] |
%%11
< \multi 2;
{\stem 1; a4~ d'4 cis'4-. }
{ \stem -1; f2 e4 } > |
%%12
- < [ g'^"4" d > f' e' f' d'^"3"~ c' ] |
+ < [ g'8^"4" d > f' e' f' d'^"3"~ c' ] |
%%13
\clef "alto";
< \multi 2;
{ \stem -1; g4~ f4 e4 }% ugh
> |
%%14
- < [ a f > g a f ] < d'4-\upbow e4 'bes4 > |
+ < [ a8 f > g a f ] < d'4-\upbow e4 'bes4 > |
%%15
- < c'4-\downbow f4 'a4 > [ bes~ a g a ] |
+ < c'4-\downbow f4 'a4 > [ bes8~ a g a ] |
%%16
[ f( e )f a-. g-. bes-. ] |
%%17
< a2^"0" fis2_"3" > bes4 |
%%18
- < { [ c'~ bes c' a ] } { [ es ] } > fis4 |
+ < { [ c'8~ bes c' a ] } { [ es ] } > fis4 |
%%19
- < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes d > a ] |
+ < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d > a ] |
%%20
- < { [ c'( bes a )bes g~ bes ] } { [ d ] } { [ g ] } > |
+ < { [ c'8 ( bes a )bes g~ bes ] } { [ d ] } { [ g ] } > |
%%21
< \multi 2;
{\stem 1; d'4 (\stem 1; ) cis'4 d'4 }
{ \stem -1; g2 f4 }
> |
%%22
- < { [ g~ f g e ] } { [ cis ] } > < f4 d4 > |
+ < { [ g8 ~ f g e ] } { [ cis ] } > < f4 d4 > |
%%23
- [ 'g g ] < e4. 'a4. > d-\upbow |
+ [ 'g8 g ] < e4. 'a4. > d-\upbow |
%%24
< d2.^"fine" 'a2. 'd2._"3 mins.">
\bar ":|";
\score{
\melodic { \IImenuetto }
\paper{
- \width 195.0\mm
- \unitspace 9.0\mm % to get lily to use only three lines
- \geometric 1.40
- \output "scsii-menuetto.out"
+ \width 195.0\mm;
+ \unitspace 9.0\mm ;% to get lily to use only three lines
+ \geometric 1.40;
+ \output "scsii-menuetto.out";
}
\midi{
- \tempo 4:120
- \output "scsii-menuetto.midi"
+ \tempo 4:120;
+ \output "scsii-menuetto.midi";
}
}