private void AnalysePitch(int stereoFrames, int bytesRead)
        {
            var leftPitchResult = leftPitchDetector.DetectPitchDistribution(leftBuffer.FloatBuffer, stereoFrames);
              var rightPitchResult = rightPitchDetector.DetectPitchDistribution(rightBuffer.FloatBuffer, stereoFrames);

              resultWriter.Enqueue(new PitchResultSummary(leftPitchResult, rightPitchResult));
              PitchResults = new StereoPitchResult(leftPitchResult, rightPitchResult, bytesRead);
        }
        public Frame BuildFrameFromPitchResults(StereoPitchResult pitchResults)
        {
            var leftLight = converter.BuildLightFrom(pitchResults.Left);
              var rightLight = converter.BuildLightFrom(pitchResults.Right);

              var lightSection = compositeLightSectionBuilder
            .WithLights(leftLight, rightLight)
            .WithSidePercentageOnDiagonal(diagonalLightPercentage)
            .Build();

              return new Common.Builders.FrameBuilder()
            .AddFrame()
            .WithLightSection(lightSection)
            .WithRepeated(false)
            .WithFrameLength(frameLength)
            .Build()
            .Single();
        }