Modularizing sound function