1 /*
2   rakarrack - a guitar effects software
3 
4   RecChord.h  -  Chord Recognizer definitions
5   Copyright (C) 2008 Josep Andreu
6   Author: Josep Andreu
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of version 2 of the GNU General Public License
10  as published by the Free Software Foundation.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  GNU General Public License (version 2) for more details.
16 
17  You should have received a copy of the GNU General Public License
18  (version2)  along with this program; if not, write to the Free Software
19  Foundation,
20  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21 
22 */
23 
24 #ifndef RECCHORD_H
25 #define RECCHORD_H
26 
27 #include "global.h"
28 
29 class RecChord
30 {
31 
32 public:
33     RecChord ();
34     ~RecChord ();
35     void MiraChord ();
36     void IniciaChords ();
37     void Vamos (int voz, int interval, int reconota);
38     void cleanup ();
39 
40     int cc;
41     int fundi;
42     int bass;
43     int ctipo;
44 
45     char NombreAcorde[20];
46 
47     struct TipoCh {
48         int tipo;
49         int num;
50         char Nom[16];
51     } ChN[34];
52 
53     struct NomChord {
54         char Nom[3];
55     } NC[13];
56 
57     struct NomChordExtended {
58         char Nom[3];
59         int note;
60     } NCE[25];
61 
62 
63     int note_active[POLY];
64     int rnote[POLY];
65     int gate[POLY];
66     float r__ratio[POLY];
67 
68 private:
69 
70     int plus (int nota);
71 
72     int NumChord3;
73     int NumChord4;
74     int NumChord5;
75 
76     int Ch[34][13];
77 
78 
79     struct Ch3 {
80         int tipo;
81         int fund;
82         int di1;
83         int di2;
84         char Nom[10];
85     } Chord3[17];
86 
87     struct Ch4 {
88         int tipo;
89         int fund;
90         int di1;
91         int di2;
92         int di3;
93         char Nom[10];
94     } Chord4[62];
95 
96     struct Ch5 {
97         int tipo;
98         int fund;
99         int di1;
100         int di2;
101         int di3;
102         int di4;
103         char Nom[16];
104     } Chord5[67];
105 
106 
107 
108 };
109 
110 #endif
111