Example #1
0
        public void Start(DetectionAlgorithm algorithm)
        {
            if (algorithm == DetectionAlgorithm.AUTOCORRELATION)
            {
                ptracker = new PitchTracker();
                ptracker.PitchDetected += ptracker_PitchDetected;
                ptracker.SampleRate     = _microphone.SampleRate;
            }
            else if (algorithm == DetectionAlgorithm.YIN)
            {
                yin = new Yin(_microphone.SampleRate, _bufferSize / 4);
            }

            _microphone.Start();
        }
Example #2
0
 public void Stop()
 {
     ptracker.PitchDetected-=ptracker_PitchDetected;
     yin = null;
     _microphone.Stop();
 }
Example #3
0
        public void Start(DetectionAlgorithm algorithm)
        {
            if (algorithm == DetectionAlgorithm.AUTOCORRELATION)
            {
                ptracker = new PitchTracker();
                ptracker.PitchDetected += ptracker_PitchDetected;
                ptracker.SampleRate = _microphone.SampleRate;
            }
            else if (algorithm == DetectionAlgorithm.YIN)
            {
                yin = new Yin(_microphone.SampleRate, _bufferSize/4);
            }

            _microphone.Start();
        }
Example #4
0
 public void Stop()
 {
     ptracker.PitchDetected -= ptracker_PitchDetected;
     yin = null;
     _microphone.Stop();
 }