16
16
testSimpleNoteNonWholeTime, testComplexNote, testLittleTimedMelody,
17
17
testComplexMelody, testOneSimpleChord, testEMajorOneOctAbove,
18
18
testAComplexChord, testASimpleTimedChord, testASimpleChordWithComplexTime,
19
testModerateChordModerateTime, testMelodicModerateChord ]
19
testModerateChordModerateTime, testMelodicModerateChord, testOneSingleRest,
20
testSequenceOfPitchesWithRest, testTimedRestCommonTime, testComplexMelodyWithRest ]
22
23
-- The absolute BASS is the lowest possible note to be played.
52
53
expected = muMelodicUntimed [39]
53
54
actual = muify $ octavated [('c',"",1)]
56
testOneSingleRest = "testOneSingleRest" ~: expected @=? actual
58
expected = muMelodicUntimed [-1]
59
actual = muify $ simpleNotes "r"
55
61
testSequenceOfPitches = "SequenceOfPitches" ~: expected @=? actual
57
63
expected = muMelodicUntimed [50,50,51,53,53]
58
64
actual = muify $ octavated [('b',"",1),('b',"",1),('c',"",2),('d',"",2),('d',"",2)]
66
testSequenceOfPitchesWithRest = "SequenceOfPitchesWithRest" ~: expected @=? actual
68
expected = muMelodicUntimed [50,50,51,53,-1,53]
69
actual = muify $ octavated [('b',"",1),('b',"",1),('c',"",2),('d',"",2),('r',"",0),('d',"",2)]
60
71
testExhaustiveSequence = "ExhaustiveSequence" ~: expected @=? actual
62
73
expected = muMelodicUntimed [0, 1, 1, 2, 3, 2, 3, 4, 4, 5, 6, 6, 7, 8, 7, 8, 9, 9, 10, 11,
63
11, 12, 13, 13, 14, 15, 14, 15, 16, 16, 17, 18, 18, 19, 20 ]
74
11, 12, 13, 13, 14, 15, 14, 15, 16, 16, 17, 18, 18, 19, 20, -1 ]
64
75
actual = muify $ octavated noteList
65
76
noteList = [('a',"",-3), ('a',"#",-3), ('b',"b",-3), ('b',"",-3), ('b',"#",-3),
66
77
('c',"b",-2), ('c',"",-2), ('c',"#",-2),
72
83
('b',"b",-2), ('b',"",-2), ('b',"#",-2),
73
84
('c',"b",-1), ('c',"",-1), ('c',"#",-1),
74
85
('d',"b",-1), ('d',"",-1), ('d',"#",-1),
75
('e',"b",-1), ('e',"",-1), ('e',"#",-1) ]
86
('e',"b",-1), ('e',"",-1), ('e',"#",-1),
77
89
testSimpleNoteCommonTime = "SimpleNotesCommonTime" ~: expected @=? actual
79
91
expected = muMelodicTimed [(1.0, 41)]
80
92
actual = muify $ timed [('d',"",1, Just (1 % 4))]
94
testTimedRestCommonTime = "testTimedRestCommonTime" ~: expected @=? actual
96
expected = muMelodicTimed [(0.5, -1)]
97
actual = muify $ timed [('r',"",0, Just (1 % 8))]
82
99
testSimpleNoteComplexTime = "SimpleNoteComplexTime" ~: expected @=? actual
84
101
expected = muMelodicTimed [(1.0, 7)]
107
124
('f',"#",1, Just (1 % 4)), ('g',"b",1, Just (1 % 4)),
108
125
('a',"#",0, Just (1 % 4)) ]
127
testComplexMelodyWithRest = "ComplexMelodyWithRest" ~: expected @=? actual
129
expected = muMelodicTimed [(1.0,28), (1.0,55), (1.0,45), (1.0,45), (1.0,-1), (1.0,37)]
130
actual = muify $ timed [('c',"#",0, Just (1 % 4)), ('e',"",2, Just (1 % 4)),
131
('f',"#",1, Just (1 % 4)), ('g',"b",1, Just (1 % 4)),
132
('r',"",0, Just (1 % 4)), ('a',"#",0, Just (1 % 4)) ]
110
134
testOneSimpleChord = "OneSimpleChord" ~: expected @=? actual
112
136
expected = muChordUntimed [ [39,43,46] ]