Added the v variable (averaged amplitude of the sound output)