-
... dvanced sound+gui example - performing notch, bandpass and fft with scsynth ( ~openbci= CytonSerial("/dev/tty.usbserial-DM00DRM0", initAction: {|b| b.start}); //edit here to match your board //~openbci= CytonWifi(NetAddr("OpenBCI_WifiShield ...
-
... ynth(\beating), \prefFreq: mass.linexp(2, 20, 2000, 200), //a favourite pitch depends on mass \target: nil //location for that pitch if found ); a.sense= { var listen= human.state.freq; if(listen>0 and:{(a.state.prefFreq-listen).abs<100}, { ...
-
... _(3) .drawFunc_({ |vw| var wd = 8, smallRect; if( chain.displayColor.notNil ) { Pen.roundedRect(vw.drawBounds, wd); chain.displayColor.penFill(vw.drawBounds, 1, nil, 10); smallRect = Rect( vw.bounds.width - wd, 0, wd, wd ); Pen.color = Colo ...
-
DrawIcon part of wslib a Pen -based library system for drawing iconographic pictures. Note : DrawIcon is partially compatible with GUI-style coding. Colors and text are not supported DrawIcon contains a global library with pen functions. It ...
-
... Wander2D; }); o.addForce(world.gravity); o.update; world.contain(o); //--render Pen.fillColor= Color.grey(1-(i/n), 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... }); if ( GUI.id == \cocoa, { win.drawHook = { 17.do({arg j; 15.do({ arg i; GUI.pen.use{ GUI.pen.color = boxColList[j][i]; GUI.pen.fillRect(Rect(3+(i*screenX/15), 2+(j*tabletScreenY/17), (screenX/15)-6, (tabletScreenY/17)-6)); GUI.pen.color ...
-
... t*0.5)-(arrowSize*0.5),arrowSize,arrowSize).right_(button.bounds.right-17); var penwidth = 2.max(drawRect.height*0.08); Pen.color= arrowColor; Pen.width=1; Pen.moveTo(drawRect.left@drawRect.top); Pen.lineTo(drawRect.center.x@drawRect.bottom ...
-
... accel, vel and loc world.contain(o); //keep object within the world //--render Pen.fillColor= Color.grey(1-(o.mass/12), 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... .mouse; }); //o.addForce(world.gravity); o.update; world.contain(o); //--render Pen.fillColor= Color.grey(1-(i/n), 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... thin a world with gravity force and also collision detection //color and size depends on object's mass //sound - collision velocity mapped to amplitude, mass to dur and freq ( s.waitForBoot{ var width= 300, height= 300, w, wgrav, world, n= ...