transform signal to 0-1