I would like to add one technique based on a positive definite kernel over the natural numbers: $$k(a,b) = \frac{\gcd(a,b)^2}{ab}$$ and $$k(a,b) = \frac{\min(a,b)}{\max(a,b)}$$ Details of this method are described [here][1]. Music generated by this method might be found here as an example: https://www.youtube.com/watch?v=EbrEBeDqq24 or here https://musescore1983.bandcamp.com/track/for-us Disclaimer: I made all this... :-) **Edit**: I have done [a website to compose "parametric" music][2], which is based on positive definite kernels over the natural numbers. Here is an example, which I call "Thinking and Inventing" Parameters: octaves = 3;4;3;5;2;3 rests = 0,1;0,1;0,1;0,1;0,1;0,1 durations: 0.125,0.25;0.25,0.125;0.25,0.5;0.5,0.25;0.125,0.5;0.5,0.125 neighbors = 5 cycles = 60 reverse = [x] weights = 2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6 Audio: https://drive.google.com/file/d/1dVRajNbXIxaCB6ehXbaP4uCQ4HJjUP6w/view?usp=sharing Score: https://drive.google.com/file/d/1S2PlKXOac0eXITD5P1H73PMp28ptx8UG/view?usp=sharing If you want to try it out yourself: The easiest way to start is to change the number of neighbors to say 4,6,8,10,15 etc. and see the result. [1]: http://orges-leka.de/knn-music/Measuring_note_similarity_with_positive_definite_kernels.pdf [2]: http://orges-leka.de/knn-music/