music-transcription 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,299 +7,344 @@ 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
10
13
  start_tempo: 120
11
14
  meter_changes: {}
12
15
  tempo_changes: {}
13
16
  parts:
14
17
  bass: !ruby/object:Music::Transcription::Part
15
18
  notes:
16
- - !ruby/object:Music::Transcription::Note::Quarter
17
- duration: !ruby/object:Rational
19
+ - !ruby/object:Music::Transcription::Note
20
+ duration: &1 !ruby/object:Rational
18
21
  denominator: 4
19
22
  numerator: 1
20
23
  pitches:
21
24
  - &2 !ruby/object:Music::Transcription::Pitch
22
25
  octave: 2
23
26
  semitone: 3
27
+ articulation: :normal
28
+ accented: false
24
29
  links: {}
25
- accent: &1 !ruby/class 'Music::Transcription::Accent::None'
26
- - !ruby/object:Music::Transcription::Note::Quarter
27
- duration: !ruby/object:Rational
28
- denominator: 4
29
- numerator: 1
30
+ check_methods:
31
+ - :ensure_positive_duration
32
+ - !ruby/object:Music::Transcription::Note
33
+ duration: *1
30
34
  pitches: []
35
+ articulation: :normal
36
+ accented: false
31
37
  links: {}
32
- accent: *1
33
- - !ruby/object:Music::Transcription::Note::Quarter
34
- duration: !ruby/object:Rational
35
- denominator: 4
36
- numerator: 1
38
+ check_methods:
39
+ - :ensure_positive_duration
40
+ - !ruby/object:Music::Transcription::Note
41
+ duration: *1
37
42
  pitches:
38
- - &3 !ruby/object:Music::Transcription::Pitch
43
+ - &4 !ruby/object:Music::Transcription::Pitch
39
44
  octave: 2
40
45
  semitone: 10
46
+ articulation: :normal
47
+ accented: false
41
48
  links: {}
42
- accent: *1
43
- - !ruby/object:Music::Transcription::Note::Quarter
44
- duration: !ruby/object:Rational
45
- denominator: 4
46
- numerator: 1
49
+ check_methods:
50
+ - :ensure_positive_duration
51
+ - !ruby/object:Music::Transcription::Note
52
+ duration: *1
47
53
  pitches: []
54
+ articulation: :normal
55
+ accented: false
48
56
  links: {}
49
- accent: *1
50
- - !ruby/object:Music::Transcription::Note::Quarter
51
- duration: !ruby/object:Rational
52
- denominator: 4
53
- numerator: 1
57
+ check_methods:
58
+ - :ensure_positive_duration
59
+ - !ruby/object:Music::Transcription::Note
60
+ duration: *1
54
61
  pitches:
55
62
  - *2
63
+ articulation: :normal
64
+ accented: false
56
65
  links: {}
57
- accent: *1
58
- - !ruby/object:Music::Transcription::Note::Eighth
59
- duration: !ruby/object:Rational
66
+ check_methods:
67
+ - :ensure_positive_duration
68
+ - !ruby/object:Music::Transcription::Note
69
+ duration: &3 !ruby/object:Rational
60
70
  denominator: 8
61
71
  numerator: 1
62
72
  pitches: []
73
+ articulation: :normal
74
+ accented: false
63
75
  links: {}
64
- accent: *1
65
- - !ruby/object:Music::Transcription::Note::Eighth
66
- duration: !ruby/object:Rational
67
- denominator: 8
68
- numerator: 1
76
+ check_methods:
77
+ - :ensure_positive_duration
78
+ - !ruby/object:Music::Transcription::Note
79
+ duration: *3
69
80
  pitches:
70
- - &4 !ruby/object:Music::Transcription::Pitch
81
+ - &5 !ruby/object:Music::Transcription::Pitch
71
82
  octave: 2
72
83
  semitone: 11
84
+ articulation: :normal
85
+ accented: false
73
86
  links: {}
74
- accent: *1
75
- - !ruby/object:Music::Transcription::Note::Quarter
76
- duration: !ruby/object:Rational
77
- denominator: 4
78
- numerator: 1
87
+ check_methods:
88
+ - :ensure_positive_duration
89
+ - !ruby/object:Music::Transcription::Note
90
+ duration: *1
79
91
  pitches:
80
- - *3
92
+ - *4
93
+ articulation: :normal
94
+ accented: false
81
95
  links: {}
