I’ve updated my NatureToolkit Quark with two new classes. GAWorkbench and GAPmatch. As usual, full documentation is provided with examples so be sure to check them out.

GAWorkbench:

This is a general purpose and modular genetic algorithm class for SuperCollider. Genetic algorithm is a search technique used for finding approximate solutions to search and optimization problems. They use techniques derived from evolutionary biology like inheritance, mutation, (artificial) selection and crossover.

GAWorkbench is a general purpose class that provides an easy interface to interact with your data to be used with GA’s. It can be used for solving general most probably music related computational search problems and can also be used for exploring sound spaces, finding suitable parameters for synthesis networks etc.

GAPmatch:

GAPmatch is a fast parameter estimation system that intends to work at near-interactive speeds to aid sound design and maybe live performances. To achieve this, it uses a fast search technique called “Genetic Algorithm” which mimics the evolutionary continuum that we observe in nature. It wraps a GAWorkbench instance (described above) for this specific purpose.

In terms of its functionality in the SC environment, parameter estimation means this: You have a SynthDef that is  known to be capable of synthesizing a particular type of sound, but finding the right parameters is a time consuming and in some situations a tedious task. Or you have built a raw SynthDef for a synthesis algorithm which exposes a few dozens of parameters and it’s impossible to conduct them at that state. Or you are trying to tune a physical modelling instrument… Situations can vary. This parameter estimation system basically takes an input sound, an input SynthDef and its parameter ranges, and it tries to find the parameters for this particular synthesizer so that the output of the synth is faithful to the attributes of your input sound. From that stage on, you can alter the parameters by yourself to change the synthesized sound in various ways.

Execution of genetic algorithms demands heavy computing resources, and this class can parallelize the task (the fitness calculation stage) across multiple scservers on your local machine (to utilize multiple CPU cores on your machine) and networked machines.

An article I’ve submitted for peer review that describes the inner workings of the system in depth will be provided when I have the permission to do so. Until then, the documentation and sources should provide necessary info.

(You need to have BatUGens and BatPVUgens installed from sc3-plugins for this to work)

I’ve also gone ahead and recorded a little screencast to introduce GAWorkbench and show GAPmatch it in action:

Let me know what you think of it.

- Laconicism – is a collection of procedural and interactive sound compositions.

The pieces are not finalized onto a static medium.

Instead, the collection is distributed as a computer software so that the works can be experienced in their intended multidimensional forms.

Click here for more info about my motivations, and the underlying mechanism.

Downloads:

Mac OS X: Download from here (4.2MB). Download and run, tested on Leopard and Snow Leopard. Should also work on Tiger (and on older PPC machines, though not tested).

Other platforms: Download SuperCollider source files from here. Unfortunately, Laconicism isn’t available as a standalone application for other platforms. See the ReadMe file inside the source archive for instructions on how to install and run. Some of the pieces do not work as intended on Windows yet, hopefully these will be fixed as SuperCollider matures further on the Windows platform.

It looks and feels like:

This collection of sound entities are presented to you with a simple idea in mind: “Organized Sound”, once realized by its creator for distribution, does not necessarily have to be locked to definite micro or macro event sequences in time domain. This apparent rigidity of distributed sound is in fact, a “transmission loss” between the composer and listener; and is primarily caused by the limitations of our soon to be obsolete old and static sound distribution mediums.

The works presented in this software are compositions and/or designs of “sound processes”, which provide a recipe for computers to generate sounds utilizing various sound synthesis techniques on the fly. These are not designs of “exactness and perfection”, instead, I merely define limits for a sound-event space.

The listener is not only free to experience the process compositions presented by the composer, but can also participate. Each piece has different number of controls (embedded into the synthesis graphs in a “circuit-bending” fashion), whose functions are not really obvious until you start to play with them. The listener is free to observe other dimensions of the event space by altering the values of these controls, relying on listening and intuition (a feedback loop). The aforementioned transformation loss disappears, and another form of communication emerges between the composer, listener and the piece.

(c) Batuhan Bozkurt – 2009
This work (music) is distributed under CC BY-NC-SA 3 license:
http://creativecommons.org/licenses/by-nc-sa/3.0/

First, the news: I’ve released a SuperCollider Quark (called MoltenMaster) that attempts to simplify the playback organization (synchronization of resource allocation, playback initialization and resource deallocation across multiple pieces compiled in a bundle) of generative (and/or interactive) music/media pieces.

Generativity and interactivity in art is a hot topic and it is only going to get hotter. When such a work is experienced by the audience in a live setting (a concert or an installation), the artist – audience communication is somewhat lossless; the artist composes a process, and the result is not necessarily a static entity on spatial or temporal domains. The output is the result of the composed process and if there is any external and/or stochastic input present in the system, the output is different in every iteration. It is the limits of these differences that creates the composition. It’s not about the single output anymore (it actually never was, we had no other choice).

