2021-06-07 14:19:58 -04:00
|
|
|
#include "classicnote.h"
|
|
|
|
|
2021-06-08 14:32:36 -04:00
|
|
|
ClassicNote::ClassicNote(const std::vector<microsec>& intervals, microsec perfect_offset, Action action) :
|
2021-06-07 14:19:58 -04:00
|
|
|
Note(perfect_offset),
|
2021-06-08 14:32:36 -04:00
|
|
|
_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)
|
2021-06-07 14:19:58 -04:00
|
|
|
{
|
2021-06-08 14:32:36 -04:00
|
|
|
if (input_data == _action)
|
|
|
|
{
|
|
|
|
return _evaluator.calculatePrecision(input_data.timestamp());
|
|
|
|
}
|
2021-06-07 14:19:58 -04:00
|
|
|
|
2021-06-08 14:32:36 -04:00
|
|
|
return ClassicNote::GRADE::BAD;
|
2021-06-07 14:19:58 -04:00
|
|
|
}
|