forked from NaiJi/project-kyoku
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
557 B
C++
23 lines
557 B
C++
#include "classicnote.h"
|
|
|
|
ClassicNote::ClassicNote(const std::vector<microsec>& intervals, microsec perfect_offset, Action action) :
|
|
Note(perfect_offset),
|
|
_evaluator(intervals, _perfect_offset),
|
|
_action(action)
|
|
{}
|
|
|
|
bool ClassicNote::isActive(microsec music_offset) const
|
|
{
|
|
return _evaluator.isActive(music_offset);
|
|
}
|
|
|
|
ClassicNote::GRADE ClassicNote::input(ClassicInputType&& input_data)
|
|
{
|
|
if (input_data == _action)
|
|
{
|
|
return _evaluator.calculatePrecision(input_data.timestamp());
|
|
}
|
|
|
|
return ClassicNote::GRADE::BAD;
|
|
}
|