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

#include <Master.h>

Public Member Functions

 Master ()
 ~Master ()
int saveXML (const char *filename)
void add2XML (XMLwrapper *xml)
void defaults ()
int loadXML (const char *filename)
void applyparameters (bool lockmutex=true)
void getfromXML (XMLwrapper *xml)
int getalldata (char **data)
void putalldata (char *data, int size)
bool mutexLock (lockset request)
void noteOn (char chan, char note, char velocity)
void noteOff (char chan, char note)
void polyphonicAftertouch (char chan, char note, char velocity)
void setController (char chan, int type, int par)
void setProgram (char chan, unsigned int pgm)
void ShutUp ()
void vuUpdate (const float *outl, const float *outr)
void AudioOut (float *outl, float *outr)
void GetAudioOutSamples (size_t nsamples, unsigned samplerate, float *outl, float *outr)
void partonoff (int npart, int what)
void setPvolume (char Pvolume_)
void setPkeyshift (char Pkeyshift_)
void setPsysefxvol (int Ppart, int Pefx, char Pvol)
void setPsysefxsend (int Pefxfrom, int Pefxto, char Pvol)
void vuresetpeaks ()
vuData getVuData ()

Static Public Member Functions

static MastergetInstance ()
static void deleteInstance ()

Public Attributes

int shutup
class Partpart [NUM_MIDI_PARTS]
unsigned char Pvolume
unsigned char Pkeyshift
unsigned char Psysefxvol [NUM_SYS_EFX][NUM_MIDI_PARTS]
unsigned char Psysefxsend [NUM_SYS_EFX][NUM_SYS_EFX]
class EffectMgrsysefx [NUM_SYS_EFX]
class EffectMgrinsefx [NUM_INS_EFX]
Recorder HDDRecorder
short int Pinsparts [NUM_INS_EFX]
float vuoutpeakpart [NUM_MIDI_PARTS]
unsigned char fakepeakpart [NUM_MIDI_PARTS]
Controller ctl
bool swaplr
Microtonal microtonal
Bank bank
class FFTwrapperfft
std::mutex mutex
std::mutex vumutex

Private Attributes

vuData vu
float volume
float sysefxvol [NUM_SYS_EFX][NUM_MIDI_PARTS]
float sysefxsend [NUM_SYS_EFX][NUM_SYS_EFX]
int keyshift
float * bufl
float * bufr
off_t off
size_t smps

Detailed Description

It sends Midi Messages to Parts, receives samples from parts, process them with system/insertion effects and mix them

Constructor & Destructor Documentation

◆ Master()

Master::Master ( )

Constructor TODO make private

◆ ~Master()

Master::~Master ( )

Destructor

Member Function Documentation

◆ add2XML()

void Master::add2XML ( XMLwrapper * xml)

This adds the parameters to the XML data

◆ applyparameters()

void Master::applyparameters ( bool lockmutex = true)

◆ AudioOut()

void Master::AudioOut ( float * outl,
float * outr )

Audio Output

◆ defaults()

void Master::defaults ( )

◆ deleteInstance()

void Master::deleteInstance ( )
static

◆ getalldata()

int Master::getalldata ( char ** data)

get all data to a newly allocated array (used for VST)

Returns
the datasize

◆ GetAudioOutSamples()

void Master::GetAudioOutSamples ( size_t nsamples,
unsigned samplerate,
float * outl,
float * outr )

Audio Output (for callback mode). This allows the program to be controled by an external program

◆ getfromXML()

void Master::getfromXML ( XMLwrapper * xml)

◆ getInstance()

Master & Master::getInstance ( )
static

◆ getVuData()

vuData Master::getVuData ( )

◆ loadXML()

int Master::loadXML ( const char * filename)

loads all settings from a XML file

Returns
0 for ok or -1 if there is an error

◆ mutexLock()

bool Master::mutexLock ( lockset request)

Control the Master's mutex state.

Parameters
lockseteither trylock, lock, or unlock.
Returns
true when successful false otherwise.

◆ noteOff()

void Master::noteOff ( char chan,
char note )

◆ noteOn()

void Master::noteOn ( char chan,
char note,
char velocity )

◆ partonoff()

void Master::partonoff ( int npart,
int what )

◆ polyphonicAftertouch()

void Master::polyphonicAftertouch ( char chan,
char note,
char velocity )

◆ putalldata()

void Master::putalldata ( char * data,
int size )

put all data from the *data array to zynaddsubfx parameters (used for VST)

◆ saveXML()

int Master::saveXML ( const char * filename)

Saves all settings to a XML file

Returns
0 for ok or <0 if there is an error

◆ setController()

void Master::setController ( char chan,
int type,
int par )

◆ setPkeyshift()

void Master::setPkeyshift ( char Pkeyshift_)

◆ setProgram()

void Master::setProgram ( char chan,
unsigned int pgm )

◆ setPsysefxsend()

void Master::setPsysefxsend ( int Pefxfrom,
int Pefxto,
char Pvol )

◆ setPsysefxvol()

void Master::setPsysefxvol ( int Ppart,
int Pefx,
char Pvol )

◆ setPvolume()

void Master::setPvolume ( char Pvolume_)

◆ ShutUp()

void Master::ShutUp ( )

◆ vuresetpeaks()

void Master::vuresetpeaks ( )

◆ vuUpdate()

void Master::vuUpdate ( const float * outl,
const float * outr )

Member Data Documentation

◆ bank

Bank Master::bank

◆ bufl

float* Master::bufl
private

◆ bufr

float* Master::bufr
private

◆ ctl

Controller Master::ctl

◆ fakepeakpart

unsigned char Master::fakepeakpart[NUM_MIDI_PARTS]

◆ fft

class FFTwrapper* Master::fft

◆ HDDRecorder

Recorder Master::HDDRecorder

◆ insefx

class EffectMgr* Master::insefx[NUM_INS_EFX]

◆ keyshift

int Master::keyshift
private

◆ microtonal

Microtonal Master::microtonal

◆ mutex

std::mutex Master::mutex

◆ off

off_t Master::off
private

◆ part

class Part* Master::part[NUM_MIDI_PARTS]

parts

Todo
see if this can be made to be dynamic

◆ Pinsparts

short int Master::Pinsparts[NUM_INS_EFX]

◆ Pkeyshift

unsigned char Master::Pkeyshift

◆ Psysefxsend

unsigned char Master::Psysefxsend[NUM_SYS_EFX][NUM_SYS_EFX]

◆ Psysefxvol

unsigned char Master::Psysefxvol[NUM_SYS_EFX][NUM_MIDI_PARTS]

◆ Pvolume

unsigned char Master::Pvolume

◆ shutup

int Master::shutup

◆ smps

size_t Master::smps
private

◆ swaplr

bool Master::swaplr

◆ sysefx

class EffectMgr* Master::sysefx[NUM_SYS_EFX]

◆ sysefxsend

float Master::sysefxsend[NUM_SYS_EFX][NUM_SYS_EFX]
private

◆ sysefxvol

float Master::sysefxvol[NUM_SYS_EFX][NUM_MIDI_PARTS]
private

◆ volume

float Master::volume
private

◆ vu

vuData Master::vu
private

◆ vumutex

std::mutex Master::vumutex

◆ vuoutpeakpart

float Master::vuoutpeakpart[NUM_MIDI_PARTS]
Todo
synchronize this with a mutex

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