/// Write a message in the format according to the Launchpad user manual.
///
/// Message type       Hex format       Decimal Format
/// Note off           80h, key, vel    128, key, vel
/// Note on            90h, key, vel    144, key, vel
/// Controller change  B0h, key, vel    176, Controller, data
///
/// Controller change is usually meant to controller specific on-board
/// settings or options, or are used for quick-setting/clearing LEDs.
///
/// This function serves as the sub-function used by many convenience
/// functions, and all Launchpads with a Launchpad-like Trait should
/// have this method to build an API on top of.
///
/// ```
/// lp.write(0x80, 37, 33)?;
/// ```
Write a message in the format according to the Launchpad user manual.
Message type       Hex format       Decimal Format
Note off           80h, key, vel    128, key, vel
Note on            90h, key, vel    144, key, vel
Controller change  B0h, key, vel    176, Controller, data

Controller change is usually meant to controller specific on-board
settings or options, or are used for quick-setting/clearing LEDs.

This function serves as the sub-function used by many convenience
functions, and all Launchpads with a Launchpad-like Trait should
have this method to build an API on top of.


Write a message in the format according to the Launchpad user manual . Message type Hex format Decimal Format Note off 80h key vel 128 key vel Note on 90h key vel 144 key vel Controller change B0h key vel 176 Controller data Controller change is usually meant to controller specific on - board settings or options or are used for quick - setting / clearing LEDs . This function serves as the sub - function used by many convenience functions and all Launchpads with a Launchpad - like Trait should have this method to build an API on top of .
pub fn write(&mut self, mtype: u8, note: u8, vel: u8) -> LPErr {
	let v = (*self).output.write_message(pm::MidiMessage {
	    status: mtype,
	    data1: note,
	    data2: vel,
	});
	return match v {
	    Ok(_) => Ok(()),
	    _  => Err("Failed to write message".into()),
	};
    }
pub fn write ( & mut self , mtype : u8 , note : u8 , vel : u8 ) -> LPErr { let v = ( * self ) . output . write_message ( pm :: MidiMessage { status : mtype , data1 : note , data2 : vel , } ) ; return match v { Ok ( _ ) => Ok ( ( ) ) , _ => Err ( " " . into ( ) ) , } ; }
Write a message in the format according to the Launchpad user manual.
Write a message in the format according to the Launchpad user manual .
&mut self
mtype
u8
note
u8
vel
u8