class TSE2MDL

TSE version 2 file operations. More...

Full nameTSE3::TSE2MDL
Definition#include <TSE2MDL.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members


Detailed Description

This class provides file import for TSE2MDL files.

It uses the TSE2MDL file type, as created by programs based on the earlier TSE2 library. This format differs somewhat from the TSE3MDL format, notably in that it is a binary format. It is not forwards and backwards compatible, and it does not support all of TSE3's Song structure. Since these files are produced by programs based on the older TSE2 library this class is provided merely for compatibility.

When saving/loading TSE3 Song objects, you should prefer the TSE3MDL file format which is accessed via the TSE3MDL class.

You may see TSE2MDL files referred to simply as 'TSEMDL' files.

 TSE2MDL (const std::string &appname = "", bool verbose = false, std::ostream &out = std::cout)

TSE2MDL

Creates a TSE2MDL object for the given TSEMDL file.

Parameters:
appnameName of the application using TSE3. This is saved into the TSE3MDL file header (Not currently used, would be by a future export method.)
verboseWhether to produce diagnostic output.
outostream to produce diagnostic output on.

Song * load (const std::string &filename, Progress *progress = 0)

load

Performs the TSE2MDL file import, and returns a pointer to a Song object holding the imported data.

This Song object has been newed by the TSE2MDL object; it is your responsibility to delete it.

Parameters:
filenameFilename of TSE2MDL file to import.

Returns: The imported Song - you must delete it

bool  load_header (std::istream &in)

load_header

bool  load_songTitle (std::istream &in)

load_songTitle

bool  load_songAuthor (std::istream &in)

load_songAuthor

bool  load_songCopyright (std::istream &in)

load_songCopyright

bool  load_songDate (std::istream &in)

load_songDate

bool  load_TempoTrack (std::istream &in, int len)

load_TempoTrack

bool  load_TimeSigTrack (std::istream &in, int len)

load_TimeSigTrack

bool  load_FlagTrack (std::istream &in, int len)

load_FlagTrack

bool  load_Track (std::istream &in)

load_Track

bool  load_ExtendedTrack (std::istream &in, int length)

load_ExtendedTrack

bool  load_Phrase (std::istream &in, int len)

load_Phrase

bool  load_Part (std::istream &in)

load_Part

bool  load_ExtendedPart (std::istream &in, int len)

load_ExtendedPart

bool  load_Choices (std::istream &in, int len)

load_Choices

bool  skip (std::istream &in, int len)

skip

int  freadInt (std::istream &in, int size)

freadInt

int  freadPString (std::istream &in, char *buffer)

freadPString

std::string appname

appname

bool verbose

verbose

std::ostream & out

out

Track * prevTrack

prevTrack

Part * prevPart

prevPart

Clock file_PPQN

file_PPQN

size_t file_noTracks

file_noTracks

int file_size

file_size

Song * song

song