82
- accent: *1
83
- - !ruby/object:Music::Transcription::Note::Quarter
84
- duration: !ruby/object:Rational
85
- denominator: 4
86
- numerator: 1
96
+ check_methods:
97
+ - :ensure_positive_duration
98
+ - !ruby/object:Music::Transcription::Note
99
+ duration: *1
87
100
  pitches:
88
- - &5 !ruby/object:Music::Transcription::Pitch
101
+ - &6 !ruby/object:Music::Transcription::Pitch
89
102
  octave: 2
90
103
  semitone: 8
104
+ articulation: :normal
105
+ accented: false
91
106
  links: {}
92
- accent: *1
93
- - !ruby/object:Music::Transcription::Note::Quarter
94
- duration: !ruby/object:Rational
95
- denominator: 4
96
- numerator: 1
107
+ check_methods:
108
+ - :ensure_positive_duration
109
+ - !ruby/object:Music::Transcription::Note
110
+ duration: *1
97
111
  pitches:
98
112
  - *2
113
+ articulation: :normal
114
+ accented: false
99
115
  links: {}
100
- accent: *1
101
- - !ruby/object:Music::Transcription::Note::Quarter
102
- duration: !ruby/object:Rational
103
- denominator: 4
104
- numerator: 1
116
+ check_methods:
117
+ - :ensure_positive_duration
118
+ - !ruby/object:Music::Transcription::Note
119
+ duration: *1
105
120
  pitches: []
121
+ articulation: :normal
122
+ accented: false
106
123
  links: {}
107
- accent: *1
108
- - !ruby/object:Music::Transcription::Note::Quarter
109
- duration: !ruby/object:Rational
110
- denominator: 4
111
- numerator: 1
124
+ check_methods:
125
+ - :ensure_positive_duration
126
+ - !ruby/object:Music::Transcription::Note
127
+ duration: *1
112
128
  pitches:
113
- - *3
129
+ - *4
130
+ articulation: :normal
131
+ accented: false
114
132
  links: {}
115
- accent: *1
116
- - !ruby/object:Music::Transcription::Note::Quarter
117
- duration: !ruby/object:Rational
118
- denominator: 4
119
- numerator: 1
133
+ check_methods:
134
+ - :ensure_positive_duration
135
+ - !ruby/object:Music::Transcription::Note
136
+ duration: *1
120
137
  pitches: []
138
+ articulation: :normal
139
+ accented: false
121
140
  links: {}
122
- accent: *1
123
- - !ruby/object:Music::Transcription::Note::Quarter
124
- duration: !ruby/object:Rational
125
- denominator: 4
126
- numerator: 1
141
+ check_methods:
142
+ - :ensure_positive_duration
143
+ - !ruby/object:Music::Transcription::Note
144
+ duration: *1
127
145
  pitches:
128
146
  - *2
147
+ articulation: :normal
148
+ accented: false
129
149
  links: {}
130
- accent: *1
131
- - !ruby/object:Music::Transcription::Note::Eighth
132
- duration: !ruby/object:Rational
133
- denominator: 8
134
- numerator: 1
150
+ check_methods:
151
+ - :ensure_positive_duration
152
+ - !ruby/object:Music::Transcription::Note
153
+ duration: *3
135
154
  pitches: []
155
+ articulation: :normal
156
+ accented: false
136
157
  links: {}
137
- accent: *1
138
- - !ruby/object:Music::Transcription::Note::Eighth
139
- duration: !ruby/object:Rational
140
- denominator: 8
141
- numerator: 1
158
+ check_methods:
159
+ - :ensure_positive_duration
160
+ - !ruby/object:Music::Transcription::Note
161
+ duration: *3
142
162
  pitches:
143
- - *4
163
+ - *5
164
+ articulation: :normal
165
+ accented: false
144
166
  links: {}
145
- accent: *1
146
- - !ruby/object:Music::Transcription::Note::Quarter
147
- duration: !ruby/object:Rational
148
- denominator: 4
149
- numerator: 1
167
+ check_methods:
168
+ - :ensure_positive_duration
169
+ - !ruby/object:Music::Transcription::Note
170
+ duration: *1
150
171
  pitches:
151
- - *3
172
+ - *4
173
+ articulation: :normal
174
+ accented: false
152
175
  links: {}
