..
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#ifndef MIDIINPUT
|
||||
#define MIDIINPUT
|
||||
|
||||
#include <rtmidi/RtMidi.h>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
class MidiInput{
|
||||
|
||||
|
||||
public:
|
||||
void list_ports();
|
||||
void open_port(unsigned int port);
|
||||
void read_message();
|
||||
|
||||
private:
|
||||
RtMidiIn midiIn;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -17,6 +17,7 @@ class Synth {
|
||||
amplitude = 0.5;
|
||||
sample_rate = 48000;
|
||||
phase = 0.0;
|
||||
current_note = 0;
|
||||
};
|
||||
|
||||
double generate();
|
||||
@@ -43,6 +44,7 @@ class Synth {
|
||||
double phase;
|
||||
|
||||
uint32_t sample_rate;
|
||||
uint8_t current_note;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user