hydrogen 1.2.6
Note Class Reference

A note plays an associated instrument with a velocity left and right pan. More...

#include <Note.h>

Inheritance diagram for Note:
Object< Note > Base

Public Types

enum  Key {
  C =KEY_MIN , Cs , D , Ef ,
  E , F , Fs , G ,
  Af , A , Bf , B
}
 possible keys More...
 
enum  Octave {
  P8Z =-3 , P8Y =-2 , P8X =-1 , P8 =OCTAVE_DEFAULT ,
  P8A =1 , P8B =2 , P8C =3
}
 possible octaves More...
 

Public Member Functions

 Note (Note *pOther, std::shared_ptr< Instrument > pInstrument=nullptr)
 copy constructor with an optional parameter
 
 Note (std::shared_ptr< Instrument > pInstrument, int nPosition=0, float fVelocity=0.8, float fPan=0.0, int nLength=-1, float fPitch=0.0)
 constructor
 
 ~Note ()
 destructor
 
void compute_lr_values (float *val_l, float *val_r)
 compute left and right output based on filters
 
void computeNoteStart ()
 Calculates the m_nNoteStart in frames corresponding to the __position in ticks and storing the used tick size in m_fUsedTickSize.
 
bool filter_sustain () const
 Filter output is sustaining note.
 
std::shared_ptr< ADSRget_adsr () const
 get the ADSR of the note
 
float get_bpfb_l () const
 __bpfb_l accessor
 
float get_bpfb_r () const
 __bpfb_r accessor
 
float get_cut_off () const
 __cut_off accessor
 
int get_humanize_delay () const
 __humanize_delay accessor
 
std::shared_ptr< Instrumentget_instrument ()
 __instrument accessor
 
int get_instrument_id () const
 __instrument_id accessor
 
bool get_just_recorded () const
 __just_recorded accessor
 
Key get_key ()
 __key accessor
 
std::shared_ptr< SelectedLayerInfoget_layer_selected (int CompoID)
 
std::map< int, std::shared_ptr< SelectedLayerInfo > > get_layers_selected () const
 
float get_lead_lag () const
 __lead_lag accessor
 
int get_length () const
 __length accessor
 
float get_lpfb_l () const
 __lpfb_l accessor
 
float get_lpfb_r () const
 __lpfb_r accessor
 
int get_midi_key () const
 return scaled key for midi output, !
 
int get_midi_msg () const
 __midi_msg accessor
 
int get_midi_velocity () const
 midi velocity accessor
 
bool get_note_off () const
 __note_off accessor
 
float get_notekey_pitch () const
 note key pitch accessor
 
Octave get_octave ()
 __octave accessor
 
int get_pattern_idx () const
 __pattern_idx accessor
 
float get_pitch () const
 __pitch accessor
 
int get_position () const
 __position accessor
 
float get_probability () const
 
float get_resonance () const
 __resonance accessor
 
int get_specific_compo_id () const
 __specific_compo_id accessor
 
float get_total_pitch () const
 
float get_velocity () const
 __velocity accessor
 
long long getNoteStart () const
 
float getPan () const
 get pan of the note.
 
float getPanWithRangeFrom0To1 () const
 get pan of the note, scaling and translating the range from [-1;1] to [0;1]
 
std::shared_ptr< SamplegetSample (int nComponentID, int nSelectedLayer=-1)
 Returns the sample associated with the note for a specific InstrumentComponent nComponentID.
 
float getUsedTickSize () const
 
bool has_instrument () const
 return true if __instrument is set
 
void humanize ()
 Add random contributions to __pitch, __humanize_delay, and __velocity.
 
bool isPartiallyRendered () const
 
QString key_to_string ()
 return a string representation of key-octave
 
void map_instrument (std::shared_ptr< InstrumentList > instruments)
 find the corresponding instrument and point to it, or an empty instrument
 
bool match (const Note *pNote) const
 Return true if two notes match in instrument, key and octave.
 
bool match (const std::shared_ptr< Note > pNote) const
 
