1 #ifndef MDA_PIANO_COMMON_H
2 #define MDA_PIANO_COMMON_H
4 #define NPARAMS 12 //number of parameters
5 #define NOUTS 2 //number of outputs
6 #define NVOICES 64 //max polyphony
8 #define SILENCE 0.0001f //voice choking
9 #define PARAM_OFFSET 3 //offset for param enum
10 #define SAMPLES_PER_NOTE 1
12 struct KGRP
//keygroup
14 long root
; //MIDI root note
15 long high
; //highest note
21 long size
; //length of sample data
22 short* buffer
; //pointer to sample data
25 static float scale_midi_to_f(unsigned char data
)
27 return 0.0078f
* (float)(data
);
30 static unsigned char p_offset(unsigned char i
)
32 return (i
- PARAM_OFFSET
);