#ifndef Controller_h
#define Controller_h
#include <Arduino.h>

//class for potentiometers
//*************************************************************************
class Pot
{
  public:
    Pot(byte pin, byte control, byte channel, byte sensitivity, bool canMutate);
    void newValue(byte value, byte channel);
    void updatePot();
    bool checkPot();
    byte potControl;
    byte potChannel;
    int potValue;
    bool mutante;     //can be switched

  private:
    byte _pin;   
    int _oldValue;
    byte _sensitivity;
};
//*************************************************************************
//class for buttons
//*************************************************************************

//Button (Pin Number, Command, Note Number, Channel, Debounce Time)
class Button
{
  public:
    Button(byte pin, byte command, byte value, byte channel, byte debounce, bool canMutate);
    byte getValue();
    void newValue(byte command, byte value, byte channel);
    byte Bcommand;
    byte Bvalue;
    byte Bchannel;
    byte Btoggle;
    bool mutante;

  private:
    byte _previous;
    byte _current;
    unsigned long _time;
    int _debounce;
    byte _pin;
    byte _value;
    byte _command;
    bool _busy;
    byte _status;
    byte _last;
    byte _enablepin;
};
//*************************************************************************

#endif