Exemple #1
0
        private void TunerActivity_OnMicrophoneFinishedSampling(object sender, FinishedSampalingEventArgs e)
        {
            //Display volume level.
            //_volumeBar.Progress = (int)e.Volume;

            //Get closest note and closness as an angle.
            Tuner.NoteDifference noteDiff = tuner.NoteFrequencyFilter(e.Frequency);

            RunOnUiThread(new Action(() =>
            {
                if (noteDiff.ClosnessByPercentage_Base90 > -1 && noteDiff.ClosnessByPercentage_Base90 < 1)
                {
                    _closestNote.SetTextColor(Color.DarkBlue);
                }
                else
                {
                    _closestNote.SetTextColor(Color.DarkRed);
                }

                _txtFrequency.Text = e.Frequency.ToString();
                //Set note text.
                _closestNote.Text = noteDiff.ClosestNote;
                //Set dial angle.
                _frequencyIndicator.Rotation = noteDiff.ClosnessByPercentage_Base90;
            }
                                     ));
        }
        private void RecorderActivity_OnMicrophoneFinishedSampling(object sender, FinishedSampalingEventArgs e)
        {
            //Get closest note.
            Note closestNote = _recorder.FindClosestNote(e.Frequency);//it's constantly recording, how will it know that there's a legit note detected?

            RunOnUiThread(new Action(() =>
            {
                //_txtFrequency.Text = e.Frequency.ToString();
                //Set note text.
                //_closestNote.Text = closestNote.Name;

                _recorder.SpotAnimateAllPositionsOfANote(closestNote);
            }
                                     ));
        }
        private void TunerActivity_OnMicrophoneFinishedSampling(object sender, FinishedSampalingEventArgs e)
        {
            //Display volume level.
            //_volumeBar.Progress = (int)e.Volume;

            //Get closest note and closness as an angle.
            Tuner.NoteDifference noteDiff = tuner.NoteFrequencyFilter(e.Frequency);

            RunOnUiThread(new Action(() =>
            {
                if (noteDiff.ClosnessByPercentage_Base90 > -1 && noteDiff.ClosnessByPercentage_Base90 < 1)
                    _closestNote.SetTextColor(Color.DarkBlue);
                else
                    _closestNote.SetTextColor(Color.DarkRed);

                _txtFrequency.Text = e.Frequency.ToString();
                //Set note text.
                _closestNote.Text = noteDiff.ClosestNote;
                //Set dial angle.
                _frequencyIndicator.Rotation = noteDiff.ClosnessByPercentage_Base90;
            }
            ));
        }
 private void OnMicrophoneFinishedSamplingEvent(object sender, FinishedSampalingEventArgs e)
 {
     OnMicrophoneFinishedSampling(sender, e);
 }
Exemple #5
0
 private void PlayerActivity_OnMicrophoneFinishedSampling(object sender, FinishedSampalingEventArgs e)
 {
     _player.CurrentlyPlayedFrequency = e.Frequency;
 }
        private void RecorderActivity_OnMicrophoneFinishedSampling(object sender, FinishedSampalingEventArgs e)
        {
            //Get closest note.
            Note closestNote = _recorder.FindClosestNote(e.Frequency);//it's constantly recording, how will it know that there's a legit note detected?

            RunOnUiThread(new Action(() =>
                {
                    //_txtFrequency.Text = e.Frequency.ToString();
                    //Set note text.
                    //_closestNote.Text = closestNote.Name;

                    _recorder.SpotAnimateAllPositionsOfANote(closestNote);
                }
            ));
        }
 private void PlayerActivity_OnMicrophoneFinishedSampling(object sender, FinishedSampalingEventArgs e)
 {
     _player.CurrentlyPlayedFrequency = e.Frequency;
 }
 private void OnMicrophoneFinishedSamplingEvent(object sender, FinishedSampalingEventArgs e)
 {
     OnMicrophoneFinishedSampling(sender, e);
 }