public void GetHashCodeTest()
        {
            TwoOctaveNoteArray notesMatchOne =
                new TwoOctaveNoteArray();
            TwoOctaveNoteArray notesMatchTwo =
                new TwoOctaveNoteArray();
            TwoOctaveNoteArray notesNonMatch =
                new TwoOctaveNoteArray();

            notesMatchOne[3] = true;
            notesMatchOne[5] = true;
            notesMatchOne[7] = true;

            notesMatchTwo[3] = true;
            notesMatchTwo[5] = true;
            notesMatchTwo[7] = true;

            notesNonMatch[3] = true;
            notesNonMatch[5] = true;
            notesNonMatch[7] = true;
            notesNonMatch[9] = true;

            Assert.AreEqual(notesMatchOne.GetHashCode(),
                notesMatchTwo.GetHashCode());
            Assert.AreNotEqual(notesMatchOne.GetHashCode(),
                notesNonMatch.GetHashCode());
            Assert.AreNotEqual(notesMatchTwo.GetHashCode(),
                notesNonMatch.GetHashCode());
        }
 public ChordNode(string chordName, TwoOctaveNoteArray notes)
     : base("Chord/" + notes)
 {
     //ChordName = chordName;
     //Notes = notes;
     Chord = new Chord(chordName, notes);
 }
        public void EqualsTest()
        {
            TwoOctaveNoteArray notesMatchOne =
                new TwoOctaveNoteArray();
            TwoOctaveNoteArray notesMatchTwo =
                new TwoOctaveNoteArray();
            TwoOctaveNoteArray notesNonMatch =
                new TwoOctaveNoteArray();

            notesMatchOne[3] = true;
            notesMatchOne[5] = true;
            notesMatchOne[7] = true;

            notesMatchTwo[3] = true;
            notesMatchTwo[5] = true;
            notesMatchTwo[7] = true;

            notesNonMatch[3] = true;
            notesNonMatch[5] = true;
            notesNonMatch[7] = true;
            notesNonMatch[9] = true;

            Assert.AreEqual(notesMatchOne, notesMatchTwo);
            Assert.AreNotEqual(notesMatchOne, notesNonMatch);
            Assert.AreNotEqual(notesMatchTwo, notesNonMatch);
        }
        private void TestSetButton_Click(object sender, RoutedEventArgs e)
        {
            //C,D,E
            TwoOctaveNoteArray cde = new TwoOctaveNoteArray();
            cde[0] = true;
            cde[2] = true;
            cde[4] = true;

            visualKeyboard.Notes = cde;
        }
        private void LoadScale1()
        {
            Scale s = (Scale)cmbScale1.SelectedItem;
            Note r = (Note)cmbRoot1.SelectedItem;

            if (s != null && r != null)
            {
                TwoOctaveNoteArray arr = new TwoOctaveNoteArray();

                foreach (int i in s.PatternSig.getSignaturePositionalValues())
                {
                    arr[r.PosVal + i] = true;
                }

                keyboard1.Notes = arr;
            }
        }