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

#include <adlib.h>

Public Member Functions

 CadlibDriver (Copl *newopl)
 ~CadlibDriver ()
void SoundWarmInit ()
void SetMode (int mode)
void SetWaveSel (int state)
void SetPitchRange (uint8_t pR)
void SetGParam (int amD, int vibD, int nSel)
void SetVoiceTimbre (uint8_t voice, int16_t *paramArray)
void SetVoiceVolume (uint8_t voice, uint8_t volume)
void SetVoicePitch (uint8_t voice, uint16_t pitchBend)
void NoteOn (uint8_t voice, int pitch)
void NoteOff (uint8_t voice)

Static Protected Attributes

static const uint8_t percMasks [5]
static uint8_t pianoParamsOp0 [nbLocParam]
static uint8_t pianoParamsOp1 [nbLocParam]
static uint8_t bdOpr0 [nbLocParam]
static uint8_t bdOpr1 [nbLocParam]
static uint8_t sdOpr [nbLocParam]
static uint8_t tomOpr [nbLocParam]
static uint8_t cymbOpr [nbLocParam]
static uint8_t hhOpr [nbLocParam]
static uint8_t slotVoice [9][2]
static uint8_t slotPerc [5][2]
static uint8_t offsetSlot [18]
static uint8_t operSlot [18]
static uint8_t voiceSlot [18]

Private Types

typedef uint8_t SLOT_PARAM

Private Member Functions

void InitSlotVolume ()
void InitFNums ()
void SoundChut (int voice)
void SetFreq (uint8_t voice, int pitch, uint8_t keyOn)
void SndSAmVibRhythm ()
void SndSNoteSel ()
void SndSKslLevel (uint8_t slot)
void SndSFeedFm (uint8_t slot)
void SndSAttDecay (uint8_t slot)
void SndSSusRelease (uint8_t slot)
void SndSAVEK (uint8_t slot)
void SndWaveSelect (uint8_t slot)
void SndSetAllPrm (uint8_t slot)
void SetSlotParam (uint8_t slot, int16_t *param, uint8_t waveSel)
void SetCharSlotParam (uint8_t slot, uint8_t *cParam, uint8_t waveSel)
void InitSlotParams ()
void SetFNum (uint16_t *fNumVec, int num, int den)
void ChangePitch (int voice, int pitchBend)
long CalcPremFNum (int numDeltaDemiTon, int denDeltaDemiTon)

Private Attributes

Coplopl
uint16_t fNumNotes [NR_STEP_PITCH][12]
int halfToneOffset [MAX_VOICES]
uint16_tfNumFreqPtr [MAX_VOICES]
int pitchRange
int pitchRangeStep
int modeWaveSel
uint8_t percBits
uint8_t notePitch [MAX_VOICES]
uint8_t voiceKeyOn [MAX_VOICES]
uint8_t noteDIV12 [96]
uint8_t noteMOD12 [96]
uint8_t slotRelVolume [18]
SLOT_PARAM paramSlot [18][nbLocParam]
uint8_t amDepth
uint8_t vibDepth
uint8_t noteSel
uint8_t percussion

Member Typedef Documentation

◆ SLOT_PARAM

Constructor & Destructor Documentation

◆ CadlibDriver()

CadlibDriver::CadlibDriver ( Copl * newopl)
inline

◆ ~CadlibDriver()

CadlibDriver::~CadlibDriver ( )
inline

Member Function Documentation

◆ CalcPremFNum()

long CadlibDriver::CalcPremFNum ( int numDeltaDemiTon,
int denDeltaDemiTon )
private

◆ ChangePitch()

void CadlibDriver::ChangePitch ( int voice,
int pitchBend )
private

◆ InitFNums()

void CadlibDriver::InitFNums ( )
private

◆ InitSlotParams()

void CadlibDriver::InitSlotParams ( )
private

◆ InitSlotVolume()

void CadlibDriver::InitSlotVolume ( )
private

◆ NoteOff()

void CadlibDriver::NoteOff ( uint8_t voice)

◆ NoteOn()

void CadlibDriver::NoteOn ( uint8_t voice,
int pitch )

◆ SetCharSlotParam()

void CadlibDriver::SetCharSlotParam ( uint8_t slot,
uint8_t * cParam,
uint8_t waveSel )
private

◆ SetFNum()

void CadlibDriver::SetFNum ( uint16_t * fNumVec,
int num,
int den )
private

◆ SetFreq()

void CadlibDriver::SetFreq ( uint8_t voice,
int pitch,
uint8_t keyOn )
private

◆ SetGParam()

void CadlibDriver::SetGParam ( int amD,
int vibD,
int nSel )

◆ SetMode()

void CadlibDriver::SetMode ( int mode)

◆ SetPitchRange()

void CadlibDriver::SetPitchRange ( uint8_t pR)

◆ SetSlotParam()

void CadlibDriver::SetSlotParam ( uint8_t slot,
int16_t * param,
uint8_t waveSel )
private

◆ SetVoicePitch()

void CadlibDriver::SetVoicePitch ( uint8_t voice,
uint16_t pitchBend )

◆ SetVoiceTimbre()

void CadlibDriver::SetVoiceTimbre ( uint8_t voice,
int16_t * paramArray )

◆ SetVoiceVolume()

void CadlibDriver::SetVoiceVolume ( uint8_t voice,
uint8_t volume )

◆ SetWaveSel()

void CadlibDriver::SetWaveSel ( int state)

◆ SndSAmVibRhythm()

void CadlibDriver::SndSAmVibRhythm ( )
private

◆ SndSAttDecay()

void CadlibDriver::SndSAttDecay ( uint8_t slot)
private

◆ SndSAVEK()

void CadlibDriver::SndSAVEK ( uint8_t slot)
private

