int counter = @Frame + fit(rand(i@led_no), 0, 1, 0, 48); @counter = counter; float brightness = chf("brighness"); int frame_length = chi("frame_length"); int cycle_length = frame_length/2; int flash_increase = counter % frame_length; int flash_decrease = (flash_increase-cycle_length) % cycle_length;