move sound related stuff from main.rb to sound.rb