|
StkX
an Stk framework for Mac OS X
|
|
StkX is an Stk framework for Mac OS X, which will (hopefully) make your Mac Stk programming easier and more convenient.
|
Download
|
Release Notes
- Modified headers (RtAudio.h and RtMidi.h) according to the latest post-release fixes to STK 4.2.1.
- Builds a Universal Binary to support both PowerPC and Intel-based Macs. Details on building Universal Binaries can be found here.
System requirements
- Mac OS X 10.4.4, Xcode 2.2.
Release Notes
- Compatible STK version: 4.2.1. (10/14/2005).
- Supports PowerPC only.
System requirements
- Mac OS X 10.4, Xcode 2.1.
|
Installation
|
- Downloaded the StkX.zip file from the link above.
- Put the unzipped folder StkX in the stk-4.2.1 folder.
- Open up a Terminal, go to the StkX directory, and run the following command:
% sudo xcodebuild install -target StkX -configuration Release DSTROOT=/ INSTALL_PATH=your_framework_path DEPLOYMENT_LOCATION=YES
Here, your_framework_path is the location you want to have your StkX framework installed: /Library/Frameworks is the most recommended spot for this.
% sudo xcodebuild install -target StkX -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks/ DEPLOYMENT_LOCATION=YES
Of course, you can install it in any other location, including ~/Library/Frameworks:
% sudo xcodebuild install -target StkX -configuration Release DSTROOT=/ INSTALL_PATH=~/Library/Frameworks/ DEPLOYMENT_LOCATION=YES
If necessary, type in your password when asked.
For more information on xcodebuild:
|
Removal
|
-
To remove any StkX installation, run the following command in the StkX directory:
% sudo xcodebuild clean
-
Now we need to remove the framework directory.
% sudo rm -r your_framework_path/StkX.framework
your_StkX_path is where you've installed your StkX framework. For example, to remove StkX installed in the /Library/Frameworks, run
% sudo rm -r /Library/Frameworks/StkX.framework
Again, enter your password if necessarry.
|
Usage
|
StkX can be used in the same way as any frameworks can be.
- Add (or link) StkX.framework to your target.
You will probably need to add its path to the Frameworks Search Paths setting.
- To include any Stk header, you can just do the following:
#include <StkX/StkX.h>
For Objective-C, you might want to use import instead:
#import <StkX/StkX.h>
- Important! To use Objective-C and C++-based StkX codes together in the same file (which would probably be the case for most Cocoa Stk applications), make sure that the File Type of your header and source are set as Objective-C++ (sourcecode.cpp.h and sourcecode.cpp.objcpp, respectively).
- Once you're using StkX, you don't need to set/add any Stk's OS X preprocessors (__GXX__ and __MACOSX_CORE__) and/or frameworks (CoreAudio, CoreMIDI, and CoreFoundation) for your target: all of OS X specific preprocessors and libraries for Stk compilation have been taken care of by StkX. :-)
|
Examples
|
Builds a command-line application HelloSine (see here.)
This would probably be one of the simplest examples that show how to use StkX to program Cocoa-based GUI applications: it plays a pure sine tone, whose amplitude and pitch can be controlled with sliders and number fields.
Notes on examples
- The default StkX location is /Library/Frameworks: you may need to modify Framework Search Path setting otherwise.
- Each project is to build a Universal Binary when its Build Configuration is set to Release: only native-architecture binary will be produced in Debug mode.
|
|
Copyright © 2005-2006 Woon Seung Yeo, all rights reserved.
woony AT ccrma DOT stanford DOT edu
Last updated: Sat, 11 Feb 2006 02:19:38 -0800.
|