◆ SndSetAllPrm()

void CadlibDriver::SndSetAllPrm ( uint8_t slot)
private

◆ SndSFeedFm()

void CadlibDriver::SndSFeedFm ( uint8_t slot)
private

◆ SndSKslLevel()

void CadlibDriver::SndSKslLevel ( uint8_t slot)
private

◆ SndSNoteSel()

void CadlibDriver::SndSNoteSel ( )
private

◆ SndSSusRelease()

void CadlibDriver::SndSSusRelease ( uint8_t slot)
private

◆ SndWaveSelect()

void CadlibDriver::SndWaveSelect ( uint8_t slot)
private

◆ SoundChut()

void CadlibDriver::SoundChut ( int voice)
private

◆ SoundWarmInit()

void CadlibDriver::SoundWarmInit ( )

Member Data Documentation

◆ amDepth

uint8_t CadlibDriver::amDepth
private

◆ bdOpr0

uint8_t CadlibDriver::bdOpr0
staticprotected
Initial value:
=
{ 0, 0, 0, 10, 4, 0, 8, 12, 11, 0, 0, 0, 1, 0 }

◆ bdOpr1

uint8_t CadlibDriver::bdOpr1
staticprotected
Initial value:
=
{ 0, 0, 0, 13, 4, 0, 6, 15, 0, 0, 0, 0, 1, 0 }

◆ cymbOpr

uint8_t CadlibDriver::cymbOpr
staticprotected
Initial value:
=
{ 0, 1, 0, 15, 11, 0, 5, 5, 0, 0, 0, 0, 0, 0 }

◆ fNumFreqPtr

uint16_t* CadlibDriver::fNumFreqPtr[MAX_VOICES]
private

◆ fNumNotes

uint16_t CadlibDriver::fNumNotes[NR_STEP_PITCH][12]
private

◆ halfToneOffset

int CadlibDriver::halfToneOffset[MAX_VOICES]
private

◆ hhOpr

uint8_t CadlibDriver::hhOpr
staticprotected
Initial value:
=
{ 0, 1, 0, 15, 11, 0, 7, 5, 0, 0, 0, 0, 0, 0 }

◆ modeWaveSel

int CadlibDriver::modeWaveSel
private

◆ noteDIV12

uint8_t CadlibDriver::noteDIV12[96]
private

◆ noteMOD12

uint8_t CadlibDriver::noteMOD12[96]
private

◆ notePitch

uint8_t CadlibDriver::notePitch[MAX_VOICES]
private

◆ noteSel

uint8_t CadlibDriver::noteSel
private

◆ offsetSlot

uint8_t CadlibDriver::offsetSlot
staticprotected
Initial value:
= {
0, 1, 2, 3, 4, 5,
8, 9, 10, 11, 12, 13,
16, 17, 18, 19, 20, 21
}

◆ operSlot

uint8_t CadlibDriver::operSlot
staticprotected
Initial value:
= {
0, 0, 0,
1, 1, 1,
0, 0, 0,
1, 1, 1,
0, 0, 0,
1, 1, 1,
}

◆ opl

Copl* CadlibDriver::opl
private

◆ paramSlot

SLOT_PARAM CadlibDriver::paramSlot[18][nbLocParam]
private

◆ percBits

uint8_t CadlibDriver::percBits
private

◆ percMasks

const uint8_t CadlibDriver::percMasks
staticprotected
Initial value:
=
{0x10, 0x08, 0x04, 0x02, 0x01}

◆ percussion

uint8_t CadlibDriver::percussion
private

◆ pianoParamsOp0

uint8_t CadlibDriver::pianoParamsOp0
staticprotected
Initial value:
=
{ 1, 1, 3, 15, 5, 0, 1, 3, 15, 0, 0, 0, 1, 0 }

◆ pianoParamsOp1

uint8_t CadlibDriver::pianoParamsOp1
staticprotected
Initial value:
=
{ 0, 1, 1, 15, 7, 0, 2, 4, 0, 0, 0, 1, 0, 0 }

◆ pitchRange

int CadlibDriver::pitchRange
private

◆ pitchRangeStep

int CadlibDriver::pitchRangeStep
private

◆ sdOpr

uint8_t CadlibDriver::sdOpr
staticprotected
Initial value:
=
{ 0, 12, 0, 15, 11, 0, 8, 5, 0, 0, 0, 0, 0, 0 }

◆ slotPerc

uint8_t CadlibDriver::slotPerc
staticprotected
Initial value:
= {
{ 12, 15 },
{ 16, 0 },
{ 14, 0 },
{ 17, 0 },
{ 13, 0 }
}

◆ slotRelVolume

uint8_t CadlibDriver::slotRelVolume[18]
private

◆ slotVoice

uint8_t CadlibDriver::slotVoice
staticprotected
Initial value:
= {
{ 0, 3 },
{ 1, 4 },
{ 2, 5 },
{ 6, 9 },
{ 7, 10 },
{ 8, 11 },
{ 12, 15 },
{ 13, 16 },
{ 14, 17 }
}

◆ tomOpr

uint8_t CadlibDriver::tomOpr
staticprotected
Initial value:
=
{ 0, 4, 0, 15, 11, 0, 7, 5, 0, 0, 0, 0, 0, 0 }

◆ vibDepth

uint8_t CadlibDriver::vibDepth
private

◆ voiceKeyOn

uint8_t CadlibDriver::voiceKeyOn[MAX_VOICES]
private

◆ voiceSlot

uint8_t CadlibDriver::voiceSlot
staticprotected
Initial value:
= {
0, 1, 2,
0, 1, 2,
3, 4, 5,
3, 4, 5,
6, 7, 8,
6, 7, 8,
}

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