static void Main()
        {
            socket = new MidiSocket(Dns.GetHostAddresses("RASPBERRYPI")[0].ToString(), 5008);
            socket.MidiMessageReceived += socket_MidiMessageReceived;
            socket.Connect();
            socket.BeginReceive();

            new Thread(ReadMidiInputThread).Start();

            while (true)
            {
                Console.ReadLine();
            }
        }
        static void Main()
        {
            socket = new MidiSocket(Dns.GetHostAddresses("RASPBERRYPI")[0].ToString(), 5008);
            socket.MidiMessageReceived += socket_MidiMessageReceived;
            socket.Connect();
            socket.BeginReceive();

            new Thread(ReadMidiInputThread).Start();

            while (true)
            {
                Console.ReadLine();
            }
        }
 private static void socket_MidiMessageReceived(object sender, MidiSocket.MidiMessageReceivedEventArgs e)
 {
     midi.sendCommand(e.Message);
     logger.LogMidiMessage(e.Message);
 }