bool match (std::shared_ptr< Instrument > instrument, Key key, Octave octave) const
 return true if instrument, key and octave matches with internal
 
void save_to (XMLNode *node)
 
void set_humanize_delay (int value)
 __humanize_delay setter
 
void set_instrument_id (int value)
 __instrument_id setter
 
void set_just_recorded (bool value)
 __just_recorded setter
 
void set_key_octave (const QString &str)
 parse str and set __key and __octave
 
void set_key_octave (Key key, Octave octave)
 set __key and __octave only if within acceptable range
 
void set_lead_lag (float value)
 __lead_lag setter
 
void set_length (int value)
 __length setter
 
void set_midi_info (Key key, Octave octave, int msg)
 set __key, __octave and __midi_msg only if within acceptable range
 
void set_note_off (bool value)
 __note_off setter
 
void set_pattern_idx (int value)
 __pattern_idx setter
 
void set_pitch (float value)
 __pitch setter
 
void set_position (int value)
 __position setter
 
void set_probability (float value)
 
void set_specific_compo_id (int value)
 __specific_compo_id setter
 
void set_velocity (float value)
 __velocity setter
 
void setPan (float val)
 set pan of the note.
 
void setPanWithRangeFrom0To1 (float fVal)
 set pan of the note, assuming the input range in [0;1]
 
void swing ()
 Add swing contribution to __humanize_delay.
 
QString toQString (const QString &sPrefix="", bool bShort=true) const override
 Formatted string version for debugging purposes.
 
- Public Member Functions inherited from Object< Note >
 Object ()
 
 Object (const Object< Note > &other)
 
- Public Member Functions inherited from Base
 Base ()
 
 Base (const Base &other)
 
virtual const char * class_name () const
 
void logBacktrace () const
 Print the current stack at point into the debug log.
 
void Print (bool bShort=true) const
 Prints content of toQString() via DEBUGLOG.
 

Static Public Member Functions

static QString KeyToQString (Key key)
 
static Noteload_from (XMLNode *node, std::shared_ptr< InstrumentList > instruments, bool bSilent=false)
 load a note from an XMLNode
 
static int octaveKeyToPitch (Octave octave, Key key)
 
static double pitchToFrequency (double fPitch)
 Convert a logarithmic pitch-space value in semitones to a frequency-domain value.
 
static Key pitchToKey (int nPitch)
 
static Octave pitchToOctave (int nPitch)
 
- Static Public Member Functions inherited from Base
static const char * _class_name ()
 return the class name
 
static QString base_clock (const QString &sMsg)
 Measures the current time and stores it in __last_clock.
 
static QString base_clock_in (const QString &sMsg)
 
static int bootstrap (Logger *logger, bool count=false)
 must be called before any Object instantiation !
 
static bool count_active ()
 
static int getAliveObjectCount ()
 
static object_map_t getObjectMap ()
 
static Loggerlogger ()
 return the logger instance
 
static int objects_count ()
 
static void printObjectMapDiff (object_map_t map)
 Creates the difference between a snapshot of the object map and its current state and prints it to std::cout.
 
static void set_count (bool flag)
 enable/disable class instances counting
 
static void write_objects_map_to (std::ostream &out, object_map_t *map=nullptr)
 output the full objects map to a given ostream
 
static void write_objects_map_to_cerr ()
 output objects map to stderr
 

Private Attributes

std::shared_ptr< ADSR__adsr
 attack decay sustain release
 
float __bpfb_l
 left band pass filter buffer
 
float __bpfb_r
 right band pass filter buffer
 
float __cut_off
 filter cutoff [0;1]
 
int __humanize_delay
 frequency [0;1]
 
std::shared_ptr< Instrument__instrument
 the instrument to be played by this note
 
int __instrument_id
 the id of the instrument played by this note
 
bool __just_recorded
 used in record+delete
 
Key __key
 the key, [0;11]==[C;B]
 
std::map< int, std::shared_ptr< SelectedLayerInfo > > __layers_selected
 
