Unsure How to Call Editor Component Method Inside Processor

So I’ve instantiated a waveform viewer class inside my editor which, for obvious reasons is necessary to paint and place the object in the editor. The class itself also has functions which require access to the processor’s buffer so that it can display the correct waveform in the buffer to the editor. I’m just wondering how you would go about this? I’ll post some code for reference.


class Ring_modulatorAudioProcessorEditor  : public AudioProcessorEditor, public Slider::Listener, public ComboBox::Listener
     Ring_modulatorAudioProcessorEditor (Ring_modulatorAudioProcessor&);
     void paint (Graphics& g) override;
     void resized() override;
     void sliderValueChanged (Slider* slider) override;
 void comboBoxChanged(juce::ComboBox* comboBox) override;
 Component* getComponent() { return this; };
 std::unique_ptr<KrotosWaveformViewer> m_waveformViewer; //instantiated waveViewer class as pointer     


 void Ring_modulatorAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
     const int totalNumOutputChannels = buffer.getNumChannels();

             for (int sampleNum = 0; sampleNum < buffer.getNumSamples(); ++sampleNum)
                 for (int channel = 0; channel < totalNumOutputChannels; ++channel)


void WaveformViewer::updateWaveformThumbnail(juce::AudioSampleBuffer& monoAudioBuffer)
     m_waveformThumbnail->reset(1, m_wavReader->sampleRate, monoAudioBuffer.getNumSamples());
     m_waveformThumbnail->addBlock(0, monoAudioBuffer, 0, monoAudioBuffer.getNumSamples());
     m_currentBuffer = monoAudioBuffer;