Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Plugins/EvntTrigAvg/EvntTrigAvg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void EvntTrigAvg::handleEvent(const EventChannel* eventInfo, const MidiMessage&
else if (eventInfo->getChannelType() == EventChannel::TTL && eventInfo == eventChannelArray[triggerEvent])
{// if TTL from right channel
TTLEventPtr ttl = TTLEvent::deserializeFromMessage(event, eventInfo);
if (ttl->getChannel() == triggerChannel)
if (ttl->getChannel() == triggerChannel && ttl->getState())
ttlTimestampBuffer.push_back(Event::getTimestamp(event)); // add timestamp of TTL to buffer
}
}
Expand Down Expand Up @@ -290,7 +290,7 @@ AudioProcessorEditor* EvntTrigAvg::createEditor()

float EvntTrigAvg::getSampleRate()
{
return juce::AudioProcessor::getSampleRate();
return CoreServices::getGlobalSampleRate();
}

int EvntTrigAvg::getLastTTLCalculated()
Expand Down
4 changes: 2 additions & 2 deletions Source/Plugins/EvntTrigAvg/EvntTrigAvgCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ void EvntTrigAvgDisplay::paint(Graphics &g)
GraphUnit* graph;
ScopedLock myScopedLock(*processor->getMutex());
if(histoData[i][1]==0){ // if sortedId == 0
graph = new GraphUnit(processor,canvas,channelColours[(histoData[i][0]+sizeof(channelColours))%(sizeof(channelColours))],labels[histoData[i][0]],&minMaxMean[i][2],&histoData[i][2]); // pass &histoData[i][2] instead of 3 to pass on how many bins are used
graph = new GraphUnit(processor,canvas,channelColours[(histoData[i][0])%16],labels[histoData[i][0]],&minMaxMean[i][2],&histoData[i][2]); // pass &histoData[i][2] instead of 3 to pass on how many bins are used
}
else{
graph = new GraphUnit(processor,canvas,channelColours[(histoData[i][0]+sizeof(channelColours))%(sizeof(channelColours))],"ID "+String(histoData[i][1]),&minMaxMean[i][2],&histoData[i][2]);
graph = new GraphUnit(processor,canvas,channelColours[(histoData[i][0])%16],"ID "+String(histoData[i][1]),&minMaxMean[i][2],&histoData[i][2]);
}
graphs.push_back(graph);
graph->setBounds(0, 40*(graphCount), width-20, 40);
Expand Down