FloatControl volume = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN); int value = 0.5f; volume.setValue((float) (Math.log(value) / Math.log(10.0) * 20.0));