Beispiel #1
0
        private void DetermineAnswer(int chromaticChange)
        {
            Tone tone = ToneGraph.GetBasicToneByIndex(Convert.ToInt32(this.ToneClicked.Value));
            Tone toneWithChromaticChange = ToneGraph.GetToneByReferenceToneAndChromaticChange(tone, chromaticChange);

            if (toneWithChromaticChange.Name.Equals(this.ActualInterval.Tone2.Name))
            {
                this.SetQuestionAsAnswered();
            }
        }
Beispiel #2
0
        private void DetermineAnswer(int chromaticChange)
        {
            int actualNoteIndex = Convert.ToInt32(this.ActualNoteIndex.Value);

            Tone toneAux     = ToneGraph.GetBasicToneByIndex(Convert.ToInt32(this.ToneClicked.Value));
            Tone toneClicked = ToneGraph.GetToneByReferenceToneAndChromaticChange(toneAux, chromaticChange);

            Tone nextTone = this.GetNextToneToDisplay();

            if (toneClicked.Name.Equals(nextTone.Name))
            {
                this.DisplayNextNote();
            }
        }
Beispiel #3
0
        private Tone GenerateStartingTone(GeneralInterval itv)
        {
            int  randomNumber = this.RandomNumber(0, 14 - (itv.numeral - 1));
            Tone tone         = ToneGraph.GetBasicToneByIndex(randomNumber);

            int randomNumber2 = this.RandomNumber(-1, 3);

            if (randomNumber2 != 0)
            {
                if (tone.Name != "h")
                {
                    tone = this.GetDerivedToneRelationship(tone, randomNumber2).Tone2;
                }
                else
                {
                    tone = this.GetDerivedToneRelationship(tone, Math.Abs(randomNumber2)).Tone2;
                }
            }

            return(tone);
        }