TracktionEngine
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tracktion::engine::QuantisationType Class Reference

Inherits juce::ValueTree::Listener.

Public Member Functions

 QuantisationType ()
 
 QuantisationType (const juce::ValueTree &, juce::UndoManager *)
 
 ~QuantisationType () override
 
 QuantisationType (const QuantisationType &)
 
QuantisationTypeoperator= (const QuantisationType &)
 
bool operator== (const QuantisationType &) const
 
void applyQuantisationToSequence (juce::MidiMessageSequence &, Edit &, TimePosition sequenceStartOffset)
 
bool isEnabled () const
 this type may represent "no quantising" More...
 
void setType (const juce::String &newTypeName)
 
juce::String getType (bool translated) const
 
int getTimecodeSnapTypeLevel (bool &isTriplet) const noexcept
 Returns the TimecodeSnapType level for the current quantisation type. More...
 
float getProportion () const
 the proportion 0..1 of the amount to quantise stuff by. More...
 
void setProportion (float prop)
 
bool isQuantisingNoteOffs () const
 If false, quantising a note on will keep the note its original length. More...
 
void setIsQuantisingNoteOffs (bool isQuantising)
 
BeatPosition roundBeatToNearest (BeatPosition beatNumber) const
 
BeatPosition roundBeatUp (BeatPosition beatNumber) const
 
BeatPosition roundBeatToNearestNonZero (BeatPosition beatNumber) const
 
TimePosition roundToNearest (TimePosition, const Edit &) const
 
TimePosition roundUp (TimePosition, const Edit &) const
 

Static Public Member Functions

static juce::StringArray getAvailableQuantiseTypes (bool translated)
 
static juce::String getDefaultType (bool translated)
 

Public Attributes

juce::ValueTree state
 
juce::CachedValue< juce::String > typeName
 
juce::CachedValue< float > proportion
 
juce::CachedValue< bool > quantiseNoteOffs
 

Constructor & Destructor Documentation

◆ QuantisationType() [1/3]

tracktion::engine::QuantisationType::QuantisationType ( )

◆ QuantisationType() [2/3]

tracktion::engine::QuantisationType::QuantisationType ( const juce::ValueTree &  ,
juce::UndoManager *   
)

◆ ~QuantisationType()

tracktion::engine::QuantisationType::~QuantisationType ( )
override

◆ QuantisationType() [3/3]

tracktion::engine::QuantisationType::QuantisationType ( const QuantisationType )

Member Function Documentation

◆ operator=()

QuantisationType& tracktion::engine::QuantisationType::operator= ( const QuantisationType )

◆ operator==()

bool tracktion::engine::QuantisationType::operator== ( const QuantisationType ) const

◆ applyQuantisationToSequence()

void tracktion::engine::QuantisationType::applyQuantisationToSequence ( juce::MidiMessageSequence &  ,
Edit ,
TimePosition  sequenceStartOffset 
)

◆ isEnabled()

bool tracktion::engine::QuantisationType::isEnabled ( ) const

this type may represent "no quantising"

◆ getAvailableQuantiseTypes()

static juce::StringArray tracktion::engine::QuantisationType::getAvailableQuantiseTypes ( bool  translated)
static

◆ getDefaultType()

static juce::String tracktion::engine::QuantisationType::getDefaultType ( bool  translated)
static

◆ setType()

void tracktion::engine::QuantisationType::setType ( const juce::String &  newTypeName)

References typeName.

◆ getType()

juce::String tracktion::engine::QuantisationType::getType ( bool  translated) const

◆ getTimecodeSnapTypeLevel()

int tracktion::engine::QuantisationType::getTimecodeSnapTypeLevel ( bool &  isTriplet) const
noexcept

Returns the TimecodeSnapType level for the current quantisation type.

Because the TimecodeSnapType level means something different if the time sig is triplets, this also needs to return the triplet type.

◆ getProportion()

float tracktion::engine::QuantisationType::getProportion ( ) const

the proportion 0..1 of the amount to quantise stuff by.

References proportion.

◆ setProportion()

void tracktion::engine::QuantisationType::setProportion ( float  prop)

◆ isQuantisingNoteOffs()

bool tracktion::engine::QuantisationType::isQuantisingNoteOffs ( ) const

If false, quantising a note on will keep the note its original length.

If true (the default), note offs will be quantised to the same grid.

References quantiseNoteOffs.

◆ setIsQuantisingNoteOffs()

void tracktion::engine::QuantisationType::setIsQuantisingNoteOffs ( bool  isQuantising)

References quantiseNoteOffs.

◆ roundBeatToNearest()

BeatPosition tracktion::engine::QuantisationType::roundBeatToNearest ( BeatPosition  beatNumber) const

◆ roundBeatUp()

BeatPosition tracktion::engine::QuantisationType::roundBeatUp ( BeatPosition  beatNumber) const

◆ roundBeatToNearestNonZero()

BeatPosition tracktion::engine::QuantisationType::roundBeatToNearestNonZero ( BeatPosition  beatNumber) const

◆ roundToNearest()

TimePosition tracktion::engine::QuantisationType::roundToNearest ( TimePosition  ,
const Edit  
) const

◆ roundUp()

TimePosition tracktion::engine::QuantisationType::roundUp ( TimePosition  ,
const Edit  
) const

Member Data Documentation

◆ state

juce::ValueTree tracktion::engine::QuantisationType::state

◆ typeName

juce::CachedValue<juce::String> tracktion::engine::QuantisationType::typeName

Referenced by setType().

◆ proportion

juce::CachedValue<float> tracktion::engine::QuantisationType::proportion

Referenced by getProportion().

◆ quantiseNoteOffs

juce::CachedValue<bool> tracktion::engine::QuantisationType::quantiseNoteOffs

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