Osaka 1970 - German Pavilion

The German Pavilion

The German Pavilion at the 1970 Expo in Osaka was an elaborate spatial audio project. Various artists, including Bernd Alois Zimmermann, Boris Blacher and Karlheinz Stockhausen, contributed works for the spherical loudspeaker setup:

/images/spatial/osaka.jpg

The German Pavilion at the 1970 Expo in Osaka.

A device for live spatialization in the Osaka Pavilion was developed at TU Berlin.

/images/spatial/osaka_sensor.jpg

TU-designed 'Kugelsensor' for live spatialization in the auditorium.

Stockhausen

The following sketch shows Stockhausen's approach for working with the system, using an 8-track tape machine:

/images/spatial/hinab-hinauf.png

Sketch for Stockhausen's work 'Hinab-Hinauf'.

TU Composition

/images/spatial/Musik-fuer-Osaka.gif

Simple Waveguides in C++

Waveguides can be used to model acoustical oscillators, such as strings, pipes or drumheads. The theory of digital waveguides is covered in the sound synthesis introduction.

The WaveGuide Class

The WaveGuide class implements all necessary components for a waveguide string emulation. Inside the class, the actual waveguide-buffers are realized as pointers to double arrays.

From ``WaveGuide.h``:

/// length of the delay lines
int     l_delayLine;

/// leftward delay line
double  *dl_l;

/// rightward delay line
double  *dl_r;

The pointer arrays need to be initialized in the constructor of the WaveGuide class.

From ``WaveGuide.cpp``:

dl_l = new double[l_delayLine];
dl_r = new double[l_delayLine];

for (int i=0; i<l_delayLine-1; i++)
{
    dl_l[i] = 0.0;
    dl_r[i] = 0.0;
}

Plucking the String

The method void WaveGuide::excite(double pos, double shift) is called for plucking the string, respectively exciting it. It receives a plucking position and a shift parameter. In two loops, the method fills the two waveguides with the excitation function. In this example, a simple triangular function is chosen.

From ``WaveGuide.cpp``:

// set positive slope until plucking index
for (int i=0; i<idx; i++)
{
    dl_l[i] = 0.5* ((double) i / (double)(idx));
    dl_r[i] = 0.5* ((double) i / (double)(idx));
}
// set negative slope from plucking index to end
for (int i=idx; i<l_delayLine; i++)
{
    dl_l[i] = 0.5*(1.0 - ((double) i / (double) (l_delayLine-idx)));
    dl_r[i] = 0.5*(1.0 - ((double) i / (double) (l_delayLine-idx)));
}

Oscillating

Karplus-Strong in Faust

White Tone Oscillator

As explained in the Sound Synthesis Introduction, the Karplus-Strong algorithm is based on a sequence of white noise. The following example uses a feedback structure to create a looped version of a white noise array:

text


Main components of the above example are the excitation and the resonator. The resonator is a feedback loop with an adjustable delay:

text


The excitation passes a random sequence to the resonator, once the gate is activated. It will oscillate until the gate is released.

Load the example in the Faust online IDE for a quick start:

// white_tone.dsp
//
// Henrik von Coler
// 2021-07-04

import("all.lib");

// Control parameters:
freq = hslider("freq Hz", 50, 20, 1000, 1) : si.smoo; // Hz
gate = button("gate");

// processing elements for excitation:
diffgtz(x) = (x-x') > 0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = diffgtz : release(n) : > (0.0);

P = SR/freq;

// Resonator:
resonator = (+ : delay(4096, P) * gate) ~ _;

 // processing function:
process = noise : *(gate : trigger(P)): resonator <: _,_;

Karplus-Strong in Faust

The Karplus-Strong algorithm for plucked string sounds is explained in detail in the Sound Synthesis Introduction. That implementation is based on a ring buffer with a moving average filter. For the Faust implementation, this example has been adjusted, slightly (Smith, 2007).

Exercise

Exercise

Extend the White Tone example with a filter in the feedback to turn it into a Karplus-Strong synthesis.


References

2018

  • Romain Michon, Julius Smith, Chris Chafe, Ge Wang, and Matthew Wright. The faust physical modeling library: a modular playground for the digital luthier. In International Faust Conference. 2018.
    [details] [BibTeX▼]

2007

Time-Frequency Domain

Compiling JackTrip

The SPRAWL System needs some additional features that are missing from the main branch of Jacktrip. To build the correct JackTrip version, the Jacktrip git repository must be cloned and checked out to the correct branch.

Therefor git must be installed. On MacOS git is often already installed. Linux users should install git through their package manager. Windows users download the installer from git-scm.

Getting the JackTrip Source Code

Now the JackTrip source code can be downloaded from the official JackTrip repository.

git clone https://github.com/jacktrip/jacktrip.git
git checkout nils

Changes in the remote repository have to get pulled.

git pull

Afterwards you can follow the official build instructions.

Moving Files with SCP

SCP (Secure copy protocol) is an SSH-based tool for transferring files between machines in local and wide area networks. It is a safe and quick way to exchange data.


Copying to a Remote Machine

The following command copies the file testfile.html from the local machine to the home directory of the user student on the server with the address specified address 11.22.33. Instead of the home directory (~/), any other target can be specified:

$ scp testfile.html student@11.22.33:~/

Add the -r flag to copy a directory recursively:

$ scp -r /foo/bar student@11.22.33:~/


.. admonition:: Exercise

  Select or create a short WAV file on your local machine and copy it to your personal directory on the server using SCP.

Copying From a Remote Machine

To copy a file from a remote server, the arguments' order needs to be swapped. The dot (.) copies the data to the recent directory. Any other path can be used as target.

$ scp student@85.214.78.6:~/WebAudioFreqGain.html .

Exercise

Create a text file in your personal directory on the server. Copy it to your local machine using the SCP command from your local machine.

Waveshaping Example

The following interactive example offers control over the pre-gain to add overtones to the sinusoidal source signal:

Pitch (Hz):

Pre-Gain:

Output Gain:

Time Domain:

Frequency Domain:

Using Python for Control

Python offers many useful tools for preparing data and controlling synthesis processes. Although it can also be used for actual digital signal processing, its versatility makes it a great tool for auxuliary tasks. Most notably, it can be used for flexible processing and routing of OSC messages, especially in the field of data sonification.


Python & OSC

A large variety of Python packages offers the possibility of using OSC. They can be installed using pip:

$ pip install python-osc
$ pip install pythonosc

An example project for controlling a Faust-built synthesizer with Python is featured in this software repository: https://github.com/anwaldt/py2faust_synth


Python & JACK

The JACK Audio Connection Kit Client for Python by Matthias Geier connects Python processes to the JACK server. This integration of Python in a JACK ecosystem can be helpful not only for audio processing, but also for synchronization of processes. Since the Python package also implements the JACK transport functions, it can be used to couple Python threads to the timeline of audio projects.