26const uint8_t gatePort[] = {2, 2, 2, 4};
27const uint8_t gatePin[] = {7, 8, 9, 0};
59 void sendNote(
bool on, uint8_t channel, int16_t note = -32768);
60 void setGateType(uint8_t whichGate, GateType value);
61 void setCVVoltsPerOctave(uint8_t channel, uint8_t value);
62 void setCVTranspose(uint8_t channel, int32_t semitones, int32_t cents);
63 void setCVPitchBend(uint8_t channel, int32_t value,
bool outputToo =
true);
64 int32_t calculateVoltage(int32_t note, uint8_t channel);
65 void physicallySwitchGate(int32_t channel);
74 void updateRunOutput();
75 bool isTriggerClockOutputEnabled();
82 bool isAnythingButRunPending()
const {
return isGatePending() || isClockPending(); }
83 bool isAnythingPending()
const {
return isGatePending() || isClockPending() || isRunPending(); }
86 CVChannel cvChannels[NUM_PHYSICAL_CV_CHANNELS];
88 uint8_t minGateOffTime;
95 uint32_t mostRecentSwitchOffTimeOfPendingNoteOn;
97 void sendVoltageOut(uint8_t channel, uint16_t voltage);
99 inline bool isNoteOn(int32_t channel, int32_t note) {
100 return (gateChannels[channel].on && cvChannels[channel].noteCurrentlyPlaying == note);
104 void recalculateCVChannelVoltage(uint8_t channel);
105 void switchGateOff(int32_t channel);
106 void switchGateOn(int32_t channel, int32_t doInstantlyIfPossible =
false);