[][src]Struct launchy::launch_control::Output

pub struct Output { /* fields omitted */ }

The Launch Control output connection handler.

Implementations

impl Output[src]

pub fn set_button(
    &mut self,
    template: impl Into<Template>,
    button: Button,
    color: Color,
    d: DoubleBufferingBehavior
) -> Result<(), MidiError>
[src]

Updates the state for a single LED, specified by button. The color, as well as the double buffering attributes, are specified in light_state.

The given template must match the currently selected template on the Launch Control, or nothing will happen.

pub fn turn_off_button(
    &mut self,
    template: impl Into<Template>,
    button: Button
) -> Result<(), MidiError>
[src]

The Launch Control interprets this message exactly the same as self.set_button(template, button, Color::Black, DoubleBufferingBehavior::None)

The given template must match the currently selected template on the Launch Control, or nothing will happen.

pub fn light_multiple(
    &mut self,
    template: impl Into<Template>,
    pads: impl IntoIterator<Item = impl Borrow<(Button, Color, DoubleBufferingBehavior)>>
) -> Result<(), MidiError>
[src]

Light multiple buttons with varying colors and double buffering behavior.

The given template must match the currently selected template on the Launch Control, or nothing will happen.

pub fn change_template(
    &mut self,
    template: impl Into<Template>
) -> Result<(), MidiError>
[src]

Change the template that will be displayed and edited on

pub fn turn_on_all_leds(
    &mut self,
    template: impl Into<Template>,
    brightness: Brightness
) -> Result<(), MidiError>
[src]

Turns on all LEDs to a certain brightness, dictated by the brightness parameter. According to the Launchpad documentation, sending this command resets various configuration settings - see reset() for more information. However, in my experience, that only sometimes happens. Weird.

The template parameter specifies for which template this message is intended

Btw this function is not really intended for regular use. It's more like a test function to check if the device is working correctly, diagnostic stuff like that.

pub fn control_double_buffering(
    &mut self,
    template: impl Into<Template>,
    d: DoubleBuffering
) -> Result<(), MidiError>
[src]

This method controls the double buffering mode on the Launchpad. See the module documentation for an explanation on double buffering. // TODO

The default state is no flashing; the first buffer is both the update and the displayed buffer: In this mode, any LED data written to Launchpad is displayed instantly. Sending this message also resets the flash timer, so it can be used to resynchronise the flash rates of all the Launchpads connected to a system.

  • If copy is set, copy the LED states from the new displayed buffer to the new updating buffer.
  • If flash is set, continually flip displayed buffers to make selected LEDs flash.
  • updated: the new updated buffer
  • displayed: the new displayed buffer

The template parameter specifies for which template this message is intended

pub fn reset(&mut self, template: impl Into<Template>) -> Result<(), MidiError>[src]

All LEDs are turned off, and the mapping mode, buffer settings, and duty cycle are reset to their default values.

pub fn light(
    &mut self,
    template: impl Into<Template>,
    button: Button,
    color: Color,
    dbb: DoubleBufferingBehavior
) -> Result<(), MidiError>
[src]

Light a button with a certain color.

The given template must match the currently selected template on the Launch Control, or nothing will happen.

Trait Implementations

impl OutputDevice for Output[src]

Auto Trait Implementations

impl !RefUnwindSafe for Output

impl Send for Output

impl !Sync for Output

impl Unpin for Output

impl UnwindSafe for Output

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.