|
OpenTTD Source
14.0-beta1
|
10 #ifndef MUSIC_MIDIFILE_HPP
11 #define MUSIC_MIDIFILE_HPP
13 #include "../stdafx.h"
38 bool LoadFile(
const std::string &filename);
43 bool WriteSMF(
const std::string &filename);
std::vector< TempoChange > tempos
list of tempo changes in file
bool LoadFile(const std::string &filename)
Load a standard MIDI file.
uint32_t ticktime
tick number since start of file this tempo change occurs at
uint32_t tempo
new tempo in microseconds per tick
Metadata about a music track.
uint16_t tickdiv
ticks per quarter note
static std::string GetSMFFile(const MusicSongInfo &song)
Get the name of a Standard MIDI File for a given song.
bool WriteSMF(const std::string &filename)
Write a Standard MIDI File containing the decoded music.
std::vector< DataBlock > blocks
sequential time-annotated data of file, merged to a single track
void MoveFrom(MidiFile &other)
Move data from other to this, and clears other.
std::vector< byte > data
raw midi data contained in block
static bool ReadSMFHeader(const std::string &filename, SMFHeader &header)
Read the header of a standard MIDI file.
uint32_t realtime
real-time (microseconds) since start of file this block should be triggered at
bool LoadMpsData(const byte *data, size_t length)
Create MIDI data from song data for the original Microprose music drivers.
uint32_t ticktime
tick number since start of file this block should be triggered at