line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Phrase.pm,v 1.1.1.1 2004/11/22 17:52:11 root Exp $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package POE::Framework::MIDI::Phrase; |
4
|
2
|
|
|
2
|
|
309913
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
69
|
|
5
|
2
|
|
|
2
|
|
12
|
use vars '$VERSION'; $VERSION = '0.02'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
92
|
|
6
|
2
|
|
|
2
|
|
528
|
use POE::Framework::MIDI::Utility; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
600
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
2
|
|
|
2
|
0
|
526
|
my ( $self, $class ) = ( {}, shift ); |
10
|
2
|
|
|
|
|
7
|
bless $self, $class; |
11
|
2
|
|
|
|
|
15
|
$self->{cfg} = shift; |
12
|
2
|
|
|
|
|
13
|
return $self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub add_event { |
16
|
1
|
|
|
1
|
0
|
3
|
my ( $self, $event ) = @_; |
17
|
1
|
|
|
|
|
1
|
push @{$self->{events}}, $event; |
|
1
|
|
|
|
|
7
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub add_events { |
21
|
1
|
|
|
1
|
0
|
2
|
my( $self, @events ) = @_; |
22
|
1
|
|
|
|
|
2
|
push @{$self->{events}}, @events; |
|
1
|
|
|
|
|
5
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# return the stack of notes/rests/intervals/bars |
26
|
|
|
|
|
|
|
sub events { |
27
|
1
|
|
|
1
|
0
|
2
|
my ( $self, $new_events ) = @_; |
28
|
1
|
50
|
|
|
|
5
|
$new_events |
29
|
|
|
|
|
|
|
? $self->{events} = $new_events : return $self->{events} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |