Plot line markers on audio waveform


#1

Hello,

I'm new to Juce. I want to transform my Audio app written using Qt so far to use Juce instead. Juce seems to be much better for writing an audio app. Anyways, one of the tasks I need to perform is to plot the waveform (in realtime) of audio being captured from a microphone and keep on plotting onsets (detected in realtime). 

Onsets are just time values at which a musical note begins. So basically,  it is just a vector of float values that keeps expanding in realtime.

In the demo app (that comes in Juce examples) I found a lot of the stuff for recording and displaying the waveform. So far, I understand that I can use AudioThumbnail class to plot the waveform.  My question is, how can I plot line markers (lines parallel to y axis) at different time values (x axis) in AudioThumbnail?


#2

Welcome!

It's be easy enough to just draw some lines after you've called AudioThumbnail::drawChannels


#3

Thank you jules... I'll give it a try. I think LiveAudioInputDisplayComp defined in AudioDemoTabComponent.h (in Demos folder of Juce Demo App) is more apt for my needs than AudioThumbnail. Maybe I'll just need to draw lines in LiveAudioInputDisplayComp::paint