#ifndef DEFINES
#define DEFINES

#include <math.h>

#define PI 3.14159265359
#define RATE 44100
#define WAVESIZE 44100

#define NFRAMES 1024

static float noise = 0.0f;
static int seed = 0;

#define THANKS_BULBAPEDIA() seed=((0x41c64e6d*seed)+0x6073);noise=(float)seed/(float)0xffffffff

#define GET(x) patterns[x[order]][row]

enum { C, CS, D, DS, E, F, FS, G, GS, A, AS, B, OCTAVE };

#define HOLD 254
#define OFF 255

#define KEY(k, o) (k+(o*12))
#define HZ2(k) ((k!=255)?(440.0f*pow(2.0f,(k-69)/12.0f)):(0.0f))

#endif