This situation challenges the standard notions of the society about what an artwork really is. To give a simple example, some people still discuss if computer games can be considered as artworks or not (let me point out here that I’m not a gamer at all). An artist draws a gorgeous chapel on canvas and it is considered as an artwork by default whereas another artist(s) creates a just as gorgeous environment using a computer where you can move around and interact with the surroundings (which arguably creates stronger emotional attachment, and more effective communication) but the value other than entertainment quality instantly becomes questionable.

In my opinion, discussions over “artistic quality” of some creation is a vain endeavor to begin with, but it seems this kind of controversy is needed to force people to think about these issues (and creating these types of controversies are in part, responsibility of artists), and my hope is that this perceptional distortion caused by the dominance of our old and static mediums will get reformed over time. This won’t happen by itself for sure.

Anyway, back to the core of our topic… The dominating mediums for media distribution for the past century was all static mediums… Wax cylinders, vinyl recordings, cassettes, audio CD’s, video DVD’s and so on… All the legible interaction these mediums provided for us was skipping back and forth, as the content inside them was static in nature. That means they’ve gone “Gold Master” at some stage in production and all you can do is to experience that static entity in different environments, and your interaction opportunities are rather limited. On the other hand, tools for procedural content generation, creation and effective/intuitive usage of generative and emergent processes in art is becoming a standard part of artists workflow. But when things come to distribution stage, we simply render one iteration of the work on a static file and burn it to a CD or DVD or put it somewhere up for download, whereas the original ideas of the artist can provide different variations of the process in every iteration. This is a very huge transmission loss between the artist and audience. And also there is this interactivity issue; for example in music, the listener can already set the volume, or EQ levels to his or her own hearts content, so why can’t we provide more controls that defines the shape of the generated structures in more fundamental ways? I’m talking about the same controls the artist tweaks to tune his or her own creation. The idea of this type of interaction might not be the preferred choice for everyone for sure, but we can still have it, it makes no harm.

One of the main things that is preventing us from doing so is that our current media players still follow the “static medium” paradigm despite virtually all of them being computers capable of providing interaction on aforementioned levels. MoltenMaster (as opposed to Golden Master) tries to provide a simple back-end to the SuperCollider environment that tries to simplify and encourage creation of computer programs that exhibit the behavior that I’ve been talking about.

Every MoltenMaster instance is a collection of pieces, each piece being an instance of MoltenPiece. Each MoltenPiece has slots for an allocator, player and deallocator that are to be filled by the composer. The MoltenMaster system tries to provide the synchronization of these processes to provide a familiar media player interface. Then there is the MoltenPlayer, a simple GUI application that plays back MoltenMasters which can be used as a base for creating more advanced and interactive playback interfaces.

This system, obviously will only work in our regular computers for now. There is some more ground to be covered before the usage of these systems become painless for composing and distributing works; and some more time is needed for them to find their ways into our pocket computers / media players in somewhat natural ways. We shouldn’t forget though that we are living in exponential times, this is my own stab to the issue.

I’ll be releasing a work in a day or two that uses this system to procedurally create sound content realtime and provide controls for some of my sound creations/pieces.

Release frenzy today… But I have my reasons. NatureToolkit is a Quark that will include classes and frameworks that will hopefully make life easier for those, whose artistic media work tends to get inspiration from “natural processes”.

The only included class right now is LSys (but there is more to come! See bottom of this post…) which is a complete “Lindenmayer Systems” implementation for SuperCollider. There are various other “string rewriting” systems available for SC right now, but details of real L-Systems are more complicated. The rewriting system needs to be aware of branching points when context sensitivity comes into play for example, and this class supports them. In short, this class does parallel rewriting, supports context free, context sensitive, stochastic and parametric rulesets. When working with context sensitive rules in a bracketed L-system, this class takes axial node points and segment neighborhood into account (which is not represented in the sequential string representation naturally). Full documentation is included and there is an accompanying LSPlant class that interprets the produced strings using the standard Turtle Graphics method so it helps you visualize the produced data.

I’m more interested in the musical applications of L-Systems. The “self similarity” on various domains of artistic works is often overlooked, but it can be observed in many time scales with detailed inspection (or sometimes it is very obvious and taken for granted; the fugue form / technique is a good starting point).

For an intro on L-Systems, consult here first, then I suggest you grab a copy of Algorithmic Beauty of Plants (Przemyslaw Prusinkiewicz – Aristid Lindenmayer) from here.

