private function writeChord(Chord $chord) { $this->writeBytes(array(1, 1, 0, 0, 0, 12, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0)); $this->writeStringByte($chord->getName(), 21); $this->skipBytes(4); $this->writeInt($chord->getFirstFret()); for ($i = 0; $i < 7; $i++) { $this->writeInt($i < $chord->countStrings() ? $chord->getFretValue($i) : -1); } $this->skipBytes(32); }
private function writeChord(Chord $chord) { $this->writeUnsignedByte(0x1); $this->skipBytes(16); $this->writeStringByte($chord->getName(), 21); $this->skipBytes(4); $this->writeInt($chord->getFirstFret()); for ($i = 0; $i < 7; $i++) { $this->writeInt($i < $chord->countStrings() ? $chord->getFretValue($i) : -1); } $this->skipBytes(32); }