void MantaAudioUnitController::updateButtonColor(int index) { if (buttonMap.count(index) == 0) { setButtonLedState(index, Manta::Off); setButtonColor(index, ofColor::white); } else if (buttonMap[index]->toggle) { ofColor synthColor = synths[buttonMap[index]->synthName]->getColor(); if (buttonMap[index]->parameter == buttonMap[index]->min) { setButtonColor(index, ofColor(synthColor, 100)); setButtonLedState(index, Manta::Off); } else { setButtonColor(index, synthColor); setButtonLedState(index, Manta::Red); } } else { ofColor synthColor = synths[buttonMap[index]->synthName]->getColor(); setButtonLedState(index, Manta::Red); setButtonColor(index, synthColor); } }
void MantaController::markAllButtons(bool mark) { setLedManual(true); for (int i=0; i<4; i++) { setButtonLedState(i, mark ? Manta::Red : Manta::Off); } setLedManual(false); }
void MantaController::markButton(int index, bool mark) { setLedManual(true); setButtonLedState(index, mark ? Manta::Red : Manta::Off); setLedManual(false); }
void MantaAudioUnitController::setPadFreezingEnabled(bool toFreezePads) { this->toFreezePads = toFreezePads; setButtonLedState(1, toFreezePads ? Manta::Red : Manta::Off); setButtonColor(1, toFreezePads ? ofColor::blue : ofColor::white); }