OpenShot Audio Library | OpenShotAudio 0.4.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
juce::MPEValue Class Reference

`#include <juce_MPEValue.h>`

## Public Member Functions
| MPEValue () noexcept
int | as7BitInt () const noexcept
int | as14BitInt () const noexcept
float | asSignedFloat () const noexcept
float | asUnsignedFloat () const noexcept
bool | operator== (const MPEValue &other) const noexcept
bool | operator!= (const MPEValue &other) const noexcept

## Static Public Member Functions
static MPEValue | from7BitInt (int value) noexcept
static MPEValue | from14BitInt (int value) noexcept
static MPEValue | fromUnsignedFloat (float value) noexcept
static MPEValue | fromSignedFloat (float value) noexcept
static MPEValue | centreValue () noexcept
static MPEValue | minValue () noexcept
static MPEValue | maxValue () noexcept

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

Definition at line 36 of file juce_MPEValue.h.

## Constructor & Destructor Documentation

## ◆ MPEValue()

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

Default constructor.

Constructs an MPEValue corresponding to the centre value.

Definition at line 26 of file juce_MPEValue.cpp.

## Member Function Documentation

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

Definition at line 68 of file juce_MPEValue.cpp.

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

Definition at line 63 of file juce_MPEValue.cpp.

## ◆ asSignedFloat()

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

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

Definition at line 74 of file juce_MPEValue.cpp.

## ◆ asUnsignedFloat()

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

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

Definition at line 81 of file juce_MPEValue.cpp.

## ◆ centreValue()

MPEValue juce::MPEValue::centreValue | ( |  | ) |
| static noexcept

Constructs an MPEValue corresponding to the centre value.

Definition at line 60 of file juce_MPEValue.cpp.

Referenced by juce::MPEInstrument::noteOff().

## ◆ from14BitInt()

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

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

Definition at line 40 of file juce_MPEValue.cpp.

## ◆ from7BitInt()

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

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

Definition at line 30 of file juce_MPEValue.cpp.

Referenced by centreValue(), maxValue(), minValue(), juce::MPEInstrument::noteOn(), juce::MPEInstrument::releaseAllNotes(), and juce::MPESynthesiser::turnOffAllVoices().

## ◆ fromSignedFloat()

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

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

Definition at line 52 of file juce_MPEValue.cpp.

## ◆ fromUnsignedFloat()

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

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

Definition at line 46 of file juce_MPEValue.cpp.

## ◆ maxValue()

MPEValue juce::MPEValue::maxValue | ( |  | ) |
| static noexcept

Constructs an MPEValue corresponding to the maximum value.

Definition at line 61 of file juce_MPEValue.cpp.

## ◆ minValue()

MPEValue juce::MPEValue::minValue | ( |  | ) |
| static noexcept

Constructs an MPEValue corresponding to the minimum value.

Definition at line 59 of file juce_MPEValue.cpp.

Referenced by juce::MPEInstrument::noteOff().

## ◆ operator!=()

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

Returns true if two values are not equal.

Definition at line 92 of file juce_MPEValue.cpp.

## ◆ operator==()

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

Returns true if two values are equal.

Definition at line 87 of file juce_MPEValue.cpp.

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

- juce_MPEValue.h
- juce_MPEValue.cpp