You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
763 B
28 lines
763 B
#ifndef HECK_DAISY_PERKONS_INSTR_ABSTRACT
|
|
#define HECK_DAISY_PERKONS_INSTR_ABSTRACT
|
|
|
|
#include "globals.hh"
|
|
|
|
namespace Heck {
|
|
namespace Instrument {
|
|
static int samplerate = Constants::SAMPLERATE;
|
|
|
|
class AbstractInstrument {
|
|
public:
|
|
virtual void trigger() = 0;
|
|
|
|
// ctl-nr must be 0-3
|
|
// val must be 0-1
|
|
virtual void ctl(unsigned int ctl_nr, float val) = 0;
|
|
|
|
// pos must be either 0,1,2
|
|
virtual void switch_mode1(unsigned int pos) = 0;
|
|
virtual void switch_mode2(unsigned int pos) = 0;
|
|
virtual float nextsample() = 0;
|
|
private:
|
|
};
|
|
} // namespace Instruments
|
|
} // namespace Heck
|
|
|
|
|
|
#endif // HECK_DAISY_PERKONS_INSTR_ABSTRACT
|
|
|