Developing tonal perception through unsupervised learning