summaryrefslogtreecommitdiff
path: root/muse_qt4_evolution/synti/libsynti/mess2.h
blob: 207eb6c3771c64c74fa83c602e0a1fa8701db3c9 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//=========================================================
//  MusE
//  Linux Music Editor
//    $Id:$
//  (C) Copyright 2007 Werner Schweer (ws@seh.de)
//=========================================================

#ifndef __MESS2_H__
#define __MESS2_H__

#include "mess.h"

//---------------------------------------------------------
//   SynthCtlr
//---------------------------------------------------------

struct SynthCtrl {
      const char* name;
      int ctrl;
      int min;
      int max;
      int init;
      int val;
      SynthCtrl(const char* n, int i, int a, int b, int c)
         : name(n), ctrl(i), min(a), max(b), init(c)
            {}
      };

//---------------------------------------------------------
//  Mess2
//    MusE experimental software synth
//    extended interface
//---------------------------------------------------------

class Mess2 : public Mess {
      unsigned char* initData;

      void getInitData(int*, const unsigned char**);
      int getControllerInfo(int, const char**, int*, int*, int*);

   protected:
      static QList<SynthCtrl*> ctrl;

      static void addController(const char* name,
         int ctrl, int min = 0, int max = 16384, int init = 0);
      static int controllerIdx(const char* name);
      static int controllerId(int idx);
      static int controllerIdx(int id);
      static const char* controllerName(int idx);

   public:
      Mess2(int channels);
      virtual ~Mess2();
      };

#endif