Beispiel #1
0
bool TriAcePS1Seq::GetHeaderInfo(void) {
    SetPPQN(0x30);

    header = AddHeader(dwOffset, 0xD5);
    header->AddSimpleItem(dwOffset + 2, 2, L"Size");
    header->AddSimpleItem(dwOffset + 0xB, 4, L"Song title");
    header->AddSimpleItem(dwOffset + 0xF, 1, L"BPM");
    header->AddSimpleItem(dwOffset + 0x10, 2, L"Time Signature");

    unLength = GetShort(dwOffset + 2);
    AlwaysWriteInitialTempo(GetByte(dwOffset + 0xF));
    return true;
}
bool CompileSnesSeq::GetTrackPointers(void)
{
	uint32_t curOffset = dwOffset + 1;
	for (uint8_t trackIndex = 0; trackIndex < nNumTracks; trackIndex++) {
		uint16_t ofsTrackStart = GetShort(curOffset + 8);

		CompileSnesTrack* track = new CompileSnesTrack(this, ofsTrackStart);
		track->spcInitialFlags = GetByte(curOffset + 1);
		track->spcInitialVolume = GetByte(curOffset + 2);
		track->spcInitialTranspose = (int8_t)GetByte(curOffset + 5);
		track->spcInitialTempo = GetByte(curOffset + 6);
		track->spcInitialSRCN = GetByte(curOffset + 10);
		track->spcInitialPan = (int8_t)GetByte(curOffset + 12);
		aTracks.push_back(track);

		if (trackIndex == 0) {
			AlwaysWriteInitialTempo(GetTempoInBPM(track->spcInitialTempo));
		}

		curOffset += 14;
	}

	return true;
}