pub fn new(device: T, parameter: u16, value: ParameterValue) -> Self {
        match value.size() {
            1 | 2 | 4 => {},
            _ => panic!("Invalid parameter value size"),
        }
        let args = MidiFaderCommandArgs::new().
            set_command(0x80).unwrap().
            set_parameter(0, 0).unwrap().
            set_parameter(1, parameter as u32).unwrap().
            set_parameter(2, value.value() as u32).unwrap().
            set_parameter(3, value.size() as u32).unwrap();
        SetParameter { command: Some(MidiFaderCommand::new(device, args)) }
    }
// Build a new set parameter command
Build a new set parameter command
Build a new set parameter command
pub fn new(device: T, parameter: u16, value: ParameterValue) -> Self {
        match value.size() {
            1 | 2 | 4 => {},
            _ => panic!("Invalid parameter value size"),
        }
        let args = MidiFaderCommandArgs::new().
            set_command(0x80).unwrap().
            set_parameter(0, 0).unwrap().
            set_parameter(1, parameter as u32).unwrap().
            set_parameter(2, value.value() as u32).unwrap().
            set_parameter(3, value.size() as u32).unwrap();
        SetParameter { command: Some(MidiFaderCommand::new(device, args)) }
    }
pub fn new ( device : T , parameter : u16 , value : ParameterValue ) -> Self { match value . size ( ) { 1 | 2 | 4 => { } , _ => panic ! ( " " ) , } let args = MidiFaderCommandArgs :: new ( ) . set_command ( 0x80 ) . unwrap ( ) . set_parameter ( 0 , 0 ) . unwrap ( ) . set_parameter ( 1 , parameter as u32 ) . unwrap ( ) . set_parameter ( 2 , value . value ( ) as u32 ) . unwrap ( ) . set_parameter ( 3 , value . size ( ) as u32 ) . unwrap ( ) ; SetParameter { command : Some ( MidiFaderCommand :: new ( device , args ) ) } }
Build a new set parameter command
Build a new set parameter command
device
T
parameter
u16
value
ParameterValue