For musical applications of L-systems, I suggest you go read the master’s thesis of Stelios Manousakis: Musical L-Systems that discusses applications of L-Systems down from sample scale to macro scales. There also is a body of past research on this area, you may want to search some databases.

Here is some not-so-interesting visualizations (the code for these is also included in the documentation) that I’ve created while I was developing the class to see if things were really working as they should. Click on the images to enlarge.

Context free examples:

Islands and Lakes from Algorithmic Beauty of Plants Fig 1.8:

Quadratic Snowflake from A.B.O.P. Fig 1.7b:

Branching Examples:

Tree from A.B.O.P. Fig 1.24c:

Tree from A.B.O.P. Fig 1.24f:

Stochastic Branches:

Stochastic rules lets you define a single string and stochastic rules which create different yet coherent products each time. The following 3 trees were all generated from the same axiom and rules (A.B.O.P. Fig. 1.27, click on images to enlarge):

Parametric Systems:

Parametric L-Systems allows you to define axioms with parametric arguments and the parallel rewriting system makes them interact. Really complex yet self-similar forms can be crafted with them! The following 5 images are taken from 1 to 5 iterations of the classic “Row of Trees” example. A simple axiom can yield to complex self similar structs:

Context Sensitive L-Systems with Brackets (Branches):

This is where the string rewriting mechanism should take axial nodes and branch neighborhood into account to work properly. Really sophisticated structures are possible by using signal propagation mechanisms of L-Systems.

Examples are Fig 1.31 (a, b, c, d) from A.B.O.P:

Other notes:

As mentioned earlier, the examples here are Turtle Graphics interpretations of generated strings, as L-Systems were first developed for algorithmically generating (and observing growth of) plant structures. Actually this is the direct visual representation of generated strings, but one can use it in many different contexts or visualizations. I’m especially interested on their applications for musical form and structure, the generated strings are really easy to interpret and use on different contexts. I hope others will also find them of use, you can get NatureToolkit from the SC Quarks repository, as usual.

More to Come:

NatureToolkit is far from complete with an L-System implementation of course. I’ve also developed a general purpose fully modular Genetic Algorithm framework for SC as well as an automatic parameter matching system (finding suitable parameters (inferred from an input sound) for a given synthesizer topology) utilizing the framework (the parameter matching system can use multiple processing cores of a computer and can also parallelize the tasks across multiple computers for analysis so it is also suitable for real-time use yay!), but the documentation isn’t complete yet and it is accompanied by a paper I’ve submitted to EvoMUSART 2010 conference (European Event on Evolutionary and Biologically Inspired Music, Sound, Art and Design) and I’m not allowed to publish it publicly yet. You can still have a test drive if you are interested, just get the sources from my github. I’ll be happy to give support for the adventurous spirits out there.

FreeSound Quark Update

In: News

22 Nov 2009

I’ve added a GUI front-end for my FreeSound Quark which makes things a lot easier in interactive coding / performing situations. So you may want to update… This front-end uses the FreeSound class to download files from the freesound.org network based on the criteria you provide and they are available to you on the fly while performing or composing… Just obtain / update the FreeSound Quark in your SC environment to get it.

fss

Music Releases…

In: Links| News| Personal

22 Nov 2009

I’m trying to release some of my old and new music I’ve been keeping for myself for no apparent reason. Still a work in progress… 2 new releases for now, check them out here: http://www.batuhanbozkurt.com/music

Not much info is available at this time, I’ll try to add some and even release my tools as I go…

Our sc140 album is featured in New Scientist and The Wire. Check out the articles:

http://thewire.co.uk/articles/3177/

http://www.newscientist.com/article/dn18173-best-of-twitter-tunes-album-released.html

And there is some new music, on the way… Stay (de)tuned.

I’ve added a new Quark to SuperCollider Quarks repository that allows you to access the multitouch data from supported MacBook (and MacBook Pro) touchpads. It needs the tongsengmod application I’ve forked from the tongseng project, but once tongsengmod is installed, integration is seamless. The details can be found in the help file. Here is a rudimentary example (the example code for this can also be found in the help file):

I’ve only tested this under Leopard 10.5.8 with a (late 2008) unibody MacBook Pro. Your mileage may vary under Snow Leopard and older MacBooks (I’m pretty sure that the latest MacBooks before the unibody models are also capable of using this), so please let me know if you encounter any problems, or get it to run on other systems.

Dan Stowell curated an excellent compilation of the SCtweet pieces as an album. SCtweets are (little) pieces composed in the SuperCollider environment with at most 140 characters in size (a limit employed by the Twitter service for posts). The album (which includes 22 tracks) and the source code is available to anyone for free, and can be obtained under the CC BY-NC-SA 3 license.

