eurorack/midi2cv/part.h

70 lines
1.3 KiB
C
Raw Normal View History

2019-10-04 07:29:45 +00:00
#ifndef MIDI2CV_PART_H
#define MIDI2CV_PART_H
enum MIDIThruMode { OFF,
ON,
POLYCHAIN };
enum BiOutputType {
BI_OFF = 0,
BI_PITCH_UNI,
BI_PITCH_BI,
BI_SAWTOOTH,
BI_SQUARE,
BI_SINE,
BI_TRIANGLE
2019-10-04 07:29:45 +00:00
};
enum UniOutputType {
UNI_OFF = 0,
UNI_PITCH,
UNI_VELOCITY,
UNI_MODULATION,
UNI_AFTERTOUCH,
UNI_BREATH,
UNI_EXP,
UNI_GATE
2019-10-04 07:29:45 +00:00
};
enum GateOutputType {
GATE_OFF = 0,
GATE_GATE,
GATE_TRIGGER
2019-10-04 07:29:45 +00:00
};
class Part {
public:
Part()
: poly_voice_count(1)
, output_column_count(1)
2019-10-04 07:29:45 +00:00
, midi_filter_channel_enabled(true)
, midi_filter_channel(1)
, midi_filter_lowest_note(0)
, midi_filter_highest_note(127)
2019-10-04 07:29:45 +00:00
, midi_thru_mode(OFF)
{
for (int i = 0; i < 4; i++) {
output_type_row_0[i] = BI_OFF;
output_type_row_1[i] = UNI_OFF;
output_type_row_2[i] = UNI_OFF;
output_type_row_3[i] = GATE_OFF;
}
2019-10-04 07:29:45 +00:00
}
void ProcessMidiInput(/* TODO: Inputs */);
private:
uint8_t poly_voice_count;
uint8_t output_column_count;
2019-10-04 07:29:45 +00:00
bool midi_filter_channel_enabled;
uint8_t midi_filter_channel;
uint8_t midi_filter_lowest_note;
uint8_t midi_filter_highest_note;
2019-10-04 07:29:45 +00:00
MIDIThruMode midi_thru_mode;
BiOutputType output_type_row_0[4];
UniOutputType output_type_row_1[4];
UniOutputType output_type_row_2[4];
GateOutputType output_type_row_3[4];
2019-10-04 07:29:45 +00:00
};
#endif