float __lead_lag
 lead or lag offset of the note
 
int __length
 left to right, as requested by Sampler PanLaws
 
float __lpfb_l
 left low pass filter buffer
 
float __lpfb_r
 right low pass filter buffer
 
int __midi_msg
 TODO.
 
bool __note_off
 note type on|off
 
Octave __octave
 the octave [-3;3]
 
int __pattern_idx
 index of the pattern holding this note for undo actions
 
float __pitch
 the frequency of the note
 
int __position
 note position in
 
float __probability
 note probability
 
float __resonance
 filter resonant
 
int __specific_compo_id
 play a specific component, -1 if playing all
 
float __velocity
 ticks inside the pattern
 
float m_fPan
 pan of the note, [-1;1] from
 
float m_fUsedTickSize
 TransportPosition::m_fTickSize used to calculate m_nNoteStart.
 
long long m_nNoteStart
 from __key an __octave
 

Static Private Attributes

static const char * __key_str [] = { "C", "Cs", "D", "Ef", "E", "F", "Fs", "G", "Af", "A", "Bf", "B" }
 used to build QString
 

Additional Inherited Members

- Static Public Attributes inherited from Base
static QString sPrintIndention = " "
 String used to format the debugging string output of some core classes.
 
- Protected Member Functions inherited from Object< Note >
 ~Object ()
 
- Protected Member Functions inherited from Base
 ~Base ()
 
- Static Protected Member Functions inherited from Base
static void registerClass (const char *name, const atomic_obj_cpt_t *counters)
 
- Static Protected Attributes inherited from Base
static bool __count = false
 should we count class instances
 
static timeval __last_clock = { 0, 0 }
 
static Logger__logger = nullptr
 
static bool bLogColors = true
 

Detailed Description

A note plays an associated instrument with a velocity left and right pan.

Definition at line 100 of file Note.h.

Member Enumeration Documentation

◆ Key

enum Key

possible keys

Enumerator
Cs 
Ef 
Fs 
Af 
Bf 

Definition at line 105 of file Note.h.

◆ Octave

enum Octave

possible octaves

Enumerator
P8Z 
P8Y 
P8X 
P8 
P8A 
P8B 
P8C 

Definition at line 109 of file Note.h.

Constructor & Destructor Documentation

◆ Note() [1/2]

Note ( std::shared_ptr< Instrument > pInstrument,
int nPosition = 0,
float fVelocity = 0.8,
float fPan = 0.0,
int nLength = -1,
float fPitch = 0.0 )

constructor

Parameters
pInstrumentthe instrument played by this note
nPositionthe position of the note within the pattern
fVelocityit's velocity
fFanpan
nLengthLength of the note in frames. If set to -1, the length of the H2Core::Sample used during playback will be used instead.
fPitchit's pitch

Definition at line 45 of file Note.cpp.

◆ Note() [2/2]

Note ( Note * pOther,
std::shared_ptr< Instrument > pInstrument = nullptr )

copy constructor with an optional parameter

Parameters
pOther
pInstrumentif set will be used as note instrument

Definition at line 89 of file Note.cpp.

◆ ~Note()

~Note ( )

destructor

Definition at line 134 of file Note.cpp.

Member Function Documentation

◆ compute_lr_values()

void compute_lr_values ( float * val_l,
float * val_r )
inline

compute left and right output based on filters

Parameters
val_lthe left channel value
val_rthe right channel value

Definition at line 727 of file Note.h.

◆ computeNoteStart()

void computeNoteStart ( )

Calculates the m_nNoteStart in frames corresponding to the __position in ticks and storing the used tick size in m_fUsedTickSize.

Whenever the tempo changes and the Timeline is not enabled, the m_nNoteStart gets invalidated and this function needs to be rerun.

Definition at line 234 of file Note.cpp.

◆ filter_sustain()

bool filter_sustain ( ) const
inline

Filter output is sustaining note.

Definition at line 664 of file Note.h.

◆ get_adsr()

