Beispiel #1
0
void LfpDisplayCanvas::update()
{
    nChans = jmax(processor->getNumInputs(),1);
    sampleRate = processor->getSampleRate();

    if (nChans != lfpDisplay->getNumChannels())
    {
    	std::cout << "Setting num inputs on LfpDisplayCanvas to " << nChans << std::endl;

    	refreshScreenBuffer();

    	lfpDisplay->setNumChannels(nChans);

   	 	// update channel names
   	 	for (int i = 0; i < processor->getNumInputs(); i++)
    	{

	        String chName = processor->channels[i]->getName();

	        //std::cout << chName << std::endl;

	        lfpDisplay->channelInfo[i]->setName(chName);
	        lfpDisplay->enableChannel(isChannelEnabled[i], i);

    	}

    	lfpDisplay->setBounds(0,0,getWidth()-scrollBarThickness*2, lfpDisplay->getTotalHeight());

    	resized();
    }

    

}
Beispiel #2
0
void LfpDisplayCanvas::setParameter(int param, float val)
{
    if (param == 0) {
        timebase = val;
        refreshScreenBuffer();
    } else {
        displayGain = val * 0.0001f;
    }

    repaint();

}
Beispiel #3
0
void LfpDisplayCanvas::update()
{
    nChans = processor->getNumInputs();
    sampleRate = processor->getSampleRate();

    std::cout << "Setting num inputs on LfpDisplayCanvas to " << nChans << std::endl;

    refreshScreenBuffer();

    repaint();

    totalHeight = nChans*(interplotDistance) + plotHeight/2 + headerHeight;//(plotHeight+yBuffer)*nChans + yBuffer + headerHeight;
}
Beispiel #4
0
void LfpDisplayCanvas::canvasWasResized()
{
    //std::cout << "Resized!" << std::endl;
    refreshScreenBuffer();
}