153
- accent: *1
154
- - !ruby/object:Music::Transcription::Note::Quarter
155
- duration: !ruby/object:Rational
156
- denominator: 4
157
- numerator: 1
176
+ check_methods:
177
+ - :ensure_positive_duration
178
+ - !ruby/object:Music::Transcription::Note
179
+ duration: *1
158
180
  pitches:
159
- - *5
181
+ - *6
182
+ articulation: :normal
183
+ accented: false
160
184
  links: {}
161
- accent: *1
162
- - !ruby/object:Music::Transcription::Note::Quarter
163
- duration: !ruby/object:Rational
164
- denominator: 4
165
- numerator: 1
185
+ check_methods:
186
+ - :ensure_positive_duration
187
+ - !ruby/object:Music::Transcription::Note
188
+ duration: *1
166
189
  pitches:
167
- - *3
190
+ - *4
191
+ articulation: :normal
192
+ accented: false
168
193
  links: {}
169
- accent: *1
170
- - !ruby/object:Music::Transcription::Note::Eighth
171
- duration: !ruby/object:Rational
172
- denominator: 8
173
- numerator: 1
194
+ check_methods:
195
+ - :ensure_positive_duration
196
+ - !ruby/object:Music::Transcription::Note
197
+ duration: *3
174
198
  pitches: []
199
+ articulation: :normal
200
+ accented: false
175
201
  links: {}
176
- accent: *1
177
- - !ruby/object:Music::Transcription::Note::Eighth
178
- duration: !ruby/object:Rational
179
- denominator: 8
180
- numerator: 1
202
+ check_methods:
203
+ - :ensure_positive_duration
204
+ - !ruby/object:Music::Transcription::Note
205
+ duration: *3
181
206
  pitches:
182
- - &6 !ruby/object:Music::Transcription::Pitch
207
+ - &7 !ruby/object:Music::Transcription::Pitch
183
208
  octave: 3
184
209
  semitone: 5
185
- links:
186
- *6: !ruby/object:Music::Transcription::Link::Slur
187
- target_pitch: *6
188
- accent: *1
189
- - !ruby/object:Music::Transcription::Note::Half
190
- duration: !ruby/object:Rational
210
+ articulation: :slur
211
+ accented: false
212
+ links: {}
213
+ check_methods:
214
+ - :ensure_positive_duration
215
+ - !ruby/object:Music::Transcription::Note
216
+ duration: &8 !ruby/object:Rational
191
217
  denominator: 2
192
218
  numerator: 1
193
219
  pitches:
194
- - *6
220
+ - *7
221
+ articulation: :normal
222
+ accented: false
195
223
  links: {}
196
- accent: *1
197
- - !ruby/object:Music::Transcription::Note::Quarter
198
- duration: !ruby/object:Rational
199
- denominator: 4
200
- numerator: 1
224
+ check_methods:
225
+ - :ensure_positive_duration
226
+ - !ruby/object:Music::Transcription::Note
227
+ duration: *1
201
228
  pitches:
202
- - *3
229
+ - *4
230
+ articulation: :normal
231
+ accented: false
203
232
  links: {}
204
- accent: *1
205
- - !ruby/object:Music::Transcription::Note::Eighth
206
- duration: !ruby/object:Rational
207
- denominator: 8
208
- numerator: 1
233
+ check_methods:
234
+ - :ensure_positive_duration
235
+ - !ruby/object:Music::Transcription::Note
236
+ duration: *3
209
237
  pitches: []
238
+ articulation: :normal
239
+ accented: false
210
240
  links: {}
211
- accent: *1
212
- - !ruby/object:Music::Transcription::Note::Eighth
213
- duration: !ruby/object:Rational
214
- denominator: 8
215
- numerator: 1
241
+ check_methods:
242
+ - :ensure_positive_duration
243
+ - !ruby/object:Music::Transcription::Note
244
+ duration: *3
216
245
  pitches:
217
- - *6
218
- links:
219
- *6: !ruby/object:Music::Transcription::Link::Slur
220
- target_pitch: *6
221
- accent: *1
222
- - !ruby/object:Music::Transcription::Note::Half
223
- duration: !ruby/object:Rational
224
- denominator: 2
225
- numerator: 1
246
+ - *7
247
+ articulation: :slur
248
+ accented: false
249
+ links: {}
250
+ check_methods:
251
+ - :ensure_positive_duration
252
+ - !ruby/object:Music::Transcription::Note
253
+ duration: *8
226
254
  pitches:
227
- - *6
255
+ - *7
256
+ articulation: :normal
257
+ accented: false
228
258
  links: {}
