From 655929a8755e66aa2725c5ca4e7b847d54e485c8 Mon Sep 17 00:00:00 2001 From: AlexanderARodin Date: Mon, 29 Jan 2024 21:47:45 +0300 Subject: [PATCH] tested and adopted AudioServer features for exec midi commands --- src/test_view.rs | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/test_view.rs b/src/test_view.rs index aa52363..b39a5f2 100644 --- a/src/test_view.rs +++ b/src/test_view.rs @@ -118,32 +118,44 @@ impl TestView { ui.horizontal( |ui| { let btnO = ui.button( "[-]" ); if btnO.clicked(){ - let _ = self.audio.exec( "seq 1"); + if let Err(e) = self.audio.exec( "seq 1") { + log::error(&e.to_string()); + } } let btnO1 = ui.button( "[+]" ); if btnO1.clicked(){ - let _ = self.audio.exec( "seq auto"); + if let Err(e) = self.audio.exec( "seq auto") { + log::error(&e.to_string()); + } } ui.separator(); - let mut test_txt = "note ON"; + let mut test_txt = "on60#127"; let btnA = ui.button( test_txt ); if btnA.clicked(){ - let _ = self.audio.exec( test_txt ); + if let Err(e) = self.audio.exec( test_txt ) { + log::error(&e.to_string()); + } } - test_txt = "note ON2"; + test_txt = "on67"; let btnA1 = ui.button( test_txt ); if btnA1.clicked(){ - let _ = self.audio.exec( test_txt ); + if let Err(e) = self.audio.exec( test_txt ) { + log::error(&e.to_string()); + } } - test_txt = "note ON3"; + test_txt = "on71#1"; let btnA2 = ui.button( test_txt ); if btnA2.clicked(){ - let _ = self.audio.exec( test_txt ); + if let Err(e) = self.audio.exec( test_txt ) { + log::error(&e.to_string()); + } } - test_txt = "note OFF"; + test_txt = "off60"; let btnB = ui.button( test_txt ); if btnB.clicked(){ - let _ = self.audio.exec( test_txt ); + if let Err(e) = self.audio.exec( test_txt ) { + log::error(&e.to_string()); + } } });