PianoKeyEmulator.Note.operator C# (CSharp) 메소드

operator() 공개 정적인 메소드

public static operator ( ) : Note
리턴 Note
        public static Note operator +(Note note, int semitons)
        {
            var octave = (byte) (note.Octave + semitons/12); // 12 полутонов в октаве
            int tmp = (int) note.Tone + semitons%12;
            if (tmp > (int) Tones.B) // Последняя нота в октаве
            {
                ++octave;
                tmp = tmp%12;
            }
            var tone = (Tones) (tmp);

            return new Note(octave, tone);
        }

Same methods

Note::operator ( ) : bool
Note::operator ( ) : int