Successfully reported this slideshow.

More Related Content

More from Atsushi Tadokoro

Related Audiobooks

Free with a 14 day trial from Scribd

See all

Sbaw090908

  1. 1. // OSC ( thisProcess.recvOSCfunc = { |time, addr, msg| if(msg[0] != 'status.reply') { msg.postln; } }); // OSC thisProcess.recvOSCfunc = nil;
  2. 2. [ /mrmr/accelerometerX/1/yoppaorg, 610 ] [ /mrmr/accelerometerY/1/yoppaorg, 409 ] [ /mrmr/accelerometerZ/1/yoppaorg, 24 ] [ /mrmr/accelerometer/direction/2/yoppaorg, 2 ] [ /mrmr/accelerometer/force/2/yoppaorg, 220 ] [ /mrmr/accelerometer/angle/3/yoppaorg, 164 ] [ /mrmr/accelerometer/force/3/yoppaorg, 220 ] [ /mrmr/accelerometerX/5/yoppaorg, 610 ] [ /mrmr/accelerometerY/5/yoppaorg, 409 ] [ /mrmr/accelerometerZ/5/yoppaorg, 24 ] [ /mrmr/accelerometer/direction/6/yoppaorg, 2 ] [ /mrmr/accelerometer/force/6/yoppaorg, 220 ] [ /mrmr/accelerometer/angle/7/yoppaorg, 164 ] [ /mrmr/accelerometer/force/7/yoppaorg, 220 ] ....
  3. 3. SynthDef("fm2", { arg bus = 0, freq = 440, carPartial = 0.5, modPartial = 0.5, detune=2.0, index = 3, mul = 0.2, ts = 1; var mod, car; mod = SinOsc.ar( freq * modPartial, 0, freq * index * LFNoise1.kr(5.reciprocal).abs); car = SinOsc.ar( [(freq * carPartial) + mod,(freq+detune * carPartial) + mod], 0, mul); car = FreeVerb.ar( car* EnvGen.kr(Env.new([0,1], [5])), 0.5, 0.8, 0.2, 1.0); Out.ar(bus, car); }).load(s); // "fm2" s.sendMsg("/s_new", "fm2", x=s.nextNodeID, 1,1);
  4. 4. // X OSCresponderNode(nil, "/mrmr/accelerometerX/1/yoppaorg",{ arg time, resp, msg; var car; car = abs(msg[1])/1000.0; s.sendMsg("/n_set", x, "carPartial", car); // fm2 OSC }).add; // Y OSCresponderNode(nil, "/mrmr/accelerometerY/1/yoppaorg",{ arg time, resp, msg; var mod; mod = abs(msg[1])/1000.0; s.sendMsg("/n_set", , "modPartial", mod); // fm2 OSC }).add; // Z OSCresponderNode(nil, "/mrmr/accelerometerZ/1/yoppaorg",{ arg time, resp, msg; var index; index = abs(msg[1])/10.0; s.sendMsg("/n_set", , "index", index); // fm2 OSC }).add;
  5. 5. [ /mrmr/tactilezoneX/0/yoppaorg, 528 ] [ /mrmr/tactilezoneY/0/yoppaorg, 474 ] [ /mrmr/tactilezoneX/0/yoppaorg, 528 ] [ /mrmr/tactilezoneY/0/yoppaorg, 479 ] [ /mrmr/tactilezoneX/0/yoppaorg, 528 ] [ /mrmr/tactilezoneY/0/yoppaorg, 483 ] [ /mrmr/tactilezoneX/0/yoppaorg, 528 ] [ /mrmr/tactilezoneY/0/yoppaorg, 487 ] [ /mrmr/tactilezoneX/0/yoppaorg, 528 ] [ /mrmr/tactilezoneY/0/yoppaorg, 491 ] [ /mrmr/tactilezoneX/0/yoppaorg, 528 ] [ /mrmr/tactilezoneY/0/yoppaorg, 495 ] [ /mrmr/tactilezoneX/0/yoppaorg, 528 ] [ /mrmr/tactilezoneY/0/yoppaorg, 497 ] [ /mrmr/tactilezoneX/0/yoppaorg, 525 ] [ /mrmr/tactilezoneY/0/yoppaorg, 500 ] [ /mrmr/tactilezoneX/0/yoppaorg, 525 ] [ /mrmr/tactilezoneY/0/yoppaorg, 500 ] ...
  6. 6. // X OSCresponderNode(nil, "/mrmr/tactilezoneX/0/yoppaorg",{ arg time, resp, msg; var index; index = abs(msg[1])/20.0; s.sendMsg("/n_set", x, "index", index); }).add; // Y OSCresponderNode(nil, "/mrmr/tactilezoneY/0/yoppaorg",{ arg time, resp, msg; var mod; mod = abs(msg[1])/1000.0; s.sendMsg("/n_set", , "modPartial", mod); }).add;
  7. 7. togglebutton nil 0.200000 8 11 1 1 1 1 _ 2 togglebutton nil 0.200000 8 11 2 1 1 1 _ 2 togglebutton nil 0.200000 8 11 3 1 1 1 _ 2 togglebutton nil 0.200000 8 11 4 1 1 1 _ 2 togglebutton nil 0.200000 8 11 5 1 1 1 _ 2 togglebutton nil 0.200000 8 11 6 1 1 1 _ 2 togglebutton nil 0.200000 8 11 7 1 1 1 _ 2 togglebutton nil 0.200000 8 11 8 1 1 1 _ 2 togglebutton nil 0.200000 8 11 1 2 1 1 _ 2 togglebutton nil 0.200000 8 11 2 2 1 1 _ 2 togglebutton nil 0.200000 8 11 3 2 1 1 _ 2 togglebutton nil 0.200000 8 11 4 2 1 1 _ 2 ...( )... slider nil 0.200000 8 11 1 9 8 1 note 1 pushbutton auth 0.200000 8 11 1 10 1 1 _ 2 pushbutton auth 0.200000 8 11 2 10 1 1 _ 2 pushbutton auth 0.200000 8 11 3 10 1 1 _ 2 pushbutton auth 0.200000 8 11 4 10 1 1 _ 2 pushbutton auth 0.200000 8 11 5 10 1 1 _ 2 pushbutton auth 0.200000 8 11 6 10 1 1 _ 2
  8. 8. // ”perc” SynthDef("perc", { arg amp=0.2, freq=440, detune=2.0, decay=2.0; var env, out; out = SinOsc.ar([freq, freq+detune]); env = EnvGen.kr(Env.perc(0.01,decay,amp,-4), doneAction: 2); out = out * env; Out.ar(0, out); }).send(s); //test s.sendMsg("/s_new", "perc", s.nextNodeID, 1,1);
  9. 9. // ( ~bpm = 60; ~clock = TempoClock(~bpm/60); ~base = 60; ~scale = [0,2,4,5,7,9,11,12]; ~seqArray = [ [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0] ]; ~i = 0; ~amp = 0.05; ~decay = 3.0; ~freqArray = [0,0,0,0,0,0,0,0]; ~task = Task({ inf.do{ var wait; wait = 1/4;
  10. 10. 8.do({ arg j; ~freqArray.put(j, ~seqArray.wrapAt(j).wrapAt(~i)*(~scale.wrapAt(j) +~base).midicps) }); s.makeBundle(s.latency, { 8.do({ arg j; Synth("perc", ["amp", ~amp, "freq", ~freqArray.wrapAt(j), "decay",~decay]) }); }); ~i = ~i + 1; wait.wait; }; }, ~clock).start; )
  11. 11. //Mrmr ( var mess=Array.newClear(64); var sc = Array.newClear(8); var hostname = "yoppaorg"; j=0; 64.do({|i| OSCresponderNode(nil, '/mrmr/pushbutton/' ++ i ++ '/' ++ hostname, { arg time, resp, msg; var col, row; msg.postln; row = floor(i/8); col = i % 8; ~seqArray.wrapAt(row).put(col, msg[1]/1000); ~seqArray.postln; }).add; });
  12. 12. OSCresponderNode(nil, '/mrmr/slider/horizontal/64/' ++ hostname, { arg time, resp, msg; ~base = floor(msg[1]/40)+70; ~base.postln; }).add; 8.do({|i| OSCresponderNode(nil, '/mrmr/pushbutton/'++ (i+65) ++ '/' ++ hostname, { arg time, resp, msg; if(i==0) {~scale = [0,2,4,5,7,9,11,12]}; if(i==1) {~scale = [0,4,5,7,11,12,16,23]}; if(i==2) {~scale = [0,3,7,12,15,19,22,24]}; if(i==3) {~scale = [0,3,7,11,12,15,19,23]}; if(i==4) {~scale = [0,7,11,12,19,23,24,31]}; if(i==5) {~scale = [0,7,12,19,24,31,36,43]}; ~scale.postln; }).add; }); )

Editor's Notes

×