Howdy, I’m working through the “create midi data” tutorial, here: JUCE: Tutorial: Create MIDI data
After it says to " Add some members to our MainContentComponent
class", it also says " We need to initialise the sampleRate
and previousSampleNumber
members in our MainContentComponent
constructor" and shows
MainContentComponent()
: startTime (Time::getMillisecondCounterHiRes() * 0.001)
{
//…
I’m confused by that second part. Are they not already initialized when the object is created, since they are given values in their declaration? What would I do to initialize them in the constructor? Just set them to those same values?
I noticed that the second header file included with the tutorial (the one that’s supposed to be completed) doesn’t have anything added to the constructor except for “startTimer(1);”, which is discussed later in the tutorial it looks like.
I’m guessing I’m missing something obvious, admittedly I’m not very familiar with C++ yet. (I know some Java, and am basically learning C++ as I learn JUCE.) Could someone point out what it is I don’t understand? (Feel free to link me to any sources/materials if that’s easier.)
Thanks for any help!