First attempt at interpolation

This commit is contained in:
2025-06-22 11:44:46 +02:00
parent 7e6a539296
commit b35574c364
11 changed files with 667 additions and 26 deletions

View File

@@ -11,8 +11,13 @@ pub struct Osc {
}
impl Osc {
/// Create new OSC server and controller with same interface as before
pub async fn new(socket_path: &str) -> Result<(Self, OscController)> {
/// Create new OSC server and controller with configurable matrix size and tempo
pub async fn new(
socket_path: &str,
columns: usize,
rows: usize,
tempo: f32,
) -> Result<(Self, OscController)> {
// Create platform listener (server)
let listener = osc_server::platform::create_listener(socket_path).await?;
@@ -27,7 +32,7 @@ impl Osc {
receiver,
listener,
broadcaster,
shadow_state: osc::State::new(5, 5), // Default 5x5 matrix
shadow_state: osc::State::new(columns, rows, tempo),
};
Ok((server, controller))
@@ -105,4 +110,4 @@ impl Osc {
Ok(())
}
}
}