-
... I example of nesting Views and multiplying widgets, including mouse actions and Pen drawing for each of the views. Thanks to hjh for spotting an early bug on sc-users. Add your own sound... ( var numX=12, numY=8, width, height, margin; w ...
-
... ight).asInteger)}; this.prDraw(Point(width.rand, height.rand)); win.drawFunc= { Pen.drawImage(Rect(0, 0, win.bounds.width, win.bounds.height), img); }; win.onClose= {img.free}; win.front; ^win; } draw {|width= 400, height= 400| matrices2= m ...
-
... nge_(0.9) .state_((\synth: Synth(\beating))) }.dup(n); s.sync; //--loop w.draw{ Pen.width= 1; 4.do{|i| Pen.fillColor= Color.grey(0.4, i+1/(4)); Pen.fillOval(Rect.aboutRedVector2D(w.mouse, (4-i)/3*50)); }; world.objects.do{|o, i| //iterate a ...
-
... nge_(0.9) .state_((\synth: Synth(\beating))) }.dup(n); s.sync; //--loop w.draw{ Pen.width= 1; 4.do{|i| Pen.fillColor= Color.grey(0.4, i+1/(4)); Pen.fillOval(Rect.aboutRedVector2D(w.mouse, (4-i)/3*50)); }; world.objects.do{|o, i| //iterate a ...
-
... ght, getScrollTimeStep; var drawMarkerLine, updateWindowTitle; var togglePlay, openDocument, switchFocus, zoomIn, zoomOut, zoomFull, scrollLeft, scrollRight, centerCursor; var window, xmargin, ymargin, viewWidth, viewHeight; var selectedInd ...
-
... var center, wedge; center = size@size * 0.5; wedge = { |l1, l2, color| Pen.color = color; Pen.addAnnularWedge(size@size * 0.5, size*0.4, size*0.45, (pi/2) + (1.5pi*l1), 1.5pi*(l2 - l1)); Pen.fill; }; // These levels and ...
-
... g; view.refresh},{} ); }; //mouse drag redefines userview drawFunc //Pen draws line from old point to current point //then sets old point equal to current point view.mouseMoveAction = { |v, x, y, mod| view.drawFunc = { P ...
-
... ate; } removeUnusedTracks { minTracks = 12; this.calcNumTracks; this.update; } openSelectedSubScoreInNewWindow{ this.selectedEvents !? { |x| var y = x.at(0); if(y.isFolder) { UScoreEditorGUI(UScoreEditor(y)) } } } // call to initialize and ...
-
... |o| lookup.at(o).sum{|oo| oo.state} }; world.objects.do{|o, i| if(o.state==1, { Pen.addRect(Rect(o.loc[0]*wx, o.loc[1]*hy, wx-1, hy-1)); }); if(counts[i]==3, { o.state= 1; }, { if(counts[i]!=2, { o.state= 0; }); }); }; Pen.smoothing_(false) ...
-
... mLines) + (1 - pos) )%1.0) * ( if( active ) { 1 } { alphaWhenStopped } ) ).set; Pen.width_( lineWidth * radius * 2 ); Pen.moveTo( ((val.cos@val.sin) * (radius * centerSize )) + center ); Pen.lineTo( ((val.cos@val.sin) * radius) + center ); ...