gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

device.h (1221B)


      1 #pragma once
      2 
      3 #include "microq.h"
      4 #include "mqstate.h"
      5 #include "mqsysexremotecontrol.h"
      6 
      7 #include "wLib/wDevice.h"
      8 
      9 namespace dsp56k
     10 {
     11 	class EsaiClock;
     12 }
     13 
     14 namespace mqLib
     15 {
     16 	class Device : public wLib::Device
     17 	{
     18 	public:
     19 		Device(const synthLib::DeviceCreateParams& _params);
     20 		~Device() override;
     21 		uint32_t getInternalLatencyMidiToOutput() const override;
     22 		uint32_t getInternalLatencyInputToOutput() const override;
     23 		float getSamplerate() const override;
     24 		bool isValid() const override;
     25 		bool getState(std::vector<uint8_t>& _state, synthLib::StateType _type) override;
     26 		bool setState(const std::vector<uint8_t>& _state, synthLib::StateType _type) override;
     27 		uint32_t getChannelCountIn() override;
     28 		uint32_t getChannelCountOut() override;
     29 
     30 	protected:
     31 		void readMidiOut(std::vector<synthLib::SMidiEvent>& _midiOut) override;
     32 		void processAudio(const synthLib::TAudioInputs& _inputs, const synthLib::TAudioOutputs& _outputs, size_t _samples) override;
     33 		bool sendMidi(const synthLib::SMidiEvent& _ev, std::vector<synthLib::SMidiEvent>& _response) override;
     34 
     35 		dsp56k::EsxiClock* getDspEsxiClock() const override;
     36 
     37 	private:
     38 		MicroQ						m_mq;
     39 		State						m_state;
     40 		SysexRemoteControl			m_sysexRemote;
     41 	};
     42 }