A Realtime Pipe Organ Instrument using QT and STK

Johnty Wang (johnty.wang@mail.mcgill.ca)

Project Report for MUMT618, Fall 2015.

Instructor: Prof. Gary Scavone

Introduction

Ryerson Organ
The organ at Ryerson United Church, Vancouver BC. (photo: Johnty Wang)


Background

Organ blower treadmills
(img src: wikipedia)

Flue and Reed Pipes

There are two main kinds of pipes on an organ.

Flue Pipes

pipe shapes
(img src: Clarke)

Reed Pipes

Pipe Organization

wind chest cross sectional

(Clarke 1877)

Adjusting the Sound

Control System/Inputs

Traditionally, everything is linked mechanically (Tracker organs). This allowed more direct control of the lever mechanisms for controlling the flow/stop of air, but also requires larger input forces as more stops are active. Following is an image of the complex mechanical matrix of a tracker organ system.

Tracker Organ

Over time, as instruments got larger, pneumatic actuators, akin to "fly-by-wire" aircraft control systems, eliminated the limitation of the tracker action by decoupling the input at the keyboard with the actual stop mechanism controlling the airflow.

Most modern organs are digitally controlled. This allows more flexible coupling, and quick recall of complex combinations. This also means the console does not have to be located in fixed place. (For example, the Ryerson organ shown at the beginning of this document can be carted around the sancturary and wired to the control system via a network cable.

Holy Trinity Organ Console

(Organ console at Holy Trinity, Buffalo. src: wikipedia. The round buttons on either side of the keyboards are the stop toggles. The two rows of vertical switches above the keyboard are the couplers. The round buttons between keyboard manuals are for loading combination presets. The two depressed foot pedals in the centre are the swell and choir shutter controllers for controlling the volume of those sets of stops, and the "crescendo" pedal allows stops to be incrementally activated as it is depressed further, creating increasingly louder and fuller sounds.)

The Organ is probably the world's first "synthesizer"

In the sense that it allows one to re-map the inputs to create different outputs. It also "synthesized" various other instrument sounds by imitation, including the "Vox Humana" stop which is a reed stop has some similar characteristics to the human vocal tract.

Can "fully reproduce" a performance from recorded signals

Since all the actions of the player on a modern organ is essentially translated to discrete control events, a system that records such actions will be able to "fully reproduce" a performance on the instrument. (This even includes any time-based quantization of the events, which would have been an inherient feature of the many digital control systems during a live performance). This is an interesting philosophical point on a control level. Perhaps, J.S. Bach was referring explicitly to the organ when saying the following:

   "It's easy to play any musical instrument: all you have to do is touch the right key at the right time and the instrument will play itself."


Components that may be of interest for Modelling

Some of the relevant parts to be modelled by an organ might include:

Existing Commercial Products

One of the more famous virtual software organ systems is Hauptwerk. It has an extensive sample-based library of many organs.

Implementation

This section describes the implementation details of the application implemented for the project.

Development was done in QT, a cross platform C++ development environment

The main components of the software includes:

The following shows a block diagram of the components of the system test

Synthesis: Organ Model

As described in the previous section, there are two main categories of organ pipes: the flue and the reed.

A first-pass attempt at putting something together, given the existing models in STK might look like:

keyboard flutes?

Or, if we're looking at reed pipes:

keyboard clarinets?

Flue Pipes

Since the flue pipe can be seen as a simplier version of a flute, for the implementation I have subclassed the basic flute model in STK with a class called "OrganFlue", and started experimenting with overriding the various internal functions to remove the flute-specific functionalities such as overblowing. (On-going)

Reed Pipes

One significant difference between the clarinet and the reed pipes of the organ is that the latter's reeds are tuned to vibrate at the funamental frequency with the pipe length set to resonate around the same frequency, while the clarinet's reed vibrates at a higher frequency than the fundamental of the pitch. Therefore, a reasonable first attempt, given my current understanding of the implementation of the clarinet model in STK, would be to modify the Jet"Table" (not really a table) source to output to the fundamental frequency instead. (On-going)


Framework and Realtime Audio/MIDI Considerations

Demonstration

The program was tested and demonstrated using an ION Discover mini USB keyboard. It is a simple device with two octaves of velocity sensitive keys. There are 4 additional buttons on the side. Two of them are for octave adjustment, one to activate the sustain pedal message and another modifier key that turn the main keys into increasing program change numbers.

ION Discover MIDI Keyboard
[(img src: ION website)](http://www.ionaudio.com/products/details/discover-keyboard-usb)

A Max/MSP patch (included in the project repository) was created to provide MIDI signals when there is no external controller present. The patch allows connection to the virtual MIDI input port of the synthesizer application, and transmit note and program change messages.

Max Test Patch
Max/MSP text patch

Further Development

References

D. Baker. The Organ : a Brief Guide to its Construction, History, Usage and Music. 1991.

W. H. Clarke. An Outline of the Structure of the Pipe Organ. Oliver Ditson & Co. Boston. 1877.

Image Sources