private void button2_Click(object sender, EventArgs e) { ip = TBIp.Text; port = int.Parse(TBPort.Text); oscm = new OSC(ip, port); OSCmsg omess = new OSCmsg("/test send int float"); omess.addValue(357); omess.addValue(25.75f); oscm.sendOSCmsg(omess); }
private void button1_Click(object sender, EventArgs e) { ip = TBIp.Text; port = int.Parse(TBPort.Text); oscm = new OSC(ip, port); string m = "/test send int"; OSCmsg omess = new OSCmsg(m); omess.addValue(245); oscm.sendOSCmsg(omess); }
private void BSend_Click(object sender, EventArgs e) { ip = TBIp.Text; port = int.Parse(TBPort.Text); oscm = new OSC(ip, port); if (CBString.Checked) { OSCmsg omess = new OSCmsg(TBMsg.Text); omess.addValue(TBValue.Text); oscm.sendOSCmsg(omess); } else { OSCmsg omess = new OSCmsg(TBMsg.Text); omess.addValue(float.Parse(TBValue.Text)); oscm.sendOSCmsg(omess); } }
public void sendOSCmsg(OSCmsg om) { byte[] Bval = new byte[4]; byte[] data = new byte[4]; string tt = ","; foreach (string s in om.typeTag) { tt = tt + s; } string cmd = formateMSG(om.msg) + formateMSG(tt); data = Encoding.ASCII.GetBytes(cmd); Bval = om.value[0]; for (int i = 1; i < om.value.Count; i++) { Bval = append(Bval, om.value[i]); } data = append(data, Bval); server.Send(data, data.Length); }
private void button5_Click(object sender, EventArgs e) { oscMessThread = null; timer2.Enabled = false; OSCmsg omess7 = new OSCmsg("/vcs"); omess7.addValue(3145729); omess7.addValue(0.001f); oscm.sendOSCmsg(omess7); oscm.Disconnect(); }
private void oscMessThread_SendMessages() { OSCmsg omess0 = new OSCmsg("/vcs"); omess0.addValue(3145733); omess0.addValue(0.015f); oscm.sendOSCmsg(omess0); Thread.Sleep(10); OSCmsg omess = new OSCmsg("/vcs"); omess.addValue(3145731); float frequencef = 0.5f - Math.Abs(Math.Abs(_s.AccelX / 100000f) + Math.Abs(_s.AccelY / 100000f) + Math.Abs(_s.AccelZ / 100000f)); omess.addValue(frequencef); oscm.sendOSCmsg(omess); Thread.Sleep(10); OSCmsg omess2 = new OSCmsg("/vcs"); omess2.addValue(3145730); float densitef = 0.3f - Math.Abs(Math.Abs(_s.AccelX / 100000f) + Math.Abs(_s.AccelY / 100000f) + Math.Abs(_s.AccelZ / 100000f)) /*Math.Abs(_s.GyroZ / 10000f)*/; omess2.addValue(densitef); oscm.sendOSCmsg(omess2); OSCmvuybuibbioooob Thread.Sleep(10); OSCmsg omess3 = new OSCmsg("/vcs"); omess3.addValue(3145732); float Amplitudef = 0.5f - Math.Abs(Math.Abs(_s.AccelX / 5000f) + Math.Abs(_s.AccelY / 5000f) + Math.Abs(_s.AccelZ / 5000f))/*0.2f + Math.Abs(_s.GyroX / 10000f)*/; omess3.addValue(Amplitudef); oscm.sendOSCmsg(omess3); Thread.Sleep(10); OSCmsg omess4 = new OSCmsg("/vcs"); omess4.addValue(3145734); float amplitude = Math.Abs(_s.GyroY / 10000f); omess4.addValue(amplitude); oscm.sendOSCmsg(omess4); Thread.Sleep(10); OSCmsg omess5 = new OSCmsg("/vcs"); omess5.addValue(3145729); float fjiterf = Math.Abs(_s.GyroX / 10000f); omess5.addValue(fjiterf); oscm.sendOSCmsg(omess5); Thread.Sleep(10); OSCmsg omess6 = new OSCmsg("/vcs"); omess6.addValue(3145735); float ffjiterf = 0.5f + Math.Abs(_s.GyroZ / 50000f); omess6.addValue(ffjiterf); oscm.sendOSCmsg(omess6); oscMessThread = null; }
private void chocthread_send() { float choc_f = Math.Abs(Math.Abs(_s.AccelX / 30000f) + Math.Abs(_s.AccelY / 30000f) + Math.Abs(_s.AccelZ / 30000f)); OSCmsg omess7 = new OSCmsg("/vcs"); omess7.addValue(3145729); omess7.addValue(choc_f); oscm.sendOSCmsg(omess7); chocthread = null; }
public void addOSCmsg(OSCmsg om) { this.bundle.Add(om); }
public void sendOSCmsg(OSCmsg om) { byte[] Bval = new byte[4]; byte[] data = new byte[4]; string tt = ","; foreach (string s in om.typeTag) { tt = tt + s; } string cmd = formateMSG(om.msg) + formateMSG(tt); data = Encoding.ASCII.GetBytes(cmd); Bval = om.value[0]; for (int i = 1; i < om.value.Count; i++ ) { Bval = append(Bval, om.value[i]); } data = append(data, Bval); server.Send(data, data.Length); }
private void button4_Click(object sender, EventArgs e) { ip = TBIp.Text; port = int.Parse(TBPort.Text); oscm = new OSC(ip, port); OSCbundle obu = new OSCbundle(); OSCmsg omess = new OSCmsg("/test bundel 1"); omess.addValue(357); omess.addValue(25.75f); obu.addOSCmsg(omess); OSCmsg omess2 = new OSCmsg("/test bundel 2"); omess2.addValue(85); omess2.addValue(0.3f); obu.addOSCmsg(omess2); oscm.sendOSCBundle(obu); }
private void button3_Click(object sender, EventArgs e) { ip = TBIp.Text; port = int.Parse(TBPort.Text); oscm = new OSC(ip, port); OSCmsg omess = new OSCmsg("/test send blob"); OSCblob oscb = new OSCblob(); oscb.addBlob(258); oscb.addBlob(2.3f); oscb.addBlob("yahoo!"); omess.addBlob(oscb); oscm.sendOSCmsg(omess); }