A Theory Of Musical Genres. Two Applications