Esempio n. 1
0
        private void SendNoteString(SimpleMidiNote note)
        {
            var noteId = GetNoteId(note);

            foreach (var character in noteId.ToString())
            {
                var pitchKey = Enum.Parse(typeof(DirectXKey), $"DIK_NUMPAD{character}");
                SendInput.SendDirectXKey((DirectXKey)pitchKey, false);
            }
        }
Esempio n. 2
0
 public void Play(SimpleMidiNote note)
 {
     if (MordhauIsActive())
     {
         OpenConsole();
         SendPlayNoteCommand();
         SendNoteString(note);
         SubmitConsoleCommand();
     }
 }
Esempio n. 3
0
        private int GetNoteId(SimpleMidiNote note)
        {
            Debug.Assert(Pitch.C == 0);

            var noteId = noteTable[(int)note.Pitch].Item2;

            if (note.Octave > 2)
            {
                noteId += 12;
            }

            return(noteId);
        }