std::shared_ptr< ADSR > get_adsr ( ) const
inline

get the ADSR of the note

Definition at line 494 of file Note.h.

◆ get_bpfb_l()

float get_bpfb_l ( ) const
inline

__bpfb_l accessor

Definition at line 644 of file Note.h.

◆ get_bpfb_r()

float get_bpfb_r ( ) const
inline

__bpfb_r accessor

Definition at line 649 of file Note.h.

◆ get_cut_off()

float get_cut_off ( ) const
inline

__cut_off accessor

Definition at line 634 of file Note.h.

◆ get_humanize_delay()

int get_humanize_delay ( ) const
inline

__humanize_delay accessor

Definition at line 629 of file Note.h.

◆ get_instrument()

std::shared_ptr< Instrument > get_instrument ( )
inline

__instrument accessor

Definition at line 499 of file Note.h.

◆ get_instrument_id()

int get_instrument_id ( ) const
inline

__instrument_id accessor

Definition at line 514 of file Note.h.

◆ get_just_recorded()

bool get_just_recorded ( ) const
inline

__just_recorded accessor

Definition at line 604 of file Note.h.

◆ get_key()

Note::Key get_key ( )
inline

__key accessor

Definition at line 671 of file Note.h.

◆ get_layer_selected()

std::shared_ptr< SelectedLayerInfo > get_layer_selected ( int CompoID)
inline

Definition at line 619 of file Note.h.

◆ get_layers_selected()

std::map< int, std::shared_ptr< SelectedLayerInfo > > get_layers_selected ( ) const
inline

Definition at line 624 of file Note.h.

◆ get_lead_lag()

float get_lead_lag ( ) const
inline

__lead_lag accessor

Definition at line 549 of file Note.h.

◆ get_length()

int get_length ( ) const
inline

__length accessor

Definition at line 559 of file Note.h.

◆ get_lpfb_l()

float get_lpfb_l ( ) const
inline

__lpfb_l accessor

Definition at line 654 of file Note.h.

◆ get_lpfb_r()

float get_lpfb_r ( ) const
inline

__lpfb_r accessor

Definition at line 659 of file Note.h.

◆ get_midi_key()

int get_midi_key ( ) const
inline

return scaled key for midi output, !

!! DO NOT CHECK IF INSTRUMENT IS SET !!!

Definition at line 681 of file Note.h.

◆ get_midi_msg()

int get_midi_msg ( ) const
inline

__midi_msg accessor

Definition at line 584 of file Note.h.

◆ get_midi_velocity()

int get_midi_velocity ( ) const
inline

midi velocity accessor

#define MIDI_FACTOR
Definition Note.h:43
float __velocity
ticks inside the pattern
Definition Note.h:429

Definition at line 690 of file Note.h.

◆ get_note_off()

bool get_note_off ( ) const
inline

__note_off accessor

Definition at line 579 of file Note.h.

◆ get_notekey_pitch()

float get_notekey_pitch ( ) const
inline

note key pitch accessor

#define KEYS_PER_OCTAVE
Definition Note.h:40
Key __key
the key, [0;11]==[C;B]
Definition Note.h:440
Octave __octave
the octave [-3;3]
Definition Note.h:441

Definition at line 695 of file Note.h.

◆ get_octave()

Note::Octave get_octave ( )
inline

__octave accessor

Definition at line 676 of file Note.h.

◆ get_pattern_idx()

int get_pattern_idx ( ) const
inline

__pattern_idx accessor

Definition at line 594 of file Note.h.

◆ get_pitch()

float get_pitch ( ) const
inline

__pitch accessor

Definition at line 569 of file Note.h.

◆ get_position()

int get_position ( ) const
inline

__position accessor

Definition at line 534 of file Note.h.

◆ get_probability()

float get_probability ( ) const
inline

Definition at line 609 of file Note.h.

◆ get_resonance()

float get_resonance ( ) const
inline

__resonance accessor

Definition at line 639 of file Note.h.

◆ get_specific_compo_id()

