LMMS
Loading...
Searching...
No Matches
CmodPlayer Class Reference

#include <protrack.h>

Inheritance diagram for CmodPlayer:
CPlayer Ca2mLoader CadtrackLoader CamdLoader CcffLoader CdfmLoader CdtmLoader CfmcLoader CmadLoader CradLoader Csa2Loader

Classes

struct  Instrument
struct  Tracks
struct  Channel

Public Member Functions

 CmodPlayer (Copl *newopl)
virtual ~CmodPlayer ()
bool update ()
void rewind (int subsong)
float getrefresh ()
unsigned int getpatterns ()
unsigned int getpattern ()
unsigned int getorders ()
unsigned int getorder ()
unsigned int getrow ()
unsigned int getspeed ()
Public Member Functions inherited from CPlayer
 CPlayer (Copl *newopl)
virtual ~CPlayer ()
void seek (unsigned long ms)
virtual bool load (const std::string &filename, const CFileProvider &fp=CProvider_Filesystem())=0
unsigned long songlength (int subsong=-1)
virtual std::string gettype ()=0
virtual std::string gettitle ()
virtual std::string getauthor ()
virtual std::string getdesc ()
virtual unsigned int getsubsongs ()
virtual unsigned int getsubsong ()
virtual unsigned int getinstruments ()
virtual std::string getinstrument (unsigned int n)

Protected Types

enum  Flags {
  Standard = 0 , Decimal = 1 << 0 , Faust = 1 << 1 , NoKeyOn = 1 << 2 ,
  Opl3 = 1 << 3 , Tremolo = 1 << 4 , Vibrato = 1 << 5 , Percussion = 1 << 6
}

Protected Member Functions

void init_trackord ()
bool init_specialarp ()
void init_notetable (const unsigned short *newnotetable)
bool realloc_order (unsigned long len)
bool realloc_patterns (unsigned long pats, unsigned long rows, unsigned long chans)
bool realloc_instruments (unsigned long len)
void dealloc ()

Protected Attributes

struct CmodPlayer::Instrumentinst
struct CmodPlayer::Tracks ** tracks
unsigned char * order
unsigned char * arplist
unsigned char * arpcmd
unsigned char initspeed
unsigned short tempo
unsigned short ** trackord
unsigned short bpm
unsigned short nop
unsigned long length
unsigned long restartpos
unsigned long activechan
int flags
int curchip
struct CmodPlayer::Channelchannel
Protected Attributes inherited from CPlayer
Coplopl
CAdPlugDatabasedb

Private Member Functions

void setvolume (unsigned char chan)
void setvolume_alt (unsigned char chan)
void setfreq (unsigned char chan)
void playnote (unsigned char chan)
void setnote (unsigned char chan, int note)
void slide_down (unsigned char chan, int amount)
void slide_up (unsigned char chan, int amount)
void tone_portamento (unsigned char chan, unsigned char info)
void vibrato (unsigned char chan, unsigned char speed, unsigned char depth)
void vol_up (unsigned char chan, int amount)
void vol_down (unsigned char chan, int amount)
void vol_up_alt (unsigned char chan, int amount)
void vol_down_alt (unsigned char chan, int amount)
void dealloc_patterns ()
bool resolve_order ()
unsigned char set_opl_chip (unsigned char chan)

Private Attributes

unsigned char speed
unsigned char del
unsigned char songend
unsigned char regbd
unsigned short rows
unsigned short notetable [12]
unsigned long rw
unsigned long ord
unsigned long nrows
unsigned long npats
unsigned long nchans

Static Private Attributes

static const unsigned short sa2_notetable [12]
static const unsigned char vibratotab [32]

Additional Inherited Members

Static Protected Attributes inherited from CPlayer
static const unsigned short note_table [12]
static const unsigned char op_table [9]

Member Enumeration Documentation

◆ Flags

enum CmodPlayer::Flags
protected
Enumerator
Standard 
Decimal 
Faust 
NoKeyOn 
Opl3 
Tremolo 
Vibrato 
Percussion 

Constructor & Destructor Documentation

◆ CmodPlayer()

CmodPlayer::CmodPlayer ( Copl * newopl)

◆ ~CmodPlayer()

CmodPlayer::~CmodPlayer ( )
virtual

Member Function Documentation

◆ dealloc()

void CmodPlayer::dealloc ( )
protected

◆ dealloc_patterns()

void CmodPlayer::dealloc_patterns ( )
private

◆ getorder()

unsigned int CmodPlayer::getorder ( )
inlinevirtual

Reimplemented from CPlayer.

◆ getorders()

unsigned int CmodPlayer::getorders ( )
inlinevirtual

Reimplemented from CPlayer.

◆ getpattern()

unsigned int CmodPlayer::getpattern ( )
inlinevirtual

Reimplemented from CPlayer.

◆ getpatterns()

unsigned int CmodPlayer::getpatterns ( )
inlinevirtual

