public void WriteTrackHeader(int partDataBytes, BinaryWriter a) { MidiWriter mw = new MidiWriter(a); mw.WriteByte((byte)'M'); mw.WriteByte((byte)'T'); mw.WriteByte((byte)'r'); mw.WriteByte((byte)'k'); // trackData = partData + trackFooter(4 bytes) mw.WriteBE4(partDataBytes + 4); }
public void WriteMidiHeader(BinaryWriter a) { MidiWriter mw = new MidiWriter(a); mw.WriteByte((byte)'M'); mw.WriteByte((byte)'T'); mw.WriteByte((byte)'h'); mw.WriteByte((byte)'d'); mw.WriteBE4(6); mw.WriteBE2(1); mw.WriteBE2(nTrack); mw.WriteBE2(tempo); }
public void WriteTrackFooter(BinaryWriter a) { MidiWriter mw = new MidiWriter(a); mw.WriteBE4(0x00ff2f00); }