Version 0 1, "The Sound of Mercadolibre"

The Ebay-Generator is a robot, that 'writes' a small song, based on values it retrieves in a 'preprocessed' form a php-script, that analyses the html source-code of mercadolibre useraccounts.
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 decisions – to set up rules, channeling the chaos in to some kind of structure.

the harmonics

I needed some scales (harmonics). Based on a piece of code by James McCartney1, 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, a 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 considered in further processing (at least 4 values should result out of the calculation – if a sufficiant number of values is not being perceived, the function is called recursively on the original number+1 – also providing a result for primes).
Yet this doesn't make 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.

the timeline

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 frequently 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 necesarilly have to be generated in the scale indexed at 0.

future perspectives

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 keep at least a few of you entertained. If you have questions about anything you may contact me at stefan_arroba_basislager_punto_org

Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.