«seeking an Array!» by josecaos

on 17 Mar'12 08:43 in arrayseekpost window

this code throws a scrambled array of arrays seeking among them for the original array, It only sounds when it founds it. (may take a while) the idea started trying a SCtweet, but became with this funny code!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(// * //watch the postWindow
a=["m","x","f","k","d","p"];
x=Array;
y=x.newClear(6);
~mxfkdp=Task({
	inf.do({y.put(x.series(6,0,1).choose,a.scramble).postln;
	0.03.wait;})}).play;
m=fork({inf.do({
	"array num:".postcln;
	if(y[x.series(6,0,1).choose.postcln]==a,
                  {"lo encontraste!/found it!".postcln;
			1.do({GVerb.ar(
			EnvGen.ar(Env.perc(0.01,8),1,doneAction:2)*
			Blip.ar(XLine.kr(440,1600,8)),50,10,0.02)}.play);
		~mxfkdp.stop;
		m.stop;},	
		{"buscando.../seeking...".postcln;});
	0.03.wait})});
);
//.SCtweetLong
raw 557 chars (focus & ctrl+a+c to copy)
reception
comments
beryann.parker user 26 Mar'12 14:49

Brilliant and funny!! i changed the letters with words (enlarging the postwindow!!)