Subject: | quotes? |
Date: | Tue, 19 Jul 2016 17:23:22 +0200 |
To: | bug-MIDI-Perl [...] rt.cpan.org |
From: | Oscar Wasmann <pianolessen [...] me.com> |
Dear authors of MIDI-Perl,
I’am a beginner in MIDI-Perl. In MIDI simple I have a problem. I have to quote al the notes and in your examples it is not necessarily.
Show quoted text
> Bareword "c1" not allowed while "strict subs" in use at ... line 18.
> Bareword "f" not allowed while "strict subs" in use at ... line 18.
> Bareword "o5" not allowed while "strict subs" in use at ... line 18.
> Bareword "qn" not allowed while "strict subs" in use at ... line 20.
> Bareword "Cs" not allowed while "strict subs" in use at ... line 20.
> Bareword "F" not allowed while "strict subs" in use at ... line 20.
> Bareword "Ds" not allowed while "strict subs" in use at ... line 20.
> Bareword "hn" not allowed while "strict subs" in use at ... line 20.
> Bareword "Gs_d1" not allowed while "strict subs" in use at ... line 20.
> Bareword "qn" not allowed while "strict subs" in use at ... line 21.
> Bareword "Cs" not allowed while "strict subs" in use at ... line 21.
> Bareword "Ds" not allowed while "strict subs" in use at ... line 21.
> Bareword "F" not allowed while "strict subs" in use at ... line 21.
> Bareword "hn" not allowed while "strict subs" in use at ... line 21.
> Bareword "Cs" not allowed while "strict subs" in use at ... line 21.
> Bareword "qn" not allowed while "strict subs" in use at ... line 22.
> Bareword "F" not allowed while "strict subs" in use at ... line 22.
> Bareword "Cs" not allowed while "strict subs" in use at ... line 22.
> Bareword "Ds" not allowed while "strict subs" in use at ... line 22.
> Bareword "hn" not allowed while "strict subs" in use at ... line 22.
> Bareword "Gs_d1" not allowed while "strict subs" in use at ... line 22.
> Bareword "qn" not allowed while "strict subs" in use at ... line 23.
> Bareword "Gs_d1" not allowed while "strict subs" in use at ... line 23.
> Bareword "Ds" not allowed while "strict subs" in use at ... line 23.
> Bareword "F" not allowed while "strict subs" in use at ... line 23.
> Bareword "hn" not allowed while "strict subs" in use at ... line 23.
> Bareword "Cs" not allowed while "strict subs" in use at ... line 23.
> Execution of ... aborted due to compilation errors.
When I quote the notes the script works allright:
Show quoted text> #!/usr/bin/perl
> use strict;
> use CGI qw(:standard);
> use diagnostics;
> use CGI::Carp qw( fatalsToBrowser );
> use MIDI::Simple;
>
> my $src = 'simple.mid';
> my $titel = 'MIDI simple';
>
> new_score;
> text_event 'http://www.ely.anglican.org/parishes/camgsm/bells/chimes.html';
> text_event 'Lord through this hour/ be Thou our guide';
> text_event 'so, by Thy power/ no foot shall slide';
> set_tempo 500000; # 1 qn => .5 seconds (500,000 microseconds)
> patch_change 1, 8; # Patch 8 = Celesta
>
> noop 'c1', 'f', 'o5'; # Setup
> # Now play
> n 'qn', 'Cs'; n 'F'; n 'Ds'; n 'hn', 'Gs_d1';
> n 'qn', 'Cs'; n 'Ds'; n 'F'; n 'hn', 'Cs';
> n 'qn', 'F'; n 'Cs'; n 'Ds'; n 'hn', 'Gs_d1';
> n 'qn', 'Gs_d1'; n 'Ds'; n 'F'; n 'hn', 'Cs';
>
> write_score $src;
>
> print header(
> -charset => 'utf8'
> ).
> "<!DOCTIPE html><html lang='NL'>".
> head(
> title( $titel ).
> meta( { -charset => 'utf8' } ).
> script( { -type => 'text/javascript', -src =>
> 'http://www.midijs.net/lib/midi.js' }, '' )
> ).
> '<body>'.
> h1( $titel ).
> button( '', 'Hoor', "MIDIjs.play('$src')" ).
> button( '', 'Stop', 'MIDIjs.stop()' ).
> end_html
What is wrong?
Thank you very much,
Oscar Wasmann