TracktionEngine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
engine::MidiNote Class Reference

#include <tracktion_MidiNote.h>

Public Types

enum  NoteEdge { startEdge , endEdge }
 

Public Member Functions

 MidiNote (const juce::ValueTree &)
 
 MidiNote (MidiNote &&)=default
 
bool operator== (const MidiNote &other) const noexcept
 
bool operator!= (const MidiNote &other) const noexcept
 
BeatPosition getBeatPosition () const noexcept
 Start pos, in beats, from the start of the clip.
 
BeatPosition getStartBeat () const noexcept
 
BeatPosition getEndBeat () const noexcept
 
BeatDuration getLengthBeats () const noexcept
 
BeatRange getRangeBeats () const noexcept
 
TimePosition getPlaybackTime (NoteEdge, const MidiClip &, const GrooveTemplate *) const
 
BeatPosition getPlaybackBeats (NoteEdge, const MidiClip &, const GrooveTemplate *) const
 
BeatPosition getQuantisedStartBeat (const MidiClip &) const
 Returns the start, quantised according to the clip's settings.
 
BeatPosition getQuantisedStartBeat (const MidiClip *) const
 
BeatPosition getQuantisedEndBeat (const MidiClip &) const
 
BeatPosition getQuantisedEndBeat (const MidiClip *) const
 
BeatDuration getQuantisedLengthBeats (const MidiClip &) const
 
BeatDuration getQuantisedLengthBeats (const MidiClip *) const
 
TimePosition getEditStartTime (const MidiClip &) const
 Gets the start of this note in terms of edit time, taking into account quantising, groove templates, clip offset, etc...
 
TimePosition getEditEndTime (const MidiClip &) const
 
TimeDuration getLengthSeconds (const MidiClip &) const
 
TimeRange getEditTimeRange (const MidiClip &) const
 
void setStartAndLength (BeatPosition newStartBeat, BeatDuration newLengthInBeats, juce::UndoManager *)
 
int getNoteNumber () const noexcept
 
void setNoteNumber (int newNoteNumber, juce::UndoManager *)
 
int getVelocity () const noexcept
 
void setVelocity (int newVelocity, juce::UndoManager *)
 
int getNoteOffVelocity () const noexcept
 
void setNoteOffVelocity (int newOffVelocity, juce::UndoManager *)
 
int getColour () const noexcept
 
void setColour (int newColourIndex, juce::UndoManager *)
 
bool isMute () const noexcept
 
void setMute (bool shouldMute, juce::UndoManager *)
 

Static Public Member Functions

static juce::ValueTree createNote (const MidiNote &, BeatPosition newStart, BeatDuration newLength)
 

Public Attributes

juce::ValueTree state
 

Member Enumeration Documentation

◆ NoteEdge

Enumerator
startEdge 
endEdge 

Constructor & Destructor Documentation

◆ MidiNote() [1/2]

engine::MidiNote::MidiNote ( const juce::ValueTree &  )

◆ MidiNote() [2/2]

engine::MidiNote::MidiNote ( MidiNote &&  )
default

Member Function Documentation

◆ createNote()

static juce::ValueTree engine::MidiNote::createNote ( const MidiNote ,
BeatPosition  newStart,
BeatDuration  newLength 
)
static

◆ operator==()

bool engine::MidiNote::operator== ( const MidiNote other) const
noexcept

◆ operator!=()

bool engine::MidiNote::operator!= ( const MidiNote other) const
noexcept

◆ getBeatPosition()

BeatPosition engine::MidiNote::getBeatPosition ( ) const
noexcept

Start pos, in beats, from the start of the clip.

◆ getStartBeat()

BeatPosition engine::MidiNote::getStartBeat ( ) const
noexcept

◆ getEndBeat()

BeatPosition engine::MidiNote::getEndBeat ( ) const
noexcept

◆ getLengthBeats()

BeatDuration engine::MidiNote::getLengthBeats ( ) const
noexcept

◆ getRangeBeats()

BeatRange engine::MidiNote::getRangeBeats ( ) const
noexcept

◆ getPlaybackTime()

TimePosition engine::MidiNote::getPlaybackTime ( NoteEdge  ,
const MidiClip ,
const GrooveTemplate  
) const

◆ getPlaybackBeats()

BeatPosition engine::MidiNote::getPlaybackBeats ( NoteEdge  ,
const MidiClip ,
const GrooveTemplate  
) const

◆ getQuantisedStartBeat() [1/2]

BeatPosition engine::MidiNote::getQuantisedStartBeat ( const MidiClip ) const

Returns the start, quantised according to the clip's settings.

◆ getQuantisedStartBeat() [2/2]

BeatPosition engine::MidiNote::getQuantisedStartBeat ( const MidiClip ) const

◆ getQuantisedEndBeat() [1/2]

BeatPosition engine::MidiNote::getQuantisedEndBeat ( const MidiClip ) const

◆ getQuantisedEndBeat() [2/2]

BeatPosition engine::MidiNote::getQuantisedEndBeat ( const MidiClip ) const

◆ getQuantisedLengthBeats() [1/2]

BeatDuration engine::MidiNote::getQuantisedLengthBeats ( const MidiClip ) const

◆ getQuantisedLengthBeats() [2/2]

BeatDuration engine::MidiNote::getQuantisedLengthBeats ( const MidiClip ) const

◆ getEditStartTime()

TimePosition engine::MidiNote::getEditStartTime ( const MidiClip ) const

Gets the start of this note in terms of edit time, taking into account quantising, groove templates, clip offset, etc...

◆ getEditEndTime()

TimePosition engine::MidiNote::getEditEndTime ( const MidiClip ) const

◆ getLengthSeconds()

TimeDuration engine::MidiNote::getLengthSeconds ( const MidiClip ) const

◆ getEditTimeRange()

TimeRange engine::MidiNote::getEditTimeRange ( const MidiClip ) const

◆ setStartAndLength()

void engine::MidiNote::setStartAndLength ( BeatPosition  newStartBeat,
BeatDuration  newLengthInBeats,
juce::UndoManager *   
)

◆ getNoteNumber()

int engine::MidiNote::getNoteNumber ( ) const
noexcept

◆ setNoteNumber()

void engine::MidiNote::setNoteNumber ( int  newNoteNumber,
juce::UndoManager *   
)

◆ getVelocity()

int engine::MidiNote::getVelocity ( ) const
noexcept

◆ setVelocity()

void engine::MidiNote::setVelocity ( int  newVelocity,
juce::UndoManager *   
)

◆ getNoteOffVelocity()

int engine::MidiNote::getNoteOffVelocity ( ) const
noexcept

◆ setNoteOffVelocity()

void engine::MidiNote::setNoteOffVelocity ( int  newOffVelocity,
juce::UndoManager *   
)

◆ getColour()

int engine::MidiNote::getColour ( ) const
noexcept

◆ setColour()

void engine::MidiNote::setColour ( int  newColourIndex,
juce::UndoManager *   
)

◆ isMute()

bool engine::MidiNote::isMute ( ) const
noexcept

◆ setMute()

void engine::MidiNote::setMute ( bool  shouldMute,
juce::UndoManager *   
)

Member Data Documentation

◆ state

juce::ValueTree engine::MidiNote::state

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