Homework 1: Data Sonification

due on 18-Oct in the Homework Factory

Overview

Create a sound file which sonifies a time series you've chosen to listen to. Your data source can be anything, feel free to scout online for datasets. Post your work in the same manner as HW0 and include a sound file (.wav, 48 kHz), code (your modified Chuck script) and a text description of the dataset.

Before you start

These resources will help get you going:

Examples

Here are two example data files: (from the Time Series Data Library collection)

  • data-drywhite.dat
    Monthly Australia sales of dry white wine: thousands of litres. Jan 1980 – Jul 1995.
  • data-fortified.dat
    Monthly Australian sales of fortified wine: thousands of litres. Jan 1980 – Jul 1995.

Here are chuck files to get you started:

defines the class DataReader, which handles reading in a file and sonifying data file passed to it as the first parameter, if any. (Note: You always want to shred this first, so that it has been defined for use in further shreds.)

Chuck can be run without miniAudicle. In a terminal, launch chuck by providing the chuck code file and the data filename as an argument to it. Arguments are preceded with a colon. For instance:

chuck m220a-DataReader.ck:data-drywhite.dat

reads in and sonifies the dry white wine sales data file.

Alternatively, we can shred two chuck files, where the first chuck file is m220a-DataReader.ck, and the second chuck file specifies the data file(s) to be used. In the following example, the second chuck file plays with smoothed envelopes:

chuck m220a-DataReader.ck m220a-Player.ck

In this case, no argument is needed to m220a-DataReader.ck because the data filenames are coded in the content of the second file. Since no arguments are passed to m220a-DataReader.ck, it handles only the reading in files part, while all data-to-sound mappings are defined in m220a-Player.ck. Also note the syntax: we shred multiple chuck files in the terminal by separating them with a space.

m220a-duo.ck demonstrates how to play both data files at the same time but on different audio channels.

Important: you need to modify the dataDir variable to have the paths point to where you've downloaded the data files on your computer.

Customize

For developing your own versions of the homework, you'll want to use the miniAudicle. (Once done developing, you can run them using the terminal, as described above.) Always first define the public class called DataReader by opening and shredding m220a-DataReader.ck. Investigate m220a-Player.ck and create your own version.

Questions for the reader: (1) why are the values for gain squared, and (2) why use MIDI keynums for the freq values? What happens if they're mapped linearly, instead? And (3) what happens if the 100 ms update rate is increased or decreased significantly?

l.gain(Math.pow(w, 2.0));
l.freq(Std.mtof(80.0 + w*20.0));
100::ms => now;

Use your imagination to devise some music in which the performer is data. Sound production can be anything available in chuck. Please begin to experiment with piping the sound through reverb and/or effects, as in the example above. Submit the finished study in .wav format. The .wav file editor, Audacity, can be used to record, trim, mix and export your final version. When using miniAudicle as a client to qjackctl, miniAudicle's "chuck" output can be patched directly into audacity.