Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Sponsor

NEW! TMS320C6474: 3x the performance. 1/3 the cost. Three 1 GHz cores on 1 chip.

Chapters

Chapter Contents:

Search Physical Audio Signal Processing

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

Compiling the STK Library and Demos

The STK library and demos were built above when make was type in the top-level directory (assuming the JOS Overlay was installed). Here we look a little closer at what was going on there--also, this is how you do it if you don't have the JOS Overlay installed. First we build the STK library, stklib.a, and then build and try out a demo:

$ cd ~/stk/stk/src
$ make
g++ -g -Wall ... -c Stk.cpp -o Debug/Stk.o
g++ -g -Wall ... -c Noise.cpp -o Debug/Noise.o
...
/bin/rm -f libstk.a
ar -rsc libstk.a Debug/*.o
$
$ cd ../projects/demo
$ make
g++ -g -O2 -Wall ... -c ../../src/Stk.cpp -o Debug/Stk.o
g++ -g -O2 -Wall ... -c ../../src/Generator.cpp -o Debug/Generator.o
...
g++ -g -O2 -Wall ... -o Md2Skini Md2Skini.cpp Debug/Stk.o 
                        Debug/RtMidi.o -lasound -lpthread -lm  
$ Physical.bat
(Yes, the .bat files are executable files, even under UNIX.) The file
Physical.bat contains the following line:
wish < tcl/Physical.tcl | demo Clarinet -or -ip
The program wish is a UNIX shell supporting Tcl/Tk commands for constructing a graphical user interface (GUI) [346]. If you have Tcl/Tk installed, the wish program should be available. Say ``man wish'' to find out more about it. If you don't have it, yum install tk will install it on a Fedora system.A.4

Figure A.1: Tcl/Tk GUI launched by the STK demo Physical.bat.
\includegraphics[width=!,height=6.5in]{eps/Physical4p2p1}
After invoking Physical.bat, you should be looking at a GUI which presents a number of buttons and sliders, as shown in Fig.A.1. Press the NoteOn button, and you should hear a pleasant woodwind-like sound. Try increasing the vibrato amplitude with the Vibrato Amplitude slider. Next, play with the Breath Pressure slider to see how the instrument responds.

If you get an alert panel about a ``broken pipe'', this is a message from the Tcl/Tk shell (wish) that usually means the demo program exited immediately because it didn't like the i/o resources it found. For example, this will happen if there are not at least two audio input channels (an odd requirement that applies even to demos that don't use audio inputs). It will also happen if the requested sampling rate is not supported by your sound hardware.A.5

It can be useful to be aware that the jackd command line is written to the file ~/.jackdrc by qjackctl when you select the ``Save'' button in the ``Setup'' window and restart the JACK server. (The ``JACK daemon'' jackd is the actual server program started by qjackctl.) For example, the jack