адаптация s13bby/osc под vst и gui. (вайбкод)
вайбкод потому что мне в моменте стало понятно. что проще было сразу писать на фреймворке JUCE, чем адаптировать консольное приложение на MiniAudio. обновляться данный репозиторий не будет. СmakeLists адаптирован онли под linux.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#ifndef MIDIINPUT
|
||||
#define MIDIINPUT
|
||||
|
||||
#include <rtmidi/RtMidi.h>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <cstring>
|
||||
#include <array>
|
||||
|
||||
#include "../include/synth.hpp"
|
||||
|
||||
class MidiInput{
|
||||
|
||||
|
||||
public:
|
||||
MidiInput(Synth& synth, Synth& synth2) : synths{&synth, &synth2} {
|
||||
pitch = 8192;
|
||||
mod_wheel = 0;
|
||||
}
|
||||
|
||||
void list_ports();
|
||||
void open_port(unsigned int port);
|
||||
void read_message();
|
||||
|
||||
private:
|
||||
RtMidiIn midiIn;
|
||||
std::array<Synth*, 2> synths;
|
||||
|
||||
uint16_t pitch;
|
||||
uint8_t mod_wheel;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user