MUMT 618: Computational Modeling of Musical Acoustic Systems [course page]
Winter 2012 :: Final Project
Hannah Robertson [home page]

Code and usage for stk::Feadóg (penny-whistle)

Jump to:
[ Installation ] [ Usage ] [ Scores ]

[ Project main page ]


Installation

[ Download code ]

To start, make sure you've installed the Synthesis ToolKit in C++ (STK).

This zip file contains two folders: "new_files" and "modified_stk_files." Because STK already contains both whistle and flute classes, the penny-whistle class is called Feadog, as feadóg means whistle in Irish.

From the "new_files" directory, compile with the following (after changing the -L and -I paths to match your STK installation):

g++ -D__MACOSX_CORE__ -L/.../stk-4.4.3/src -I/.../stk-4.4.3/include/ -o play_whistle play_whistle.cpp Feadog.cpp -lstk -lpthread -framework CoreAudio -framework CoreMIDI -framework CoreFoundation

To make use of the STK demo programs, see below.

Usage

From the "new_files" directory:

./play_whistle scores/ [-w ] [-h <#> <#> <#> <#> <#> <#>]

If both the "-w" and "-h" flags are used, the hole spacing is applied to the instrument of build -w (hole radius, bore radius, cylinder length). Otherwise, a high whistle body is assumed.

Examples

STK "Demo" functionality

To play with the penny-whistle from the demo classes, which allow both SKINI and MIDI input/output (realtime and otherwise) and an interface to tweak various instrument parameters, a few more (easy!) installation steps are required.

From the "new_files" directory:

  1. Copy "Feadog.cpp" to the STK src/ directory;
  2. Copy "Feadog.h" to the STK include/ directory;
  3. Copy the files in "scores" to the STK projects/demo/scores directory.

Replace the following STK files with their modified versions in "modified_stk_files":

  1. projects/demo/tcl/Demo.tcl
  2. projects/demo/utilities.cpp
  3. project/demo/Makefile.in

In the main STK directory, run ./configure; in the stk/projects/demos directory, run make clean and then make. Now "Feadog" is available as an instrument choice in both the ./demo and ./StkDemo examples! For additional instructions on using these demo examples, see the official STK usage page.

Sample SKINI files

The "scores" folder contains the following melodies, complete with expressive fingering speed adjustments; slow_demo.ski, fast_demo.ski, and last_demo.ski. In addition, the file scales_demo.ski is included; it runs through a major scale, one octave, at three speeds: slow, medium, and fast. Good for testing different hole spacing to check tuning. Because the MIDI note numbers in a SKINI file refer to fingerings on the whistle, these scales play from "all holes closed" to "all holes open" rather than from specific pitch to specific pitch. This means the tuning of the whistle effects the tuning of this file, making it a good file with which to test different hole spacings.

[ Top ]