From 23c79cc00eb5d8e76148d79af83a9ab838e602f3 Mon Sep 17 00:00:00 2001 From: Graham Northup Date: Tue, 12 Feb 2019 23:34:38 -0500 Subject: Pushing old work --- src/client.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/client.rs') 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])); }, -- cgit v1.2.3-70-g09d2