GrooveExperiments.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef GROOVEEXPERIMENTS_H
  2. #define GROOVEEXPERIMENTS_H
  3. #include <QObject>
  4. #include "AutomatableSlider.h"
  5. #include "Groove.h"
  6. #include "lmms_basics.h"
  7. #include "MidiTime.h"
  8. #include "Note.h"
  9. #include "Pattern.h"
  10. /**
  11. * A groove thats new
  12. */
  13. class GrooveExperiments : public Groove
  14. {
  15. Q_OBJECT
  16. public:
  17. GrooveExperiments(QObject *parent = NULL);
  18. virtual ~GrooveExperiments();
  19. void init();
  20. int isInTick(MidiTime * curStart, const fpp_t frames, const f_cnt_t offset, Note * n, Pattern * p);
  21. inline virtual QString nodeName() const
  22. {
  23. return "experiment";
  24. }
  25. QWidget * instantiateView(QWidget * parent);
  26. public slots:
  27. // valid values are from 0 - 127
  28. void update();
  29. private:
  30. int m_framesPerTick;
  31. } ;
  32. class GrooveExperimentsView : public QWidget
  33. {
  34. Q_OBJECT
  35. public:
  36. GrooveExperimentsView(GrooveExperiments * groove, QWidget * parent = NULL);
  37. ~GrooveExperimentsView();
  38. public slots:
  39. void valueChanged();
  40. void modelChanged();
  41. private:
  42. GrooveExperiments * m_groove;
  43. IntModel * m_sliderModel;
  44. AutomatableSlider * m_slider;
  45. } ;
  46. #endif // GROOVEEXPERIMENTS_H