root/lang/perl/Music-Phrase-MMLGenerator/trunk/make_phrase.pl @ 2804

Revision 2804, 1.4 kB (checked in by bonar, 6 years ago)

lang/perl/Music-Phrase-MMLGenerator: import Music-Phrase-MMLGenerator

Line 
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Music::Phrase::MMLGenerator;
7use Getopt::Long;
8
9my (%opt);
10GetOptions (
11    "tempo=i"  => \$opt{tempo},  # tempo
12    "bubble=i" => \$opt{bubble}, # bubble step (4 or 7)
13    "octav=s"  => \$opt{octav},  # octav (3,4,5)
14    "inst=s"   => \$opt{inst},   # instrument code (41=violin)
15    "grep=i"   => \$opt{grep},   # grep code variation
16    "pmml=i"   => \$opt{pmml},   # pmml command path
17    "help"     => \$opt{help},   # print instrument code list
18    "q"        => \$opt{quiet},  # no output message
19    "play"     => \$opt{play},   # play generated midi with QuickTime
20    "midi"     => \$opt{midi},   # create midi fie with pmml
21);
22
23$opt{block} = $ARGV[0];
24Music::Phrase::MMLGenerator::do_command_line(%opt);
25
26__END__
27
28=head1 NAME
29
30  make_phrase.pl
31
32=head1 USAGE
33
34  perl make_phrase.pl [--tempo|--octav|--inst|-help|-play|-m] <block expression>
35
36  ex)
37  perl make_phrase.pl --inst=37 --tempo=90 --octav=1,2 -midi \
38      "A:1000100101000100,G:1000100101000100,E:1000100101000100,A:1000100101000100";
39
40=head1 OPTIONS
41
42  sound setting:
43
44  tempo  - tempo
45  octav  - octav (comma seperated, ex: 3,4,5)
46  inst   - instrument code (40=violin)
47 
48  (experimental) bubble - bubble step (4 or 7)
49
50  other options:
51
52  help  - print instrument code list
53  midi  - create midi file with pmml
54  play  - play generated midi with QuickTime (Mac OS X only)
55          make_phrase creates midi file when you use -play.
56
57=cut
58
Note: See TracBrowser for help on using the browser.