23#ifndef H2C_INSTRUMENT_LAYER_H
24#define H2C_INSTRUMENT_LAYER_H
61 InstrumentLayer( std::shared_ptr<InstrumentLayer> other, std::shared_ptr<Sample> sample );
83 void set_sample( std::shared_ptr<Sample> sample );
118 const QString& sDrumkitPath,
120 bool bSilent =
false );
129 QString
toQString(
const QString& sPrefix =
"",
bool bShort =
true )
const override;
float get_gain() const
get the gain of the layer
void set_pitch(float pitch)
set the pitch of the layer
static std::shared_ptr< InstrumentLayer > load_from(XMLNode *pNode, const QString &sDrumkitPath, const License &drumkitLicense=License(), bool bSilent=false)
load an instrument layer from an XMLNode
void set_end_velocity(float end)
set the end velocity of the layer
float __start_velocity
the start velocity of the sample, 0.0 by default
float get_pitch() const
get the pitch of the layer
void set_start_velocity(float start)
set the start ivelocity of the layer
float __gain
ratio between the input sample and the output signal, 1.0 by default
float __pitch
the frequency of the sample, 0.0 by default which means output pitch is the same as input pitch
void set_gain(float gain)
set the gain of the layer
std::shared_ptr< Sample > __sample
the underlaying sample
void save_to(XMLNode *node, bool bFull=false)
save the instrument layer within the given XMLNode
InstrumentLayer(std::shared_ptr< Sample > sample)
constructor
~InstrumentLayer()
destructor
QString toQString(const QString &sPrefix="", bool bShort=true) const override
Formatted string version for debugging purposes.
std::shared_ptr< Sample > get_sample() const
get the sample of the layer
float get_start_velocity() const
get the start velocity of the layer
void load_sample(float fBpm=120)
Calls the H2Core::Sample::load() member function of __sample.
float __end_velocity
the end velocity of the sample, 1.0 by default
void set_sample(std::shared_ptr< Sample > sample)
set the sample of the layer
float get_end_velocity() const
get the end velocity of the layer
Wrapper class to help Hydrogen deal with the license information specified in a drumkit.
XMLNode is a subclass of QDomNode with read and write values methods.