View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

OSC Schwebe

//________server:

  (
  var plug, schweb, nodes;

  nodes = OSCNode.tree([
                  [\frequenzia, { arg node, f; plug.source = f.value  }],
                  [\schweb, { arg node, f; schweb.source = f.value  }]

  ]);
  OSCPort.closeAll;
  OSCInPort(32000, nodes);

  scope({
          
          plug = Plug.kr(200, 0.1);
          schweb = Plug.kr(0, 0.1);
          SinOsc.ar([plug, plug+schweb], 0, 0.1)
          + Pulse.ar(plug, 0.5, LFPulse.kr([1, 1+(schweb/100)][1,2], 0.1, 0.1))

  })
  )

  //____automated client (epic):


  var hostname;
  hostname = "192.168.3.188"; // set this to the address of the receiving machine
  z = OSCOutPort(32000, hostname);
  )

  (
  z.send("/schweb", 10)

  z.send("/frequenzia", 400)

  )
  (
  Synth.play({
  Task({
  15.do({arg i;
    var val;
    wait(0.3);
    val = ((100 + 2400.rand /(i+1)));
    z.send("/frequenzia", val);
    z.send("/schweb", val + 30.rand);

  })
  });
  Plug.ar(0)
  })
  )
  
  
//_________GUIified clients (max)

//control frequency
  (
	var w;
	w = GUIWindow.new("panel", Rect.newBy(421, 178, 188, 100));
	s = SliderView.new( w, Rect.newBy(30, 18, 128, 20), "SliderView", 200, 100, 1000, 0, 'linear');
	ButtonView.new( w, Rect.newBy(30, 43, 128, 20), "ButtonView", 0, 0, 1, 0, 'linear').action_({
	
		a.send ("/frequenzia", s.value);
	});

)

//control frequency and interference
(
	var w, s, s2;
	w = GUIWindow.new("panel", Rect.newBy(421, 178, 188, 100));
	s = SliderView.new( w, Rect.newBy(30, 18, 128, 20), "SliderView", 200, 100, 1000, 0, 'linear');
	s.action = {
	
		a.send ("/frequenzia", s.value);
	
	

	};
s2 = SliderView.new( w, Rect.newBy(29, 50, 128, 20), "SliderView", 2, 0, 10, 'linear');
s2.action = {
	
		a.send ("/schweb", s2.value);
	
	

	};
)
/*
authors so far:
SC-Group HfbK
*/
first osc experiment ...


Link to this Page