summaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
authorGraham Northup <grissess@nexusg.org>2019-02-12 23:36:38 -0500
committerGraham Northup <grissess@nexusg.org>2019-02-12 23:36:38 -0500
commit5c39a9c26ddd9d7aa4a4fa1af0244348daab0011 (patch)
tree7cc0c140ed8c801d276f87a7663c67be75a842ee /src/client.rs
parent9f2b13aaf422014cb1988a8d91b55aef9c964f12 (diff)
parent23c79cc00eb5d8e76148d79af83a9ab838e602f3 (diff)
Merge branch 'work' into nogfx
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]));
},