Adds python logic to control sounds