feat: implement MIDI routing, improve UI #1

Merged
nicole merged 5 commits from feat-midi-routing into main 2025-01-13 03:31:12 +00:00
2 changed files with 14 additions and 2 deletions
Showing only changes of commit 6bc347851d - Show all commits

View file

@ -169,10 +169,10 @@ impl State {
let send_queue = self.message_send.clone();
if let Ok(conn) = midi.connect(
&port,
port,
&name,
|timestamp, bytes, (conn_id, send_queue)| {
handle_message(timestamp, bytes, &conn_id, &send_queue);
handle_message(timestamp, bytes, conn_id, send_queue);
},
(port.id(), send_queue),
) {
@ -188,6 +188,12 @@ impl State {
}
}
impl Default for State {
fn default() -> Self {
State::new()
}
}
fn guess_catgory(name: &str) -> Category {
if name.contains("TravelSax2") || name.contains("AE-20") {
Category::WindSynth

View file

@ -47,6 +47,12 @@ impl DisplayState {
}
}
impl Default for DisplayState {
fn default() -> Self {
DisplayState::new()
}
}
/// Queues we receive from to refresh and update the UI.
#[derive(Debug, Clone)]
pub struct DisplayQueues {