pub struct Output { /* private fields */ }Expand description
The Launch Control output connection handler.
Implementations§
Source§impl Output
impl Output
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.
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.
Sourcepub fn light_multiple(
&mut self,
template: impl Into<Template>,
pads: impl IntoIterator<Item = impl Borrow<(Button, Color, DoubleBufferingBehavior)>>,
) -> Result<(), MidiError>
pub fn light_multiple( &mut self, template: impl Into<Template>, pads: impl IntoIterator<Item = impl Borrow<(Button, Color, DoubleBufferingBehavior)>>, ) -> Result<(), MidiError>
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.
Sourcepub fn change_template(
&mut self,
template: impl Into<Template>,
) -> Result<(), MidiError>
pub fn change_template( &mut self, template: impl Into<Template>, ) -> Result<(), MidiError>
Change the template that will be displayed and edited on
Sourcepub fn turn_on_all_leds(
&mut self,
template: impl Into<Template>,
brightness: Brightness,
) -> Result<(), MidiError>
pub fn turn_on_all_leds( &mut self, template: impl Into<Template>, brightness: Brightness, ) -> Result<(), MidiError>
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.
Sourcepub fn control_double_buffering(
&mut self,
template: impl Into<Template>,
d: DoubleBuffering,
) -> Result<(), MidiError>
pub fn control_double_buffering( &mut self, template: impl Into<Template>, d: DoubleBuffering, ) -> Result<(), MidiError>
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
copyis set, copy the LED states from the new displayed buffer to the new updating buffer. - If
flashis set, continually flip displayed buffers to make selected LEDs flash. updated: the new updated bufferdisplayed: the new displayed buffer
The template parameter specifies for which template this message is intended