//each node- check it doesn't exist already
        public void addNote(MarkovNote p_mes)
        {
            if (Midi.debugLevel > 1)
            {
                Debug.Log("Add note : " + p_mes.getByteOne());
            }
            for (int i = 0; i < nodeMatrix.Count; i++)
            {
                if (p_mes.getMessageAsBytes().SequenceEqual(nodeMatrix[i].getMessageAsBytes()) && p_mes.length == nodeMatrix[i].getNoteLen())
                {
                    nodeMatrix[previousWritePos].addWeight(nodeMatrix[i]);
                    previousWritePos = i;
                    return;
                }
            }
            TransitionNode node = new TransitionNode(p_mes);

            nodeMatrix[previousWritePos].addWeight(node);
            nodeMatrix.Add(node);
            previousWritePos = nodeMatrix.Count - 1;
        }
 public byte[] getMessageAsBytes()
 {
     return(message.getMessageAsBytes());
 }