Skip to content

Commit

Permalink
Fix parameter remote control in Bitwig by using name as parameter ID
Browse files Browse the repository at this point in the history
  • Loading branch information
skylark committed Apr 17, 2022
1 parent 1df9a58 commit 9bcdec3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Source/PluginParam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ float CtrlFloat::getValueHost() {
}

void CtrlFloat::setValueHost(float v) {
TRACE("float set idx=%d v=%f", idx, v);
*vPointer = v;
}

Expand Down Expand Up @@ -364,7 +365,7 @@ void CtrlDX::setValueHost(float f) {
}

void CtrlDX::setValue(int v) {
TRACE("setting value %d %d", dxOffset, v);
TRACE("setting value idx=%d dxOffset=%d v=%d", idx, dxOffset, v);
dxValue = v;
if (dxOffset >= 0) {
if (parent != NULL)
Expand Down Expand Up @@ -628,7 +629,7 @@ void DexedAudioProcessor::setDxValue(int offset, int v) {
packOpSwitch();
v = data[155];
} else if ( data[offset] != v ) {
TRACE("setting dx %d %d", offset, v);
TRACE("setting dx offset=%d v=%d", offset, v);
data[offset] = v;
} else {
TRACE("ignoring dx7 same values %d %d", offset, v);
Expand Down Expand Up @@ -670,6 +671,7 @@ float DexedAudioProcessor::getParameter(int index) {
}

void DexedAudioProcessor::setParameter(int index, float newValue) {
TRACE("setParameter index=%d newValue=%f", index, newValue);
forceRefreshUI = true;
ctrl[index]->setValueHost(newValue);
}
Expand Down Expand Up @@ -726,6 +728,10 @@ const String DexedAudioProcessor::getParameterText(int index) {
return ctrl[index]->getValueDisplay();
}

String DexedAudioProcessor::getParameterID(int index) {
return getParameterName(index);
}

void DexedAudioProcessor::loadPreference() {
File propFile = DexedAudioProcessor::dexedAppDir.getChildFile("Dexed.xml");
PropertiesFile::Options prefOptions;
Expand Down
1 change: 1 addition & 0 deletions Source/PluginProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ public :
void setParameter (int index, float newValue);
const String getParameterName (int index);
const String getParameterText (int index);
String getParameterID (int index) override;

const String getInputChannelName (int channelIndex) const;
const String getOutputChannelName (int channelIndex) const;
Expand Down

0 comments on commit 9bcdec3

Please sign in to comment.