I’m happy to have 4 of my pieces included (one of them was refactored by Charles Celeste Hutchins, he reduced the number of characters from 140 to 104!) in the compilation.

You can listen to sc140 online, or download the album (in MP3 format) and it’s source code by clicking here.

To access more code from various contributors, click here.

Last week, one of my students brought me a composition he made, which was using combination tones in an interesting compositional context, and that gave me a nudge to do some experimenting on the issue, here I’ll share what I’ve found interesting.

This is a psychoacoustic phenomenon in which, when at least two tones with close fundamental frequencies are sounded together, another tone whose frequency is the sum or difference of the original two tones is heard. This “ghost” tone is purely made up by the human ear and brain. That is, if you inspect the spectrum of the two tones with a spectrogram, this ghost tone simply isn’t there. However, this tone is usually quite faint (unless the amplitude of the original tones are high) so one needs to concentrate to get it, but it’s not very hard either.

Here is an example, this is a 200 Hz sine tone:

{ SinOsc.ar(200).dup }.play

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

And here it is in the spectrogram:

200hz

And here is 1000Hz and 1200Hz sine tones mixed together. The difference of their frequencies (200Hz) is also audible, if you pay attention (works best with headphones, but also audible with speakers. If you can’t hear it, turn the volume up):

{ SinOsc.ar([1000, 1200]).mean.dup }.play

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

If you can hear it, great. Here is the spectral decomposition:

combined

Notice that there is nothing below 1000Hz here, the 200Hz tone you’ve just heard isn’t really there. As I said, this is a well known phenomenon in which the non-linearities of the inner ear causes this difference tone to be heard. Wikipedia states (although without citing a source) that, giving the two tones with different frequencies separately to each ear with headphones also create the effect but I was unable to experience this that way.

Here comes the fun part of this post, you can play several tricks with pure tones and use this ghost tone in creative ways. Here is a glissando of two pure sine tones. One oscillator starts from 4000Hz and goes down to 1000Hz, the other starts from 4200Hz and ends at 1200Hz. So the difference of their frequencies throughout is always 200Hz, so you should hear a constant (although sometimes fluctuating) 200Hz tone while the high frequencies are doing their gliss:

(
{
var freqSweep = Line.ar(4000, 1000, 10);
SinOsc.ar([freqSweep, freqSweep + 200]).mean!2;
}.play
)

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Look at the spectral decomposition, and the 200Hz tone isn’t there again:

sweep

You can even go to the extremes! Here, the frequencies of the sine tones change randomly 8 times a second, but the difference of 200Hz is preserved, so you are still able to hear the constant 200Hz (not very pleasant to listen to but hey, it’s a cool effect!):


(
{
var baseFreq = TRand.ar(1000, 2000, Impulse.ar(8)).lag(0.01);
SinOsc.ar([baseFreq, baseFreq + 200]).mean!2;
}.play
)

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Here they are changing 32 times a second randomly, but preserving the 200Hz separation, this is harder to hear, and fluctuates a bit, but the effect is there:

(
{//best through headphones
var baseFreq = TRand.ar(1000, 2000, Impulse.ar(32)).lag(0.01);
SinOsc.ar([baseFreq, baseFreq + 200]).mean!2;
}.play
)

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

-

And here is the grand finale of combination tones for this post. In the previous examples, we always kept a 200Hz separation between two oscillators and heard a constant difference tone. What if we craft the separation frequency in a way that the difference frequency plays a melody while the upper frequencies change randomly, even at 32 times a second? Can you hear the “bottom” melody here? Any guesses what it might be?

(
{
var times = Dseq(((1!12 ++ [1.5, 0.5, 2])!2).flat / 2, 1);
var pitchBase = [55, 55, 56, 58, 58, 56, 55, 53, 51, 51, 53, 55];
var pitches = Dseq((pitchBase ++ [55, 53, 53] ++ pitchBase ++ [53, 51, 51]).midicps, 1);
var freqs = Duty.ar(times, 0, pitches, doneAction: 2);
var baseRandFreq = TRand.ar(1000, 2000, Impulse.ar(32)).lag(0.01);

SinOsc.ar([baseRandFreq, baseRandFreq + freqs]).mean!2;
}.play;
)

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Not the most beautiful thing to listen, but try to hear the ghost melody at the bottom. Your ears and brain are playing tricks on you, and observing it is worth the suffering, in my opinion. Use the comment box if you can hear it and want to hazard a guess…

About this site:

Hello there, I'm Batuhan Bozkurt, a sound artist, computer programmer and performer from Istanbul - Turkey. This is my personal hub site where I regularly try to blog and share my projects and interesting things I stumble upon. For more info about me please click here.