forked from raszhivin/arpeggiator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
engine.h
41 lines (36 loc) · 1.06 KB
/
engine.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
33
34
35
36
37
38
39
40
41
#include <MIDI.h>
typedef enum {C, CD, D, DD, E, F, FD, G, GD, A, AD, B} notes;
typedef enum {maj, minor, dim, aug} chord_types;
#define c_ionian 0
#define c_dorian 1
#define c_phrygian 2
#define c_lydian 3
#define c_mixolydian 4
#define c_aeolian 5
#define c_harmonic 6
#define c_locrian 7
typedef struct {
short Shift;
chord_types chord_type;
} chord;
class arp {
private:
notes baseNote;
short baseOctave;
short octaveShift;
unsigned short steps;
//unsigned int mode[6];
unsigned int indelay;
unsigned int progression;
chord *mode;
int order;
public:
arp();
arp(notes bn, short bo, short os, unsigned short st, unsigned int d, unsigned m, unsigned int p);
void setupArp(short bn, short bo, short os, unsigned short st, unsigned int d, int m, unsigned imode);
int setProgression(unsigned int p);
void play();
void midibegin();
};
int* createChord(notes root, chord_types i, int *notes_array, unsigned short *sh1, unsigned short *sh2);
short midiByNote (notes note, short octave);