pub(crate) mod input;
pub(crate) mod learn;
pub(crate) mod monitor;
pub(crate) mod output;
pub(crate) mod runtime;
pub(crate) mod state;
use std::thread::spawn;
pub(crate) fn start_threads() -> (
kanal::Receiver<monitor::MidiMonitorEvent>,
kanal::Sender<runtime::TestCommand>,
) {
let receiver = monitor::init();
let (runtime_bus, test_command_sender) = runtime::RuntimeBus::new();
let input_runtime_bus = runtime_bus.clone();
let output_runtime_bus = runtime_bus.clone();
spawn(state::start);
spawn(move || input::discover(input_runtime_bus));
spawn(move || output::discover(output_runtime_bus));
(receiver, test_command_sender)
}