App-Music-PlayTab

 view release on metacpan or  search on metacpan

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

use Clone qw(clone);

sub run {
    local (@ARGV) = @_ ? @_ : @ARGV;

    app_options();
    binmode( STDERR, ':utf8' );
    print STDOUT ("ok 1\n") if $test;

    if ( defined $output ) {
	open(OUTPUT, ">$output") or print STDOUT ("not ") if $test;
	print STDOUT ("ok 2\n") if $test;
    }
    else {
	die("Test mode requires -output option to be set\n") if $test;
	*OUTPUT = *STDOUT;
    }

    # Options post-processing.
    $trace |= ($debug || $test);
    $xpose = $gxpose;

    # Actually we should probe all backends and let them register what
    # they can handle.
    $generate = 'PDF' if $Cava::Packager::PACKAGED;
    if ( $generate ) {

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

	if ( eof ) {
	    $gen->generate({ opus => $data });
	    reset_globals();
	}
    }

    print STDOUT ("ok 4\n") if $test;

    print STDOUT ("ok 5\n") if $test;

    close OUTPUT if defined $output;
    exit 0 unless $test;
}

sub push_entry {
    return unless $entry && keys(%$entry);
    push( @{ $data->{lines} }, $entry );
    $entry = {};
}

sub reset_globals {

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

=item B<--verbose>

More verbose information.

=item I<file>

Input file(s).

=back

=head1 INPUT SYNTAX

The input for playtab is plain ASCII. It contains the chords, the
division in bars, with optional annotations.

An example:

    !t Blue Bossa

    Bossanova
    =

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

followed by a '0', switches to classical chord name syntax.

Look at the examples, that is (currently) the best way to get grip on
what the program does.

Oh, I almost forgot: it can print guitar chord diagrams as well.
See "bluebossa", "sophisticatedlady" and some others.

Have fun, and let me know your ideas!

=head1 INPUT SYNTAX

  Notes: C, D, E, F, G, A, B.
  Raised with '#' or suffix 'is', e.g. A#, Ais.
  Lowered with 'b' or suffix 's' or 'es', e.g. Bes, As, Eb.

  Chords: note + optional modifiers.
  Chord modifiers Meaning                 [examples]
  --------------------------------------------------------------
  nothing         major triad             [C]
  - or min or m   minor triad             [Cm Fmin Gb-]

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


  Other:          Meaning
  --------------------------------------------------------------
  .               Chord space
  -               Rest
  :               Repeats previous chord
  %               Repeat
  /               Powerchord constructor   [D/G D/E-]
  --------------------------------------------------------------

=head1 LILYPOND INPUT SYNTAX

  Notes: c, d, e, f, g, a, b.
  Raised with suffix 'is', e.g. ais.
  Lowered with suffix 'es', e.g. bes, ees.

  Chords: note + optional duration + optional modifiers.

  Duration = 1, 2, 4, 8, with possible dots, e.g., "2.".
  No duration means: use the duration of the previous chord.



( run in 0.376 second using v1.01-cache-2.11-cpan-c6e0e5ac2a7 )