svcore  1.9
Note Struct Reference

NoteModel – a concrete IntervalModel for notes. More...

#include <NoteModel.h>

Classes

struct  Comparator
 
struct  OrderComparator
 

Public Member Functions

 Note (long _frame)
 
 Note (long _frame, float _value, int _duration, float _level, QString _label)
 
int getDimensions () const
 
QString getLabel () const
 
void toXml (QTextStream &stream, QString indent="", QString extraAttributes="") const
 
QString toDelimitedDataString (QString delimiter, int sampleRate) const
 

Public Attributes

long frame
 
float value
 
int duration
 
float level
 
QString label
 

Detailed Description

NoteModel – a concrete IntervalModel for notes.

Note type for use in a sparse model. All we mean by a "note" is something that has an onset time, a single value, a duration, and a level. Like other points, it can also have a label. With this point type, the model can be thought of as representing a simple MIDI-type piano roll, except that the y coordinates (values) do not have to be discrete integers.

Definition at line 38 of file NoteModel.h.

Constructor & Destructor Documentation

◆ Note() [1/2]

Note::Note ( long  _frame)
inline

Definition at line 41 of file NoteModel.h.

◆ Note() [2/2]

Note::Note ( long  _frame,
float  _value,
int  _duration,
float  _level,
QString  _label 
)
inline

Definition at line 42 of file NoteModel.h.

Member Function Documentation

◆ getDimensions()

int Note::getDimensions ( ) const
inline

Definition at line 45 of file NoteModel.h.

◆ getLabel()

QString Note::getLabel ( ) const
inline

Definition at line 53 of file NoteModel.h.

References label.

◆ toXml()

void Note::toXml ( QTextStream &  stream,
QString  indent = "",
QString  extraAttributes = "" 
) const
inline

Definition at line 55 of file NoteModel.h.

References duration, XmlExportable::encodeEntities(), frame, label, level, and value.

◆ toDelimitedDataString()

QString Note::toDelimitedDataString ( QString  delimiter,
int  sampleRate 
) const
inline

Definition at line 65 of file NoteModel.h.

References duration, frame, RealTime::frame2RealTime(), label, level, RealTime::toString(), and value.

Member Data Documentation

◆ frame

long Note::frame

◆ value

float Note::value

Definition at line 48 of file NoteModel.h.

Referenced by Note::Comparator::operator()(), toDelimitedDataString(), and toXml().

◆ duration

int Note::duration

Definition at line 49 of file NoteModel.h.

Referenced by Note::Comparator::operator()(), toDelimitedDataString(), and toXml().

◆ level

float Note::level

◆ label

QString Note::label

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