예제 #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
}
예제 #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
}
예제 #3
0
{
    if (mainController->isPlayingInNinjamRoom()) {
        Controller::NinjamController *controller = mainController->getNinjamController();
        if (controller)
            controller->voteBpm(newBpm);
    }
}

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void NinjamRoomWindow::updatePeaks()
{
    foreach (NinjamTrackGroupView *view, trackGroups) {
        if (view)
            view->updateGuiElements();
    }
    Audio::AudioPeak metronomePeak = mainController->getTrackPeak(
        Controller::NinjamController::METRONOME_TRACK_ID);

    ninjamPanel->setMetronomePeaks(metronomePeak.getLeftPeak(),
                                   metronomePeak.getRightPeak(),
                                   metronomePeak.getLeftRMS(),
                                   metronomePeak.getRightRMS());
}

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

void NinjamRoomWindow::hideIntervalDownloadingProgressBar(long trackID)
{
    NinjamTrackView *trackView = getTrackViewByID(trackID);
    if (trackView)
        trackView->finishCurrentDownload();
}
예제 #4
0
{
    if (mainController->isPlayingInNinjamRoom()) {
        Controller::NinjamController *controller = mainController->getNinjamController();
        if (controller)
            controller->voteBpm(newBpm);
    }
}

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void NinjamRoomWindow::updatePeaks()
{
    foreach (NinjamTrackGroupView *view, trackGroups) {
        if (view)
            view->updateGuiElements();
    }
    Audio::AudioPeak metronomePeak = mainController->getTrackPeak(
        Controller::NinjamController::METRONOME_TRACK_ID);
    ninjamPanel->setMetronomePeaks(metronomePeak.getLeft(), metronomePeak.getRight());
}

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

void NinjamRoomWindow::hideIntervalDownloadingProgressBar(long trackID)
{
    NinjamTrackView *trackView = getTrackViewByID(trackID);
    if (trackView)
        trackView->finishCurrentDownload();
}

void NinjamRoomWindow::updateIntervalDownloadingProgressBar(long trackID)
{
    NinjamTrackNode *node = dynamic_cast<NinjamTrackNode *>(mainController->getTrackNode(trackID));