MIPI - Physical Interface for MIDI Files
Loading...
Searching...
No Matches
smf::Binasc Class Reference

#include <Binasc.h>

Collaboration diagram for smf::Binasc:
Collaboration graph

Public Member Functions

 Binasc (void)
 
 ~Binasc ()
 
int setLineLength (int length)
 
int getLineLength (void)
 
int setLineBytes (int length)
 
int getLineBytes (void)
 
void setComments (int state)
 
void setCommentsOn (void)
 
void setCommentsOff (void)
 
int getComments (void)
 
void setBytes (int state)
 
void setBytesOn (void)
 
void setBytesOff (void)
 
int getBytes (void)
 
void setMidi (int state)
 
void setMidiOn (void)
 
void setMidiOff (void)
 
int getMidi (void)
 
int writeToBinary (const std::string &outfile, const std::string &infile)
 
int writeToBinary (const std::string &outfile, std::istream &input)
 
int writeToBinary (std::ostream &out, const std::string &infile)
 
int writeToBinary (std::ostream &out, std::istream &input)
 
int readFromBinary (const std::string &outfile, const std::string &infile)
 
int readFromBinary (const std::string &outfile, std::istream &input)
 
int readFromBinary (std::ostream &out, const std::string &infile)
 
int readFromBinary (std::ostream &out, std::istream &input)
 

Static Public Member Functions

static std::ostream & writeLittleEndianUShort (std::ostream &out, ushort value)
 
static std::ostream & writeBigEndianUShort (std::ostream &out, ushort value)
 
static std::ostream & writeLittleEndianShort (std::ostream &out, short value)
 
static std::ostream & writeBigEndianShort (std::ostream &out, short value)
 
static std::ostream & writeLittleEndianULong (std::ostream &out, ulong value)
 
static std::ostream & writeBigEndianULong (std::ostream &out, ulong value)
 
static std::ostream & writeLittleEndianLong (std::ostream &out, long value)
 
static std::ostream & writeBigEndianLong (std::ostream &out, long value)
 
static std::ostream & writeLittleEndianFloat (std::ostream &out, float value)
 
static std::ostream & writeBigEndianFloat (std::ostream &out, float value)
 
static std::ostream & writeLittleEndianDouble (std::ostream &out, double value)
 
static std::ostream & writeBigEndianDouble (std::ostream &out, double value)
 
static std::string keyToPitchName (int key)
 

Protected Attributes

int m_bytesQ
 
int m_commentsQ
 
int m_midiQ
 
int m_maxLineLength
 
int m_maxLineBytes
 

Private Member Functions

int processLine (std::ostream &out, const std::string &input, int lineNum)
 
int processAsciiWord (std::ostream &out, const std::string &input, int lineNum)
 
int processStringWord (std::ostream &out, const std::string &input, int lineNum)
 
int processBinaryWord (std::ostream &out, const std::string &input, int lineNum)
 
int processDecimalWord (std::ostream &out, const std::string &input, int lineNum)
 
int processHexWord (std::ostream &out, const std::string &input, int lineNum)
 
int processVlvWord (std::ostream &out, const std::string &input, int lineNum)
 
int processMidiPitchBendWord (std::ostream &out, const std::string &input, int lineNum)
 
int processMidiTempoWord (std::ostream &out, const std::string &input, int lineNum)
 
int outputStyleAscii (std::ostream &out, std::istream &input)
 
int outputStyleBinary (std::ostream &out, std::istream &input)
 
int outputStyleBoth (std::ostream &out, std::istream &input)
 
int outputStyleMidi (std::ostream &out, std::istream &input)
 
int readMidiEvent (std::ostream &out, std::istream &infile, int &trackbytes, int &command)
 
int getVLV (std::istream &infile, int &trackbytes)
 
int getWord (std::string &word, const std::string &input, const std::string &terminators, int index)
 

Static Private Attributes

static const char * GMinstrument [128]
 

Constructor & Destructor Documentation

◆ Binasc()

smf::Binasc::Binasc ( void  )

◆ ~Binasc()

smf::Binasc::~Binasc ( )

Member Function Documentation

◆ getBytes()

int smf::Binasc::getBytes ( void  )

◆ getComments()

int smf::Binasc::getComments ( void  )

◆ getLineBytes()

int smf::Binasc::getLineBytes ( void  )

◆ getLineLength()

int smf::Binasc::getLineLength ( void  )

◆ getMidi()

int smf::Binasc::getMidi ( void  )

◆ getVLV()

int smf::Binasc::getVLV ( std::istream &  infile,
int &  trackbytes 
)
private
Here is the caller graph for this function:

◆ getWord()

