[Solved] How to "printf" on to plug-in

Hi People,

I am desinging my first plug-in from the audio-plugin-demo. It is a pitch estimator, which I plan to become a guitar string classifier, for which I have designed an algorithm, recently.

The object oriented part is very new to me. But my pitch-estimator builds and I can print the pitch with printf() in the XCode console.

Can you please tell me what I should do to print my "float PitchEstimate" on to the plugin using the editor??

Here is the project: https://bitbucket.org/junilyd/pitch_estimator_plug-in/src/0d42579e7f97097f03f0deaff621440620e1775e?at=master

Thank You!!

Jacob

You could use the Label component and the Label::setText() function to display text. I don't think you would use printf like you would with a console. 

You can just use printf! If you're running inside a debugger or console then you will see the output.

Thank you, guys!

I am trying to print my final floating point result, called PitchEstimate, onto the AudioProcessorEditor.

As Jordan Harris suggested, I am trying to do that with Label::setText and I can print a string that way, but how to make it cahnge is the question.

I follow a similar procedure, as if I made a listener with a slider (as in the tutorial).  (I have never tried this before)

 

How can I listen to the float value change? 

or should use a timer or something?

 

Yeah a timer would work. Either that or make your own listener function that gets called when the values change. I would probably just set it up in timerCallback()..

My graphical output is now working!

I managed to implement the timerCallback() solution, by lookin in the audiodemoPluginProcessorEditor*