Access GUI text editor from within PluginProcessor.cpp


#1

Hi guys

I have 4 standard files as created by the introducer, i haven’t changed anything, the files are
PluginProcessor.cpp
PluginProcessor.h
PluginEditor.cpp
PluginEditor.h

In the PluginEditor i have created a simple textEditor object using the IntroJucer.

How can i access this text editor from the PluginProcessor.cpp within the processBlock function.

Basically i want to take midi messages and display them in this text editor using the setText function of the textEditor object

Thanks


#2

Try this for a start: http://www.rawmaterialsoftware.com/viewtopic.php?f=8&t=10531


#3

Thanks Andrew, will have a read


#4

Hi Andrew that link you sent me has alot of Jargon above my pay grade. I just want to access the PluginEditor class from the PluginProcessor class and set the textEditor object to maybe for a start say “Hello from PluginProcessor”…i have tried creating an object of the PluginEditor class and then accessing the textEditor object and using setText but for some reason that doesnt work, the only way to set the text is from within PluginEditor constructor


#5

Yep - some of it does my head in too :wink:

Concentrate on option 1 “use a timerCallback in the AudioProcessorEditor to periodically check the AudioProcessor”. Juce’s audio demo plugin (found in the extras folder) uses this technique and is a good place to start.


#6

Thanks Andrew

You are the man im implementing the solution from the example folder, thanks again. Will let you know how it went


#7

Is the timerCallback and sliderValueChanged Juce methods that juce calls? Im just tryna understand how it is that they work


#8

If you look at PluginEditor.h you’ll see that JuceDemoPluginAudioProcessorEditor inherits from SliderListener and Timer. Read through the linked documentation and examine the demo code and it should all start to make sense.


#9

Got it working. Thanks for all the assistance Andrew. Big things have small beginnings. Is this how you are doing ur GUI updates or did you find a better method than this?


#10

Good news! …and yes, I’m still using the timerCallback method for now.