Each person usually has a different "algorithm" and explain how they came up with the riff or song. It can sound quite evil.
The word I've heard for this is Dodecaphony.
Here is an example of one: https://www.youtube.com/watch?v=wCL3E0Mh4js
Unfortunately it also made listening to music a purely intellectual exercise as well, and a painful one for folks who expect tonality to be a part of any music they want to sit through.
Thankfully folks like Steve Reich, Terry Riley, and Philip Glass came along to embrace the rigid structure and intellectual design approach, but to return tonality as a core principle with Minimalism. Art Music was listenable again.