int get_specific_compo_id ( ) const
inline

__specific_compo_id accessor

Definition at line 524 of file Note.h.

◆ get_total_pitch()

float get_total_pitch ( ) const
Returns
__octave * 12 + __key + __pitch + __instrument->get_pitch_offset()
std::shared_ptr< Instrument > __instrument
the instrument to be played by this note
Definition Note.h:424
float __pitch
the frequency of the note
Definition Note.h:439

Definition at line 421 of file Note.cpp.

◆ get_velocity()

float get_velocity ( ) const
inline

__velocity accessor

Definition at line 539 of file Note.h.

◆ getNoteStart()

long long getNoteStart ( ) const
inline

Definition at line 746 of file Note.h.

◆ getPan()

float getPan ( ) const
inline

get pan of the note.

Output pan range: [-1;1]

Definition at line 544 of file Note.h.

◆ getPanWithRangeFrom0To1()

float getPanWithRangeFrom0To1 ( ) const
inline

get pan of the note, scaling and translating the range from [-1;1] to [0;1]

Definition at line 196 of file Note.h.

◆ getSample()

std::shared_ptr< Sample > getSample ( int nComponentID,
int nSelectedLayer = -1 )

Returns the sample associated with the note for a specific InstrumentComponent nComponentID.

A sample of the InstrumentComponent is a possible candidate if the note velocity falls within the start and end velocity of an InstrumentLayer. In case multiple samples are possible the function will either pick the provided nSelectedLayer or - for nSelectedLayer == -1 - the selection algorithm stored in __instrument to determined a layer.

The function stores the selected layer in __layers_selected and will reuse this parameter in every following call while disregarding the provided nSelectedLayer.

Definition at line 262 of file Note.cpp.

◆ getUsedTickSize()

float getUsedTickSize ( ) const
inline

Definition at line 749 of file Note.h.

◆ has_instrument()

bool has_instrument ( ) const
inline

return true if __instrument is set

Definition at line 504 of file Note.h.

◆ humanize()

void humanize ( )

Add random contributions to __pitch, __humanize_delay, and __velocity.

Definition at line 431 of file Note.cpp.

◆ isPartiallyRendered()

bool isPartiallyRendered ( ) const
Returns
true if the Sampler already started rendering this note.

Definition at line 221 of file Note.cpp.

◆ key_to_string()

QString key_to_string ( )

return a string representation of key-octave

Definition at line 197 of file Note.cpp.

◆ KeyToQString()

QString KeyToQString ( Key key)
static

Definition at line 650 of file Note.cpp.

◆ load_from()

Note * load_from ( XMLNode * node,
std::shared_ptr< InstrumentList > instruments,
bool bSilent = false )
static

load a note from an XMLNode

Parameters
nodethe XMLDode to read from
instrumentsthe current instrument list to search instrument into
bSilentWhether infos, warnings, and errors should be logged.
Returns
a new Note instance

Definition at line 500 of file Note.cpp.

◆ map_instrument()

void map_instrument ( std::shared_ptr< InstrumentList > instruments)

find the corresponding instrument and point to it, or an empty instrument

Parameters
instrumentsthe list of instrument to look into

Definition at line 168 of file Note.cpp.

◆ match() [1/3]

bool match ( const Note * pNote) const
inline

Return true if two notes match in instrument, key and octave.

Definition at line 718 of file Note.h.

◆ match() [2/3]

bool match ( const std::shared_ptr< Note > pNote) const
inline

Definition at line 722 of file Note.h.

◆ match() [3/3]

bool match ( std::shared_ptr< Instrument > instrument,
Key key,
Octave octave ) const
inline

return true if instrument, key and octave matches with internal

Parameters
instrumentthe instrument to match with __instrument
keythe key to match with __key
octavethe octave to match with __octave

Definition at line 713 of file Note.h.

◆ octaveKeyToPitch()

static int octaveKeyToPitch ( Octave octave,
Key key )
inlinestatic

Definition at line 402 of file Note.h.

