Skip to content

Commit

Permalink
Allow events through after switching gate line off
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Jun 16, 2023
1 parent 86b6c55 commit 7e62423
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Plugins/ArduinoOutput/ArduinoOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ void ArduinoOutput::process (AudioBuffer<float>& buffer)
}


void ArduinoOutput::parameterValueChanged(Parameter* parameter)
{
if (parameter->getName() == "gate_line")
{
if (int(parameter->getValue()) == 0)
gateIsOpen = true;
else
gateIsOpen = false;
}
}

void ArduinoOutput::handleTTLEvent(TTLEventPtr event)
{

Expand Down
3 changes: 3 additions & 0 deletions Plugins/ArduinoOutput/ArduinoOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class ArduinoOutput : public GenericProcessor
/** Searches for events and triggers the Arduino output when appropriate. */
void process (AudioBuffer<float>& buffer) override;

/** Handle changes to gate line. */
void parameterValueChanged(Parameter* parameter) override;

/** Convenient interface for responding to incoming events. */
void handleTTLEvent (TTLEventPtr event) override;

Expand Down

0 comments on commit 7e62423

Please sign in to comment.