App-Music-PlayTab

 view release on metacpan or  search on metacpan

lib/App/Music/PlayTab.pm  view on Meta::CPAN

my $my_package = 'Sciurix';
# Program name and version.
my ($my_name, $my_version) = ( 'playtab', $VERSION );

use base qw(Exporter);
our @EXPORT = qw(run);

################ Command line parameters ################

use Getopt::Long;
sub app_options();

my $output;
my $generate;
my $preamble;
my $gxpose = 0;			# global xpose value
my $verbose = 0;		# verbose processing
my $lilypond = 0;		# use LilyPond syntax
my $bpm = 4;
my $syntax;			 # show syntax help

lib/App/Music/PlayTab.pm  view on Meta::CPAN

sub set_barno  {
    # Values: 0 = disable, >0 = use, <0 lead-in.
    unshift( @_, undef, \$barno );
    &_set_incr;
    $barno = undef unless $barno;
}

################ Command Line Options ################

sub app_ident;
sub app_usage($);

sub app_options() {
    my $help = 0;		# handled locally
    my $ident = 0;		# handled locally

    # Process options, if any.
    # Make sure defaults are set before returning!
    return unless @ARGV > 0;

    if ( !GetOptions('output=s'	=> \$output,
		     'generate=s' => \$generate,
		     'preamble=s' => \$preamble,

lib/App/Music/PlayTab.pm  view on Meta::CPAN

	pr_syntax();
	exit(0);
    }
    $bpm = $lilypond if $lilypond;
}

sub app_ident {
    print STDERR ("This is $my_package [$my_name $my_version]\n");
}

sub app_usage($) {
    my ($exit) = @_;
    app_ident;
    print STDERR <<EndOfUsage;
Usage: $0 [options] [file ...]
    --output XXX	output file name
    --transpose +/-N    transpose all
    --lilypond N	use LilyPond chord syntax, N = bpm
    --help		this message
    --syntax		explain chord syntax
    --ident		show identification



( run in 0.507 second using v1.01-cache-2.11-cpan-65fba6d93b7 )