svcore
1.9
|
#include <BasicCompressedDenseThreeDimensionalModel.h>
Public Types | |
typedef ColumnOp::Column | Column |
typedef Id | ModelId |
typedef TypedId< Model > | Id |
enum | { NO_ID = -1 } |
typedef int | ExportId |
enum | { SortRole = Qt::UserRole } |
enum | SortType { SortNumeric, SortAlphabetical } |
Signals | |
void | modelChanged (ModelId myId) |
Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly) More... | |
void | modelChangedWithin (ModelId myId, sv_frame_t startFrame, sv_frame_t endFrame) |
Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly) More... | |
void | completionChanged (ModelId myId) |
Emitted when some internal processing has advanced a stage, but the model has not changed externally. More... | |
void | ready (ModelId myId) |
Emitted when internal processing is complete (i.e. More... | |
void | alignmentCompletionChanged (ModelId myId) |
Emitted when the completion percentage changes for the calculation of this model's alignment model. More... | |
Public Member Functions | |
BasicCompressedDenseThreeDimensionalModel (sv_samplerate_t sampleRate, int resolution, int height, bool notifyOnAdd=true) | |
bool | isOK () const override |
Return true if the model was constructed successfully. More... | |
bool | isReady (int *completion=0) const override |
Return true if the model has finished loading or calculating all its data, for a model that is capable of calculating in a background thread. More... | |
void | setCompletion (int completion, bool update=true) |
int | getCompletion () const override |
Return an estimated percentage value showing how far through any background operation used to calculate or load the model data the model thinks it is. More... | |
sv_samplerate_t | getSampleRate () const override |
Return the frame rate in frames per second. More... | |
sv_frame_t | getStartFrame () const override |
Return the first audio frame spanned by the model. More... | |
sv_frame_t | getTrueEndFrame () const override |
Return the audio frame at the end of the model. More... | |
virtual void | setStartFrame (sv_frame_t) |
Set the frame offset of the first column. More... | |
int | getResolution () const override |
Return the number of sample frames covered by each set of bins. More... | |
virtual void | setResolution (int sz) |
Set the number of sample frames covered by each set of bins. More... | |
int | getWidth () const override |
Return the number of columns. More... | |
int | getHeight () const override |
Return the number of bins in each column. More... | |
virtual void | setHeight (int sz) |
Set the number of bins in each column. More... | |
float | getMinimumLevel () const override |
Return the minimum value of the value in each bin. More... | |
virtual void | setMinimumLevel (float sz) |
Set the minimum value of the value in a bin. More... | |
float | getMaximumLevel () const override |
Return the maximum value of the value in each bin. More... | |
virtual void | setMaximumLevel (float sz) |
Set the maximum value of the value in a bin. More... | |
Column | getColumn (int x) const override |
Get the set of bin values at the given column. More... | |
float | getValueAt (int x, int n) const override |
Get a single value, from the n'th bin of the given column. More... | |
virtual void | setColumn (int x, const Column &values) |
Set the entire set of bin values at the given column. More... | |
QString | getBinName (int n) const override |
Return the name of bin n. More... | |
virtual void | setBinName (int n, QString) |
Set the name of bin n. More... | |
virtual void | setBinNames (std::vector< QString > names) |
Set the names of all bins. More... | |
bool | hasBinValues () const override |
Return true if the bins have values as well as names. More... | |
float | getBinValue (int n) const override |
Return the value of bin n, if any. More... | |
virtual void | setBinValues (std::vector< float > values) |
Set the values of all bins (separate from their labels). More... | |
QString | getBinValueUnit () const override |
Obtain the name of the unit of the values returned from getBinValue(), if any. More... | |
virtual void | setBinValueUnit (QString unit) |
Set the name of the unit of the values return from getBinValue() if any. More... | |
bool | shouldUseLogValueScale () const override |
Return true if the distribution of values in the bins is such as to suggest a log scale (mapping to colour etc) may be better than a linear one. More... | |
QString | getTypeName () const override |
Return the type of the model. More... | |
QVector< QString > | getStringExportHeaders (DataExportOptions options) const override |
Return a label for each column that would be written by toStringExportRows. More... | |
QVector< QVector< QString > > | toStringExportRows (DataExportOptions options, sv_frame_t startFrame, sv_frame_t duration) const override |
Emit events starting within the given range as string rows ready for conversion to an e.g. More... | |
void | toXml (QTextStream &out, QString indent="", QString extraAttributes="") const override |
Stream this exportable object out to XML on a text stream. More... | |
bool | isLocalPeak (int x, int y) |
Utility function to query whether a given bin is greater than its (vertical) neighbours. More... | |
bool | isOverThreshold (int x, int y, float threshold) |
Utility function to query whether a given bin is greater than a certain threshold. More... | |
int | getRowCount () const override |
Return the number of rows (items) in the model. More... | |
int | getColumnCount () const override |
Return the number of columns (values/labels/etc per item). More... | |
bool | isEditable () const override |
Return true if the model is user-editable, false otherwise. More... | |
Command * | getSetDataCommand (int, int, const QVariant &, int) override |
Return a command to set the value in the given cell, for the given role, to the contents of the supplied variant. More... | |
Command * | getInsertRowCommand (int) override |
Return a command to insert a new row before the row with the given index. More... | |
Command * | getRemoveRowCommand (int) override |
Return a command to delete the row with the given index. More... | |
QString | getHeading (int column) const override |
Return the heading for a given column, e.g. More... | |
QVariant | getData (int row, int column, int) const override |
Get the value in the given cell, for the given role. More... | |
bool | isColumnTimeValue (int col) const override |
Return true if the column is the frame time of the item, or an alternative representation of it (i.e. More... | |
SortType | getSortType (int) const override |
Return the sort type (numeric or alphabetical) for the column. More... | |
sv_frame_t | getFrameForRow (int row) const override |
Return the frame time for the given row. More... | |
int | getRowForFrame (sv_frame_t frame) const override |
Return the number of the first row whose frame time is not less than the given one. More... | |
sv_frame_t | getEndFrame () const |
Return the audio frame at the end of the model, i.e. More... | |
void | extendEndFrame (sv_frame_t to) |
Extend the end of the model. More... | |
virtual sv_samplerate_t | getNativeRate () const |
Return the frame rate of the underlying material, if the model itself has already been resampled. More... | |
virtual QString | getTitle () const |
Return the "work title" of the model, if known. More... | |
virtual QString | getMaker () const |
Return the "artist" or "maker" of the model, if known. More... | |
virtual QString | getLocation () const |
Return the location of the data in this model (e.g. More... | |
virtual bool | isSparse () const |
Return true if this is a sparse model. More... | |
virtual const ZoomConstraint * | getZoomConstraint () const |
If this model imposes a zoom constraint, i.e. More... | |
virtual ModelId | getSourceModel () const |
If this model was derived from another, return the id of the model it was derived from. More... | |
virtual void | setSourceModel (ModelId model) |
Set the source model for this model. More... | |
virtual void | setAlignment (ModelId alignmentModel) |
Specify an alignment between this model's timeline and that of a reference model. More... | |
virtual const ModelId | getAlignment () const |
Retrieve the alignment model for this model. More... | |
virtual const ModelId | getAlignmentReference () const |
Return the reference model for the current alignment timeline, if any. More... | |
virtual sv_frame_t | alignToReference (sv_frame_t frame) const |
Return the frame number of the reference model that corresponds to the given frame number in this model. More... | |
virtual sv_frame_t | alignFromReference (sv_frame_t referenceFrame) const |
Return the frame number in this model that corresponds to the given frame number of the reference model. More... | |
virtual int | getAlignmentCompletion () const |
Return the completion percentage for the alignment model: 100 if there is no alignment model or it has been entirely calculated, or less than 100 if it is still being calculated. More... | |
void | setRDFTypeURI (QString uri) |
Set the event, feature, or signal type URI for the features contained in this model, according to the Audio Features RDF ontology. More... | |
QString | getRDFTypeURI () const |
Retrieve the event, feature, or signal type URI for the features contained in this model, if previously set with setRDFTypeURI. More... | |
ExportId | getExportId () const |
Return the numerical export identifier for this object. More... | |
virtual QString | toXmlString (QString indent="", QString extraAttributes="") const |
Convert this exportable object to XML in a string. More... | |
virtual bool | canPlay () const |
virtual QString | getDefaultPlayClipId () const |
virtual bool | getDefaultPlayAudible () const |
Static Public Member Functions | |
static QString | encodeEntities (QString) |
static QString | encodeColour (int r, int g, int b) |
Protected Types | |
typedef std::vector< Column > | ValueMatrix |
Protected Member Functions | |
void | truncateAndStore (int index, const Column &values) |
Column | expandAndRetrieve (int index) const |
Column | rightHeight (const Column &c) const |
Id | getId () const |
Return an id for this object. More... | |
int | getUntypedId () const |
Return an id for this object. More... | |
Static Protected Member Functions | |
static QVariant | adaptFrameForRole (sv_frame_t frame, sv_samplerate_t rate, int role) |
static QVariant | adaptValueForRole (float value, QString unit, int role) |
Protected Attributes | |
ValueMatrix | m_data |
std::vector< signed char > | m_trunc |
std::vector< QString > | m_binNames |
std::vector< float > | m_binValues |
QString | m_binValueUnit |
sv_frame_t | m_startFrame |
sv_samplerate_t | m_sampleRate |
int | m_resolution |
int | m_yBinCount |
float | m_minimum |
float | m_maximum |
bool | m_haveExtents |
bool | m_notifyOnAdd |
sv_frame_t | m_sinceLastNotifyMin |
sv_frame_t | m_sinceLastNotifyMax |
int | m_completion |
QReadWriteLock | m_lock |
QMutex | m_mutex |
ModelId | m_sourceModel |
ModelId | m_alignmentModel |
QString | m_typeUri |
std::atomic< sv_frame_t > | m_extendTo |
Detailed Description
Definition at line 25 of file BasicCompressedDenseThreeDimensionalModel.h.
Member Typedef Documentation
|
protected |
Definition at line 197 of file BasicCompressedDenseThreeDimensionalModel.h.
|
inherited |
Definition at line 59 of file DenseThreeDimensionalModel.h.
|
inherited |
|
inherited |
Definition at line 33 of file XmlExportable.h.
Member Enumeration Documentation
|
inherited |
Enumerator | |
---|---|
NO_ID |
Definition at line 28 of file XmlExportable.h.
|
inherited |
Enumerator | |
---|---|
SortRole |
Definition at line 57 of file TabularModel.h.
|
inherited |
Enumerator | |
---|---|
SortNumeric | |
SortAlphabetical |
Definition at line 58 of file TabularModel.h.
Constructor & Destructor Documentation
BasicCompressedDenseThreeDimensionalModel::BasicCompressedDenseThreeDimensionalModel | ( | sv_samplerate_t | sampleRate, |
int | resolution, | ||
int | height, | ||
bool | notifyOnAdd = true |
||
) |
Definition at line 34 of file BasicCompressedDenseThreeDimensionalModel.cpp.
Member Function Documentation
|
overridevirtual |
Return true if the model was constructed successfully.
Classes that refer to the model should always test this before use.
Implements Model.
Definition at line 53 of file BasicCompressedDenseThreeDimensionalModel.cpp.
|
overridevirtual |
Return true if the model has finished loading or calculating all its data, for a model that is capable of calculating in a background thread.
If "completion" is non-NULL, return through it an estimated percentage value showing how far through the background operation it thinks it is (for progress reporting). This should be identical to the value returned by getCompletion().
A model that carries out all its calculation from the constructor or accessor functions would typically return true (and completion == 100) as long as isOK() is true. Other models may make the return value here depend on the internal completion status.
See also getCompletion().
Reimplemented from Model.
Definition at line 59 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References getCompletion().
void BasicCompressedDenseThreeDimensionalModel::setCompletion | ( | int | completion, |
bool | update = true |
||
) |
Definition at line 467 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References Model::completionChanged(), WithTypedId< Model >::getId(), m_completion, m_notifyOnAdd, m_resolution, m_sinceLastNotifyMax, m_sinceLastNotifyMin, Model::modelChanged(), and Model::modelChangedWithin().
|
overridevirtual |
Return an estimated percentage value showing how far through any background operation used to calculate or load the model data the model thinks it is.
Must return 100 when the model is complete.
A model that carries out all its calculation from the constructor or accessor functions might return 0 if isOK() is false and 100 if isOK() is true. Other models may make the return value here depend on the internal completion status.
See also isReady().
Implements DenseThreeDimensionalModel.
Definition at line 496 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_completion.
Referenced by isReady().
|
overridevirtual |
Return the frame rate in frames per second.
Implements Model.
Definition at line 66 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_sampleRate.
|
overridevirtual |
Return the first audio frame spanned by the model.
Implements Model.
Definition at line 72 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_startFrame.
|
overridevirtual |
Return the audio frame at the end of the model.
This is identical to getEndFrame(), except that it ignores any extended duration set with extendEndFrame().
Implements Model.
Definition at line 84 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_data, and m_resolution.
|
virtual |
Set the frame offset of the first column.
Definition at line 78 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_startFrame.
|
overridevirtual |
Return the number of sample frames covered by each set of bins.
Implements DenseThreeDimensionalModel.
Definition at line 90 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_resolution.
|
virtual |
Set the number of sample frames covered by each set of bins.
Definition at line 96 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_resolution.
|
overridevirtual |
Return the number of columns.
Implements DenseThreeDimensionalModel.
Definition at line 102 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_data.
|
overridevirtual |
Return the number of bins in each column.
Implements DenseThreeDimensionalModel.
Definition at line 108 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_yBinCount.
|
virtual |
Set the number of bins in each column.
You can set (via setColumn) a vector of any length as a column, but any column being retrieved will be resized to this height (or the height that was supplied to the constructor, if this is never called) on retrieval. That is, the model owner determines the height of the model at a single stroke; the columns themselves don't have any effect on the height of the model.
Definition at line 114 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_yBinCount.
|
overridevirtual |
Return the minimum value of the value in each bin.
Implements DenseThreeDimensionalModel.
Definition at line 120 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_minimum.
|
virtual |
Set the minimum value of the value in a bin.
Definition at line 126 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_minimum.
|
overridevirtual |
Return the maximum value of the value in each bin.
Implements DenseThreeDimensionalModel.
Definition at line 132 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_maximum.
|
virtual |
Set the maximum value of the value in a bin.
Definition at line 138 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_maximum.
|
overridevirtual |
Get the set of bin values at the given column.
Implements DenseThreeDimensionalModel.
Definition at line 144 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References expandAndRetrieve(), in_range_for(), m_data, and m_lock.
Referenced by getValueAt(), toStringExportRows(), and toXml().
|
overridevirtual |
Get a single value, from the n'th bin of the given column.
Implements DenseThreeDimensionalModel.
Definition at line 152 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References getColumn(), in_range_for(), and m_minimum.
|
virtual |
Set the entire set of bin values at the given column.
Definition at line 322 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References WithTypedId< Model >::getId(), in_range_for(), ISINF, ISNAN, m_data, m_haveExtents, m_lock, m_maximum, m_minimum, m_notifyOnAdd, m_resolution, m_sinceLastNotifyMax, m_sinceLastNotifyMin, m_trunc, Model::modelChanged(), Model::modelChangedWithin(), and truncateAndStore().
Referenced by FeatureExtractionModelTransformer::addFeature().
|
overridevirtual |
Return the name of bin n.
This is a single label per bin that does not vary from one column to the next.
Implements DenseThreeDimensionalModel.
Definition at line 383 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_binNames.
|
virtual |
Set the name of bin n.
Definition at line 390 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References WithTypedId< Model >::getId(), m_binNames, and Model::modelChanged().
|
virtual |
Set the names of all bins.
Definition at line 398 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References WithTypedId< Model >::getId(), m_binNames, and Model::modelChanged().
|
overridevirtual |
Return true if the bins have values as well as names.
(The values may have been derived from the names, e.g. by parsing numbers from them.) If this returns true, getBinValue() may be used to retrieve the values.
Reimplemented from DenseThreeDimensionalModel.
Definition at line 405 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_binValues.
|
overridevirtual |
Return the value of bin n, if any.
This is a "vertical scale" value which does not vary from one column to the next. This is only meaningful if hasBinValues() returns true.
Reimplemented from DenseThreeDimensionalModel.
Definition at line 411 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_binValues.
|
virtual |
Set the values of all bins (separate from their labels).
These are "vertical scale" values which do not vary from one column to the next.
Definition at line 418 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_binValues.
|
overridevirtual |
Obtain the name of the unit of the values returned from getBinValue(), if any.
Reimplemented from DenseThreeDimensionalModel.
Definition at line 424 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_binValueUnit.
|
virtual |
Set the name of the unit of the values return from getBinValue() if any.
Definition at line 430 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_binValueUnit.
|
overridevirtual |
Return true if the distribution of values in the bins is such as to suggest a log scale (mapping to colour etc) may be better than a linear one.
Implements DenseThreeDimensionalModel.
Definition at line 436 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References in_range_for(), m_data, m_lock, and LogRange::shouldUseLogScale().
|
inlineoverridevirtual |
Return the type of the model.
For display purposes only.
Implements Model.
Definition at line 182 of file BasicCompressedDenseThreeDimensionalModel.h.
References getStringExportHeaders(), toStringExportRows(), and toXml().
|
overridevirtual |
Return a label for each column that would be written by toStringExportRows.
Implements Model.
Definition at line 502 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_yBinCount.
Referenced by getTypeName().
|
overridevirtual |
Emit events starting within the given range as string rows ready for conversion to an e.g.
comma-separated data format.
Implements Model.
Definition at line 513 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References getColumn(), in_range_for(), m_data, m_lock, m_resolution, and m_startFrame.
Referenced by getTypeName().
|
overridevirtual |
Stream this exportable object out to XML on a text stream.
Implements XmlExportable.
Definition at line 538 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References getColumn(), XmlExportable::getExportId(), in_range_for(), m_binNames, m_data, m_lock, m_maximum, m_minimum, m_resolution, m_startFrame, m_yBinCount, SVDEBUG, and Model::toXml().
Referenced by getTypeName().
|
protected |
Definition at line 162 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References expandAndRetrieve(), in_range_for(), m_data, m_trunc, and m_yBinCount.
Referenced by setColumn().
|
protected |
Definition at line 283 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_data, m_trunc, m_yBinCount, and rightHeight().
Referenced by getColumn(), and truncateAndStore().
|
protected |
Definition at line 272 of file BasicCompressedDenseThreeDimensionalModel.cpp.
References m_yBinCount.
Referenced by expandAndRetrieve().
|
inlineinherited |
Utility function to query whether a given bin is greater than its (vertical) neighbours.
Definition at line 106 of file DenseThreeDimensionalModel.h.
References DenseThreeDimensionalModel::getHeight(), and DenseThreeDimensionalModel::getValueAt().
|
inlineinherited |
Utility function to query whether a given bin is greater than a certain threshold.
Definition at line 117 of file DenseThreeDimensionalModel.h.
References DenseThreeDimensionalModel::getValueAt().
|
inlineoverridevirtualinherited |
Return the number of rows (items) in the model.
Implements TabularModel.
Definition at line 132 of file DenseThreeDimensionalModel.h.
References DenseThreeDimensionalModel::getWidth().
|
inlineoverridevirtualinherited |
Return the number of columns (values/labels/etc per item).
Implements TabularModel.
Definition at line 133 of file DenseThreeDimensionalModel.h.
References DenseThreeDimensionalModel::getHeight().
|
inlineoverridevirtualinherited |
Return true if the model is user-editable, false otherwise.
Implements TabularModel.
Definition at line 135 of file DenseThreeDimensionalModel.h.
|
inlineoverridevirtualinherited |
Return a command to set the value in the given cell, for the given role, to the contents of the supplied variant.
If the model is not editable or the cell or value is out of range, return nullptr.
Implements TabularModel.
Definition at line 136 of file DenseThreeDimensionalModel.h.
|
inlineoverridevirtualinherited |
Return a command to insert a new row before the row with the given index.
If the model is not editable or the index is out of range, return nullptr.
Implements TabularModel.
Definition at line 137 of file DenseThreeDimensionalModel.h.
|
inlineoverridevirtualinherited |
Return a command to delete the row with the given index.
If the model is not editable or the index is out of range, return nullptr.
Implements TabularModel.
Definition at line 138 of file DenseThreeDimensionalModel.h.
|
inlineoverridevirtualinherited |
Return the heading for a given column, e.g.
"Time" or "Value". These are shown directly to the user, so must be translated already.
Implements TabularModel.
Definition at line 140 of file DenseThreeDimensionalModel.h.
References DenseThreeDimensionalModel::getBinName().
|
inlineoverridevirtualinherited |
Get the value in the given cell, for the given role.
The role is actually a Qt::ItemDataRole.
Implements TabularModel.
Definition at line 154 of file DenseThreeDimensionalModel.h.
References RealTime::frame2RealTime(), DenseThreeDimensionalModel::getResolution(), Model::getSampleRate(), Model::getStartFrame(), DenseThreeDimensionalModel::getValueAt(), and RealTime::toText().
|
inlineoverridevirtualinherited |
Return true if the column is the frame time of the item, or an alternative representation of it (i.e.
anything that has the same sort order). Duration is not a time value by this meaning.
Implements TabularModel.
Definition at line 169 of file DenseThreeDimensionalModel.h.
|
inlineoverridevirtualinherited |
Return the sort type (numeric or alphabetical) for the column.
Implements TabularModel.
Definition at line 172 of file DenseThreeDimensionalModel.h.
References TabularModel::SortNumeric.
|
inlineoverridevirtualinherited |
Return the frame time for the given row.
Implements TabularModel.
Definition at line 176 of file DenseThreeDimensionalModel.h.
References DenseThreeDimensionalModel::getResolution(), and Model::getStartFrame().
|
inlineoverridevirtualinherited |
Return the number of the first row whose frame time is not less than the given one.
If there is none, return getRowCount().
Implements TabularModel.
Definition at line 179 of file DenseThreeDimensionalModel.h.
References DenseThreeDimensionalModel::getResolution(), and Model::getStartFrame().
|
inlineinherited |
Return the audio frame at the end of the model, i.e.
the final frame contained within the model plus 1 (rounded up to the model's "resolution" granularity, if more than 1). The end frame minus the start frame should yield the total duration in frames (as a multiple of the resolution) spanned by the model. This is broadly consistent with the definition of the end frame of a Selection object.
If the end has been extended by extendEndFrame() beyond the true end frame, return the extended end instead. This is usually the behaviour you want.
Definition at line 87 of file Model.h.
References Model::getTrueEndFrame(), and Model::m_extendTo.
Referenced by Model::alignFromReference(), ReadOnlyWaveFileModel::cacheFilled(), WaveformOversampler::getFixedRatioData(), SparseOneDimensionalModel::getNotes(), NoteModel::getNotes(), ReadOnlyWaveFileModel::isReady(), Model::toXml(), CSVFileWriter::write(), CSVStreamWriter::writeInChunks(), and WavFileWriter::writeModel().
|
inlineinherited |
Extend the end of the model.
If this is set to something beyond the true end of the data within the model, then getEndFrame() will return this value instead of the true end. (This is used by the Tony application.)
Definition at line 109 of file Model.h.
References Model::getSampleRate(), and Model::m_extendTo.
|
inlinevirtualinherited |
Return the frame rate of the underlying material, if the model itself has already been resampled.
Reimplemented in WritableWaveFileModel, ReadOnlyWaveFileModel, and WaveFileModel.
Definition at line 122 of file Model.h.
References Model::getLocation(), Model::getMaker(), Model::getSampleRate(), Model::getTitle(), and Model::getTypeName().
|
virtualinherited |
Return the "work title" of the model, if known.
Reimplemented in WritableWaveFileModel, ReadOnlyWaveFileModel, and WaveFileModel.
Definition at line 177 of file Model.cpp.
References TypedById< Item, Id >::get(), Model::m_mutex, and Model::m_sourceModel.
Referenced by Model::getNativeRate().
|
virtualinherited |
Return the "artist" or "maker" of the model, if known.
Reimplemented in WritableWaveFileModel, ReadOnlyWaveFileModel, and WaveFileModel.
Definition at line 186 of file Model.cpp.
References TypedById< Item, Id >::get(), Model::m_mutex, and Model::m_sourceModel.
Referenced by Model::getNativeRate().
|
virtualinherited |
Return the location of the data in this model (e.g.
source URL). This should not normally be returned for editable models that have been edited.
Reimplemented in WritableWaveFileModel, ReadOnlyWaveFileModel, and WaveFileModel.
Definition at line 195 of file Model.cpp.
References TypedById< Item, Id >::get(), Model::m_mutex, and Model::m_sourceModel.
Referenced by Model::getNativeRate().
|
inlinevirtualinherited |
Return true if this is a sparse model.
Reimplemented in NoteModel, SparseTimeValueModel, BoxModel, RegionModel, SparseOneDimensionalModel, ImageModel, and TextModel.
Definition at line 149 of file Model.h.
Referenced by CSVFileWriter::writeSelection().
|
inlinevirtualinherited |
If this model imposes a zoom constraint, i.e.
some limit to the set of resolutions at which its data can meaningfully be displayed, then return it.
Reimplemented in WritableWaveFileModel, ReadOnlyWaveFileModel, AggregateWaveModel, and AlignmentModel.
|
inlinevirtualinherited |
If this model was derived from another, return the id of the model it was derived from.
The assumption is that the source model's alignment will also apply to this model, unless some other property (such as a specific alignment model set on this model) indicates otherwise.
Definition at line 207 of file Model.h.
References Model::alignFromReference(), Model::alignToReference(), Model::getAlignment(), Model::getAlignmentCompletion(), Model::getAlignmentReference(), Model::m_sourceModel, Model::setAlignment(), and Model::setSourceModel().
|
virtualinherited |
Set the source model for this model.
Definition at line 31 of file Model.cpp.
References Model::alignmentCompletionChanged(), TypedById< Item, Id >::get(), Model::m_mutex, and Model::m_sourceModel.
Referenced by RDFImporterImpl::getDataModelsSparse(), and Model::getSourceModel().
|
virtualinherited |
Specify an alignment between this model's timeline and that of a reference model.
The alignment model, of type AlignmentModel, records both the reference and the alignment.
Definition at line 45 of file Model.cpp.
References Model::alignmentModelCompletionChanged(), Model::completionChanged(), TypedById< Item, Id >::get(), Model::m_alignmentModel, Model::m_mutex, and SVDEBUG.
Referenced by Model::getSourceModel().
|
virtualinherited |
Retrieve the alignment model for this model.
This is not a generally useful function, as the alignment you really want may be performed by the source model instead. You should normally use getAlignmentReference, alignToReference and alignFromReference instead of this. The main intended application for this function is in streaming out alignments to the session file.
Definition at line 72 of file Model.cpp.
References Model::m_alignmentModel, and Model::m_mutex.
Referenced by Model::getSourceModel().
|
virtualinherited |
Return the reference model for the current alignment timeline, if any.
Definition at line 79 of file Model.cpp.
References Model::m_alignmentModel, and Model::m_mutex.
Referenced by Model::getSourceModel().
|
virtualinherited |
Return the frame number of the reference model that corresponds to the given frame number in this model.
Definition at line 88 of file Model.cpp.
References TypedById< Item, Id >::get(), Model::m_alignmentModel, Model::m_mutex, and Model::m_sourceModel.
Referenced by Model::getSourceModel().
|
virtualinherited |
Return the frame number in this model that corresponds to the given frame number of the reference model.
Definition at line 116 of file Model.cpp.
References TypedById< Item, Id >::get(), Model::getEndFrame(), Model::m_alignmentModel, Model::m_mutex, and Model::m_sourceModel.
Referenced by Model::getSourceModel().
|
virtualinherited |
Return the completion percentage for the alignment model: 100 if there is no alignment model or it has been entirely calculated, or less than 100 if it is still being calculated.
Definition at line 141 of file Model.cpp.
References TypedById< Item, Id >::get(), Model::m_alignmentModel, Model::m_mutex, Model::m_sourceModel, and SVCERR.
Referenced by Model::getSourceModel().
|
inlineinherited |
Set the event, feature, or signal type URI for the features contained in this model, according to the Audio Features RDF ontology.
Definition at line 264 of file Model.h.
References Model::m_typeUri.
Referenced by FeatureExtractionModelTransformer::getAdditionalModel(), and RDFImporterImpl::getDataModelsSparse().
|
inlineinherited |
Retrieve the event, feature, or signal type URI for the features contained in this model, if previously set with setRDFTypeURI.
Definition at line 271 of file Model.h.
References Model::alignmentCompletionChanged(), Model::alignmentModelCompletionChanged(), Model::completionChanged(), Model::getStringExportHeaders(), Model::m_typeUri, Model::modelChanged(), Model::modelChangedWithin(), Model::ready(), Model::toStringExportRows(), and Model::toXml().
|
signalinherited |
Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly)
Referenced by BoxModel::add(), RegionModel::add(), SparseTimeValueModel::add(), NoteModel::add(), AggregateWaveModel::AggregateWaveModel(), ReadOnlyWaveFileModel::cacheFilled(), AggregateWaveModel::componentModelChanged(), WritableWaveFileModel::componentModelChanged(), Dense3DModelPeakCache::Dense3DModelPeakCache(), FFTModel::FFTModel(), ReadOnlyWaveFileModel::fillTimerTimedOut(), Model::getRDFTypeURI(), WritableWaveFileModel::init(), EditableDenseThreeDimensionalModel::setBinName(), setBinName(), EditableDenseThreeDimensionalModel::setBinNames(), setBinNames(), EditableDenseThreeDimensionalModel::setColumn(), setColumn(), EditableDenseThreeDimensionalModel::setCompletion(), setCompletion(), TextModel::setCompletion(), ImageModel::setCompletion(), SparseOneDimensionalModel::setCompletion(), BoxModel::setCompletion(), RegionModel::setCompletion(), SparseTimeValueModel::setCompletion(), NoteModel::setCompletion(), and WritableWaveFileModel::writeComplete().
|
signalinherited |
Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly)
Referenced by AggregateWaveModel::AggregateWaveModel(), ReadOnlyWaveFileModel::cacheFilled(), AggregateWaveModel::componentModelChangedWithin(), WritableWaveFileModel::componentModelChangedWithin(), FFTModel::FFTModel(), ReadOnlyWaveFileModel::fillTimerTimedOut(), Model::getRDFTypeURI(), WritableWaveFileModel::init(), DeferredNotifier::makeDeferredNotifications(), ImageModel::remove(), TextModel::remove(), SparseOneDimensionalModel::remove(), BoxModel::remove(), RegionModel::remove(), SparseTimeValueModel::remove(), NoteModel::remove(), EditableDenseThreeDimensionalModel::setColumn(), setColumn(), EditableDenseThreeDimensionalModel::setCompletion(), setCompletion(), AlignmentModel::setPathFrom(), and DeferredNotifier::update().
|
signalinherited |
Emitted when some internal processing has advanced a stage, but the model has not changed externally.
Views should respond by updating any progress meters or other monitoring, but not refreshing the actual view.
Referenced by AggregateWaveModel::AggregateWaveModel(), AggregateWaveModel::componentModelCompletionChanged(), Model::getRDFTypeURI(), Model::setAlignment(), EditableDenseThreeDimensionalModel::setCompletion(), setCompletion(), TextModel::setCompletion(), ImageModel::setCompletion(), SparseOneDimensionalModel::setCompletion(), BoxModel::setCompletion(), RegionModel::setCompletion(), SparseTimeValueModel::setCompletion(), and NoteModel::setCompletion().
|
signalinherited |
Emitted when internal processing is complete (i.e.
when isReady() would return true, with completion at 100).
Referenced by ReadOnlyWaveFileModel::cacheFilled(), Model::getRDFTypeURI(), AggregateWaveModel::isReady(), and ReadOnlyWaveFileModel::isReady().
|
signalinherited |
Emitted when the completion percentage changes for the calculation of this model's alignment model.
(The ModelId provided is that of this model, not the alignment model.)
Referenced by Model::alignmentModelCompletionChanged(), Model::getRDFTypeURI(), and Model::setSourceModel().
|
inlineprotectedinherited |
Return an id for this object.
The id is a unique value for this object among all objects that implement WithId within this single run of the application.
Definition at line 193 of file ById.h.
References TypedId< T >::untyped.
Referenced by BoxModel::add(), RegionModel::add(), SparseTimeValueModel::add(), NoteModel::add(), Model::alignmentModelCompletionChanged(), ReadOnlyWaveFileModel::cacheFilled(), AggregateWaveModel::componentModelChanged(), WritableWaveFileModel::componentModelChanged(), AggregateWaveModel::componentModelChangedWithin(), WritableWaveFileModel::componentModelChangedWithin(), AggregateWaveModel::componentModelCompletionChanged(), ReadOnlyWaveFileModel::fillTimerTimedOut(), ImageModel::getInsertRowCommand(), TextModel::getInsertRowCommand(), SparseOneDimensionalModel::getInsertRowCommand(), RegionModel::getInsertRowCommand(), BoxModel::getInsertRowCommand(), SparseTimeValueModel::getInsertRowCommand(), NoteModel::getInsertRowCommand(), ImageModel::getRemoveRowCommand(), TextModel::getRemoveRowCommand(), SparseOneDimensionalModel::getRemoveRowCommand(), RegionModel::getRemoveRowCommand(), BoxModel::getRemoveRowCommand(), SparseTimeValueModel::getRemoveRowCommand(), NoteModel::getRemoveRowCommand(), ImageModel::getSetDataCommand(), TextModel::getSetDataCommand(), SparseOneDimensionalModel::getSetDataCommand(), RegionModel::getSetDataCommand(), BoxModel::getSetDataCommand(), SparseTimeValueModel::getSetDataCommand(), NoteModel::getSetDataCommand(), WritableWaveFileModel::init(), NoteModel::NoteModel(), AlignmentModel::pathSourceCompletionChanged(), ReadOnlyWaveFileModel::ReadOnlyWaveFileModel(), ImageModel::remove(), TextModel::remove(), SparseOneDimensionalModel::remove(), BoxModel::remove(), RegionModel::remove(), SparseTimeValueModel::remove(), NoteModel::remove(), EditableDenseThreeDimensionalModel::setBinName(), setBinName(), EditableDenseThreeDimensionalModel::setBinNames(), setBinNames(), EditableDenseThreeDimensionalModel::setColumn(), setColumn(), EditableDenseThreeDimensionalModel::setCompletion(), setCompletion(), AlignmentModel::setCompletion(), TextModel::setCompletion(), ImageModel::setCompletion(), SparseOneDimensionalModel::setCompletion(), BoxModel::setCompletion(), RegionModel::setCompletion(), SparseTimeValueModel::setCompletion(), NoteModel::setCompletion(), SparseOneDimensionalModel::SparseOneDimensionalModel(), SparseTimeValueModel::SparseTimeValueModel(), WritableWaveFileModel::writeComplete(), Model::~Model(), NoteModel::~NoteModel(), ReadOnlyWaveFileModel::~ReadOnlyWaveFileModel(), SparseOneDimensionalModel::~SparseOneDimensionalModel(), SparseTimeValueModel::~SparseTimeValueModel(), and WritableWaveFileModel::~WritableWaveFileModel().
|
inlineprotectedinherited |
|
inherited |
Return the numerical export identifier for this object.
It's allocated the first time this is called, so objects on which this is never called do not get allocated one.
Definition at line 71 of file XmlExportable.cpp.
References XmlExportable::m_exportId, and mutex.
Referenced by EditableDenseThreeDimensionalModel::toXml(), toXml(), EventSeries::toXml(), ImageModel::toXml(), TextModel::toXml(), Model::toXml(), SparseOneDimensionalModel::toXml(), RegionModel::toXml(), BoxModel::toXml(), SparseTimeValueModel::toXml(), NoteModel::toXml(), and XmlExportable::~XmlExportable().
|
virtualinherited |
Convert this exportable object to XML in a string.
The default implementation calls toXml and returns the result as a string. Do not override this unless you really know what you're doing.
Definition at line 25 of file XmlExportable.cpp.
References XmlExportable::toXml().
Referenced by ModelTransformerFactory::getConfigurationForTransform(), RDFTransformFactoryImpl::getTransforms(), and XmlExportable::~XmlExportable().
|
staticinherited |
Definition at line 41 of file XmlExportable.cpp.
Referenced by TextMatcher::test(), PluginXml::toXml(), ReadOnlyWaveFileModel::toXml(), Transform::toXml(), WritableWaveFileModel::toXml(), Model::toXml(), Event::toXml(), RegionModel::toXml(), BoxModel::toXml(), SparseTimeValueModel::toXml(), NoteModel::toXml(), and XmlExportable::~XmlExportable().
|
staticinherited |
Definition at line 54 of file XmlExportable.cpp.
Referenced by XmlExportable::~XmlExportable().
|
inlinevirtualinherited |
Reimplemented in NoteModel, SparseTimeValueModel, SparseOneDimensionalModel, and DenseTimeValueModel.
Definition at line 26 of file Playable.h.
|
inlinevirtualinherited |
Reimplemented in NoteModel, SparseOneDimensionalModel, and DenseTimeValueModel.
Definition at line 27 of file Playable.h.
Referenced by PlayParameterRepository::addPlayable().
|
inlinevirtualinherited |
Reimplemented in SparseTimeValueModel.
Definition at line 28 of file Playable.h.
Referenced by PlayParameterRepository::addPlayable().
|
inlinestaticprotectedinherited |
Definition at line 124 of file TabularModel.h.
References RealTime::frame2RealTime(), TabularModel::SortRole, RealTime::toString(), and RealTime::toText().
Referenced by ImageModel::getData(), TextModel::getData(), SparseOneDimensionalModel::getData(), RegionModel::getData(), BoxModel::getData(), SparseTimeValueModel::getData(), and NoteModel::getData().
|
inlinestaticprotectedinherited |
Definition at line 133 of file TabularModel.h.
References TabularModel::SortRole.
Referenced by RegionModel::getData(), BoxModel::getData(), SparseTimeValueModel::getData(), and NoteModel::getData().
Member Data Documentation
|
protected |
Definition at line 198 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by expandAndRetrieve(), getColumn(), getTrueEndFrame(), getWidth(), setColumn(), shouldUseLogValueScale(), toStringExportRows(), toXml(), and truncateAndStore().
|
protected |
Definition at line 208 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by expandAndRetrieve(), setColumn(), and truncateAndStore().
|
protected |
Definition at line 213 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getBinName(), setBinName(), setBinNames(), and toXml().
|
protected |
Definition at line 214 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getBinValue(), hasBinValues(), and setBinValues().
|
protected |
Definition at line 215 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getBinValueUnit(), and setBinValueUnit().
|
protected |
Definition at line 217 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getStartFrame(), setStartFrame(), toStringExportRows(), and toXml().
|
protected |
Definition at line 218 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getSampleRate().
|
protected |
Definition at line 219 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getResolution(), getTrueEndFrame(), setColumn(), setCompletion(), setResolution(), toStringExportRows(), and toXml().
|
protected |
Definition at line 220 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by expandAndRetrieve(), getHeight(), getStringExportHeaders(), rightHeight(), setHeight(), toXml(), and truncateAndStore().
|
protected |
Definition at line 221 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getMinimumLevel(), getValueAt(), setColumn(), setMinimumLevel(), and toXml().
|
protected |
Definition at line 222 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getMaximumLevel(), setColumn(), setMaximumLevel(), and toXml().
|
protected |
Definition at line 223 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by setColumn().
|
protected |
Definition at line 224 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by setColumn(), and setCompletion().
|
protected |
Definition at line 225 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by setColumn(), and setCompletion().
|
protected |
Definition at line 226 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by setColumn(), and setCompletion().
|
protected |
Definition at line 227 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getCompletion(), and setCompletion().
|
mutableprotected |
Definition at line 229 of file BasicCompressedDenseThreeDimensionalModel.h.
Referenced by getColumn(), setColumn(), shouldUseLogValueScale(), toStringExportRows(), and toXml().
|
mutableprotectedinherited |
Definition at line 337 of file Model.h.
Referenced by Model::alignFromReference(), Model::alignToReference(), Model::getAlignment(), Model::getAlignmentCompletion(), Model::getAlignmentReference(), Model::getLocation(), Model::getMaker(), SparseTimeValueModel::getScaleUnits(), NoteModel::getScaleUnits(), NoteModel::getStartFrame(), Model::getTitle(), NoteModel::getTrueEndFrame(), Model::setAlignment(), SparseTimeValueModel::setScaleUnits(), NoteModel::setScaleUnits(), and Model::setSourceModel().
|
protectedinherited |
Definition at line 338 of file Model.h.
Referenced by Model::alignFromReference(), Model::alignToReference(), Model::getAlignmentCompletion(), Model::getLocation(), Model::getMaker(), Model::getSourceModel(), Model::getTitle(), and Model::setSourceModel().
|
protectedinherited |
Definition at line 339 of file Model.h.
Referenced by Model::alignFromReference(), Model::alignToReference(), Model::getAlignment(), Model::getAlignmentCompletion(), Model::getAlignmentReference(), and Model::setAlignment().
|
protectedinherited |
Definition at line 340 of file Model.h.
Referenced by Model::getRDFTypeURI(), and Model::setRDFTypeURI().
|
protectedinherited |
Definition at line 341 of file Model.h.
Referenced by Model::extendEndFrame(), and Model::getEndFrame().
The documentation for this class was generated from the following files:
Generated by 1.8.11