Code and usage for stk::Feadog+fipple
Jump to: [ Installation ] [ Usage (Score) ] [ Usage (MIDI) ] [ Project main page ]Installation
[ Download code ]To start, make sure you've installed the Synthesis ToolKit in C++ (STK). Then:
- Copy "Feadog.cpp" to the STK
src/
directory; - Copy "Feadog.h" to the STK
include/
directory; - Copy the files in "scores" to the STK
projects/demo/scores
directory. - Replace the following STK files with the new files here:
projects/demo/tcl/Demo.tcl
projects/demo/utilities.cpp
project/demo/Makefile.in
- In the main STK directory, run
./configure
; - In the stk/projects/demos directory, run
make clean
and thenmake
.
Usage (Realtime MIDI, with MaxMSP)
In MaxMSP, open both midi_feadog.maxpat and (from the extras menu) KeyMidi.
From the stk/projects/demos directory, run ./demo Feadog -im -or
. Now realtime MIDI usage should be working. If no sound comes out, double-click the "ctlout" object in the MaxMSP patch and change MIDI outputs ("From MaxMSP 1" should do it). Change notes with the KeyMidi keyboard, and change note parameters with the Max patch!
Usage (from scores)
Play SKINI scores
From the "new_files" directory, compile with the following (after changing the -L, -I, and Feadog.cpp paths to match your STK installation):
g++ -D__MACOSX_CORE__ -L/.../stk-4.4.3/src -I/.../stk-4.4.3/include/ -o test_fipple test_fipple.cpp /.../stk-4.4.3/src/Feadog.cpp -lstk -lpthread -framework CoreAudio -framework CoreMIDI -framework CoreFoundation
Now, from the directory containing both fipple_test and the scores directory, type
./fipple_test scores/ [-w #] [-r] [-b]
scorefile
is a SKINI score file. For included scores, see below; read about the SKINI (Synthesis ToolKit Instrument Network Interface) format here.- The optional "-w #" flag indicates a whistle-type preset: "-w 1" is a low whistle; "-w 0" is a high whistle; any other integer will default to high whistle-type body. More presets may be added in the future.
- The optional "-r" flag sets the excitation source back to the initial reedtable lookup built into the stk::BlowHole class, for comparison's sake.
- The optional "-b" flag sets the resonance source back to the initial single delayline of the stk::BlowHole class, for comparison's sake. Note: Changing notes won't change the pitch, as the tuble length remains the same! This is mostly useful for listening to the effect of the jet delay on the pitch/octave of a single lowest note.
Sample scores
Several SKINI score files have been included to demonstrate various aspects of the fipple implementaiton. Note: If the file doesn't sound when you play it, try again until it *does* sound. Sometimes this takes two or three re-starts, and is presumably linked to the initial noise impulse being too low.
- To hear the effect of different excitation source/resonance source configurations, "start_test.ski" plays three notes (D, E, F#) first in the lower octave, and then in the higher. It repeats this sequence at different speeds. Compare:
./fipple_test scores/start_test.ski -w 1
(low whistle, fipple, tone holes) with./fipple_test scores/start_test.ski -w 1 -b
(low whistle, fipple, cylinder) with./fipple_test scores/start_test.ski -w 1 -r
(low whistle, "reed", toneholes) with./fipple_test scores/start_test.ski -w 1 -r -b
(low whistle, "reed", cylinder). Remember that for the -b flag, the body delayline doesn't change so only the jet delay length is being altered when each new note is played. - To hear the effect of different articulations, "artic_test.ski" plays three notes (D, E, F#) first in the lower octave, and then in the higher. It repeats this sequence for the three articulations. Compare:
./fipple_test scores/artic_test.ski -w 1
(low whistle, fipple, tone holes) with./fipple_test scores/artic_test.ski -w 1 -b
(low whistle, fipple, cylinder) with./fipple_test scores/artic_test.ski -w 1 -r
(low whistle, "reed", toneholes) with./fipple_test scores/artic_test.ski -w 1 -r -b
(low whistle, "reed", cylinder). - Additional articulation test:
./fipple_test scores/test.ski -w 1
(low whistle, fipple, tone holes). - To hear the effect of different delay length ratios, "delay_test.ski" plays three notes (D, E, F#) first in the lower octave, and then in the higher. It repeats this sequence for the three different ratios: 1, .5, .25. Compare:
./fipple_test scores/delay_test.ski -w 1
(low whistle, fipple, tone holes). - To play with delay length ratios more, open
scale_ratio_demo.ski
and change the value of the last integer in the first non-comment line (currently "22.0000") to a value between 1 and 128 (representing ratios from 0 to 1). - Now, to hear it in action for a tune, compare a slow tune on a low whistle with and without the fipple. Note that even though it starts off over-blown, by the end it jumps down to the lower octave. Clearly the fipple model isn't adequately mimicking a real fipple yet, but the fact that these two octaves are *possible* with multiple tone hole model gives hope for controlling them in the future.
./fipple_test scores/slow_demo.ski -w 1
(low whistle, fipple, tone holes) with./fipple_test scores/slow_demo.ski -w 1
(low whistle, NO fipple, tone holes).