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.
- checksums.yaml +4 -4
- data/examples/hip.yml +254 -145
- data/examples/make_hip.rb +9 -8
- data/examples/make_missed_connection.rb +35 -34
- data/examples/make_song1.rb +36 -35
- data/examples/make_song2.rb +22 -22
- data/examples/missed_connection.yml +242 -197
- data/examples/song1.yml +277 -212
- data/examples/song2.yml +171 -117
- data/lib/music-transcription/articulations.rb +4 -6
- data/lib/music-transcription/link.rb +22 -20
- data/lib/music-transcription/note.rb +9 -8
- data/lib/music-transcription/version.rb +1 -1
- data/spec/link_spec.rb +70 -13
- data/spec/note_spec.rb +16 -6
- metadata +2 -2
@@ -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
|
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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
numerator: 1
|
38
|
+
check_methods:
|
39
|
+
- :ensure_positive_duration
|
40
|
+
- !ruby/object:Music::Transcription::Note
|
41
|
+
duration: *1
|
37
42
|
pitches:
|
38
|
-
- &
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
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
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
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
|
-
|
58
|
-
|
59
|
-
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
numerator: 1
|
76
|
+
check_methods:
|
77
|
+
- :ensure_positive_duration
|
78
|
+
- !ruby/object:Music::Transcription::Note
|
79
|
+
duration: *3
|
69
80
|
pitches:
|
70
|
-
- &
|
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
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
numerator: 1
|
87
|
+
check_methods:
|
88
|
+
- :ensure_positive_duration
|
89
|
+
- !ruby/object:Music::Transcription::Note
|
90
|
+
duration: *1
|
79
91
|
pitches:
|
80
|
-
- *
|
92
|
+
- *4
|
93
|
+
articulation: :normal
|
94
|
+
accented: false
|
81
95
|
links: {}
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
numerator: 1
|
96
|
+
check_methods:
|
97
|
+
- :ensure_positive_duration
|
98
|
+
- !ruby/object:Music::Transcription::Note
|
99
|
+
duration: *1
|
87
100
|
pitches:
|
88
|
-
- &
|
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
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
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
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
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
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
numerator: 1
|
124
|
+
check_methods:
|
125
|
+
- :ensure_positive_duration
|
126
|
+
- !ruby/object:Music::Transcription::Note
|
127
|
+
duration: *1
|
112
128
|
pitches:
|
113
|
-
- *
|
129
|
+
- *4
|
130
|
+
articulation: :normal
|
131
|
+
accented: false
|
114
132
|
links: {}
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
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
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
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
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
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
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
numerator: 1
|
158
|
+
check_methods:
|
159
|
+
- :ensure_positive_duration
|
160
|
+
- !ruby/object:Music::Transcription::Note
|
161
|
+
duration: *3
|
142
162
|
pitches:
|
143
|
-
- *
|
163
|
+
- *5
|
164
|
+
articulation: :normal
|
165
|
+
accented: false
|
144
166
|
links: {}
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
numerator: 1
|
167
|
+
check_methods:
|
168
|
+
- :ensure_positive_duration
|
169
|
+
- !ruby/object:Music::Transcription::Note
|
170
|
+
duration: *1
|
150
171
|
pitches:
|
151
|
-
- *
|
172
|
+
- *4
|
173
|
+
articulation: :normal
|
174
|
+
accented: false
|
152
175
|
links: {}
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
numerator: 1
|
176
|
+
check_methods:
|
177
|
+
- :ensure_positive_duration
|
178
|
+
- !ruby/object:Music::Transcription::Note
|
179
|
+
duration: *1
|
158
180
|
pitches:
|
159
|
-
- *
|
181
|
+
- *6
|
182
|
+
articulation: :normal
|
183
|
+
accented: false
|
160
184
|
links: {}
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
numerator: 1
|
185
|
+
check_methods:
|
186
|
+
- :ensure_positive_duration
|
187
|
+
- !ruby/object:Music::Transcription::Note
|
188
|
+
duration: *1
|
166
189
|
pitches:
|
167
|
-
- *
|
190
|
+
- *4
|
191
|
+
articulation: :normal
|
192
|
+
accented: false
|
168
193
|
links: {}
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
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
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
numerator: 1
|
202
|
+
check_methods:
|
203
|
+
- :ensure_positive_duration
|
204
|
+
- !ruby/object:Music::Transcription::Note
|
205
|
+
duration: *3
|
181
206
|
pitches:
|
182
|
-
- &
|
207
|
+
- &7 !ruby/object:Music::Transcription::Pitch
|
183
208
|
octave: 3
|
184
209
|
semitone: 5
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
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
|
-
- *
|
220
|
+
- *7
|
221
|
+
articulation: :normal
|
222
|
+
accented: false
|
195
223
|
links: {}
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
numerator: 1
|
224
|
+
check_methods:
|
225
|
+
- :ensure_positive_duration
|
226
|
+
- !ruby/object:Music::Transcription::Note
|
227
|
+
duration: *1
|
201
228
|
pitches:
|
202
|
-
- *
|
229
|
+
- *4
|
230
|
+
articulation: :normal
|
231
|
+
accented: false
|
203
232
|
links: {}
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
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
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
numerator: 1
|
241
|
+
check_methods:
|
242
|
+
- :ensure_positive_duration
|
243
|
+
- !ruby/object:Music::Transcription::Note
|
244
|
+
duration: *3
|
216
245
|
pitches:
|
217
|
-
- *
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
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
|
-
- *
|
255
|
+
- *7
|
256
|
+
articulation: :normal
|
257
|
+
accented: false
|
228
258
|
links: {}
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
numerator: 1
|
259
|
+
check_methods:
|
260
|
+
- :ensure_positive_duration
|
261
|
+
- !ruby/object:Music::Transcription::Note
|
262
|
+
duration: *1
|
234
263
|
pitches:
|
235
|
-
- *
|
264
|
+
- *5
|
265
|
+
articulation: :normal
|
266
|
+
accented: false
|
236
267
|
links: {}
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
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
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
numerator: 1
|
276
|
+
check_methods:
|
277
|
+
- :ensure_positive_duration
|
278
|
+
- !ruby/object:Music::Transcription::Note
|
279
|
+
duration: *3
|
249
280
|
pitches:
|
250
|
-
- &
|
281
|
+
- &9 !ruby/object:Music::Transcription::Pitch
|
251
282
|
octave: 3
|
252
283
|
semitone: 6
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
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
|
-
- *
|
292
|
+
- *9
|
293
|
+
articulation: :normal
|
294
|
+
accented: false
|
263
295
|
links: {}
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
numerator: 1
|
296
|
+
check_methods:
|
297
|
+
- :ensure_positive_duration
|
298
|
+
- !ruby/object:Music::Transcription::Note
|
299
|
+
duration: *1
|
269
300
|
pitches:
|
270
|
-
- *
|
301
|
+
- *5
|
302
|
+
articulation: :normal
|
303
|
+
accented: false
|
271
304
|
links: {}
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
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
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
numerator: 1
|
313
|
+
check_methods:
|
314
|
+
- :ensure_positive_duration
|
315
|
+
- !ruby/object:Music::Transcription::Note
|
316
|
+
duration: *3
|
284
317
|
pitches:
|
285
|
-
- *
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
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
|
-
- *
|
327
|
+
- *9
|
328
|
+
articulation: :normal
|
329
|
+
accented: false
|
296
330
|
links: {}
|
297
|
-
|
298
|
-
|
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
|