replace note with m_key
[software/lv2-mdametapiano.git] / src / mdaPianoCommon.h
1 #ifndef MDA_PIANO_COMMON_H
2 #define MDA_PIANO_COMMON_H
3
4 #define NPARAMS 12 //number of parameters
5 #define NOUTS 2 //number of outputs
6 #define NVOICES 64 //max polyphony
7 #define SUSTAIN 128
8 #define SILENCE 0.0001f //voice choking
9 #define PARAM_OFFSET 3 //offset for param enum
10
11 struct KGRP //keygroup
12 {
13 long root; //MIDI root note
14 long high; //highest note
15 long pos;
16 long end;
17 long loop;
18 };
19
20 static float scale_midi_to_f(unsigned char data)
21 {
22 return 0.0078f * (float)(data);
23 }
24
25 static unsigned char p_offset(unsigned char i)
26 {
27 return (i - PARAM_OFFSET);
28 }
29
30 #endif