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

midiOutput.h (561B)


      1 #pragma once
      2 #include <vector>
      3 
      4 #include "synthLib/midiBufferParser.h"
      5 
      6 #include "midiDevice.h"
      7 
      8 namespace synthLib
      9 {
     10 	struct SMidiEvent;
     11 }
     12 
     13 namespace mqConsoleLib
     14 {
     15 class MidiOutput : public MidiDevice
     16 {
     17 public:
     18 	MidiOutput(const std::string& _deviceName);
     19 	~MidiOutput() override;
     20 
     21 	void write(const std::vector<uint8_t>& _data);
     22 	void write(const std::vector<synthLib::SMidiEvent>& _events) const;
     23 
     24 	int getDefaultDeviceId() const override;
     25 
     26 	bool openDevice(int devId) override;
     27 private:
     28 	void* m_stream = nullptr;
     29 	synthLib::MidiBufferParser m_parser;
     30 };
     31 }