etc-express-midi

Crates.ioetc-express-midi
lib.rsetc-express-midi
version0.2.1
sourcesrc
created_at2023-08-02 22:06:36.537258
updated_at2023-08-02 22:06:36.537258
descriptionControl the ETC Express lighting console using MIDI commands.
homepagehttps://github.com/BrenekH/etc-express-midi#readme
repositoryhttps://github.com/BrenekH/etc-express-midi
max_upload_size
id933176
size23,953
Brenek Harrison (BrenekH)

documentation

https://docs.rs/etc-express-midi

README

ETC Express MIDI

Rust library to control the ETC Express lighting console using MIDI commands.

This library contains 2 methods of interacting with the Express console:

  • Method 1 uses MIDI instrument commands to interact with the cue and macro functionality of the Express. Any USB to MIDI adapter should work with this method.

  • Method 2 uses MIDI Show Control to operate the Express. This method requires a MIDI adapter that passes SysEx commands.

Examples

ETC MIDI

use etc_express_midi::{MidiOutput, ConsoleETCMidi, FaderPair};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let midi_client = MidiOutput::new("ETC MIDI Example")?;
    let midi_ports = midi_client.ports();

    let midi_port_index = 0; // The index of the desired controller
    let midi_conn = midi_client.connect(&(midi_ports[midi_port_index]), "Example Output")?;

    let express_midi_channel = 1;
    let mut express_console = ConsoleETCMidi::new(midi_conn, express_midi_channel);

    // Execute the next cue in the CD fader pair
    express_console.go(FaderPair::CD)?;

    Ok(())
}

MIDI Show Control

use etc_express_midi::{MidiOutput, ConsoleMSC, FaderPair};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let midi_client = MidiOutput::new("ETC MSC Example")?;
    let midi_ports = midi_client.ports();

    let midi_port_index = 0; // The index of the desired controller
    let midi_conn = midi_client.connect(&(midi_ports[midi_port_index]), "Example Output")?;

    let msc_device_id = 1;
    let mut express_console = ConsoleMSC::new(midi_conn, msc_device_id);

    // Execute the next cue in the CD fader pair
    express_console.go(FaderPair::CD)?;

    Ok(())
}
Commit count: 31

cargo fmt