Commented sound generator code