The Sound-of-Mercadolibre engine is a robot, that 'writes' a small song, based on values it retrieves in a 'preprocessed' form from a php-script, that analyses the html source-code of Mercadolibre.com.mx user-accounts.
The main issue in this context was how to generate a musical structure out of arbitrary data: numbers, ascii-text - arrays of numbers or ascii-text. In any case it was necessary to make a few decissions – to set up rules, channeling the chaos in to some kind of structure (order).
I needed some scales (harmonics). Based on a piece of code - by James McCartney(1) - that generates a diamond tonality, i generate a matrix of pitches that stand in a fractional relation to each other. This matrix is based again on the row of numbers from 8 – 15. To make the songs a bit more specific out of this possible values, i chose not to generate the hole spectrum.
Not all values from 8 – 15 are taken, resulting in a reduced spectrum. To achieve this i first create an arbitrary high number (> 100000), which then gets divided by 8 – 15. Only whole-numbered results are being treated in further processing (at least 4 values should result out of the calculation – if not a sufficiant number of values are being perceived, the function is called recursively on the original number+1 – also providing a result for primes).
Yet this doesn't produce a harmonic structure in a timeline. Not every tone in the scale(s) is necessarily hamonic to any other. A (human) selection had to be met. The matrixes at least provide three octaves. Thus selecting a few harmonics out of one octave makes a scale that can be played in three octaves. For the moment i have selected 11 different scales.
One important criteria for a 'song' is the scale it is being played in. Another one is a scheme, like verse – chorus – verse – chorus etc. though it may be a good idea not to follow that concept too strictly. In this case i chose a way that plays each song in possibly all scales, though determining a dominant scale that evokes the impression of different harmonics for each song.
To achieve this I was looking for some mathematical functon that results in a row of integer values, containing them in a 'weighted' distribution: value number 0 is the most frequent one, places at distributed positions in the chain (array) of integer numbers from 0 to 11. This is being achieved by calculating the greatest common divisor of the (integerized) duration of each sampled comment (the bigger each value is the more probable it becomes that the calculated value will not be 1 …). The values determine the notes being played in the piece from the first to the last one. For each new generation that timeline-array gets 'rolled', meaning values are getting swapped, so the song doesn't necesarily have to be generated in the scale indexed at 0.
Though producing this version 0.1 has needed a fair amount of research, I think just the surface of a range of possibilities has been touched. Yet what has been done so far allowes to go further and build more complex arrangements, though in its final consequence I (still) can not think of music being made without a final human decision, that has to be reflected in the code.
I hope my work will entertain at least a few of you. If you have questions about anything or are interested in getting the code, you may contact me at or visit
1. SuperCollider was originally created by James McCartney as a scripting addon for MAX/MSP.
project-website at (documentation, downloads, howtos etc.)