paramQueue->getPoint(0...) fails while paramQueue->getPointCount returns 1

VST3 SDK: Parameter Changes Not Propagating to Process Method

Issue Description

I’m developing a VST3 plugin and encountering an issue with parameter handling in the processor part. While the controller-host communication works correctly, I’m unable to retrieve parameter values in the process method despite evidence that changes are being detected.

Specific Problem

The paramQueue->getPoint() method returns false even though paramQueue->getPointCount() returns 1, indicating there should be a value present. This occurs when modifying parameters through a TextEdit UI element I created for frequency control.

Technical Details

  • Host: Ableton Live
  • Implementation: Following standard VST3 SDK tutorial approach for parameter handling
  • UI: Custom TextEdit element for frequency parameter modification

Debug Output

Parameter ID: 102, numPoints: 1
ID 102 REACHED but 'if (paramQueue->getPoint(numPoints - 1, sampleOffset, value))' not entered
Parameter ID: 103, numPoints: 1
ID 103 REACHED but 'if (paramQueue->getPoint(numPoints - 1, sampleOffset, value))' not entered
Parameter ID: 103, numPoints: 1
ID 103 REACHED but 'if (paramQueue->getPoint(numPoints - 1, sampleOffset, value))' not entered

Relevant Code

tresult PLUGIN_API KunradOhmeProcessor::process(Vst::ProcessData& data) {
    if (data.inputParameterChanges) {
        int32 numParamsChanged = data.inputParameterChanges->getParameterCount();
        for (int32 index = 0; index < numParamsChanged; index++) {
            Vst::IParamValueQueue* paramQueue = data.inputParameterChanges->getParameterData(index);
            if (paramQueue) {
                Vst::ParamValue value;
                int32 sampleOffset;
                int32 numPoints = paramQueue->getPointCount();
                
                // Handle frequency parameters
                switch (paramQueue->getParameterId()) {
                    case Params::kFreqChannel1Id:
                        if (paramQueue->getPoint(numPoints - 1, sampleOffset, value)) {
                            // Value processing
                        }
                        break;
                    // Similar handling for kFreqChannel2Id
                }
            }
        }
    }
}

Does anyone have experience with this particular issue or can suggest what might be causing getPoint() to fail despite having a valid point count? Any insights would be greatly appreciated! :slightly_smiling_face:

More details on my code implementation in this conversation I had with ChatGpt 01 about it (spoiler the solution he proposes are not correct parameters ids are well set everywhere):
chatgpt(dot)com/share/677e90ec-e024-800c-8e69-96b7e645d468

The return value of the getPoint() method is not bool, it is tresult. So you need to check for kResultTrue if the method call succeeded.

Arf, thanks a lot, kinda embarassed this was the issue. To be honest I wasn’t suspecting kResultTrue to be 0 under the hood. Is it a conscient design choice? If so, why?
Thanks again, for the answer :slight_smile:

The VST3 API is modeled after the COM API, and this is how errors are handled in COM.

See Error Handling in COM (COM) - Win32 apps | Microsoft Learn

1 Like