Browse Source

Change trigger inputs to follow Rack voltage standards

Certain modules didn't follow VCV's recommended voltage standards for
detecting triggers Changed them to follow them.

Standards: https://vcvrack.com/manual/VoltageStandards#Triggers-and-Gates
pull/45/head
Vijay Marupudi 1 year ago
parent
commit
1026981797
3 changed files with 4 additions and 4 deletions
  1. +2
    -2
      src/Kickall.cpp
  2. +1
    -1
      src/Muxlicer.cpp
  3. +1
    -1
      src/Rampage.cpp

+ 2
- 2
src/Kickall.cpp View File

@@ -81,7 +81,7 @@ struct Kickall : Module {
void process(const ProcessArgs& args) override {
// TODO: check values
const bool risingEdgeGate = gateTrigger.process(inputs[TRIGG_INPUT].getVoltage() / 2.0f);
const bool risingEdgeGate = gateTrigger.process(inputs[TRIGG_INPUT].getVoltage() / 2.0f, 0.1, 2.0);
const bool buttonTriggered = buttonTrigger.process(params[TRIGG_BUTTON_PARAM].getValue());
// can be triggered by either rising edge on trigger in, or a button press
if (risingEdgeGate || buttonTriggered) {
@@ -156,4 +156,4 @@ struct KickallWidget : ModuleWidget {
};
Model* modelKickall = createModel<Kickall, KickallWidget>("Kickall");
Model* modelKickall = createModel<Kickall, KickallWidget>("Kickall");

+ 1
- 1
src/Muxlicer.cpp View File

@@ -1120,7 +1120,7 @@ struct Mex : Module {
// gate in will convert non-gate signals to gates (via schmitt trigger)
// if input is present
if (inputs[GATE_IN_INPUT].isConnected()) {
gateInTrigger.process(inputs[GATE_IN_INPUT].getVoltage());
gateInTrigger.process(inputs[GATE_IN_INPUT].getVoltage(), 0.1, 2.0);
gate = gateInTrigger.isHigh();
}
// otherwise the main Muxlicer output clock (including divisions/multiplications)


+ 1
- 1
src/Rampage.cpp View File

@@ -220,7 +220,7 @@ struct Rampage : Module {
for (int c = 0; c < channels[part]; c += 4) {

// process SchmittTriggers
float_4 trig_mask = trigger_4[part][c / 4].process(in_trig[c / 4] / 2.0);
float_4 trig_mask = trigger_4[part][c / 4].process(in_trig[c / 4] / 2.0, 0.1, 2.0);
gate[part][c / 4] = ifelse(trig_mask, float_4::mask(), gate[part][c / 4]);
in[c / 4] = ifelse(gate[part][c / 4], 10.0f, in[c / 4]);



Loading…
Cancel
Save