Ejemplo n.º 1
0
 public void TestBaseLengthMustBeEven()
 {
     Assert.ThrowsException <ArgumentException>(() =>
     {
         var note = new PitchNote()
         {
             BaseLength = 3,
         };
     });
 }
Ejemplo n.º 2
0
        public void Accept(PitchNote pitchNote)
        {
            var p = new Note(pitchNote.Pitch.ToString(), (int)pitchNote.Modifier, pitchNote.Octave, (MusicalSymbolDuration)pitchNote.BaseLength, NoteStemDirection.Up, NoteTieType.None, new List <NoteBeamType>()
            {
                NoteBeamType.Single
            });

            p.NumberOfDots = (int)pitchNote.Dotts;
            Symbol         = p;
        }
Ejemplo n.º 3
0
        public void TestLengthWhenDotted()
        {
            var note = new PitchNote()
            {
                BaseLength = 1,
                Dotts      = 0
            };

            Assert.AreEqual(1, note.Length);

            note.Dotts++;
            Assert.AreEqual(1.5, note.Length);
            note.Dotts++;
            Assert.AreEqual(1.75, note.Length);
            note.Dotts++;
            Assert.AreEqual(1.875, note.Length);
            note.Dotts++;
            Assert.AreEqual(1.9375, note.Length);
            note.Dotts++;
            Assert.AreEqual(1.96875, note.Length);
            note.Dotts++;
            Assert.AreEqual(1.984375, note.Length);
        }
Ejemplo n.º 4
0
 void Accept(PitchNote pNote)
 {
 }