beats 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +2 -2
- data/README.markdown +17 -80
- data/bin/beats +2 -7
- data/lib/beats.rb +12 -6
- data/lib/beats/{audioengine.rb → audio_engine.rb} +7 -8
- data/lib/beats/{audioutils.rb → audio_utils.rb} +35 -17
- data/lib/beats/{beatsrunner.rb → beats_runner.rb} +2 -2
- data/lib/beats/kit.rb +6 -5
- data/lib/beats/kit_builder.rb +12 -8
- data/lib/beats/pattern.rb +7 -16
- data/lib/beats/song.rb +7 -8
- data/lib/beats/{songoptimizer.rb → song_optimizer.rb} +11 -8
- data/lib/beats/{songparser.rb → song_parser.rb} +46 -48
- data/lib/beats/track.rb +14 -17
- data/lib/beats/transforms/song_swinger.rb +7 -5
- data/lib/wavefile/{cachingwriter.rb → caching_writer.rb} +2 -2
- data/test/{audioengine_test.rb → audio_engine_test.rb} +49 -46
- data/test/audio_utils_test.rb +86 -0
- data/test/{cachingwriter_test.rb → caching_writer_test.rb} +0 -0
- data/test/fixtures/invalid/sound_in_kit_wrong_format.txt +1 -1
- data/test/fixtures/invalid/sound_in_track_wrong_format.txt +1 -1
- data/test/fixtures/valid/empty_kit.txt +14 -0
- data/test/fixtures/valid/example_song_header_different_capitalization.txt +21 -0
- data/test/fixtures/valid/multiple_patterns_same_name.txt +31 -0
- data/test/fixtures/valid/multiple_song_header_sections.txt +29 -0
- data/test/includes.rb +0 -9
- data/test/kit_builder_test.rb +20 -0
- data/test/kit_test.rb +7 -0
- data/test/pattern_test.rb +86 -74
- data/test/{songoptimizer_test.rb → song_optimizer_test.rb} +5 -8
- data/test/{songparser_test.rb → song_parser_test.rb} +109 -13
- data/test/song_swinger_test.rb +6 -4
- data/test/song_test.rb +32 -14
- data/test/sounds/agogo_high_stereo_16.wav +0 -0
- data/test/sounds/agogo_low_stereo_16.wav +0 -0
- data/test/sounds/bass2_stereo_16.wav +0 -0
- data/test/sounds/bass_stereo_16.wav +0 -0
- data/test/sounds/clave_high_stereo_16.wav +0 -0
- data/test/sounds/clave_low_stereo_16.wav +0 -0
- data/test/sounds/conga_high_stereo_16.wav +0 -0
- data/test/sounds/conga_low_stereo_16.wav +0 -0
- data/test/sounds/cowbell_high_stereo_16.wav +0 -0
- data/test/sounds/cowbell_low_stereo_16.wav +0 -0
- data/test/sounds/hh_closed_stereo_16.wav +0 -0
- data/test/sounds/hh_open_stereo_16.wav +0 -0
- data/test/sounds/ride_stereo_16.wav +0 -0
- data/test/sounds/rim_stereo_16.wav +0 -0
- data/test/sounds/snare2_stereo_16.wav +0 -0
- data/test/sounds/snare_stereo_16.wav +0 -0
- data/test/sounds/tom1_stereo_16.wav +0 -0
- data/test/sounds/tom2_stereo_16.wav +0 -0
- data/test/sounds/tom3_stereo_16.wav +0 -0
- data/test/sounds/tom4_stereo_16.wav +0 -0
- data/test/track_test.rb +51 -5
- metadata +184 -176
- data/test/audioutils_test.rb +0 -46
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Strait
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wavefile
|
@@ -37,21 +37,21 @@ files:
|
|
37
37
|
- Rakefile
|
38
38
|
- bin/beats
|
39
39
|
- lib/beats.rb
|
40
|
-
- lib/beats/
|
41
|
-
- lib/beats/
|
42
|
-
- lib/beats/
|
40
|
+
- lib/beats/audio_engine.rb
|
41
|
+
- lib/beats/audio_utils.rb
|
42
|
+
- lib/beats/beats_runner.rb
|
43
43
|
- lib/beats/kit.rb
|
44
44
|
- lib/beats/kit_builder.rb
|
45
45
|
- lib/beats/pattern.rb
|
46
46
|
- lib/beats/song.rb
|
47
|
-
- lib/beats/
|
48
|
-
- lib/beats/
|
47
|
+
- lib/beats/song_optimizer.rb
|
48
|
+
- lib/beats/song_parser.rb
|
49
49
|
- lib/beats/track.rb
|
50
50
|
- lib/beats/transforms/song_swinger.rb
|
51
|
-
- lib/wavefile/
|
52
|
-
- test/
|
53
|
-
- test/
|
54
|
-
- test/
|
51
|
+
- lib/wavefile/caching_writer.rb
|
52
|
+
- test/audio_engine_test.rb
|
53
|
+
- test/audio_utils_test.rb
|
54
|
+
- test/caching_writer_test.rb
|
55
55
|
- test/fixtures/expected_output/example_combined_mono_16.wav
|
56
56
|
- test/fixtures/expected_output/example_combined_mono_8.wav
|
57
57
|
- test/fixtures/expected_output/example_combined_stereo_16.wav
|
@@ -105,11 +105,13 @@ files:
|
|
105
105
|
- test/fixtures/invalid/track_with_composite_nested_sounds.txt
|
106
106
|
- test/fixtures/invalid/track_with_composite_non_existent_sound.txt
|
107
107
|
- test/fixtures/invalid/with_structure.txt
|
108
|
+
- test/fixtures/valid/empty_kit.txt
|
108
109
|
- test/fixtures/valid/example_flow_patterns_different_capitalization.txt
|
109
110
|
- test/fixtures/valid/example_mono_16.txt
|
110
111
|
- test/fixtures/valid/example_mono_16_base_path.txt
|
111
112
|
- test/fixtures/valid/example_mono_8.txt
|
112
113
|
- test/fixtures/valid/example_no_kit.txt
|
114
|
+
- test/fixtures/valid/example_song_header_different_capitalization.txt
|
113
115
|
- test/fixtures/valid/example_stereo_16.txt
|
114
116
|
- test/fixtures/valid/example_stereo_8.txt
|
115
117
|
- test/fixtures/valid/example_swung_16th.txt
|
@@ -120,6 +122,8 @@ files:
|
|
120
122
|
- test/fixtures/valid/fractional_tempo.txt
|
121
123
|
- test/fixtures/valid/kit_with_composite_single_sound.txt
|
122
124
|
- test/fixtures/valid/kit_with_composite_sounds.txt
|
125
|
+
- test/fixtures/valid/multiple_patterns_same_name.txt
|
126
|
+
- test/fixtures/valid/multiple_song_header_sections.txt
|
123
127
|
- test/fixtures/valid/multiple_tracks_same_sound.txt
|
124
128
|
- test/fixtures/valid/no_tempo.txt
|
125
129
|
- test/fixtures/valid/optimize_pattern_collision.txt
|
@@ -136,10 +140,10 @@ files:
|
|
136
140
|
- test/kit_builder_test.rb
|
137
141
|
- test/kit_test.rb
|
138
142
|
- test/pattern_test.rb
|
143
|
+
- test/song_optimizer_test.rb
|
144
|
+
- test/song_parser_test.rb
|
139
145
|
- test/song_swinger_test.rb
|
140
146
|
- test/song_test.rb
|
141
|
-
- test/songoptimizer_test.rb
|
142
|
-
- test/songparser_test.rb
|
143
147
|
- test/sounds/agogo_high_mono_16.wav
|
144
148
|
- test/sounds/agogo_high_mono_8.wav
|
145
149
|
- test/sounds/agogo_high_stereo_16.wav
|
@@ -225,12 +229,12 @@ files:
|
|
225
229
|
- test/sounds/tom4_stereo_16.wav
|
226
230
|
- test/sounds/tom4_stereo_8.wav
|
227
231
|
- test/track_test.rb
|
228
|
-
homepage:
|
232
|
+
homepage: https://beatsdrummachine.com/
|
229
233
|
licenses:
|
230
234
|
- MIT
|
231
235
|
metadata: {}
|
232
236
|
post_install_message: Thanks for installing Beats Drum Machine! For information on
|
233
|
-
how to use Beats, or to download some drum sounds to use with Beats, visit
|
237
|
+
how to use Beats, or to download some drum sounds to use with Beats, visit https://beatsdrummachine.com
|
234
238
|
rdoc_options: []
|
235
239
|
require_paths:
|
236
240
|
- lib
|
@@ -246,185 +250,189 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
250
|
version: '0'
|
247
251
|
requirements: []
|
248
252
|
rubyforge_project:
|
249
|
-
rubygems_version: 2.6
|
253
|
+
rubygems_version: 2.7.6
|
250
254
|
signing_key:
|
251
255
|
specification_version: 4
|
252
256
|
summary: A command-line drum machine. Takes a song notated in a YAML file as input,
|
253
257
|
and outputs a *.wav sound file.
|
254
258
|
test_files:
|
255
|
-
- test/audioengine_test.rb
|
256
|
-
- test/audioutils_test.rb
|
257
|
-
- test/cachingwriter_test.rb
|
258
|
-
- test/fixtures/expected_output/example_combined_mono_16.wav
|
259
|
-
- test/fixtures/expected_output/example_combined_mono_8.wav
|
260
|
-
- test/fixtures/expected_output/example_combined_stereo_16.wav
|
261
|
-
- test/fixtures/expected_output/example_combined_stereo_8.wav
|
262
|
-
- test/fixtures/expected_output/example_split_mono_16-agogo.wav
|
263
|
-
- test/fixtures/expected_output/example_split_mono_16-bass.wav
|
264
|
-
- test/fixtures/expected_output/example_split_mono_16-hh_closed.wav
|
265
|
-
- test/fixtures/expected_output/example_split_mono_16-hh_closed2.wav
|
266
|
-
- test/fixtures/expected_output/example_split_mono_16-snare.wav
|
267
|
-
- test/fixtures/expected_output/example_split_mono_16-tom2_mono_16.wav
|
268
|
-
- test/fixtures/expected_output/example_split_mono_16-tom4_mono_16.wav
|
269
|
-
- test/fixtures/expected_output/example_split_mono_8-agogo.wav
|
270
|
-
- test/fixtures/expected_output/example_split_mono_8-bass.wav
|
271
|
-
- test/fixtures/expected_output/example_split_mono_8-hh_closed.wav
|
272
|
-
- test/fixtures/expected_output/example_split_mono_8-hh_closed2.wav
|
273
|
-
- test/fixtures/expected_output/example_split_mono_8-snare.wav
|
274
|
-
- test/fixtures/expected_output/example_split_mono_8-tom2_mono_8.wav
|
275
|
-
- test/fixtures/expected_output/example_split_mono_8-tom4_mono_8.wav
|
276
|
-
- test/fixtures/expected_output/example_split_stereo_16-agogo.wav
|
277
|
-
- test/fixtures/expected_output/example_split_stereo_16-bass.wav
|
278
|
-
- test/fixtures/expected_output/example_split_stereo_16-hh_closed.wav
|
279
|
-
- test/fixtures/expected_output/example_split_stereo_16-hh_closed2.wav
|
280
|
-
- test/fixtures/expected_output/example_split_stereo_16-snare.wav
|
281
|
-
- test/fixtures/expected_output/example_split_stereo_16-tom2_stereo_16.wav
|
282
|
-
- test/fixtures/expected_output/example_split_stereo_16-tom4_stereo_16.wav
|
283
|
-
- test/fixtures/expected_output/example_split_stereo_8-agogo.wav
|
284
|
-
- test/fixtures/expected_output/example_split_stereo_8-bass.wav
|
285
|
-
- test/fixtures/expected_output/example_split_stereo_8-hh_closed.wav
|
286
|
-
- test/fixtures/expected_output/example_split_stereo_8-hh_closed2.wav
|
287
|
-
- test/fixtures/expected_output/example_split_stereo_8-snare.wav
|
288
|
-
- test/fixtures/expected_output/example_split_stereo_8-tom2_stereo_8.wav
|
289
|
-
- test/fixtures/expected_output/example_split_stereo_8-tom4_stereo_8.wav
|
290
|
-
- test/fixtures/invalid/bad_flow.txt
|
291
|
-
- test/fixtures/invalid/bad_repeat_count.txt
|
292
|
-
- test/fixtures/invalid/bad_rhythm.txt
|
293
|
-
- test/fixtures/invalid/bad_swing_rate_1.txt
|
294
|
-
- test/fixtures/invalid/bad_swing_rate_2.txt
|
295
|
-
- test/fixtures/invalid/bad_tempo.txt
|
296
|
-
- test/fixtures/invalid/kit_with_composite_empty_sound.txt
|
297
|
-
- test/fixtures/invalid/kit_with_composite_nested_sounds.txt
|
298
|
-
- test/fixtures/invalid/kit_with_composite_non_existent_sound.txt
|
299
|
-
- test/fixtures/invalid/leading_bar_line.txt
|
300
|
-
- test/fixtures/invalid/no_flow.txt
|
301
|
-
- test/fixtures/invalid/no_header.txt
|
302
|
-
- test/fixtures/invalid/pattern_with_no_tracks.txt
|
303
|
-
- test/fixtures/invalid/sound_in_kit_not_found.txt
|
304
|
-
- test/fixtures/invalid/sound_in_kit_wrong_format.txt
|
305
|
-
- test/fixtures/invalid/sound_in_track_not_found.txt
|
306
|
-
- test/fixtures/invalid/sound_in_track_wrong_format.txt
|
307
|
-
- test/fixtures/invalid/track_with_composite_empty_sound.txt
|
308
|
-
- test/fixtures/invalid/track_with_composite_nested_sounds.txt
|
309
|
-
- test/fixtures/invalid/track_with_composite_non_existent_sound.txt
|
310
|
-
- test/fixtures/invalid/with_structure.txt
|
311
|
-
- test/fixtures/valid/example_flow_patterns_different_capitalization.txt
|
312
|
-
- test/fixtures/valid/example_mono_16.txt
|
313
|
-
- test/fixtures/valid/example_mono_16_base_path.txt
|
314
|
-
- test/fixtures/valid/example_mono_8.txt
|
315
|
-
- test/fixtures/valid/example_no_kit.txt
|
316
|
-
- test/fixtures/valid/example_stereo_16.txt
|
317
|
-
- test/fixtures/valid/example_stereo_8.txt
|
318
|
-
- test/fixtures/valid/example_swung_16th.txt
|
319
|
-
- test/fixtures/valid/example_swung_8th.txt
|
320
|
-
- test/fixtures/valid/example_unswung.txt
|
321
|
-
- test/fixtures/valid/example_with_empty_track.txt
|
322
|
-
- test/fixtures/valid/example_with_kit.txt
|
323
|
-
- test/fixtures/valid/fractional_tempo.txt
|
324
|
-
- test/fixtures/valid/kit_with_composite_single_sound.txt
|
325
|
-
- test/fixtures/valid/kit_with_composite_sounds.txt
|
326
|
-
- test/fixtures/valid/multiple_tracks_same_sound.txt
|
327
|
-
- test/fixtures/valid/no_tempo.txt
|
328
|
-
- test/fixtures/valid/optimize_pattern_collision.txt
|
329
|
-
- test/fixtures/valid/pattern_with_overflow.txt
|
330
|
-
- test/fixtures/valid/repeats_not_specified.txt
|
331
|
-
- test/fixtures/valid/track_with_composite_kit_sounds.txt
|
332
|
-
- test/fixtures/valid/track_with_composite_mix_kit_and_not_kit_sound.txt
|
333
|
-
- test/fixtures/valid/track_with_composite_mix_kit_and_not_kit_sound_2.txt
|
334
|
-
- test/fixtures/valid/track_with_composite_non_kit_sound.txt
|
335
|
-
- test/fixtures/valid/track_with_composite_single_sound.txt
|
336
|
-
- test/fixtures/valid/track_with_spaces.txt
|
337
|
-
- test/includes.rb
|
338
259
|
- test/integration_test.rb
|
339
|
-
- test/
|
260
|
+
- test/caching_writer_test.rb
|
261
|
+
- test/song_parser_test.rb
|
340
262
|
- test/kit_test.rb
|
341
|
-
- test/
|
263
|
+
- test/audio_engine_test.rb
|
264
|
+
- test/track_test.rb
|
265
|
+
- test/audio_utils_test.rb
|
342
266
|
- test/song_swinger_test.rb
|
343
|
-
- test/
|
344
|
-
- test/
|
345
|
-
- test/songparser_test.rb
|
346
|
-
- test/sounds/agogo_high_mono_16.wav
|
347
|
-
- test/sounds/agogo_high_mono_8.wav
|
348
|
-
- test/sounds/agogo_high_stereo_16.wav
|
349
|
-
- test/sounds/agogo_high_stereo_8.wav
|
350
|
-
- test/sounds/agogo_low_mono_16.wav
|
351
|
-
- test/sounds/agogo_low_mono_8.wav
|
352
|
-
- test/sounds/agogo_low_stereo_16.wav
|
353
|
-
- test/sounds/agogo_low_stereo_8.wav
|
354
|
-
- test/sounds/bass2_mono_16.wav
|
355
|
-
- test/sounds/bass2_mono_8.wav
|
356
|
-
- test/sounds/bass2_stereo_16.wav
|
357
|
-
- test/sounds/bass2_stereo_8.wav
|
358
|
-
- test/sounds/bass_mono_16.wav
|
359
|
-
- test/sounds/bass_mono_8.wav
|
267
|
+
- test/sounds/tom4_stereo_16.wav
|
268
|
+
- test/sounds/clave_low_mono_8.wav
|
360
269
|
- test/sounds/bass_stereo_16.wav
|
361
|
-
- test/sounds/
|
362
|
-
- test/sounds/
|
270
|
+
- test/sounds/bass_mono_8.wav
|
271
|
+
- test/sounds/rim_mono_16.wav
|
272
|
+
- test/sounds/ride_stereo_8.wav
|
273
|
+
- test/sounds/ride_mono_16.wav
|
274
|
+
- test/sounds/composite_snare_stereo_8_tom3_mono_16_stereo_16.wav
|
275
|
+
- test/sounds/cowbell_low_mono_16.wav
|
363
276
|
- test/sounds/clave_high_mono_8.wav
|
364
|
-
- test/sounds/
|
365
|
-
- test/sounds/
|
366
|
-
- test/sounds/
|
367
|
-
- test/sounds/
|
368
|
-
- test/sounds/
|
369
|
-
- test/sounds/
|
370
|
-
- test/sounds/
|
277
|
+
- test/sounds/bass2_mono_16.wav
|
278
|
+
- test/sounds/rim_mono_8.wav
|
279
|
+
- test/sounds/tom2_mono_16.wav
|
280
|
+
- test/sounds/tom3_stereo_16.wav
|
281
|
+
- test/sounds/tom3_mono_8.wav
|
282
|
+
- test/sounds/tom4_mono_8.wav
|
283
|
+
- test/sounds/agogo_high_stereo_16.wav
|
284
|
+
- test/sounds/tom1_mono_16.wav
|
371
285
|
- test/sounds/composite_snare_mono_8_tom3_mono_8_mono_16.wav
|
286
|
+
- test/sounds/clave_low_stereo_16.wav
|
287
|
+
- test/sounds/clave_high_stereo_8.wav
|
288
|
+
- test/sounds/bass2_stereo_8.wav
|
372
289
|
- test/sounds/composite_snare_stereo_16_tom3_mono_16_stereo_16.wav
|
373
|
-
- test/sounds/
|
374
|
-
- test/sounds/
|
375
|
-
- test/sounds/
|
290
|
+
- test/sounds/hh_open_mono_16.wav
|
291
|
+
- test/sounds/tom2_stereo_8.wav
|
292
|
+
- test/sounds/cowbell_low_stereo_16.wav
|
293
|
+
- test/sounds/hh_open_stereo_16.wav
|
294
|
+
- test/sounds/cowbell_high_stereo_8.wav
|
295
|
+
- test/sounds/rim_stereo_16.wav
|
296
|
+
- test/sounds/hh_closed_mono_16.wav
|
376
297
|
- test/sounds/conga_high_stereo_16.wav
|
377
|
-
- test/sounds/
|
378
|
-
- test/sounds/
|
379
|
-
- test/sounds/
|
298
|
+
- test/sounds/conga_high_mono_8.wav
|
299
|
+
- test/sounds/tom4_mono_16.wav
|
300
|
+
- test/sounds/snare_stereo_8.wav
|
301
|
+
- test/sounds/tom1_mono_8.wav
|
302
|
+
- test/sounds/tom3_stereo_8.wav
|
303
|
+
- test/sounds/agogo_high_mono_8.wav
|
304
|
+
- test/sounds/tom4_stereo_8.wav
|
305
|
+
- test/sounds/rim_stereo_8.wav
|
306
|
+
- test/sounds/clave_high_stereo_16.wav
|
380
307
|
- test/sounds/conga_low_stereo_16.wav
|
381
|
-
- test/sounds/
|
382
|
-
- test/sounds/
|
383
|
-
- test/sounds/
|
384
|
-
- test/sounds/cowbell_high_stereo_16.wav
|
385
|
-
- test/sounds/cowbell_high_stereo_8.wav
|
386
|
-
- test/sounds/cowbell_low_mono_16.wav
|
308
|
+
- test/sounds/conga_low_mono_8.wav
|
309
|
+
- test/sounds/tom3_mono_16.wav
|
310
|
+
- test/sounds/conga_high_stereo_8.wav
|
387
311
|
- test/sounds/cowbell_low_mono_8.wav
|
388
|
-
- test/sounds/cowbell_low_stereo_16.wav
|
389
|
-
- test/sounds/cowbell_low_stereo_8.wav
|
390
|
-
- test/sounds/hh_closed_mono_16.wav
|
391
312
|
- test/sounds/hh_closed_mono_8.wav
|
392
|
-
- test/sounds/
|
313
|
+
- test/sounds/cowbell_high_stereo_16.wav
|
314
|
+
- test/sounds/bass_stereo_8.wav
|
315
|
+
- test/sounds/tom1_stereo_8.wav
|
316
|
+
- test/sounds/clave_high_mono_16.wav
|
317
|
+
- test/sounds/agogo_high_mono_16.wav
|
318
|
+
- test/sounds/snare2_mono_8.wav
|
319
|
+
- test/sounds/ride_stereo_16.wav
|
320
|
+
- test/sounds/tom2_mono_8.wav
|
321
|
+
- test/sounds/conga_low_stereo_8.wav
|
322
|
+
- test/sounds/snare_mono_8.wav
|
393
323
|
- test/sounds/hh_closed_stereo_8.wav
|
394
|
-
- test/sounds/
|
324
|
+
- test/sounds/cowbell_high_mono_8.wav
|
325
|
+
- test/sounds/cowbell_low_stereo_8.wav
|
326
|
+
- test/sounds/clave_low_mono_16.wav
|
327
|
+
- test/sounds/bass_mono_16.wav
|
328
|
+
- test/sounds/agogo_high_stereo_8.wav
|
329
|
+
- test/sounds/snare2_stereo_8.wav
|
330
|
+
- test/sounds/agogo_low_stereo_16.wav
|
331
|
+
- test/sounds/bass2_mono_8.wav
|
332
|
+
- test/sounds/cowbell_high_mono_16.wav
|
333
|
+
- test/sounds/snare2_mono_16.wav
|
334
|
+
- test/sounds/bass2_stereo_16.wav
|
335
|
+
- test/sounds/tom2_stereo_16.wav
|
395
336
|
- test/sounds/hh_open_mono_8.wav
|
396
|
-
- test/sounds/
|
337
|
+
- test/sounds/agogo_low_stereo_8.wav
|
338
|
+
- test/sounds/clave_low_stereo_8.wav
|
339
|
+
- test/sounds/tom1_stereo_16.wav
|
340
|
+
- test/sounds/conga_low_mono_16.wav
|
341
|
+
- test/sounds/conga_high_mono_16.wav
|
342
|
+
- test/sounds/snare_mono_16.wav
|
343
|
+
- test/sounds/agogo_low_mono_16.wav
|
344
|
+
- test/sounds/agogo_low_mono_8.wav
|
345
|
+
- test/sounds/snare2_stereo_16.wav
|
397
346
|
- test/sounds/hh_open_stereo_8.wav
|
398
|
-
- test/sounds/
|
347
|
+
- test/sounds/composite_snare_mono_8_tom3_mono_16_mono_16.wav
|
399
348
|
- test/sounds/ride_mono_8.wav
|
400
|
-
- test/sounds/ride_stereo_16.wav
|
401
|
-
- test/sounds/ride_stereo_8.wav
|
402
|
-
- test/sounds/rim_mono_16.wav
|
403
|
-
- test/sounds/rim_mono_8.wav
|
404
|
-
- test/sounds/rim_stereo_16.wav
|
405
|
-
- test/sounds/rim_stereo_8.wav
|
406
|
-
- test/sounds/snare2_mono_16.wav
|
407
|
-
- test/sounds/snare2_mono_8.wav
|
408
|
-
- test/sounds/snare2_stereo_16.wav
|
409
|
-
- test/sounds/snare2_stereo_8.wav
|
410
|
-
- test/sounds/snare_mono_16.wav
|
411
|
-
- test/sounds/snare_mono_8.wav
|
412
349
|
- test/sounds/snare_stereo_16.wav
|
413
|
-
- test/sounds/
|
414
|
-
- test/
|
415
|
-
- test/
|
416
|
-
- test/
|
417
|
-
- test/
|
418
|
-
- test/
|
419
|
-
- test/
|
420
|
-
- test/
|
421
|
-
- test/
|
422
|
-
- test/
|
423
|
-
- test/
|
424
|
-
- test/
|
425
|
-
- test/
|
426
|
-
- test/
|
427
|
-
- test/
|
428
|
-
- test/
|
429
|
-
- test/
|
430
|
-
- test/
|
350
|
+
- test/sounds/hh_closed_stereo_16.wav
|
351
|
+
- test/song_test.rb
|
352
|
+
- test/song_optimizer_test.rb
|
353
|
+
- test/includes.rb
|
354
|
+
- test/kit_builder_test.rb
|
355
|
+
- test/pattern_test.rb
|
356
|
+
- test/fixtures/valid/example_stereo_8.txt
|
357
|
+
- test/fixtures/valid/repeats_not_specified.txt
|
358
|
+
- test/fixtures/valid/example_unswung.txt
|
359
|
+
- test/fixtures/valid/track_with_spaces.txt
|
360
|
+
- test/fixtures/valid/multiple_patterns_same_name.txt
|
361
|
+
- test/fixtures/valid/track_with_composite_mix_kit_and_not_kit_sound_2.txt
|
362
|
+
- test/fixtures/valid/optimize_pattern_collision.txt
|
363
|
+
- test/fixtures/valid/example_stereo_16.txt
|
364
|
+
- test/fixtures/valid/example_swung_8th.txt
|
365
|
+
- test/fixtures/valid/example_mono_8.txt
|
366
|
+
- test/fixtures/valid/example_mono_16.txt
|
367
|
+
- test/fixtures/valid/example_song_header_different_capitalization.txt
|
368
|
+
- test/fixtures/valid/multiple_song_header_sections.txt
|
369
|
+
- test/fixtures/valid/kit_with_composite_single_sound.txt
|
370
|
+
- test/fixtures/valid/track_with_composite_mix_kit_and_not_kit_sound.txt
|
371
|
+
- test/fixtures/valid/example_flow_patterns_different_capitalization.txt
|
372
|
+
- test/fixtures/valid/example_swung_16th.txt
|
373
|
+
- test/fixtures/valid/multiple_tracks_same_sound.txt
|
374
|
+
- test/fixtures/valid/track_with_composite_single_sound.txt
|
375
|
+
- test/fixtures/valid/example_mono_16_base_path.txt
|
376
|
+
- test/fixtures/valid/empty_kit.txt
|
377
|
+
- test/fixtures/valid/example_with_kit.txt
|
378
|
+
- test/fixtures/valid/example_no_kit.txt
|
379
|
+
- test/fixtures/valid/track_with_composite_non_kit_sound.txt
|
380
|
+
- test/fixtures/valid/kit_with_composite_sounds.txt
|
381
|
+
- test/fixtures/valid/fractional_tempo.txt
|
382
|
+
- test/fixtures/valid/example_with_empty_track.txt
|
383
|
+
- test/fixtures/valid/pattern_with_overflow.txt
|
384
|
+
- test/fixtures/valid/no_tempo.txt
|
385
|
+
- test/fixtures/valid/track_with_composite_kit_sounds.txt
|
386
|
+
- test/fixtures/invalid/with_structure.txt
|
387
|
+
- test/fixtures/invalid/sound_in_kit_wrong_format.txt
|
388
|
+
- test/fixtures/invalid/track_with_composite_empty_sound.txt
|
389
|
+
- test/fixtures/invalid/no_header.txt
|
390
|
+
- test/fixtures/invalid/bad_repeat_count.txt
|
391
|
+
- test/fixtures/invalid/sound_in_track_not_found.txt
|
392
|
+
- test/fixtures/invalid/sound_in_kit_not_found.txt
|
393
|
+
- test/fixtures/invalid/bad_swing_rate_1.txt
|
394
|
+
- test/fixtures/invalid/bad_tempo.txt
|
395
|
+
- test/fixtures/invalid/leading_bar_line.txt
|
396
|
+
- test/fixtures/invalid/bad_rhythm.txt
|
397
|
+
- test/fixtures/invalid/kit_with_composite_non_existent_sound.txt
|
398
|
+
- test/fixtures/invalid/bad_swing_rate_2.txt
|
399
|
+
- test/fixtures/invalid/track_with_composite_nested_sounds.txt
|
400
|
+
- test/fixtures/invalid/sound_in_track_wrong_format.txt
|
401
|
+
- test/fixtures/invalid/pattern_with_no_tracks.txt
|
402
|
+
- test/fixtures/invalid/bad_flow.txt
|
403
|
+
- test/fixtures/invalid/no_flow.txt
|
404
|
+
- test/fixtures/invalid/kit_with_composite_empty_sound.txt
|
405
|
+
- test/fixtures/invalid/kit_with_composite_nested_sounds.txt
|
406
|
+
- test/fixtures/invalid/track_with_composite_non_existent_sound.txt
|
407
|
+
- test/fixtures/expected_output/example_split_mono_8-tom4_mono_8.wav
|
408
|
+
- test/fixtures/expected_output/example_split_mono_8-agogo.wav
|
409
|
+
- test/fixtures/expected_output/example_split_stereo_16-tom4_stereo_16.wav
|
410
|
+
- test/fixtures/expected_output/example_split_stereo_8-bass.wav
|
411
|
+
- test/fixtures/expected_output/example_combined_mono_8.wav
|
412
|
+
- test/fixtures/expected_output/example_split_stereo_16-hh_closed2.wav
|
413
|
+
- test/fixtures/expected_output/example_split_mono_8-snare.wav
|
414
|
+
- test/fixtures/expected_output/example_split_stereo_8-hh_closed2.wav
|
415
|
+
- test/fixtures/expected_output/example_split_mono_16-hh_closed2.wav
|
416
|
+
- test/fixtures/expected_output/example_split_mono_8-bass.wav
|
417
|
+
- test/fixtures/expected_output/example_split_mono_8-hh_closed.wav
|
418
|
+
- test/fixtures/expected_output/example_split_mono_16-hh_closed.wav
|
419
|
+
- test/fixtures/expected_output/example_split_stereo_16-bass.wav
|
420
|
+
- test/fixtures/expected_output/example_split_mono_16-tom4_mono_16.wav
|
421
|
+
- test/fixtures/expected_output/example_split_stereo_8-hh_closed.wav
|
422
|
+
- test/fixtures/expected_output/example_split_stereo_8-snare.wav
|
423
|
+
- test/fixtures/expected_output/example_split_mono_16-bass.wav
|
424
|
+
- test/fixtures/expected_output/example_split_stereo_16-agogo.wav
|
425
|
+
- test/fixtures/expected_output/example_split_mono_16-agogo.wav
|
426
|
+
- test/fixtures/expected_output/example_split_stereo_8-agogo.wav
|
427
|
+
- test/fixtures/expected_output/example_combined_stereo_8.wav
|
428
|
+
- test/fixtures/expected_output/example_split_stereo_8-tom4_stereo_8.wav
|
429
|
+
- test/fixtures/expected_output/example_split_mono_16-tom2_mono_16.wav
|
430
|
+
- test/fixtures/expected_output/example_split_stereo_16-hh_closed.wav
|
431
|
+
- test/fixtures/expected_output/example_split_mono_8-tom2_mono_8.wav
|
432
|
+
- test/fixtures/expected_output/example_combined_stereo_16.wav
|
433
|
+
- test/fixtures/expected_output/example_combined_mono_16.wav
|
434
|
+
- test/fixtures/expected_output/example_split_stereo_8-tom2_stereo_8.wav
|
435
|
+
- test/fixtures/expected_output/example_split_stereo_16-tom2_stereo_16.wav
|
436
|
+
- test/fixtures/expected_output/example_split_mono_16-snare.wav
|
437
|
+
- test/fixtures/expected_output/example_split_stereo_16-snare.wav
|
438
|
+
- test/fixtures/expected_output/example_split_mono_8-hh_closed2.wav
|
data/test/audioutils_test.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'includes'
|
2
|
-
|
3
|
-
class AudioUtilsTest < Minitest::Test
|
4
|
-
def test_composite
|
5
|
-
# Mono empty arrays
|
6
|
-
assert_equal([], AudioUtils.composite([], 1))
|
7
|
-
assert_equal([], AudioUtils.composite([[]], 1))
|
8
|
-
assert_equal([], AudioUtils.composite([[], [], [], []], 1))
|
9
|
-
|
10
|
-
# Stereo empty arrays
|
11
|
-
assert_equal([], AudioUtils.composite([], 2))
|
12
|
-
assert_equal([], AudioUtils.composite([[]], 2))
|
13
|
-
assert_equal([], AudioUtils.composite([[], [], [], []], 2))
|
14
|
-
|
15
|
-
# Mono
|
16
|
-
assert_equal([10, 20, 30, 40], AudioUtils.composite([[10, 20, 30, 40]], 1))
|
17
|
-
assert_equal([10, 20, 30, 40], AudioUtils.composite([[10, 20, 30, 40], []], 1))
|
18
|
-
assert_equal([30, 50, 70, -10], AudioUtils.composite([[10, 20, 30, 40], [20, 30, 40, -50]], 1))
|
19
|
-
assert_equal([70, 80, 60], AudioUtils.composite([[20, 30], [10], [40, 50, 60]], 1))
|
20
|
-
|
21
|
-
# Stereo
|
22
|
-
assert_equal([[10, 20], [30, 40]], AudioUtils.composite([[[10, 20], [30, 40]]], 2))
|
23
|
-
assert_equal([[10, 20], [30, 40]], AudioUtils.composite([[[10, 20], [30, 40]], []], 2))
|
24
|
-
assert_equal([[30, 50], [70, -10]], AudioUtils.composite([[[10, 20], [30, 40]], [[20, 30], [40, -50]]], 2))
|
25
|
-
assert_equal([[90, 120], [120, 140], [100, 110]], AudioUtils.composite([[[20, 30], [40, 50]], [[10, 20]], [[60, 70], [80, 90], [100, 110]]], 2))
|
26
|
-
end
|
27
|
-
|
28
|
-
def test_scale
|
29
|
-
assert_equal([], AudioUtils.scale([], 1, 5))
|
30
|
-
assert_equal([], AudioUtils.scale([], 2, 5))
|
31
|
-
assert_equal([100, 200, 300, 400, 500], AudioUtils.scale([100, 200, 300, 400, 500], 1, 1))
|
32
|
-
assert_equal([20, 40, 60, 80, 100], AudioUtils.scale([100, 200, 300, 400, 500], 1, 5))
|
33
|
-
|
34
|
-
assert_equal([[100, 200], [300, 400], [500, 600]], AudioUtils.scale([[100, 200], [300, 400], [500, 600]], 2, 1))
|
35
|
-
assert_equal([[20, 40], [60, 80], [100, 120]], AudioUtils.scale([[100, 200], [300, 400], [500, 600]], 2, 5))
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_step_sample_length
|
39
|
-
assert_equal(6615.0, AudioUtils.step_sample_length(44100, 100))
|
40
|
-
assert_equal(3307.5, AudioUtils.step_sample_length(44100, 200))
|
41
|
-
assert_equal(3307.5, AudioUtils.step_sample_length(22050, 100))
|
42
|
-
|
43
|
-
assert_equal(6874.612880831729, AudioUtils.step_sample_length(44100, 96.2236))
|
44
|
-
assert_equal(3437.3064404158645, AudioUtils.step_sample_length(22050, 96.2236))
|
45
|
-
end
|
46
|
-
end
|