forked from giuliomoro/tiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
drums.h
32 lines (25 loc) · 775 Bytes
/
drums.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*** drums.h ***/
/*
* assignment2_drums
*
* Second assignment for ECS732 RTDSP, to create a sequencer-based
* drum machine which plays sampled drum sounds in loops.
*
* This code runs on BeagleBone Black with the BeagleRT environment.
*
* 2015
* Andrew McPherson and Victor Zappi
* Queen Mary University of London
*/
#define NUMBER_OF_DRUMS 32
#ifndef _DRUMS_H
#define _DRUMS_H
#define NUMBER_OF_PATTERNS 6
#define FILL_PATTERN 5
/* Start playing a particular drum sound */
int startPlayingDrum(int drumIndex, float drumAmplitude, int drumLatency);
/* Start playing the next event in the pattern */
void startNextEvent();
/* Returns whether the given event contains the given drum sound */
int eventContainsDrum(int event, int drum);
#endif /* _DRUMS_H */