示例#1
0
        public byte[] ToBitString()
        {
            byte[] bitString = new byte[GetLength()];
            uint   cursor    = 0;

            StreamingHelper.StreamValueToBitString(ref cursor, ref bitString, MidiConstants.TRACK_SIGNATURE);
            StreamingHelper.StreamValueToBitString(ref cursor, ref bitString, _length);
            foreach (var e in Events)
            {
                StreamingHelper.StreamObjectToBitString(ref cursor, ref bitString, e, e.GetLength());
            }
            return(bitString);
        }
示例#2
0
        public byte[] ToBitString()
        {
            var  bitString = new byte[GetLength()];
            uint cursor    = 0;

            StreamingHelper.StreamObjectToBitString(ref cursor, ref bitString, TimeDelta, TimeDelta.Length);
            StreamingHelper.StreamValueToBitString(ref cursor, ref bitString, EventType);
            foreach (var b in EventData)
            {
                StreamingHelper.StreamValueToBitString(ref cursor, ref bitString, b);
            }
            return(bitString);
        }