Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
Velocity Class Referencefinal

The MidiNote velocity. More...

#include <src/gui/dsp/velocity.h>

Inheritance diagram for Velocity:
Collaboration diagram for Velocity:

Public Types

using VelocityValueT = midi_byte_t
 

Public Member Functions

 Velocity (QObject *parent=nullptr)
 
int getValue () const
 
void setValue (int ival)
 
Q_SIGNAL void valueChanged ()
 
void set_val (int val)
 Sets the velocity to the given value.
 
void init_after_cloning (const Velocity &other, ObjectCloneType clone_type) override
 Returns the owner MidiNote.
 
- Public Member Functions inherited from ICloneable< Velocity >
std::unique_ptr< Velocityclone_unique (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
std::shared_ptr< Velocityclone_shared (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
Velocityclone_raw_ptr (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
Velocityclone_qobject (QObject *parent, ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
QScopedPointer< Velocityclone_unique_qobject (QObject *parent, ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 

Data Fields

VelocityValueT vel_ = 0
 Pointer back to the MIDI note (this is also the QObject parent).
 
VelocityValueT vel_at_start_ = 0
 Velocity at drag begin - used for ramp actions only.
 
- Data Fields inherited from ICloneable< Velocity >
friend Derived
 

Properties

QML_ELEMENT int value
 

Friends

void to_json (nlohmann::json &j, const Velocity &velocity)
 
void from_json (const nlohmann::json &j, Velocity &velocity)
 

Detailed Description

The MidiNote velocity.

Definition at line 28 of file velocity.h.

Member Typedef Documentation

◆ VelocityValueT

using Velocity::VelocityValueT = midi_byte_t

Definition at line 34 of file velocity.h.

Member Function Documentation

◆ getValue()

int Velocity::getValue ( ) const
inline

Definition at line 41 of file velocity.h.

◆ init_after_cloning()

void Velocity::init_after_cloning ( const Velocity & other,
ObjectCloneType clone_type )
overridevirtual

Returns the owner MidiNote.

Implements ICloneable< Velocity >.

◆ set_val()

void Velocity::set_val ( int val)

Sets the velocity to the given value.

The given value may exceed the bounds 0-127, and will be clamped.

◆ setValue()

void Velocity::setValue ( int ival)
inline

Definition at line 43 of file velocity.h.

Friends And Related Symbol Documentation

◆ from_json

void from_json ( const nlohmann::json & j,
Velocity & velocity )
friend

Definition at line 83 of file velocity.h.

◆ to_json

void to_json ( nlohmann::json & j,
const Velocity & velocity )
friend

Definition at line 79 of file velocity.h.

Field Documentation

◆ vel_

VelocityValueT Velocity::vel_ = 0

Pointer back to the MIDI note (this is also the QObject parent).

Velocity value (0-127).

Definition at line 93 of file velocity.h.

◆ vel_at_start_

VelocityValueT Velocity::vel_at_start_ = 0

Velocity at drag begin - used for ramp actions only.

Definition at line 96 of file velocity.h.

Property Documentation

◆ value

QML_ELEMENT int Velocity::value
readwrite

Definition at line 32 of file velocity.h.


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