File Coverage

blib/lib/MIDI/Drummer/Tiny/Grooves.pm
Criterion Covered Total %
statement 32 134 23.8
branch 9 14 64.2
condition 1 3 33.3
subroutine 7 103 6.8
pod 3 3 100.0
total 52 257 20.2


line stmt bran cond sub pod time code
1             package MIDI::Drummer::Tiny::Grooves;
2             $MIDI::Drummer::Tiny::Grooves::VERSION = '0.7001';
3             our $AUTHORITY = 'cpan:GENE';
4              
5 2     2   735769 use Moo;
  2         17596  
  2         13  
6 2     2   4126 use strictures 2;
  2         3692  
  2         139  
7 2     2   2244 use MIDI::Drummer::Tiny ();
  2         10  
  2         146  
8 2     2   19 use namespace::clean;
  2         5  
  2         21  
9              
10             #pod =head1 SYNOPSIS
11             #pod
12             #pod use MIDI::Drummer::Tiny ();
13             #pod use MIDI::Drummer::Tiny::Grooves ();
14             #pod # TODO use MIDI::Drummer::Tiny::Grooves qw(:house :rock);
15             #pod
16             #pod my $drummer = MIDI::Drummer::Tiny->new(
17             #pod file => "grooves.mid",
18             #pod kick => 36,
19             #pod );
20             #pod
21             #pod my $grooves = MIDI::Drummer::Tiny::Grooves->new(
22             #pod drummer => $drummer,
23             #pod );
24             #pod
25             #pod my $all = $grooves->all_grooves;
26             #pod
27             #pod my $groove = $grooves->get_groove; # random groove
28             #pod $groove = $grooves->get_groove(42); # numbered groove
29             #pod say $groove->{cat};
30             #pod say $groove->{name};
31             #pod $groove->{groove}->() for 1 .. 4; # add to score
32             #pod
33             #pod my $set = $grooves->search({}, { cat => 'house' });
34             #pod $set = $grooves->search($set, { name => 'deep' });
35             #pod my @nums = keys %$set;
36             #pod for (1 .. 4) {
37             #pod $groove = $set->{ $nums[ rand @nums ] };
38             #pod say $groove->{name};
39             #pod $groove->{groove}->();
40             #pod }
41             #pod
42             #pod $grooves->drummer->write;
43             #pod # then:
44             #pod # > timidity grooves.mid
45             #pod
46             #pod =head1 DESCRIPTION
47             #pod
48             #pod Return the common grooves, as listed in the "Pocket Operations", that
49             #pod are L.
50             #pod
51             #pod A groove is a numbered and named hash reference, with the following
52             #pod structure:
53             #pod
54             #pod { 1 => {
55             #pod cat => "Basic Patterns",
56             #pod name => "ONE AND SEVEN & FIVE AND THIRTEEN",
57             #pod groove => sub {
58             #pod $self->drummer->sync_patterns(
59             #pod $self->kick => ['1000001000000000'],
60             #pod $self->snare => ['0000100000001000'],
61             #pod duration => $self->duration,
62             #pod ),
63             #pod },
64             #pod },
65             #pod 2 => { ... }, ... }
66             #pod
67             #pod =cut
68              
69             #pod =head1 ACCESSORS
70             #pod
71             #pod =head2 drummer
72             #pod
73             #pod $grooves->drummer($drummer);
74             #pod $drummer = $grooves->drummer;
75             #pod
76             #pod The L object. If not given in the constructor, a
77             #pod new one is created when a method is called.
78             #pod
79             #pod =cut
80              
81             has drummer => (
82             is => 'rw',
83             isa => sub { die "Invalid drummer object" unless ref($_[0]) eq 'MIDI::Drummer::Tiny' },
84             default => sub { MIDI::Drummer::Tiny->new },
85             );
86              
87             #pod =head2 duration
88             #pod
89             #pod $grooves->duration($duration);
90             #pod $duration = $grooves->duration;
91             #pod
92             #pod The "resolution" duration that is given to the
93             #pod L method.
94             #pod
95             #pod This is initialized to the sixteenth duration of the drummer
96             #pod L object.
97             #pod
98             #pod =cut
99              
100             has duration => (
101             is => 'lazy',
102             );
103 0     0   0 sub _build_duration { shift->drummer->sixteenth }
104              
105             #pod =head2 kick, rimshot, snare, clap, cowbell, shaker, closed, open, cymbals, hi_tom, mid_tom, low_tom
106             #pod
107             #pod $grooves->kick(36);
108             #pod $kick = $grooves->kick;
109             #pod
110             #pod The drum patches that are used by the grooves.
111             #pod
112             #pod Each is initialized to a corresponding patch of the drummer
113             #pod L object that is given to, or created by the
114             #pod constructor. (So changing these can be done in either the
115             #pod L object, or in the C constructor.)
116             #pod
117             #pod =cut
118              
119             for my $patch (qw(
120             kick
121             rimshot
122             snare
123             clap
124             cowbell
125             shaker
126             closed
127             open
128             cymbals
129             hi_tom
130             mid_tom
131             low_tom
132             )) {
133             has $patch => (
134             is => 'lazy',
135             builder => '_build_' . $patch,
136             );
137             }
138 0     0   0 sub _build_kick { shift->drummer->kick }
139 0     0   0 sub _build_rimshot { shift->drummer->side_stick }
140 0     0   0 sub _build_snare { shift->drummer->snare }
141 0     0   0 sub _build_clap { shift->drummer->clap }
142 0     0   0 sub _build_cowbell { shift->drummer->cowbell }
143 0     0   0 sub _build_shaker { shift->drummer->maracas }
144 0     0   0 sub _build_closed { shift->drummer->closed_hh }
145 0     0   0 sub _build_open { shift->drummer->open_hh }
146 0     0   0 sub _build_cymbals { shift->drummer->crash1 }
147 0     0   0 sub _build_hi_tom { shift->drummer->hi_mid_tom }
148 0     0   0 sub _build_mid_tom { shift->drummer->low_mid_tom }
149 0     0   0 sub _build_low_tom { shift->drummer->low_tom }
150              
151             #pod =head1 METHODS
152             #pod
153             #pod =head2 new
154             #pod
155             #pod $grooves = MIDI::Drummer::Tiny::Grooves->new;
156             #pod $grooves = MIDI::Drummer::Tiny::Grooves->new(drummer => $drummer);
157             #pod
158             #pod Return a new C object.
159             #pod
160             #pod =head2 get_groove
161             #pod
162             #pod $groove = $grooves->get_groove($groove_number);
163             #pod $groove = $grooves->get_groove; # random groove
164             #pod $groove = $grooves->get_groove(0, $set); # random groove of set
165             #pod $groove = $grooves->get_groove($groove_number, $set); # numbered groove of set
166             #pod
167             #pod Return a numbered or random groove from either the given B or
168             #pod all known grooves.
169             #pod
170             #pod =cut
171              
172             sub get_groove {
173 0     0 1 0 my ($self, $groove_number, $set) = @_;
174 0 0       0 unless (keys %$set) {
175 0         0 $set = $self->all_grooves;
176             }
177 0 0       0 unless ($groove_number) {
178 0         0 my @keys = keys %$set;
179 0         0 $groove_number = $keys[ int rand @keys ];
180             }
181 0         0 return $set->{$groove_number};
182             }
183              
184             #pod =head2 all_grooves
185             #pod
186             #pod $all = $grooves->all_grooves;
187             #pod
188             #pod Return all the known grooves as a hash reference.
189             #pod
190             #pod =cut
191              
192             sub all_grooves {
193 3     3 1 1988 my ($self) = @_;
194 3         14 return $self->_grooves();
195             }
196              
197             #pod =head2 search
198             #pod
199             #pod $set = $grooves->search({ cat => $x, name => $y }); # search all grooves
200             #pod $set = $grooves->search({ cat => $x, name => $y }, $set); # search a subset
201             #pod
202             #pod Return the found grooves with names matching the B or B
203             #pod strings and given an optional set of grooves to search in.
204             #pod
205             #pod =cut
206              
207             sub search {
208 2     2 1 7531 my ($self, $args, $set) = @_;
209 2 50 33     10 unless ($set && keys %$set) {
210 2         11 $set = $self->all_grooves;
211             }
212 2         4 my $found = {};
213 2 100       8 if ($args->{cat}) {
214 1         7 my $string = lc $args->{cat};
215 1         9 for my $k (keys %$set) {
216 82 100       205 if (lc($set->{$k}{cat}) =~ /$string/) {
217 10         15 $found->{$k} = $set->{$k};
218             }
219             }
220             }
221 2 100       9 if ($args->{name}) {
222 1         28 my $string = lc $args->{name};
223 1         12 for my $k (keys %$set) {
224 82 100       168 if (lc($set->{$k}{name}) =~ /$string/) {
225 3         6 $found->{$k} = $set->{$k};
226             }
227             }
228             }
229 2         310 return $found;
230             }
231              
232             sub _grooves {
233 3     3   6 my ($self) = @_;
234              
235             my %grooves = (
236              
237             1 => {
238             cat => "Basic Patterns",
239             name => "ONE AND SEVEN & FIVE AND THIRTEEN",
240             groove => sub {
241 0     0   0 $self->drummer->sync_patterns(
242             $self->kick => ['1000001000000000'],
243             $self->snare => ['0000100000001000'],
244             duration => $self->duration,
245             ),
246             },
247             },
248              
249             2 => {
250             cat => "Basic Patterns",
251             name => "BOOTS N' CATS",
252             groove => sub {
253 0     0   0 $self->drummer->sync_patterns(
254             $self->kick => ['1000000010000000'],
255             $self->snare => ['0000100000001000'],
256             $self->closed => ['1010101010101010'],
257             duration => $self->duration,
258             ),
259             },
260             },
261              
262             3 => {
263             cat => "Basic Patterns",
264             name => "TINY HOUSE",
265             groove => sub {
266 0     0   0 $self->drummer->sync_patterns( # 123456789ABCDEF0
267             $self->kick => ['1000100010001000'],
268             $self->open => ['0010001000100010'],
269             duration => $self->duration,
270             ),
271             },
272             },
273              
274             4 => {
275             cat => "Basic Patterns",
276             name => "GOOD TO GO",
277             groove => sub {
278 0     0   0 $self->drummer->sync_patterns(
279             $self->kick => ['1001001000100000'],
280             $self->snare => ['0000100000001000'],
281             duration => $self->duration,
282             ),
283             },
284             },
285              
286             5 => {
287             cat => "Basic Patterns",
288             name => "HIP HOP",
289             groove => sub {
290 0     0   0 $self->drummer->sync_patterns(
291             $self->kick => ['1010001100000010'],
292             $self->snare => ['0000100000001000'],
293             $self->closed => ['1010101010101010'],
294             duration => $self->duration,
295             ),
296             },
297             },
298              
299             6 => {
300             cat => "Standard Breaks",
301             name => "STANDARD BREAK 1",
302             groove => sub {
303 0     0   0 $self->drummer->sync_patterns(
304             $self->kick => ['1000000000100000'],
305             $self->snare => ['0000100000001000'],
306             $self->closed => ['1010101011101010'],
307             duration => $self->duration,
308             ),
309             },
310             },
311              
312             7 => {
313             cat => "Standard Breaks",
314             name => "STANDARD BREAK 2",
315             groove => sub {
316 0     0   0 $self->drummer->sync_patterns(
317             $self->kick => ['1000000000100000'],
318             $self->snare => ['0000100000001000'],
319             $self->closed => ['1010101110100010'],
320             duration => $self->duration,
321             ),
322             },
323             },
324              
325             8 => {
326             cat => "Standard Breaks",
327             name => "ROLLING BREAK",
328             groove => sub {
329 0     0   0 $self->drummer->sync_patterns(
330             $self->kick => ['1000000100100000'],
331             $self->snare => ['0000100000001000'],
332             $self->closed => ['1010101010101010'],
333             duration => $self->duration,
334             ),
335             },
336             },
337              
338             9 => {
339             cat => "Standard Breaks",
340             name => "THE UNKNOWN DRUMMER",
341             groove => sub {
342 0     0   0 $self->drummer->sync_patterns(
343             $self->kick => ['1001001000100000'],
344             $self->snare => ['0100100100001000'],
345             $self->closed => ['0110110100000100'],
346             $self->open => ['0000000010000010'],
347             duration => $self->duration,
348             ),
349             },
350             },
351              
352             10 => {
353             cat => "Rock",
354             name => "ROCK 1",
355             groove => sub {
356 0     0   0 $self->drummer->sync_patterns(
357             $self->kick => ['1000000110100000'],
358             $self->snare => ['0000100000001000'],
359             $self->closed => ['1010101010101010'],
360             $self->cymbal => ['1000000000000000'],
361             duration => $self->duration,
362             ),
363             },
364             },
365              
366             11 => {
367             cat => "Rock",
368             name => "ROCK 2",
369             groove => sub {
370 0     0   0 $self->drummer->sync_patterns(
371             $self->kick => ['1000000110100000'],
372             $self->snare => ['0000100000001000'],
373             $self->closed => ['1010101010101010'],
374             duration => $self->duration,
375             ),
376             },
377             },
378              
379             12 => {
380             cat => "Rock",
381             name => "ROCK 3",
382             groove => sub {
383 0     0   0 $self->drummer->sync_patterns(
384             $self->kick => ['1000000110100000'],
385             $self->snare => ['0000100000001000'],
386             $self->closed => ['1010101010101000'],
387             $self->open => ['0000000000000010'],
388             duration => $self->duration,
389             ),
390             },
391             },
392              
393             13 => {
394             cat => "Rock",
395             name => "ROCK 4",
396             groove => sub {
397 0     0   0 $self->drummer->sync_patterns(
398             $self->kick => ['1000000110100000'],
399             $self->snare => ['0000100000001011'],
400             $self->closed => ['1010101010101000'],
401             $self->open => ['0000000000000010'],
402             duration => $self->duration,
403             ),
404             },
405             },
406              
407             14 => {
408             cat => "Electro",
409             name => "ELECTRO 1 - A",
410             groove => sub {
411 0     0   0 $self->drummer->sync_patterns(
412             $self->kick => ['1000001000000000'],
413             $self->snare => ['0000100000001000'],
414             duration => $self->duration,
415             ),
416             },
417             },
418              
419             15 => {
420             cat => "Electro",
421             name => "ELECTRO 1 - B",
422             groove => sub {
423 0     0   0 $self->drummer->sync_patterns(
424             $self->kick => ['1000001000100010'],
425             $self->snare => ['0000100000001000'],
426             duration => $self->duration,
427             ),
428             },
429             },
430              
431             # nb: ELECTRO 2 - A == ELECTRO 1 - A
432              
433             16 => {
434             cat => "Electro",
435             name => "ELECTRO 2 - B",
436             groove => sub {
437 0     0   0 $self->drummer->sync_patterns(
438             $self->kick => ['1000000000100100'],
439             $self->snare => ['0000100000001000'],
440             duration => $self->duration,
441             ),
442             },
443             },
444              
445             17 => {
446             cat => "Electro",
447             name => "ELECTRO 3 - A",
448             groove => sub {
449 0     0   0 $self->drummer->sync_patterns(
450             $self->kick => ['1000001000010000'],
451             $self->snare => ['0000100000001000'],
452             duration => $self->duration,
453             ),
454             },
455             },
456              
457             18 => {
458             cat => "Electro",
459             name => "ELECTRO 3 - B",
460             groove => sub {
461 0     0   0 $self->drummer->sync_patterns(
462             $self->kick => ['1000001000010100'],
463             $self->snare => ['0000100000001000'],
464             duration => $self->duration,
465             ),
466             },
467             },
468              
469             19 => {
470             cat => "Electro",
471             name => "ELECTRO 4",
472             groove => sub {
473 0     0   0 $self->drummer->sync_patterns(
474             $self->kick => ['1000001000100100'],
475             $self->snare => ['0000100000001000'],
476             duration => $self->duration,
477             ),
478             },
479             },
480              
481             20 => {
482             cat => "Electro",
483             name => "SIBERIAN NIGHTS",
484             groove => sub {
485 0     0   0 $self->drummer->sync_patterns(
486             $self->kick => ['1000001000000000'],
487             $self->snare => ['0000100000001000'],
488             $self->closed => ['1011101110111011'],
489             duration => $self->duration,
490             ),
491             },
492             },
493              
494             21 => {
495             cat => "Electro",
496             name => "NEW WAVE",
497             groove => sub {
498 0     0   0 $self->drummer->sync_patterns(
499             $self->kick => ['1000001011000000'],
500             $self->snare => ['0000100000001000'],
501             $self->closed => ['1101111111111111'],
502             $self->open => ['0010000000000000'],
503             $self->shaker => ['0000100000001000'],
504             duration => $self->duration,
505             ),
506             },
507             },
508              
509             22 => {
510             cat => "House",
511             name => "HOUSE",
512             groove => sub {
513 0     0   0 $self->drummer->sync_patterns(
514             $self->kick => ['1000100010001000'],
515             $self->snare => ['0000100000001000'],
516             $self->open => ['0010001000100010'],
517             $self->cymbal => ['1000000000000000'],
518             duration => $self->duration,
519             ),
520             },
521             },
522              
523             23 => {
524             cat => "House",
525             name => "HOUSE 2",
526             groove => sub {
527 0     0   0 $self->drummer->sync_patterns(
528             $self->kick => ['1000001011000000'],
529             $self->snare => ['0000100000001000'],
530             $self->closed => ['1101101111011011'],
531             $self->open => ['0010010000100100'],
532             duration => $self->duration,
533             ),
534             },
535             },
536              
537             24 => {
538             cat => "House",
539             name => "BRIT HOUSE",
540             groove => sub {
541 0     0   0 $self->drummer->sync_patterns(
542             $self->kick => ['1000001011000000'],
543             $self->snare => ['0000100000001000'],
544             $self->closed => ['1101110111011101'],
545             $self->open => ['0010001000100010'],
546             $self->cymbal => ['0010001000100010'],
547             duration => $self->duration,
548             ),
549             },
550             },
551              
552             25 => {
553             cat => "House",
554             name => "FRENCH HOUSE",
555             groove => sub {
556 0     0   0 $self->drummer->sync_patterns(
557             $self->kick => ['1000001011000000'],
558             $self->snare => ['0000100000001000'],
559             $self->closed => ['1010101010101010'],
560             $self->open => ['0101010101010101'],
561             $self->shaker => ['1110101111101011'],
562             duration => $self->duration,
563             ),
564             },
565             },
566              
567             26 => {
568             cat => "House",
569             name => "DIRTY HOUSE",
570             groove => sub {
571 0     0   0 $self->drummer->sync_patterns(
572             $self->kick => ['1010100010101001'],
573             $self->snare => ['0000100000001000'],
574             $self->closed => ['0000000000100001'],
575             $self->open => ['0010000000000010'],
576             $self->clap => ['0010100010101000'],
577             duration => $self->duration,
578             ),
579             },
580             },
581              
582             27 => {
583             cat => "House",
584             name => "DEEP HOUSE",
585             groove => sub {
586 0     0   0 $self->drummer->sync_patterns(
587             $self->kick => ['1000100010001000'],
588             $self->clap => ['0000100000001000'],
589             $self->closed => ['0100000101000000'],
590             $self->open => ['0010001000100010'],
591             duration => $self->duration,
592             ),
593             },
594             },
595              
596             28 => {
597             cat => "House",
598             name => "DEEPER HOUSE",
599             groove => sub {
600 0     0   0 $self->drummer->sync_patterns(
601             $self->kick => ['1000100010001000'],
602             $self->clap => ['0100000001000000'],
603             $self->open => ['0010001000110010'],
604             $self->shaker => ['0001000010000000'],
605             $self->mid_tom => ['0010000100100000'],
606             duration => $self->duration,
607             ),
608             },
609             },
610              
611             29 => {
612             cat => "House",
613             name => "SLOW DEEP HOUSE",
614             groove => sub {
615 0     0   0 $self->drummer->sync_patterns(
616             $self->kick => ['1000100010001000'],
617             $self->clap => ['0000100000001000'],
618             $self->closed => ['1000100010001000'],
619             $self->open => ['0011001101100010'],
620             $self->shaker => ['1111111111111111'],
621             duration => $self->duration,
622             ),
623             },
624             },
625              
626             30 => {
627             cat => "House",
628             name => "FOOTWORK - A",
629             groove => sub {
630 0     0   0 $self->drummer->sync_patterns(
631             $self->kick => ['1001001010010010'],
632             $self->clap => ['0000000000001000'],
633             $self->closed => ['0010000000100000'],
634             $self->rimshot => ['1111111111111111'],
635             duration => $self->duration,
636             ),
637             },
638             },
639              
640             31 => {
641             cat => "House",
642             name => "FOOTWORK - B",
643             groove => sub {
644 0     0   0 $self->drummer->sync_patterns(
645             $self->kick => ['1001001010010010'],
646             $self->clap => ['0000000000001000'],
647             $self->closed => ['0010001100100010'],
648             $self->rimshot => ['1111111111111111'],
649             duration => $self->duration,
650             ),
651             },
652             },
653              
654             32 => {
655             cat => "Miami Bass",
656             name => "MIAMI BASS - A",
657             groove => sub {
658 0     0   0 $self->drummer->sync_patterns(
659             $self->kick => ['1000001000100100'],
660             $self->snare => ['0000100000001000'],
661             $self->closed => ['1011101110111011'],
662             duration => $self->duration,
663             ),
664             },
665             },
666              
667             33 => {
668             cat => "Miami Bass",
669             name => "MIAMI BASS - B",
670             groove => sub {
671 0     0   0 $self->drummer->sync_patterns(
672             $self->kick => ['1000001000000000'],
673             $self->snare => ['0000100000001000'],
674             $self->closed => ['1011101110111011'],
675             duration => $self->duration,
676             ),
677             },
678             },
679              
680             34 => {
681             cat => "Miami Bass",
682             name => "SALLY",
683             groove => sub {
684 0     0   0 $self->drummer->sync_patterns(
685             $self->kick => ['1000001000100010'],
686             $self->snare => ['0000100000001000'],
687             $self->closed => ['1010101010101010'],
688             $self->low_tom => ['1000001000100010'],
689             duration => $self->duration,
690             ),
691             },
692             },
693              
694             35 => {
695             cat => "Miami Bass",
696             name => "ROCK THE PLANET",
697             groove => sub {
698 0     0   0 $self->drummer->sync_patterns(
699             $self->kick => ['1001001000000000'],
700             $self->snare => ['0000100000001000'],
701             $self->closed => ['1011101110111111'],
702             duration => $self->duration,
703             ),
704             },
705             },
706              
707             36 => {
708             cat => "Hip Hop",
709             name => "HIP HOP 1 - A",
710             groove => sub {
711 0     0   0 $self->drummer->sync_patterns(
712             $self->kick => ['1000001100010010'],
713             $self->snare => ['0000100000001000'],
714             duration => $self->duration,
715             ),
716             },
717             },
718              
719             37 => {
720             cat => "Hip Hop",
721             name => "HIP HOP 1 - B",
722             groove => sub {
723 0     0   0 $self->drummer->sync_patterns(
724             $self->kick => ['1000000100010000'],
725             $self->snare => ['0000100000001000'],
726             duration => $self->duration,
727             ),
728             },
729             },
730              
731             38 => {
732             cat => "Hip Hop",
733             name => "HIP HOP 2 - A",
734             groove => sub {
735 0     0   0 $self->drummer->sync_patterns(
736             $self->kick => ['1000000111010101'],
737             $self->snare => ['0000100000001000'],
738             duration => $self->duration,
739             ),
740             },
741             },
742              
743             39 => {
744             cat => "Hip Hop",
745             name => "HIP HOP 2 - B",
746             groove => sub {
747 0     0   0 $self->drummer->sync_patterns(
748             $self->kick => ['1000000110010000'],
749             $self->snare => ['0000100000001000'],
750             duration => $self->duration,
751             ),
752             },
753             },
754              
755             40 => {
756             cat => "Hip Hop",
757             name => "HIP HOP 3 - A",
758             groove => sub {
759 0     0   0 $self->drummer->sync_patterns(
760             $self->kick => ['1010000010100000'],
761             $self->snare => ['0000100000001000'],
762             duration => $self->duration,
763             ),
764             },
765             },
766              
767             41 => {
768             cat => "Hip Hop",
769             name => "HIP HOP 3 - B",
770             groove => sub {
771 0     0   0 $self->drummer->sync_patterns(
772             $self->kick => ['1010000011010000'],
773             $self->snare => ['0000100000001000'],
774             duration => $self->duration,
775             ),
776             },
777             },
778              
779             42 => {
780             cat => "Hip Hop",
781             name => "HIP HOP 4 - A",
782             groove => sub {
783 0     0   0 $self->drummer->sync_patterns(
784             $self->kick => ['1001000101100001'],
785             $self->snare => ['0000100000001000'],
786             duration => $self->duration,
787             ),
788             },
789             },
790              
791             43 => {
792             cat => "Hip Hop",
793             name => "HIP HOP 4 - B",
794             groove => sub {
795 0     0   0 $self->drummer->sync_patterns(
796             $self->kick => ['1010000111100000'],
797             $self->snare => ['0000100000001000'],
798             duration => $self->duration,
799             ),
800             },
801             },
802              
803             44 => {
804             cat => "Hip Hop",
805             name => "HIP HOP 5",
806             groove => sub {
807 0     0   0 $self->drummer->sync_patterns(
808             $self->kick => ['1010000110100001'],
809             $self->snare => ['0000100000001000'],
810             duration => $self->duration,
811             ),
812             },
813             },
814              
815             45 => {
816             cat => "Hip Hop",
817             name => "HIP HOP 6",
818             groove => sub {
819 0     0   0 $self->drummer->sync_patterns(
820             $self->kick => ['1010000000110001'],
821             $self->snare => ['0000100000001000'],
822             $self->closed => ['1010101010101010'],
823             duration => $self->duration,
824             ),
825             },
826             },
827              
828             46 => {
829             cat => "Hip Hop",
830             name => "HIP HOP 7",
831             groove => sub {
832 0     0   0 $self->drummer->sync_patterns(
833             $self->kick => ['1000000100100101'],
834             $self->snare => ['0000100000001000'],
835             $self->closed => ['1010101010101010'],
836             duration => $self->duration,
837             ),
838             },
839             },
840              
841             47 => {
842             cat => "Hip Hop",
843             name => "HIP HOP 8",
844             groove => sub {
845 0     0   0 $self->drummer->sync_patterns(
846             $self->kick => ['1001000010110000'],
847             $self->snare => ['0000100000001000'],
848             $self->closed => ['1101101111011011'],
849             $self->open => ['0000010000000100'],
850             duration => $self->duration,
851             ),
852             },
853             },
854              
855             48 => {
856             cat => "Hip Hop",
857             name => "TRAP - A",
858             groove => sub {
859 0     0   0 $self->drummer->sync_patterns(
860             $self->kick => ['1000001000001000'],
861             $self->snare => ['0000000010000000'],
862             $self->closed => ['1010101010101010'],
863             duration => $self->duration,
864             ),
865             },
866             },
867              
868             49 => {
869             cat => "Hip Hop",
870             name => "TRAP - B",
871             groove => sub {
872 0     0   0 $self->drummer->sync_patterns(
873             $self->kick => ['0010100000000000'],
874             $self->snare => ['0000000010000000'],
875             $self->closed => ['1110101010101110'],
876             duration => $self->duration,
877             ),
878             },
879             },
880              
881             50 => {
882             cat => "Hip Hop",
883             name => "PLANET ROCK - A",
884             groove => sub {
885 0     0   0 $self->drummer->sync_patterns(
886             $self->kick => ['1000001000000000'],
887             $self->snare => ['0000100000001000'],
888             $self->clap => ['0000100000001000'],
889             $self->closed => ['1011101110111111'],
890             $self->cowbell => ['1010101101011010'],
891             duration => $self->duration,
892             ),
893             },
894             },
895              
896             51 => {
897             cat => "Hip Hop",
898             name => "PLANET ROCK - B",
899             groove => sub {
900 0     0   0 $self->drummer->sync_patterns(
901             $self->kick => ['1000001000100100'],
902             $self->snare => ['0000100000001000'],
903             $self->clap => ['0000100000001000'],
904             $self->closed => ['1011101110111111'],
905             $self->cowbell => ['1010101101011010'],
906             duration => $self->duration,
907             ),
908             },
909             },
910              
911             52 => {
912             cat => "Hip Hop",
913             name => "INNA CLUB",
914             groove => sub {
915 0     0   0 $self->drummer->sync_patterns( # 123456789ABCDEF0
916             $self->kick => ['0010000100100001'],
917             $self->snare => ['0000100000001000'],
918             $self->clap => ['0000100000001000'],
919             $self->open => ['1010101010101010'],
920             duration => $self->duration,
921             ),
922             },
923             },
924              
925             53 => {
926             cat => "Hip Hop",
927             name => "ICE",
928             groove => sub {
929 0     0   0 $self->drummer->sync_patterns(
930             $self->kick => ['1000001000100010'],
931             $self->snare => ['0000100000001000'],
932             $self->shaker => ['1010101010101010'],
933             duration => $self->duration,
934             ),
935             },
936             },
937              
938             54 => {
939             cat => "Hip Hop",
940             name => "BACK TO CALI - A",
941             groove => sub {
942 0     0   0 $self->drummer->sync_patterns(
943             $self->kick => ['1000001000000000'],
944             $self->snare => ['0000100000001000'],
945             $self->clap => ['0000101010001010'],
946             $self->closed => ['1010101010101010'],
947             duration => $self->duration,
948             ),
949             },
950             },
951              
952             55 => {
953             cat => "Hip Hop",
954             name => "BACK TO CALI - B",
955             groove => sub {
956 0     0   0 $self->drummer->sync_patterns(
957             $self->kick => ['1000001000100100'],
958             $self->snare => ['0000100000001000'],
959             $self->clap => ['1000101010001000'],
960             $self->closed => ['1010101010100010'],
961             $self->open => ['0000000000001000'],
962             duration => $self->duration,
963             ),
964             },
965             },
966              
967             56 => {
968             cat => "Hip Hop",
969             name => "SNOOP STYLES",
970             groove => sub {
971 0     0   0 $self->drummer->sync_patterns(
972             $self->kick => ['1001001000010000'],
973             $self->snare => ['0000100000001000'],
974             $self->clap => ['0000100000001000'],
975             $self->rimshot => ['0010010010010000'],
976             $self->open => ['1001001000010000'],
977             duration => $self->duration,
978             ),
979             },
980             },
981              
982             57 => {
983             cat => "Hip Hop",
984             name => "THE GROOVE - A",
985             groove => sub {
986 0     0   0 $self->drummer->sync_patterns(
987             $self->kick => ['1001000100010010'],
988             $self->snare => ['0000100000001000'],
989             $self->shaker => ['0000100000001000'],
990             $self->closed => ['1010101010101010'],
991             $self->open => ['0000000100000000'],
992             duration => $self->duration,
993             ),
994             },
995             },
996              
997             58 => {
998             cat => "Hip Hop",
999             name => "THE GROOVE - B",
1000             groove => sub {
1001 0     0   0 $self->drummer->sync_patterns(
1002             $self->kick => ['1001000100010010'],
1003             $self->snare => ['0000100000001000'],
1004             $self->shaker => ['0000100000001000'],
1005             $self->closed => ['1010101010000100'],
1006             $self->open => ['0000000100111010'],
1007             $self->hi_tom => ['0000000001100000'],
1008             $self->mid_tom => ['0000000000010100'],
1009             $self->low_tom => ['0000000000000011'],
1010             duration => $self->duration,
1011             ),
1012             },
1013             },
1014              
1015             59 => {
1016             cat => "Hip Hop",
1017             name => "BOOM BAP",
1018             groove => sub {
1019 0     0   0 $self->drummer->sync_patterns(
1020             $self->kick => ['1010010001000100'],
1021             $self->snare => ['0010001000100010'],
1022             $self->clap => ['0010001000100010'],
1023             $self->closed => ['1111111111111101'],
1024             $self->cowbell => ['0000000010000000'],
1025             duration => $self->duration,
1026             ),
1027             },
1028             },
1029              
1030             60 => {
1031             cat => "Hip Hop",
1032             name => "MOST WANTED - A",
1033             groove => sub {
1034 0     0   0 $self->drummer->sync_patterns(
1035             $self->kick => ['1000001011000001'],
1036             $self->snare => ['0000100000001000'],
1037             $self->clap => ['0000100000001000'],
1038             $self->closed => ['0010101010101010'],
1039             $self->cymbal => ['1000000000000000'],
1040             duration => $self->duration,
1041             ),
1042             },
1043             },
1044              
1045             61 => {
1046             cat => "Hip Hop",
1047             name => "MOST WANTED - B",
1048             groove => sub {
1049 0     0   0 $self->drummer->sync_patterns(
1050             $self->kick => ['0010001011000000'],
1051             $self->snare => ['0000100000001000'],
1052             $self->clap => ['0000100000001000'],
1053             $self->closed => ['0010101010101010'],
1054             $self->open => ['0010000000000000'],
1055             duration => $self->duration,
1056             ),
1057             },
1058             },
1059              
1060             62 => {
1061             cat => "Funk and Soul",
1062             name => "AMEN BREAK - A",
1063             groove => sub {
1064 0     0   0 $self->drummer->sync_patterns(
1065             $self->kick => ['1010000000110000'],
1066             $self->snare => ['0000000101001001'],
1067             $self->closed => ['1010101010101010'],
1068             duration => $self->duration,
1069             ),
1070             },
1071             },
1072              
1073             63 => {
1074             cat => "Funk and Soul",
1075             name => "AMEN BREAK - B",
1076             groove => sub {
1077 0     0   0 $self->drummer->sync_patterns(
1078             $self->kick => ['1010000000110000'],
1079             $self->snare => ['0000100101001001'],
1080             $self->rimshot => ['0000100000000000'],
1081             $self->closed => ['1010101010101010'],
1082             duration => $self->duration,
1083             ),
1084             },
1085             },
1086              
1087             64 => {
1088             cat => "Funk and Soul",
1089             name => "AMEN BREAK - C",
1090             groove => sub {
1091 0     0   0 $self->drummer->sync_patterns(
1092             $self->kick => ['1010000000100000'],
1093             $self->snare => ['0000100101001001'],
1094             $self->rimshot => ['0000000000000010'],
1095             $self->closed => ['1010101010101010'],
1096             duration => $self->duration,
1097             ),
1098             },
1099             },
1100              
1101             65 => {
1102             cat => "Funk and Soul",
1103             name => "AMEN BREAK - D",
1104             groove => sub {
1105 0     0   0 $self->drummer->sync_patterns(
1106             $self->kick => ['1010000000100000'],
1107             $self->snare => ['0100100101000010'],
1108             $self->closed => ['1010101010001010'],
1109             $self->cymbal => ['0000000000100000'],
1110             duration => $self->duration,
1111             ),
1112             },
1113             },
1114              
1115             66 => {
1116             cat => "Funk and Soul",
1117             name => "THE FUNKY DRUMMER",
1118             groove => sub {
1119 0     0   0 $self->drummer->sync_patterns(
1120             $self->kick => ['1010001000100100'],
1121             $self->snare => ['0000100101011001'],
1122             $self->closed => ['1111111011111011'],
1123             $self->open => ['0000000100000100'],
1124             duration => $self->duration,
1125             ),
1126             },
1127             },
1128              
1129             67 => {
1130             cat => "Funk and Soul",
1131             name => "IMPEACH THE PRESIDENT",
1132             groove => sub {
1133 0     0   0 $self->drummer->sync_patterns(
1134             $self->kick => ['1000000110000010'],
1135             $self->snare => ['0000100000001000'],
1136             $self->closed => ['1010101110001010'],
1137             $self->open => ['0000000000100000'],
1138             duration => $self->duration,
1139             ),
1140             },
1141             },
1142              
1143             68 => {
1144             cat => "Funk and Soul",
1145             name => "WHEN THE LEVEE BREAKS",
1146             groove => sub {
1147 0     0   0 $self->drummer->sync_patterns(
1148             $self->kick => ['1100000100110000'],
1149             $self->snare => ['0000100000001000'],
1150             $self->closed => ['1010101010101010'],
1151             duration => $self->duration,
1152             ),
1153             },
1154             },
1155              
1156             69 => {
1157             cat => "Funk and Soul",
1158             name => "IT'S A NEW DAY",
1159             groove => sub {
1160 0     0   0 $self->drummer->sync_patterns(
1161             $self->kick => ['1010000000110001'],
1162             $self->snare => ['0000100000001000'],
1163             $self->closed => ['1010101010101010'],
1164             duration => $self->duration,
1165             ),
1166             },
1167             },
1168              
1169             70 => {
1170             cat => "Funk and Soul",
1171             name => "THE BIG BEAT",
1172             groove => sub {
1173 0     0   0 $self->drummer->sync_patterns(
1174             $self->kick => ['1001001010000000'],
1175             $self->snare => ['0000100000001000'],
1176             $self->closed => ['0000100000001000'],
1177             duration => $self->duration,
1178             ),
1179             },
1180             },
1181              
1182             71 => {
1183             cat => "Funk and Soul",
1184             name => "ASHLEY'S ROACHCLIP",
1185             groove => sub {
1186 0     0   0 $self->drummer->sync_patterns(
1187             $self->kick => ['1010001011000000'],
1188             $self->snare => ['0000100000001000'],
1189             $self->closed => ['1010101010001010'],
1190             $self->open => ['0000000000100000'],
1191             $self->cowbell => ['1010101010101010'],
1192             duration => $self->duration,
1193             ),
1194             },
1195             },
1196              
1197             72 => {
1198             cat => "Funk and Soul",
1199             name => "PAPA WAS TOO",
1200             groove => sub {
1201 0     0   0 $self->drummer->sync_patterns(
1202             $self->kick => ['1000000110100001'],
1203             $self->snare => ['0000100000001000'],
1204             $self->closed => ['0000100010101011'],
1205             $self->cymbal => ['0000100000000000'],
1206             duration => $self->duration,
1207             ),
1208             },
1209             },
1210              
1211             73 => {
1212             cat => "Funk and Soul",
1213             name => "SUPERSTITION",
1214             groove => sub {
1215 0     0   0 $self->drummer->sync_patterns(
1216             $self->kick => ['1000100010001000'],
1217             $self->snare => ['0000100000001000'],
1218             $self->closed => ['1010101111101011'],
1219             duration => $self->duration,
1220             ),
1221             },
1222             },
1223              
1224             74 => {
1225             cat => "Funk and Soul",
1226             name => "CISSY STRUT - A",
1227             groove => sub {
1228 0     0   0 $self->drummer->sync_patterns(
1229             $self->kick => ['1001010001011010'],
1230             $self->snare => ['0000100101100000'],
1231             $self->cymbal => ['0000000000001010'],
1232             duration => $self->duration,
1233             ),
1234             },
1235             },
1236              
1237             75 => {
1238             cat => "Funk and Soul",
1239             name => "CISSY STRUT - B",
1240             groove => sub {
1241 0     0   0 $self->drummer->sync_patterns(
1242             $self->kick => ['1001000101011010'],
1243             $self->snare => ['0010011011000000'],
1244             duration => $self->duration,
1245             ),
1246             },
1247             },
1248              
1249             76 => {
1250             cat => "Funk and Soul",
1251             name => "CISSY STRUT - C",
1252             groove => sub {
1253 0     0   0 $self->drummer->sync_patterns(
1254             $self->kick => ['1000100101011010'],
1255             $self->snare => ['0010111001000000'],
1256             $self->cymbal => ['0000000000001010'],
1257             duration => $self->duration,
1258             ),
1259             },
1260             },
1261              
1262             77 => {
1263             cat => "Funk and Soul",
1264             name => "CISSY STRUT - D",
1265             groove => sub {
1266 0     0   0 $self->drummer->sync_patterns(
1267             $self->kick => ['1000100101011010'],
1268             $self->snare => ['1010010011000000'],
1269             $self->cymbal => ['0000000000001010'],
1270             duration => $self->duration,
1271             ),
1272             },
1273             },
1274              
1275             78 => {
1276             cat => "Funk and Soul",
1277             name => "HOOK AND SLING - A",
1278             groove => sub {
1279 0     0   0 $self->drummer->sync_patterns(
1280             $self->kick => ['1010000001000110'],
1281             $self->snare => ['0000101100101000'],
1282             $self->closed => ['1011010011010010'],
1283             duration => $self->duration,
1284             ),
1285             },
1286             },
1287              
1288             79 => {
1289             cat => "Funk and Soul",
1290             name => "HOOK AND SLING - B",
1291             groove => sub {
1292 0     0   0 $self->drummer->sync_patterns(
1293             $self->kick => ['0000000000000010'],
1294             $self->snare => ['1000110100110011'],
1295             $self->closed => ['1101001011001010'],
1296             duration => $self->duration,
1297             ),
1298             },
1299             },
1300              
1301             80 => {
1302             cat => "Funk and Soul",
1303             name => "HOOK AND SLING - C",
1304             groove => sub {
1305 0     0   0 $self->drummer->sync_patterns(
1306             $self->kick => ['1100000000001101'],
1307             $self->snare => ['0010101100110010'],
1308             $self->closed => ['1010110101001100'],
1309             duration => $self->duration,
1310             ),
1311             },
1312             },
1313              
1314             81 => {
1315             cat => "Funk and Soul",
1316             name => "HOOK AND SLING - D",
1317             groove => sub {
1318 0     0   0 $self->drummer->sync_patterns(
1319             $self->kick => ['1010010000010110'],
1320             $self->snare => ['0000100100100001'],
1321             $self->closed => ['1010110100000000'],
1322             duration => $self->duration,
1323             ),
1324             },
1325             },
1326              
1327             # TODO MORE!
1328             0 => {
1329             cat => "",
1330             name => "",
1331             groove => sub {
1332 0     0   0 $self->drummer->sync_patterns(
1333             # 123456789ABCDEF0
1334             $self->kick => ['0000000000000000'],
1335             $self->snare => ['0000000000000000'],
1336             $self->rimshot => ['0000000000000000'],
1337             $self->clap => ['0000000000000000'],
1338             $self->shaker => ['0000000000000000'],
1339             $self->closed => ['0000000000000000'],
1340             $self->open => ['0000000000000000'],
1341             $self->cowbell => ['0000000000000000'],
1342             $self->cymbals => ['0000000000000000'],
1343             $self->hi_tom => ['0000000000000000'],
1344             $self->mid_tom => ['0000000000000000'],
1345             $self->low_tom => ['0000000000000000'],
1346             duration => $self->duration,
1347             ),
1348             },
1349             },
1350              
1351 3         866 );
1352 3         24 return \%grooves;
1353             }
1354              
1355             1;
1356              
1357             __END__