MuseScore  3.4
Music composition and notation
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
MidiFile Class Reference

#include <midifile.h>

Collaboration diagram for MidiFile:
Collaboration graph
[legend]

Public Member Functions

 MidiFile ()
 
bool read (const QString &path)
 
bool read (QIODevice *)
 
bool write (const QString &path)
 
bool write (QIODevice *)
 
const std::list< MidiTrack * > & tracks () const
 
std::list< MidiTrack * > & tracks ()
 
int format () const
 
void setFormat (int fmt)
 
int division () const
 
void setDivision (int val)
 
const TempoMaptempoMap () const
 

Protected Member Functions

void read (void *, qint64)
 
int getvl ()
 
int readShort ()
 
int readLong ()
 
int readEvent (MidiEvent *)
 
bool readTrack ()
 
void skip (qint64)
 
bool write (const void *, qint64)
 
void writeShort (int)
 
void writeLong (int)
 
bool writeTrack (const MidiTrack *)
 
void writeEvent (const MidiEvent &)
 
void putvl (unsigned)
 
void put (unsigned char c)
 
void writeStatus (MidiEventType, int channel)
 
void resetRunningStatus ()
 

Private Attributes

TempoMap _tempoMap
 
QIODevice * fp
 
std::list< MidiTrack * > _tracks
 
int _division
 
int _format
 midi file format (0-2) More...
 
int status
 running status More...
 
int sstatus
 running status (not reset after meta or sysex events) More...
 
int click
 current tick position in file More...
 
qint64 curPos
 current file byte position More...
 

Constructor & Destructor Documentation

◆ MidiFile()

MidiFile::MidiFile ( )

Member Function Documentation

◆ division()

int MidiFile::division ( ) const
inline

◆ format()

int MidiFile::format ( ) const
inline

◆ getvl()

int MidiFile::getvl ( )
protected

◆ put()

void MidiFile::put ( unsigned char  c)
inlineprotected

◆ putvl()

void MidiFile::putvl ( unsigned  val)
protected

◆ read() [1/3]

void MidiFile::read ( void *  p,
qint64  len 
)
protected

◆ read() [2/3]

bool MidiFile::read ( const QString &  path)

◆ read() [3/3]

bool MidiFile::read ( QIODevice *  f)

◆ readEvent()

int MidiFile::readEvent ( MidiEvent event)
protected

◆ readLong()

int MidiFile::readLong ( )
protected

◆ readShort()

int MidiFile::readShort ( )
protected

◆ readTrack()

bool MidiFile::readTrack ( )
protected

◆ resetRunningStatus()

void MidiFile::resetRunningStatus ( )
inlineprotected

◆ setDivision()

void MidiFile::setDivision ( int  val)
inline

◆ setFormat()

void MidiFile::setFormat ( int  fmt)
inline

◆ skip()

void MidiFile::skip ( qint64  len)
protected

◆ tempoMap()

const TempoMap& MidiFile::tempoMap ( ) const
inline

◆ tracks() [1/2]

const std::list<MidiTrack*>& MidiFile::tracks ( ) const
inline

◆ tracks() [2/2]

std::list<MidiTrack*>& MidiFile::tracks ( )
inline

◆ write() [1/3]

bool MidiFile::write ( const void *  p,
qint64  len 
)
protected

◆ write() [2/3]

bool MidiFile::write ( const QString &  path)

◆ write() [3/3]

bool MidiFile::write ( QIODevice *  f)

◆ writeEvent()

void MidiFile::writeEvent ( const MidiEvent event)
protected

◆ writeLong()

void MidiFile::writeLong ( int  i)
protected

◆ writeShort()

void MidiFile::writeShort ( int  i)
protected

◆ writeStatus()

void MidiFile::writeStatus ( MidiEventType  st,
int  channel 
)
protected

◆ writeTrack()

bool MidiFile::writeTrack ( const MidiTrack t)
protected

Member Data Documentation

◆ _division

int MidiFile::_division
private

◆ _format

int MidiFile::_format
private

midi file format (0-2)

◆ _tempoMap

TempoMap MidiFile::_tempoMap
private

◆ _tracks

std::list<MidiTrack*> MidiFile::_tracks
private

◆ click

int MidiFile::click
private

current tick position in file

◆ curPos

qint64 MidiFile::curPos
private

current file byte position

◆ fp

QIODevice* MidiFile::fp
private

◆ sstatus

int MidiFile::sstatus
private

running status (not reset after meta or sysex events)

◆ status

int MidiFile::status
private

running status


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