midiator 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/CHANGELOG.md +4 -0
- data/Manifest.txt +1 -3
- data/Rakefile +2 -0
- data/lib/midiator.rb +1 -1
- data/lib/midiator/interface.rb +1 -1
- data/spec/interface_spec.rb +1 -1
- metadata +14 -32
- data/examples/a_little_end_music.rb +0 -944
- data/examples/amen_break.rb +0 -157
- data/examples/twinkle.rb +0 -34
data/.gemtest
ADDED
File without changes
|
data/CHANGELOG.md
CHANGED
data/Manifest.txt
CHANGED
@@ -1,17 +1,15 @@
|
|
1
|
+
.gemtest
|
1
2
|
CHANGELOG.md
|
2
3
|
LICENSE
|
3
4
|
LICENSE.prp
|
4
5
|
Manifest.txt
|
5
6
|
README.md
|
6
7
|
Rakefile
|
7
|
-
examples/a_little_end_music.rb
|
8
|
-
examples/amen_break.rb
|
9
8
|
examples/chords.rb
|
10
9
|
examples/chromatic_scale.rb
|
11
10
|
examples/drum_chords.rb
|
12
11
|
examples/metronome.rb
|
13
12
|
examples/synth.rb
|
14
|
-
examples/twinkle.rb
|
15
13
|
lib/midiator.rb
|
16
14
|
lib/midiator/driver.rb
|
17
15
|
lib/midiator/driver_registry.rb
|
data/Rakefile
CHANGED
data/lib/midiator.rb
CHANGED
data/lib/midiator/interface.rb
CHANGED
data/spec/interface_spec.rb
CHANGED
@@ -60,7 +60,7 @@ describe MIDIator::Interface do
|
|
60
60
|
|
61
61
|
it "selects CoreMIDI for OSX" do
|
62
62
|
RUBY_PLATFORM = "universal-darwin10.0"
|
63
|
-
@interface.should_receive( :use ).with( :
|
63
|
+
@interface.should_receive( :use ).with( :dls_synth )
|
64
64
|
|
65
65
|
@interface.autodetect_driver
|
66
66
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: midiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 5
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ben Bleything
|
@@ -15,29 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-02-22 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
name: rubyforge
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 7
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 0
|
33
|
-
- 4
|
34
|
-
version: 2.0.4
|
35
|
-
type: :development
|
36
|
-
version_requirements: *id001
|
37
21
|
- !ruby/object:Gem::Dependency
|
38
22
|
name: rspec
|
39
23
|
prerelease: false
|
40
|
-
requirement: &
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
41
25
|
none: false
|
42
26
|
requirements:
|
43
27
|
- - ">="
|
@@ -49,23 +33,23 @@ dependencies:
|
|
49
33
|
- 0
|
50
34
|
version: 2.1.0
|
51
35
|
type: :development
|
52
|
-
version_requirements: *
|
36
|
+
version_requirements: *id001
|
53
37
|
- !ruby/object:Gem::Dependency
|
54
38
|
name: hoe
|
55
39
|
prerelease: false
|
56
|
-
requirement: &
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
57
41
|
none: false
|
58
42
|
requirements:
|
59
43
|
- - ">="
|
60
44
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
45
|
+
hash: 41
|
62
46
|
segments:
|
63
47
|
- 2
|
64
|
-
-
|
65
|
-
-
|
66
|
-
version: 2.
|
48
|
+
- 9
|
49
|
+
- 1
|
50
|
+
version: 2.9.1
|
67
51
|
type: :development
|
68
|
-
version_requirements: *
|
52
|
+
version_requirements: *id002
|
69
53
|
description: |-
|
70
54
|
A nice Ruby interface to your system's MIDI services.
|
71
55
|
|
@@ -84,20 +68,18 @@ extensions: []
|
|
84
68
|
extra_rdoc_files:
|
85
69
|
- Manifest.txt
|
86
70
|
files:
|
71
|
+
- .gemtest
|
87
72
|
- CHANGELOG.md
|
88
73
|
- LICENSE
|
89
74
|
- LICENSE.prp
|
90
75
|
- Manifest.txt
|
91
76
|
- README.md
|
92
77
|
- Rakefile
|
93
|
-
- examples/a_little_end_music.rb
|
94
|
-
- examples/amen_break.rb
|
95
78
|
- examples/chords.rb
|
96
79
|
- examples/chromatic_scale.rb
|
97
80
|
- examples/drum_chords.rb
|
98
81
|
- examples/metronome.rb
|
99
82
|
- examples/synth.rb
|
100
|
-
- examples/twinkle.rb
|
101
83
|
- lib/midiator.rb
|
102
84
|
- lib/midiator/driver.rb
|
103
85
|
- lib/midiator/driver_registry.rb
|
@@ -147,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
129
|
requirements: []
|
148
130
|
|
149
131
|
rubyforge_project: midiator
|
150
|
-
rubygems_version: 1.
|
132
|
+
rubygems_version: 1.5.0
|
151
133
|
signing_key:
|
152
134
|
specification_version: 3
|
153
135
|
summary: A nice Ruby interface to your system's MIDI services
|
@@ -1,944 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'midiator'
|
5
|
-
|
6
|
-
midi = MIDIator::Interface.new
|
7
|
-
midi.use :dls_synth
|
8
|
-
|
9
|
-
include MIDIator::Notes
|
10
|
-
|
11
|
-
scale = [ C4, Cs4, D4, Eb4, E4, F4, Fs4, G4, Gs4, A4, Bb4, B4,
|
12
|
-
C5, Cs5, D5, Eb5, E5, F5, Fs5, G5, Gs5, A5, Bb5, B5 ]
|
13
|
-
|
14
|
-
DATA.each_line do |line|
|
15
|
-
num_spaces = line.match( /^(\s+)/ )[1].size rescue 0
|
16
|
-
midi.play scale[ num_spaces / 2 ]
|
17
|
-
end
|
18
|
-
|
19
|
-
__END__
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end
|
128
|
-
end
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end
|
132
|
-
end
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
end
|
144
|
-
end
|
145
|
-
end
|
146
|
-
end
|
147
|
-
end
|
148
|
-
end
|
149
|
-
end
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
154
|
-
end
|
155
|
-
end
|
156
|
-
end
|
157
|
-
end
|
158
|
-
end
|
159
|
-
end
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
end
|
166
|
-
end
|
167
|
-
end
|
168
|
-
end
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|
172
|
-
end
|
173
|
-
end
|
174
|
-
end
|
175
|
-
end
|
176
|
-
end
|
177
|
-
end
|
178
|
-
end
|
179
|
-
end
|
180
|
-
end
|
181
|
-
end
|
182
|
-
end
|
183
|
-
end
|
184
|
-
end
|
185
|
-
end
|
186
|
-
end
|
187
|
-
end
|
188
|
-
end
|
189
|
-
end
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
193
|
-
end
|
194
|
-
end
|
195
|
-
end
|
196
|
-
end
|
197
|
-
end
|
198
|
-
end
|
199
|
-
end
|
200
|
-
end
|
201
|
-
end
|
202
|
-
end
|
203
|
-
end
|
204
|
-
end
|
205
|
-
end
|
206
|
-
end
|
207
|
-
end
|
208
|
-
end
|
209
|
-
end
|
210
|
-
end
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
214
|
-
end
|
215
|
-
end
|
216
|
-
end
|
217
|
-
end
|
218
|
-
end
|
219
|
-
end
|
220
|
-
end
|
221
|
-
end
|
222
|
-
end
|
223
|
-
end
|
224
|
-
end
|
225
|
-
end
|
226
|
-
end
|
227
|
-
end
|
228
|
-
end
|
229
|
-
end
|
230
|
-
end
|
231
|
-
end
|
232
|
-
end
|
233
|
-
end
|
234
|
-
end
|
235
|
-
end
|
236
|
-
end
|
237
|
-
end
|
238
|
-
end
|
239
|
-
end
|
240
|
-
end
|
241
|
-
end
|
242
|
-
end
|
243
|
-
end
|
244
|
-
end
|
245
|
-
end
|
246
|
-
end
|
247
|
-
end
|
248
|
-
end
|
249
|
-
end
|
250
|
-
end
|
251
|
-
end
|
252
|
-
end
|
253
|
-
end
|
254
|
-
end
|
255
|
-
end
|
256
|
-
end
|
257
|
-
end
|
258
|
-
end
|
259
|
-
end
|
260
|
-
end
|
261
|
-
end
|
262
|
-
end
|
263
|
-
end
|
264
|
-
end
|
265
|
-
end
|
266
|
-
end
|
267
|
-
end
|
268
|
-
end
|
269
|
-
end
|
270
|
-
end
|
271
|
-
end
|
272
|
-
end
|
273
|
-
end
|
274
|
-
end
|
275
|
-
end
|
276
|
-
end
|
277
|
-
end
|
278
|
-
end
|
279
|
-
end
|
280
|
-
end
|
281
|
-
end
|
282
|
-
end
|
283
|
-
end
|
284
|
-
end
|
285
|
-
end
|
286
|
-
end
|
287
|
-
end
|
288
|
-
end
|
289
|
-
end
|
290
|
-
end
|
291
|
-
end
|
292
|
-
end
|
293
|
-
end
|
294
|
-
end
|
295
|
-
end
|
296
|
-
end
|
297
|
-
end
|
298
|
-
end
|
299
|
-
end
|
300
|
-
end
|
301
|
-
end
|
302
|
-
end
|
303
|
-
end
|
304
|
-
end
|
305
|
-
end
|
306
|
-
end
|
307
|
-
end
|
308
|
-
end
|
309
|
-
end
|
310
|
-
end
|
311
|
-
end
|
312
|
-
end
|
313
|
-
end
|
314
|
-
end
|
315
|
-
end
|
316
|
-
end
|
317
|
-
end
|
318
|
-
end
|
319
|
-
end
|
320
|
-
end
|
321
|
-
end
|
322
|
-
end
|
323
|
-
end
|
324
|
-
end
|
325
|
-
end
|
326
|
-
end
|
327
|
-
end
|
328
|
-
end
|
329
|
-
end
|
330
|
-
end
|
331
|
-
end
|
332
|
-
end
|
333
|
-
end
|
334
|
-
end
|
335
|
-
end
|
336
|
-
end
|
337
|
-
end
|
338
|
-
end
|
339
|
-
end
|
340
|
-
end
|
341
|
-
end
|
342
|
-
end
|
343
|
-
end
|
344
|
-
end
|
345
|
-
end
|
346
|
-
end
|
347
|
-
end
|
348
|
-
end
|
349
|
-
end
|
350
|
-
end
|
351
|
-
end
|
352
|
-
end
|
353
|
-
end
|
354
|
-
end
|
355
|
-
end
|
356
|
-
end
|
357
|
-
end
|
358
|
-
end
|
359
|
-
end
|
360
|
-
end
|
361
|
-
end
|
362
|
-
end
|
363
|
-
end
|
364
|
-
end
|
365
|
-
end
|
366
|
-
end
|
367
|
-
end
|
368
|
-
end
|
369
|
-
end
|
370
|
-
end
|
371
|
-
end
|
372
|
-
end
|
373
|
-
end
|
374
|
-
end
|
375
|
-
end
|
376
|
-
end
|
377
|
-
end
|
378
|
-
end
|
379
|
-
end
|
380
|
-
end
|
381
|
-
end
|
382
|
-
end
|
383
|
-
end
|
384
|
-
end
|
385
|
-
end
|
386
|
-
end
|
387
|
-
end
|
388
|
-
end
|
389
|
-
end
|
390
|
-
end
|
391
|
-
end
|
392
|
-
end
|
393
|
-
end
|
394
|
-
end
|
395
|
-
end
|
396
|
-
end
|
397
|
-
end
|
398
|
-
end
|
399
|
-
end
|
400
|
-
end
|
401
|
-
end
|
402
|
-
end
|
403
|
-
end
|
404
|
-
end
|
405
|
-
end
|
406
|
-
end
|
407
|
-
end
|
408
|
-
end
|
409
|
-
end
|
410
|
-
end
|
411
|
-
end
|
412
|
-
end
|
413
|
-
end
|
414
|
-
end
|
415
|
-
end
|
416
|
-
end
|
417
|
-
end
|
418
|
-
end
|
419
|
-
end
|
420
|
-
end
|
421
|
-
end
|
422
|
-
end
|
423
|
-
end
|
424
|
-
end
|
425
|
-
end
|
426
|
-
end
|
427
|
-
end
|
428
|
-
end
|
429
|
-
end
|
430
|
-
end
|
431
|
-
end
|
432
|
-
end
|
433
|
-
end
|
434
|
-
end
|
435
|
-
end
|
436
|
-
end
|
437
|
-
end
|
438
|
-
end
|
439
|
-
end
|
440
|
-
end
|
441
|
-
end
|
442
|
-
end
|
443
|
-
end
|
444
|
-
end
|
445
|
-
end
|
446
|
-
end
|
447
|
-
end
|
448
|
-
end
|
449
|
-
end
|
450
|
-
end
|
451
|
-
end
|
452
|
-
end
|
453
|
-
end
|
454
|
-
end
|
455
|
-
end
|
456
|
-
end
|
457
|
-
end
|
458
|
-
end
|
459
|
-
end
|
460
|
-
end
|
461
|
-
end
|
462
|
-
end
|
463
|
-
end
|
464
|
-
end
|
465
|
-
end
|
466
|
-
end
|
467
|
-
end
|
468
|
-
end
|
469
|
-
end
|
470
|
-
end
|
471
|
-
end
|
472
|
-
end
|
473
|
-
end
|
474
|
-
end
|
475
|
-
end
|
476
|
-
end
|
477
|
-
end
|
478
|
-
end
|
479
|
-
end
|
480
|
-
end
|
481
|
-
end
|
482
|
-
end
|
483
|
-
end
|
484
|
-
end
|
485
|
-
end
|
486
|
-
end
|
487
|
-
end
|
488
|
-
end
|
489
|
-
end
|
490
|
-
end
|
491
|
-
end
|
492
|
-
end
|
493
|
-
end
|
494
|
-
end
|
495
|
-
end
|
496
|
-
end
|
497
|
-
end
|
498
|
-
end
|
499
|
-
end
|
500
|
-
end
|
501
|
-
end
|
502
|
-
end
|
503
|
-
end
|
504
|
-
end
|
505
|
-
end
|
506
|
-
end
|
507
|
-
end
|
508
|
-
end
|
509
|
-
end
|
510
|
-
end
|
511
|
-
end
|
512
|
-
end
|
513
|
-
end
|
514
|
-
end
|
515
|
-
end
|
516
|
-
end
|
517
|
-
end
|
518
|
-
end
|
519
|
-
end
|
520
|
-
end
|
521
|
-
end
|
522
|
-
end
|
523
|
-
end
|
524
|
-
end
|
525
|
-
end
|
526
|
-
end
|
527
|
-
end
|
528
|
-
end
|
529
|
-
end
|
530
|
-
end
|
531
|
-
end
|
532
|
-
end
|
533
|
-
end
|
534
|
-
end
|
535
|
-
end
|
536
|
-
end
|
537
|
-
end
|
538
|
-
end
|
539
|
-
end
|
540
|
-
end
|
541
|
-
end
|
542
|
-
end
|
543
|
-
end
|
544
|
-
end
|
545
|
-
end
|
546
|
-
end
|
547
|
-
end
|
548
|
-
end
|
549
|
-
end
|
550
|
-
end
|
551
|
-
end
|
552
|
-
end
|
553
|
-
end
|
554
|
-
end
|
555
|
-
end
|
556
|
-
end
|
557
|
-
end
|
558
|
-
end
|
559
|
-
end
|
560
|
-
end
|
561
|
-
end
|
562
|
-
end
|
563
|
-
end
|
564
|
-
end
|
565
|
-
end
|
566
|
-
end
|
567
|
-
end
|
568
|
-
end
|
569
|
-
end
|
570
|
-
end
|
571
|
-
end
|
572
|
-
end
|
573
|
-
end
|
574
|
-
end
|
575
|
-
end
|
576
|
-
end
|
577
|
-
end
|
578
|
-
end
|
579
|
-
end
|
580
|
-
end
|
581
|
-
end
|
582
|
-
end
|
583
|
-
end
|
584
|
-
end
|
585
|
-
end
|
586
|
-
end
|
587
|
-
end
|
588
|
-
end
|
589
|
-
end
|
590
|
-
end
|
591
|
-
end
|
592
|
-
end
|
593
|
-
end
|
594
|
-
end
|
595
|
-
end
|
596
|
-
end
|
597
|
-
end
|
598
|
-
end
|
599
|
-
end
|
600
|
-
end
|
601
|
-
end
|
602
|
-
end
|
603
|
-
end
|
604
|
-
end
|
605
|
-
end
|
606
|
-
end
|
607
|
-
end
|
608
|
-
end
|
609
|
-
end
|
610
|
-
end
|
611
|
-
end
|
612
|
-
end
|
613
|
-
end
|
614
|
-
end
|
615
|
-
end
|
616
|
-
end
|
617
|
-
end
|
618
|
-
end
|
619
|
-
end
|
620
|
-
end
|
621
|
-
end
|
622
|
-
end
|
623
|
-
end
|
624
|
-
end
|
625
|
-
end
|
626
|
-
end
|
627
|
-
end
|
628
|
-
end
|
629
|
-
end
|
630
|
-
end
|
631
|
-
end
|
632
|
-
end
|
633
|
-
end
|
634
|
-
end
|
635
|
-
end
|
636
|
-
end
|
637
|
-
end
|
638
|
-
end
|
639
|
-
end
|
640
|
-
end
|
641
|
-
end
|
642
|
-
end
|
643
|
-
end
|
644
|
-
end
|
645
|
-
end
|
646
|
-
end
|
647
|
-
end
|
648
|
-
end
|
649
|
-
end
|
650
|
-
end
|
651
|
-
end
|
652
|
-
end
|
653
|
-
end
|
654
|
-
end
|
655
|
-
end
|
656
|
-
end
|
657
|
-
end
|
658
|
-
end
|
659
|
-
end
|
660
|
-
end
|
661
|
-
end
|
662
|
-
end
|
663
|
-
end
|
664
|
-
end
|
665
|
-
end
|
666
|
-
end
|
667
|
-
end
|
668
|
-
end
|
669
|
-
end
|
670
|
-
end
|
671
|
-
end
|
672
|
-
end
|
673
|
-
end
|
674
|
-
end
|
675
|
-
end
|
676
|
-
end
|
677
|
-
end
|
678
|
-
end
|
679
|
-
end
|
680
|
-
end
|
681
|
-
end
|
682
|
-
end
|
683
|
-
end
|
684
|
-
end
|
685
|
-
end
|
686
|
-
end
|
687
|
-
end
|
688
|
-
end
|
689
|
-
end
|
690
|
-
end
|
691
|
-
end
|
692
|
-
end
|
693
|
-
end
|
694
|
-
end
|
695
|
-
end
|
696
|
-
end
|
697
|
-
end
|
698
|
-
end
|
699
|
-
end
|
700
|
-
end
|
701
|
-
end
|
702
|
-
end
|
703
|
-
end
|
704
|
-
end
|
705
|
-
end
|
706
|
-
end
|
707
|
-
end
|
708
|
-
end
|
709
|
-
end
|
710
|
-
end
|
711
|
-
end
|
712
|
-
end
|
713
|
-
end
|
714
|
-
end
|
715
|
-
end
|
716
|
-
end
|
717
|
-
end
|
718
|
-
end
|
719
|
-
end
|
720
|
-
end
|
721
|
-
end
|
722
|
-
end
|
723
|
-
end
|
724
|
-
end
|
725
|
-
end
|
726
|
-
end
|
727
|
-
end
|
728
|
-
end
|
729
|
-
end
|
730
|
-
end
|
731
|
-
end
|
732
|
-
end
|
733
|
-
end
|
734
|
-
end
|
735
|
-
end
|
736
|
-
end
|
737
|
-
end
|
738
|
-
end
|
739
|
-
end
|
740
|
-
end
|
741
|
-
end
|
742
|
-
end
|
743
|
-
end
|
744
|
-
end
|
745
|
-
end
|
746
|
-
end
|
747
|
-
end
|
748
|
-
end
|
749
|
-
end
|
750
|
-
end
|
751
|
-
end
|
752
|
-
end
|
753
|
-
end
|
754
|
-
end
|
755
|
-
end
|
756
|
-
end
|
757
|
-
end
|
758
|
-
end
|
759
|
-
end
|
760
|
-
end
|
761
|
-
end
|
762
|
-
end
|
763
|
-
end
|
764
|
-
end
|
765
|
-
end
|
766
|
-
end
|
767
|
-
end
|
768
|
-
end
|
769
|
-
end
|
770
|
-
end
|
771
|
-
end
|
772
|
-
end
|
773
|
-
end
|
774
|
-
end
|
775
|
-
end
|
776
|
-
end
|
777
|
-
end
|
778
|
-
end
|
779
|
-
end
|
780
|
-
end
|
781
|
-
end
|
782
|
-
end
|
783
|
-
end
|
784
|
-
end
|
785
|
-
end
|
786
|
-
end
|
787
|
-
end
|
788
|
-
end
|
789
|
-
end
|
790
|
-
end
|
791
|
-
end
|
792
|
-
end
|
793
|
-
end
|
794
|
-
end
|
795
|
-
end
|
796
|
-
end
|
797
|
-
end
|
798
|
-
end
|
799
|
-
end
|
800
|
-
end
|
801
|
-
end
|
802
|
-
end
|
803
|
-
end
|
804
|
-
end
|
805
|
-
end
|
806
|
-
end
|
807
|
-
end
|
808
|
-
end
|
809
|
-
end
|
810
|
-
end
|
811
|
-
end
|
812
|
-
end
|
813
|
-
end
|
814
|
-
end
|
815
|
-
end
|
816
|
-
end
|
817
|
-
end
|
818
|
-
end
|
819
|
-
end
|
820
|
-
end
|
821
|
-
end
|
822
|
-
end
|
823
|
-
end
|
824
|
-
end
|
825
|
-
end
|
826
|
-
end
|
827
|
-
end
|
828
|
-
end
|
829
|
-
end
|
830
|
-
end
|
831
|
-
end
|
832
|
-
end
|
833
|
-
end
|
834
|
-
end
|
835
|
-
end
|
836
|
-
end
|
837
|
-
end
|
838
|
-
end
|
839
|
-
end
|
840
|
-
end
|
841
|
-
end
|
842
|
-
end
|
843
|
-
end
|
844
|
-
end
|
845
|
-
end
|
846
|
-
end
|
847
|
-
end
|
848
|
-
end
|
849
|
-
end
|
850
|
-
end
|
851
|
-
end
|
852
|
-
end
|
853
|
-
end
|
854
|
-
end
|
855
|
-
end
|
856
|
-
end
|
857
|
-
end
|
858
|
-
end
|
859
|
-
end
|
860
|
-
end
|
861
|
-
end
|
862
|
-
end
|
863
|
-
end
|
864
|
-
end
|
865
|
-
end
|
866
|
-
end
|
867
|
-
end
|
868
|
-
end
|
869
|
-
end
|
870
|
-
end
|
871
|
-
end
|
872
|
-
end
|
873
|
-
end
|
874
|
-
end
|
875
|
-
end
|
876
|
-
end
|
877
|
-
end
|
878
|
-
end
|
879
|
-
end
|
880
|
-
end
|
881
|
-
end
|
882
|
-
end
|
883
|
-
end
|
884
|
-
end
|
885
|
-
end
|
886
|
-
end
|
887
|
-
end
|
888
|
-
end
|
889
|
-
end
|
890
|
-
end
|
891
|
-
end
|
892
|
-
end
|
893
|
-
end
|
894
|
-
end
|
895
|
-
end
|
896
|
-
end
|
897
|
-
end
|
898
|
-
end
|
899
|
-
end
|
900
|
-
end
|
901
|
-
end
|
902
|
-
end
|
903
|
-
end
|
904
|
-
end
|
905
|
-
end
|
906
|
-
end
|
907
|
-
end
|
908
|
-
end
|
909
|
-
end
|
910
|
-
end
|
911
|
-
end
|
912
|
-
end
|
913
|
-
end
|
914
|
-
end
|
915
|
-
end
|
916
|
-
end
|
917
|
-
end
|
918
|
-
end
|
919
|
-
end
|
920
|
-
end
|
921
|
-
end
|
922
|
-
end
|
923
|
-
end
|
924
|
-
end
|
925
|
-
end
|
926
|
-
end
|
927
|
-
end
|
928
|
-
end
|
929
|
-
end
|
930
|
-
end
|
931
|
-
end
|
932
|
-
end
|
933
|
-
end
|
934
|
-
end
|
935
|
-
end
|
936
|
-
end
|
937
|
-
end
|
938
|
-
end
|
939
|
-
end
|
940
|
-
end
|
941
|
-
end
|
942
|
-
end
|
943
|
-
end
|
944
|
-
end
|
data/examples/amen_break.rb
DELETED
@@ -1,157 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Plays the amen break. Demonstrates playing on a different channel and use
|
4
|
-
# of the MIDIator::Drums and MIDIator::Durations mixins.
|
5
|
-
#
|
6
|
-
# == Authors
|
7
|
-
#
|
8
|
-
# * Ben Bleything <ben@bleything.net>
|
9
|
-
#
|
10
|
-
# == Copyright
|
11
|
-
#
|
12
|
-
# Copyright (c) 2009 Ben Bleything
|
13
|
-
#
|
14
|
-
# This code released under the terms of the MIT license.
|
15
|
-
#
|
16
|
-
|
17
|
-
require 'midiator'
|
18
|
-
|
19
|
-
@midi = MIDIator::Interface.new
|
20
|
-
# @midi.autodetect_driver
|
21
|
-
@midi.use :dls_synth
|
22
|
-
|
23
|
-
# let's get some drums!
|
24
|
-
include MIDIator::Drums
|
25
|
-
@midi.control_change 32, 10, 1 # TR-808 is Program 26 in LSB bank 1
|
26
|
-
@midi.program_change 10, 26
|
27
|
-
|
28
|
-
# set up some tempo constants
|
29
|
-
tempo = 120
|
30
|
-
QuarterNote = 60.0 / tempo
|
31
|
-
EighthNote = QuarterNote / 2
|
32
|
-
SixteenthNote = EighthNote / 2
|
33
|
-
|
34
|
-
# a helper method!
|
35
|
-
def beat( note, duration = EighthNote )
|
36
|
-
@midi.play note, duration, 10
|
37
|
-
end
|
38
|
-
|
39
|
-
# instrument shortcuts
|
40
|
-
bass = BassDrum1
|
41
|
-
snare = SnareDrum1
|
42
|
-
cymbal = RideCymbal1
|
43
|
-
|
44
|
-
# "chord" shortcuts
|
45
|
-
bass_cymbal = [ bass, cymbal ]
|
46
|
-
snare_cymbal = [ snare, cymbal ]
|
47
|
-
|
48
|
-
# as transcribed at http://www.onlinedrumlessons.com/main/2005/09/classic-break-beat.htm
|
49
|
-
loop do
|
50
|
-
|
51
|
-
# first measure is repeated
|
52
|
-
2.times do
|
53
|
-
# beat 1
|
54
|
-
beat bass_cymbal
|
55
|
-
beat bass_cymbal
|
56
|
-
|
57
|
-
# beat 2
|
58
|
-
beat snare_cymbal
|
59
|
-
@midi.rest SixteenthNote
|
60
|
-
beat snare, SixteenthNote
|
61
|
-
|
62
|
-
# beat 3
|
63
|
-
beat cymbal, SixteenthNote
|
64
|
-
beat snare, SixteenthNote
|
65
|
-
beat bass_cymbal, SixteenthNote
|
66
|
-
beat bass, SixteenthNote
|
67
|
-
|
68
|
-
# beat 4
|
69
|
-
beat snare_cymbal
|
70
|
-
beat cymbal, SixteenthNote
|
71
|
-
beat snare, SixteenthNote
|
72
|
-
end
|
73
|
-
|
74
|
-
# third measure starts out like the first...
|
75
|
-
# beat 1
|
76
|
-
beat bass_cymbal
|
77
|
-
beat bass_cymbal
|
78
|
-
|
79
|
-
# beat 2
|
80
|
-
beat snare_cymbal
|
81
|
-
@midi.rest SixteenthNote
|
82
|
-
beat snare, SixteenthNote
|
83
|
-
|
84
|
-
# beat 3
|
85
|
-
beat cymbal, SixteenthNote
|
86
|
-
beat snare, SixteenthNote
|
87
|
-
beat bass_cymbal
|
88
|
-
|
89
|
-
# beat 4
|
90
|
-
beat cymbal
|
91
|
-
beat snare_cymbal
|
92
|
-
|
93
|
-
# and then the fourth measure goes off the rails
|
94
|
-
# beat 1
|
95
|
-
beat cymbal, SixteenthNote
|
96
|
-
beat snare, SixteenthNote
|
97
|
-
beat bass_cymbal, SixteenthNote
|
98
|
-
beat bass, SixteenthNote
|
99
|
-
|
100
|
-
# beat 2
|
101
|
-
beat snare_cymbal
|
102
|
-
beat cymbal, SixteenthNote
|
103
|
-
beat snare, SixteenthNote
|
104
|
-
|
105
|
-
# beat 3
|
106
|
-
beat cymbal, SixteenthNote
|
107
|
-
beat snare, SixteenthNote
|
108
|
-
beat
|
109
|
-
end
|
110
|
-
|
111
|
-
|
112
|
-
exit
|
113
|
-
|
114
|
-
loop do
|
115
|
-
# first bar is repeated twice
|
116
|
-
2.times do
|
117
|
-
@midi.play BassDrum1, EighthNote, 9
|
118
|
-
@midi.play BassDrum1, EighthNote, 9
|
119
|
-
@midi.play SnareDrum1, EighthNote, 9
|
120
|
-
@midi.rest SixteenthNote
|
121
|
-
@midi.play SnareDrum1, SixteenthNote, 9
|
122
|
-
@midi.rest SixteenthNote
|
123
|
-
@midi.play SnareDrum1, SixteenthNote, 9
|
124
|
-
@midi.play BassDrum1, SixteenthNote, 9
|
125
|
-
@midi.play BassDrum1, SixteenthNote, 9
|
126
|
-
@midi.play SnareDrum1, EighthNote, 9
|
127
|
-
@midi.rest EighthNote
|
128
|
-
end
|
129
|
-
|
130
|
-
# bar 3
|
131
|
-
@midi.play BassDrum1, EighthNote, 9
|
132
|
-
@midi.play BassDrum1, EighthNote, 9
|
133
|
-
@midi.play SnareDrum1, EighthNote, 9
|
134
|
-
@midi.rest SixteenthNote
|
135
|
-
@midi.play SnareDrum1, SixteenthNote, 9
|
136
|
-
@midi.rest SixteenthNote
|
137
|
-
@midi.play SnareDrum1, SixteenthNote, 9
|
138
|
-
@midi.play BassDrum1, EighthNote, 9
|
139
|
-
@midi.rest EighthNote
|
140
|
-
@midi.play SnareDrum1, EighthNote, 9
|
141
|
-
|
142
|
-
# bar 4
|
143
|
-
@midi.rest EighthNote
|
144
|
-
@midi.play BassDrum1, SixteenthNote, 9
|
145
|
-
@midi.play BassDrum1, SixteenthNote, 9
|
146
|
-
@midi.play SnareDrum1, EighthNote, 9
|
147
|
-
@midi.rest SixteenthNote
|
148
|
-
@midi.play SnareDrum1, SixteenthNote, 9
|
149
|
-
@midi.rest SixteenthNote
|
150
|
-
@midi.play SnareDrum1, SixteenthNote, 9
|
151
|
-
@midi.play BassDrum1, EighthNote, 9
|
152
|
-
@midi.rest EighthNote
|
153
|
-
@midi.play BassDrum1, EighthNote, 9
|
154
|
-
|
155
|
-
# a little break
|
156
|
-
@midi.rest HalfNote
|
157
|
-
end
|
data/examples/twinkle.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# A simple example that plays Twinkle Twinkle Little Star. Also
|
4
|
-
# shows how to use the MIDIator::Notes mixin.
|
5
|
-
#
|
6
|
-
# == Authors
|
7
|
-
#
|
8
|
-
# * Ben Bleything <ben@bleything.net>
|
9
|
-
#
|
10
|
-
# == Copyright
|
11
|
-
#
|
12
|
-
# Copyright (c) 2008 Ben Bleything
|
13
|
-
#
|
14
|
-
# This code released under the terms of the MIT license.
|
15
|
-
#
|
16
|
-
|
17
|
-
require 'rubygems'
|
18
|
-
require 'midiator'
|
19
|
-
|
20
|
-
midi = MIDIator::Interface.new
|
21
|
-
midi.autodetect_driver
|
22
|
-
|
23
|
-
include MIDIator::Notes
|
24
|
-
|
25
|
-
scale = [ C4, Cs4, D4, Eb4, E4, F4, Fs4, G4, Gs4, A4, Bb4, B4,
|
26
|
-
C5, Cs5, D5, Eb5, E5, F5, Fs5, G5, Gs5, A5, Bb5, B5 ]
|
27
|
-
|
28
|
-
scale.each do |note|
|
29
|
-
midi.play note
|
30
|
-
end
|
31
|
-
|
32
|
-
scale.reverse.each do |note|
|
33
|
-
midi.play note
|
34
|
-
end
|