|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Holds tempo/beat information about an audio file. More...
#include "tracktion_LoopInfo.h"
Classes | |
| struct | LoopPoint |
Public Types | |
| enum class | LoopPointType { manual , automatic } |
| Enum to represet the type of loop point. More... | |
Public Member Functions | |
| LoopInfo (Engine &) | |
| Creates an empty LoopInfo. | |
| LoopInfo (const LoopInfo &) | |
| Creates a copy of another LoopInfo. | |
| LoopInfo (Engine &, const juce::ValueTree &, juce::UndoManager *) | |
| Creates a LoopInfo from some existing state. | |
| LoopInfo (Engine &, const juce::File &) | |
| Creates a LoopInfo for an audio file. | |
| LoopInfo (Engine &, const juce::AudioFormatReader *, const juce::AudioFormat *, const juce::File &f) | |
| Creates a LoopInfo for a reader. | |
| LoopInfo & | operator= (const LoopInfo &) |
| Creates a copy of another LoopInfo. | |
| double | getBpm (const AudioFileInfo &) const |
| Returns the tempo of the object. | |
| double | getBeatsPerSecond (const AudioFileInfo &) const |
| Returns the tempo of the object. | |
| void | setBpm (double newBpm, const AudioFileInfo &) |
| Sets the tempo of the object. | |
| int | getDenominator () const |
| Returns the denominator of the object. | |
| int | getNumerator () const |
| Returns the numerator of the object. | |
| void | setDenominator (int newDenominator) |
| Sets the denominator of the object. | |
| void | setNumerator (int newNumerator) |
| Sets the numerator of the object. | |
| double | getNumBeats () const |
| Returns the number of beats. | |
| void | setNumBeats (double newNumBeats) |
| Sets the number of beats. | |
| bool | isLoopable () const |
| Returns true if this can be looped. | |
| bool | isOneShot () const |
| Returns true if this can be is a one-shot e.g. | |
| int | getRootNote () const |
| Returns the root note of the object. | |
| void | setRootNote (int note) |
| Sets the root note of the object. | |
| SampleCount | getInMarker () const |
| Returns the sample number used as the start point in the file. | |
| SampleCount | getOutMarker () const |
| Returns the sample number used as the end point in the file. | |
| void | setInMarker (SampleCount) |
| Sets the sample number to be used as the start point in the file. | |
| void | setOutMarker (SampleCount) |
| Sets the sample number to be used as the end point in the file. | |
| int | getNumLoopPoints () const |
| Returns the number of loop points in the object. | |
| LoopPoint | getLoopPoint (int index) const |
| Returns the loop points at the given index. | |
| void | addLoopPoint (SampleCount, LoopPointType) |
| Adds a loop point at the given position. | |
| void | changeLoopPoint (int index, SampleCount, LoopPointType) |
| Sets the loop point at the given index to a new position and type. | |
| void | deleteLoopPoint (int index) |
| Removes the loop point at the given index. | |
| void | clearLoopPoints () |
| Removes all the loop points. | |
| void | clearLoopPoints (LoopPointType) |
| Removes all the loop points of a given type. | |
| int | getNumTags () const |
| Returns the number of tags. | |
| void | clearTags () |
| Removes all the tags. | |
| juce::String | getTag (int index) const |
| Returns the tag at a given index. | |
| void | addTag (const juce::String &tag) |
| Adds a tag. | |
| void | addTags (const juce::StringArray &tags) |
| Adds multiple tags. | |
Public Attributes | |
| Engine & | engine |
| The engine this belongs to. | |
| juce::ValueTree | state |
Holds tempo/beat information about an audio file.
Used by AudioClipBase to sync it to the Edit.
Definition at line 18 of file tracktion_LoopInfo.h.
|
strong |
Enum to represet the type of loop point.
| Enumerator | |
|---|---|
| manual | A manual loop point. |
| automatic | An automatoc loop point. |
Definition at line 99 of file tracktion_LoopInfo.h.
| tracktion::engine::LoopInfo::LoopInfo | ( | Engine & | e | ) |
Creates an empty LoopInfo.
Definition at line 14 of file tracktion_LoopInfo.cpp.
| tracktion::engine::LoopInfo::LoopInfo | ( | const LoopInfo & | other | ) |
Creates a copy of another LoopInfo.
Definition at line 47 of file tracktion_LoopInfo.cpp.
| tracktion::engine::LoopInfo::LoopInfo | ( | Engine & | e, |
| const juce::ValueTree & | v, | ||
| juce::UndoManager * | u | ||
| ) |
Creates a LoopInfo from some existing state.
N.B. this references the given state, it doesn't make a deep copy.
Definition at line 41 of file tracktion_LoopInfo.cpp.
| tracktion::engine::LoopInfo::LoopInfo | ( | Engine & | e, |
| const juce::File & | f | ||
| ) |
Creates a LoopInfo for an audio file.
Definition at line 20 of file tracktion_LoopInfo.cpp.
| tracktion::engine::LoopInfo::LoopInfo | ( | Engine & | e, |
| const juce::AudioFormatReader * | afr, | ||
| const juce::AudioFormat * | af, | ||
| const juce::File & | f | ||
| ) |
Creates a LoopInfo for a reader.
Optionally pass filename to extract metadata from name
Definition at line 35 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::addLoopPoint | ( | SampleCount | pos, |
| LoopPointType | type | ||
| ) |
Adds a loop point at the given position.
Definition at line 168 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::addTag | ( | const juce::String & | tag | ) |
Adds a tag.
This could be descriptive info like major/minor etc.
Definition at line 219 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::addTags | ( | const juce::StringArray & | tags | ) |
| void tracktion::engine::LoopInfo::changeLoopPoint | ( | int | index, |
| SampleCount | pos, | ||
| LoopPointType | type | ||
| ) |
Sets the loop point at the given index to a new position and type.
Definition at line 180 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::clearLoopPoints | ( | ) |
Removes all the loop points.
Definition at line 198 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::clearLoopPoints | ( | LoopPointType | type | ) |
Removes all the loop points of a given type.
Definition at line 205 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::clearTags | ( | ) |
Removes all the tags.
Definition at line 216 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::deleteLoopPoint | ( | int | index | ) |
Removes the loop point at the given index.
Definition at line 190 of file tracktion_LoopInfo.cpp.
| double tracktion::engine::LoopInfo::getBeatsPerSecond | ( | const AudioFileInfo & | wi | ) | const |
Returns the tempo of the object.
Definition at line 102 of file tracktion_LoopInfo.cpp.
| double tracktion::engine::LoopInfo::getBpm | ( | const AudioFileInfo & | wi | ) | const |
Returns the tempo of the object.
Definition at line 59 of file tracktion_LoopInfo.cpp.
| int tracktion::engine::LoopInfo::getDenominator | ( | ) | const |
Returns the denominator of the object.
Definition at line 127 of file tracktion_LoopInfo.cpp.
| SampleCount tracktion::engine::LoopInfo::getInMarker | ( | ) | const |
Returns the sample number used as the start point in the file.
Definition at line 143 of file tracktion_LoopInfo.cpp.
| LoopInfo::LoopPoint tracktion::engine::LoopInfo::getLoopPoint | ( | int | index | ) | const |
Returns the loop points at the given index.
Definition at line 156 of file tracktion_LoopInfo.cpp.
| double tracktion::engine::LoopInfo::getNumBeats | ( | ) | const |
Returns the number of beats.
Definition at line 131 of file tracktion_LoopInfo.cpp.
| int tracktion::engine::LoopInfo::getNumerator | ( | ) | const |
Returns the numerator of the object.
Definition at line 128 of file tracktion_LoopInfo.cpp.
| int tracktion::engine::LoopInfo::getNumLoopPoints | ( | ) | const |
Returns the number of loop points in the object.
Definition at line 150 of file tracktion_LoopInfo.cpp.
| int tracktion::engine::LoopInfo::getNumTags | ( | ) | const |
Returns the number of tags.
Definition at line 215 of file tracktion_LoopInfo.cpp.
| SampleCount tracktion::engine::LoopInfo::getOutMarker | ( | ) | const |
Returns the sample number used as the end point in the file.
Definition at line 144 of file tracktion_LoopInfo.cpp.
| int tracktion::engine::LoopInfo::getRootNote | ( | ) | const |
Returns the root note of the object.
Definition at line 139 of file tracktion_LoopInfo.cpp.
| juce::String tracktion::engine::LoopInfo::getTag | ( | int | index | ) | const |
Returns the tag at a given index.
Definition at line 217 of file tracktion_LoopInfo.cpp.
| bool tracktion::engine::LoopInfo::isLoopable | ( | ) | const |
Returns true if this can be looped.
Definition at line 135 of file tracktion_LoopInfo.cpp.
| bool tracktion::engine::LoopInfo::isOneShot | ( | ) | const |
Returns true if this can be is a one-shot e.g.
a single drum hit and therefore shouldn't be looped.
Definition at line 136 of file tracktion_LoopInfo.cpp.
Creates a copy of another LoopInfo.
Definition at line 53 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::setBpm | ( | double | newBpm, |
| const AudioFileInfo & | wi | ||
| ) |
Sets the tempo of the object.
Definition at line 74 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::setDenominator | ( | int | newDenominator | ) |
Sets the denominator of the object.
Definition at line 129 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::setInMarker | ( | SampleCount | in | ) |
Sets the sample number to be used as the start point in the file.
Definition at line 146 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::setNumBeats | ( | double | newNumBeats | ) |
Sets the number of beats.
Definition at line 132 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::setNumerator | ( | int | newNumerator | ) |
Sets the numerator of the object.
Definition at line 130 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::setOutMarker | ( | SampleCount | out | ) |
Sets the sample number to be used as the end point in the file.
Definition at line 147 of file tracktion_LoopInfo.cpp.
| void tracktion::engine::LoopInfo::setRootNote | ( | int | note | ) |
Sets the root note of the object.
Definition at line 140 of file tracktion_LoopInfo.cpp.
| Engine& tracktion::engine::LoopInfo::engine |
The engine this belongs to.
Definition at line 151 of file tracktion_LoopInfo.h.
| juce::ValueTree tracktion::engine::LoopInfo::state |
Definition at line 152 of file tracktion_LoopInfo.h.