summaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client.rs b/src/client.rs
index b8518b3..5cf941a 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -1,5 +1,5 @@
use std::net::{UdpSocket, SocketAddr};
-use std::{io, mem};
+use std::{io, mem, iter};
use synth::*;
use proto::*;
@@ -111,6 +111,16 @@ impl Client {
self.socket.send_to(&reply_buffer, sender);
},
Command::PCM{..} => { /* TODO */ },
+ Command::PCMSyn{..} => { /* TODO */},
+ Command::ArtParam{voice, index, value} => {
+ dprintln!("Articulation parameter voice {:?} index {} value {}", voice, index, value);
+ for vidx in match voice {
+ Some(vidx) => ((vidx as usize)..((vidx+1) as usize)),
+ None => (0..self.voices.len()),
+ } {
+ *self.voices[vidx].params.vars.entry(format!("artp{}", index)).or_insert_with(Default::default) = value;
+ }
+ },
Command::Unknown{data} => {
dprintln!("Dropping packet: unknown data {:?}", (&data as &[u8]));
},