OpenTTD Source
12.0-beta2
|
10 #ifndef MUSIC_MIDIFILE_HPP
11 #define MUSIC_MIDIFILE_HPP
13 #include "../stdafx.h"
14 #include "../core/smallvec_type.hpp"
std::vector< TempoChange > tempos
list of tempo changes in file
uint32 ticktime
tick number since start of file this tempo change occurs at
uint32 ticktime
tick number since start of file this block should be triggered at
uint32 tempo
new tempo in microseconds per tick
static bool ReadSMFHeader(const char *filename, SMFHeader &header)
Read the header of a standard MIDI file.
Metadata about a music track.
static std::string GetSMFFile(const MusicSongInfo &song)
Get the name of a Standard MIDI File for a given song.
std::vector< DataBlock > blocks
sequential time-annotated data of file, merged to a single track
bool LoadFile(const char *filename)
Load a standard MIDI file.
void MoveFrom(MidiFile &other)
Move data from other to this, and clears other.
std::vector< byte > data
raw midi data contained in block
uint16 tickdiv
ticks per quarter note
uint32 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.
bool WriteSMF(const char *filename)
Write a Standard MIDI File containing the decoded music.