◆ pitchToFrequency()

static double pitchToFrequency ( double fPitch)
inlinestatic

Convert a logarithmic pitch-space value in semitones to a frequency-domain value.

Definition at line 387 of file Note.h.

◆ pitchToKey()

static Key pitchToKey ( int nPitch)
inlinestatic

Definition at line 399 of file Note.h.

◆ pitchToOctave()

static Octave pitchToOctave ( int nPitch)
inlinestatic

Definition at line 392 of file Note.h.

◆ save_to()

void save_to ( XMLNode * node)

Definition at line 486 of file Note.cpp.

◆ set_humanize_delay()

void set_humanize_delay ( int value)

__humanize_delay setter

Parameters
valuethe new value

Definition at line 157 of file Note.cpp.

◆ set_instrument_id()

void set_instrument_id ( int value)
inline

__instrument_id setter

Parameters
valuethe new value

Definition at line 509 of file Note.h.

◆ set_just_recorded()

void set_just_recorded ( bool value)
inline

__just_recorded setter

Parameters
valuethe new value

Definition at line 599 of file Note.h.

◆ set_key_octave() [1/2]

void set_key_octave ( const QString & str)

parse str and set __key and __octave

Parameters
strthe string to be parsed

Definition at line 202 of file Note.cpp.

◆ set_key_octave() [2/2]

void set_key_octave ( Key key,
Octave octave )
inline

set __key and __octave only if within acceptable range

Parameters
keythe key to set
octavethe octave to be set

Definition at line 700 of file Note.h.

◆ set_lead_lag()

void set_lead_lag ( float value)

__lead_lag setter

Parameters
valuethe new value

Definition at line 148 of file Note.cpp.

◆ set_length()

void set_length ( int value)
inline

__length setter

Parameters
valuethe new value

Definition at line 554 of file Note.h.

◆ set_midi_info()

void set_midi_info ( Key key,
Octave octave,
int msg )
inline

set __key, __octave and __midi_msg only if within acceptable range

Parameters
keythe key to set
octavethe octave to be set
msg

Definition at line 706 of file Note.h.

◆ set_note_off()

void set_note_off ( bool value)
inline

__note_off setter

Parameters
valuethe new value

Definition at line 574 of file Note.h.

◆ set_pattern_idx()

void set_pattern_idx ( int value)
inline

__pattern_idx setter

Parameters
valuethe new value

Definition at line 589 of file Note.h.

◆ set_pitch()

void set_pitch ( float value)
inline

__pitch setter

Parameters
valuethe new value

Definition at line 564 of file Note.h.

◆ set_position()

void set_position ( int value)
inline

__position setter

Parameters
valuethe new value

Definition at line 529 of file Note.h.

◆ set_probability()

void set_probability ( float value)
inline

Definition at line 614 of file Note.h.

◆ set_specific_compo_id()

void set_specific_compo_id ( int value)
inline

__specific_compo_id setter

Parameters
valuethe new value

Definition at line 519 of file Note.h.

◆ set_velocity()

void set_velocity ( float value)

__velocity setter

Parameters
valuethe new value

Definition at line 143 of file Note.cpp.

◆ setPan()

void setPan ( float val)

set pan of the note.

assumes the input range in [-1;1]

Definition at line 153 of file Note.cpp.

◆ setPanWithRangeFrom0To1()

void setPanWithRangeFrom0To1 ( float fVal)
inline

set pan of the note, assuming the input range in [0;1]

Definition at line 190 of file Note.h.

◆ swing()

void swing ( )

Add swing contribution to __humanize_delay.

As the value applied is deterministic, it will not be handled in humanice() but separately.

Definition at line 460 of file Note.cpp.

◆ 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 Base.

Definition at line 534 of file Note.cpp.

Field Documentation

◆ __adsr

std::shared_ptr<ADSR> __adsr
private

attack decay sustain release

Definition at line 442 of file Note.h.

◆ __bpfb_l

float __bpfb_l
private

left band pass filter buffer

Definition at line 458 of file Note.h.

