LMMS
Loading...
Searching...
No Matches
lmms::Note Class Reference

#include <Note.h>

Inheritance diagram for lmms::Note:
lmms::SerializingObject lmms::NotePlayHandle

Public Types

enum class  Type { Regular = 0 , Step }
enum class  ParameterType { Detuning = 0 }
 Types of per-note automation. Currently only detuning/pitch bending is supported. More...

Public Member Functions

 Note (const TimePos &length=TimePos(0), const TimePos &pos=TimePos(0), int key=DefaultKey, volume_t volume=DefaultVolume, panning_t panning=DefaultPanning, std::shared_ptr< DetuningHelper > detuning=nullptr)
 Note (const Note &note)
 ~Note () override
Noteoperator= (const Note &note)
Noteclone () const
 Performs a deep copy and returns an owning raw pointer.
Type type () const
void setType (Type t)
AutomationClipparameterCurve (ParameterType paramType)
void setSelected (const bool selected)
void setOldKey (const int oldKey)
void setOldPos (const TimePos &oldPos)
void setOldLength (const TimePos &oldLength)
void setIsPlaying (const bool isPlaying)
void setLength (const TimePos &length)
void setPos (const TimePos &pos)
void setKey (const int key)
virtual void setVolume (volume_t volume)
virtual void setPanning (panning_t panning)
void quantizeLength (const int qGrid)
void quantizePos (const int qGrid)
bool selected () const
int oldKey () const
TimePos oldPos () const
TimePos oldLength () const
bool isPlaying () const
TimePos endPos () const
const TimePoslength () const
const TimePospos () const
TimePos pos (TimePos basePos) const
int key () const
volume_t getVolume () const
int midiVelocity (int midiBaseVelocity) const
panning_t getPanning () const
QString nodeName () const override
const std::shared_ptr< DetuningHelper > & detuning () const
bool hasDetuningInfo () const
bool withinRange (int tickStart, int tickEnd) const
void createDetuning ()
Public Member Functions inherited from lmms::SerializingObject
 SerializingObject ()
virtual ~SerializingObject ()
virtual QDomElement saveState (QDomDocument &_doc, QDomElement &_parent)
virtual void restoreState (const QDomElement &_this)
void setHook (SerializingObjectHook *_hook)
SerializingObjectHookhook ()

Static Public Member Functions

static bool lessThan (const Note *lhs, const Note *rhs)
static QString classNodeName ()
static TimePos quantized (const TimePos &m, const int qGrid)

Protected Member Functions

void saveSettings (QDomDocument &doc, QDomElement &parent) override
void loadSettings (const QDomElement &_this) override

Private Attributes

bool m_selected
int m_oldKey
TimePos m_oldPos
TimePos m_oldLength
bool m_isPlaying
int m_key
volume_t m_volume
panning_t m_panning
TimePos m_length
TimePos m_pos
std::shared_ptr< DetuningHelperm_detuning
Type m_type = Type::Regular

Member Enumeration Documentation

◆ ParameterType

enum class lmms::Note::ParameterType
strong

Types of per-note automation. Currently only detuning/pitch bending is supported.

Enumerator
Detuning 

◆ Type

enum class lmms::Note::Type
strong
Enumerator
Regular 
Step 

Constructor & Destructor Documentation

◆ Note() [1/2]

lmms::Note::Note ( const TimePos & length = TimePos( 0 ),
const TimePos & pos = TimePos( 0 ),
int key = DefaultKey,
volume_t volume = DefaultVolume,
panning_t panning = DefaultPanning,
std::shared_ptr< DetuningHelper > detuning = nullptr )

◆ Note() [2/2]

lmms::Note::Note ( const Note & note)

◆ ~Note()

lmms::Note::~Note ( )
override

Member Function Documentation

◆ classNodeName()

QString lmms::Note::classNodeName ( )
inlinestatic

◆ clone()

Note * lmms::Note::clone ( ) const

Performs a deep copy and returns an owning raw pointer.

◆ createDetuning()

void lmms::Note::createDetuning ( )

◆ detuning()

const std::shared_ptr< DetuningHelper > & lmms::Note::detuning ( ) const
inline

◆ endPos()

