Strange characters in Juce audio plugin demo


#1

Just a minor detail, but when running the Juce audio plugin demo in Live (all latest versions), there are a few strange characters in the timecode display:

Just mentioning as something that might confuse people when running the audio plugin demo.

Edit: this is on Win7 64-bit with the VST version.


#2

That is really bizarre… Thanks, I’ll take a look.


#3

Yeah, no biggie… Something to do with this line I guess:

return String::formatted ("%s%02d:%02d:%02d.%03d",
                              seconds < 0 ? "-" : "",
                              millisecs / 360000,
                              (millisecs / 60000) % 60,
                              (millisecs / 1000) % 60,
                              millisecs % 1000);

Probably something special with the empty char array literal for the first format specifier.


#4

While we’re at it, another detail with the audio plugin demo:
The transport display line (that also includes the Juce version number) sometimes does not appear at all. Most probably because there is a check if the last position changed, and the first time the info is just the default, and remains the default if the process call is not made. So nothing gets printed there at times.

void JuceDemoPluginAudioProcessorEditor::updateTimecodeDisplay (AudioPlayHead::CurrentPositionInfo pos)
{
    if (lastDisplayedPosition != pos)
    {
        lastDisplayedPosition = pos;

        ...more code...

        timecodeDisplayLabel.setText (displayText.toString(), dontSendNotification);
    }
}

Happens like this (for example in Live or Cubase):

  • add plugin to track
  • hit play (and see transport info change)
  • rewind to start of song (usually double-clicking stop button)
  • close editor
  • re-open editor --> juce info + transport info line not shown

Again, no important issue, just a detail…