Expand description
§djio
Application-independent interfaces for accessing hardware DJ controllers through MIDI or HID.
§Supported Controllers
§MIDI
- Denon DJ MC6000MK2
- Korg KAOSS DJ
- Pioneer DDJ-400
§HID
- Native Instruments TRAKTOR KONTROL S4MK3
§Examples
§Hotplugging of DJ MIDI controllers
RUST_LOG=debug cargo run --example midi-dj-controller-hotplug
§Credits
We have been inspired by and adopted some ideas from the following projects:
§License
Licensed under the Mozilla Public License 2.0 (MPL-2.0) (see MPL-2.0.txt or https://www.mozilla.org/MPL/2.0/).
Permissions of this copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.
§Contribution
Any contribution intentionally submitted for inclusion in the work by you shall be licensed under the Mozilla Public License 2.0 (MPL-2.0).
It is required to add the following header with the corresponding SPDX short identifier to the top of each file:
// SPDX-License-Identifier: MPL-2.0
Re-exports§
pub use self::hid::HidApi;
pub use self::hid::HidDevice;
pub use self::hid::HidDeviceError;
pub use self::hid::HidError;
pub use self::hid::HidResult;
pub use self::hid::HidThread;
pub use self::hid::HidUsagePage;
pub use self::deck::Observables as DeckObservables;
pub use self::deck::Adapter as DeckAdapter;
pub use self::deck::Input as DeckInput;
Modules§
Structs§
- Audio
Interface Descriptor - Blinking
LedOutput - Blinking
LedTicker - Center
Slider Input - A continuous fader or knob with a symmetric center position.
- Control
- Generic, indexed input/output control value.
- Control
Index - Index for addressing either or both device inputs and outputs in a generic manner.
- Control
Value - A generic, encoded control value.
- Controller
Descriptor - Controller
Thread - Dedicated thread for each controller.
- Device
Descriptor - Common, information properties about a device.
- DimLed
Output - Dimmable LED
- Input
Event - Time-stamped input event
- Midi
Device Descriptor - MIDI-related, extended
DeviceDescriptor
- Midi
Input Decode Error - Midi
Port Descriptor - Midir
Device - MIDI device driven by
midir
. - Midir
Device Manager - Identifies and connects
MidirDevice
s. - Midir
Input Port - Midir
Output Port - PadButton
Input - A pad button with pressure information.
- Port
Index - Index for addressing multiple, connected devices.
- Port
Index Generator - Thread-safe
PortIndex
generator - RgbLed
Output - RGB LED
- Selector
Input - Choose one out of many, discrete possible choices
- Send
Outputs Error - First error after sending multiple outputs
- Single
Midi Controller Context - Slider
Encoder Input - An endless encoder that sends continuous delta values
- Slider
Input - A continuous fader or knob.
- Step
Encoder Input - An endless encoder that sends discrete delta values
- Time
Stamp - Time stamp with microsecond precision
- Virtual
Led - Virtual LED
Enums§
- Button
Input - A simple two-state button.
- Crossfader
Curve - LedOutput
- Simple LED
- LedState
- Midi
Port Error - Output
Error
Constants§
Traits§
- Control
Input Event Sink - Control
Output Gateway - Controller
- Controller
Types - Midi
Control Output Gateway - Midi
Controller - Midi
Input Connector - Midi
Input Event Decoder - Decode and map received MIDI messages into
ControlInputEvent
s. - Midi
Input Gateway - Midi
Input Handler - Passive callback for sinking MIDI input messages
- Midi
Output Connection - Midi
Output Gateway - NewMidi
Input Gateway
Functions§
- blinking_
led_ task - consume_
midi_ input_ event - input_
events_ ordered_ chronologically - spawn_
blinking_ led_ task - Spawn a task that periodically emits a blinking LED trigger.
- split_
crossfader_ input_ amplitude_ preserving_ approx - split_
crossfader_ input_ energy_ preserving_ approx - split_
crossfader_ input_ linear - split_
crossfader_ input_ square - u7_
be_ to_ u14 - A commonly needed conversion for MIDI and (maybe other) devices.
Type Aliases§
- Boxed
Controller Task - Asynchronous context listener task.
- Boxed
Midi Controller - Boxed
Midi Output Connection - Control
Input Event - Output
Result