TimePos lmms::Note::endPos ( ) const
inline

◆ getPanning()

panning_t lmms::Note::getPanning ( ) const
inline

◆ getVolume()

volume_t lmms::Note::getVolume ( ) const
inline

◆ hasDetuningInfo()

bool lmms::Note::hasDetuningInfo ( ) const

◆ isPlaying()

bool lmms::Note::isPlaying ( ) const
inline

◆ key()

int lmms::Note::key ( ) const
inline

◆ length()

const TimePos & lmms::Note::length ( ) const
inline

◆ lessThan()

bool lmms::Note::lessThan ( const Note * lhs,
const Note * rhs )
inlinestatic

◆ loadSettings()

void lmms::Note::loadSettings ( const QDomElement & _this)
overrideprotectedvirtual

◆ midiVelocity()

int lmms::Note::midiVelocity ( int midiBaseVelocity) const
inline

◆ nodeName()

QString lmms::Note::nodeName ( void ) const
inlineoverridevirtual

◆ oldKey()

int lmms::Note::oldKey ( ) const
inline

◆ oldLength()

TimePos lmms::Note::oldLength ( ) const
inline

◆ oldPos()

TimePos lmms::Note::oldPos ( ) const
inline

◆ operator=()

Note & lmms::Note::operator= ( const Note & note)

◆ parameterCurve()

AutomationClip * lmms::Note::parameterCurve ( ParameterType paramType)

◆ pos() [1/2]

const TimePos & lmms::Note::pos ( ) const
inline

◆ pos() [2/2]

TimePos lmms::Note::pos ( TimePos basePos) const
inline

◆ quantized()

TimePos lmms::Note::quantized ( const TimePos & m,
const int qGrid )
static

◆ quantizeLength()

void lmms::Note::quantizeLength ( const int qGrid)

◆ quantizePos()

void lmms::Note::quantizePos ( const int qGrid)

◆ saveSettings()

void lmms::Note::saveSettings ( QDomDocument & doc,
QDomElement & parent )
overrideprotectedvirtual

◆ selected()

bool lmms::Note::selected ( ) const
inline

◆ setIsPlaying()

void lmms::Note::setIsPlaying ( const bool isPlaying)
inline

◆ setKey()

void lmms::Note::setKey ( const int key)

◆ setLength()

void lmms::Note::setLength ( const TimePos & length)

◆ setOldKey()

void lmms::Note::setOldKey ( const int oldKey)
inline

◆ setOldLength()

void lmms::Note::setOldLength ( const TimePos & oldLength)
inline

◆ setOldPos()

void lmms::Note::setOldPos ( const TimePos & oldPos)
inline

◆ setPanning()

void lmms::Note::setPanning ( panning_t panning)
virtual

Reimplemented in lmms::NotePlayHandle.

◆ setPos()

void lmms::Note::setPos ( const TimePos & pos)

◆ setSelected()

void lmms::Note::setSelected ( const bool selected)
inline

◆ setType()

void lmms::Note::setType ( Type t)
inline

◆ setVolume()

void lmms::Note::setVolume ( volume_t volume)
virtual

Reimplemented in lmms::NotePlayHandle.

◆ type()

Type lmms::Note::type ( ) const
inline

◆ withinRange()

bool lmms::Note::withinRange ( int tickStart,
int tickEnd ) const

Member Data Documentation

◆ m_detuning

std::shared_ptr<DetuningHelper> lmms::Note::m_detuning
private

◆ m_isPlaying

bool lmms::Note::m_isPlaying
private

◆ m_key

int lmms::Note::m_key
private

◆ m_length

TimePos lmms::Note::m_length
private

◆ m_oldKey

int lmms::Note::m_oldKey
private

◆ m_oldLength

TimePos lmms::Note::m_oldLength
private

◆ m_oldPos

TimePos lmms::Note::m_oldPos
private

◆ m_panning

panning_t lmms::Note::m_panning
private

◆ m_pos

TimePos lmms::Note::m_pos
private

◆ m_selected

bool lmms::Note::m_selected
private

◆ m_type

Type lmms::Note::m_type = Type::Regular
private

◆ m_volume

volume_t lmms::Note::m_volume
private

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