Example #1
0
void BaseTrackView::updateGuiElements(){
    if(!mainController){
        return;
    }
    Audio::AudioPeak peak = mainController->getTrackPeak(getTrackID());
    if(peak.getMax() > maxPeak.getMax()){
        maxPeak.update(peak);
        double db = 20 * std::log10(maxPeak.getMax());
        ui->peaksDbLabel->setText(QString::number(db, 'f', 0));
    }
    //update the track peaks
    setPeaks( peak.getLeft(), peak.getRight());

    //update the track processors. At moment the VST plugins gui are updated. Some plugins need this to run your animations (see Ez Drummer, for example);
    mainController->getTrackNode(getTrackID())->updateProcessorsGui();//call idle in VST plugins
}
Example #2
0
void BaseTrackView::updateGuiElements()
{
    if (!mainController)
        return;

    Audio::AudioPeak peak = mainController->getTrackPeak(getTrackID());
    if (peak.getMax() > maxPeak.getMax()) {
        maxPeak.update(peak);
        double db = Utils::linearToDb(maxPeak.getMax());
        peaksDbLabel->setText(QString::number(db, 'f', 0));
    }
    // update the track peaks
    setPeaks(peak.getLeft(), peak.getRight());

    // update the track processors. In this moment the VST plugins GUI are updated. Some plugins need this to run your animations (see Ez Drummer, for example);
    Audio::AudioNode *trackNode = mainController->getTrackNode(getTrackID());
    if (trackNode)
        trackNode->updateProcessorsGui();  // call idle in VST plugins
}