◆ __bpfb_r

float __bpfb_r
private

right band pass filter buffer

Definition at line 459 of file Note.h.

◆ __cut_off

float __cut_off
private

filter cutoff [0;1]

Definition at line 444 of file Note.h.

◆ __humanize_delay

int __humanize_delay
private

frequency [0;1]

Offset of the note start in frames.

It includes contributions of the onset humanization, the lead lag factor, and the swing. For some of these a random value will be drawn but once stored in this variable, the delay is fixed and will not change anymore.

It is incorporated in the m_nNoteStart.

Definition at line 456 of file Note.h.

◆ __instrument

std::shared_ptr<Instrument> __instrument
private

the instrument to be played by this note

Definition at line 424 of file Note.h.

◆ __instrument_id

int __instrument_id
private

the id of the instrument played by this note

Definition at line 425 of file Note.h.

◆ __just_recorded

bool __just_recorded
private

used in record+delete

Definition at line 465 of file Note.h.

◆ __key

Key __key
private

the key, [0;11]==[C;B]

Definition at line 440 of file Note.h.

◆ __key_str

const char * __key_str = { "C", "Cs", "D", "Ef", "E", "F", "Fs", "G", "Af", "A", "Bf", "B" }
staticprivate

used to build QString

Definition at line 467 of file Note.h.

◆ __layers_selected

std::map< int, std::shared_ptr<SelectedLayerInfo> > __layers_selected
private

Definition at line 457 of file Note.h.

◆ __lead_lag

float __lead_lag
private

lead or lag offset of the note

Definition at line 443 of file Note.h.

◆ __length

int __length
private

left to right, as requested by Sampler PanLaws

Length of the note in frames.

If set to -1, the Note will be rendered till the end of all contained Samples is reached. the length of the note

Definition at line 438 of file Note.h.

◆ __lpfb_l

float __lpfb_l
private

left low pass filter buffer

Definition at line 460 of file Note.h.

◆ __lpfb_r

float __lpfb_r
private

right low pass filter buffer

Definition at line 461 of file Note.h.

◆ __midi_msg

int __midi_msg
private

TODO.

Definition at line 463 of file Note.h.

◆ __note_off

bool __note_off
private

note type on|off

Definition at line 464 of file Note.h.

◆ __octave

Octave __octave
private

the octave [-3;3]

Definition at line 441 of file Note.h.

◆ __pattern_idx

int __pattern_idx
private

index of the pattern holding this note for undo actions

Definition at line 462 of file Note.h.

◆ __pitch

float __pitch
private

the frequency of the note

Definition at line 439 of file Note.h.

◆ __position

int __position
private

note position in

Definition at line 427 of file Note.h.

◆ __probability

float __probability
private

note probability

Definition at line 466 of file Note.h.

◆ __resonance

float __resonance
private

filter resonant

Definition at line 445 of file Note.h.

◆ __specific_compo_id

int __specific_compo_id
private

play a specific component, -1 if playing all

Definition at line 426 of file Note.h.

◆ __velocity

float __velocity
private

ticks inside the pattern

velocity (intensity) of the note [0;1]

Definition at line 429 of file Note.h.

◆ m_fPan

float m_fPan
private

pan of the note, [-1;1] from

Definition at line 430 of file Note.h.

◆ m_fUsedTickSize

float m_fUsedTickSize
private

TransportPosition::m_fTickSize used to calculate m_nNoteStart.

If m_nNoteStart was calculated in the presence of an active Timeline, it will be set to -1.

Used to check whether the note start has to be rescaled because of a change in speed (which occurs less often and is faster than recalculating m_nNoteStart everywhere it is required.)

This member is only used by the AudioEngine and Sampler during processing and not written to disk.

Definition at line 489 of file Note.h.

◆ m_nNoteStart

long long m_nNoteStart
private

from __key an __octave

Onset of the note in frames.

This member is only used by the AudioEngine and Sampler during processing and not written to disk.

Definition at line 475 of file Note.h.