AudioProcessorValueStateTree tracking float instead of slider value

I’ve managed to use the AudioProcessorValueStateTree to track slider values from the Editor to Processor, but I can’t work out how to do this for a float value stored in my editors child components.

For example I would use:
(Processor.cpp)

std::make_unique<AudioParameterFloat>("mastergain", "MasterGain", -60.0f, 6.0f, -12.0f)

(Editor.h)

ScopedPointer<AudioProcessorValueTreeState::SliderAttachment> masterGainVal;

(Editor.cpp)

masterGainVal = new AudioProcessorValueTreeState::SliderAttachment(processor.tree, "mastergain", master.gainSlider);

But I want to be able to track a float and for the parameter to update when the float does:

float someValue = 1;