Start Part class

This commit is contained in:
Jan-Henrik 2019-10-04 09:29:45 +02:00
parent 911469580c
commit 34554d452d
3 changed files with 55 additions and 0 deletions

View file

@ -4,6 +4,7 @@
#include "drivers/gpio.h"
#include "stmlib/system/system_clock.h"
#include "ui.h"
#include "part.h"
using namespace stmlib;

0
midi2cv/part.cc Normal file
View file

54
midi2cv/part.h Normal file
View file

@ -0,0 +1,54 @@
#ifndef MIDI2CV_PART_H
#define MIDI2CV_PART_H
enum MIDIThruMode { OFF,
ON,
POLYCHAIN };
enum BiOutputMode {
PITCH_UNI,
PITCH_BI,
SAW,
SQUARE,
SINE,
TRI
};
enum UniOutputMode {
PITCH,
VELOCITY,
AFTERTOUCH
};
enum GateOutputMode {
GATE,
TRIGGER
};
class Part {
public:
Part()
: voice_count(1)
, midi_filter_channel_enabled(true)
, midi_filter_channel(1)
, midi_thru_mode(OFF)
, output_mode_0(PITCH_UNI)
, output_mode_1(VELOCITY)
, output_mode_2(AFTERTOUCH)
, output_mode_3(GATE)
{
}
void ProcessMidiInput(/* TODO: Inputs */);
private:
uint8_t voice_count;
bool midi_filter_channel_enabled;
uint8_t midi_filter_channel;
MIDIThruMode midi_thru_mode;
BiOutputMode output_mode_0;
UniOutputMode output_mode_1;
UniOutputMode output_mode_2;
GateOutputMode output_mode_3;
};
#endif