getRMS function

RMS amplitude