int smf::Binasc::getWord ( std::string &  word,
const std::string &  input,
const std::string &  terminators,
int  index 
)
private
Here is the caller graph for this function:

◆ keyToPitchName()

std::string smf::Binasc::keyToPitchName ( int  key)
static
Here is the caller graph for this function:

◆ outputStyleAscii()

int smf::Binasc::outputStyleAscii ( std::ostream &  out,
std::istream &  input 
)
private
Here is the caller graph for this function:

◆ outputStyleBinary()

int smf::Binasc::outputStyleBinary ( std::ostream &  out,
std::istream &  input 
)
private
Here is the caller graph for this function:

◆ outputStyleBoth()

int smf::Binasc::outputStyleBoth ( std::ostream &  out,
std::istream &  input 
)
private
Here is the caller graph for this function:

◆ outputStyleMidi()

int smf::Binasc::outputStyleMidi ( std::ostream &  out,
std::istream &  input 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processAsciiWord()

int smf::Binasc::processAsciiWord ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the caller graph for this function:

◆ processBinaryWord()

int smf::Binasc::processBinaryWord ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the caller graph for this function:

◆ processDecimalWord()

int smf::Binasc::processDecimalWord ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processHexWord()

int smf::Binasc::processHexWord ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the caller graph for this function:

◆ processLine()

int smf::Binasc::processLine ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processMidiPitchBendWord()

int smf::Binasc::processMidiPitchBendWord ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the caller graph for this function:

◆ processMidiTempoWord()

int smf::Binasc::processMidiTempoWord ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the caller graph for this function:

◆ processStringWord()

int smf::Binasc::processStringWord ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the caller graph for this function:

◆ processVlvWord()

int smf::Binasc::processVlvWord ( std::ostream &  out,
const std::string &  input,
int  lineNum 
)
private
Here is the caller graph for this function:

◆ readFromBinary() [1/4]

int smf::Binasc::readFromBinary ( const std::string &  outfile,
const std::string &  infile 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readFromBinary() [2/4]

int smf::Binasc::readFromBinary ( const std::string &  outfile,
std::istream &  input 
)
Here is the call graph for this function:

◆ readFromBinary() [3/4]

int smf::Binasc::readFromBinary ( std::ostream &  out,
const std::string &  infile 
)
Here is the call graph for this function:

◆ readFromBinary() [4/4]

int smf::Binasc::readFromBinary ( std::ostream &  out,
std::istream &  input 
)
Here is the call graph for this function:

◆ readMidiEvent()

int smf::Binasc::readMidiEvent ( std::ostream &  out,
std::istream &  infile,
int &  trackbytes,
int &  command 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBytes()

void smf::Binasc::setBytes ( int  state)
Here is the caller graph for this function:

◆ setBytesOff()

void smf::Binasc::setBytesOff ( void  )
Here is the call graph for this function:

◆ setBytesOn()

void smf::Binasc::setBytesOn ( void  )
Here is the call graph for this function:

◆ setComments()

void smf::Binasc::setComments ( int  state)
Here is the caller graph for this function:

◆ setCommentsOff()

void smf::Binasc::setCommentsOff ( void  )
Here is the call graph for this function:

◆ setCommentsOn()

void smf::Binasc::setCommentsOn ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLineBytes()

int smf::Binasc::setLineBytes ( int  length)

◆ setLineLength()

int smf::Binasc::setLineLength ( int  length)

◆ setMidi()

void smf::Binasc::setMidi ( int  state)
Here is the caller graph for this function:

◆ setMidiOff()

void smf::Binasc::setMidiOff ( void  )
Here is the call graph for this function:

◆ setMidiOn()

void smf::Binasc::setMidiOn ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeBigEndianDouble()

std::ostream & smf::Binasc::writeBigEndianDouble ( std::ostream &  out,
double  value 
)
static
Here is the caller graph for this function:

◆ writeBigEndianFloat()

std::ostream & smf::Binasc::writeBigEndianFloat ( std::ostream &  out,
float  value 
)
static
Here is the caller graph for this function:

◆ writeBigEndianLong()

std::ostream & smf::Binasc::writeBigEndianLong ( std::ostream &  out,
long  value 
)
static
Here is the caller graph for this function:

◆ writeBigEndianShort()

std::ostream & smf::Binasc::writeBigEndianShort ( std::ostream &  out,
short  value 
)
static
Here is the caller graph for this function:

◆ writeBigEndianULong()

std::ostream & smf::Binasc::writeBigEndianULong ( std::ostream &  out,
ulong  value 
)
static
Here is the caller graph for this function:

◆ writeBigEndianUShort()

std::ostream & smf::Binasc::writeBigEndianUShort ( std::ostream &  out,
ushort  value 
)
static
Here is the caller graph for this function:

◆ writeLittleEndianDouble()

std::ostream & smf::Binasc::writeLittleEndianDouble ( std::ostream &  out,
double  value 
)
static
Here is the caller graph for this function:

◆ writeLittleEndianFloat()

std::ostream & smf::Binasc::writeLittleEndianFloat ( std::ostream &  out,
float  value 
)
static
Here is the caller graph for this function:

◆ writeLittleEndianLong()

std::ostream & smf::Binasc::writeLittleEndianLong ( std::ostream &  out,
long  value 
)
static
Here is the caller graph for this function:

◆ writeLittleEndianShort()

std::ostream & smf::Binasc::writeLittleEndianShort ( std::ostream &  out,
short  value 
)
static
Here is the caller graph for this function:

◆ writeLittleEndianULong()

std::ostream & smf::Binasc::writeLittleEndianULong ( std::ostream &  out,
ulong  value 
)
static
Here is the caller graph for this function:

◆ writeLittleEndianUShort()

std::ostream & smf::Binasc::writeLittleEndianUShort ( std::ostream &  out,
ushort  value 
)
static
Here is the caller graph for this function:

◆ writeToBinary() [1/4]

int smf::Binasc::writeToBinary ( const std::string &  outfile,
const std::string &  infile 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeToBinary() [2/4]

int smf::Binasc::writeToBinary ( const std::string &  outfile,
std::istream &  input 
)
Here is the call graph for this function:

◆ writeToBinary() [3/4]

int smf::Binasc::writeToBinary ( std::ostream &  out,
const std::string &  infile 
)
Here is the call graph for this function:

◆ writeToBinary() [4/4]

int smf::Binasc::writeToBinary ( std::ostream &  out,
std::istream &  input 
)
Here is the call graph for this function:

Member Data Documentation

◆ GMinstrument

const char * smf::Binasc::GMinstrument
staticprivate
Initial value:
= {
"acoustic grand piano", "bright acoustic piano", "electric grand piano", "honky-tonk piano", "rhodes piano", "chorused piano",
"harpsichord", "clavinet", "celeste", "glockenspiel", "music box", "vibraphone",
"marimba", "xylophone", "tubular bells", "dulcimer", "hammond organ", "percussive organ",
"rock organ", "church organ", "reed organ", "accordion", "harmonica", "tango accordion",
"nylon guitar", "steel guitar", "jazz guitar", "clean guitar", "muted guitar", "overdriven guitar",
"distortion guitar", "guitar harmonics", "acoustic bass", "fingered electric bass", "picked electric bass", "fretless bass",
"slap bass 1", "slap bass 2", "synth bass 1", "synth bass 2", "violin", "viola",
"cello", "contrabass", "tremolo strings", "pizzcato strings", "orchestral harp", "timpani",
"string ensemble 1", "string ensemble 2", "synth strings 1", "synth strings 1", "choir aahs", "voice oohs",
"synth voices", "orchestra hit", "trumpet", "trombone", "tuba", "muted trumpet",
"frenc horn", "brass section", "syn brass 1", "synth brass 2", "soprano sax", "alto sax",
"tenor sax", "baritone sax", "oboe", "english horn", "bassoon", "clarinet",
"piccolo", "flute", "recorder", "pan flute", "bottle blow", "shakuhachi",
"whistle", "ocarina", "square wave", "saw wave", "calliope lead", "chiffer lead",
"charang lead", "voice lead", "fifths lead", "brass lead", "newage pad", "warm pad",
"polysyn pad", "choir pad", "bowed pad", "metallic pad", "halo pad", "sweep pad",
"rain", "soundtrack", "crystal", "atmosphere", "brightness", "goblins",
"echoes", "sci-fi", "sitar", "banjo", "shamisen", "koto",
"kalimba", "bagpipes", "fiddle", "shanai", "tinkle bell", "agogo",
"steel drums", "woodblock", "taiko drum", "melodoc tom", "synth drum", "reverse cymbal",
"guitar fret noise", "breath noise", "seashore", "bird tweet", "telephone ring", "helicopter",
"applause", "gunshot"
}

◆ m_bytesQ

int smf::Binasc::m_bytesQ
protected

◆ m_commentsQ

int smf::Binasc::m_commentsQ
protected

◆ m_maxLineBytes

int smf::Binasc::m_maxLineBytes
protected

◆ m_maxLineLength

int smf::Binasc::m_maxLineLength
protected

◆ m_midiQ

int smf::Binasc::m_midiQ
protected

The documentation for this class was generated from the following files: