Loading...
Searching...
No Matches
juce::MidiMessageMetadata Struct Reference

## 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.

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

- juce_audio_basics/midi/juce_MidiBuffer.h

## 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.
Span< const std::byte > | asSpan () const &
Span< const std::byte > | asSpan () const &&=delete

## Public Attributes

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

## Constructors and Destructors

## MidiMessageMetadata() [1/2]

juce::MidiMessageMetadata::MidiMessageMetadata | ( |  | ) |

default noexcept

Referenced by MidiMessageMetadata().

## MidiMessageMetadata() [2/2]

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

inline noexcept

References data, MidiMessageMetadata(), numBytes, and samplePosition.

## Member Functions

## 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.

## asSpan() [1/2]

Span< const std::byte > juce::MidiMessageMetadata::asSpan | ( |  | ) | const &

inline

References data, and numBytes.

## asSpan() [2/2]

Span< const std::byte > juce::MidiMessageMetadata::asSpan | ( |  | ) | const &&

delete

## Member Data Documentation

## data

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

Pointer to the first byte of a MIDI message.

Referenced by asSpan(), getMessage(), and MidiMessageMetadata().

## numBytes

int juce::MidiMessageMetadata::numBytes = 0

The number of bytes in the MIDI message.

Referenced by asSpan(), getMessage(), and MidiMessageMetadata().

## samplePosition

int juce::MidiMessageMetadata::samplePosition = 0

The MIDI message's timestamp.

Referenced by getMessage(), and MidiMessageMetadata().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited