If I use the random function everything works fine.
if I try to map a generate a random distribution it only records the last number of the array. but the println is correct.
vMin = min(valueYArray);
vMax = max(valueYArray);
for(int t =0; t < valueYArray.length; t++)
{
valueY= valueYArray[t];
float ran = random(255);
s1.setValue(ran);
randomOutputInt255=map(valueY,vMin,vMax,0,255);
println( "randomOutputInt255= " + randomOutputInt255);
this works:
fill(ran,50,200);
rect(10,600, 1000, 200);
this doesn't work
randomOutputInt255=map(valueY,vMin,vMax,0,255);
fill(rrandomOutputInt255,50,200);
rect(10,600, 1000, 200);
here is the console print out
randomOutputInt255= 255.0
randomOutputInt255= 255.0
randomOutputInt255= 255.0
randomOutputInt255= 255.0
randomOutputInt255= 255.0
randomOutputInt255= 5.5737934
randomOutputInt255= 0.0
randomOutputInt255= 125.409836
randomOutputInt255= 205.53278
randomOutputInt255= 244.54918
randomOutputInt255= 252.2131