Reimplemented from CPlayer.

◆ getrefresh()

float CmodPlayer::getrefresh ( )
virtual

Implements CPlayer.

Reimplemented in CradLoader.

◆ getrow()

unsigned int CmodPlayer::getrow ( )
inlinevirtual

Reimplemented from CPlayer.

◆ getspeed()

unsigned int CmodPlayer::getspeed ( )
inlinevirtual

Reimplemented from CPlayer.

◆ init_notetable()

void CmodPlayer::init_notetable ( const unsigned short * newnotetable)
protected

◆ init_specialarp()

bool CmodPlayer::init_specialarp ( )
protected

◆ init_trackord()

void CmodPlayer::init_trackord ( )
protected

◆ playnote()

void CmodPlayer::playnote ( unsigned char chan)
private

◆ realloc_instruments()

bool CmodPlayer::realloc_instruments ( unsigned long len)
protected

◆ realloc_order()

bool CmodPlayer::realloc_order ( unsigned long len)
protected

◆ realloc_patterns()

bool CmodPlayer::realloc_patterns ( unsigned long pats,
unsigned long rows,
unsigned long chans )
protected

◆ resolve_order()

bool CmodPlayer::resolve_order ( )
private

◆ rewind()

void CmodPlayer::rewind ( int subsong)
virtual

Implements CPlayer.

◆ set_opl_chip()

unsigned char CmodPlayer::set_opl_chip ( unsigned char chan)
private

◆ setfreq()

void CmodPlayer::setfreq ( unsigned char chan)
private

◆ setnote()

void CmodPlayer::setnote ( unsigned char chan,
int note )
private

◆ setvolume()

void CmodPlayer::setvolume ( unsigned char chan)
private

◆ setvolume_alt()

void CmodPlayer::setvolume_alt ( unsigned char chan)
private

◆ slide_down()

void CmodPlayer::slide_down ( unsigned char chan,
int amount )
private

◆ slide_up()

void CmodPlayer::slide_up ( unsigned char chan,
int amount )
private

◆ tone_portamento()

void CmodPlayer::tone_portamento ( unsigned char chan,
unsigned char info )
private

◆ update()

bool CmodPlayer::update ( )
virtual

Implements CPlayer.

◆ vibrato()

void CmodPlayer::vibrato ( unsigned char chan,
unsigned char speed,
unsigned char depth )
private

◆ vol_down()

void CmodPlayer::vol_down ( unsigned char chan,
int amount )
private

◆ vol_down_alt()

void CmodPlayer::vol_down_alt ( unsigned char chan,
int amount )
private

◆ vol_up()

void CmodPlayer::vol_up ( unsigned char chan,
int amount )
private

◆ vol_up_alt()

void CmodPlayer::vol_up_alt ( unsigned char chan,
int amount )
private

Member Data Documentation

◆ activechan

unsigned long CmodPlayer::activechan
protected

◆ arpcmd

unsigned char * CmodPlayer::arpcmd
protected

◆ arplist

unsigned char * CmodPlayer::arplist
protected

◆ bpm

unsigned short CmodPlayer::bpm
protected

◆ channel

struct CmodPlayer::Channel * CmodPlayer::channel
protected

◆ curchip

int CmodPlayer::curchip
protected

◆ del

unsigned char CmodPlayer::del
private

◆ flags

int CmodPlayer::flags
protected

◆ initspeed

unsigned char CmodPlayer::initspeed
protected

◆ inst

struct CmodPlayer::Instrument * CmodPlayer::inst
protected

◆ length

unsigned long CmodPlayer::length
protected

◆ nchans

unsigned long CmodPlayer::nchans
private

◆ nop

unsigned short CmodPlayer::nop
protected

◆ notetable

unsigned short CmodPlayer::notetable[12]
private

◆ npats

unsigned long CmodPlayer::npats
private

◆ nrows

unsigned long CmodPlayer::nrows
private

◆ ord

unsigned long CmodPlayer::ord
private

◆ order

unsigned char* CmodPlayer::order
protected

◆ regbd

unsigned char CmodPlayer::regbd
private

◆ restartpos

unsigned long CmodPlayer::restartpos
protected

◆ rows

unsigned short CmodPlayer::rows
private

◆ rw

unsigned long CmodPlayer::rw
private

◆ sa2_notetable

const unsigned short CmodPlayer::sa2_notetable
staticprivate
Initial value:
=
{340,363,385,408,432,458,485,514,544,577,611,647}

◆ songend

unsigned char CmodPlayer::songend
private

◆ speed

unsigned char CmodPlayer::speed
private

◆ tempo

unsigned short CmodPlayer::tempo
protected

◆ trackord

unsigned short ** CmodPlayer::trackord
protected

◆ tracks

struct CmodPlayer::Tracks ** CmodPlayer::tracks
protected

◆ vibratotab

const unsigned char CmodPlayer::vibratotab
staticprivate
Initial value:
=
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}

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