Setting up structure for melody-composing algorithm