BuGUI
BUtton Grid User Interface
Loading...
Searching...
No Matches
bugui::midi_formater< Component > Struct Template Referencefinal

Provides necesary functionalities to format and store MIDI messages. A Blinking effect can also be applied by storing a color value in a diferent MIDI buffer, to be sent to the dedicated channel. More...

#include <midi_formater.hpp>

Inheritance diagram for bugui::midi_formater< Component >:
bugui::base_midi_formater< Component > bugui::dual_blinker< Component > bugui::dual_pulser< Component > bugui::dual_blinker< Component > bugui::dual_pulser< Component > bugui::base_midi_formater< Component > bugui::base_midi_formater< Component > bugui::base_midi_formater< Component > bugui::base_midi_formater< Component > bugui::base_midi_formater< Component >

Public Types

using color_cnvrtr
using color_cnvrtr
using color_cnvrtr
using cmpnnt_clr = Component::color_t

Public Member Functions

void set (uint8_t id, const color_cnvrtr &converter) override
void clear () override
 Removes all stores values of the message except for it's message type or prefix (NOTE_ON, CONTROL_CHANGE or SYSTEM_EXCLUSIVE).
void set (uint8_t id, const color_cnvrtr &converter) override
void clear () override
 Removes all stores values of the message except for it's message type or prefix (NOTE_ON, CONTROL_CHANGE or SYSTEM_EXCLUSIVE).
void set (uint8_t id, const color_cnvrtr &converter) override
void clear () override
 Removes all stores values of the message except for it's message type or prefix (NOTE_ON, CONTROL_CHANGE or SYSTEM_EXCLUSIVE).
virtual void set (uint8_t id, const color_converter< cmpnnt_clr > &converter)
 Converts and stores an LED's ID and color to the apropriate MIDI message.
Public Member Functions inherited from bugui::base_midi_formater< Component >
void add (uint8_t element)
 Add a given value to a MIDI message. This method is intended to call specific commands on the device (init, clear...) rathen than setting an LED's color (as in set).
bool has_message () const
 Checks if a message is stored and ready to be sent to the device.
const libremidi::midi_bytes & get () const
 Retrives the MIDI message currently stored.
Public Member Functions inherited from bugui::dual_blinker< Component >
bool has_blink_message () const
 Checks if a message is stored in the buffer dedicated for bliking, and ready to be sent to the device.
void add_blink (uint8_t element)
 Add a given value to a MIDI buffer dedicated to blinking LED's.
const libremidi::midi_bytes & get_blink () const
 Retrives the MIDI buffer dedicated to blinking LED's.
Public Member Functions inherited from bugui::dual_pulser< Component >
bool has_pulse_message () const
 Checks if a message is stored in the buffer dedicated for pulsing, and ready to be sent to the device.
void add_pulse (uint8_t element)
 Add a given value to a MIDI buffer dedicated to pulsing LED's.
const libremidi::midi_bytes & get_pulse () const
 Retrives the MIDI buffer dedicated to pulsing LED's.

Additional Inherited Members

Protected Attributes inherited from bugui::base_midi_formater< Component >
libremidi::midi_bytes bytes
Protected Attributes inherited from bugui::dual_blinker< Component >
libremidi::midi_bytes blink_bytes
Protected Attributes inherited from bugui::dual_pulser< Component >
libremidi::midi_bytes pulse_bytes

Detailed Description

template<typename Component>
requires (has_dual_blink<Component> && !has_dual_pulse<Component>)
struct bugui::midi_formater< Component >

Provides necesary functionalities to format and store MIDI messages. A Blinking effect can also be applied by storing a color value in a diferent MIDI buffer, to be sent to the dedicated channel.

Provides necesary functionalities to format and store MIDI messages. Blinking and pulsing effect can also be applied on suported devices. These efects are achieved by offsetting the color value according to the device specification.

Provides necesary functionalities to format and store MIDI messages. Blinking and pulsing effect can also be applied by storing a color value in diferent MIDI buffers, to be sent to dedicated chanels.

Provides necesary functionalities to format and store MIDI messages. A pulsing effect can also be applied by storing a color value in a diferent MIDI buffer, to be sent to the dedicated channel.

Member Typedef Documentation

◆ color_cnvrtr [1/3]

template<typename Component>
using bugui::midi_formater< Component >::color_cnvrtr
Initial value:
Povides convertion of color objects to device specific integer values.
Definition color_converter.hpp:57

◆ color_cnvrtr [2/3]

template<typename Component>
using bugui::midi_formater< Component >::color_cnvrtr

◆ color_cnvrtr [3/3]

template<typename Component>
using bugui::midi_formater< Component >::color_cnvrtr

Member Function Documentation

◆ clear() [1/3]

template<typename Component>
void bugui::midi_formater< Component >::clear ( )
inlineoverridevirtual

Removes all stores values of the message except for it's message type or prefix (NOTE_ON, CONTROL_CHANGE or SYSTEM_EXCLUSIVE).

Reimplemented from bugui::base_midi_formater< Component >.

◆ clear() [2/3]

template<typename Component>
void bugui::midi_formater< Component >::clear ( )
inlineoverridevirtual

Removes all stores values of the message except for it's message type or prefix (NOTE_ON, CONTROL_CHANGE or SYSTEM_EXCLUSIVE).

Reimplemented from bugui::base_midi_formater< Component >.

◆ clear() [3/3]

template<typename Component>
void bugui::midi_formater< Component >::clear ( )
inlineoverridevirtual

Removes all stores values of the message except for it's message type or prefix (NOTE_ON, CONTROL_CHANGE or SYSTEM_EXCLUSIVE).

Reimplemented from bugui::base_midi_formater< Component >.

◆ set()

template<typename Component>
virtual void bugui::midi_formater< Component >::set ( uint8_t id,
const color_converter< cmpnnt_clr > & converter )
inlinevirtual

Converts and stores an LED's ID and color to the apropriate MIDI message.

Reimplemented from bugui::base_midi_formater< Component >.


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