‹ AlarmEven More Low Life ›

Growing More Sounds

2010-12-03 03:25 supercollider

clean-up #18:

I found more code I never published. Again it is about generating SynthDefs using genetic algorithms. See /f0blog/growing-sounds/ and /f0blog/work-with-mark-genetics/ for previous stories.

To run the attached files you will need to install my RedGA library from the /code/sc/#classes page.

First, is a little exploration tool called growing_sounds10. It makes a single SynthDef from the settings of a multi slider. Draw something and press space to generate and play the SynthDef. If you like what you hear you can copy the code from the post window and refine it manually.

Also, try the preset functions. They will either generate, modify or set a fixed setting/drawing in the multi-slider.

growing_sounds10 screenshot

the SynthDef generated in the screenshot above was this one...

{LFPar.ar(LFTri.kr(LFDNoise3.kr(0.836588, 0.257632, 0.772292).exprange(3.7376802825928, 15.120258769989)).exprange(11935.654205322, 5408.6393985748)).range(0.31427707672119, -0.23100700378418)}.play

Another file is called growing_soundsBreed and it gives you control over 6 parent genomes that can be transformed into SynthDefs and listened to by clicking the play buttons. Mark good sounding parents and breed a new generation. The genomes should now have been mixed and mutated and there are 6 new children as a result of the operation. It is likely that they sound similar to their parents and the longer you repeat the process, the more similar the genomes and in turn, the SynthDefs (phenomes) will be.

growing_soundsBreed screenshot

Yet another piece of code is growing_soundsBreedFitness and it works the same way as the previous except that you here give a rating i.e. fitness to each parent (blue sliders = fitness amount). So instead of marking which parents you give ratings. The system will use these ratings as a guideline of importance when choosing which parents' genes to use for the new generation.


And last is a file called growing_soundsBreedPattern in which you can not only breed SynthDefs but also the amplitude pattern they play in a simple sequencer.


As always, all code published under GNU GPL v2 license.


‹ AlarmEven More Low Life ›