activeAt method
Notes whose moment (or range) is at position within tolerance.
Implementation
List<UMediaNote> activeAt(Duration position, {Duration tolerance = const Duration(seconds: 3)}) => _notes.where((UMediaNote note) {
if (note.isRange) return position >= note.position && position <= note.end!;
final Duration delta = position - note.position;
return delta >= Duration.zero && delta <= tolerance;
}).toList();