MLDial* MLPluginView::addDial(const char * displayName, const MLRect & r, const MLSymbol paramName, const Colour& color) { MLDial* dial = MLAppView::addDial(displayName, r, paramName, color); // setup dial properties based on the filter parameter MLPluginProcessor* const filter = getProcessor(); int idx = filter->getParameterIndex(paramName); if (idx >= 0) { MLPublishedParamPtr p = filter->getParameterPtr(idx); if (p) { dial->setRange(p->getRangeLo(), p->getRangeHi(), p->getInterval(), p->getZeroThresh(), p->getWarpMode()); dial->setDoubleClickReturnValue(true, p->getDefault()); } } else { debug() << "MLPluginView::addDial: parameter " << paramName << " not found!\n"; } return dial; }