-
+ Integer { asPaddedString { arg size = 2, padChar = "0", padSide = \left; var string, stringSize; string = this.asString; stringSize = string.size; if(padSide == \right, { (size - stringSize).do({ string = string ++ padChar; }); },{ (size ...
-
+ SimpleNumber{ // receiver is a time in seconds // returns string "hh:mm:ss:ttt" where t is milliseconds asTimeStringLJP{ var decimal, hours, minutes, seconds, mseconds, string; decimal = this.asInteger; hours = (decimal.div(3600)).asStrin ...
-
... nterested in learning. Only the first argument is compulsory. "action" can be a string, in which case it's the path for the SOM buffer to be written to (AIFF format); or it can be a function, in which case it is evaluated and passed the SOM ...
-
... ", "f#", "g ", "g#", "a ", "a#", "b "]; ^(notes[midi%12] ++ midi.div(12)) } } +String { notemidi { var twelves, ones, octaveIndex, midis; midis = Dictionary[($c->0),($d->2),($e->4),($f->5),($g->7),($a->9),($b->11)]; ones = midis.at(this[0] ...
-
... / INDEXES StaticText(q.win, Rect(10, 10, q.numOscs * (colWidth + 5) + 150, 20)).string_("-- modulation "); q.win.view.decorator.nextLine; q.higherAmpSliders = q.numOscs.collect{|i| var slider; //(i+1).do{|j| q.numOscs.do{|j| var ez; ez = EZ ...
-
... icText.new(w, Rect ( (arr[index] +1 * 300 ), (arr[index+1] +1 * 300 ), 20, 20)).string_( "x" ).background_(~cols[arr[index+2].linlin(-1, 1, 0, ~cols.size-1)]) // SCStaticText }; w.front; }.defer}) ) // Or if you have OctaveSC you can plot a ...
-
... mat(path)).throw }; sf.close; // Check initialisation file, if wanted if(init.isString){ sf = SoundFile(init); if(sf.openRead){ // Check that the init file has the expected numdims and netsize and numFeatures if(sf.numChannels != numFeature ...