Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameter remote control in Bitwig by using name as parameter ID #346

Merged
merged 1 commit into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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