zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

Controller.h (755B)


      1 #ifndef CONTROLLER_H
      2 #define CONTROLLER_H
      3 #include <alsa/asoundlib.h>
      4 
      5 extern pthread_mutex_t mutex;
      6 extern int Pexitprogram;
      7 
      8 class Controller
      9 {
     10     public:
     11         Controller();
     12         ~Controller();
     13         void send(int npar, float xval);
     14         //parameters
     15         unsigned char Pchout;
     16         struct {
     17             unsigned char mode; //0=off,1=ctl,2=RPN,3=NRPN
     18             unsigned char val1, val2;
     19             struct {
     20                 unsigned char par;
     21             } ctl;
     22             struct {
     23                 unsigned char cpar, fpar, cval;
     24             } nrpn;
     25         } pars[6];
     26     private:
     27         void sendcontroller(int par, unsigned char val);
     28         void sendnrpn(int npar, unsigned char val);
     29 
     30         snd_seq_t *midi_out;
     31 };
     32 
     33 #endif