Loading...
Searching...
No Matches
juce::MPEValue Class Reference

## Detailed Description

This class represents a single value for any of the MPE dimensions of control.

It supports values with 7-bit or 14-bit resolutions (corresponding to 1 or 2 MIDI bytes, respectively). It also offers helper functions to query the value in a variety of representations that can be useful in an audio or MIDI context.

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

- juce_audio_basics/mpe/juce_MPEValue.h

## Public Member Functions

| MPEValue () noexcept
| Default constructor.
int | as7BitInt () const noexcept
| Retrieves the current value as an integer between 0 and 127.
int | as14BitInt () const noexcept
| Retrieves the current value as an integer between 0 and 16383.
float | asSignedFloat () const noexcept
| Retrieves the current value mapped to a float between -1.0f and 1.0f.
float | asUnsignedFloat () const noexcept
| Retrieves the current value mapped to a float between 0.0f and 1.0f.
bool | operator== (const MPEValue &other) const noexcept
| Returns true if two values are equal.
bool | operator!= (const MPEValue &other) const noexcept
| Returns true if two values are not equal.

## Static Public Member Functions

static MPEValue | from7BitInt (int value) noexcept
| Constructs an MPEValue from an integer between 0 and 127 (using 7-bit precision).
static MPEValue | from14BitInt (int value) noexcept
| Constructs an MPEValue from an integer between 0 and 16383 (using 14-bit precision).
static MPEValue | fromUnsignedFloat (float value) noexcept
| Constructs an MPEValue from a float between 0.0f and 1.0f.
static MPEValue | fromSignedFloat (float value) noexcept
| Constructs an MPEValue from a float between -1.0f and 1.0f.
static MPEValue | centreValue () noexcept
| Constructs an MPEValue corresponding to the centre value.
static MPEValue | minValue () noexcept
| Constructs an MPEValue corresponding to the minimum value.
static MPEValue | maxValue () noexcept
| Constructs an MPEValue corresponding to the maximum value.

## Constructors and Destructors

## MPEValue()

juce::MPEValue::MPEValue | ( |  | ) |

noexcept

Default constructor.

Constructs an MPEValue corresponding to the centre value.

Referenced by centreValue(), from14BitInt(), from7BitInt(), fromSignedFloat(), fromUnsignedFloat(), maxValue(), minValue(), operator!=(), and operator==().

## Member Functions

## from7BitInt()

MPEValue juce::MPEValue::from7BitInt | ( | int | value | ) |

static noexcept

Constructs an MPEValue from an integer between 0 and 127 (using 7-bit precision).

References from7BitInt(), and MPEValue().

Referenced by from7BitInt().

## from14BitInt()

MPEValue juce::MPEValue::from14BitInt | ( | int | value | ) |

static noexcept

Constructs an MPEValue from an integer between 0 and 16383 (using 14-bit precision).

References from14BitInt(), and MPEValue().

Referenced by from14BitInt().

## fromUnsignedFloat()

MPEValue juce::MPEValue::fromUnsignedFloat | ( | float | value | ) |

static noexcept

Constructs an MPEValue from a float between 0.0f and 1.0f.

References fromUnsignedFloat(), and MPEValue().

Referenced by fromUnsignedFloat().

## fromSignedFloat()

MPEValue juce::MPEValue::fromSignedFloat | ( | float | value | ) |

static noexcept

Constructs an MPEValue from a float between -1.0f and 1.0f.

References fromSignedFloat(), and MPEValue().

Referenced by fromSignedFloat().

## centreValue()

MPEValue juce::MPEValue::centreValue | ( |  | ) |

static noexcept

Constructs an MPEValue corresponding to the centre value.

References centreValue(), and MPEValue().

Referenced by centreValue().

## minValue()

MPEValue juce::MPEValue::minValue | ( |  | ) |

static noexcept

Constructs an MPEValue corresponding to the minimum value.

References minValue(), and MPEValue().

Referenced by minValue().

## maxValue()

MPEValue juce::MPEValue::maxValue | ( |  | ) |

static noexcept

Constructs an MPEValue corresponding to the maximum value.

References maxValue(), and MPEValue().

Referenced by maxValue().

## as7BitInt()

int juce::MPEValue::as7BitInt | ( |  | ) | const

noexcept

Retrieves the current value as an integer between 0 and 127.

Information will be lost if the value was initialised with a precision higher than 7-bit.

References as7BitInt().

Referenced by as7BitInt().

## as14BitInt()

int juce::MPEValue::as14BitInt | ( |  | ) | const

noexcept

Retrieves the current value as an integer between 0 and 16383.

Resolution will be lost if the value was initialised with a precision higher than 14-bit.

References as14BitInt().

Referenced by as14BitInt().

## asSignedFloat()

float juce::MPEValue::asSignedFloat | ( |  | ) | const

noexcept

Retrieves the current value mapped to a float between -1.0f and 1.0f.

References asSignedFloat().

Referenced by asSignedFloat().

## asUnsignedFloat()

float juce::MPEValue::asUnsignedFloat | ( |  | ) | const

noexcept

Retrieves the current value mapped to a float between 0.0f and 1.0f.

References asUnsignedFloat().

Referenced by asUnsignedFloat().

## operator==()

bool juce::MPEValue::operator== | ( | const MPEValue & | other | ) | const

noexcept

Returns true if two values are equal.

References MPEValue().

## operator!=()

bool juce::MPEValue::operator!= | ( | const MPEValue & | other | ) | const

noexcept

Returns true if two values are not equal.

References MPEValue().

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