hydrogen 1.1.1
DrumkitComponent Class Reference

#include <DrumkitComponent.h>

Inheritance diagram for DrumkitComponent:
Object

Public Member Functions

 DrumkitComponent (const int id, const QString &name)
 
 DrumkitComponent (DrumkitComponent *other)
 
 ~DrumkitComponent ()
 
void save_to (XMLNode *node)
 
void load_from (DrumkitComponent *component, bool is_live=true)
 
void set_name (const QString &name)
 Sets the name of the DrumkitComponent __name. More...
 
const QString & get_name () const
 Access the name of the DrumkitComponent. More...
 
void set_id (const int id)
 
int get_id () const
 
void set_volume (float volume)
 
float get_volume () const
 
void set_muted (bool active)
 
bool is_muted () const
 
void set_soloed (bool soloed)
 
bool is_soloed () const
 
void set_peak_l (float val)
 
float get_peak_l () const
 
void set_peak_r (float val)
 
float get_peak_r () const
 
void reset_outs (uint32_t nFrames)
 
void set_outs (int nBufferPos, float valL, float valR)
 
float get_out_L (int nBufferPos)
 
float get_out_R (int nBufferPos)
 
QString toQString (const QString &sPrefix, bool bShort=true) const override
 Formatted string version for debugging purposes. More...
 
- Public Member Functions inherited from Object
 ~Object ()
 destructor More...
 
 Object (const Object &obj)
 copy constructor More...
 
 Object (const char *class_name)
 constructor More...
 
const char * class_name () const
 return the class name More...
 
virtual QString toQString (const QString &sPrefix, bool bShort=true) const
 Formatted string version for debugging purposes. More...
 
void Print (bool bShort=true) const
 Prints content of toQString() via DEBUGLOG. More...
 

Static Public Member Functions

static DrumkitComponentload_from (XMLNode *node, const QString &dk_path)
 
- Static Public Member Functions inherited from Object
static void set_count (bool flag)
 enable/disable class instances counting More...
 
static bool count_active ()
 return true if class instances counting is enabled More...
 
static unsigned objects_count ()
 return the number of objects More...
 
static void write_objects_map_to (std::ostream &out)
 output the full objects map to a given ostream More...
 
static void write_objects_map_to_cerr ()
 output objects map to stderr More...
 
static int bootstrap (Logger *logger, bool count=false)
 must be called before any Object instantiation ! More...
 
static Loggerlogger ()
 return the logger instance More...
 

Private Attributes

int __id
 
QString __name
 Name of the DrumkitComponent. More...
 
float __volume
 
bool __muted
 
bool __soloed
 
float __peak_l
 
float __peak_r
 
float * __out_L
 
float * __out_R
 

Additional Inherited Members

- Static Public Attributes inherited from Object
static QString sPrintIndention = " "
 String used to format the debugging string output of some core classes. More...
 
- Static Protected Attributes inherited from Object
static Logger__logger = nullptr
 logger instance pointer More...
 

Constructor & Destructor Documentation

◆ DrumkitComponent() [1/2]

DrumkitComponent ( const int  id,
const QString &  name 
)

◆ DrumkitComponent() [2/2]

◆ ~DrumkitComponent()

Member Function Documentation

◆ get_id()

int get_id ( ) const
inline

◆ get_name()

const QString & get_name ( ) const
inline

Access the name of the DrumkitComponent.

Returns
__name

◆ get_out_L()

float get_out_L ( int  nBufferPos)

◆ get_out_R()

float get_out_R ( int  nBufferPos)

◆ get_peak_l()

float get_peak_l ( ) const
inline

◆ get_peak_r()

float get_peak_r ( ) const
inline

◆ get_volume()

float get_volume ( ) const
inline

◆ is_muted()

bool is_muted ( ) const
inline

◆ is_soloed()

bool is_soloed ( ) const
inline

◆ load_from() [1/2]

void load_from ( DrumkitComponent component,
bool  is_live = true 
)

◆ load_from() [2/2]

DrumkitComponent * load_from ( XMLNode node,
const QString &  dk_path 
)
static

◆ reset_outs()

void reset_outs ( uint32_t  nFrames)

◆ save_to()

void save_to ( XMLNode node)

◆ set_id()

void set_id ( const int  id)
inline

◆ set_muted()

void set_muted ( bool  active)
inline

◆ set_name()

void set_name ( const QString &  name)
inline

Sets the name of the DrumkitComponent __name.

Parameters
nameNew name.

◆ set_outs()

void set_outs ( int  nBufferPos,
float  valL,
float  valR 
)
inline

◆ set_peak_l()

void set_peak_l ( float  val)
inline

◆ set_peak_r()

void set_peak_r ( float  val)
inline

◆ set_soloed()

void set_soloed ( bool  soloed)
inline

◆ set_volume()

void set_volume ( float  volume)
inline

◆ toQString()

QString toQString ( const QString &  sPrefix,
bool  bShort = true 
) const
overridevirtual

Formatted string version for debugging purposes.

Parameters
sPrefixString prefix which will be added in front of every new line
bShortInstead of the whole content of all classes stored as members just a single unique identifier will be displayed without line breaks.
Returns
String presentation of current object.

Reimplemented from Object.

Field Documentation

◆ __id

int __id
private

◆ __muted

bool __muted
private

◆ __name

QString __name
private

Name of the DrumkitComponent.

It is set by set_name() and accessed via get_name().

◆ __out_L

float* __out_L
private

◆ __out_R

float* __out_R
private

◆ __peak_l

float __peak_l
private

◆ __peak_r

float __peak_r
private

◆ __soloed

bool __soloed
private

◆ __volume

float __volume
private