JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::MidiMessageMetadata Struct Referencefinal

A view of MIDI message data stored in a contiguous buffer. More...

#include <juce_MidiBuffer.h>

Collaboration diagram for juce::MidiMessageMetadata:

Public Member Functions

 MidiMessageMetadata () noexcept=default
 
 MidiMessageMetadata (const uint8 *dataIn, int numBytesIn, int positionIn) noexcept
 
MidiMessage getMessage () const
 Constructs a new MidiMessage instance from the data that this object is viewing. More...
 

Public Attributes

const uint8data = nullptr
 Pointer to the first byte of a MIDI message. More...
 
int numBytes = 0
 The number of bytes in the MIDI message. More...
 
int samplePosition = 0
 The MIDI message's timestamp. More...
 

Detailed Description

A view of MIDI message data stored in a contiguous buffer.

Instances of this class do not own the midi data bytes that they point to. Instead, they expect the midi data to live in a separate buffer that outlives the MidiMessageMetadata instance.

@tags{Audio}

Constructor & Destructor Documentation

◆ MidiMessageMetadata() [1/2]

juce::MidiMessageMetadata::MidiMessageMetadata ( )
defaultnoexcept

◆ MidiMessageMetadata() [2/2]

juce::MidiMessageMetadata::MidiMessageMetadata ( const uint8 dataIn,
int  numBytesIn,
int  positionIn 
)
inlinenoexcept

Member Function Documentation

◆ getMessage()

MidiMessage juce::MidiMessageMetadata::getMessage ( ) const
inline

Constructs a new MidiMessage instance from the data that this object is viewing.

Note that MidiMessage owns its data storage, whereas MidiMessageMetadata does not.

References data, numBytes, and samplePosition.

Member Data Documentation

◆ data

const uint8* juce::MidiMessageMetadata::data = nullptr

Pointer to the first byte of a MIDI message.

Referenced by getMessage().

◆ numBytes

int juce::MidiMessageMetadata::numBytes = 0

The number of bytes in the MIDI message.

Referenced by getMessage().

◆ samplePosition

int juce::MidiMessageMetadata::samplePosition = 0

The MIDI message's timestamp.

Referenced by getMessage().


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