229
- accent: *1
230
- - !ruby/object:Music::Transcription::Note::Quarter
231
- duration: !ruby/object:Rational
232
- denominator: 4
233
- numerator: 1
259
+ check_methods:
260
+ - :ensure_positive_duration
261
+ - !ruby/object:Music::Transcription::Note
262
+ duration: *1
234
263
  pitches:
235
- - *4
264
+ - *5
265
+ articulation: :normal
266
+ accented: false
236
267
  links: {}
237
- accent: *1
238
- - !ruby/object:Music::Transcription::Note::Eighth
239
- duration: !ruby/object:Rational
240
- denominator: 8
241
- numerator: 1
268
+ check_methods:
269
+ - :ensure_positive_duration
270
+ - !ruby/object:Music::Transcription::Note
271
+ duration: *3
242
272
  pitches: []
273
+ articulation: :normal
274
+ accented: false
243
275
  links: {}
244
- accent: *1
245
- - !ruby/object:Music::Transcription::Note::Eighth
246
- duration: !ruby/object:Rational
247
- denominator: 8
248
- numerator: 1
276
+ check_methods:
277
+ - :ensure_positive_duration
278
+ - !ruby/object:Music::Transcription::Note
279
+ duration: *3
249
280
  pitches:
250
- - &7 !ruby/object:Music::Transcription::Pitch
281
+ - &9 !ruby/object:Music::Transcription::Pitch
251
282
  octave: 3
252
283
  semitone: 6
253
- links:
254
- *7: !ruby/object:Music::Transcription::Link::Slur
255
- target_pitch: *7
256
- accent: *1
257
- - !ruby/object:Music::Transcription::Note::Half
258
- duration: !ruby/object:Rational
259
- denominator: 2
260
- numerator: 1
284
+ articulation: :slur
285
+ accented: false
286
+ links: {}
287
+ check_methods:
288
+ - :ensure_positive_duration
289
+ - !ruby/object:Music::Transcription::Note
290
+ duration: *8
261
291
  pitches:
262
- - *7
292
+ - *9
293
+ articulation: :normal
294
+ accented: false
263
295
  links: {}
264
- accent: *1
265
- - !ruby/object:Music::Transcription::Note::Quarter
266
- duration: !ruby/object:Rational
267
- denominator: 4
268
- numerator: 1
296
+ check_methods:
297
+ - :ensure_positive_duration
298
+ - !ruby/object:Music::Transcription::Note
299
+ duration: *1
269
300
  pitches:
270
- - *4
301
+ - *5
302
+ articulation: :normal
303
+ accented: false
271
304
  links: {}
272
- accent: *1
273
- - !ruby/object:Music::Transcription::Note::Eighth
274
- duration: !ruby/object:Rational
275
- denominator: 8
276
- numerator: 1
305
+ check_methods:
306
+ - :ensure_positive_duration
307
+ - !ruby/object:Music::Transcription::Note
308
+ duration: *3
277
309
  pitches: []
310
+ articulation: :normal
311
+ accented: false
278
312
  links: {}
279
- accent: *1
280
- - !ruby/object:Music::Transcription::Note::Eighth
281
- duration: !ruby/object:Rational
282
- denominator: 8
283
- numerator: 1
313
+ check_methods:
314
+ - :ensure_positive_duration
315
+ - !ruby/object:Music::Transcription::Note
316
+ duration: *3
284
317
  pitches:
285
- - *7
286
- links:
287
- *7: !ruby/object:Music::Transcription::Link::Slur
288
- target_pitch: *7
289
- accent: *1
290
- - !ruby/object:Music::Transcription::Note::Half
291
- duration: !ruby/object:Rational
292
- denominator: 2
293
- numerator: 1
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
294
326
  pitches:
295
- - *7
327
+ - *9
328
+ articulation: :normal
329
+ accented: false
296
330
  links: {}
297
- accent: *1
298
- start_dynamic: !ruby/object:Music::Transcription::Dynamic::MezzoForte {}
331
+ check_methods:
332
+ - :ensure_positive_duration
333
+ start_dynamic: 0.625
299
334
  dynamic_changes: {}
335
+ check_methods:
336
+ - :ensure_start_dynamic
337
+ - :ensure_dynamic_change_values_range
300
338
  program: !ruby/object:Music::Transcription::Program
301
339
  segments:
302
340
  - !ruby/range
303
341
  begin: 0
304
342
  end: 8.0
305
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