AuLib  1.0beta
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AuLib::Note Class Reference

#include <AuLib/Note.h>

Inheritance diagram for AuLib::Note:
Inheritance graph
[legend]
Collaboration diagram for AuLib::Note:
Collaboration graph
[legend]

Public Member Functions

 Note (int32_t chn=-1)
 
const Noteprocess ()
 
bool is_on () const
 
uint64_t time_stamp () const
 
bool note_on (int32_t chn, double num, double vel, uint64_t tstamp)
 
bool note_off (int32_t chn, double num, double vel)
 
bool note_off ()
 
void ctrl_msg (int32_t chn, uint32_t msg, const std::vector< double > &data, uint64_t tstamp)
 
void set_chn (uint32_t chn)
 
- Public Member Functions inherited from AuLib::AudioBase
 AudioBase (uint32_t nchnls=def_nchnls, uint32_t vframes=def_vframes, double sr=def_sr)
 
virtual const AudioBaseoperator*= (double scal)
 
virtual const AudioBaseoperator*= (const double *sig)
 
virtual const AudioBaseoperator*= (const AudioBase &obj)
 
virtual const AudioBaseoperator+= (double offs)
 
virtual const AudioBaseoperator+= (const double *sig)
 
virtual const AudioBaseoperator+= (const AudioBase &obj)
 
double & operator[] (uint32_t ndx)
 
const double & operator[] (uint32_t ndx) const
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const AudioBaseset (const AudioBase &obj)
 
const AudioBaseset (const double *sig)
 
const double * set (double v)
 
double set (double v, uint32_t p)
 
 operator const std::vector< double > & () const
 
 operator const double * () const
 
const double * vector () const
 
double vector (uint32_t frndx, uint32_t chn) const
 
uint32_t vframes (uint32_t frames)
 
uint32_t resize_exact (uint32_t frames)
 
uint32_t vframes () const
 
uint32_t vsamps () const
 
uint32_t nchnls () const
 
uint32_t sr () const
 
uint32_t error () const
 
virtual const char * error_message () const
 

Protected Member Functions

void clear ()
 

Protected Attributes

uint64_t m_tstamp
 
double m_num
 
double m_vel
 
int32_t m_chn
 
bool m_on
 
double m_cps
 
double m_amp
 
- Protected Attributes inherited from AuLib::AudioBase
uint32_t m_nchnls
 
uint32_t m_vframes
 
std::vector< double > m_vector
 
double m_sr
 
uint32_t m_error
 

Additional Inherited Members

- Public Types inherited from AuLib::AudioBase
typedef std::vector< double >::iterator iterator
 
typedef std::vector< double >::const_iterator const_iterator
 

Detailed Description

Note class:
Base class for modelling synthesiser notes

Constructor & Destructor Documentation

◆ Note()

AuLib::Note::Note ( int32_t  chn = -1)
inline

Constructs a note for a given channel (-1 means omni, channels are ignored; this is the default)

Member Function Documentation

◆ clear()

void AuLib::Note::clear ( )
inlineprotected

◆ ctrl_msg()

void AuLib::Note::ctrl_msg ( int32_t  chn,
uint32_t  msg,
const std::vector< double > &  data,
uint64_t  tstamp 
)
inline

called to pass a msg with a list of data items

◆ is_on()

bool AuLib::Note::is_on ( ) const
inline

checks whether the note is on or off

◆ note_off() [1/2]

bool AuLib::Note::note_off ( int32_t  chn,
double  num,
double  vel 
)

called to turn a note off for a matching channel chn and number num.

◆ note_off() [2/2]

bool AuLib::Note::note_off ( )

called to turn this note off, regardless of channel or note number.

◆ note_on()

bool AuLib::Note::note_on ( int32_t  chn,
double  num,
double  vel,
uint64_t  tstamp 
)

called to turn a note on

◆ process()

const Note& AuLib::Note::process ( )
inline

processing method: call it to produce one vector of audio

◆ set_chn()

void AuLib::Note::set_chn ( uint32_t  chn)
inline

◆ time_stamp()

uint64_t AuLib::Note::time_stamp ( ) const
inline

onset time for this note

Member Data Documentation

◆ m_amp

double AuLib::Note::m_amp
protected

◆ m_chn

int32_t AuLib::Note::m_chn
protected

◆ m_cps

double AuLib::Note::m_cps
protected

◆ m_num

double AuLib::Note::m_num
protected

◆ m_on

bool AuLib::Note::m_on
protected

◆ m_tstamp

uint64_t AuLib::Note::m_tstamp
protected

◆ m_vel

double AuLib::Note::m_vel
protected

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