music-transcription 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/examples/hip.yml +86 -148
  3. data/examples/make_hip.rb +16 -53
  4. data/examples/make_missed_connection.rb +10 -55
  5. data/examples/make_song1.rb +17 -61
  6. data/examples/make_song2.rb +17 -47
  7. data/examples/missed_connection.yml +120 -196
  8. data/examples/song1.yml +168 -158
  9. data/examples/song2.yml +46 -180
  10. data/lib/music-transcription.rb +14 -13
  11. data/lib/music-transcription/{articulations.rb → model/articulations.rb} +0 -0
  12. data/lib/music-transcription/{change.rb → model/change.rb} +0 -0
  13. data/lib/music-transcription/{dynamics.rb → model/dynamics.rb} +0 -0
  14. data/lib/music-transcription/{link.rb → model/link.rb} +8 -0
  15. data/lib/music-transcription/{meter.rb → model/meter.rb} +0 -0
  16. data/lib/music-transcription/{meters.rb → model/meters.rb} +0 -0
  17. data/lib/music-transcription/{note.rb → model/note.rb} +1 -1
  18. data/lib/music-transcription/{part.rb → model/part.rb} +1 -1
  19. data/lib/music-transcription/{pitch.rb → model/pitch.rb} +0 -0
  20. data/lib/music-transcription/{pitches.rb → model/pitches.rb} +0 -0
  21. data/lib/music-transcription/{program.rb → model/program.rb} +0 -0
  22. data/lib/music-transcription/{score.rb → model/score.rb} +1 -1
  23. data/lib/music-transcription/{tempo.rb → model/tempo.rb} +0 -0
  24. data/lib/music-transcription/parsing/convenience_methods.rb +10 -0
  25. data/lib/music-transcription/parsing/meter_parsing.rb +84 -0
  26. data/lib/music-transcription/parsing/meter_parsing.treetop +19 -0
  27. data/lib/music-transcription/version.rb +1 -1
  28. data/spec/{change_spec.rb → model/change_spec.rb} +1 -1
  29. data/spec/{link_spec.rb → model/link_spec.rb} +1 -1
  30. data/spec/{meter_spec.rb → model/meter_spec.rb} +1 -1
  31. data/spec/{note_spec.rb → model/note_spec.rb} +8 -1
  32. data/spec/{part_spec.rb → model/part_spec.rb} +1 -1
  33. data/spec/{pitch_spec.rb → model/pitch_spec.rb} +1 -1
  34. data/spec/{program_spec.rb → model/program_spec.rb} +1 -1
  35. data/spec/{score_spec.rb → model/score_spec.rb} +1 -1
  36. data/spec/{tempo_spec.rb → model/tempo_spec.rb} +1 -1
  37. data/spec/parsing/convenience_methods_spec.rb +13 -2
  38. data/spec/parsing/meter_parsing_spec.rb +23 -0
  39. metadata +37 -33
data/examples/make_hip.rb CHANGED
@@ -4,60 +4,23 @@ require 'yaml'
4
4
  include Music::Transcription
5
5
  include Pitches
6
6
  include Articulations
7
+ include Meters
8
+ include Parsing
7
9
 
8
- bass_riff = [
9
- # 0.0
10
- Note.new(Rational(1,6), [ Bb2 ]),
11
- Note.new(Rational(1,4)),
12
- Note.new(Rational(1,3), [ Ab2 ]),
13
- Note.new(Rational(1,6), [ F2 ]),
14
- Note.new(Rational(1,12), [ Ab2 ]),
15
- # 1.0
16
- Note.new(Rational(1,6), [ Bb2 ]),
17
- Note::quarter,
18
- Note.new(Rational(1,3), [ Ab2 ]),
19
- Note::quarter([ Ab2 ]),
20
- ]
21
-
22
- lead_riff = [
23
- # 0.0
24
- Note.new(Rational(1,6), [ Bb3 ]),
25
- Note.new(Rational(1,4)),
26
- Note.new(Rational(1,12), [ Db4 ], articulation: SLUR),
27
- Note.new(Rational(1,6), [ Db4 ], articulation: SLUR),
28
- Note.new(Rational(1,36), [ Db4 ]),
29
- Note.new(Rational(1,36), [ Eb4 ]),
30
- Note.new(Rational(1,36), [ Db4 ]),
31
- Note.new(Rational(1,6), [ Ab3 ]),
32
- Note.new(Rational(1,12), [ Db4 ]),
33
- # 1.0
34
- Note.new(Rational(1,6), [ Bb3 ]),
35
- Note.new(Rational(1,4)),
36
- Note.new(Rational(1,12), [ Db4 ], articulation: SLUR),
37
- Note::quarter([ Db4 ], articulation: SLUR),
38
- Note::eighth([ Db4 ], articulation: SLUR),
39
- Note::eighth([ C4 ]),
40
- ]
41
-
42
- whole_step = Pitch.new(:semitone => 2)
43
- bass_notes = bass_riff + bass_riff.map {|note| note.transpose(whole_step) }
44
- lead_notes = lead_riff + lead_riff.map {|note| note.transpose(whole_step) }
45
-
46
- score = Score.new(
47
- Meter.new(4,"1/4".to_r),
48
- 120,
49
- program: Program.new([0...2, 0...2,2...4,0...2]),
50
- parts: {
51
- "lead" => Part.new(
52
- Dynamics::MF,
53
- notes: lead_notes
54
- ),
55
- "bass" => Part.new(
56
- Dynamics::MP,
57
- notes: bass_notes
58
- )
59
- }
60
- )
10
+ score = Score.new(FOUR_FOUR,120) do |s|
11
+ s.program = Program.new([0...2, 0...2,2...4,0...2])
12
+ s.parts["lead"] = Part.new(Dynamics::MF) do |p|
13
+ riff = notes("/6Bb3 /4 /12Db4= /6Db4= /36Db4 /36Eb4 /36Db4 /6Ab3 /12Db4 \
14
+ /6Bb3 /4 /12Db4= /4Db4= /8=Db4 /8C4")
15
+ p.notes = riff + riff.map {|n| n.transpose(2) }
16
+ end
17
+
18
+ s.parts["bass"] = Part.new(Dynamics::MP) do |p|
19
+ riff = notes("/6Bb2 /4 /3Ab2 /6F2 /12Ab2 \
20
+ /6Bb2 /4 /3Ab2 /4Ab2")
21
+ p.notes = riff + riff.map {|n| n.transpose(2) }
22
+ end
23
+ end
61
24
 
62
25
  File.open('hip.yml','w') do |file|
63
26
  file.write score.to_yaml
@@ -4,62 +4,17 @@ require 'yaml'
4
4
  include Music::Transcription
5
5
  include Pitches
6
6
  include Articulations
7
+ include Meters
8
+ include Parsing
7
9
 
8
- score = Score.new(
9
- Meter.new(4,"1/4".to_r),
10
- 120,
11
- program: Program.new([0...8.0]),
12
- parts: {
13
- "bass" => Part.new(
14
- Dynamics::MF,
15
- notes: [
16
- # 0.0
17
- Note::quarter([Eb2]),
18
- Note::quarter,
19
- Note::quarter([Bb2]),
20
- Note::quarter,
21
- Note::quarter([Eb2]),
22
- Note::eighth,
23
- Note::eighth([B2]),
24
- Note::quarter([Bb2]),
25
- Note::quarter([Ab2]),
26
-
27
- # 2.0
28
- Note::quarter([Eb2]),
29
- Note::quarter,
30
- Note::quarter([Bb2]),
31
- Note::quarter,
32
- Note::quarter([Eb2]),
33
- Note::eighth,
34
- Note::eighth([B2]),
35
- Note::quarter([Bb2]),
36
- Note::quarter([Ab2]),
37
-
38
- # 4.0
39
- Note::quarter([Bb2]),
40
- Note::eighth,
41
- Note::eighth([F3], articulation: SLUR),
42
- Note::half([F3]),
43
- Note::quarter([Bb2]),
44
- Note::eighth,
45
- Note::eighth([F3], articulation: SLUR),
46
- Note::half([F3]),
47
-
48
- # 6.0
49
- Note::quarter([B2]),
50
- Note::eighth,
51
- Note::eighth([Gb3], articulation: SLUR),
52
- Note::half([Gb3]),
53
- Note::quarter([B2]),
54
- Note::eighth,
55
- Note::eighth([Gb3], articulation: SLUR),
56
- Note::half([Gb3]),
57
-
58
- #8.0
59
- ]
60
- )
61
- }
62
- )
10
+ score = Score.new(FOUR_FOUR, 120) do |s|
11
+ s.program = Program.new([0..2,0..6])
12
+ s.parts["bass"] = Part.new(Dynamics::MF) do |p|
13
+ p.notes = notes("/4Eb2 /4 /4Bb2 /4 /4Eb2 /8 /8B2 /4Bb2 /4Ab2")
14
+ p.notes += notes("/4Bb2 /8 /8F3= /2F3 /4Bb2 /8 /8F3= /2F3")
15
+ p.notes += notes("/4B2 /8 /8Gb3= /2Gb3 /8 /8Gb3= /2Gb3")
16
+ end
17
+ end
63
18
 
64
19
  File.open("missed_connection.yml", "w") do |file|
65
20
  file.write score.to_yaml
@@ -4,68 +4,24 @@ require 'yaml'
4
4
  include Music::Transcription
5
5
  include Pitches
6
6
  include Articulations
7
+ include Meters
8
+ include Parsing
7
9
 
8
- score = Score.new(
9
- Meter.new(4,"1/4".to_r),
10
- 120,
11
- program: Program.new([ 0...4.0, 0...4.0 ]),
12
- parts: {
13
- 1 => Part.new(
14
- Dynamics::MF,
15
- notes: [
16
- Note::dotted_quarter([C2]),
17
- Note::quarter([Eb2]),
18
- Note.new("5/16".to_r,[F2]),
19
- Note.new("1/16".to_r, [Eb2]),
20
- # 1.0
21
- Note::eighth,
22
- Note::quarter([C2]),
23
- Note::quarter([Eb2]),
24
- Note::dotted_quarter,
25
- # 2.0
26
- Note::dotted_quarter([C2]),
27
- Note::quarter([Eb2]),
28
- Note.new("5/16".to_r,[F2]),
29
- Note.new("1/16".to_r, [Eb2]),
30
- # 3.0
31
- Note::eighth,
32
- Note::quarter([C2]),
33
- Note::quarter([Eb2]),
34
- ]
35
- ),
36
- 2 => Part.new(
37
- Dynamics::MF,
38
- notes: [
39
- # 0.0
40
- Note::eighth,
41
- Note::eighth([Bb3]),
42
- Note::eighth([Bb3]),
43
- Note::eighth([Bb3]),
44
- Note::eighth([Bb3]),
45
- Note::quarter([C4]),
46
- Note::quarter([A3]),
47
- Note::eighth([G3]),
48
- Note::eighth([F3]),
49
- Note.new("5/16".to_r, [G3], articulation: SLUR),
50
- Note.new("1/16".to_r, [F3], articulation: SLUR),
51
- Note::eighth([E3]),
52
- Note::eighth,
53
- # 2.0
54
- Note::eighth,
55
- Note::eighth([Bb3]),
56
- Note::eighth([Bb3]),
57
- Note::eighth([Bb3]),
58
- Note::eighth([Bb3]),
59
- Note::quarter([C4]),
60
- Note::eighth([A3]),
61
- Note::eighth([E4]),
62
- Note::eighth([E4], articulation: SLUR),
63
- Note::eighth([D4], articulation: SLUR),
64
- Note::eighth([C4]),
65
- ]
66
- )
67
- }
68
- )
10
+ score = Score.new(FOUR_FOUR, 120) do |s|
11
+ s.program = Program.new([ 0...4.0, 0...4.0 ])
12
+
13
+ s.parts[1] = Part.new(Dynamics::MF) do |p|
14
+ p.notes = notes("3/8C2 /4Eb2 5/16F2 /16Eb2 \
15
+ /8 /4C2 /4Eb2 3/8 \
16
+ 3/8C2 /4Eb2 5/16F2 /16Eb2 \
17
+ /8 /4C2 /4Eb2")
18
+ end
19
+
20
+ s.parts[2] = Part.new(Dynamics::MF) do |p|
21
+ p.notes = notes("/8 /8Bb3 /8Bb3 /8Bb3 /8Bb3 /4C4 /4A3 /8G3 /8F3 5/16=G3 /16=F3 /8E3 /8 \
22
+ /8 /8Bb3 /8Bb3 /8Bb3 /8Bb3 /4C4 /8A3 /8E4 /8=E4 /8=D4 /8C4")
23
+ end
24
+ end
69
25
 
70
26
  File.open("song1.yml", "w") do |file|
71
27
  file.write score.to_yaml
@@ -3,54 +3,24 @@ require 'yaml'
3
3
 
4
4
  include Music::Transcription
5
5
  include Pitches
6
+ include Meters
7
+ include Parsing
6
8
 
7
- score = Score.new(
8
- Meter.new(4,"1/4".to_r),
9
- 120,
10
- :program => Program.new(
11
- :segments => [0...4.0, 0...4.0 ]
12
- ),
13
- :parts => {
14
- 1 => Part.new(
15
- Dynamics::MF,
16
- notes: [
17
- Note::whole([C4]),
18
- Note::whole([Bb3]),
19
- Note::whole([Ab3]),
20
- Note::half([G3]),
21
- Note::half([Bb3]),
22
- ]
23
- ),
24
- 2 => Part.new(
25
- Dynamics::MF,
26
- notes: [
27
- Note::dotted_quarter([E5]),
28
- Note::whole([D5]),
29
- Note::whole([C5]),
30
- Note::new("5/8".to_r, [C5]),
31
- Note::half([C5]),
32
- Note::half([D5]),
33
- ]
34
- ),
35
- 3 => Part.new(
36
- Dynamics::MF,
37
- notes: [
38
- Note::eighth,
39
- Note::quarter([G5]),
40
- Note::half([F5]),
41
- Note::quarter,
42
- Note::quarter([F5]),
43
- Note::half([Eb5]),
44
- Note::quarter,
45
- Note::quarter([Eb5]),
46
- Note::half([Eb5]),
47
- Note::eighth,
48
- Note::half([Eb5]),
49
- Note::half([F5]),
50
- ]
51
- )
52
- }
53
- )
9
+ score = Score.new(FOUR_FOUR, 120) do |s|
10
+ s.program = Program.new([0...4.0, 0...4.0 ])
11
+
12
+ s.parts[1] = Part.new(Dynamics::MF) do |p|
13
+ p.notes = notes("1C4 1Bb3 1Ab3 /2G3 /2Bb3")
14
+ end
15
+
16
+ s.parts[2] = Part.new(Dynamics::MF) do |p|
17
+ p.notes = notes("3/8E5 1D5 1C5 5/8C5 /2C5 /2D5")
18
+ end
19
+
20
+ s.parts[3] = Part.new(Dynamics::MF) do |p|
21
+ notes = notes("/8 /4G5 /2F5 /4 /4F5 /2Eb5 /4 /4Eb5 /2Eb5 /8 /2Eb5 /2F5")
22
+ end
23
+ end
54
24
 
55
25
  File.open("song2.yml", "w") do |file|
56
26
  file.write score.to_yaml
@@ -7,9 +7,6 @@ start_meter: !ruby/object:Music::Transcription::Meter
7
7
  measure_duration: !ruby/object:Rational
8
8
  denominator: 1
9
9
  numerator: 1
10
- check_methods:
11
- - :check_beats_per_measure
12
- - :check_beat_duration
13
10
  start_tempo: 120
14
11
  meter_changes: {}
15
12
  tempo_changes: {}
@@ -17,334 +14,261 @@ parts:
17
14
  bass: !ruby/object:Music::Transcription::Part
18
15
  notes:
19
16
  - !ruby/object:Music::Transcription::Note
20
- duration: &1 !ruby/object:Rational
17
+ duration: !ruby/object:Rational
21
18
  denominator: 4
22
19
  numerator: 1
23
20
  pitches:
24
- - &2 !ruby/object:Music::Transcription::Pitch
21
+ - !ruby/object:Music::Transcription::Pitch
25
22
  octave: 2
26
23
  semitone: 3
27
24
  articulation: :normal
28
25
  accented: false
29
26
  links: {}
30
- check_methods:
31
- - :ensure_positive_duration
32
27
  - !ruby/object:Music::Transcription::Note
33
- duration: *1
28
+ duration: !ruby/object:Rational
29
+ denominator: 4
30
+ numerator: 1
34
31
  pitches: []
35
32
  articulation: :normal
36
33
  accented: false
37
34
  links: {}
38
- check_methods:
39
- - :ensure_positive_duration
40
35
  - !ruby/object:Music::Transcription::Note
41
- duration: *1
36
+ duration: !ruby/object:Rational
37
+ denominator: 4
38
+ numerator: 1
42
39
  pitches:
43
- - &4 !ruby/object:Music::Transcription::Pitch
40
+ - !ruby/object:Music::Transcription::Pitch
44
41
  octave: 2
45
42
  semitone: 10
46
43
  articulation: :normal
47
44
  accented: false
48
45
  links: {}
49
- check_methods:
50
- - :ensure_positive_duration
51
46
  - !ruby/object:Music::Transcription::Note
52
- duration: *1
47
+ duration: !ruby/object:Rational
48
+ denominator: 4
49
+ numerator: 1
53
50
  pitches: []
54
51
  articulation: :normal
55
52
  accented: false
56
53
  links: {}
57
- check_methods:
58
- - :ensure_positive_duration
59
54
  - !ruby/object:Music::Transcription::Note
60
- duration: *1
55
+ duration: !ruby/object:Rational
56
+ denominator: 4
57
+ numerator: 1
61
58
  pitches:
62
- - *2
59
+ - !ruby/object:Music::Transcription::Pitch
60
+ octave: 2
61
+ semitone: 3
63
62
  articulation: :normal
64
63
  accented: false
65
64
  links: {}
66
- check_methods:
67
- - :ensure_positive_duration
68
65
  - !ruby/object:Music::Transcription::Note
69
- duration: &3 !ruby/object:Rational
66
+ duration: !ruby/object:Rational
70
67
  denominator: 8
71
68
  numerator: 1
72
69
  pitches: []
73
70
  articulation: :normal
74
71
  accented: false
75
72
  links: {}
76
- check_methods:
77
- - :ensure_positive_duration
78
73
  - !ruby/object:Music::Transcription::Note
79
- duration: *3
74
+ duration: !ruby/object:Rational
75
+ denominator: 8
76
+ numerator: 1
80
77
  pitches:
81
- - &5 !ruby/object:Music::Transcription::Pitch
78
+ - !ruby/object:Music::Transcription::Pitch
82
79
  octave: 2
83
80
  semitone: 11
84
81
  articulation: :normal
85
82
  accented: false
86
83
  links: {}
87
- check_methods:
88
- - :ensure_positive_duration
89
84
  - !ruby/object:Music::Transcription::Note
90
- duration: *1
85
+ duration: !ruby/object:Rational
86
+ denominator: 4
87
+ numerator: 1
91
88
  pitches:
92
- - *4
89
+ - !ruby/object:Music::Transcription::Pitch
90
+ octave: 2
91
+ semitone: 10
93
92
  articulation: :normal
94
93
  accented: false
95
94
  links: {}
96
- check_methods:
97
- - :ensure_positive_duration
98
95
  - !ruby/object:Music::Transcription::Note
99
- duration: *1
96
+ duration: !ruby/object:Rational
97
+ denominator: 4
98
+ numerator: 1
100
99
  pitches:
101
- - &6 !ruby/object:Music::Transcription::Pitch
100
+ - !ruby/object:Music::Transcription::Pitch
102
101
  octave: 2
103
102
  semitone: 8
104
103
  articulation: :normal
105
104
  accented: false
106
105
  links: {}
107
- check_methods:
108
- - :ensure_positive_duration
109
106
  - !ruby/object:Music::Transcription::Note
110
- duration: *1
111
- pitches:
112
- - *2
113
- articulation: :normal
114
- accented: false
115
- links: {}
116
- check_methods:
117
- - :ensure_positive_duration
118
- - !ruby/object:Music::Transcription::Note
119
- duration: *1
120
- pitches: []
121
- articulation: :normal
122
- accented: false
123
- links: {}
124
- check_methods:
125
- - :ensure_positive_duration
126
- - !ruby/object:Music::Transcription::Note
127
- duration: *1
128
- pitches:
129
- - *4
130
- articulation: :normal
131
- accented: false
132
- links: {}
133
- check_methods:
134
- - :ensure_positive_duration
135
- - !ruby/object:Music::Transcription::Note
136
- duration: *1
137
- pitches: []
138
- articulation: :normal
139
- accented: false
140
- links: {}
141
- check_methods:
142
- - :ensure_positive_duration
143
- - !ruby/object:Music::Transcription::Note
144
- duration: *1
107
+ duration: !ruby/object:Rational
108
+ denominator: 4
109
+ numerator: 1
145
110
  pitches:
146
- - *2
111
+ - !ruby/object:Music::Transcription::Pitch
112
+ octave: 2
113
+ semitone: 10
147
114
  articulation: :normal
148
115
  accented: false
149
116
  links: {}
150
- check_methods:
151
- - :ensure_positive_duration
152
117
  - !ruby/object:Music::Transcription::Note
153
- duration: *3
118
+ duration: !ruby/object:Rational
119
+ denominator: 8
120
+ numerator: 1
154
121
  pitches: []
155
122
  articulation: :normal
156
123
  accented: false
157
124
  links: {}
158
- check_methods:
159
- - :ensure_positive_duration
160
125
  - !ruby/object:Music::Transcription::Note
161
- duration: *3
162
- pitches:
163
- - *5
164
- articulation: :normal
165
- accented: false
166
- links: {}
167
- check_methods:
168
- - :ensure_positive_duration
169
- - !ruby/object:Music::Transcription::Note
170
- duration: *1
126
+ duration: !ruby/object:Rational
127
+ denominator: 8
128
+ numerator: 1
171
129
  pitches:
172
- - *4
130
+ - &1 !ruby/object:Music::Transcription::Pitch
131
+ octave: 3
132
+ semitone: 5
173
133
  articulation: :normal
174
134
  accented: false
175
- links: {}
176
- check_methods:
177
- - :ensure_positive_duration
135
+ links:
136
+ *1: !ruby/object:Music::Transcription::Link::Tie {}
178
137
  - !ruby/object:Music::Transcription::Note
179
- duration: *1
138
+ duration: !ruby/object:Rational
139
+ denominator: 2
140
+ numerator: 1
180
141
  pitches:
181
- - *6
142
+ - !ruby/object:Music::Transcription::Pitch
143
+ octave: 3
144
+ semitone: 5
182
145
  articulation: :normal
183
146
  accented: false
184
147
  links: {}
185
- check_methods:
186
- - :ensure_positive_duration
187
148
  - !ruby/object:Music::Transcription::Note
188
- duration: *1
149
+ duration: !ruby/object:Rational
150
+ denominator: 4
151
+ numerator: 1
189
152
  pitches:
190
- - *4
153
+ - !ruby/object:Music::Transcription::Pitch
154
+ octave: 2
155
+ semitone: 10
191
156
  articulation: :normal
192
157
  accented: false
193
158
  links: {}
194
- check_methods:
195
- - :ensure_positive_duration
196
159
  - !ruby/object:Music::Transcription::Note
197
- duration: *3
160
+ duration: !ruby/object:Rational
161
+ denominator: 8
162
+ numerator: 1
198
163
  pitches: []
199
164
  articulation: :normal
200
165
  accented: false
201
166
  links: {}
202
- check_methods:
203
- - :ensure_positive_duration
204
167
  - !ruby/object:Music::Transcription::Note
205
- duration: *3
168
+ duration: !ruby/object:Rational
169
+ denominator: 8
170
+ numerator: 1
206
171
  pitches:
207
- - &7 !ruby/object:Music::Transcription::Pitch
172
+ - &2 !ruby/object:Music::Transcription::Pitch
208
173
  octave: 3
209
174
  semitone: 5
210
- articulation: :slur
175
+ articulation: :normal
211
176
  accented: false
212
- links: {}
213
- check_methods:
214
- - :ensure_positive_duration
177
+ links:
178
+ *2: !ruby/object:Music::Transcription::Link::Tie {}
215
179
  - !ruby/object:Music::Transcription::Note
216
- duration: &8 !ruby/object:Rational
180
+ duration: !ruby/object:Rational
217
181
  denominator: 2
218
182
  numerator: 1
219
183
  pitches:
220
- - *7
184
+ - !ruby/object:Music::Transcription::Pitch
185
+ octave: 3
186
+ semitone: 5
221
187
  articulation: :normal
222
188
  accented: false
223
189
  links: {}
224
- check_methods:
225
- - :ensure_positive_duration
226
190
  - !ruby/object:Music::Transcription::Note
227
- duration: *1
191
+ duration: !ruby/object:Rational
192
+ denominator: 4
193
+ numerator: 1
228
194
  pitches:
229
- - *4
195
+ - !ruby/object:Music::Transcription::Pitch
196
+ octave: 2
197
+ semitone: 11
230
198
  articulation: :normal
231
199
  accented: false
232
200
  links: {}
233
- check_methods:
234
- - :ensure_positive_duration
235
201
  - !ruby/object:Music::Transcription::Note
236
- duration: *3
202
+ duration: !ruby/object:Rational
203
+ denominator: 8
204
+ numerator: 1
237
205
  pitches: []
238
206
  articulation: :normal
239
207
  accented: false
240
208
  links: {}
241
- check_methods:
242
- - :ensure_positive_duration
243
- - !ruby/object:Music::Transcription::Note
244
- duration: *3
245
- pitches:
246
- - *7
247
- articulation: :slur
248
- accented: false
249
- links: {}
250
- check_methods:
251
- - :ensure_positive_duration
252
209
  - !ruby/object:Music::Transcription::Note
253
- duration: *8
210
+ duration: !ruby/object:Rational
211
+ denominator: 8
212
+ numerator: 1
254
213
  pitches:
255
- - *7
214
+ - &3 !ruby/object:Music::Transcription::Pitch
215
+ octave: 3
216
+ semitone: 6
256
217
  articulation: :normal
257
218
  accented: false
258
- links: {}
259
- check_methods:
260
- - :ensure_positive_duration
219
+ links:
220
+ *3: !ruby/object:Music::Transcription::Link::Tie {}
261
221
  - !ruby/object:Music::Transcription::Note
262
- duration: *1
222
+ duration: !ruby/object:Rational
223
+ denominator: 2
224
+ numerator: 1
263
225
  pitches:
264
- - *5
226
+ - !ruby/object:Music::Transcription::Pitch
227
+ octave: 3
228
+ semitone: 6
265
229
  articulation: :normal
266
230
  accented: false
267
231
  links: {}
268
- check_methods:
269
- - :ensure_positive_duration
270
232
  - !ruby/object:Music::Transcription::Note
271
- duration: *3
233
+ duration: !ruby/object:Rational
234
+ denominator: 8
235
+ numerator: 1
272
236
  pitches: []
273
237
  articulation: :normal
274
238
  accented: false
275
239
  links: {}
276
- check_methods:
277
- - :ensure_positive_duration
278
240
  - !ruby/object:Music::Transcription::Note
279
- duration: *3
241
+ duration: !ruby/object:Rational
242
+ denominator: 8
243
+ numerator: 1
280
244
  pitches:
281
- - &9 !ruby/object:Music::Transcription::Pitch
245
+ - &4 !ruby/object:Music::Transcription::Pitch
282
246
  octave: 3
283
247
  semitone: 6
284
- articulation: :slur
285
- accented: false
286
- links: {}
287
- check_methods:
288
- - :ensure_positive_duration
289
- - !ruby/object:Music::Transcription::Note
290
- duration: *8
291
- pitches:
292
- - *9
293
- articulation: :normal
294
- accented: false
295
- links: {}
296
- check_methods:
297
- - :ensure_positive_duration
298
- - !ruby/object:Music::Transcription::Note
299
- duration: *1
300
- pitches:
301
- - *5
302
- articulation: :normal
303
- accented: false
304
- links: {}
305
- check_methods:
306
- - :ensure_positive_duration
307
- - !ruby/object:Music::Transcription::Note
308
- duration: *3
309
- pitches: []
310
248
  articulation: :normal
311
249
  accented: false
312
- links: {}
313
- check_methods:
314
- - :ensure_positive_duration
250
+ links:
251
+ *4: !ruby/object:Music::Transcription::Link::Tie {}
315
252
  - !ruby/object:Music::Transcription::Note
316
- duration: *3
317
- pitches:
318
- - *9
319
- articulation: :slur
320
- accented: false
321
- links: {}
322
- check_methods:
323
- - :ensure_positive_duration
324
- - !ruby/object:Music::Transcription::Note
325
- duration: *8
253
+ duration: !ruby/object:Rational
254
+ denominator: 2
255
+ numerator: 1
326
256
  pitches:
327
- - *9
257
+ - !ruby/object:Music::Transcription::Pitch
258
+ octave: 3
259
+ semitone: 6
328
260
  articulation: :normal
329
261
  accented: false
330
262
  links: {}
331
- check_methods:
332
- - :ensure_positive_duration
333
263
  start_dynamic: 0.625
334
264
  dynamic_changes: {}
335
- check_methods:
336
- - :ensure_start_dynamic
337
- - :ensure_dynamic_change_values_range
338
265
  program: !ruby/object:Music::Transcription::Program
339
266
  segments:
340
267
  - !ruby/range
341
268
  begin: 0
342
- end: 8.0
343
- excl: true
344
- check_methods:
345
- - :ensure_increasing_segments
346
- - :ensure_nonnegative_segments
347
- check_methods:
348
- - :check_start_tempo
349
- - :check_tempo_changes
350
- - :check_meter_changes
269
+ end: 2
270
+ excl: false
271
+ - !ruby/range
272
+ begin: 0
273
+ end: 6
274
+ excl: false