| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Types::Music; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Type Library for Music Programming |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:GENE'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.0200'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
435053
|
use 5.016; |
|
|
2
|
|
|
|
|
9
|
|
|
10
|
2
|
|
|
2
|
|
14
|
use strict; |
|
|
2
|
|
|
|
|
13
|
|
|
|
2
|
|
|
|
|
65
|
|
|
11
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
139
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
1521
|
use Types::Standard qw(StrMatch); |
|
|
2
|
|
|
|
|
314382
|
|
|
|
2
|
|
|
|
|
20
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Type::Library 2.000000 |
|
16
|
2
|
|
|
|
|
14
|
-extends => [qw( |
|
17
|
|
|
|
|
|
|
Types::Common::Numeric |
|
18
|
|
|
|
|
|
|
Types::Common::String |
|
19
|
|
|
|
|
|
|
)], |
|
20
|
|
|
|
|
|
|
-declare => qw( |
|
21
|
|
|
|
|
|
|
PosInt |
|
22
|
|
|
|
|
|
|
Octave |
|
23
|
|
|
|
|
|
|
Signature |
|
24
|
|
|
|
|
|
|
Key |
|
25
|
|
|
|
|
|
|
Named_Note |
|
26
|
|
|
|
|
|
|
Named_Note_Octave |
|
27
|
|
|
|
|
|
|
Mode |
|
28
|
2
|
|
|
2
|
|
4683
|
); |
|
|
2
|
|
|
|
|
54
|
|
|
29
|
|
|
|
|
|
|
|
|
30
|
2
|
|
|
2
|
|
204022
|
use Type::Utils 2.000000 -all; |
|
|
2
|
|
|
|
|
53
|
|
|
|
2
|
|
|
|
|
28
|
|
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
declare PosInt, |
|
33
|
|
|
|
|
|
|
as PositiveInt; |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
declare Octave, |
|
36
|
|
|
|
|
|
|
as PositiveOrZeroInt; # the zero-octave means "use pitch-class" in some module of mine... |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
declare Signature, |
|
39
|
|
|
|
|
|
|
as StrMatch[ qr/^[1-9]\d?\/[1-9]\d?$/ ]; |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
declare Key, |
|
42
|
|
|
|
|
|
|
as StrMatch[ qr/^[A-G][#b]?$/ ]; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
declare Named_Note, |
|
45
|
|
|
|
|
|
|
as StrMatch[ qr/^[A-G][#bsf]?$/ ]; |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
declare Named_Note_Octave, |
|
48
|
|
|
|
|
|
|
as StrMatch[ qr/^[A-G][#bsf]?\d$/ ]; |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my %modes; |
|
51
|
|
|
|
|
|
|
@modes{qw( |
|
52
|
|
|
|
|
|
|
ionian major |
|
53
|
|
|
|
|
|
|
dorian |
|
54
|
|
|
|
|
|
|
phrygian |
|
55
|
|
|
|
|
|
|
lydian |
|
56
|
|
|
|
|
|
|
mixolydian |
|
57
|
|
|
|
|
|
|
aeolian minor |
|
58
|
|
|
|
|
|
|
locrian |
|
59
|
|
|
|
|
|
|
)} = undef; |
|
60
|
|
|
|
|
|
|
declare Mode, |
|
61
|
|
|
|
|
|
|
as NonEmptyStr, where { exists $modes{$_} }; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |