示例#1
0
        public MetaEventText(int aDelta, byte aType, ByteArray byteArray)
            : base(aDelta, aType)
        {
            int length = MtrkChunk.GetVariableLengthByte(byteArray);

            text = byteArray.ReadString(length);
        }
        public MidiEventSystemExclusive(int aDelta, byte aState, ByteArray aByteArray)
            : base(aDelta, aState, 0, 0)
        {
            length = MtrkChunk.GetVariableLengthByte(aByteArray);

            dataArray = new byte[length];

            for (int i = 0; i < length; i++)
            {
                dataArray[i] = aByteArray.ReadByte();
            }
        }
示例#3
0
        // MIDIトラックを読み込む.
        private void ReadMidiTrack(ByteArray byteArray)
        {
            mtrkChunkArray = new MtrkChunk[mthdChunk.GetTracks()];

            for (int i = 0; i < mthdChunk.GetTracks(); i++)
            {
                string lId   = byteArray.ReadString(4);
                UInt32 lSize = byteArray.ReadUInt32();

                mtrkChunkArray[i] = new MtrkChunk(lId, ( int )lSize);
                mtrkChunkArray[i].Read(byteArray);
            }
        }