Chucklib overview

Chucklib is a framework designed for realtime algorithmic sequencing. It takes its name from the ChucK programming language created by Perry Cook and Ge Wang at Princeton, whose chuck operator I have brazenly stolen (though for a different purpose).

The following help files explain the framework in more detail:

GettingStartedWithChucklib - how to begin using chucklib techniques in your pieces

ChuckStorageClasses - lists the available chuckable storage classes.

ChuckHacking - explains some of the internals to help you write your own processes.

ChuckPrototypes - explains the process prototypes provided in the distribution.

ChuckExamples - some brief examples to give you a taste of typical usage.

___________________________________

NOTE: Installation instructions have changed as of September 30, 2007.

To install:

Installation is now handled by the Quarks package manager. You need only install the ddwChucklib quark. Chucklib depends on a few other quarks, which will be installed automatically.

Some specific, optional features depend on other ddw quarks that are not automatically installed. MIDI features depend on ddwMIDI, and the GUI depends on ddwVoicer, for instance. Some errors with these features might be resolved by installing the rest of dewdrop_lib. In general, it's assumed that if you want to use chucklib, if you will also have installed all of dewdrop_lib.

Files:

In addition to the class files, chucklib relies on a number of prototype definitions that are loaded whenever the class library is compiled. The prototypes live in the Prototypes directory in the ddwChucklib folder. The file extension must be .txt rather than .sc, because .sc will be compiled as part of the class library, but the prototypes are not class definitions.

At startup, chucklib locates the Prototypes directory based on the quark's path. You shouldn't have to do anything to make sure the prototypes get loaded.

If chucklib is loading successfully, you should see messages like the following after (re)compiling the library.

Loaded 11 chucklib files from [path].

Interface design:

The file devEnvironment.rtf includes code to load a couple of control panels and arrange text windows to use the screen space efficiently (1024 x 768). It can also give you some ideas on making your own GUI if you don't like this one.

You can have the GUI adapt to your screen size by supplying a file in the chucklib startup directory called "windowbounds[screenwidth].sc" where "[screenwidth]" is replaced with the integer screen width. A 1024x768 screen would use the file windowbounds1024.sc. See the example files for the environment variables that must be set for this to work.

___________________________________

Design considerations:

Artificial intelligence sequencing, as I envision it, means the creation of sequencing processes that modify their own materials while playing. These algorithms are necessarily complex. I created this framework to speed up development and testing of new algorithms by providing an open-ended environment of processes made up of various components that can be swapped in and out, and replaced, on the fly.

As kind of a teaser for the next release, below follows a brief overview of the process prototype framework currently in development. It's largely functional, but not entirely stable yet and I don't consider it ready for release.

Process prototypes define the general flow of control. A small handful of prototypes come with the library; however, the modular design means that you can use the same process prototype for processes that sound radically different. If the out of the box prototypes don't suit your needs, you can clone prototypes and create your own at will.

To illustrate the approach, these are the handles in the existing process prototypes into which you can insert your own algorithms into the predefined flow:

Melodic processes:

Func: Defines how a melodic phrase will crossbreed with a second phrase to produce new material. Any methodology may be used: genetic algorithms, Markov chains, neural nets--the sky's the limit.

adaptPattern: The process references Funcs by name. This pattern determines the order in which Funcs will be used.

Chordal processes:

Func: Defines how a chord form (set of notes or intervals) will adapt to fit the current harmonic context. Currently you get the harmonic context from a bass note supplied by another process, and a top note supplied by an AI melodic process (which may itself be adapting).

MacRh (macrorhythm): Defines the pacing between each chord.

MicRh (microrhythm): Defines the rhythm over which each chord will be arpeggiated.

ArpegPat (arpeggiation pattern): Defines the order in which the chord notes will be arpeggiated.

Macrorhythm, microrhythm and arpeggiation pattern use patterns, like adaptPattern above, to determine in which order the named components will be used.

There is also rudimentary functionality to input material via MIDI directly into a process, and resume the process with the new material with the touch of a button.

Part of the composition process, then, is creating your own components and trying them out with different materials until you find combinations you like. Rather than writing dense pattern definitions and stopping and restarting them to make changes, you can play with the composition of patterns and hear the results immediately. It allows a more fluid and experimental approach to composing and performing.

Please contact me via my website (http://www.dewdrop-world.net) with questions or problems.

License:

___________________________________

Chucklib, along with the rest of dewdrop_lib, is distributed in accordance with the GNU Public License. Any derivative code that you release must also be under the GPL.

James Harkins, http://www.dewdrop-world.net