public void AddPlayed(TimedBeatId beat, IMatchResultsCollector results) { if (!patternBeats.Beats.IsEmpty) { var diff = beat.T - patternBeats.Beats.Next.T; if (Math.Abs(diff) <= settings.MaxMatchingTime) { var match = new BeatsMatch(patternBeats.Beats.RemoveNext(), beat, Accuracy(diff)); results.Match(match); return; } } playedBeats.Add(beat); }
public void AddBeat(ISoundId sound, TimedBeatId beat, Velocity v) { //todo: pass sound information to matcher perInstrumentMatchers[sound.Instrument].AddPlayed(beat, resultsCollector); }
public void Add(TimedBeatId beat) { times.Enqueue(beat); }