Framework for event driven sounds added.

Added framework for event driven sounds. It is not certain this will
stand as is. However I hope later implementations will make this
work as intended.