TracktionEngine
Loading...
Searching...
No Matches
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

References MidiNote().

Member Function Documentation

◆ createNote()

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

References MidiNote().

◆ operator==()

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

References MidiNote(), and state.

◆ operator!=()

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

References MidiNote(), and state.

◆ getBeatPosition()

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

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

◆ getStartBeat()

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

Referenced by getRangeBeats().

◆ getEndBeat()

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

Referenced by getRangeBeats().

◆ getLengthBeats()

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

◆ getRangeBeats()

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

References getEndBeat(), and getStartBeat().

◆ 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 *  )

References setNoteOffVelocity().

Referenced by setNoteOffVelocity().

◆ getColour()

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

References getColour().

Referenced by getColour().

◆ 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

Referenced by operator!=(), and operator==().


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