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