Refactoring SoundGenerator.