mirror of
https://github.com/thestk/stk
synced 2026-01-12 04:21:52 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de344668dd | ||
|
|
fe20fe92a2 | ||
|
|
e11bff2fe8 | ||
|
|
503ed3cc9f | ||
|
|
a6381b9d38 | ||
|
|
cf06b7598b |
10
INSTALL
10
INSTALL
@@ -6,7 +6,7 @@ The Synthesis ToolKit in C++ can be used in a variety of ways, depending on your
|
||||
|
||||
To configure and compile (on Unix systems):
|
||||
|
||||
1. Unpack the STK distribution (tar -xzf stk-4.x.tar.gz).
|
||||
1. Unpack the STK distribution (tar -xzf stk-4.x.x.tar.gz).
|
||||
2. From within the directory containing this file, run configure:
|
||||
|
||||
./configure
|
||||
@@ -18,11 +18,11 @@ Several options can be passed to configure, including:
|
||||
|
||||
--disable-realtime = only compile generic non-realtime classes
|
||||
--enable-debug = enable various debug output
|
||||
--with-alsa = choose native ALSA API support (linux only)
|
||||
--with-alsa = choose native ALSA API support (default, linux only)
|
||||
--with-jack = choose native JACK server API support (linux only)
|
||||
--enable-midiator = enable native MS-124W MIDI support (linux only)
|
||||
--with-oss = choose native OSS API support (linux only)
|
||||
|
||||
At the moment, it is not possible to specify more than one Linux audio API, though this will change in the next release. Typing "./configure --help" will display all the available options. In addition, it is possible to specify the RAWWAVES and INCLUDE paths to configure as (ex. to set to /home/gary/rawwaves and /home/gary/include):
|
||||
It is now possible to specify more than one Linux audio API. Note however that the ALSA library is required in order to compile the RtMidi class, even if the "--with-oss" option is provided (only the OSS audio API will be used, not the OSS MIDI API). Typing "./configure --help" will display all the available options. In addition, it is possible to specify the RAWWAVES and INCLUDE paths to configure as (ex. to set to /home/gary/rawwaves and /home/gary/include):
|
||||
|
||||
./configure RAWWAVE_PATH="/home/gary/rawwaves/"
|
||||
./configure INCLUDE_PATH="/home/gary/include/"
|
||||
@@ -33,7 +33,7 @@ If you wish to use a different compiler than that selected by configure, specify
|
||||
|
||||
./configure CXX=CC
|
||||
|
||||
In addition, a linux RPM is available from the STK WWW site (http://www-ccrma.stanford.edu/software/stk/).
|
||||
In addition, a linux RPM is available from the Planet CCRMA WWW site (http://ccrma.stanford.edu/planetccrma/software/).
|
||||
|
||||
|
||||
For Windows Users:
|
||||
|
||||
57
README
57
README
@@ -8,7 +8,7 @@ include: STK class header files
|
||||
src: STK class source files
|
||||
rawwaves: STK audio files (1-channel, 16-bit, big-endian)
|
||||
doc: STK documentation
|
||||
projects: example STK programs
|
||||
projects: example STK projects and programs
|
||||
|
||||
Please read the Legal and Ethical notes near the bottom of this document.
|
||||
|
||||
@@ -17,7 +17,7 @@ For compiling and installing STK, see the INSTALL file in this directory.
|
||||
|
||||
OVERVIEW:
|
||||
|
||||
The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in C++. STK was designed to facilitate rapid development of music synthesis and audio processing software, with an emphasis on cross-platform functionality, realtime control, ease of use, and educational example code. The Synthesis ToolKit is extremely portable (it's mostly platform-independent C and C++ code), and it's completely user-extensible (all source included, no unusual libraries, and no hidden drivers). We like to think that this increases the chances that our programs will still work in another 5-10 years. In fact, the ToolKit has been working continuously for nearly 8 years now. STK currently runs with "realtime" support (audio and MIDI) on SGI (Irix), Linux, Macintosh OS X, and Windows computer platforms. Generic, non-realtime support has been tested under NeXTStep, Sun, and other platforms and should work with any standard C++ compiler.
|
||||
The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. STK was designed to facilitate rapid development of music synthesis and audio processing software, with an emphasis on cross-platform functionality, realtime control, ease of use, and educational example code. The Synthesis ToolKit is extremely portable (it's mostly platform-independent C and C++ code), and it's completely user-extensible (all source included, no unusual libraries, and no hidden drivers). We like to think that this increases the chances that our programs will still work in another 5-10 years. In fact, the ToolKit has been working continuously for nearly 10 years now. STK currently runs with "realtime" support (audio and MIDI) on SGI (Irix), Linux, Macintosh OS X, and Windows computer platforms. Generic, non-realtime support has been tested under NeXTStep, Sun, and other platforms and should work with any standard C++ compiler.
|
||||
|
||||
The Synthesis ToolKit is free for non-commercial use. The only parts of the Synthesis ToolKit that are platform-dependent concern real-time audio and MIDI input and output, and that is taken care of with a few special classes. The interface for MIDI input and the simple Tcl/Tk graphical user interfaces (GUIs) provided is the same, so it's easy to experiment in real time using either the GUIs or MIDI. The Synthesis ToolKit can generate simultaneous SND (AU), WAV, AIFF, and MAT-file output soundfile formats (as well as realtime sound output), so you can view your results using one of a large variety of sound/signal analysis tools already available (e.g. Snd, Cool Edit, Matlab).
|
||||
|
||||
@@ -31,13 +31,15 @@ SYSTEM REQUIREMENTS:
|
||||
See the individual README's (eg. README-linux) in the /doc directory for platform specific information and system requirements. In general, you will use the configure script to create Makefiles on unix platforms or the VC++ workspace files to compile the example programs. To use the Tcl/Tk GUIs, you will need Tcl/Tk version 8.0 or higher.
|
||||
|
||||
|
||||
WHAT'S NEW:
|
||||
WHAT'S NEW (AND NOT SO NEW):
|
||||
|
||||
Despite being available in one form or another since 1996, we still consider STK to be alpha software. Thus, backward compatability has not been a priority. Please read the Release Notes to see what has changed since the last release.
|
||||
Despite being available in one form or another since 1996, we still consider STK to be alpha software. We attempt to maintain backward compatability but changes are sometimes made in an effort to improve the overall design or performance of the software. Please read the Release Notes to see what has changed since the last release.
|
||||
|
||||
A new StkFrames class has been created to facilitate the handling and passing of multichannel, vectorized audio data. All STK classes have been updated to include tick() functions which accept StkFrames arguments.
|
||||
|
||||
The control message handling scheme has been simplified greatly through the use of the Messager class. It is now possible to have access to simultaneous piped, socketed, and/or MIDI input control messages. In most cases, this should eliminate the use of the Md2Skini program.
|
||||
|
||||
Realtime audio input capabilities were added to STK with release 3.0, though the behavior of such is very hardware dependent. Under Linux and Irix, audio input and output are possible with very low latency. Using the Windoze DirectSound API, minimum dependable output sound latency seems to be around 20 milliseconds or so, while input sound latency is on the order of a hundred milliseconds or more!
|
||||
Realtime audio input capabilities were added to STK with release 3.0, though the behavior of such is very hardware dependent. Under Linux, Macintosh OS-X, and Irix, audio input and output are possible with very low latency. Using the Windoze DirectSound API, minimum dependable output sound latency seems to be around 20 milliseconds or so, while input sound latency is on the order of a hundred milliseconds or more!
|
||||
|
||||
As mentioned above, it is possible to record the audio ouput of an STK program to .snd, .wav, .raw, .aif, and .mat (Matlab MAT-file) output file types. Though somewhat obsolete, the program Md2Skini can be used to write SKINI scorefiles from realtime MIDI input. Finally, STK should compile with non-realtime functionality on any platform with a generic C++ compiler.
|
||||
|
||||
@@ -46,7 +48,7 @@ For those who wish to make a library from the core STK classes, the configure sc
|
||||
|
||||
DISCLAIMER:
|
||||
|
||||
You probably already guessed this, but just to be sure, we don't guarantee anything works. :-) It's free ... what do you expect? If you find a bug, please let us know and we'll try to correct it. You can also make suggestions, but again, no guarantees. Send email to prc@cs.princeton.edu and gary@ccrma.stanford.edu.
|
||||
You probably already guessed this, but just to be sure, we don't guarantee anything works. :-) It's free ... what do you expect? If you find a bug, please let us know and we'll try to correct it. You can also make suggestions, but again, no guarantees. Send email to the mail list.
|
||||
|
||||
|
||||
LEGAL AND ETHICAL:
|
||||
@@ -62,53 +64,30 @@ The good news is that large hunks of the techniques used here are public domain.
|
||||
|
||||
FURTHER READING:
|
||||
|
||||
For complete documentation on this ToolKit, the classes, etc., see the doc directory of the distribution or surf to http://www-ccrma.stanford.edu/software/stk/. Also check the platform specific README's for specific system requirements.
|
||||
For complete documentation on this ToolKit, the classes, etc., see the doc directory of the distribution or surf to http://ccrma.stanford.edu/software/stk/. Also check the platform specific README's for specific system requirements.
|
||||
|
||||
|
||||
PERRY'S NOTES FROM THE ORIGINAL DISTRIBUTION:
|
||||
|
||||
This whole world was created with no particular hardware in mind. These examples are intended to be tutorial in nature, as a platform for the continuation of my research, and as a possible starting point for a software synthesis system. The basic motivation was to create the necessary unit generators to do the synthesis, processing, and control that I want to do and teach about. Little thought for optimization was given (see Object.cpp), and therefore improvements, especially speed enhancements, should be possible with these classes. It was written with some basic concepts in mind about how to let compilers optimize.
|
||||
This whole world was created with no particular hardware in mind. These examples are intended to be tutorial in nature, as a platform for the continuation of my research, and as a possible starting point for a software synthesis system. The basic motivation was to create the necessary unit generators to do the synthesis, processing, and control that I want to do and teach about. Little thought for optimization was given and therefore improvements, especially speed enhancements, should be possible with these classes. It was written with some basic concepts in mind about how to let compilers optimize.
|
||||
|
||||
Your question at this point might be, "But Perry, with CMix, CMusic, CSound, CShells, CMonkeys, etc. already cluttering the landscape, why a new set of stupid C functions for music synthesis and processing?" The answers lie below.
|
||||
|
||||
1) I needed to port many of the things I've done
|
||||
into something which is generic enough to port
|
||||
further to different machines.
|
||||
1) I needed to port many of the things I've done into something which is generic enough to port further to different machines.
|
||||
|
||||
2) I really plan to document this stuff, so that
|
||||
you don't have to be me to figure out what's
|
||||
going on. (I'll probably be sorry I said this
|
||||
in a couple of years, when even I can't figure
|
||||
out what I was thinking.)
|
||||
2) I really plan to document this stuff, so that you don't have to be me to figure out what's going on. (I'll probably be sorry I said this in a couple of years, when even I can't figure out what I was thinking.)
|
||||
|
||||
3) The classic difficulties most people have in
|
||||
trying to implement physical models are:
|
||||
3) The classic difficulties most people have in trying to implement physical models are:
|
||||
|
||||
A) They have trouble understanding the papers,
|
||||
and/or in turning the theory into practice.
|
||||
A) They have trouble understanding the papers, and/or in turning the theory into practice.
|
||||
|
||||
B) The Physical Model instruments are a pain to get
|
||||
to oscillate, and coming up with stable and
|
||||
meaningful parameter values is required to
|
||||
get the models to work at all.
|
||||
B) The Physical Model instruments are a pain to get to oscillate, and coming up with stable and meaningful parameter values is required to get the models to work at all.
|
||||
|
||||
This set of C++ unit generators and instruments
|
||||
might help to diminish the scores of emails I
|
||||
get asking what to do with those block diagrams
|
||||
I put in my papers.
|
||||
This set of C++ unit generators and instruments might help to diminish the scores of emails I get asking what to do with those block diagrams I put in my papers.
|
||||
|
||||
4) I wanted to try some new stuff with modal synthesis,
|
||||
and implement some classic FM patches as well.
|
||||
4) I wanted to try some new stuff with modal synthesis, and implement some classic FM patches as well.
|
||||
|
||||
5) I wanted to reimplement, and newly implement
|
||||
more of the intelligent and physical performer
|
||||
models I've talked about in some of my papers.
|
||||
But I wanted to do it in a portable way, and in
|
||||
such a way that I can hook up modules quickly.
|
||||
I also wanted to make these instruments connectable
|
||||
to such player objects, so folks like Brad Garton
|
||||
who really think a lot about the players can connect
|
||||
them to my instruments, a lot about which I think.
|
||||
5) I wanted to reimplement, and newly implement more of the intelligent and physical performer models I've talked about in some of my papers. But I wanted to do it in a portable way, and in such a way that I can hook up modules quickly. I also wanted to make these instruments connectable to such player objects, so folks like Brad Garton who really think a lot about the players can connect them to my instruments, a lot about which I think.
|
||||
|
||||
6) More rationalizations to follow . . .
|
||||
|
||||
|
||||
337
configure
vendored
337
configure
vendored
@@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.57 for STK 4.1.2.
|
||||
# Generated by GNU Autoconf 2.57 for STK 4.2.0.
|
||||
#
|
||||
# Report bugs to <gary@ccrma.stanford.edu>.
|
||||
# Report bugs to <gary@music.mcgill.ca>.
|
||||
#
|
||||
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
@@ -268,9 +268,9 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='STK'
|
||||
PACKAGE_TARNAME='stk'
|
||||
PACKAGE_VERSION='4.1.2'
|
||||
PACKAGE_STRING='STK 4.1.2'
|
||||
PACKAGE_BUGREPORT='gary@ccrma.stanford.edu'
|
||||
PACKAGE_VERSION='4.2.0'
|
||||
PACKAGE_STRING='STK 4.2.0'
|
||||
PACKAGE_BUGREPORT='gary@music.mcgill.ca'
|
||||
|
||||
ac_unique_file="src/Stk.cpp"
|
||||
# Factoring default headers for most tests.
|
||||
@@ -310,7 +310,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP byte_order rawwaves include realtime sound_api debug cflags object_path warn build build_cpu build_vendor build_os host host_cpu host_vendor host_os audio_apis midiator frameworks LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP byte_order rawwaves include realtime sound_api debug cflags object_path warn build build_cpu build_vendor build_os host host_cpu host_vendor host_os audio_apis frameworks LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -787,7 +787,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures STK 4.1.2 to adapt to many kinds of systems.
|
||||
\`configure' configures STK 4.2.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -848,7 +848,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of STK 4.1.2:";;
|
||||
short | recursive ) echo "Configuration of STK 4.2.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -857,7 +857,6 @@ Optional Features:
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--disable-realtime = only compile generic non-realtime classes
|
||||
--enable-debug = enable various debug output
|
||||
--enable-midiator = enable native MS-124W MIDI support (linux only)
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
@@ -880,7 +879,7 @@ Some influential environment variables:
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
||||
Report bugs to <gary@ccrma.stanford.edu>.
|
||||
Report bugs to <gary@music.mcgill.ca>.
|
||||
_ACEOF
|
||||
fi
|
||||
|
||||
@@ -943,7 +942,7 @@ fi
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
STK configure 4.1.2
|
||||
STK configure 4.2.0
|
||||
generated by GNU Autoconf 2.57
|
||||
|
||||
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
|
||||
@@ -958,7 +957,7 @@ cat >&5 <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by STK $as_me 4.1.2, which was
|
||||
It was created by STK $as_me 4.2.0, which was
|
||||
generated by GNU Autoconf 2.57. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -4129,14 +4128,14 @@ echo $ECHO_N "checking whether to compile debug version... $ECHO_C" >&6
|
||||
# Check whether --enable-debug or --disable-debug was given.
|
||||
if test "${enable_debug+set}" = set; then
|
||||
enableval="$enable_debug"
|
||||
debug=-D_STK_DEBUG_
|
||||
cflags=-g
|
||||
debug="-D_STK_DEBUG_ -D__RTAUDIO_DEBUG__"
|
||||
cflags="-g -O2"
|
||||
object_path=Debug
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
else
|
||||
debug=
|
||||
cflags=-O2
|
||||
cflags=-O3
|
||||
object_path=Release
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
@@ -4144,7 +4143,7 @@ fi;
|
||||
|
||||
# Check compiler and use -Wall if gnu.
|
||||
if test $GXX = "yes" ; then
|
||||
warn="-Wall -g"
|
||||
warn="-Wall -g -Woverloaded-virtual -D__GXX__"
|
||||
|
||||
fi
|
||||
|
||||
@@ -4236,6 +4235,77 @@ echo $ECHO_N "checking for audio API... $ECHO_C" >&6
|
||||
sound_api=_NO_API_
|
||||
|
||||
|
||||
# Look for ALSA library because we need it for RtMidi
|
||||
|
||||
echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5
|
||||
echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lasound $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char snd_pcm_open ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
snd_pcm_open ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_asound_snd_pcm_open=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_asound_snd_pcm_open=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_open" >&6
|
||||
if test $ac_cv_lib_asound_snd_pcm_open = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBASOUND 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lasound $LIBS"
|
||||
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: STK in Linux requires the ALSA asound library for RtMidi!" >&5
|
||||
echo "$as_me: error: STK in Linux requires the ALSA asound library for RtMidi!" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
audio_apis="-D__LINUX_ALSASEQ__"
|
||||
|
||||
# Look for Jack flag
|
||||
|
||||
# Check whether --with-jack or --without-jack was given.
|
||||
@@ -4315,76 +4385,8 @@ echo "$as_me: error: JACK support requires the jack library!" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5
|
||||
echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lasound $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char snd_pcm_open ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
snd_pcm_open ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_asound_snd_pcm_open=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_asound_snd_pcm_open=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_open" >&6
|
||||
if test $ac_cv_lib_asound_snd_pcm_open = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBASOUND 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lasound $LIBS"
|
||||
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: ALSA support requires the asound library!" >&5
|
||||
echo "$as_me: error: ALSA support requires the asound library!" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
LIBS="`pkg-config --cflags --libs jack` $TEMP_LIBS -lasound"
|
||||
audio_apis="-D__LINUX_JACK__"
|
||||
audio_apis="-D__LINUX_JACK__ $audio_apis"
|
||||
fi
|
||||
|
||||
# Look for Alsa flag
|
||||
@@ -4397,74 +4399,6 @@ if test "${with_alsa+set}" = set; then
|
||||
echo "${ECHO_T}using ALSA" >&6
|
||||
fi;
|
||||
if test $sound_api = -D__LINUX_ALSA__; then
|
||||
|
||||
echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5
|
||||
echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lasound $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char snd_pcm_open ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
snd_pcm_open ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_asound_snd_pcm_open=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_asound_snd_pcm_open=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_open" >&6
|
||||
if test $ac_cv_lib_asound_snd_pcm_open = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBASOUND 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lasound $LIBS"
|
||||
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: ALSA support requires the asound library!" >&5
|
||||
echo "$as_me: error: ALSA support requires the asound library!" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
audio_apis="-D__LINUX_ALSA__ $audio_apis"
|
||||
fi
|
||||
|
||||
@@ -4481,29 +4415,16 @@ fi;
|
||||
audio_apis="-D__LINUX_OSS__ $audio_apis"
|
||||
fi
|
||||
|
||||
# If no audio api flags specified, use OSS
|
||||
# If no audio api flags specified, use ALSA
|
||||
if test $sound_api = _NO_API_; then
|
||||
sound_api=-D__LINUX_OSS__
|
||||
|
||||
echo "$as_me:$LINENO: result: using OSS" >&5
|
||||
echo "${ECHO_T}using OSS" >&6
|
||||
audio_apis=-D__LINUX_OSS__
|
||||
|
||||
echo "$as_me:$LINENO: result: using ALSA" >&5
|
||||
echo "${ECHO_T}using ALSA" >&6
|
||||
audio_apis="-D__LINUX_ALSA__ $audio_apis"
|
||||
fi
|
||||
|
||||
# Check whether --enable-midiator or --disable-midiator was given.
|
||||
if test "${enable_midiator+set}" = set; then
|
||||
enableval="$enable_midiator"
|
||||
midiator=-D__MIDIATOR__
|
||||
|
||||
else
|
||||
midiator=
|
||||
|
||||
fi;
|
||||
;;
|
||||
|
||||
*-sgi*)
|
||||
audio_apis="-D__IRIX_AL__ -LANG:std -w"
|
||||
audio_apis="-D__IRIX_AL__ -D__IRIX_MD__ -LANG:std -w"
|
||||
|
||||
echo "$as_me:$LINENO: result: using IRIX AL" >&5
|
||||
echo "${ECHO_T}using IRIX AL" >&6
|
||||
@@ -4798,75 +4719,6 @@ done
|
||||
|
||||
frameworks="-framework CoreAudio -framework CoreMIDI -framework CoreFoundation"
|
||||
|
||||
# Explicitly link with c++ library.
|
||||
|
||||
echo "$as_me:$LINENO: checking for printf in -lstdc++" >&5
|
||||
echo $ECHO_N "checking for printf in -lstdc++... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_stdcpp_printf+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lstdc++ $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char printf ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
printf ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_stdcpp_printf=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_stdcpp_printf=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_printf" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_stdcpp_printf" >&6
|
||||
if test $ac_cv_lib_stdcpp_printf = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBSTDC__ 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lstdc++ $LIBS"
|
||||
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: Stk requires the C++ library!" >&5
|
||||
echo "$as_me: error: Stk requires the C++ library!" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -5407,7 +5259,7 @@ _ASBOX
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
This file was extended by STK $as_me 4.1.2, which was
|
||||
This file was extended by STK $as_me 4.2.0, which was
|
||||
generated by GNU Autoconf 2.57. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -5462,7 +5314,7 @@ _ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
STK config.status 4.1.2
|
||||
STK config.status 4.2.0
|
||||
configured by $0, generated by GNU Autoconf 2.57,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
@@ -5683,7 +5535,6 @@ s,@host_cpu@,$host_cpu,;t t
|
||||
s,@host_vendor@,$host_vendor,;t t
|
||||
s,@host_os@,$host_os,;t t
|
||||
s,@audio_apis@,$audio_apis,;t t
|
||||
s,@midiator@,$midiator,;t t
|
||||
s,@frameworks@,$frameworks,;t t
|
||||
s,@LIBOBJS@,$LIBOBJS,;t t
|
||||
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
||||
|
||||
29
configure.ac
29
configure.ac
@@ -1,5 +1,5 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(STK, 4.1.2, gary@ccrma.stanford.edu, stk)
|
||||
AC_INIT(STK, 4.2.0, gary@music.mcgill.ca, stk)
|
||||
AC_CONFIG_SRCDIR(src/Stk.cpp)
|
||||
AC_CONFIG_FILES(src/Makefile projects/demo/Makefile projects/effects/Makefile projects/ragamatic/Makefile projects/examples/Makefile)
|
||||
|
||||
@@ -48,12 +48,12 @@ fi
|
||||
AC_MSG_CHECKING(whether to compile debug version)
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug = enable various debug output],
|
||||
[AC_SUBST( debug, [-D_STK_DEBUG_] ) AC_SUBST( cflags, [-g] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
|
||||
[AC_SUBST( debug, [] ) AC_SUBST( cflags, [-O2] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
|
||||
[AC_SUBST( debug, ["-D_STK_DEBUG_ -D__RTAUDIO_DEBUG__"] ) AC_SUBST( cflags, ["-g -O2"] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
|
||||
[AC_SUBST( debug, [] ) AC_SUBST( cflags, [-O3] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
|
||||
|
||||
# Check compiler and use -Wall if gnu.
|
||||
if test $GXX = "yes" ; then
|
||||
AC_SUBST( warn, ["-Wall -g"] )
|
||||
AC_SUBST( warn, ["-Wall -g -Woverloaded-virtual -D__GXX__"] )
|
||||
fi
|
||||
|
||||
if test $realtime = yes; then
|
||||
@@ -64,20 +64,22 @@ if test $realtime = yes; then
|
||||
*-*-linux*)
|
||||
AC_SUBST( sound_api, [_NO_API_] )
|
||||
|
||||
# Look for ALSA library because we need it for RtMidi
|
||||
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(STK in Linux requires the ALSA asound library for RtMidi!))
|
||||
audio_apis="-D__LINUX_ALSASEQ__"
|
||||
|
||||
# Look for Jack flag
|
||||
AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (linux only)], [AC_SUBST( sound_api, [-D__LINUX_JACK__] ) AC_MSG_RESULT(using JACK)] , )
|
||||
if [test $sound_api = -D__LINUX_JACK__;] then
|
||||
TEMP_LIBS=$LIBS
|
||||
AC_CHECK_LIB(jack, jack_client_new, , AC_MSG_ERROR(JACK support requires the jack library!))
|
||||
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))
|
||||
LIBS="`pkg-config --cflags --libs jack` $TEMP_LIBS -lasound"
|
||||
audio_apis="-D__LINUX_JACK__"
|
||||
audio_apis="-D__LINUX_JACK__ $audio_apis"
|
||||
fi
|
||||
|
||||
# Look for Alsa flag
|
||||
AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)], [AC_SUBST( sound_api, [-D__LINUX_ALSA__] ) AC_MSG_RESULT(using ALSA)], )
|
||||
if test $sound_api = -D__LINUX_ALSA__; then
|
||||
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))
|
||||
audio_apis="-D__LINUX_ALSA__ $audio_apis"
|
||||
fi
|
||||
|
||||
@@ -87,18 +89,15 @@ if test $realtime = yes; then
|
||||
audio_apis="-D__LINUX_OSS__ $audio_apis"
|
||||
fi
|
||||
|
||||
# If no audio api flags specified, use OSS
|
||||
# If no audio api flags specified, use ALSA
|
||||
if [test $sound_api = _NO_API_;] then
|
||||
AC_SUBST( sound_api, [-D__LINUX_OSS__] )
|
||||
AC_MSG_RESULT(using OSS)
|
||||
AC_SUBST( audio_apis, [-D__LINUX_OSS__] )
|
||||
AC_MSG_RESULT(using ALSA)
|
||||
audio_apis="-D__LINUX_ALSA__ $audio_apis"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(midiator, [ --enable-midiator = enable native MS-124W MIDI support (linux only)], [AC_SUBST( midiator, [-D__MIDIATOR__] )], [AC_SUBST( midiator, [] )])
|
||||
;;
|
||||
|
||||
*-sgi*)
|
||||
AC_SUBST( audio_apis, ["-D__IRIX_AL__ -LANG:std -w"] )
|
||||
AC_SUBST( audio_apis, ["-D__IRIX_AL__ -D__IRIX_MD__ -LANG:std -w"] )
|
||||
AC_MSG_RESULT(using IRIX AL)
|
||||
AC_CHECK_LIB(audio, alOpenPort, , AC_MSG_ERROR(IRIX audio support requires the audio library!) )
|
||||
AC_CHECK_LIB(md, mdOpenInPort, , AC_MSG_ERROR(IRIX MIDI support requires the md library!) )
|
||||
@@ -110,8 +109,6 @@ if test $realtime = yes; then
|
||||
[AC_SUBST( audio_apis, [-D__MACOSX_CORE__] )],
|
||||
[AC_MSG_ERROR(CoreAudio and/or CoreMIDI header files not found!)] )
|
||||
AC_SUBST( frameworks, ["-framework CoreAudio -framework CoreMIDI -framework CoreFoundation"] )
|
||||
# Explicitly link with c++ library.
|
||||
AC_CHECK_LIB(stdc++, printf, , AC_MSG_ERROR(Stk requires the C++ library!) )
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -4,11 +4,13 @@ By Perry R. Cook and Gary P. Scavone, 1995-2004.
|
||||
|
||||
STK Classes - See the HTML documentation in the html directory for complete information.
|
||||
|
||||
.- Envelope - ADSR
|
||||
|
||||
.- Generator - (Modulate, Noise, SingWave, Envelope)
|
||||
| | |
|
||||
| SubNoise ADSR
|
||||
| Asymp
|
||||
|
|
||||
|- Noise - SubNoise
|
||||
|
|
||||
|- Table
|
||||
|- Function - (Table, BowTable, JetTable, ReedTable)
|
||||
|
|
||||
|- WvIn - (WaveLoop, RtWvIn, TcpWvIn)
|
||||
|
|
||||
@@ -19,24 +21,14 @@ STK Classes - See the HTML documentation in the html directory for complete info
|
||||
| DelayL FormSwep
|
||||
| DelayA
|
||||
|
|
||||
|- Echo, Chorus, PitShift
|
||||
|
|
||||
|- RtAudio, RtMidi, Socket, Thread
|
||||
|- RtAudio, RtMidi, RtDuplex, Socket, Thread, Mutex
|
||||
Stk -|
|
||||
|- Reverb - (PRCRev, JCRev, NRev)
|
||||
|- Effect - (Echo, Chorus, PitShift, PRCRev, JCRev, NRev)
|
||||
|
|
||||
|- Modulate
|
||||
|
|
||||
|- SingWave
|
||||
|
|
||||
|- Voicer
|
||||
|- Voicer, Message, Skini, MidiFileIn, Phonemes, Sphere, Vector3D
|
||||
|
|
||||
|- Messager
|
||||
|
|
||||
|- SKINI
|
||||
|
|
||||
|- ReedTabl, JetTabl, BowTabl
|
||||
|
|
||||
| .- FM - (HevyMetl, PercFlut, Rhodey, Wurley, TubeBell, BeeThree, FMVoices)
|
||||
| |
|
||||
| |- Modal - ModalBar
|
||||
@@ -66,8 +58,11 @@ Stk -|
|
||||
|
||||
Master Class: Stk.cpp Sample rate, byte-swapping, error handling functionality
|
||||
|
||||
Sources: Envelope.cpp Linearly Goes to Target by Rate
|
||||
Sources: Generator.cpp Abstract Base Class for Various Source Signal Classes
|
||||
Function.cpp Abstract Base Class for Various Input/Output Mapping Classes
|
||||
Envelope.cpp Linearly Goes to Target by Rate
|
||||
ADSR.cpp ADSR Flavor of Envelope
|
||||
Asymp.cpp Exponentially Approaches Target
|
||||
Noise.cpp Random Number Generator
|
||||
SubNoise.cpp Random Numbers each N samples
|
||||
Table.cpp Lookup Table (assumes given data in big-endian format)
|
||||
@@ -140,7 +135,7 @@ Shakers.cpp PhISM statistical model for shakers and real-world sound effects
|
||||
Mesh2D.cpp Two-dimensional, rectilinear digital waveguide mesh.
|
||||
Whistle.cpp Hybrid physical/spectral model of a police whistle.
|
||||
|
||||
Reverb.cpp Reverberator Effects Processor Master Class for reverberators
|
||||
Effect.cpp Effects Processor Base Class
|
||||
JCRev.cpp Chowning Reverberator 3 series allpass units, 4 parallel combs, 2 stereo delays
|
||||
NRev.cpp Another famous CCRMA Reverb 8 allpass, 6 parallel comb filters
|
||||
PRCRev.cpp Dirt Cheap Reverb by Cook 2 allpass, 2 comb filters
|
||||
@@ -160,7 +155,7 @@ demo.cpp Demonstration program for most synthesis algorithms
|
||||
effects.cpp Effects demonstration program
|
||||
ragamatic.cpp Nirvana just waiting to happen
|
||||
|
||||
SKINI.cpp SKINI file/message parser object
|
||||
Skini.cpp SKINI file/message parser object
|
||||
SKINI.msg #defines for often used and universal MIDI/SKINI symbols
|
||||
SKINI.tbl Table of SKINI messages
|
||||
|
||||
|
||||
@@ -4,20 +4,15 @@ By Perry R. Cook and Gary P. Scavone, 1995-2004.
|
||||
|
||||
Please read the file README and INSTALL for more general STK information.
|
||||
|
||||
Realtime support for Linux is currently using either the Open Sound System (OSS) or the Advanced Linux Sound Architecture (ALSA) sound and MIDI APIs. The free version of OSS works as well (and in some cases better than the commercial OSS version ... such as with my Maestro 2e chipset). In general, the ALSA drivers also seem to perform well. You can read more about ALSA at http://www.alsa-project.org/. ALSA is open source and holds great promise for audio under Linux. The API is selected during compilation using either the __LINUX_ALSA__ or __LINUX_OSS__ definitions. The configure script uses the OSS API by default. The ALSA API can be selected by passing the "--with-alsa" option to configure.
|
||||
Realtime audio support for Linux currently includes the Advanced Linux Sound Architecture (ALSA), the JACK low-latency audio server, and/or Open Sound System (OSS) APIs. One or more APIs are selected during compilation using the __LINUX_ALSA__, __LINUX_JACK__, and/or __LINUX_OSS__ definitions. Because the ALSA library is now integrated into the standard Linux kernel, it is the default audio/MIDI API with STK versions 4.2 and higher. The __LINUX_ALSASEQ__ definition is required to compile RtMidi with ALSA sequencer support. Native OSS MIDI support no longer exists in RtMidi. If the __LINUX_OSS__ preprocessor definition is specified, only OSS audio support will be compiled and RtMidi will still be compiled using the ALSA API. For this reason, STK now requires the asound library for realtime support. Realtime programs must also link with the <TT>pthread</TT> library. The OSS audio API can be selected by passing the "--with-oss" option to configure.
|
||||
|
||||
STK should compile without much trouble under Linux ... afterall, it is primarily developed on Linux platforms. Since all Linux distributions typically include the GNU makefile utilities, you should be able to use the default Makefile. Typing "make" will initiate the compilation process.
|
||||
The free version of OSS generally works as well (and in some cases better than the commercial OSS version ... such as with my Maestro 2e chipset). In general, the ALSA drivers also seem to perform well. You can read more about ALSA at http://www.alsa-project.org/. ALSA is open source and holds great promise for audio under Linux.
|
||||
|
||||
STK should compile without much trouble under Linux. Since all Linux distributions typically include the GNU makefile utilities, you should be able to use the default Makefile. Typing "make" will initiate the compilation process.
|
||||
|
||||
MIDIATOR SERIAL PORT MIDI SUPPORT:
|
||||
|
||||
STK now has special support for the MIDIator serial port MIDI interface. This is of primary interest to us laptop users, whose computers usually don't have a gameport. If you want to buy one of these devices, make sure you get the MS-124w model (www.midiator.com). For it to work in STK, you must provide the __MIDIATOR__ definition during compilation (in addition to either __LINUX_ALSA__ or __LINUX_OSS__) or pass the "--enable-midiator" option to configure.
|
||||
|
||||
There are a few things that need to be done on your system to get the MIDIator working. Assuming you wish to attach the MIDIator to serial port 0, add the following lines to your bootup sequence in /etc/rc.d/rc.local:
|
||||
|
||||
setserial /dev/ttyS0 baud_base 57600
|
||||
setserial /dev/ttyS0 divisor 1
|
||||
|
||||
You may need to specify the full path to the setserial function, depending on how your PATH variable is set up. Also, you may need to modify the permissions of /dev/ttyS0 (chmod a+rwx). And finally, the MIDIator should be set for "single addresssed" mode (the S/A switch on S and the A/B switch on A), which puts identical output on all 4 MIDI output ports. It is possible to use the MIDIator in a "multi-port" mode, though I'm not currently supporting that in STK.
|
||||
MIDIator support has been removed from RtMidi with STK versions 4.2 and higher. If you really need it, you can contact us to get an old distribution.
|
||||
|
||||
NOTE REGARDING PTHREADS:
|
||||
|
||||
|
||||
@@ -6,17 +6,16 @@ Please read the file README and INSTALL for more general STK information.
|
||||
|
||||
Realtime support for Macintosh OS X uses the CoreAudio HAL API and is specified during compilation using the __MACOSX_CORE__ preprocessor definition.
|
||||
|
||||
It is necessary to download the OS X developer kit in order to compile STK. STK was successfully tested on OS X version 10.2.
|
||||
It is necessary to install the OS X developer kit in order to compile STK. STK was successfully tested on OS X versions 10.2 and 10.3.
|
||||
|
||||
The internal Macintosh audio hardware typically supports a sample rate of 44100 Hz only. Therefore, it is necessary to either specify this rate as a command-line option to the STK example programs or to change the default sample rate inside the Stk.h file before compilation. In addition, the RT_BUFFER_SIZE, specified in Stk.h, could be increased (to a higher power of two) for more robust performance.
|
||||
The internal Macintosh audio hardware typically supports a sample rate of 44100 Hz only. The default STK sample rate is now 44100 Hz and all current example programs use this rate. However, it is possible to manually override this value in some programs from the command-line. The default sample rate is set in Stk.h. In addition, the RT_BUFFER_SIZE, specified in Stk.h, could be increased (to a higher power of two) for more robust performance.
|
||||
|
||||
There is a potential conflict between the STK Delay class and a Delay() function declared in OSUtils.h (which is included via <CoreServices/CoreServices.h>). In general, this conflict can be avoided via the use of a namespace (an explicit Delay::Delay declaration), though this made the Windows Visual C++ compiler barf. If you use STK classes within a project that includes the OSUtils.h file, you will likely need to make changes in STK classes that use the Delay class.
|
||||
|
||||
|
||||
Tcl/Tk on OS X:
|
||||
|
||||
The tcl/tk interpreter does not ship by default with OS X, but must be downloaded from the internet. The latest Tcl/Tk Aqua distribution (http://www.apple.com/downloads/macosx/unix_open_source/tcltk.html) has been successfully tested on a 10.2 system. The default installation will place a link to the wish interpretor at /usr/bin/wish.
|
||||
The tcl/tk interpreter does not ship by default with OS X, but must be downloaded from the internet. The latest Tcl/Tk Aqua distribution (http://www.apple.com/downloads/macosx/unix_open_source/tcltk.html) has been successfully tested on 10.2 and 10.3 systems. The default installation will place a link to the wish interpretor at /usr/bin/wish.
|
||||
|
||||
Initial tests have shown somewhat poor response between changes made in the tcl/tk script and the resulting audio updates.
|
||||
It appears that socket support in Tcl/Tk on OS X uses the Nagle algorithm, which produces poor response between changes made in the tcl/tk script and the resulting audio updates. Note that this is only a problem when using a socket connection from a Tcl/Tk script.
|
||||
|
||||
It is possible to connect a tcl/tk interface to an STK program via a socket connection. However, the tcl/tk interpreter does not appear to properly close the socket connection during disconnection. It is therefore necessary to type "Exit" in the STK program terminal window to properly exit the STK program.
|
||||
|
||||
@@ -8,6 +8,8 @@ The project Makefiles are created by configure. If you have trouble running "ma
|
||||
|
||||
Another issue that has crept up with this release is proper compiler support for C++ error handling. If you experience problems, you probably don't have a recent version of the C++ compiler. Otherwise, STK should compile and run on SGI platforms without any problems. Release 4.0 of STK is confirmed to compile (with various warnings) using CC version 7.30.
|
||||
|
||||
The __IRIX_AL__ and __IRIX_MD__ preprocessor definitions are required for realtime audio and MIDI support.
|
||||
|
||||
NOTE REGARDING PTHREADS:
|
||||
|
||||
Since release 3.1, STK has used the pthread API under Irix. It appears that pthread functionality is standard on SGI, so this change shouldn't cause any problems. If I'm wrong, let me know!
|
||||
|
||||
@@ -15,7 +15,7 @@ Both the DirectSound and Steinberg ASIO audio APIs are supported for realtime au
|
||||
|
||||
When using the DirectSound API for audio input, latency is typically pretty horrendous (should we be surprised?). Also, there is a slight chance you don't have DirectSoundCapture support on your computer. If not, you should download the DirectX 6.0 (or higher) runtime libraries from Microsoft's WWW site (http://www.microsoft.com/directx/download.asp) in order to run the pre-compiled STK executables for Windoze. The last time I checked, there was no DirectSoundCapture support for WindowsNT ... you'll have to switch to Windows 2000 or XP or use an ASIO driver. I stopped supporting the WinMM audio output code with release 3.2.
|
||||
|
||||
Realtime MIDI input is supported using the winmm.lib API.
|
||||
Realtime MIDI input/output is supported by RtMidi using the winmm.lib API and requires the __WINDOWS_MM__ preprocessor definition.
|
||||
|
||||
Visual C++ 6.0 workspaces have been created for the various STK projects. Everything has already been configured for you. The intermediate .obj files will be written to either the "Release" or "Debug" directories, but the executable files will be written to the main project directories (where they need to be for proper execution). If you should somehow lose or hose the VC++ workspace file for a project, then you will have to do a LOT of configuring to recreate it ... it's probably easier just to download the distribution again from our WWW sites. Anyway, for your benefit and mine, here is a list of things that need to be added to the various "Project Settings":
|
||||
|
||||
@@ -27,7 +27,7 @@ Visual C++ 6.0 workspaces have been created for the various STK projects. Every
|
||||
|
||||
4. Under C/C++ > Preprocessor: Add "../../include" directory to the "extra include" field.
|
||||
|
||||
5. Under C/C++ > Preprocessor: Add "__WINDOWS_DS__" to the definitions field.
|
||||
5. Under C/C++ > Preprocessor: Add "__WINDOWS_DS__", "__WINDOWS_MM__", and "__LITTLE_ENDIAN__ to the definitions field.
|
||||
|
||||
6. Add all the necessary files to the project.
|
||||
|
||||
@@ -49,7 +49,7 @@ WINDOWS 95/98:
|
||||
|
||||
PLAY SKINI SCOREFILES IN REALTIME:
|
||||
|
||||
demo Clarinet -or < scores/streetsf.ski
|
||||
demo Clarinet -or -if scores/streetsf.ski
|
||||
|
||||
USE TCL/TK GUIs FOR REALTIME CONTROL:
|
||||
|
||||
|
||||
@@ -2,6 +2,31 @@ The Synthesis ToolKit in C++ (STK)
|
||||
|
||||
By Perry R. Cook and Gary P. Scavone, 1995-2004.
|
||||
|
||||
v4.2.0: (4 October 2004)
|
||||
- simultaneous multiple audio APIs supported at compile time
|
||||
- fixed hidden overloaded virtual functions
|
||||
- new Asymp exponential envelope class
|
||||
- various changes to better conform to standard C++ programming practices
|
||||
- MY_FLOAT type converted to StkFloat and changed throughout (use treesed utility to search/replace in old files)
|
||||
- most example programs rewritten to use an audio callback paradigm (which works better in OS-X)
|
||||
- new StkFrames class for vectorized multichannel data and associated new tick() functions making use of StkFrames
|
||||
- new RtMidi class with MIDI output capabilities (API changes)
|
||||
- new MidiFileIn class for reading MIDI files
|
||||
- revised Filter classes to use std::vectors for coefficients (API changes)
|
||||
- revised Messager class (now queues messages for retrieval) (API changes)
|
||||
- new abstract parent Effect class for various effects
|
||||
- added setT60 function to all reverbs
|
||||
- new abstract parent Generator class for various signal sources
|
||||
- new abstract parent Function class for tables and various non-linear functions
|
||||
- Skini class completely rewritten (simplified) using the C++ STL (API changes)
|
||||
- WvOut classes now clip to -1.0 to +1.0 and report out of range
|
||||
- new Mutex class
|
||||
- turned Nagle algorithm off by default in Socket class
|
||||
- error reporting standardized in all classes
|
||||
|
||||
v4.1.3: (22 March 2004)
|
||||
- bug fix in RtAudio for Windows DirectSound output only support
|
||||
|
||||
v4.1.2: (15 March 2004)
|
||||
- added Linux JACK support to RtAudio
|
||||
- added optional doNormalize argument to WvIn to allow specification of data normalization or not
|
||||
@@ -105,7 +130,7 @@ v3.0: (10 October 1999)
|
||||
- added RawWvOut class
|
||||
- new WvIn class with RawWvIn, SndWvIn, WavWvIn, MatWvIn, and RTWvIn subclasses
|
||||
- removed RawWave, RawShot, RawInterp, and RawLoop classes (supplanted by RawWvIn)
|
||||
- multi-channel data support in WvIn and WvOut classes using MY_MULTI data type (pointer to MY_FLOAT) and the methods mtick() and mlastOutput()
|
||||
- multi-channel data support in WvIn and WvOut classes using MY_MULTI data type (pointer to StkFloat) and the methods mtick() and mlastOutput()
|
||||
- now writing to primary buffer under Windoze when allowed by hardware
|
||||
- cleaned up Object.h a bit
|
||||
- pulled various utility and thread functions out of syntmono.cpp (to aid readability of the code)
|
||||
|
||||
111
doc/SKINI.txt
111
doc/SKINI.txt
@@ -10,7 +10,7 @@ for the Synthesis Toolkit in C++ by Perry R. Cook.
|
||||
* A SKINI Haiku. *
|
||||
*********************************
|
||||
|
||||
Profound thanks to Dan Trueman, Brad Garton, and
|
||||
Profound thanks to Dan trueman, Brad Garton, and
|
||||
Gary Scavone for input on this revision. Thanks
|
||||
also to MIDI, the NeXT MusicKit, ZIPI and all
|
||||
the creators and modifiers of these for good bases
|
||||
@@ -120,7 +120,7 @@ upon/from which to build and depart.
|
||||
|
||||
4) C Files Used To Implement SKINI
|
||||
|
||||
SKINI.cpp is an object which can either open a SKINI file, and
|
||||
Skini.cpp is an object which can either open a SKINI file, and
|
||||
successively read and parse lines of text as SKINI strings, or
|
||||
accept strings from another object and parse them. The latter
|
||||
functionality would be used by a socket, pipe, or other connection
|
||||
@@ -128,11 +128,11 @@ upon/from which to build and depart.
|
||||
but not restricted to real time.
|
||||
|
||||
SKINI.msg should be included by anything wanting to use the
|
||||
SKINI.cpp object. This is not mandatory, but use of the __SK_blah_
|
||||
Skini.cpp object. This is not mandatory, but use of the __SK_blah_
|
||||
symbols which are defined in the .msg file will help to ensure
|
||||
clarity and consistency when messages are added and changed.
|
||||
|
||||
SKINI.tbl is used only by the SKINI parser object (SKINI.cpp).
|
||||
SKINI.tbl is used only by the SKINI parser object (Skini.cpp).
|
||||
In the file SKINI.tbl, an array of structures is declared and
|
||||
assigned values which instruct the parser as to what the message
|
||||
types are, and what the fields mean for those message types.
|
||||
@@ -240,7 +240,7 @@ upon/from which to build and depart.
|
||||
7) The SKINI.tbl File, How Messages are Parsed:
|
||||
|
||||
The SKINI.tbl file contains an array of structures which
|
||||
are accessed by the parser object SKINI.cpp. The struct is:
|
||||
are accessed by the parser object Skini.cpp. The struct is:
|
||||
|
||||
struct SKINISpec { char messageString[32];
|
||||
long type;
|
||||
@@ -322,70 +322,67 @@ upon/from which to build and depart.
|
||||
|
||||
8) Objects using SKINI
|
||||
|
||||
Here's a simple example of code which uses the SKINI object
|
||||
Here's a simple example of code which uses the Skini object
|
||||
to read a SKINI file and control a single instrument.
|
||||
|
||||
Skini score;
|
||||
Skini::Message message;
|
||||
instrument = new Mandolin(50.0);
|
||||
score = new SKINI(argv[1]);
|
||||
while(score->getType() > 0) {
|
||||
tempDouble = score->getDelta();
|
||||
if (tempDouble < 0) {
|
||||
tempDouble = - tempDouble;
|
||||
tempDouble = tempDouble - output.getTime();
|
||||
if (tempDouble < 0) {
|
||||
printf("Bad News Here!!! Backward Absolute Time Required.\n");
|
||||
tempDouble = 0.0;
|
||||
}
|
||||
score.setFile( argv[1] );
|
||||
while ( score.nextMessage( message ) != 0 ) {
|
||||
tempDouble = message.time;
|
||||
if (tempDouble < 0) {
|
||||
tempDouble = - tempDouble;
|
||||
tempDouble = tempDouble - output.getTime();
|
||||
if (tempDouble < 0) {
|
||||
printf("Bad News Here!!! Backward Absolute Time Required.\n");
|
||||
tempDouble = 0.0;
|
||||
}
|
||||
tempLong = (long) (tempDouble * Stk::sampleRate());
|
||||
for (i=0;i<tempLong;i++) {
|
||||
output.tick(instrument->tick());
|
||||
}
|
||||
tempLong = (long) ( tempDouble * Stk::sampleRate() );
|
||||
for ( i=0; i<tempLong; i++ ) {
|
||||
output.tick( instrument->tick() );
|
||||
}
|
||||
|
||||
tempDouble3 = message.floatValues[1] * NORM_MIDI;
|
||||
if ( message.type == __SK_NoteOn_ ) {
|
||||
if ( tempDouble3 == 0.0 ) {
|
||||
tempDouble3 = 0.5;
|
||||
instrument->noteOff( tempDouble3 );
|
||||
}
|
||||
tempDouble3 = score->getByteThree();
|
||||
if (score->getType()== __SK_NoteOn_ ) {
|
||||
tempDouble3 *= NORM_MIDI;
|
||||
if (score->getByteThree() == 0) {
|
||||
tempDouble3 = 0.5;
|
||||
instrument->noteOff(tempDouble3);
|
||||
}
|
||||
else {
|
||||
tempLong = (int) score->getByteTwo();
|
||||
tempDouble2 = Midi2Pitch[tempLong];
|
||||
instrument->noteOn(tempDouble2,tempDouble3);
|
||||
}
|
||||
else {
|
||||
tempLong = message.intValues[0];
|
||||
tempDouble2 = Midi2Pitch[tempLong];
|
||||
instrument->noteOn( tempDouble2, tempDouble3 );
|
||||
}
|
||||
else if (score->getType() == __SK_NoteOff_) {
|
||||
tempDouble3 *= NORM_MIDI;
|
||||
instrument->noteOff(tempDouble3);
|
||||
}
|
||||
else if (score->getType() == __SK_ControlChange_) {
|
||||
tempLong = score->getByteTwoInt();
|
||||
instrument->controlChange(tempLong,temp3.0);
|
||||
}
|
||||
score->nextMessage();
|
||||
}
|
||||
else if ( message.type == __SK_NoteOff_ ) {
|
||||
instrument->noteOff( tempDouble3 );
|
||||
}
|
||||
else if ( message.type == __SK_ControlChange_ ) {
|
||||
tempLong = message.intValues[0];
|
||||
instrument->controlChange( tempLong, tempDouble3 );
|
||||
}
|
||||
}
|
||||
|
||||
When the score (SKINI object) object is created from the
|
||||
filename in argv[1], the first valid command line is read
|
||||
from the file and parsed.
|
||||
When a SKINI score is passed to a Skini object using the
|
||||
Skini::setFile() function, valid messages are read from
|
||||
the file and returned using the Skini::nextMessage() function.
|
||||
|
||||
The score->getType() retrieves the messageType. If this is
|
||||
-1, there are no more valid messages in the file and the
|
||||
synthesis loop terminates. Otherwise, the message type is
|
||||
returned.
|
||||
A Skini::Message structure contains all the information parsed
|
||||
from a single SKINI message. A returned message type of zero
|
||||
indicates either an invalid message or the end of a scorefile.
|
||||
|
||||
getDelta() retrieves the deltaTime until the current message
|
||||
should occur. If this is greater than 0, synthesis occurs
|
||||
until the deltaTime has elapsed. If deltaTime is less than
|
||||
zero, the time is interpreted as absolute time and the output
|
||||
device is queried as to what time it is now. That is used to
|
||||
form a deltaTime, and if it's positive we synthesize. If
|
||||
it's negative, we print an error and pretend this never
|
||||
happened and we hang around hoping to eventually catch up.
|
||||
The "time" member of a Skini::Message is the deltaTime until the
|
||||
current message should occur. If this is greater than 0,
|
||||
synthesis occurs until the deltaTime has elapsed. If deltaTime is
|
||||
less than zero, the time is interpreted as absolute time and the
|
||||
output device is queried as to what time it is now. That is used
|
||||
to form a deltaTime, and if it's positive we synthesize. If it's
|
||||
negative, we print an error, pretend this never happened and we
|
||||
hang around hoping to eventually catch up.
|
||||
|
||||
The rest of the code sorts out message types NoteOn, NoteOff
|
||||
(including NoteOn with velocity 0), and ControlChange. The
|
||||
code implicitly takes into account the integer type of the
|
||||
control number, but all other data is treated as double float.
|
||||
|
||||
The last line reads and parses the next message in the file.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = STK
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_NUMBER = 4.2.0
|
||||
OUTPUT_DIRECTORY = .
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
@@ -18,10 +18,10 @@ STRIP_FROM_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
DETAILS_AT_TOP = YES
|
||||
INHERIT_DOCS = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 8
|
||||
TAB_SIZE = 9
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
@@ -67,13 +67,13 @@ WARN_LOGFILE =
|
||||
INPUT = . \
|
||||
../../include
|
||||
FILE_PATTERNS = *.txt \
|
||||
*.h \
|
||||
*.cpp
|
||||
*.msg \
|
||||
*.h
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = ../../src/asio
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATH = ../../projects/examples
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
@@ -83,7 +83,7 @@ FILTER_SOURCE_FILES = NO
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = NO
|
||||
INLINE_SOURCES = YES
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
@@ -117,7 +117,7 @@ TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = YES
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
@@ -5,7 +5,7 @@ The Synthesis ToolKit can be used in a variety of ways, depending on your partic
|
||||
|
||||
\section rtvsnonrt "Realtime" vs. "Non-Realtime"
|
||||
|
||||
Most of the Synthesis ToolKit classes are platform independent. That means that they should compile on any reasonably current C++ compiler. The functionality needed for realtime audio and MIDI input/output, as well as realtime control message acquistion, is inherently platform and operating-system (OS) <I>dependent</I>. STK classes which require specific platform/OS support include RtAudio, RtWvOut, RtWvIn, RtDuplex, RtMidi, TcpWvIn, TcpWvOut, Socket, and Thread. These classes currently can only be compiled on Linux, Irix, Macintosh OS X, and Windows systems using the <TT>__LINUX_OSS__</TT>, <TT>__LINUX_ALSA__</TT>, <TT>__IRIX_AL__</TT>, <TT>__MACOSX_CORE__</TT>, <TT>__WINDOWS_DS__</TT>, or <TT>__WINDOWS_ASIO__</TT> preprocessor definitions.
|
||||
Most of the Synthesis ToolKit classes are platform independent. That means that they should compile on any reasonably current C++ compiler. The functionality needed for realtime audio and MIDI input/output, as well as realtime control message acquistion, is inherently platform and operating-system (OS) <I>dependent</I>. STK classes which require specific platform/OS support include RtAudio, RtWvOut, RtWvIn, RtDuplex, RtMidi, TcpWvIn, TcpWvOut, Socket, Thread, and Mutex. These classes currently can only be compiled on Linux, Irix, Macintosh OS X, and Windows systems.
|
||||
|
||||
Without the "realtime" classes, it is still possible to read SKINI scorefiles for control input and to read and write to/from a variety of audio file formats (WAV, SND, AIFF, MAT-file, and RAW). If compiling for a "little-endian" host processor, the <TT>__LITTLE_ENDIAN__</TT> preprocessor definition should be provided.
|
||||
|
||||
@@ -25,25 +25,25 @@ STK compiles with realtime support on the following flavors of the Unix operatin
|
||||
<TR>
|
||||
<TD>Linux</TD>
|
||||
<TD>ALSA</TD>
|
||||
<TD>__LINUX_ALSA__, __LITTLE_ENDIAN__</TD>
|
||||
<TD>__LINUX_ALSA__, __LINUX_ALSASEQ__, __LITTLE_ENDIAN__</TD>
|
||||
<TD><TT>asound, pthread</TT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Linux</TD>
|
||||
<TD>OSS</TD>
|
||||
<TD>__LINUX_OSS__, __LITTLE_ENDIAN__</TD>
|
||||
<TD><TT>pthread</TT></TD>
|
||||
<TD>OSS (audio only, use ALSA for MIDI support)</TD>
|
||||
<TD>__LINUX_OSS__, __LINUX_ALSASEQ__, __LITTLE_ENDIAN__</TD>
|
||||
<TD><TT>asound, pthread</TT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Macintosh OS X</TD>
|
||||
<TD>CoreAudio</TD>
|
||||
<TD>__MACOSX_CORE__</TD>
|
||||
<TD><TT>pthread, stdc++, CoreAudio, CoreMIDI, CoreFoundation</TT></TD>
|
||||
<TD><TT>pthread, CoreAudio, CoreMIDI, CoreFoundation</TT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Irix</TD>
|
||||
<TD>AL</TD>
|
||||
<TD>__IRIX_AL__</TD>
|
||||
<TD>__IRIX_AL__, __IRIX_MD__</TD>
|
||||
<TD><TT>audio, pthread</TT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
@@ -51,21 +51,21 @@ STK compiles with realtime support on the following flavors of the Unix operatin
|
||||
|
||||
The available C++ compilers on any of these systems can vary.
|
||||
|
||||
One approach in using STK is to simply copy the class files needed for a particular program into a project directory. Taking the <TT>sineosc.cpp</TT> example from the previous tutorial chapter, it would be necessary to set up a directory that includes the files <TT>sineosc.cpp</TT>, the rawwave file <TT>sinewave.raw</TT> in a subdirectory called <TT>rawwaves</TT>, and the header and source files for the classes Stk, WvIn, WaveLoop, and WvOut. The program could then be compiled on a Linux system using the GNU g++ compiler as follows:
|
||||
One approach in using STK is to simply copy the class files needed for a particular program into a project directory. Taking the <TT>sineosc.cpp</TT> example from the previous tutorial chapter, it would be necessary to set up a directory that includes the files <TT>sineosc.cpp</TT>, the rawwave file <TT>sinewave.raw</TT> in a subdirectory called <TT>rawwaves</TT>, and the header and source files for the classes Stk, WvIn, WaveLoop, and WvOut. The program could then be compiled on a little-endian system, such as a PC running Linux, using the GNU g++ compiler as follows:
|
||||
\code
|
||||
g++ -Wall -D__LITTLE_ENDIAN__ -o sineosc Stk.cpp WvIn.cpp WaveLoop.cpp WvOut.cpp sineosc.cpp
|
||||
\endcode
|
||||
|
||||
Note that the <TT>sineosc.cpp</TT> example does not make use of realtime audio or MIDI input/output classes. For programs using any of the STK realtime classes mentioned above, it is necessary to specify an audio/MIDI API preprocessor definition and link with the appropriate libraries or frameworks.
|
||||
|
||||
When working with a number of different projects that make use of ToolKit classes, the above approach can become cumbersome (especially when trying to synchronize with new STK releases). Most of the STK projects (e.g., demo, effects, ...) contain <TT>Makefiles</TT> (built by the configure script) which compile project-specific class objects from the distribution <TT>src</TT> and <TT>include</TT> directories. This approach makes it relatively easy when upgrading to a new STK release (by making path substitutions in the <TT>Makefile</TT> or by moving the projects to a similar relative path within the new STK source tree). A <TT>Makefile</TT> is provided in the <TT>projects/examples</TT> directory for compiling all the tutorial programs, as well as other example programs. To compile the <TT>sineosc.cpp</TT> program, for example, one need only type <TT>make sineosc</TT> from within the <TT>projects/examples</TT> directory. Note that this particular <TT>Makefile</TT> depends on a static library, as described in the next section.
|
||||
When working with a number of different projects that make use of ToolKit classes, the above approach can become cumbersome (especially when trying to synchronize with new STK releases). Most of the STK projects (e.g., demo, effects, ...) contain <TT>Makefiles</TT> (built by the configure script) which compile project-specific class objects from the distribution <TT>src</TT> and <TT>include</TT> directories. This approach makes it relatively easy when upgrading to a new STK release (by making path substitutions in the <TT>Makefile</TT> or by moving the projects to a similar relative path within the new STK source tree). A <TT>Makefile</TT> is provided in the <TT>projects/examples</TT> directory for compiling all the tutorial programs, as well as other example programs. To compile the <TT>sineosc.cpp</TT> program, for example, one need only type <TT>make sineosc</TT> from within the <TT>projects/examples</TT> directory.
|
||||
|
||||
|
||||
\subsection library Library Use:
|
||||
|
||||
The STK distribution provides a <TT>Makefile</TT> that can be used on Unix systems to build a static library. After unpacking the distribution (<TT>tar -xzf stk-4.x.tar.gz</TT>), run the configure script by typing <TT>./configure</TT> from the top level distribution directory (see the INSTALL file in the same directory for more information). Then from within the <TT>src</TT> directory, type <TT>make</TT>. After a successful build, you may wish to move the library (<TT>libstk.a</TT>) and the contents of the <TT>include</TT> directory to standard library and include search paths on your system. For example, the linux RPM distribution of STK puts the library in <TT>/usr/lib/</TT> and the STK header files in <TT>/usr/include/stk/</TT>.
|
||||
The STK distribution provides a <TT>Makefile</TT> that can be used on Unix systems to build a static library. After unpacking the distribution (<TT>tar -xzf stk-4.x.x.tar.gz</TT>), run the configure script by typing <TT>./configure</TT> from the top level distribution directory (see the INSTALL file in the same directory for more information). Then from within the <TT>src</TT> directory, type <TT>make</TT>. After a successful build, you may wish to move the library (<TT>libstk.a</TT>) and the contents of the <TT>include</TT> directory to standard library and include search paths on your system. For example, the linux RPM distribution of STK puts the library in <TT>/usr/lib/</TT> and the STK header files in <TT>/usr/include/stk/</TT>.
|
||||
|
||||
Assuming the library is located in a standard search path and the header files are located in <TT>/usr/include/stk/</TT>, the <TT>sineosc.cpp</TT> example from the previous tutorial chapter can be compiled on a Linux system using the GNU g++ compiler as follows:
|
||||
Assuming the library is located in a standard search path and the header files are located in <TT>/usr/include/stk/</TT>, the <TT>sineosc.cpp</TT> example from the previous tutorial chapter can be compiled on a little-endian system using the GNU g++ compiler as follows:
|
||||
|
||||
\code
|
||||
g++ -Wall -D__LITTLE_ENDIAN__ -I/usr/include/stk -o sineosc sineosc.cpp -lstk
|
||||
@@ -91,9 +91,9 @@ STK has been tested on Windows platforms using the Visual C++ compiler only. It
|
||||
|
||||
The approach when using Visual C++ is to build a project which includes the necessary ToolKit files from the distribution <TT>src</TT> and <TT>include</TT> directories. For the example program from the previous tutorial chapter, create a VC++ console application project, add the Stk, WvIn, WaveLoop, and WvOut class files, as well as <TT>sineosc.cpp</TT>, and make sure the <TT>sinewave.raw</TT> file is in the subdirectory <TT>rawwaves</TT>.
|
||||
|
||||
For programs using any of the STK realtime classes mentioned above, it is necessary to link with the DirectSound (<TT>dsound.lib</TT>), <TT>winmm.lib</TT>, and <TT>Wsock32.lib</TT> libraries, select the multithreaded library, and provide the <TT>__LITTLE_ENDIAN__</TT> and <TT>__WINDOWS_DS__</TT> preprocessor definitions.
|
||||
For programs using any of the STK realtime classes mentioned above, it is necessary to link with the DirectSound (<TT>dsound.lib</TT>), <TT>winmm.lib</TT>, and <TT>Wsock32.lib</TT> libraries, select the multithreaded library, and provide the <TT>__LITTLE_ENDIAN__</TT>, <TT>__WINDOWS_DS__</TT>, and <TT>__WINDOWS_MM__</TT> preprocessor definitions.
|
||||
|
||||
For Steinberg ASIO support, use the <TT>__WINDOWS_ASIO__</TT> preprocessor definition, include all the files in the <TT>src/asio/</TT> directory (i.e., <TT>asio.h,cpp</TT>, <TT>asiodrivers.h,cpp</TT>, ...), and link with the <TT>winmm.lib</TT>, and <TT>Wsock32.lib</TT> libraries.
|
||||
For Steinberg ASIO support, use the <TT>__WINDOWS_ASIO__</TT> preprocessor definition (and the <TT>__WINDOWS_MM__</TT> definition for RtMidi support), include all the files in the <TT>src/asio/</TT> directory (i.e., <TT>asio.h,cpp</TT>, <TT>asiodrivers.h,cpp</TT>, ...), and link with the <TT>winmm.lib</TT>, and <TT>Wsock32.lib</TT> libraries.
|
||||
|
||||
[<A HREF="realtime.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
[<A HREF="filtering.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
*/
|
||||
|
||||
@@ -17,114 +17,27 @@ StringDetune 0.100000 2 12.0
|
||||
NoteOff 1.000000 2 69.0 64.0
|
||||
\endcode
|
||||
|
||||
MIDI messages (with the exception of Sysex) are easily represented within the SKINI protocol.
|
||||
MIDI messages are easily represented within the SKINI protocol.
|
||||
|
||||
The class Messager can be used to acquire and parse MIDI messages from a MIDI device and SKINI messages from STDIN and socket connections. Many of the example programs included with the ToolKit distribution use a Messager instance to accept control input from the accompanying tcl/tk graphical user interfaces, from external MIDI devices, or from SKINI scorefiles.
|
||||
The class Messager can be used to acquire and parse MIDI messages from a MIDI device and SKINI messages from STDIN and socket connections. Incoming messages are acquired asynchronously and saved to an internal message queue of Skini::Message types (MIDI messages are converted to the Skini:Message format). The user then uses the Messager:popMessage() function to retrieve incoming control messages. This function does not block, instead returning a message type of zero when no more messages are in the queue. Many of the example programs included with the ToolKit distribution use a Messager instance to accept control input from the accompanying tcl/tk graphical user interfaces, from external MIDI devices, or from SKINI scorefiles.
|
||||
|
||||
In the following example, we'll modify the <TT>bethree.cpp</TT> program from the previous tutorial chapter and incorporate a Messager class to allow control via a SKINI scorefile.
|
||||
In the following example, we'll modify the <TT>bethree.cpp</TT> program from the previous tutorial chapter and incorporate a Messager class to allow control via SKINI messages read from a SKINI file.
|
||||
|
||||
\include controlbee.cpp
|
||||
|
||||
A realtime control message will usually have a delta time of zero, in which case it is processed as soon as possible. Non-realtime messages, normally from a scorefile, will usually have non-zero delta times. The scheme used in this example is designed to work for both scorefile and realtime input types. When no message is available from the queue, the instrument is "ticked" for DELTA_CONTROL_TICKS and then the queue is checked again. The value of DELTA_CONTROL_TICKS roughly defines the program "control rate" in a realtime context, though multiple available messages in the queue are processed in immediate succession when their delta time values are zero.
|
||||
|
||||
The \c processMessage() function centralizes the handling of control messages. Other control update schemes can be implemented, perhaps using a separate thread or in the \c main() function, and this function should work in any context.
|
||||
|
||||
Assuming the program is compiled as <TT>controlbee</TT> and the SKINI scorefile <A HREF="tutorial/bookert.ski"><TT>bookert.ski</TT></A> is in the <TT>scores</TT> directory, the program can be run as:
|
||||
|
||||
\code
|
||||
// controlbee.cpp
|
||||
|
||||
#include "BeeThree.h"
|
||||
#include "RtWvOut.h"
|
||||
#include "Messager.h"
|
||||
#include "SKINI.msg"
|
||||
#include <math.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set the global sample rate before creating class instances.
|
||||
Stk::setSampleRate( 44100.0 );
|
||||
|
||||
Instrmnt *instrument = 0;
|
||||
RtWvOut *output = 0;
|
||||
Messager *messager = 0;
|
||||
bool done = FALSE;
|
||||
|
||||
try {
|
||||
// Define and load the BeeThree instrument
|
||||
instrument = new BeeThree();
|
||||
|
||||
// Define and open the default realtime output device for one-channel playback
|
||||
output = new RtWvOut(1);
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
try {
|
||||
// Create a Messager instance to read from a redirected SKINI scorefile.
|
||||
messager = new Messager();
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
// Play the instrument until the end of the scorefile.
|
||||
int i, nTicks, type;
|
||||
MY_FLOAT byte2, byte3, frequency;
|
||||
while (!done) {
|
||||
|
||||
// Look for new messages and return a delta time (in samples).
|
||||
type = messager->nextMessage();
|
||||
if (type < 0)
|
||||
done = TRUE;
|
||||
|
||||
nTicks = messager->getDelta();
|
||||
try {
|
||||
for ( i=0; i<nTicks; i++ )
|
||||
output->tick( instrument->tick() );
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ( type > 0 ) {
|
||||
// Process the new control message.
|
||||
byte2 = messager->getByteTwo();
|
||||
byte3 = messager->getByteThree();
|
||||
|
||||
switch(type) {
|
||||
|
||||
case __SK_NoteOn_:
|
||||
frequency = (MY_FLOAT) 220.0 * pow( 2.0, (byte2 - 57.0) / 12.0 );
|
||||
instrument->noteOn( frequency, byte3 * ONE_OVER_128 );
|
||||
break;
|
||||
|
||||
case __SK_NoteOff_:
|
||||
instrument->noteOff( byte3 * ONE_OVER_128 );
|
||||
break;
|
||||
|
||||
case __SK_ControlChange_:
|
||||
instrument->controlChange( (int) byte2, byte3 );
|
||||
break;
|
||||
|
||||
case __SK_AfterTouch_:
|
||||
instrument->controlChange( 128, byte2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
delete instrument;
|
||||
delete output;
|
||||
delete messager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
Assuming the program is compiled as <TT>controlbee</TT> and the SKINI scorefile <A HREF="tutorial/bookert.ski"><TT>bookert.ski</TT></A> is in the <TT>scores</TT> directory, the scorefile could be redirected to the program as:
|
||||
|
||||
\code
|
||||
controlbee < scores/bookert.ski
|
||||
controlbee scores/bookert.ski
|
||||
\endcode
|
||||
|
||||
Only a few basic SKINI message type case statements are included in this example. It is easy to extend the program to support a much more elaborate set of instrument control parameters.
|
||||
|
||||
This example could also be easily extended to accept "realtime" control input messages via STDIN, socket, or MIDI connections. The Messager class constructor takes an optional argument consisting of a bitmask of the following options: <TT>STK_PIPE</TT>, <TT>STK_SOCKET</TT>, and/or <TT>STK_MIDI</TT>.
|
||||
This example could also be easily extended to accept "realtime" control input messages via pipe, socket or MIDI connections. The Messager class provides Messager::startStdInput(), Messager::startSocketInput(), and Messager::startMidiInput() functions for this purpose.
|
||||
|
||||
[<A HREF="multichannel.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
*/
|
||||
|
||||
26
doc/doxygen/crealtime.txt
Normal file
26
doc/doxygen/crealtime.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
/*! \page crealtime Realtime Audio (callback)
|
||||
|
||||
The previous section described the use of the RtWvOut class for realtime audio output. The RtWvOut::tick() function periodically pauses program execution in order to send a buffer of audio data to the computer's audio hardware (referred to as blocking functionality). These pauses will effectively limit a program's computations to the correct number of samples per second, which is defined by the sample rate of the hardware.
|
||||
|
||||
An alternative scheme for audio input/output is to define a specific function in which audio computations are performed and to let the audio system call this function when more input/output data can be accepted by the hardware (referred to as a callback scheme). In this section, we show how the previous <TT>rtsine.cpp</TT> program can be modified to work in a callback scenario. There is no "single-sample" interface for this functionality. The callback function will be invoked automatically by the audio system controller (RtAudio) when new data is needed and it is necessary to compute a full audio buffer of samples at that time (see \ref callback for further information).
|
||||
|
||||
\include crtsine.cpp
|
||||
|
||||
The sinusoidal oscillator is created as before. The instantiation of RtAudio requires quite a few more parameters, including output/input device and channel specifiers, the data format, and the desired buffer length (in frames). In this example, we request a single output channel using the default output device, zero channels of input, the RtAudio data format which corresponds to an <tt>StkFloat</tt>, and the RT_BUFFER_SIZE defined in Stk.h. The last argument is an API-dependent buffering parameter (see RtAudio for further information).
|
||||
|
||||
After the digital-to-analog converter (dac) and oscillator are successfully created, it is necessary to provide the audio system controller with a pointer to our callback function. The RtAudio::setStreamCallback() function takes a pointer to the callback function and an optional pointer to data that will be made available in the callback. In this example, we need to pass only the pointer to the oscillator. In more complex programs, it is typically necessary to put all shared data in a <tt>struct</tt> (see the next tutorial program for an example) or make use of global variables.
|
||||
|
||||
Our callback routine is the \c tick() function. %Function arguments include a pointer to the audio data buffer, the buffer size (in frames), and the data pointer passed to the RtAudio::setStreamCallback() function (if it exists). It is necessary to cast these pointers to their corresponding data types before use. Our tick() routine simply "ticks" the oscillator for \c bufferSize counts and writes the result into the audio data buffer before returning.
|
||||
|
||||
The \c main() function blocks at the std::cin.get() call until the user hits the "enter" key, after which the audio controller is shut down and program execution ends.
|
||||
|
||||
\section callback Blocking vs. Callbacks
|
||||
|
||||
Prior to version 4.2.0, all STK example projects and programs used blocking audio input/output functionality (typically with the RtWvIn, RtWvOut, or RtDuplex classes). In many instances, a blocking scheme results in a clearer and more straight forward program structure. Within a graphical user interface (GUI) programming context, however, callback routines are often more natural.
|
||||
|
||||
The RtAudio class provides both blocking and callback routines for all supported audio APIs. It should be noted that it is easy to embed blocking calls within a thread to create "callback-like" functionality. In fact, this is what RtAudio does for those audio APIs which are naturally based on blocking routines (Linux ALSA and OSS, SGI Irix, and Windows DirectSound). It is much more difficult to make an inherently callback-based system work like a blocking scheme. RtAudio attempts to do this with the Linux JACK, Macintosh OS-X CoreAudio, and Windows ASIO APIs, but the result is not fully robust (audio over/underruns are more likely to occur).
|
||||
|
||||
In order to allow all STK programs to function with equal proficiency on all supported computer platforms, a decision was made to modify the example projects to use audio callback routines. The result is a more complicated code structure, which is unfortunate given that we generally strive to make STK code as clear as possible for educational purposes. This was especially an issue with the demo program because it is designed to function in both realtime and non-realtime contexts. The use of global variables has been avoided by defining data structures to hold all variables which must be accessible to the callback routine and other functions. Alternative schemes for making control updates could be designed depending on particular program needs and constraints.
|
||||
|
||||
[<A HREF="instruments.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
*/
|
||||
@@ -1,15 +1,45 @@
|
||||
/*! \page download Download and Release Notes
|
||||
|
||||
<B>Version 4.1.2, 15 March 2004</B><P>
|
||||
<B>Version 4.2.0, 4 October 2004</B><P>
|
||||
<UL>
|
||||
<LI><A HREF="http://www-ccrma.stanford.edu/software/stk/release/stk-4.1.2.tar.gz">Source distribution</A></LI>
|
||||
<LI><A HREF="http://www-ccrma.stanford.edu/software/stk/release/stk-4.1.2.binaries.tar.gz">Source with precompiled Windows binaries</A></LI>
|
||||
<LI><A HREF="http://www-ccrma.stanford.edu/software/stk/release/stk-4.2.0.tar.gz">Source distribution</A></LI>
|
||||
<LI><A HREF="http://www-ccrma.stanford.edu/software/stk/release/stk-4.2.0.binaries.tar.gz">Source with precompiled Windows binaries</A></LI>
|
||||
<LI><A HREF="http://www-ccrma.stanford.edu/planetccrma/software/">Linux RPMs from Planet CCRMA</A></LI>
|
||||
</UL>
|
||||
|
||||
|
||||
\section notes Release Notes:
|
||||
|
||||
\subsection v4dot2dot0 Version 4.2.0
|
||||
|
||||
<ul>
|
||||
<li>Simultaneous multiple audio APIs supported at compile time.</li>
|
||||
<li>Various changes to better conform to standard C++ programming practices.</li>
|
||||
<li>Fixed hidden overloaded virtual functions.</li>
|
||||
<li>New Asymp exponential envelope class.</li>
|
||||
<li><tt>MY_FLOAT</tt> type converted to <tt>StkFloat</tt> and changed throughout (use \c treesed utility to search/replace in old files).</li>
|
||||
<li>Most example programs rewritten to use an audio callback paradigm (which works better in OS-X).</li>
|
||||
<li>New StkFrames class for vectorized multichannel data and associated new tick() functions making use of StkFrames.</li>
|
||||
<li>New RtMidi class with MIDI output capabilities (API changes).</li>
|
||||
<li>New MidiFileIn class for reading MIDI files.</li>
|
||||
<li>Revised Filter classes to use std::vectors for coefficients (API changes).</li>
|
||||
<li>Revised Messager class (API changes).</li>
|
||||
<li>New abstract parent Effect class for various effects.</li>
|
||||
<li>New abstract parent Generator class for various signal sources.</li>
|
||||
<li>New abstract parent Function class for tables and various non-linear functions.</li>
|
||||
<li>Skini class completely rewritten (simplified) using the C++ STL (API changes).</li>
|
||||
<li>WvOut classes now clip to -1.0 to +1.0 and report out of range.</li>
|
||||
<li>New Mutex class.</li>
|
||||
<li>Turned Nagle algorithm off by default in Socket class.</li>
|
||||
<li>Error reporting standardized in all classes.</li>
|
||||
</ul>
|
||||
|
||||
\subsection v4dot1dot3 Version 4.1.3
|
||||
|
||||
<ul>
|
||||
<li>Bug fix in RtAudio for Windows DirectSound output only support</li>
|
||||
</ul>
|
||||
|
||||
\subsection v4dot1dot2 Version 4.1.2
|
||||
|
||||
<UL>
|
||||
@@ -24,7 +54,7 @@
|
||||
<li>Update to the contentsAt() method of Delay class.</li>
|
||||
<li>WAV file fixes (8-bit) in WvIn and WvOut classes.</li>
|
||||
<li>Configure script changes.</li>
|
||||
<li>Updated <iostream> include statements and appended "std::" as necessary throughout for compatibility with gcc 3.</li>
|
||||
<li>Updated \<iostream\> include statements and appended "std::" as necessary throughout for compatibility with gcc 3.</li>
|
||||
</UL>
|
||||
|
||||
\subsection v4dot1dot1 Version 4.1.1
|
||||
@@ -132,7 +162,7 @@
|
||||
<LI>Added RawWvOut class.</LI>
|
||||
<LI>New WvIn class with RawWvIn, SndWvIn, WavWvIn, MatWvIn, and RTWvIn subclasses.</LI>
|
||||
<LI>Removed RawWave, RawShot, RawInterp, and RawLoop classes (supplanted by RawWvIn).</LI>
|
||||
<LI>Multi-channel data support in WvIn and WvOut classes using MY_MULTI data type (pointer to MY_FLOAT) and the methods mtick() and mlastOutput().</LI>
|
||||
<LI>Multi-channel data support in WvIn and WvOut classes using MY_MULTI data type (pointer to StkFloat) and the methods mtick() and mlastOutput().</LI>
|
||||
<LI>Now writing to primary buffer under Windoze when allowed by hardware.</LI>
|
||||
<LI>Cleaned up Object.h a bit.</LI>
|
||||
<LI>Pulled various utility and thread functions out of syntmono.cpp (to aid readability of the code).</LI>
|
||||
@@ -154,11 +184,11 @@
|
||||
<UL>
|
||||
<LI>Unification of the capabilities of STK across the various platforms. All of the previous SGI functionality has been ported to Linux and Windows, including realtime sound output and MIDI input.</LI>
|
||||
<LI>MIDI input (with optional time-stamping) supported on SGI, Linux (OSS device drivers only), and Windows operating systems. Time stamping under IRIX and Windows is quantized to milliseconds and under Linux to hundredths of a second.</LI>
|
||||
<LI>Various Sound Output Options - .wav, .snd, and .mat (Matlab MAT-file) soundfile outputs are supported on all operating systems. I hacked out the MAT-file structure, so you don't have to include any platform-specific libraries. Realtime sound output is provided as well, except under NeXTStep. </LI>
|
||||
<LI>Various Sound Output Options - .wav, .snd, and .mat (Matlab MAT-file) soundfile outputs are supported on all operating systems. I hacked out the MAT-file structure, so you don't have to include any platform-specific libraries. Realtime sound output is provided as well, except under NeXTStep.</LI>
|
||||
<LI>Multiple Reverberator Implementations - Reverb subclasses of JCRev and NRev (popular reverberator implementations from CCRMA) have been written. Perry's original reverb implementation still exists as PRCRev. All reverberators now take a T60 initializer argument.</LI>
|
||||
<LI>MD2SKINI - A program which parses a MIDI input stream and spits out SKINI code. The output of MD2SKINI is typically piped into an STK instrument executable (eg. <FONT FACE="Geneva">MD2SKINI | syntmono Clarinet -r -i</FONT>). In addition, you can supply a filename argument to MD2SKINI and have it simultaneously record a SKINI score file for future reuse.
|
||||
<LI>Modifications to <I>Object.h</I> for OS_TYPE compilation dependencies. <I>Makefile</I> automatically determines OS_TYPE when invoked (if you have the GNU makefile utilities installed on your system).
|
||||
<LI>A single distribution for all platforms. The Unix and Windows versions have been merged into a single set of classes. Makefiles and Visual C++ workspace/project files are provided for compiling.
|
||||
<LI>MD2SKINI - A program which parses a MIDI input stream and spits out SKINI code. The output of MD2SKINI is typically piped into an STK instrument executable (eg. <tt>MD2SKINI | syntmono Clarinet -r -i</tt>). In addition, you can supply a filename argument to MD2SKINI and have it simultaneously record a SKINI score file for future reuse.</LI>
|
||||
<LI>Modifications to <I>Object.h</I> for OS_TYPE compilation dependencies. <I>Makefile</I> automatically determines OS_TYPE when invoked (if you have the GNU makefile utilities installed on your system).</LI>
|
||||
<LI>A single distribution for all platforms. The Unix and Windows versions have been merged into a single set of classes. Makefiles and Visual C++ workspace/project files are provided for compiling.</LI>
|
||||
</UL>
|
||||
|
||||
*/
|
||||
|
||||
88
doc/doxygen/filtering.txt
Normal file
88
doc/doxygen/filtering.txt
Normal file
@@ -0,0 +1,88 @@
|
||||
/*! \page filtering Using Filters
|
||||
|
||||
In this section, we demonstrate the use of a few of the STK filter classes. The Filter class provides functionality to implement a generalized digital filter of any type, similar to the \c filter function in Matlab. In this example, we create a Filter instance and initialize it with specific numerator and denominator coefficients. We then compute its impulse response for 20 samples.
|
||||
|
||||
\code
|
||||
#include "Filter.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
StkFrames output( 20 ); // initialize StkFrames to 20 elements (defaults: 1 channel, interleaved)
|
||||
output[0] = 1.0;
|
||||
|
||||
std::vector<StkFloat> numerator( 5, 0.1 ); // create and initialize numerator coefficients
|
||||
std::vector<StkFloat> denominator; // create empty denominator coefficients
|
||||
denominator.push_back( 1.0 ); // populate our denomintor values
|
||||
denominator.push_back( 0.3 );
|
||||
denominator.push_back( -0.5 );
|
||||
|
||||
Filter filter( numerator, denominator );
|
||||
|
||||
filter.tick( output );
|
||||
for ( unsigned int i=0; i<output.size(); i++ ) {
|
||||
std::cout << "i = " << i << " : output = " << output[i] << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
The Filter class implements the standard difference equation
|
||||
\code
|
||||
a[0]*y[n] = b[0]*x[n] + ... + b[nb]*x[n-nb] - a[1]*y[n-1] - ... - a[na]*y[n-na],
|
||||
\endcode
|
||||
|
||||
where "b" values are numerator coefficients and "a" values are denominator coefficients. Note that if the first denominator coefficient is not 1.0, the Filter class automatically normalizes all filter coefficients by that value. The coefficient values are passed to the Filter class via a C++ <a href="http://www.roguewave.com/support/docs/sourcepro/stdlibref/vector.html">vector</a>, a container object provided by the C++ Standard Library.
|
||||
|
||||
Most STK classes use more specific types of digital filters, such as the OneZero, OnePole, TwoPole, or BiQuad varieties. These classes inherit from the Filter class and provide specific functionality particular to their use, as well as functions to independently control individual coefficient values.
|
||||
|
||||
\section reson Resonances:
|
||||
|
||||
The STK BiQuad and TwoPole classes provide functionality for creating resonance filters. The following example demonstrates how to create a resonance centered at 440 Hz that is used to filter the output of a Noise generator.
|
||||
|
||||
\code
|
||||
#include "BiQuad.h"
|
||||
#include "Noise.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
StkFrames output( 20 ); // initialize StkFrames to 20 elements (defaults: 1 channel, interleaved)
|
||||
Noise noise;
|
||||
|
||||
BiQuad biquad;
|
||||
biquad.setResonance( 440.0, 0.98, true ); // automatically normalize for unity peak gain
|
||||
|
||||
for ( unsigned int i=0; i<output.size(); i++ ) {
|
||||
output[i] = biquad.tick( noise.tick() ); // single-sample computations
|
||||
std::cout << "i = " << i << " : output = " << output[i] << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
By passing a boolian value of \c true as the third argument to the BiQuad::setResonance() function, the filter coefficients are automatically scaled to achieve unity gain at the resonance peak frequency. The previous code could be easily modified for "vector-based" calculations:
|
||||
|
||||
\code
|
||||
#include "BiQuad.h"
|
||||
#include "Noise.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
StkFrames output( 20 ); // initialize StkFrames to 20 elements (defaults: 1 channel, interleaved)
|
||||
Noise noise;
|
||||
|
||||
BiQuad biquad;
|
||||
biquad.setResonance( 440.0, 0.98, true ); // automatically normalize for unity peak gain
|
||||
|
||||
biquad.tick( noise.tick( output ) ); // vector-based computations
|
||||
for ( unsigned int i=0; i<output.size(); i++ ) {
|
||||
std::cout << "i = " << i << " : output = " << output[i] << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
[<A HREF="realtime.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
*/
|
||||
@@ -1,7 +1,7 @@
|
||||
<HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
63
doc/doxygen/fundamentals.txt
Normal file
63
doc/doxygen/fundamentals.txt
Normal file
@@ -0,0 +1,63 @@
|
||||
/*! \page fundamentals STK Fundamentals
|
||||
|
||||
The Synthesis ToolKit is implemented in the C++ programming language. STK does not attempt to provide a new programming environment or paradigm but rather provides a set of objects which can be used within a normal C++ programming framework. Therefore, it is expected that users of STK will have some familiarity with C/C++ programming concepts. That said, the STK classes do have some particular idiosyncrasies that we will mention here.
|
||||
|
||||
\section Signal Computations:
|
||||
|
||||
Audio and control signals throughout STK use a floating-point data type, <tt>StkFloat</tt>, the exact precision of which can be controlled via a typedef statement in Stk.h. By default, an StkFloat is a double-precision floating-point value. Thus, the ToolKit can use any normalization scheme desired. The base instruments and algorithms are implemented with a general audio sample dynamic maximum of +/-1.0.
|
||||
|
||||
In general, the computation and/or passing of values is performed on a "single-sample" basis. For example, the Noise class outputs random floating-point numbers in the range +/-1.0. The computation of such values occurs in the Noise::tick() function. The following program will generate 20 random floating-point (<tt>StkFloat</tt>) values in the range -1.0 to +1.0:
|
||||
|
||||
\code
|
||||
#include "Noise.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
StkFloat output;
|
||||
Noise noise;
|
||||
|
||||
for ( unsigned int i=0; i<20; i++ ) {
|
||||
output = noise.tick();
|
||||
std::cout << "i = " << i << " : output = " << output << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
Nearly all STK classes implement <TT>tick()</TT> functions which take and/or return sample values. Within the <TT>tick()</TT> function, the fundamental sample calculations are performed for a given class. Most STK classes consume/generate a single sample per operation and their <TT>tick()</TT> method takes/returns each sample "by value". In addition, every class implementing a <TT>tick()</TT> function also provides one or more overloaded <TT>tick()</TT> functions which can be used for vectorized computations, as shown in the next example.
|
||||
|
||||
\code
|
||||
#include "Noise.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
StkFrames output(20); // initialize StkFrames to 20 elements (defaults: 1 channel, interleaved)
|
||||
Noise noise;
|
||||
|
||||
noise.tick( output );
|
||||
for ( unsigned int i=0; i<output.size(); i++ ) {
|
||||
std::cout << "i = " << i << " : output = " << output[i] << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
In this way, it might be possible to achieve improved processing efficiency using vectorized computations. The StkFrames class is a new addition to the ToolKit to provide a general "mechanism" for handling and passing vectorized, multi-channel audio data. The StkFrames "type" provides functions to set and/or determine the number of audio channels and sample frames it holds, as well as the format (interleaved or non-interleaved) of its data.
|
||||
|
||||
\section STK Inheritance:
|
||||
|
||||
Nearly all STK classes inherit from the Stk abstract base class, which provides common functionality related to error reporting, sample rate control, and byte swapping. Several other base classes exist which roughly group many of the classes according to function as follows:
|
||||
|
||||
- Generator: source signal unit generator classes [Envelope, ADSR, Asymp, Noise, SubNoise, Modulate, SingWave]
|
||||
- Filter: digital filtering classes [OneZero, OnePole, PoleZero, TwoZero, TwoPole, BiQuad, FormSwep, Delay, DelayL, DelayA]
|
||||
- Function: input to output function mappings [Table, BowTable, JetTable, ReedTable]
|
||||
- Instrmnt: sound synthesis algorithms, including physical, FM, modal, and particle models
|
||||
- Effect: sound processing effect classes [Echo, Chorus, PitShift, PRCRev, JCRev, NRev]
|
||||
- WvOut: audio file and streaming output classes [RtWvOut, TcpWvOut]
|
||||
- WvIn: audio file and streaming input classes [WaveLoop, RtWvIn, TcpWvIn]
|
||||
|
||||
|
||||
[<A HREF="hello.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
*/
|
||||
@@ -1,6 +1,6 @@
|
||||
/*! \page hello Hello Sine!
|
||||
|
||||
We'll begin our introduction to the Synthesis ToolKit with a simple sine-wave oscillator program. STK does not provide a specific oscillator for sine waves. Instead, it provides a generic waveform oscillator class, WaveLoop, which can load a variety of common file types. In this example, we load a sine "table" from an STK RAW file (defined as monophonic, 16-bit, big-endian data). We use the class WvOut to write the result to a 16-bit, WAV formatted audio file.
|
||||
We'll continue our introduction to the Synthesis ToolKit with a simple sine-wave oscillator program. STK does not provide a specific oscillator for sine waves. Instead, it provides a generic waveform oscillator class, WaveLoop, which can load a variety of common file types. In this example, we load a sine "table" from an STK RAW file (defined as monophonic, 16-bit, big-endian data). We use the class WvOut to write the result to a 16-bit, WAV formatted audio file.
|
||||
|
||||
\code
|
||||
|
||||
@@ -15,11 +15,11 @@ int main()
|
||||
Stk::setSampleRate( 44100.0 );
|
||||
|
||||
// Define and load the sine wave file
|
||||
WaveLoop *input = new WaveLoop( "rawwaves/sinewave.raw", TRUE );
|
||||
WaveLoop* input = new WaveLoop( "rawwaves/sinewave.raw", true );
|
||||
input->setFrequency( 440.0 );
|
||||
|
||||
// Define and open a 16-bit, one-channel WAV formatted output file
|
||||
output = new WvOut( "hellosine.wav", 1, WvOut::WVOUT_WAV, Stk::STK_SINT16 );
|
||||
WvOut* output = new WvOut( "hellosine.wav", 1, WvOut::WVOUT_WAV, Stk::STK_SINT16 );
|
||||
|
||||
// Run the oscillator for 40000 samples, writing to the output file
|
||||
int i;
|
||||
@@ -39,66 +39,17 @@ WaveLoop is a subclass of WvIn, which supports WAV, SND (AU), AIFF, MAT-file (Ma
|
||||
|
||||
The WvIn and WvOut classes are complementary, both supporting WAV, SND (AU), AIFF, MAT-file (Matlab), and RAW file formats with 8-, 16-, and 32-bit integer and 32- and 64-bit floating-point data types. However, WvOut does not perform data interpolation.
|
||||
|
||||
Nearly all STK classes implement <TT>tick()</TT> functions which take and/or return sample values. Within the <TT>tick()</TT> function, the fundamental sample calculations are performed for a given class. Most STK classes consume/generate a single sample per operation and their <TT>tick()</TT> method takes/returns each sample "by value". In addition, every class implementing a <TT>tick()</TT> function also provides an overloaded <TT>tick()</TT> function taking pointer and size arguments which can be used for vectorized computations.
|
||||
|
||||
The WvIn and WvOut classes support multi-channel sample frames. To distinguish single-sample frame operations from multi-channel frame operations, these classes also implement <TT>tickFrame()</TT> functions. When a <TT>tick()</TT> method is called for multi-channel data, frame averages are returned or the input sample is distributed across all channels of a sample frame.
|
||||
|
||||
Nearly all STK classes inherit from the Stk base class. Stk provides a static sample rate which is queried by subclasses as needed. Because many classes use the current sample rate value during instantiation, it is important that the desired value be set at the beginning of a program. The default STK sample rate is 22050 Hz.
|
||||
|
||||
Another primary concept that is somewhat obscurred in this example concerns the data format in which sample values are passed and received. Audio and control signals throughout STK use a floating-point data type, the exact precision of which can be controlled via the <TT>MY_FLOAT</TT> \#define statement in Stk.h. Thus, the ToolKit can use any normalization scheme desired. The base instruments and algorithms are implemented with a general audio sample dynamic maximum of +/-1.0, and the WvIn and WvOut classes and subclasses scale appropriately for DAC or soundfile input and output.
|
||||
Nearly all STK classes inherit from the Stk base class. Stk provides a static sample rate which is queried by subclasses as needed. Because many classes use the current sample rate value during instantiation, it is important that the desired value be set at the beginning of a program. The default STK sample rate is 44100 Hz.
|
||||
|
||||
\section error Error Handling
|
||||
|
||||
The ToolKit has some basic C++ error handling functionality built in. Classes which access files and/or hardware are most prone to runtime errors. To properly "catch" such errors, the above example should be rewritten as shown below.
|
||||
|
||||
\code
|
||||
// sineosc.cpp
|
||||
|
||||
#include "WaveLoop.h"
|
||||
#include "WvOut.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set the global sample rate before creating class instances.
|
||||
Stk::setSampleRate( 44100.0 );
|
||||
|
||||
WaveLoop *input = 0;
|
||||
WvOut *output = 0;
|
||||
|
||||
try {
|
||||
// Define and load the sine wave file
|
||||
input = new WaveLoop( "rawwaves/sinewave.raw", TRUE );
|
||||
|
||||
// Define and open a 16-bit, one-channel WAV formatted output file
|
||||
output = new WvOut( "hellosine.wav", 1, WvOut::WVOUT_WAV, Stk::STK_SINT16 );
|
||||
}
|
||||
catch ( StkError & ) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
input->setFrequency( 440.0 );
|
||||
|
||||
// Run the oscillator for 40000 samples, writing to the output file
|
||||
for ( int i=0; i<40000; i++ ) {
|
||||
|
||||
try {
|
||||
output->tick( input->tick() );
|
||||
}
|
||||
catch ( StkError & ) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cleanup:
|
||||
delete input;
|
||||
delete output;
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
\include sineosc.cpp
|
||||
|
||||
In this particular case, we simply exit the program if an error occurs (an error message is automatically printed to stderr). A more refined program might attempt to recover from or fix a particular problem and, if successful, continue processing. See the \ref classes to determine which constructors and functions can throw an error.
|
||||
|
||||
[<A HREF="compile.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
[<A HREF="compile.html">Next tutorial</A>] [<A HREF="fundamentals.html">Main tutorial page</A>]
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<center><h3>Perry R. Cook & Gary P. Scavone</h3></center>
|
||||
\htmlonly
|
||||
<h3><center><a href="http://www.cs.princeton.edu/~prc/">Perry R. Cook</a> & <a href="http://music.mcgill.ca/~gary/">Gary P. Scavone</a></center></h3>
|
||||
\endhtmlonly
|
||||
|
||||
The <B>Synthesis ToolKit in C++ (STK)</B> is a set of open source audio signal processing and algorithmic synthesis classes written in C++. STK was designed to facilitate rapid development of music synthesis and audio processing software, with an emphasis on cross-platform functionality, realtime control, ease of use, and educational example code. The Synthesis ToolKit is extremely portable (it's mostly platform-independent C and C++ code), and it's completely user-extensible (all source included, no unusual libraries, and no hidden drivers). We like to think that this increases the chances that our programs will still work in another 5-10 years. In fact, the ToolKit has been working continuously for nearly 8 years now. STK currently runs with "realtime" support (audio and MIDI) on SGI (Irix), Linux, Macintosh OS X, and Windows computer platforms. Generic, non-realtime support has been tested under NeXTStep, Sun, and other platforms and should work with any standard C++ compiler.
|
||||
The <B>Synthesis ToolKit in C++ (STK)</B> is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. STK was designed to facilitate rapid development of music synthesis and audio processing software, with an emphasis on cross-platform functionality, realtime control, ease of use, and educational example code. The Synthesis ToolKit is extremely portable (it's mostly platform-independent C and C++ code), and it's completely user-extensible (all source included, no unusual libraries, and no hidden drivers). We like to think that this increases the chances that our programs will still work in another 5-10 years. In fact, the ToolKit has been working continuously for nearly 10 years now. STK currently runs with "realtime" support (audio and MIDI) on SGI (Irix), Linux, Macintosh OS X, and Windows computer platforms. Generic, non-realtime support has been tested under NeXTStep, Sun, and other platforms and should work with any standard C++ compiler.
|
||||
|
||||
- \ref information
|
||||
- \ref classes
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<UL>
|
||||
<LI><A HREF="Papers/stkicmc99.pdf">ICMC99 Paper</A></LI>
|
||||
<BR>
|
||||
A somewhat recent paper by Perry and Gary about the Synthesis ToolKit in C++.
|
||||
A not-so-recent paper by Perry and Gary about the Synthesis ToolKit in C++.
|
||||
<P>
|
||||
<LI><A HREF="Papers/STKsiggraph96.pdf">SIGGRAPH96 Paper</A></LI>
|
||||
<BR>
|
||||
A not-so-recent paper by Perry about the Synthesis ToolKit in C++.
|
||||
A very-not-so-recent paper by Perry about the Synthesis ToolKit in C++.
|
||||
<P>
|
||||
<LI><A HREF="http://www.cs.princeton.edu/~prc/NewWork.html#STK">Perry's STK Web Page</A></LI>
|
||||
<BR>
|
||||
@@ -18,14 +18,14 @@ This is a link to Perry Cook's STK Web page. He has information about the \ref
|
||||
|
||||
<H4>What is the <I>Synthesis ToolKit</I>?</H4>
|
||||
|
||||
The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in C++. STK was designed to facilitate rapid development of music synthesis and audio processing software, with an emphasis on cross-platform functionality, realtime control, ease of use, and educational example code. The Synthesis ToolKit is extremely portable (it's mostly platform-independent C and C++ code), and it's completely user-extensible (all source included, no unusual libraries, and no hidden drivers). We like to think that this increases the chances that our programs will still work in another 5-10 years. In fact, the ToolKit has been working continuously for nearly 8 years now. STK currently runs with "realtime" support (audio and MIDI) on SGI (Irix), Linux, Macintosh OS X, and Windows computer platforms. Generic, non-realtime support has been tested under NeXTStep, Sun, and other platforms and should work with any standard C++ compiler.
|
||||
The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. STK was designed to facilitate rapid development of music synthesis and audio processing software, with an emphasis on cross-platform functionality, realtime control, ease of use, and educational example code. The Synthesis ToolKit is extremely portable (it's mostly platform-independent C and C++ code), and it's completely user-extensible (all source included, no unusual libraries, and no hidden drivers). We like to think that this increases the chances that our programs will still work in another 5-10 years. In fact, the ToolKit has been working continuously for nearly 10 years now. STK currently runs with "realtime" support (audio and MIDI) on SGI (Irix), Linux, Macintosh OS X, and Windows computer platforms. Generic, non-realtime support has been tested under NeXTStep, Sun, and other platforms and should work with any standard C++ compiler.
|
||||
|
||||
The Synthesis ToolKit is free for non-commercial use. The only parts of the Synthesis ToolKit that are platform-dependent concern real-time audio and MIDI input and output, and that is taken care of with a few special classes. The interface for MIDI input and the simple <A HREF="http://dev.scriptics.com">Tcl/Tk</A> graphical user interfaces (GUIs) provided is the same, so it's easy to experiment in real time using either the GUIs or MIDI. The Synthesis ToolKit can generate simultaneous SND (AU), WAV, AIFF, and MAT-file output soundfile formats (as well as realtime sound output), so you can view your results using one of a large variety of sound/signal analysis tools already available (e.g. <A HREF="http://www-ccrma.stanford.edu/software/snd/">Snd</A>, Cool Edit, Matlab).
|
||||
|
||||
|
||||
<H4>What the <I>Synthesis ToolKit</I> is not.</H4>
|
||||
|
||||
The Synthesis Toolkit is not one particular program. Rather, it is a set of C++ classes that you can use to create your own programs. A few example applications are provided to demonstrate some of the ways to use the classes. If you have specific needs, you will probably have to either modify the example programs or write a new program altogether. Further, the example programs don't have a fancy GUI wrapper. If you feel the need to have a "drag and drop" graphical patching GUI, you probably don't want to use the ToolKit. Spending hundreds of hours making platform-dependent graphics code would go against one of the fundamental design goals of the ToolKit - platform independence.
|
||||
The Synthesis Toolkit is not one particular program. Rather, it is a set of C++ classes that you can use to create your own programs. A few example applications are provided to demonstrate some of the ways to use the classes. If you have specific needs, you will probably have to either modify the example programs or write a new program altogether. Further, the example programs don't have a fancy GUI wrapper. It is easy to embed STK classes inside a GUI environment but we have chosen to focus our energy on the audio signal processing issues. Spending hundreds of hours making platform-dependent graphical user interfaces would go against one of the fundamental design goals of the ToolKit - platform independence.
|
||||
|
||||
For those instances where a simple GUI with sliders and buttons is helpful, we use <A HREF="http://dev.scriptics.com">Tcl/Tk</A> (which is freely distributed for all the supported ToolKit platforms). A number of Tcl/Tk GUI scripts are distributed with the ToolKit release. For control, the Synthesis Toolkit uses raw MIDI (on supported platforms), and SKINI (Synthesis ToolKit Instrument Network Interface, a MIDI-like text message synthesis control format).
|
||||
|
||||
@@ -33,7 +33,7 @@ For those instances where a simple GUI with sliders and buttons is helpful, we u
|
||||
|
||||
Perry Cook began developing a pre-cursor to the Synthesis ToolKit (also called STK) under NeXTStep at the Center for Computer Research in Music and Acoustics (CCRMA) at Stanford University in the early-1990s. With his move to Princeton University in 1996, he ported everything to C++ on SGI hardware, added real-time capabilities, and greatly expanded the synthesis techniques available. With the help of Bill Putnam, Perry also made a port of STK to Windows95. Gary Scavone began using STK extensively in the summer of 1997 and completed a full port of STK to Linux early in 1998. He finished the fully compatable Windows port (using Direct Sound API) in June 1998. Numerous improvements and extensions have been made since then.
|
||||
|
||||
The Toolkit has been distributed continuously since 1996 via the <A HREF="http://www.music.princeton.edu/psk">Princeton Sound Kitchen</A>, <A HREF="http://www.cs.princeton.edu/~prc">Perry Cook's home page</A> at Princeton, <A HREF="http://www-ccrma.stanford.edu/~gary/">Gary Scavone's home page</A> at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), and the <A HREF="http://www-ccrma.stanford.edu/software/stk">Synthesis ToolKit home page</A>. The ToolKit has been in included in various collections of software. Much of it has also been ported to MAX/MSP on Macintosh computers by Dan Trueman and Luke Dubois of Columbia University, and is distributed as <A HREF="http://music.columbia.edu/PeRColate">PeRColate</A>. Help on real-time sound and MIDI has been provided by Tim Stilson, Bill Putnam, and Gabriel Maldonado.
|
||||
The Toolkit has been distributed continuously since 1996 via the <A HREF="http://www.music.princeton.edu/psk">Princeton Sound Kitchen</A>, <A HREF="http://www.cs.princeton.edu/~prc">Perry Cook's home page</A> at Princeton, <A HREF="http://www-ccrma.stanford.edu/~gary/">Gary Scavone's home page</A> at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), and the <A HREF="http://www-ccrma.stanford.edu/software/stk">Synthesis ToolKit home page</A>. The ToolKit has been included in various collections of software. Much of it has also been ported to Max/MSP on Macintosh computers by Dan trueman and Luke Dubois of Columbia University, and is distributed as <A HREF="http://music.columbia.edu/PeRColate">PeRColate</A>. Help on real-time sound and MIDI has been provided over the years by Tim Stilson, Bill Putnam, and Gabriel Maldonado.
|
||||
|
||||
<H4>Legal and Ethical Notes</H4>
|
||||
|
||||
@@ -47,4 +47,32 @@ Some of the concepts are covered by various patents, some known to us and likely
|
||||
|
||||
STK is free and we do not guarantee anything. We've been hacking on this code for a while now and most of it seems to work pretty well. But, there surely are some bugs floating around. Sometimes things work fine on one computer platform but not so fine on another. FPU overflows and underflows cause <I>very</I> weird behavior which also depends on the particular CPU and OS. Let us know about bugs you find and we'll do our best to correct them.
|
||||
|
||||
*/
|
||||
<H4>Perry's Notes From the Original Distribution of STK</H4>
|
||||
|
||||
This whole world was created with no particular hardware in mind. These examples are intended to be tutorial in nature, as a platform for the continuation of my research, and as a possible starting point for a software synthesis system. The basic motivation was to create the necessary unit generators to do the synthesis, processing, and control that I want to do and teach about. Little thought for optimization was given and therefore improvements, especially speed enhancements, should be possible with these classes. It was written with some basic concepts in mind about how to let compilers optimize.
|
||||
|
||||
Your question at this point might be, "But Perry, with CMix, CMusic, CSound, CShells, CMonkeys, etc. already cluttering the landscape, why a new set of stupid C functions for music synthesis and processing?" The answers lie below.
|
||||
|
||||
<ol>
|
||||
<li>I needed to port many of the things I've done into something which is generic enough to port further to different machines.</li>
|
||||
|
||||
<li>I really plan to document this stuff, so that you don't have to be me to figure out what's going on. (I'll probably be sorry I said this in a couple of years, when even I can't figure out what I was thinking.)</li>
|
||||
|
||||
<li>The classic difficulties most people have in trying to implement physical models are:
|
||||
|
||||
<ul>
|
||||
<li>They have trouble understanding the papers, and/or in turning the theory into practice.</li>
|
||||
|
||||
<li>The physical model instruments are a pain to get to oscillate, and coming up with stable and meaningful parameter values is required to get the models to work at all.</li>
|
||||
</ul>
|
||||
|
||||
This set of C++ unit generators and instruments might help to diminish the scores of emails I get asking what to do with those block diagrams I put in my papers.</li>
|
||||
|
||||
<li>I wanted to try some new stuff with modal synthesis, and implement some classic FM patches as well.</li>
|
||||
|
||||
<li>I wanted to reimplement, and newly implement more of the intelligent and physical performer models I've talked about in some of my papers. But I wanted to do it in a portable way, and in such a way that I can hook up modules quickly. I also wanted to make these instruments connectable to such player objects, so folks like Brad Garton who really think a lot about the players can connect them to my instruments, a lot about which I think.</li>
|
||||
|
||||
<li>More rationalizations to follow ...</li>
|
||||
</ol>
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,66 +1,8 @@
|
||||
/*! \page instruments Instruments
|
||||
|
||||
The ToolKit comes with a wide variety of synthesis algorithms, all of which inherit from the Instrmnt class. In this example, we'll fire up an instance of the BeeThree FM synthesis class and show how it's frequency can be modified over time.
|
||||
The ToolKit comes with a wide variety of synthesis algorithms, all of which inherit from the Instrmnt class. In this example, we'll fire up an instance of the BeeThree FM synthesis class and show how its frequency can be modified over time.
|
||||
|
||||
\code
|
||||
// bethree.cpp
|
||||
|
||||
#include "BeeThree.h"
|
||||
#include "RtWvOut.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set the global sample rate before creating class instances.
|
||||
Stk::setSampleRate( 44100.0 );
|
||||
|
||||
Instrmnt *instrument = 0;
|
||||
RtWvOut *output = 0;
|
||||
MY_FLOAT frequency, amplitude, scaler;
|
||||
long counter, i;
|
||||
|
||||
try {
|
||||
// Define and load the BeeThree instrument
|
||||
instrument = new BeeThree();
|
||||
|
||||
// Define and open the default realtime output device for one-channel playback
|
||||
output = new RtWvOut(1);
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
scaler = 1.0;
|
||||
frequency = 220.0;
|
||||
amplitude = 0.5;
|
||||
instrument->noteOn( frequency, amplitude );
|
||||
|
||||
// Play the instrument for 80000 samples, changing the frequency every 2000 samples
|
||||
counter = 0;
|
||||
while ( counter < 80000 ) {
|
||||
for ( i=0; i<2000; i++ ) {
|
||||
try {
|
||||
output->tick( instrument->tick() );
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
counter += 2000;
|
||||
scaler += 0.025;
|
||||
instrument->setFrequency( frequency * scaler );
|
||||
}
|
||||
|
||||
// Turn the instrument off with maximum decay envelope.
|
||||
instrument->noteOff( 1.0 );
|
||||
|
||||
cleanup:
|
||||
delete instrument;
|
||||
delete output;
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
\include bethree.cpp
|
||||
|
||||
We have used an Instrmnt pointer when referencing the BeeThree instance above, so it would be simple to replace the BeeThree class with any other STK instrument class. It should be noted, however, that a few classes do not respond to the setFrequency() function (e.g., Shakers, Drummer).
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
/*! \page links Miscellaneous Links
|
||||
|
||||
- <A HREF="http://www-ccrma.stanford.edu/~gary/rtaudio/">The RtAudio WWW site</A>
|
||||
- <A HREF="http://music.mcgill.ca/~gary/rtaudio/">The %RtAudio WWW site</A>
|
||||
|
||||
- <A HREF="http://music.mcgill.ca/~gary/rtmidi/">The %RtMidi WWW site</A>
|
||||
|
||||
- <A HREF="http://chuck.cs.princeton.edu/">ChucK: Concurrent, On-the-fly Audio Programming Language</A> using STK unit generators
|
||||
|
||||
- <A HREF="http://www.music.princeton.edu/paul/stkugens.tar.gz">Paul Lansky's port of STK to SuperCollider</A>
|
||||
|
||||
- <A HREF="http://kern.humdrum.net/">Kern Scores: A Library of Electronic Musical Scores</A> (with automatic conversion to SKINI format)
|
||||
|
||||
|
||||
@@ -8,63 +8,7 @@ Multi-channel support for realtime audio input and output is dependent on the au
|
||||
|
||||
The following example demonstrates the use of the WvOut class for creating a four channel, 16-bit AIFF formatted audio file. We will use four sinewaves of different frequencies for the first two seconds and then a single sinewave for the last two seconds.
|
||||
|
||||
\code
|
||||
// foursine.cpp
|
||||
|
||||
#include "WaveLoop.h"
|
||||
#include "WvOut.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set the global sample rate before creating class instances.
|
||||
Stk::setSampleRate( 44100.0 );
|
||||
|
||||
int i, j;
|
||||
WvOut *output = 0;
|
||||
WaveLoop *inputs[4];
|
||||
for ( i=0; i<4; i++ ) inputs[i] = 0;
|
||||
|
||||
// Define and load the sine waves
|
||||
try {
|
||||
for ( i=0; i<4; i++ ) {
|
||||
inputs[i] = new WaveLoop( "rawwaves/sinewave.raw", TRUE );
|
||||
inputs[i]->setFrequency( 220.0 * (i+1) );
|
||||
}
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
// Define and open a 16-bit, four-channel AIFF formatted output file
|
||||
try {
|
||||
output = new WvOut( "foursine.aif", 4, WvOut::WVOUT_AIF, Stk::STK_SINT16 );
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
// Write two seconds of four sines to the output file
|
||||
MY_FLOAT frame[4];
|
||||
for ( j=0; j<88200; j++ ) {
|
||||
for ( i=0; i<4; i++ )
|
||||
frame[i] = inputs[i]->tick();
|
||||
|
||||
output->tickFrame( frame );
|
||||
}
|
||||
|
||||
// Now write the first sine to all four channels for two seconds
|
||||
for ( j=0; j<88200; j++ ) {
|
||||
output->tick( inputs[0]->tick() );
|
||||
}
|
||||
|
||||
cleanup:
|
||||
for ( i=0; i<4; i++ ) delete inputs[i];
|
||||
delete output;
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
\include foursine.cpp
|
||||
|
||||
[<A HREF="polyvoices.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
*/
|
||||
|
||||
@@ -1,122 +1,22 @@
|
||||
/*! \page polyvoices Voice Management
|
||||
|
||||
The previous tutorial chapters were concerned only with monophonic ToolKit instrument playback and control. At this point, it should be relatively clear that one can instantiate multiple instruments and perhaps sum together their sounds or even direct their sounds to separate output channels. It is less clear how one might go about controlling a group of instruments. The Voicer class is designed to serve just this purpose.
|
||||
The previous tutorial chapters were concerned only with monophonic ToolKit instrument playback and control. At this point, it should be relatively clear that one can instantiate multiple instruments and perhaps sum together their outputs or even direct their outputs to separate channels. It is less clear how one might go about controlling a group of instruments. The Voicer class is designed to serve just this purpose.
|
||||
|
||||
The STK Voicer class is a relatively simple voice manager. The user can dynamically add and delete instruments from its "control", with the option of controlling specific instruments via unique note tags and/or grouping sets of instruments via a "channel" number. All sounding instrument outputs are summed and returned via the <TT>tick()</TT> function. The Voicer class responds to noteOn, noteOff, setFrequency, pitchBend, and controlChange messages, automatically assigning incoming messages to the voices in its control. When all voices are sounding and a new noteOn is encountered, the Voicer interrupts the oldest sounding voice. The user is responsible for creating and deleting all instrument instances.
|
||||
The STK Voicer class is a relatively simple voice manager. The user can dynamically add and delete instruments to/from its "control", with the option of controlling specific instruments via unique note tags and/or grouping sets of instruments via a "channel" number. All sounding instrument outputs are summed and returned via the <TT>tick()</TT> function. The Voicer class responds to noteOn, noteOff, setFrequency, pitchBend, and controlChange messages, automatically assigning incoming messages to the voices in its control. When all voices are sounding and a new noteOn is encountered, the Voicer interrupts the oldest sounding voice. The user is responsible for creating and deleting all instrument instances.
|
||||
|
||||
In the following example, we modify the <TT>controlbee.cpp</TT> program to make use of three BeeThree instruments, all controlled using a Voicer.
|
||||
|
||||
\code
|
||||
// threebees.cpp
|
||||
\include threebees.cpp
|
||||
|
||||
#include "BeeThree.h"
|
||||
#include "RtWvOut.h"
|
||||
#include "Messager.h"
|
||||
#include "Voicer.h"
|
||||
#include "SKINI.msg"
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set the global sample rate before creating class instances.
|
||||
Stk::setSampleRate( 44100.0 );
|
||||
|
||||
int i;
|
||||
RtWvOut *output = 0;
|
||||
Messager *messager = 0;
|
||||
Voicer *voicer = 0;
|
||||
bool done = FALSE;
|
||||
Instrmnt *instrument[3];
|
||||
for ( i=0; i<3; i++ ) instrument[i] = 0;
|
||||
|
||||
try {
|
||||
// Define and load the BeeThree instruments
|
||||
for ( i=0; i<3; i++ )
|
||||
instrument[i] = new BeeThree();
|
||||
|
||||
// Define and open the default realtime output device for one-channel playback
|
||||
output = new RtWvOut(1);
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
try {
|
||||
// Create a Messager instance to read from a redirected SKINI scorefile.
|
||||
messager = new Messager();
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
// Instantiate the voicer for a maximum of three voices.
|
||||
voicer = new Voicer( 3 );
|
||||
for ( i=0; i<3; i++ )
|
||||
voicer->addInstrument( instrument[i] );
|
||||
|
||||
// Play the instrument until the end of the scorefile.
|
||||
int nTicks, type;
|
||||
MY_FLOAT byte2, byte3;
|
||||
while (!done) {
|
||||
|
||||
// Look for new messages and return a delta time (in samples).
|
||||
type = messager->nextMessage();
|
||||
if (type < 0)
|
||||
done = TRUE;
|
||||
|
||||
nTicks = messager->getDelta();
|
||||
try {
|
||||
for ( i=0; i<nTicks; i++ )
|
||||
output->tick( voicer->tick() );
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ( type > 0 ) {
|
||||
// Process the new control message.
|
||||
byte2 = messager->getByteTwo();
|
||||
byte3 = messager->getByteThree();
|
||||
|
||||
switch(type) {
|
||||
|
||||
case __SK_NoteOn_:
|
||||
voicer->noteOn( byte2, byte3 );
|
||||
break;
|
||||
|
||||
case __SK_NoteOff_:
|
||||
voicer->noteOff( byte2, byte3 );
|
||||
break;
|
||||
|
||||
case __SK_ControlChange_:
|
||||
voicer->controlChange( (int) byte2, byte3 );
|
||||
break;
|
||||
|
||||
case __SK_AfterTouch_:
|
||||
voicer->controlChange( 128, byte2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
for ( i=0; i<3; i++ ) delete instrument[i];
|
||||
delete output;
|
||||
delete messager;
|
||||
delete voicer;
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
Assuming the program is compiled as <TT>threebees</TT>, the three-voice SKINI scorefile <A HREF="tutorial/bachfugue.ski"><TT>bachfugue.ski</TT></A> (also located in the <tt>scores</tt> directory with the examples) could be redirected to the program as:
|
||||
We have written this program to accept control messages from \c STDIN. Assuming the program is compiled as <TT>threebees</TT>, the three-voice SKINI scorefile <A HREF="tutorial/bachfugue.ski"><TT>bachfugue.ski</TT></A> (located in the <tt>scores</tt> directory with the examples) can be redirected to the program as:
|
||||
|
||||
\code
|
||||
threebees < bachfugue.ski
|
||||
threebees < scores/bachfugue.ski
|
||||
\endcode
|
||||
|
||||
For more fun, surf to <A HREF="http://kern.humdrum.net/">Kern Scores</A> for a huge assortment of other scorefiles which can be downloaded in the SKINI format.
|
||||
|
||||
Another easy extension would be to use the <TT>STK_MIDI</TT> constructor argument to the Messager class and then play the instruments via a MIDI keyboard.
|
||||
Another easy extension would be to add the \c Messager::startMidiInput() function to the program and then play the instruments via a MIDI keyboard.
|
||||
|
||||
[<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
*/
|
||||
|
||||
@@ -1,72 +1,28 @@
|
||||
/*! \page realtime Realtime Audio
|
||||
/*! \page realtime Realtime Audio (blocking)
|
||||
|
||||
In this section, we modify the <TT>sineosc.cpp</TT> program in order to send the output to the default audio playback device on your system.
|
||||
In this section, we modify the <TT>sineosc.cpp</TT> program in order to send the output to the default audio playback device on your computer system.
|
||||
|
||||
\code
|
||||
// rtsine.cpp
|
||||
\include rtsine.cpp
|
||||
|
||||
#include "WaveLoop.h"
|
||||
#include "RtWvOut.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set the global sample rate before creating class instances.
|
||||
Stk::setSampleRate( 44100.0 );
|
||||
|
||||
WaveLoop *input = 0;
|
||||
RtWvOut *output = 0;
|
||||
|
||||
try {
|
||||
// Define and load the sine wave file
|
||||
input = new WaveLoop( "rawwaves/sinewave.raw", TRUE );
|
||||
|
||||
// Define and open the default realtime output device for one-channel playback
|
||||
output = new RtWvOut(1);
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
input->setFrequency(440.0);
|
||||
|
||||
// Play the oscillator for 40000 samples
|
||||
int i;
|
||||
for ( i=0; i<40000; i++ ) {
|
||||
try {
|
||||
output->tick(input->tick());
|
||||
}
|
||||
catch (StkError &) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
delete input;
|
||||
delete output;
|
||||
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
The class RtWvOut is a protected subclass of WvOut. A number of optional constructor arguments can be used to fine tune its performance for a given system.
|
||||
The class RtWvOut is a protected subclass of WvOut. A number of optional constructor arguments can be used to fine tune its performance for a given system. RtWvOut provides a "single-sample" interface to the RtAudio class. Note that RtWvOut (as well as the RtWvIn and RtDuplex classes described below) make use of RtAudio's blocking input/output functionality. On systems which implement an inherently callback-based audio API, this blocking functionality will be less robust. An example of audio output using a callback scheme will be discussed in a subsequent tutorial section.
|
||||
|
||||
Though not used here, an RtWvIn class exists as well which can be used to read realtime audio data from an input device. See the <TT>record.cpp</TT> example program in the <TT>examples</TT> project for more information.
|
||||
|
||||
It is possible to use an instance of RtWvOut and an instance of RtWvIn to simultaneously read and write realtime audio to and from a hardware device or devices. However, it is recommended to instead use a single instance of RtDuplex to achieve this behavior, in that it guarantees better synchronization between the input and output data. See the <TT>effects</TT> project or the <TT>io.cpp</TT> example program in the <TT>examples</TT> project for more information.
|
||||
It may be possible to use an instance of RtWvOut and an instance of RtWvIn to simultaneously read and write realtime audio to and from a hardware device or devices. However, it is recommended to instead use a single instance of RtDuplex to achieve this behavior, in that it guarantees better synchronization between the input and output data. See the <TT>effects</TT> project or the <TT>io.cpp</TT> example program in the <TT>examples</TT> project for more information.
|
||||
|
||||
When using any realtime STK class (RtAudio, RtWvOut, RtWvIn, RtDuplex, RtMidi, TcpWvIn, TcpWvOut, Socket, and Thread), it is necessary to specify an audio/MIDI API preprocessor definition and link with the appropriate libraries or frameworks. For example, the above program could be compiled on a Linux system using the GNU g++ compiler and the ALSA audio/MIDI API as follows (assuming all necessary files exist in the project directory):
|
||||
When using any realtime STK class (RtAudio, RtWvOut, RtWvIn, RtDuplex, RtMidi, TcpWvIn, TcpWvOut, Socket, and Thread), it is necessary to specify an audio/MIDI API preprocessor definition and link with the appropriate libraries or frameworks. For example, the above program could be compiled on a Linux system using the GNU g++ compiler and the ALSA audio API as follows (assuming all necessary files exist in the project directory):
|
||||
|
||||
\code
|
||||
g++ -Wall -D__LINUX_ALSA__ -D__LITTLE_ENDIAN__ -o rtsine Stk.cpp WvIn.cpp WaveLoop.cpp WvOut.cpp \
|
||||
RtWvOut.cpp RtAudio.cpp rtsine.cpp -lpthread -lasound -lstk
|
||||
RtWvOut.cpp RtAudio.cpp rtsine.cpp -lpthread -lasound
|
||||
\endcode
|
||||
|
||||
On a Macintosh OS X system, the syntax would be:
|
||||
|
||||
\code
|
||||
CC -D__MACOSX_CORE__ -o rtsine Stk.cpp WvIn.cpp WaveLoop.cpp WvOut.cpp RtWvOut.cpp RtAudio.cpp \
|
||||
rtsine.cpp -lpthread -lstdc++ -lstk -framework CoreAudio -framework CoreMIDI -framework CoreFoundation
|
||||
g++ -Wall -D__MACOSX_CORE__ -o rtsine Stk.cpp WvIn.cpp WaveLoop.cpp WvOut.cpp RtWvOut.cpp RtAudio.cpp \
|
||||
rtsine.cpp -lpthread -framework CoreAudio -framework CoreMIDI -framework CoreFoundation
|
||||
\endcode
|
||||
|
||||
[<A HREF="instruments.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
[<A HREF="crealtime.html">Next tutorial</A>] [<A HREF="tutorial.html">Main tutorial page</A>]
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ This describes the latest (version 1.1) implementation of SKINI for the Synthesi
|
||||
A SKINI haiku.
|
||||
\endcode
|
||||
|
||||
Profound thanks to Dan Trueman, Brad Garton, and Gary Scavone for input on this revision. Thanks also to MIDI, the NeXT MusicKit, ZIPI and all the creators and modifiers of these for good bases upon/from which to build and depart.
|
||||
Profound thanks to Dan trueman, Brad Garton, and Gary Scavone for input on this revision. Thanks also to MIDI, the NeXT MusicKit, ZIPI and all the creators and modifiers of these for good bases upon/from which to build and depart.
|
||||
|
||||
\section compatibility MIDI Compatibility
|
||||
|
||||
@@ -16,7 +16,7 @@ SKINI was designed to be MIDI compatible wherever possible, and extend MIDI in i
|
||||
|
||||
Differences from MIDI, and motivations, include:
|
||||
|
||||
- Text-based messages are used, with meaningful names wherever possible. This allows any language or system capable of formatted printing to generate SKINI. Similarly, any system capable of reading in a string and turning delimited fields into strings, floats, and ints can consume SKINI for control. More importantly, humans can actually read, and even write if they want, SKINI files and streams. Use an editor and search/replace or macros to change a channel or control number. Load a SKINI score into a spread sheet to apply transformations to time, control parameters, MIDI velocities, etc. Put a monkey on a special typewriter and get your next great work. Life's too short to debug bit/nybble packed variable length mumble messages. Disk space gets cheaper, available bandwidth increases, music takes up so little space and bandwidth compared to video and grapics. Live a little.
|
||||
- Text-based messages are used, with meaningful names wherever possible. This allows any language or system capable of formatted printing to generate SKINI. Similarly, any system capable of reading in a string and turning delimited fields into strings, floats, and ints can consume SKINI for control. More importantly, humans can actually read, and even write if they want, SKINI files and streams. Use an editor and search/replace or macros to change a channel or control number. Load a SKINI score into a spread sheet to apply transformations to time, control parameters, MIDI velocities, etc. Put a monkey on a special typewriter and get your next great work. Life's too short to debug bit/nybble packed variable length mumble messages. Disk space gets cheaper, available bandwidth increases, music takes up so little space and bandwidth compared to video and graphics. Live a little.
|
||||
|
||||
- Floating point numbers are used wherever possible. Note Numbers, Velocities, Controller Values, and Delta and Absolute Times are all represented and scanned as ASCII double-precision floats. MIDI byte values are preserved, so that incoming MIDI bytes from an interface can be put directly into SKINI messages. 60.0 or 60 is middle C, 127.0 or 127 is maximum velocity etc. But, unlike MIDI, 60.5 can cause a 50 cent sharp middle C to be played. As with MIDI byte values like velocity, use of the integer and SKINI-added fractional parts is up to the implementor of the algorithm being controlled by SKINI messages. But the extra precision is there to be used or ignored.
|
||||
|
||||
@@ -38,13 +38,13 @@ All fields other than type, time, and channel are optional, and the types and us
|
||||
|
||||
The other important file used by SKINI is SKINI.msg, which is a set of #defines to make C code more readable, and to allow reasonably quick re-mapping of control numbers, etc.. All of these defined symbols are assigned integer values. For Java, the #defines could be replaced by declaration and assignment statements, preserving the look and behavior of the rest of the code.
|
||||
|
||||
\section cfiles C Files Used To Implement SKINI
|
||||
\section cfiles Files Used To Implement SKINI
|
||||
|
||||
SKINI.cpp is an object which can either open a SKINI file, and successively read and parse lines of text as SKINI strings, or accept strings from another object and parse them. The latter functionality would be used by a socket, pipe, or other connection receiving SKINI messages a line at a time, usually in real time, but not restricted to real time.
|
||||
Skini.cpp is a C++ object which can either open a SKINI file and successively read and parse lines of text as SKINI strings, or accept strings from another object and parse them. The latter functionality would be used by a socket, pipe, or other connection receiving SKINI messages a line at a time, usually in real time, but not restricted to real time.
|
||||
|
||||
SKINI.msg should be included by anything wanting to use the SKINI.cpp object. This is not mandatory, but use of the __SK_blah_ symbols which are defined in the .msg file will help to ensure clarity and consistency when messages are added and changed.
|
||||
SKINI.msg should be included by anything wanting to use the Skini.cpp object. This is not mandatory, but use of the __SK_blah_ symbols which are defined in the .msg file will help to ensure clarity and consistency when messages are added and changed.
|
||||
|
||||
SKINI.tbl is used only by the SKINI parser object (SKINI.cpp). In the file SKINI.tbl, an array of structures is declared and assigned values which instruct the parser as to what the message types are, and what the fields mean for those message types. This table is compiled and linked into applications using SKINI, but could be dynamically loaded and changed in a future version of SKINI.
|
||||
SKINI.tbl is used only by the SKINI parser object (Skini.cpp). In the file SKINI.tbl, an array of structures is declared and assigned values which instruct the parser as to what the message types are, and what the fields mean for those message types. This table is compiled and linked into applications using SKINI, but could be dynamically loaded and changed in a future version of SKINI.
|
||||
|
||||
\section parser SKINI Messages and the SKINI Parser:
|
||||
|
||||
@@ -102,7 +102,7 @@ The parser isn't all that smart, but neither am I. Here are the basic rules gov
|
||||
|
||||
\section table The SKINI.tbl File and Message Parsing:
|
||||
|
||||
The SKINI.tbl file contains an array of structures which are accessed by the parser object SKINI.cpp. The struct is:
|
||||
The SKINI.tbl file contains an array of structures which are accessed by the parser object Skini.cpp. The struct is:
|
||||
|
||||
\code
|
||||
struct SKINISpec {
|
||||
@@ -164,55 +164,53 @@ The StringDamping and StringDetune messages behave the same as the Volume messag
|
||||
Here's a simple example of code which uses the SKINI object to read a SKINI file and control a single instrument.
|
||||
|
||||
\code
|
||||
Skini score;
|
||||
Skini::Message message;
|
||||
instrument = new Mandolin(50.0);
|
||||
score = new SKINI(argv[1]);
|
||||
while(score->getType() > 0) {
|
||||
tempDouble = score->getDelta();
|
||||
if (tempDouble < 0) {
|
||||
tempDouble = - tempDouble;
|
||||
tempDouble = tempDouble - output.getTime();
|
||||
if (tempDouble < 0) {
|
||||
printf("Bad News Here!!! Backward Absolute Time Required.\n");
|
||||
tempDouble = 0.0;
|
||||
}
|
||||
score.setFile( argv[1] );
|
||||
while ( score.nextMessage( message ) != 0 ) {
|
||||
tempDouble = message.time;
|
||||
if (tempDouble < 0) {
|
||||
tempDouble = - tempDouble;
|
||||
tempDouble = tempDouble - output.getTime();
|
||||
if (tempDouble < 0) {
|
||||
printf("Bad News Here!!! Backward Absolute Time Required.\n");
|
||||
tempDouble = 0.0;
|
||||
}
|
||||
tempLong = (long) (tempDouble * Stk::sampleRate());
|
||||
for (i=0;i<tempLong;i++) {
|
||||
output.tick(instrument->tick());
|
||||
}
|
||||
tempLong = (long) ( tempDouble * Stk::sampleRate() );
|
||||
for ( i=0; i<tempLong; i++ ) {
|
||||
output.tick( instrument->tick() );
|
||||
}
|
||||
|
||||
tempDouble3 = message.floatValues[1] * NORM_MIDI;
|
||||
if ( message.type == __SK_NoteOn_ ) {
|
||||
if ( tempDouble3 == 0.0 ) {
|
||||
tempDouble3 = 0.5;
|
||||
instrument->noteOff( tempDouble3 );
|
||||
}
|
||||
tempDouble3 = score->getByteThree();
|
||||
if (score->getType()== __SK_NoteOn_ ) {
|
||||
tempDouble3 *= NORM_MIDI;
|
||||
if (score->getByteThree() == 0) {
|
||||
tempDouble3 = 0.5;
|
||||
instrument->noteOff(tempDouble3);
|
||||
}
|
||||
else {
|
||||
tempLong = (int) score->getByteTwo();
|
||||
tempDouble2 = Midi2Pitch[tempLong];
|
||||
instrument->noteOn(tempDouble2,tempDouble3);
|
||||
}
|
||||
else {
|
||||
tempLong = message.intValues[0];
|
||||
tempDouble2 = Midi2Pitch[tempLong];
|
||||
instrument->noteOn( tempDouble2, tempDouble3 );
|
||||
}
|
||||
else if (score->getType() == __SK_NoteOff_) {
|
||||
tempDouble3 *= NORM_MIDI;
|
||||
instrument->noteOff(tempDouble3);
|
||||
}
|
||||
else if (score->getType() == __SK_ControlChange_) {
|
||||
tempLong = score->getByteTwoInt();
|
||||
instrument->controlChange(tempLong,temp3.0);
|
||||
}
|
||||
score->nextMessage();
|
||||
}
|
||||
else if ( message.type == __SK_NoteOff_ ) {
|
||||
instrument->noteOff( tempDouble3 );
|
||||
}
|
||||
else if ( message.type == __SK_ControlChange_ ) {
|
||||
tempLong = message.intValues[0];
|
||||
instrument->controlChange( tempLong, tempDouble3 );
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
When the score (SKINI object) object is created from the filename in argv[1], the first valid command line is read from the file and parsed.
|
||||
When a SKINI score is passed to a Skini object using the Skini::setFile() function, valid messages are read from the file and returned using the Skini::nextMessage() function.
|
||||
|
||||
The score->getType() retrieves the messageType. If this is -1, there are no more valid messages in the file and the synthesis loop terminates. Otherwise, the message type is returned.
|
||||
A Skini::Message structure contains all the information parsed from a single SKINI message. A returned message type of zero indicates either an invalid message or the end of a scorefile.
|
||||
|
||||
getDelta() retrieves the deltaTime until the current message should occur. If this is greater than 0, synthesis occurs until the deltaTime has elapsed. If deltaTime is less than zero, the time is interpreted as absolute time and the output device is queried as to what time it is now. That is used to form a deltaTime, and if it's positive we synthesize. If it's negative, we print an error and pretend this never happened and we hang around hoping to eventually catch up.
|
||||
The "time" member of a Skini::Message is the deltaTime until the current message should occur. If this is greater than 0, synthesis occurs until the deltaTime has elapsed. If deltaTime is less than zero, the time is interpreted as absolute time and the output device is queried as to what time it is now. That is used to form a deltaTime, and if it's positive we synthesize. If it's negative, we print an error, pretend this never happened and we hang around hoping to eventually catch up.
|
||||
|
||||
The rest of the code sorts out message types NoteOn, NoteOff (including NoteOn with velocity 0), and ControlChange. The code implicitly takes into account the integer type of the control number, but all other data is treated as double float.
|
||||
|
||||
The last line reads and parses the next message in the file.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -2,23 +2,24 @@
|
||||
|
||||
<B>General:</B>
|
||||
<UL>
|
||||
<LI>A MIDI interface to use MIDI input controls. (NOTE: This may be built into the soundcard on your computer.)</LI>
|
||||
<LI>A MIDI interface to use MIDI input/output controls. (NOTE: This may be built into the soundcard on your computer.)</LI>
|
||||
<LI><A HREF="http://dev.scriptics.com">Tcl/Tk</A> version 8.0 or higher to use the simple Tcl/Tk GUIs provided with the STK distribution (available free over the WWW for all supported realtime platforms).</LI>
|
||||
</UL>
|
||||
|
||||
<B>Linux (specific):</B>
|
||||
<UL>
|
||||
<LI>A soundcard to use realtime audio input/output capabilities. In order to use the <I><B>effects</B></I> project, the soundcard and drivers must support full duplex mode.</LI>
|
||||
<LI><A HREF="http://www.opensound.com">OSS</A> or <A HREF="http://www.alsa-project.org/">ALSA</A> device drivers for realtime sound output and MIDI input.</LI>
|
||||
<LI><A HREF="http://www.alsa-project.org/">ALSA</A> device drivers and library for realtime sound and MIDI input/output. <A HREF="http://www.opensound.com">OSS</A> device drivers can be used for audio input/output, but MIDI support requires the ALSA library to compile.</LI>
|
||||
</UL>
|
||||
|
||||
<B>Macintosh OS X (specific):</B>
|
||||
<UL>
|
||||
<LI>A C++ compiler does not ship by default with OS X. It is necessary to download the Developer Kit from the Apple WWW site in order to compile STK.</LI>
|
||||
<LI><B>IMPORTANT:</B>The internal Macintosh audio hardware typically supports a sample rate of 44100 Hz only. Therefore, it is necessary to either specify this rate as a command-line option to the STK example programs or to change the default sample rate inside the Stk.h file before compilation. In addition, the RT_BUFFER_SIZE, specified in Stk.h, could be increased (to a higher power of two) for more robust performance.</LI>
|
||||
<LI>The tcl/tk interpreter does not ship by default with OS X, but must be downloaded from the internet. The latest Tcl/Tk Aqua distribution (http://www.apple.com/downloads/macosx/unix_open_source/tcltk.html) has been successfully tested on a 10.2 system. The default installation will place a link to the wish interpretor at /usr/bin/wish.
|
||||
<LI>A C++ compiler does install by default with OS X. It is necessary to download the Developer Kit from the Apple WWW site in order to compile STK or load it from the installation CD-ROM.</LI>
|
||||
<LI><B>IMPORTANT:</B>The internal Macintosh audio hardware typically supports a sample rate of 44100 Hz only. The default STK sample rate is now 44100 Hz, but there may be programs which change that value before execution. Check the program code if you have sample rate conflicts. Many of the example project programs allow the sample rate to be specified via the command line.</LI>
|
||||
<LI>If you experience frequent audio input/output "glitches", try increasing the RT_BUFFER_SIZE specified in Stk.h.</LI>
|
||||
<LI>The tcl/tk interpreter does not ship by default with OS X, but must be downloaded from the internet. The latest Tcl/Tk Aqua distribution (http://www.apple.com/downloads/macosx/unix_open_source/tcltk.html) has been successfully tested on 10.2 and 10.3 systems. The default installation will place a link to the wish interpretor at /usr/bin/wish.
|
||||
|
||||
Initial tests have shown somewhat poor response between changes made in the tcl/tk script and the resulting audio updates. It is possible to connect a tcl/tk interface to an STK program via a socket connection. However, the tcl/tk interpreter does not appear to properly close the socket connection during disconnection. It is therefore necessary to type "Exit" in the STK program terminal window to properly exit the STK program.</LI>
|
||||
It appears that socket support in Tcl/Tk uses the Nagle algorithm, which produces poor response between changes made in the tcl/tk script and the resulting audio updates. Note that this is only a problem when using a socket connection from a Tcl/Tk script.</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
@@ -37,4 +38,4 @@ Initial tests have shown somewhat poor response between changes made in the tcl/
|
||||
|
||||
<P>
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
/*! \page tutorial Tutorial
|
||||
|
||||
The Synthesis ToolKit is a set of C++ classes. In order to go beyond the simple example programs we provide, it is necessary to know some basics about programming in C or C++. STK's "target audience" includes people who:
|
||||
The Synthesis ToolKit is a set of C++ classes. In order to go beyond the simple example programs we provide, it is necessary to know some basics about programming in C and C++. STK's "target audience" includes people who:
|
||||
<UL>
|
||||
<LI>want to create audio DSP and/or synthesis programs</LI>
|
||||
<LI>want to save some time by using our unit generators and input/output routines</LI>
|
||||
<LI>want to use our unit generators and input/output routines rather than code their own</LI>
|
||||
<LI>want to learn about synthesis and processing algorithms</LI>
|
||||
<LI>wish to teach real-time synthesis and processing, and wish to use some of our classes and examples</LI>
|
||||
<LI>wish to teach real-time synthesis and processing and wish to use some of our classes and examples</LI>
|
||||
</UL>
|
||||
|
||||
Most ToolKit programmers will likely end up writing a class or two for their own particular needs, but this task is typically simplified by making use of pre-existing STK classes (filters, oscillators, etc.).
|
||||
|
||||
The following tutorial chapters describe many of the fundamental ToolKit concepts and classes. All tutorial programs are included in the <TT>projects/examples</TT> directory.
|
||||
|
||||
-# \ref fundamentals
|
||||
-# \ref hello
|
||||
-# \ref compile
|
||||
-# \ref filtering
|
||||
-# \ref realtime
|
||||
-# \ref crealtime
|
||||
-# \ref instruments
|
||||
-# \ref controlin
|
||||
-# \ref multichannel
|
||||
-# \ref polyvoices
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ The top level distribution contains the following directories:
|
||||
|
||||
<LI> The <I><B>include</B></I> directory contains the header files for all the STK unit generator and algorithm classes.</LI><P>
|
||||
|
||||
<LI> The <I><B>rawwaves</B></I> directory contains various raw, monophonic, 16-bit, big-endian soundfiles used with the STK classes.</LI><P>
|
||||
<LI> The <I><B>rawwaves</B></I> directory contains various raw, monophonic, 16-bit, big-endian, 22050 Hz soundfiles used with the STK classes.</LI><P>
|
||||
|
||||
<LI> The <I><B>doc</B></I> directory contains documentation about STK.</LI><P>
|
||||
|
||||
@@ -37,13 +37,13 @@ This release of STK comes with four separate "project" directories:
|
||||
|
||||
<LI> The <I><B>ragamatic</B></I> project is just cool. Fire it up and be enlightened.<P></LI>
|
||||
|
||||
<LI> The <I><B>examples</B></I> project contains several simple programs which demonstrate audio input/output, as well as the use of the audio internet streaming classes.</LI>
|
||||
<LI> The <I><B>examples</B></I> project contains several simple programs which demonstrate audio input/output, including the audio internet streaming classes, as well as most of the tutorial programs.</LI>
|
||||
</OL>
|
||||
|
||||
\section compiling Compiling:
|
||||
|
||||
<UL>
|
||||
<LI><B>Windows95/98/2000/XP:</B> Realtime support is available using either DirectSound or ASIO audio drivers. For DirectSound support, use the <TT>__WINDOWS_DS__</TT> preprocessor definition and link with the <TT>dsound.lib</TT>, <TT>winmm.lib</TT>, and <TT>Wsock32.lib</TT> libraries. For ASIO support, use the <TT>__WINDOWS_ASIO__</TT> preprocessor definition, include all the files in the <TT>src/asio/</TT> directory (i.e. <TT>asio.h,cpp</TT>, <TT>asiodrivers.h,cpp</TT>, ...), and link with the <TT>winmm.lib</TT>, and <TT>Wsock32.lib</TT> libraries. In addition, the <TT>__LITTLE_ENDIAN__</TT> preprocessor definition is necessary for all Windows systems. A distribution of the release is available with precompiled binaries (using DirectSound) for all the projects. In order for these binaries to function properly, your system must have the DirectX 5.0 (or higher) runtime libraries installed (available from <A HREF="http://www.microsoft.com/directx/">Microsoft</A>). Further, the <I><B>effects</B></I> project requires that your soundcard and drivers provide full duplex mode capabilities. Visual C++ 6.0 project files are provided in each project directory as well should you wish to compile your own binaries. It is important to link with the non-debug libraries when compiling "release" program versions and debug libraries when compiling "debug" program versions.</LI>
|
||||
<LI><B>Windows95/98/2000/XP:</B> Realtime support is available using either DirectSound or ASIO audio drivers. For DirectSound support, use the <TT>__WINDOWS_DS__</TT> preprocessor definition and link with the <TT>dsound.lib</TT>, <TT>winmm.lib</TT>, and <TT>Wsock32.lib</TT> libraries. For ASIO support, use the <TT>__WINDOWS_ASIO__</TT> preprocessor definition, include all the files in the <TT>src/asio/</TT> directory (i.e. <TT>asio.h,cpp</TT>, <TT>asiodrivers.h,cpp</TT>, ...), and link with the <TT>winmm.lib</TT>, and <TT>Wsock32.lib</TT> libraries. In addition, the <TT>__LITTLE_ENDIAN__</TT> and <TT>__WINDOWS_MM__</TT> preprocessor definitions are necessary for all Windows systems (RtMidi uses the Windows MultiMedia MIDI API). A distribution of the release is available with precompiled binaries (using DirectSound) for all the projects. In order for these binaries to function properly, your system must have the DirectX 5.0 (or higher) runtime libraries installed (available from <A HREF="http://www.microsoft.com/directx/">Microsoft</A>). Further, the <I><B>effects</B></I> project requires that your soundcard and drivers provide full duplex mode capabilities. Visual C++ 6.0 project files are provided in each project directory as well should you wish to compile your own binaries. It is important to link with the non-debug libraries when compiling "release" program versions and debug libraries when compiling "debug" program versions.</LI>
|
||||
|
||||
<LI><B>WindowsNT:</B> DirectX support for NT is inadequate, so it is not possible to use STK under WindowsNT with realtime DirectX support. It may be possible to use STK under WindowsNT with realtime ASIO support, though this has not been tested.</LI>
|
||||
|
||||
@@ -53,11 +53,12 @@ Several options can be supplied to the <TT>configure</TT> script to customize th
|
||||
<UL>
|
||||
<LI><TT>--disable-realtime</TT> to only compile generic non-realtime classes</LI>
|
||||
<LI><TT>--enable-debug</TT> to enable various debug output</LI>
|
||||
<LI><TT>--enable-midiator</TT> to enable native MS-124W MIDI support (linux only)</LI>
|
||||
<LI><TT>--with-alsa</TT> to choose native ALSA API support (linux only)</LI>
|
||||
<LI><TT>--with-alsa</TT> to choose native ALSA API support (default, linux only)</LI>
|
||||
<LI><TT>--with-jack</TT> to choose native JACK API support (linux only)</LI>
|
||||
<LI><TT>--with-oss</TT> to choose native OSS audio API support (linux only, no native OSS MIDI support)</LI>
|
||||
</UL>
|
||||
<P>
|
||||
In addition, it is possible to specify the location of the STK rawwaves and the STK include path as follows:
|
||||
Note that it is possible to specify as many of the "--with-" options as desired to compile multi-API support. In addition, it is possible to specify the location of the STK rawwaves and the STK include path as follows:
|
||||
\code
|
||||
./configure RAWWAVE_PATH="/home/gary/rawwaves/"
|
||||
./configure INCLUDE_PATH="/home/gary/include/"
|
||||
@@ -68,13 +69,13 @@ For novice STK users, the default configuration should be adequate.
|
||||
|
||||
For those who wish to create their own system-specific <TT>Makefiles</TT>:
|
||||
<UL>
|
||||
<LI><B>Linux:</B> Realtime support is enabled with either the <TT>__LINUX_OSS__</TT> or <TT>__LINUX_ALSA__</TT> preprocessor definitions, which are used to select the underlying audio/MIDI system API. Realtime programs must also link with the <TT>pthread</TT> library. When using the ALSA API, it is also necessary to link with the <TT>asound</TT> library. In addition, the <TT>__LITTLE_ENDIAN__</TT> preprocessor definition is necessary if compiling on a little-endian system. Special support exists under Linux for the MIDIator serial MIDI device, enabled using the <TT>__MIDIATOR__</TT> preprocessor definition (together with either the <TT>__LINUX_ALSA__</TT> or <TT>__LINUX_OSS__</TT> definitions). See the README-Linux file for further system configuration information.</LI>
|
||||
<LI><B>Linux:</B> Realtime audio support is enabled with either the <TT>__LINUX_ALSA__</TT>, <TT>__LINUX_JACK__</TT>, and/or <TT>__LINUX_OSS__</TT> preprocessor definitions, which are used to select the underlying audio system API(s). Because the ALSA library is now integrated into the standard Linux kernel, it is the default audio/MIDI API with STK versions 4.2 and higher. The <TT>__LINUX_ALSASEQ__</TT> preprocessor definition must be included for MIDI support. Note that native OSS MIDI support no longer exists in RtMidi. If the <TT>__LINUX_OSS__</TT> preprocessor definition is specified, only OSS audio support will be compiled and RtMidi will still be compiled using the ALSA API (assuming the <TT>__LINUX_ALSASEQ__</TT> definition is defined). For this reason, STK now requires the <TT>asound</TT> library for realtime support. Realtime programs must also link with the <TT>pthread</TT> library. In addition, the <TT>__LITTLE_ENDIAN__</TT> preprocessor definition is necessary if compiling on a little-endian system. See the README-Linux file for further system configuration information.</LI>
|
||||
|
||||
<LI><B>Macintosh OS X:</B> Realtime support is enabled with the <TT>__MACOSX_CORE__</TT> preprocessor definitions, which incorporates the CoreAudio audio/MIDI API. Realtime programs must also link with the <TT>pthread</TT> library and the <TT>CoreAudio</TT>, <TT>CoreMIDI</TT>, and <TT>CoreFoundation</TT> frameworks. See the README-MacOSX file for further system configuration information.</LI>
|
||||
|
||||
<LI><B>SGI:</B> Realtime support is enabled with the <TT>__IRIX_AL__</TT> preprocessor definition and linkage with the <TT>audio</TT>, <TT>md</TT>, and <TT>pthread</TT> libraries. STK 4.0 (and higher) is confirmed to compile using CC version 7.30. There may be problems with old compiler versions.</LI>
|
||||
<LI><B>SGI:</B> Realtime audio and MIDI support is enabled with the <TT>__IRIX_AL__</TT> and <TT>__IRIX_MD__</TT> preprocessor definitions and linkage with the <TT>audio</TT>, <TT>md</TT>, and <TT>pthread</TT> libraries. STK 4.0 (and higher) is confirmed to compile using CC version 7.30. There may be problems with old compiler versions.</LI>
|
||||
|
||||
<LI><B>Generic (non-realtime):</B> Most STK classes are operating system <I>independent</I> and can be compiled using any current C++ compiler. STK assumes big-endian host byte order by default, so if your system is little-endian (i.e. Intel processor), you must provide the <TT>__LITTLE_ENDIAN__</TT> preprocessor definition to your compiler. The <I><B>demo</B></I> project will compile without realtime support, allowing the use of SKINI scorefiles for input control and output to a variety of soundfile formats. The following classes <I>cannot</I> be used without realtime support: RtAudio, RtWvIn, RtWvOut, RtDuplex, RtMidi, Socket, Thread, TcpWvIn, TcpWvOut. Because of this, it is not possible to compile the <I><B>effects</B></I>, <I><B>ragamatic</B></I>, and most of the <I><B>examples</B></I> projects for non-realtime use.</LI>
|
||||
<LI><B>Generic (non-realtime):</B> Most STK classes are operating system <I>independent</I> and can be compiled using any current C++ compiler. STK assumes big-endian host byte order by default, so if your system is little-endian (i.e. Intel processor), you must provide the <TT>__LITTLE_ENDIAN__</TT> preprocessor definition to your compiler. The <I><B>demo</B></I> project will compile without realtime support, allowing the use of SKINI scorefiles for input control and output to a variety of soundfile formats. The following classes <I>cannot</I> be used without realtime support: RtAudio, RtWvIn, RtWvOut, RtDuplex, RtMidi, Socket, Thread, Mutex, TcpWvIn, TcpWvOut. Because of this, it is not possible to compile the <I><B>effects</B></I>, <I><B>ragamatic</B></I>, and most of the <I><B>examples</B></I> projects for non-realtime use.</LI>
|
||||
</UL>
|
||||
|
||||
|
||||
@@ -132,16 +133,10 @@ See the information above with respect to compiling STK for non-realtime use.
|
||||
In non-realtime mode, it is assumed that input control messages are provided from a SKINI scorefile and that audio output is written to a soundfile (.snd, .wav, .aif, .mat, .raw). A number of SKINI scorefiles are provided in the <I>scores</I> directory of the <I><B>demo</B></I> project. Assuming a successful compilation of the <I><B>demo</B></I> program, typing:
|
||||
|
||||
\code
|
||||
cat scores/bookert.ski | demo BeeThree -ow myfile.wav
|
||||
demo BeeThree -ow myfile.wav -if scores/bookert.ski
|
||||
\endcode
|
||||
|
||||
or (on WindowsXX and/or Unix)
|
||||
|
||||
\code
|
||||
demo BeeThree -ow myfile.wav < scores\bookert.ski
|
||||
\endcode
|
||||
|
||||
from the <I><B>demo</B></I> directory will play the scorefile <I>bookert.ski</I> using the STK BeeThree instrument and write the resulting audio data to a WAV formatted soundfile called "myfile.wav". Typing <TT>demo</TT> without any arguments will provide a full program usage description.
|
||||
from the <I><B>demo</B></I> directory will play the scorefile <I>bookert.ski</I> using the STK BeeThree instrument and write the resulting audio data to a WAV formatted soundfile called "myfile.wav" (note that you may need to append <TT>./</TT> to the program name if your default shell setup is not set to look in the current directory). Typing <TT>demo</TT> without any arguments will provide a full program usage description.
|
||||
|
||||
|
||||
\section rt Demo: Realtime Use
|
||||
@@ -157,27 +152,22 @@ demo instrument flags
|
||||
where instruments include those described above and flags can be any or all of:
|
||||
<UL>
|
||||
<LI><I>-or</I> for realtime audio output,</LI>
|
||||
<LI><I>-ow <file name></I> for WAV soundfile output,</LI>
|
||||
<LI><I>-os <file name></I> for SND (AU) soundfile output,</LI>
|
||||
<LI><I>-om <file name></I> for MAT-file output,</LI>
|
||||
<LI><I>-ow \<file name\></I> for WAV soundfile output,</LI>
|
||||
<LI><I>-os \<file name\></I> for SND (AU) soundfile output,</LI>
|
||||
<LI><I>-om \<file name\></I> for MAT-file output,</LI>
|
||||
<LI><I>-if \<file name\></I> for a SKINI formatted control file,</LI>
|
||||
<LI><I>-ip</I> for realtime SKINI control input via piping,</LI>
|
||||
<LI><I>-is <port></I> > for realtime SKINI control input via socketing (with an optional port number),</LI>
|
||||
<LI><I>-im <file name></I> for MIDI control input</LI>
|
||||
<LI><I>-s RATE</I> to specify a sample rate</LI>
|
||||
<LI><I>-is \<port\></I> for realtime SKINI control input via socketing (with an optional port number),</LI>
|
||||
<LI><I>-im \<port\></I> for MIDI control input (with optional port, -1 = virtual port where possible),</LI>
|
||||
<LI><I>-s RATE</I> to specify a sample rate,</LI>
|
||||
<LI><I>-n NUMBER</I> to specify multivoice polyphony</LI>
|
||||
</UL>
|
||||
The <-ip> and <-is> flags must be used when piping or socketing realtime SKINI control data to an STK program. The <-im> flag must be used to read MIDI control input from your MIDI port. Note that you can use all three input types simultaneously.
|
||||
The <i>-ip</i> and <i>-is</i> flags must be used when piping or socketing realtime SKINI control data to an STK program. The <i>-im</i> flag must be used to read MIDI control input from your MIDI port. Note that you can use all three input types simultaneously.
|
||||
|
||||
Assuming a successful compilation of the <I><B>demo</B></I> program, typing:
|
||||
|
||||
\code
|
||||
cat scores/bookert.ski | demo BeeThree -or
|
||||
\endcode
|
||||
|
||||
or (on WindowsXX and/or Unix)
|
||||
|
||||
\code
|
||||
demo BeeThree -or < scores\bookert.ski
|
||||
demo BeeThree -or -if scores/bookert.ski
|
||||
\endcode
|
||||
|
||||
from the <I><B>demo</B></I> directory will play the scorefile <I>bookert.ski</I> using the STK BeeThree instrument and stream the resulting audio data in realtime to the audio output channel of your computer. Typing <TT>demo</TT> without any arguments will provide a full program usage description.
|
||||
@@ -209,6 +199,7 @@ On all supported realtime platforms, you can direct realtime MIDI input to the S
|
||||
demo Clarinet -or -im
|
||||
\endcode
|
||||
|
||||
This will attempt to use the default MIDI port for input. An optional MIDI port number can be specified after the <TT>-im</TT> flag. Valid MIDI ports are numbered from 0 (default) and higher. On Linux and Macintosh OS-X systems, it is possible to open a virtual MIDI input port (which other software applications can connect to) by specifying a port identifier of -1.
|
||||
|
||||
\section polyphony Polyphony:
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>ADSR.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00016 <span class="comment">/***************************************************/</span>
|
||||
00017
|
||||
00018 <span class="preprocessor">#if !defined(__ADSR_H)</span>
|
||||
00019 <span class="preprocessor"></span><span class="preprocessor">#define __ADSR_H</span>
|
||||
00018 <span class="preprocessor">#ifndef STK_ADSR_H</span>
|
||||
00019 <span class="preprocessor"></span><span class="preprocessor">#define STK_ADSR_H</span>
|
||||
00020 <span class="preprocessor"></span>
|
||||
00021 <span class="preprocessor">#include "Envelope.h"</span>
|
||||
00022
|
||||
@@ -31,44 +31,47 @@
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a3">keyOff</a>(<span class="keywordtype">void</span>);
|
||||
00041
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a4">setAttackRate</a>(MY_FLOAT aRate);
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a4">setAttackRate</a>(StkFloat rate);
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a5">setDecayRate</a>(MY_FLOAT aRate);
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a5">setDecayRate</a>(StkFloat rate);
|
||||
00047
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a6">setSustainLevel</a>(MY_FLOAT aLevel);
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a6">setSustainLevel</a>(StkFloat level);
|
||||
00050
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a7">setReleaseRate</a>(MY_FLOAT aRate);
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a7">setReleaseRate</a>(StkFloat rate);
|
||||
00053
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a8">setAttackTime</a>(MY_FLOAT aTime);
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a8">setAttackTime</a>(StkFloat time);
|
||||
00056
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a9">setDecayTime</a>(MY_FLOAT aTime);
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a9">setDecayTime</a>(StkFloat time);
|
||||
00059
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a10">setReleaseTime</a>(MY_FLOAT aTime);
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a10">setReleaseTime</a>(StkFloat time);
|
||||
00062
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a11">setAllTimes</a>(MY_FLOAT aTime, MY_FLOAT dTime, MY_FLOAT sLevel, MY_FLOAT rTime);
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a11">setAllTimes</a>(StkFloat aTime, StkFloat dTime, StkFloat sLevel, StkFloat rTime);
|
||||
00065
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a12">setTarget</a>(MY_FLOAT aTarget);
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a12">setTarget</a>(StkFloat target);
|
||||
00068
|
||||
00070 <span class="keywordtype">int</span> <a class="code" href="classADSR.html#a13">getState</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00071
|
||||
00073 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a14">setValue</a>(MY_FLOAT aValue);
|
||||
00073 <span class="keywordtype">void</span> <a class="code" href="classADSR.html#a14">setValue</a>(StkFloat value);
|
||||
00074
|
||||
00076 MY_FLOAT <a class="code" href="classADSR.html#a15">tick</a>(<span class="keywordtype">void</span>);
|
||||
00076 StkFloat <a class="code" href="classADSR.html#a15">tick</a>(<span class="keywordtype">void</span>);
|
||||
00077
|
||||
00079 MY_FLOAT *<a class="code" href="classADSR.html#a15">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00079 StkFloat *<a class="code" href="classADSR.html#a15">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00080
|
||||
00081 <span class="keyword">protected</span>:
|
||||
00082 MY_FLOAT attackRate;
|
||||
00083 MY_FLOAT decayRate;
|
||||
00084 MY_FLOAT sustainLevel;
|
||||
00085 MY_FLOAT releaseRate;
|
||||
00086 };
|
||||
00087
|
||||
00088 <span class="preprocessor">#endif</span>
|
||||
00082
|
||||
00088 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classADSR.html#a15">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00089
|
||||
00090 <span class="keyword">protected</span>:
|
||||
00091 StkFloat attackRate_;
|
||||
00092 StkFloat decayRate_;
|
||||
00093 StkFloat sustainLevel_;
|
||||
00094 StkFloat releaseRate_;
|
||||
00095 };
|
||||
00096
|
||||
00097 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
62
doc/html/Asymp_8h-source.html
Normal file
62
doc/html/Asymp_8h-source.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Asymp.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00024 <span class="comment">/***************************************************/</span>
|
||||
00025
|
||||
00026 <span class="preprocessor">#ifndef STK_ASYMP_H</span>
|
||||
00027 <span class="preprocessor"></span><span class="preprocessor">#define STK_ASYMP_H</span>
|
||||
00028 <span class="preprocessor"></span>
|
||||
00029 <span class="preprocessor">#include "Envelope.h"</span>
|
||||
00030
|
||||
00031 <span class="keyword">const</span> StkFloat TARGET_THRESHOLD = 0.000001;
|
||||
00032
|
||||
<a name="l00033"></a><a class="code" href="classAsymp.html">00033</a> <span class="keyword">class </span><a class="code" href="classAsymp.html">Asymp</a> : <span class="keyword">public</span> <a class="code" href="classEnvelope.html">Envelope</a>
|
||||
00034 {
|
||||
00035 <span class="keyword">public</span>:
|
||||
00036
|
||||
00038 <a class="code" href="classAsymp.html#a0">Asymp</a>(<span class="keywordtype">void</span>);
|
||||
00039
|
||||
00041 <a class="code" href="classAsymp.html#a1">~Asymp</a>(<span class="keywordtype">void</span>);
|
||||
00042
|
||||
00044 <span class="keywordtype">void</span> <a class="code" href="classAsymp.html#a2">keyOn</a>(<span class="keywordtype">void</span>);
|
||||
00045
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classAsymp.html#a3">keyOff</a>(<span class="keywordtype">void</span>);
|
||||
00048
|
||||
00050
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classAsymp.html#a4">setTau</a>(StkFloat tau);
|
||||
00057
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classAsymp.html#a5">setTime</a>(StkFloat time);
|
||||
00060
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classAsymp.html#a6">setTarget</a>(StkFloat target);
|
||||
00063
|
||||
00065 StkFloat <a class="code" href="classAsymp.html#a7">tick</a>(<span class="keywordtype">void</span>);
|
||||
00066
|
||||
00068 StkFloat *<a class="code" href="classAsymp.html#a7">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00069
|
||||
00071
|
||||
00077 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classAsymp.html#a7">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00078
|
||||
00079 <span class="keyword">protected</span>:
|
||||
00080 StkFloat factor_;
|
||||
00081 StkFloat constant_;
|
||||
00082 };
|
||||
00083
|
||||
00084 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,18 +8,18 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>BandedWG.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00030 <span class="comment">/***************************************************/</span>
|
||||
00031
|
||||
00032 <span class="preprocessor">#if !defined(__BANDEDWG_H)</span>
|
||||
00033 <span class="preprocessor"></span><span class="preprocessor">#define __BANDEDWG_H</span>
|
||||
00032 <span class="preprocessor">#ifndef STK_BANDEDWG_H</span>
|
||||
00033 <span class="preprocessor"></span><span class="preprocessor">#define STK_BANDEDWG_H</span>
|
||||
00034 <span class="preprocessor"></span>
|
||||
00035 <span class="preprocessor">#define MAX_BANDED_MODES 20</span>
|
||||
00036 <span class="preprocessor"></span>
|
||||
00035 <span class="keyword">const</span> <span class="keywordtype">int</span> MAX_BANDED_MODES = 20;
|
||||
00036
|
||||
00037 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00038 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
00039 <span class="preprocessor">#include "BowTabl.h"</span>
|
||||
00039 <span class="preprocessor">#include "BowTable.h"</span>
|
||||
00040 <span class="preprocessor">#include "ADSR.h"</span>
|
||||
00041 <span class="preprocessor">#include "BiQuad.h"</span>
|
||||
00042
|
||||
@@ -32,58 +32,63 @@
|
||||
00051
|
||||
00053 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a2">clear</a>();
|
||||
00054
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a3">setStrikePosition</a>(MY_FLOAT position);
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a3">setStrikePosition</a>(StkFloat position);
|
||||
00057
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a4">setPreset</a>(<span class="keywordtype">int</span> preset);
|
||||
00060
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a5">setFrequency</a>(MY_FLOAT frequency);
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a5">setFrequency</a>(StkFloat frequency);
|
||||
00063
|
||||
00065 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a6">startBowing</a>(MY_FLOAT amplitude, MY_FLOAT rate);
|
||||
00065 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a6">startBowing</a>(StkFloat amplitude, StkFloat rate);
|
||||
00066
|
||||
00068 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a7">stopBowing</a>(MY_FLOAT rate);
|
||||
00068 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a7">stopBowing</a>(StkFloat rate);
|
||||
00069
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a8">pluck</a>(MY_FLOAT amp);
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a8">pluck</a>(StkFloat amp);
|
||||
00072
|
||||
00074 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a9">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00074 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a9">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00075
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a10">noteOff</a>(MY_FLOAT amplitude);
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a10">noteOff</a>(StkFloat amplitude);
|
||||
00078
|
||||
00080 MY_FLOAT <a class="code" href="classBandedWG.html#a11">tick</a>();
|
||||
00080 StkFloat <a class="code" href="classBandedWG.html#a11">tick</a>();
|
||||
00081
|
||||
00083 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a12">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00083 StkFloat *<a class="code" href="classBandedWG.html#a11">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00084
|
||||
00085 <span class="keyword">protected</span>:
|
||||
00086
|
||||
00087 <span class="keywordtype">bool</span> doPluck;
|
||||
00088 <span class="keywordtype">bool</span> trackVelocity;
|
||||
00089 <span class="keywordtype">int</span> nModes;
|
||||
00090 <span class="keywordtype">int</span> presetModes;
|
||||
00091 <a class="code" href="classBowTabl.html">BowTabl</a> *bowTabl;
|
||||
00092 <a class="code" href="classADSR.html">ADSR</a> *adsr;
|
||||
00093 <a class="code" href="classBiQuad.html">BiQuad</a> *bandpass;
|
||||
00094 <a class="code" href="classDelayL.html">DelayL</a> *delay;
|
||||
00095 MY_FLOAT maxVelocity;
|
||||
00096 MY_FLOAT modes[MAX_BANDED_MODES];
|
||||
00097 MY_FLOAT freakency;
|
||||
00098 MY_FLOAT baseGain;
|
||||
00099 MY_FLOAT gains[MAX_BANDED_MODES];
|
||||
00100 MY_FLOAT basegains[MAX_BANDED_MODES];
|
||||
00101 MY_FLOAT excitation[MAX_BANDED_MODES];
|
||||
00102 MY_FLOAT integrationConstant;
|
||||
00103 MY_FLOAT velocityInput;
|
||||
00104 MY_FLOAT bowVelocity;
|
||||
00105 MY_FLOAT bowTarget;
|
||||
00106 MY_FLOAT bowPosition;
|
||||
00107 MY_FLOAT strikeAmp;
|
||||
00108 <span class="keywordtype">int</span> strikePosition;
|
||||
00109
|
||||
00110 };
|
||||
00111
|
||||
00112 <span class="preprocessor">#endif</span>
|
||||
00092 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classBandedWG.html#a11">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00093
|
||||
00095 <span class="keywordtype">void</span> <a class="code" href="classBandedWG.html#a14">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00096
|
||||
00097 <span class="keyword">protected</span>:
|
||||
00098
|
||||
00099 <span class="keywordtype">bool</span> doPluck_;
|
||||
00100 <span class="keywordtype">bool</span> trackVelocity_;
|
||||
00101 <span class="keywordtype">int</span> nModes_;
|
||||
00102 <span class="keywordtype">int</span> presetModes_;
|
||||
00103 <a class="code" href="classBowTable.html">BowTable</a> bowTable_;
|
||||
00104 <a class="code" href="classADSR.html">ADSR</a> adsr_;
|
||||
00105 <a class="code" href="classBiQuad.html">BiQuad</a> bandpass_[MAX_BANDED_MODES];
|
||||
00106 <a class="code" href="classDelayL.html">DelayL</a> delay_[MAX_BANDED_MODES];
|
||||
00107 StkFloat maxVelocity_;
|
||||
00108 StkFloat modes_[MAX_BANDED_MODES];
|
||||
00109 StkFloat frequency_;
|
||||
00110 StkFloat baseGain_;
|
||||
00111 StkFloat gains_[MAX_BANDED_MODES];
|
||||
00112 StkFloat basegains_[MAX_BANDED_MODES];
|
||||
00113 StkFloat excitation_[MAX_BANDED_MODES];
|
||||
00114 StkFloat integrationConstant_;
|
||||
00115 StkFloat velocityInput_;
|
||||
00116 StkFloat bowVelocity_;
|
||||
00117 StkFloat bowTarget_;
|
||||
00118 StkFloat bowPosition_;
|
||||
00119 StkFloat strikeAmp_;
|
||||
00120 <span class="keywordtype">int</span> strikePosition_;
|
||||
00121
|
||||
00122 };
|
||||
00123
|
||||
00124 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,32 +8,38 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>BeeThree.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00033 <span class="comment">/***************************************************/</span>
|
||||
00034
|
||||
00035 <span class="preprocessor">#if !defined(__BEETHREE_H)</span>
|
||||
00036 <span class="preprocessor"></span><span class="preprocessor">#define __BEETHREE_H</span>
|
||||
00035 <span class="preprocessor">#ifndef STK_BEETHREE_H</span>
|
||||
00036 <span class="preprocessor"></span><span class="preprocessor">#define STK_BEETHREE_H</span>
|
||||
00037 <span class="preprocessor"></span>
|
||||
00038 <span class="preprocessor">#include "FM.h"</span>
|
||||
00039
|
||||
<a name="l00040"></a><a class="code" href="classBeeThree.html">00040</a> <span class="keyword">class </span><a class="code" href="classBeeThree.html">BeeThree</a> : <span class="keyword">public</span> <a class="code" href="classFM.html">FM</a>
|
||||
00041 {
|
||||
00042 <span class="keyword">public</span>:
|
||||
00044 <a class="code" href="classBeeThree.html#a0">BeeThree</a>();
|
||||
00045
|
||||
00047 <a class="code" href="classBeeThree.html#a1">~BeeThree</a>();
|
||||
00044
|
||||
00047 <a class="code" href="classBeeThree.html#a0">BeeThree</a>();
|
||||
00048
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classBeeThree.html#a2">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00050 <a class="code" href="classBeeThree.html#a1">~BeeThree</a>();
|
||||
00051
|
||||
00053 MY_FLOAT <a class="code" href="classBeeThree.html#a3">tick</a>();
|
||||
00054 };
|
||||
00055
|
||||
00056 <span class="preprocessor">#endif</span>
|
||||
00053 <span class="keywordtype">void</span> <a class="code" href="classBeeThree.html#a2">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00054
|
||||
00056 StkFloat <a class="code" href="classBeeThree.html#a3">tick</a>();
|
||||
00057
|
||||
00059 StkFloat *<a class="code" href="classBeeThree.html#a3">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00060
|
||||
00062
|
||||
00068 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classBeeThree.html#a3">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00069 };
|
||||
00070
|
||||
00071 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>BiQuad.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00013 <span class="comment">/***************************************************/</span>
|
||||
00014
|
||||
00015 <span class="preprocessor">#if !defined(__BIQUAD_H)</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define __BIQUAD_H</span>
|
||||
00015 <span class="preprocessor">#ifndef STK_BIQUAD_H</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define STK_BIQUAD_H</span>
|
||||
00017 <span class="preprocessor"></span>
|
||||
00018 <span class="preprocessor">#include "Filter.h"</span>
|
||||
00019
|
||||
@@ -27,42 +27,45 @@
|
||||
00029
|
||||
00031 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a2">clear</a>(<span class="keywordtype">void</span>);
|
||||
00032
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a3">setB0</a>(MY_FLOAT b0);
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a3">setB0</a>(StkFloat b0);
|
||||
00035
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a4">setB1</a>(MY_FLOAT b1);
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a4">setB1</a>(StkFloat b1);
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a5">setB2</a>(MY_FLOAT b2);
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a5">setB2</a>(StkFloat b2);
|
||||
00041
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a6">setA1</a>(MY_FLOAT a1);
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a6">setA1</a>(StkFloat a1);
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a7">setA2</a>(MY_FLOAT a2);
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a7">setA2</a>(StkFloat a2);
|
||||
00047
|
||||
00049
|
||||
00060 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a8">setResonance</a>(MY_FLOAT frequency, MY_FLOAT radius, <span class="keywordtype">bool</span> normalize = FALSE);
|
||||
00060 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a8">setResonance</a>(StkFloat frequency, StkFloat radius, <span class="keywordtype">bool</span> normalize = <span class="keyword">false</span>);
|
||||
00061
|
||||
00063
|
||||
00069 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a9">setNotch</a>(MY_FLOAT frequency, MY_FLOAT radius);
|
||||
00069 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a9">setNotch</a>(StkFloat frequency, StkFloat radius);
|
||||
00070
|
||||
00072
|
||||
00078 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a10">setEqualGainZeroes</a>();
|
||||
00079
|
||||
00081
|
||||
00085 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a11">setGain</a>(MY_FLOAT theGain);
|
||||
00085 <span class="keywordtype">void</span> <a class="code" href="classBiQuad.html#a11">setGain</a>(StkFloat gain);
|
||||
00086
|
||||
00088 MY_FLOAT <a class="code" href="classBiQuad.html#a12">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00088 StkFloat <a class="code" href="classBiQuad.html#a12">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00089
|
||||
00091 MY_FLOAT <a class="code" href="classBiQuad.html#a13">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00091 StkFloat <a class="code" href="classBiQuad.html#a13">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00092
|
||||
00094 MY_FLOAT <a class="code" href="classBiQuad.html#a14">tick</a>(MY_FLOAT sample);
|
||||
00094 <span class="keyword">virtual</span> StkFloat <a class="code" href="classBiQuad.html#a14">tick</a>(StkFloat sample);
|
||||
00095
|
||||
00097 MY_FLOAT *<a class="code" href="classBiQuad.html#a14">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00098 };
|
||||
00099
|
||||
00100 <span class="preprocessor">#endif</span>
|
||||
00097 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classBiQuad.html#a14">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00098
|
||||
00100
|
||||
00106 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classBiQuad.html#a14">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00107 };
|
||||
00108
|
||||
00109 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>BlowBotl.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00017 <span class="comment">/***************************************************/</span>
|
||||
00018
|
||||
00019 <span class="preprocessor">#if !defined(__BOTTLE_H)</span>
|
||||
00020 <span class="preprocessor"></span><span class="preprocessor">#define __BOTTLE_H</span>
|
||||
00019 <span class="preprocessor">#ifndef STK_BLOWBOTL_H</span>
|
||||
00020 <span class="preprocessor"></span><span class="preprocessor">#define STK_BLOWBOTL_H</span>
|
||||
00021 <span class="preprocessor"></span>
|
||||
00022 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00023 <span class="preprocessor">#include "JetTabl.h"</span>
|
||||
00023 <span class="preprocessor">#include "JetTable.h"</span>
|
||||
00024 <span class="preprocessor">#include "BiQuad.h"</span>
|
||||
00025 <span class="preprocessor">#include "PoleZero.h"</span>
|
||||
00026 <span class="preprocessor">#include "Noise.h"</span>
|
||||
@@ -26,45 +26,51 @@
|
||||
<a name="l00030"></a><a class="code" href="classBlowBotl.html">00030</a> <span class="keyword">class </span><a class="code" href="classBlowBotl.html">BlowBotl</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00031 {
|
||||
00032 <span class="keyword">public</span>:
|
||||
00034 <a class="code" href="classBlowBotl.html#a0">BlowBotl</a>();
|
||||
00035
|
||||
00037 <a class="code" href="classBlowBotl.html#a1">~BlowBotl</a>();
|
||||
00034
|
||||
00037 <a class="code" href="classBlowBotl.html#a0">BlowBotl</a>();
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a2">clear</a>();
|
||||
00040 <a class="code" href="classBlowBotl.html#a1">~BlowBotl</a>();
|
||||
00041
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a2">clear</a>();
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a4">startBlowing</a>(MY_FLOAT amplitude, MY_FLOAT rate);
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00047
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a5">stopBlowing</a>(MY_FLOAT rate);
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a4">startBlowing</a>(StkFloat amplitude, StkFloat rate);
|
||||
00050
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a6">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a5">stopBlowing</a>(StkFloat rate);
|
||||
00053
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a7">noteOff</a>(MY_FLOAT amplitude);
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a6">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00056
|
||||
00058 MY_FLOAT <a class="code" href="classBlowBotl.html#a8">tick</a>();
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a7">noteOff</a>(StkFloat amplitude);
|
||||
00059
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a9">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00061 StkFloat <a class="code" href="classBlowBotl.html#a8">tick</a>();
|
||||
00062
|
||||
00063 <span class="keyword">protected</span>:
|
||||
00064 <a class="code" href="classJetTabl.html">JetTabl</a> *jetTable;
|
||||
00065 <a class="code" href="classBiQuad.html">BiQuad</a> *resonator;
|
||||
00066 <a class="code" href="classPoleZero.html">PoleZero</a> *dcBlock;
|
||||
00067 <a class="code" href="classNoise.html">Noise</a> *noise;
|
||||
00068 <a class="code" href="classADSR.html">ADSR</a> *adsr;
|
||||
00069 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00070 MY_FLOAT maxPressure;
|
||||
00071 MY_FLOAT noiseGain;
|
||||
00072 MY_FLOAT vibratoGain;
|
||||
00073 MY_FLOAT outputGain;
|
||||
00064 StkFloat *<a class="code" href="classBlowBotl.html#a8">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00065
|
||||
00067
|
||||
00073 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classBlowBotl.html#a8">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00074
|
||||
00075 };
|
||||
00076
|
||||
00077 <span class="preprocessor">#endif</span>
|
||||
00076 <span class="keywordtype">void</span> <a class="code" href="classBlowBotl.html#a11">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00077
|
||||
00078 <span class="keyword">protected</span>:
|
||||
00079 <a class="code" href="classJetTable.html">JetTable</a> jetTable_;
|
||||
00080 <a class="code" href="classBiQuad.html">BiQuad</a> resonator_;
|
||||
00081 <a class="code" href="classPoleZero.html">PoleZero</a> dcBlock_;
|
||||
00082 <a class="code" href="classNoise.html">Noise</a> noise_;
|
||||
00083 <a class="code" href="classADSR.html">ADSR</a> adsr_;
|
||||
00084 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00085 StkFloat maxPressure_;
|
||||
00086 StkFloat noiseGain_;
|
||||
00087 StkFloat vibratoGain_;
|
||||
00088 StkFloat outputGain_;
|
||||
00089
|
||||
00090 };
|
||||
00091
|
||||
00092 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>BlowHole.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00034 <span class="comment">/***************************************************/</span>
|
||||
00035
|
||||
00036 <span class="preprocessor">#if !defined(__BLOWHOLE_H)</span>
|
||||
00037 <span class="preprocessor"></span><span class="preprocessor">#define __BLOWHOLE_H</span>
|
||||
00036 <span class="preprocessor">#ifndef STK_BLOWHOLE_H</span>
|
||||
00037 <span class="preprocessor"></span><span class="preprocessor">#define STK_BLOWHOLE_H</span>
|
||||
00038 <span class="preprocessor"></span>
|
||||
00039 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00040 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
00041 <span class="preprocessor">#include "ReedTabl.h"</span>
|
||||
00041 <span class="preprocessor">#include "ReedTable.h"</span>
|
||||
00042 <span class="preprocessor">#include "OneZero.h"</span>
|
||||
00043 <span class="preprocessor">#include "PoleZero.h"</span>
|
||||
00044 <span class="preprocessor">#include "Envelope.h"</span>
|
||||
@@ -27,56 +27,60 @@
|
||||
<a name="l00048"></a><a class="code" href="classBlowHole.html">00048</a> <span class="keyword">class </span><a class="code" href="classBlowHole.html">BlowHole</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00049 {
|
||||
00050 <span class="keyword">public</span>:
|
||||
00052 <a class="code" href="classBlowHole.html#a0">BlowHole</a>(MY_FLOAT lowestFrequency);
|
||||
00053
|
||||
00055 <a class="code" href="classBlowHole.html#a1">~BlowHole</a>();
|
||||
00052
|
||||
00055 <a class="code" href="classBlowHole.html#a0">BlowHole</a>(StkFloat lowestFrequency);
|
||||
00056
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a2">clear</a>();
|
||||
00058 <a class="code" href="classBlowHole.html#a1">~BlowHole</a>();
|
||||
00059
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a2">clear</a>();
|
||||
00062
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a4">setTonehole</a>(MY_FLOAT newValue);
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00065
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a5">setVent</a>(MY_FLOAT newValue);
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a4">setTonehole</a>(StkFloat newValue);
|
||||
00068
|
||||
00070 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a6">startBlowing</a>(MY_FLOAT amplitude, MY_FLOAT rate);
|
||||
00070 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a5">setVent</a>(StkFloat newValue);
|
||||
00071
|
||||
00073 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a7">stopBlowing</a>(MY_FLOAT rate);
|
||||
00073 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a6">startBlowing</a>(StkFloat amplitude, StkFloat rate);
|
||||
00074
|
||||
00076 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a8">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00076 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a7">stopBlowing</a>(StkFloat rate);
|
||||
00077
|
||||
00079 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a9">noteOff</a>(MY_FLOAT amplitude);
|
||||
00079 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a8">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00080
|
||||
00082 MY_FLOAT <a class="code" href="classBlowHole.html#a10">tick</a>();
|
||||
00082 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a9">noteOff</a>(StkFloat amplitude);
|
||||
00083
|
||||
00085 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a11">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00085 StkFloat <a class="code" href="classBlowHole.html#a10">tick</a>();
|
||||
00086
|
||||
00087 <span class="keyword">protected</span>:
|
||||
00088 <a class="code" href="classDelayL.html">DelayL</a> *delays[3];
|
||||
00089 <a class="code" href="classReedTabl.html">ReedTabl</a> *reedTable;
|
||||
00090 <a class="code" href="classOneZero.html">OneZero</a> *filter;
|
||||
00091 <a class="code" href="classPoleZero.html">PoleZero</a> *tonehole;
|
||||
00092 <a class="code" href="classPoleZero.html">PoleZero</a> *vent;
|
||||
00093 <a class="code" href="classEnvelope.html">Envelope</a> *envelope;
|
||||
00094 <a class="code" href="classNoise.html">Noise</a> *noise;
|
||||
00095 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00096 <span class="keywordtype">long</span> length;
|
||||
00097 MY_FLOAT scatter;
|
||||
00098 MY_FLOAT th_coeff;
|
||||
00099 MY_FLOAT r_th;
|
||||
00100 MY_FLOAT rh_coeff;
|
||||
00101 MY_FLOAT rh_gain;
|
||||
00102 MY_FLOAT outputGain;
|
||||
00103 MY_FLOAT noiseGain;
|
||||
00104 MY_FLOAT vibratoGain;
|
||||
00105
|
||||
00106 };
|
||||
00107
|
||||
00108 <span class="preprocessor">#endif</span>
|
||||
00088 StkFloat *<a class="code" href="classBlowHole.html#a10">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00089
|
||||
00091
|
||||
00097 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classBlowHole.html#a10">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00098
|
||||
00100 <span class="keywordtype">void</span> <a class="code" href="classBlowHole.html#a13">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00101
|
||||
00102 <span class="keyword">protected</span>:
|
||||
00103 <a class="code" href="classDelayL.html">DelayL</a> delays_[3];
|
||||
00104 <a class="code" href="classReedTable.html">ReedTable</a> reedTable_;
|
||||
00105 <a class="code" href="classOneZero.html">OneZero</a> filter_;
|
||||
00106 <a class="code" href="classPoleZero.html">PoleZero</a> tonehole_;
|
||||
00107 <a class="code" href="classPoleZero.html">PoleZero</a> vent_;
|
||||
00108 <a class="code" href="classEnvelope.html">Envelope</a> envelope_;
|
||||
00109 <a class="code" href="classNoise.html">Noise</a> noise_;
|
||||
00110 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00111 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length_;
|
||||
00112 StkFloat scatter_;
|
||||
00113 StkFloat thCoeff_;
|
||||
00114 StkFloat rhGain_;
|
||||
00115 StkFloat outputGain_;
|
||||
00116 StkFloat noiseGain_;
|
||||
00117 StkFloat vibratoGain_;
|
||||
00118
|
||||
00119 };
|
||||
00120
|
||||
00121 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<h1>BowTabl.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00010 <span class="comment">/***************************************************/</span>
|
||||
00011
|
||||
00012 <span class="preprocessor">#if !defined(__BOWTABL_H)</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define __BOWTABL_H</span>
|
||||
00014 <span class="preprocessor"></span>
|
||||
00015 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00016
|
||||
<a name="l00017"></a><a class="code" href="classBowTabl.html">00017</a> <span class="keyword">class </span><a class="code" href="classBowTabl.html">BowTabl</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00018 {
|
||||
00019 <span class="keyword">public</span>:
|
||||
00021 <a class="code" href="classBowTabl.html#a0">BowTabl</a>();
|
||||
00022
|
||||
00024 <a class="code" href="classBowTabl.html#a1">~BowTabl</a>();
|
||||
00025
|
||||
00027
|
||||
00033 <span class="keywordtype">void</span> <a class="code" href="classBowTabl.html#a2">setOffset</a>(MY_FLOAT aValue);
|
||||
00034
|
||||
00036
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classBowTabl.html#a3">setSlope</a>(MY_FLOAT aValue);
|
||||
00041
|
||||
00043 MY_FLOAT <a class="code" href="classBowTabl.html#a4">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00044
|
||||
00046
|
||||
00050 MY_FLOAT <a class="code" href="classBowTabl.html#a5">tick</a>(<span class="keyword">const</span> MY_FLOAT input);
|
||||
00051
|
||||
00053 MY_FLOAT *<a class="code" href="classBowTabl.html#a5">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00054
|
||||
00055 <span class="keyword">protected</span>:
|
||||
00056 MY_FLOAT offSet;
|
||||
00057 MY_FLOAT slope;
|
||||
00058 MY_FLOAT lastOutput;
|
||||
00059
|
||||
00060 };
|
||||
00061
|
||||
00062 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
56
doc/html/BowTable_8h-source.html
Normal file
56
doc/html/BowTable_8h-source.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>BowTable.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00010 <span class="comment">/***************************************************/</span>
|
||||
00011
|
||||
00012 <span class="preprocessor">#ifndef STK_BOWTABL_H</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define STK_BOWTABL_H</span>
|
||||
00014 <span class="preprocessor"></span>
|
||||
00015 <span class="preprocessor">#include "Function.h"</span>
|
||||
00016
|
||||
<a name="l00017"></a><a class="code" href="classBowTable.html">00017</a> <span class="keyword">class </span><a class="code" href="classBowTable.html">BowTable</a> : <span class="keyword">public</span> <a class="code" href="classFunction.html">Function</a>
|
||||
00018 {
|
||||
00019 <span class="keyword">public</span>:
|
||||
00021 <a class="code" href="classBowTable.html#a0">BowTable</a>();
|
||||
00022
|
||||
00024 <a class="code" href="classBowTable.html#a1">~BowTable</a>();
|
||||
00025
|
||||
00027
|
||||
00033 <span class="keywordtype">void</span> <a class="code" href="classBowTable.html#a2">setOffset</a>(StkFloat offset);
|
||||
00034
|
||||
00036
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classBowTable.html#a3">setSlope</a>(StkFloat slope);
|
||||
00041
|
||||
00043
|
||||
00047 StkFloat <a class="code" href="classBowTable.html#a4">tick</a>( StkFloat input);
|
||||
00048
|
||||
00050 StkFloat *<a class="code" href="classBowTable.html#a4">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00051
|
||||
00053
|
||||
00059 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classBowTable.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00060
|
||||
00061 <span class="keyword">protected</span>:
|
||||
00062 StkFloat offset_;
|
||||
00063 StkFloat slope_;
|
||||
00064
|
||||
00065 };
|
||||
00066
|
||||
00067 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,16 +8,16 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Bowed.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00022 <span class="comment">/***************************************************/</span>
|
||||
00023
|
||||
00024 <span class="preprocessor">#if !defined(__BOWED_H)</span>
|
||||
00025 <span class="preprocessor"></span><span class="preprocessor">#define __BOWED_H</span>
|
||||
00024 <span class="preprocessor">#ifndef STK_BOWED_H</span>
|
||||
00025 <span class="preprocessor"></span><span class="preprocessor">#define STK_BOWED_H</span>
|
||||
00026 <span class="preprocessor"></span>
|
||||
00027 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00028 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
00029 <span class="preprocessor">#include "BowTabl.h"</span>
|
||||
00029 <span class="preprocessor">#include "BowTable.h"</span>
|
||||
00030 <span class="preprocessor">#include "OnePole.h"</span>
|
||||
00031 <span class="preprocessor">#include "BiQuad.h"</span>
|
||||
00032 <span class="preprocessor">#include "WaveLoop.h"</span>
|
||||
@@ -26,48 +26,53 @@
|
||||
<a name="l00035"></a><a class="code" href="classBowed.html">00035</a> <span class="keyword">class </span><a class="code" href="classBowed.html">Bowed</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00036 {
|
||||
00037 <span class="keyword">public</span>:
|
||||
00039 <a class="code" href="classBowed.html#a0">Bowed</a>(MY_FLOAT lowestFrequency);
|
||||
00039 <a class="code" href="classBowed.html#a0">Bowed</a>(StkFloat lowestFrequency);
|
||||
00040
|
||||
00042 <a class="code" href="classBowed.html#a1">~Bowed</a>();
|
||||
00043
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a2">clear</a>();
|
||||
00046
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00049
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a4">setVibrato</a>(MY_FLOAT gain);
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a4">setVibrato</a>(StkFloat gain);
|
||||
00052
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a5">startBowing</a>(MY_FLOAT amplitude, MY_FLOAT rate);
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a5">startBowing</a>(StkFloat amplitude, StkFloat rate);
|
||||
00055
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a6">stopBowing</a>(MY_FLOAT rate);
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a6">stopBowing</a>(StkFloat rate);
|
||||
00058
|
||||
00060 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a7">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00060 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a7">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00061
|
||||
00063 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a8">noteOff</a>(MY_FLOAT amplitude);
|
||||
00063 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a8">noteOff</a>(StkFloat amplitude);
|
||||
00064
|
||||
00066 MY_FLOAT <a class="code" href="classBowed.html#a9">tick</a>();
|
||||
00066 StkFloat <a class="code" href="classBowed.html#a9">tick</a>();
|
||||
00067
|
||||
00069 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a10">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00069 StkFloat *<a class="code" href="classBowed.html#a9">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00070
|
||||
00071 <span class="keyword">protected</span>:
|
||||
00072 <a class="code" href="classDelayL.html">DelayL</a> *neckDelay;
|
||||
00073 <a class="code" href="classDelayL.html">DelayL</a> *bridgeDelay;
|
||||
00074 <a class="code" href="classBowTabl.html">BowTabl</a> *bowTable;
|
||||
00075 <a class="code" href="classOnePole.html">OnePole</a> *stringFilter;
|
||||
00076 <a class="code" href="classBiQuad.html">BiQuad</a> *bodyFilter;
|
||||
00077 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00078 <a class="code" href="classADSR.html">ADSR</a> *adsr;
|
||||
00079 MY_FLOAT maxVelocity;
|
||||
00080 MY_FLOAT baseDelay;
|
||||
00081 MY_FLOAT vibratoGain;
|
||||
00082 MY_FLOAT betaRatio;
|
||||
00083
|
||||
00084 };
|
||||
00085
|
||||
00086 <span class="preprocessor">#endif</span>
|
||||
00072
|
||||
00078 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classBowed.html#a9">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00079
|
||||
00081 <span class="keywordtype">void</span> <a class="code" href="classBowed.html#a12">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00082
|
||||
00083 <span class="keyword">protected</span>:
|
||||
00084 <a class="code" href="classDelayL.html">DelayL</a> neckDelay_;
|
||||
00085 <a class="code" href="classDelayL.html">DelayL</a> bridgeDelay_;
|
||||
00086 <a class="code" href="classBowTable.html">BowTable</a> bowTable_;
|
||||
00087 <a class="code" href="classOnePole.html">OnePole</a> stringFilter_;
|
||||
00088 <a class="code" href="classBiQuad.html">BiQuad</a> bodyFilter_;
|
||||
00089 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00090 <a class="code" href="classADSR.html">ADSR</a> adsr_;
|
||||
00091 StkFloat maxVelocity_;
|
||||
00092 StkFloat baseDelay_;
|
||||
00093 StkFloat vibratoGain_;
|
||||
00094 StkFloat betaRatio_;
|
||||
00095
|
||||
00096 };
|
||||
00097
|
||||
00098 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Brass.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00021 <span class="comment">/***************************************************/</span>
|
||||
00022
|
||||
00023 <span class="preprocessor">#if !defined(__BRASS_H)</span>
|
||||
00024 <span class="preprocessor"></span><span class="preprocessor">#define __BRASS_H</span>
|
||||
00023 <span class="preprocessor">#ifndef STK_BRASS_H</span>
|
||||
00024 <span class="preprocessor"></span><span class="preprocessor">#define STK_BRASS_H</span>
|
||||
00025 <span class="preprocessor"></span>
|
||||
00026 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00027 <span class="preprocessor">#include "DelayA.h"</span>
|
||||
@@ -25,47 +25,53 @@
|
||||
<a name="l00033"></a><a class="code" href="classBrass.html">00033</a> <span class="keyword">class </span><a class="code" href="classBrass.html">Brass</a>: <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00034 {
|
||||
00035 <span class="keyword">public</span>:
|
||||
00037 <a class="code" href="classBrass.html#a0">Brass</a>(MY_FLOAT lowestFrequency);
|
||||
00038
|
||||
00040 <a class="code" href="classBrass.html#a1">~Brass</a>();
|
||||
00037
|
||||
00040 <a class="code" href="classBrass.html#a0">Brass</a>(StkFloat lowestFrequency);
|
||||
00041
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a2">clear</a>();
|
||||
00043 <a class="code" href="classBrass.html#a1">~Brass</a>();
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a2">clear</a>();
|
||||
00047
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a4">setLip</a>(MY_FLOAT frequency);
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00050
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a5">startBlowing</a>(MY_FLOAT amplitude,MY_FLOAT rate);
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a4">setLip</a>(StkFloat frequency);
|
||||
00053
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a6">stopBlowing</a>(MY_FLOAT rate);
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a5">startBlowing</a>(StkFloat amplitude, StkFloat rate);
|
||||
00056
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a7">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a6">stopBlowing</a>(StkFloat rate);
|
||||
00059
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a8">noteOff</a>(MY_FLOAT amplitude);
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a7">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00062
|
||||
00064 MY_FLOAT <a class="code" href="classBrass.html#a9">tick</a>();
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a8">noteOff</a>(StkFloat amplitude);
|
||||
00065
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a10">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00067 StkFloat <a class="code" href="classBrass.html#a9">tick</a>();
|
||||
00068
|
||||
00069 <span class="keyword">protected</span>:
|
||||
00070 <a class="code" href="classDelayA.html">DelayA</a> *delayLine;
|
||||
00071 <a class="code" href="classBiQuad.html">BiQuad</a> *lipFilter;
|
||||
00072 <a class="code" href="classPoleZero.html">PoleZero</a> *dcBlock;
|
||||
00073 <a class="code" href="classADSR.html">ADSR</a> *adsr;
|
||||
00074 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00075 <span class="keywordtype">long</span> length;
|
||||
00076 MY_FLOAT lipTarget;
|
||||
00077 MY_FLOAT slideTarget;
|
||||
00078 MY_FLOAT vibratoGain;
|
||||
00079 MY_FLOAT maxPressure;
|
||||
00070 StkFloat *<a class="code" href="classBrass.html#a9">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00071
|
||||
00073
|
||||
00079 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classBrass.html#a9">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00080
|
||||
00081 };
|
||||
00082
|
||||
00083 <span class="preprocessor">#endif</span>
|
||||
00082 <span class="keywordtype">void</span> <a class="code" href="classBrass.html#a12">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00083
|
||||
00084 <span class="keyword">protected</span>:
|
||||
00085 <a class="code" href="classDelayA.html">DelayA</a> delayLine_;
|
||||
00086 <a class="code" href="classBiQuad.html">BiQuad</a> lipFilter_;
|
||||
00087 <a class="code" href="classPoleZero.html">PoleZero</a> dcBlock_;
|
||||
00088 <a class="code" href="classADSR.html">ADSR</a> adsr_;
|
||||
00089 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00090 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length_;
|
||||
00091 StkFloat lipTarget_;
|
||||
00092 StkFloat slideTarget_;
|
||||
00093 StkFloat vibratoGain_;
|
||||
00094 StkFloat maxPressure_;
|
||||
00095
|
||||
00096 };
|
||||
00097
|
||||
00098 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,58 +8,52 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Chorus.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00009 <span class="comment">/***************************************************/</span>
|
||||
00010
|
||||
00011 <span class="preprocessor">#if !defined(__CHORUS_H)</span>
|
||||
00012 <span class="preprocessor"></span><span class="preprocessor">#define __CHORUS_H</span>
|
||||
00011 <span class="preprocessor">#ifndef STK_CHORUS_H</span>
|
||||
00012 <span class="preprocessor"></span><span class="preprocessor">#define STK_CHORUS_H</span>
|
||||
00013 <span class="preprocessor"></span>
|
||||
00014 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00014 <span class="preprocessor">#include "Effect.h"</span>
|
||||
00015 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
00016 <span class="preprocessor">#include "WaveLoop.h"</span>
|
||||
00017
|
||||
<a name="l00018"></a><a class="code" href="classChorus.html">00018</a> <span class="keyword">class </span><a class="code" href="classChorus.html">Chorus</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
<a name="l00018"></a><a class="code" href="classChorus.html">00018</a> <span class="keyword">class </span><a class="code" href="classChorus.html">Chorus</a> : <span class="keyword">public</span> <a class="code" href="classEffect.html">Effect</a>
|
||||
00019 {
|
||||
00020 <span class="keyword">public</span>:
|
||||
00022 <a class="code" href="classChorus.html#a0">Chorus</a>(MY_FLOAT baseDelay);
|
||||
00023
|
||||
00025 <a class="code" href="classChorus.html#a1">~Chorus</a>();
|
||||
00022
|
||||
00025 <a class="code" href="classChorus.html#a0">Chorus</a>( StkFloat baseDelay = 6000 );
|
||||
00026
|
||||
00028 <span class="keywordtype">void</span> <a class="code" href="classChorus.html#a2">clear</a>();
|
||||
00028 <a class="code" href="classChorus.html#a1">~Chorus</a>();
|
||||
00029
|
||||
00031 <span class="keywordtype">void</span> <a class="code" href="classChorus.html#a3">setModDepth</a>(MY_FLOAT depth);
|
||||
00031 <span class="keywordtype">void</span> <a class="code" href="classChorus.html#a2">clear</a>();
|
||||
00032
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classChorus.html#a4">setModFrequency</a>(MY_FLOAT frequency);
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classChorus.html#a3">setModDepth</a>(StkFloat depth);
|
||||
00035
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classChorus.html#a5">setEffectMix</a>(MY_FLOAT mix);
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classChorus.html#a4">setModFrequency</a>(StkFloat frequency);
|
||||
00038
|
||||
00040 MY_FLOAT <a class="code" href="classChorus.html#a6">lastOut</a>() <span class="keyword">const</span>;
|
||||
00040 StkFloat <a class="code" href="classChorus.html#a5">tick</a>(StkFloat input);
|
||||
00041
|
||||
00043 MY_FLOAT <a class="code" href="classChorus.html#a7">lastOutLeft</a>() <span class="keyword">const</span>;
|
||||
00043 StkFloat *<a class="code" href="classChorus.html#a5">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00044
|
||||
00046 MY_FLOAT <a class="code" href="classChorus.html#a8">lastOutRight</a>() <span class="keyword">const</span>;
|
||||
00047
|
||||
00049 MY_FLOAT <a class="code" href="classChorus.html#a9">tick</a>(MY_FLOAT input);
|
||||
00050
|
||||
00052 MY_FLOAT *<a class="code" href="classChorus.html#a9">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00046
|
||||
00052 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classChorus.html#a5">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00053
|
||||
00054 <span class="keyword">protected</span>:
|
||||
00055 <a class="code" href="classDelayL.html">DelayL</a> *delayLine[2];
|
||||
00056 <a class="code" href="classWaveLoop.html">WaveLoop</a> *mods[2];
|
||||
00057 MY_FLOAT baseLength;
|
||||
00058 MY_FLOAT modDepth;
|
||||
00059 MY_FLOAT lastOutput[2];
|
||||
00060 MY_FLOAT effectMix;
|
||||
00055 <a class="code" href="classDelayL.html">DelayL</a> delayLine_[2];
|
||||
00056 <a class="code" href="classWaveLoop.html">WaveLoop</a> *mods_[2];
|
||||
00057 StkFloat baseLength_;
|
||||
00058 StkFloat modDepth_;
|
||||
00059
|
||||
00060 };
|
||||
00061
|
||||
00062 };
|
||||
00063
|
||||
00064 <span class="preprocessor">#endif</span>
|
||||
00065 <span class="preprocessor"></span>
|
||||
00062 <span class="preprocessor">#endif</span>
|
||||
00063 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Clarinet.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00023 <span class="comment">/***************************************************/</span>
|
||||
00024
|
||||
00025 <span class="preprocessor">#if !defined(__CLARINET_H)</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define __CLARINET_H</span>
|
||||
00025 <span class="preprocessor">#ifndef STK_CLARINET_H</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define STK_CLARINET_H</span>
|
||||
00027 <span class="preprocessor"></span>
|
||||
00028 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00029 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
00030 <span class="preprocessor">#include "ReedTabl.h"</span>
|
||||
00030 <span class="preprocessor">#include "ReedTable.h"</span>
|
||||
00031 <span class="preprocessor">#include "OneZero.h"</span>
|
||||
00032 <span class="preprocessor">#include "Envelope.h"</span>
|
||||
00033 <span class="preprocessor">#include "Noise.h"</span>
|
||||
@@ -26,45 +26,51 @@
|
||||
<a name="l00036"></a><a class="code" href="classClarinet.html">00036</a> <span class="keyword">class </span><a class="code" href="classClarinet.html">Clarinet</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00037 {
|
||||
00038 <span class="keyword">public</span>:
|
||||
00040 <a class="code" href="classClarinet.html#a0">Clarinet</a>(MY_FLOAT lowestFrequency);
|
||||
00041
|
||||
00043 <a class="code" href="classClarinet.html#a1">~Clarinet</a>();
|
||||
00040
|
||||
00043 <a class="code" href="classClarinet.html#a0">Clarinet</a>(StkFloat lowestFrequency);
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a2">clear</a>();
|
||||
00046 <a class="code" href="classClarinet.html#a1">~Clarinet</a>();
|
||||
00047
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a2">clear</a>();
|
||||
00050
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a4">startBlowing</a>(MY_FLOAT amplitude, MY_FLOAT rate);
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00053
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a5">stopBlowing</a>(MY_FLOAT rate);
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a4">startBlowing</a>(StkFloat amplitude, StkFloat rate);
|
||||
00056
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a6">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a5">stopBlowing</a>(StkFloat rate);
|
||||
00059
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a7">noteOff</a>(MY_FLOAT amplitude);
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a6">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00062
|
||||
00064 MY_FLOAT <a class="code" href="classClarinet.html#a8">tick</a>();
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a7">noteOff</a>(StkFloat amplitude);
|
||||
00065
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a9">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00067 StkFloat <a class="code" href="classClarinet.html#a8">tick</a>();
|
||||
00068
|
||||
00069 <span class="keyword">protected</span>:
|
||||
00070 <a class="code" href="classDelayL.html">DelayL</a> *delayLine;
|
||||
00071 <a class="code" href="classReedTabl.html">ReedTabl</a> *reedTable;
|
||||
00072 <a class="code" href="classOneZero.html">OneZero</a> *filter;
|
||||
00073 <a class="code" href="classEnvelope.html">Envelope</a> *envelope;
|
||||
00074 <a class="code" href="classNoise.html">Noise</a> *noise;
|
||||
00075 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00076 <span class="keywordtype">long</span> length;
|
||||
00077 MY_FLOAT outputGain;
|
||||
00078 MY_FLOAT noiseGain;
|
||||
00079 MY_FLOAT vibratoGain;
|
||||
00070 StkFloat *<a class="code" href="classClarinet.html#a8">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00071
|
||||
00073
|
||||
00079 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classClarinet.html#a8">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00080
|
||||
00081 };
|
||||
00082
|
||||
00083 <span class="preprocessor">#endif</span>
|
||||
00082 <span class="keywordtype">void</span> <a class="code" href="classClarinet.html#a11">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00083
|
||||
00084 <span class="keyword">protected</span>:
|
||||
00085 <a class="code" href="classDelayL.html">DelayL</a> delayLine_;
|
||||
00086 <a class="code" href="classReedTable.html">ReedTable</a> reedTable_;
|
||||
00087 <a class="code" href="classOneZero.html">OneZero</a> filter_;
|
||||
00088 <a class="code" href="classEnvelope.html">Envelope</a> envelope_;
|
||||
00089 <a class="code" href="classNoise.html">Noise</a> noise_;
|
||||
00090 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00091 <span class="keywordtype">long</span> length_;
|
||||
00092 StkFloat outputGain_;
|
||||
00093 StkFloat noiseGain_;
|
||||
00094 StkFloat vibratoGain_;
|
||||
00095
|
||||
00096 };
|
||||
00097
|
||||
00098 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>DelayA.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00023 <span class="comment">/***************************************************/</span>
|
||||
00024
|
||||
00025 <span class="preprocessor">#if !defined(__DelayA_h)</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define __DelayA_h</span>
|
||||
00025 <span class="preprocessor">#ifndef STK_DELAYA_H</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define STK_DELAYA_H</span>
|
||||
00027 <span class="preprocessor"></span>
|
||||
00028 <span class="preprocessor">#include "Delay.h"</span>
|
||||
00029
|
||||
@@ -23,36 +23,41 @@
|
||||
00033
|
||||
00035 <a class="code" href="classDelayA.html#a0">DelayA</a>();
|
||||
00036
|
||||
00038
|
||||
00039 <a class="code" href="classDelayA.html#a0">DelayA</a>(MY_FLOAT theDelay, <span class="keywordtype">long</span> maxDelay);
|
||||
00040
|
||||
00042 <a class="code" href="classDelayA.html#a2">~DelayA</a>();
|
||||
00043
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classDelayA.html#a3">clear</a>();
|
||||
00046
|
||||
00048
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classDelayA.html#a4">setDelay</a>(MY_FLOAT theDelay);
|
||||
00038
|
||||
00043 <a class="code" href="classDelayA.html#a0">DelayA</a>(StkFloat delay, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> maxDelay);
|
||||
00044
|
||||
00046 <a class="code" href="classDelayA.html#a2">~DelayA</a>();
|
||||
00047
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classDelayA.html#a3">clear</a>();
|
||||
00050
|
||||
00052
|
||||
00054 MY_FLOAT <a class="code" href="classDelayA.html#a5">getDelay</a>(<span class="keywordtype">void</span>);
|
||||
00055
|
||||
00057
|
||||
00060 MY_FLOAT <a class="code" href="classDelayA.html#a6">nextOut</a>(<span class="keywordtype">void</span>);
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classDelayA.html#a4">setDelay</a>(StkFloat delay);
|
||||
00056
|
||||
00058 StkFloat <a class="code" href="classDelayA.html#a5">getDelay</a>(<span class="keywordtype">void</span>);
|
||||
00059
|
||||
00061
|
||||
00063 MY_FLOAT <a class="code" href="classDelayA.html#a7">tick</a>(MY_FLOAT sample);
|
||||
00064
|
||||
00065 <span class="keyword">protected</span>:
|
||||
00066 MY_FLOAT alpha;
|
||||
00067 MY_FLOAT coeff;
|
||||
00068 MY_FLOAT apInput;
|
||||
00069 MY_FLOAT nextOutput;
|
||||
00070 <span class="keywordtype">bool</span> doNextOut;
|
||||
00071 };
|
||||
00072
|
||||
00073 <span class="preprocessor">#endif</span>
|
||||
00064 StkFloat <a class="code" href="classDelayA.html#a6">nextOut</a>(<span class="keywordtype">void</span>);
|
||||
00065
|
||||
00067 StkFloat <a class="code" href="classDelayA.html#a7">tick</a>(StkFloat sample);
|
||||
00068
|
||||
00070 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classDelayA.html#a7">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00071
|
||||
00073
|
||||
00079 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classDelayA.html#a7">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00080
|
||||
00081 <span class="keyword">protected</span>:
|
||||
00082 StkFloat alpha_;
|
||||
00083 StkFloat coeff_;
|
||||
00084 StkFloat apInput_;
|
||||
00085 StkFloat nextOutput_;
|
||||
00086 <span class="keywordtype">bool</span> doNextOut_;
|
||||
00087 };
|
||||
00088
|
||||
00089 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>DelayL.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00023 <span class="comment">/***************************************************/</span>
|
||||
00024
|
||||
00025 <span class="preprocessor">#if !defined(__DELAYL_H)</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define __DELAYL_H</span>
|
||||
00025 <span class="preprocessor">#ifndef STK_DELAYL_H</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define STK_DELAYL_H</span>
|
||||
00027 <span class="preprocessor"></span>
|
||||
00028 <span class="preprocessor">#include "Delay.h"</span>
|
||||
00029
|
||||
@@ -23,33 +23,38 @@
|
||||
00033
|
||||
00035 <a class="code" href="classDelayL.html#a0">DelayL</a>();
|
||||
00036
|
||||
00038
|
||||
00039 <a class="code" href="classDelayL.html#a0">DelayL</a>(MY_FLOAT theDelay, <span class="keywordtype">long</span> maxDelay);
|
||||
00040
|
||||
00042 <a class="code" href="classDelayL.html#a2">~DelayL</a>();
|
||||
00043
|
||||
00045
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classDelayL.html#a3">setDelay</a>(MY_FLOAT theDelay);
|
||||
00038
|
||||
00043 <a class="code" href="classDelayL.html#a0">DelayL</a>(StkFloat delay, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> maxDelay);
|
||||
00044
|
||||
00046 <a class="code" href="classDelayL.html#a2">~DelayL</a>();
|
||||
00047
|
||||
00049
|
||||
00051 MY_FLOAT <a class="code" href="classDelayL.html#a4">getDelay</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00052
|
||||
00054
|
||||
00057 MY_FLOAT <a class="code" href="classDelayL.html#a5">nextOut</a>(<span class="keywordtype">void</span>);
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classDelayL.html#a3">setDelay</a>(StkFloat delay);
|
||||
00053
|
||||
00055 StkFloat <a class="code" href="classDelayL.html#a4">getDelay</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00056
|
||||
00058
|
||||
00060 MY_FLOAT <a class="code" href="classDelayL.html#a6">tick</a>(MY_FLOAT sample);
|
||||
00061
|
||||
00062 <span class="keyword">protected</span>:
|
||||
00063 MY_FLOAT alpha;
|
||||
00064 MY_FLOAT omAlpha;
|
||||
00065 MY_FLOAT nextOutput;
|
||||
00066 <span class="keywordtype">bool</span> doNextOut;
|
||||
00067 };
|
||||
00061 StkFloat <a class="code" href="classDelayL.html#a5">nextOut</a>(<span class="keywordtype">void</span>);
|
||||
00062
|
||||
00064 StkFloat <a class="code" href="classDelayL.html#a6">tick</a>(StkFloat sample);
|
||||
00065
|
||||
00067 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classDelayL.html#a6">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00068
|
||||
00069 <span class="preprocessor">#endif</span>
|
||||
00070
|
||||
00076 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classDelayL.html#a6">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00077
|
||||
00078 <span class="keyword">protected</span>:
|
||||
00079 StkFloat alpha_;
|
||||
00080 StkFloat omAlpha_;
|
||||
00081 StkFloat nextOutput_;
|
||||
00082 <span class="keywordtype">bool</span> doNextOut_;
|
||||
00083 };
|
||||
00084
|
||||
00085 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Delay.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00019 <span class="comment">/***************************************************/</span>
|
||||
00020
|
||||
00021 <span class="preprocessor">#if !defined(__DELAY_H)</span>
|
||||
00022 <span class="preprocessor"></span><span class="preprocessor">#define __DELAY_H</span>
|
||||
00021 <span class="preprocessor">#ifndef STK_DELAY_H</span>
|
||||
00022 <span class="preprocessor"></span><span class="preprocessor">#define STK_DELAY_H</span>
|
||||
00023 <span class="preprocessor"></span>
|
||||
00024 <span class="preprocessor">#include "Filter.h"</span>
|
||||
00025
|
||||
@@ -23,44 +23,50 @@
|
||||
00029
|
||||
00031 <a class="code" href="classDelay.html#a0">Delay</a>();
|
||||
00032
|
||||
00034 <a class="code" href="classDelay.html#a0">Delay</a>(<span class="keywordtype">long</span> theDelay, <span class="keywordtype">long</span> maxDelay);
|
||||
00035
|
||||
00037 <span class="keyword">virtual</span> <a class="code" href="classDelay.html#a2">~Delay</a>();
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classDelay.html#a3">clear</a>();
|
||||
00041
|
||||
00034
|
||||
00039 <a class="code" href="classDelay.html#a0">Delay</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> delay, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> maxDelay);
|
||||
00040
|
||||
00042 <span class="keyword">virtual</span> <a class="code" href="classDelay.html#a2">~Delay</a>();
|
||||
00043
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classDelay.html#a4">setDelay</a>(<span class="keywordtype">long</span> theDelay);
|
||||
00047
|
||||
00049 <span class="keywordtype">long</span> <a class="code" href="classDelay.html#a5">getDelay</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00050
|
||||
00052 MY_FLOAT <a class="code" href="classDelay.html#a6">energy</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00053
|
||||
00055
|
||||
00060 MY_FLOAT <a class="code" href="classDelay.html#a7">contentsAt</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> tapDelay) <span class="keyword">const</span>;
|
||||
00061
|
||||
00063 MY_FLOAT <a class="code" href="classDelay.html#a8">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00064
|
||||
00066
|
||||
00069 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classDelay.html#a9">nextOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classDelay.html#a3">clear</a>();
|
||||
00046
|
||||
00048
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classDelay.html#a4">setMaximumDelay</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> delay);
|
||||
00056
|
||||
00058
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classDelay.html#a5">setDelay</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> delay);
|
||||
00062
|
||||
00064 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classDelay.html#a6">getDelay</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00065
|
||||
00067 StkFloat <a class="code" href="classDelay.html#a7">energy</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00068
|
||||
00070
|
||||
00072 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classDelay.html#a10">tick</a>(MY_FLOAT sample);
|
||||
00073
|
||||
00075 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classDelay.html#a10">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00075 StkFloat <a class="code" href="classDelay.html#a8">contentsAt</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> tapDelay);
|
||||
00076
|
||||
00077 <span class="keyword">protected</span>:
|
||||
00078 <span class="keywordtype">long</span> inPoint;
|
||||
00079 <span class="keywordtype">long</span> outPoint;
|
||||
00080 <span class="keywordtype">long</span> length;
|
||||
00081 MY_FLOAT delay;
|
||||
00082 };
|
||||
00083
|
||||
00084 <span class="preprocessor">#endif</span>
|
||||
00085 <span class="preprocessor"></span>
|
||||
00078 StkFloat <a class="code" href="classDelay.html#a9">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00079
|
||||
00081
|
||||
00084 <span class="keyword">virtual</span> StkFloat <a class="code" href="classDelay.html#a10">nextOut</a>(<span class="keywordtype">void</span>);
|
||||
00085
|
||||
00087 <span class="keyword">virtual</span> StkFloat <a class="code" href="classDelay.html#a11">tick</a>(StkFloat sample);
|
||||
00088
|
||||
00090 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classDelay.html#a11">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00091
|
||||
00093
|
||||
00099 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classDelay.html#a11">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00100
|
||||
00101 <span class="keyword">protected</span>:
|
||||
00102 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> inPoint_;
|
||||
00103 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> outPoint_;
|
||||
00104 StkFloat delay_;
|
||||
00105 };
|
||||
00106
|
||||
00107 <span class="preprocessor">#endif</span>
|
||||
00108 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,47 +8,52 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Drummer.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00016 <span class="comment">/***************************************************/</span>
|
||||
00017
|
||||
00018 <span class="preprocessor">#if !defined(__DRUMMER_H)</span>
|
||||
00019 <span class="preprocessor"></span><span class="preprocessor">#define __DRUMMER_H</span>
|
||||
00018 <span class="preprocessor">#ifndef STK_DRUMMER_H</span>
|
||||
00019 <span class="preprocessor"></span><span class="preprocessor">#define STK_DRUMMER_H</span>
|
||||
00020 <span class="preprocessor"></span>
|
||||
00021 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00022 <span class="preprocessor">#include "WvIn.h"</span>
|
||||
00023 <span class="preprocessor">#include "OnePole.h"</span>
|
||||
00024
|
||||
00025 <span class="preprocessor">#define DRUM_NUMWAVES 11</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define DRUM_POLYPHONY 4</span>
|
||||
00027 <span class="preprocessor"></span>
|
||||
00025 <span class="keyword">const</span> <span class="keywordtype">int</span> DRUM_NUMWAVES = 11;
|
||||
00026 <span class="keyword">const</span> <span class="keywordtype">int</span> DRUM_POLYPHONY = 4;
|
||||
00027
|
||||
<a name="l00028"></a><a class="code" href="classDrummer.html">00028</a> <span class="keyword">class </span><a class="code" href="classDrummer.html">Drummer</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00029 {
|
||||
00030 <span class="keyword">public</span>:
|
||||
00032 <a class="code" href="classDrummer.html#a0">Drummer</a>();
|
||||
00033
|
||||
00035 <a class="code" href="classDrummer.html#a1">~Drummer</a>();
|
||||
00032
|
||||
00035 <a class="code" href="classDrummer.html#a0">Drummer</a>();
|
||||
00036
|
||||
00038
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classDrummer.html#a2">noteOn</a>(MY_FLOAT instrument, MY_FLOAT amplitude);
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classDrummer.html#a3">noteOff</a>(MY_FLOAT amplitude);
|
||||
00047
|
||||
00049 MY_FLOAT <a class="code" href="classDrummer.html#a4">tick</a>();
|
||||
00050
|
||||
00051 <span class="keyword">protected</span>:
|
||||
00052 <a class="code" href="classWvIn.html">WvIn</a> *waves[DRUM_POLYPHONY];
|
||||
00053 <a class="code" href="classOnePole.html">OnePole</a> *filters[DRUM_POLYPHONY];
|
||||
00054 <span class="keywordtype">int</span> sounding[DRUM_POLYPHONY];
|
||||
00055 <span class="keywordtype">int</span> nSounding;
|
||||
00056
|
||||
00057 };
|
||||
00058
|
||||
00059 <span class="preprocessor">#endif</span>
|
||||
00038 <a class="code" href="classDrummer.html#a1">~Drummer</a>();
|
||||
00039
|
||||
00041
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classDrummer.html#a2">noteOn</a>(StkFloat instrument, StkFloat amplitude);
|
||||
00048
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classDrummer.html#a3">noteOff</a>(StkFloat amplitude);
|
||||
00051
|
||||
00053 StkFloat <a class="code" href="classDrummer.html#a4">tick</a>();
|
||||
00054
|
||||
00056 StkFloat *<a class="code" href="classDrummer.html#a4">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00057
|
||||
00059
|
||||
00065 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classDrummer.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00066
|
||||
00067 <span class="keyword">protected</span>:
|
||||
00068 <a class="code" href="classWvIn.html">WvIn</a> *waves_[DRUM_POLYPHONY];
|
||||
00069 <a class="code" href="classOnePole.html">OnePole</a> *filters_[DRUM_POLYPHONY];
|
||||
00070 <span class="keywordtype">int</span> sounding_[DRUM_POLYPHONY];
|
||||
00071 <span class="keywordtype">int</span> nSounding_;
|
||||
00072 };
|
||||
00073
|
||||
00074 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,49 +8,49 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Echo.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00009 <span class="comment">/***************************************************/</span>
|
||||
00010
|
||||
00011 <span class="preprocessor">#if !defined(__ECHO_H)</span>
|
||||
00012 <span class="preprocessor"></span><span class="preprocessor">#define __ECHO_H</span>
|
||||
00011 <span class="preprocessor">#ifndef STK_ECHO_H</span>
|
||||
00012 <span class="preprocessor"></span><span class="preprocessor">#define STK_ECHO_H</span>
|
||||
00013 <span class="preprocessor"></span>
|
||||
00014 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00014 <span class="preprocessor">#include "Effect.h"</span>
|
||||
00015 <span class="preprocessor">#include "Delay.h"</span>
|
||||
00016
|
||||
<a name="l00017"></a><a class="code" href="classEcho.html">00017</a> <span class="keyword">class </span><a class="code" href="classEcho.html">Echo</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
<a name="l00017"></a><a class="code" href="classEcho.html">00017</a> <span class="keyword">class </span><a class="code" href="classEcho.html">Echo</a> : <span class="keyword">public</span> <a class="code" href="classEffect.html">Effect</a>
|
||||
00018 {
|
||||
00019 <span class="keyword">public</span>:
|
||||
00021 <a class="code" href="classEcho.html#a0">Echo</a>(MY_FLOAT longestDelay);
|
||||
00022
|
||||
00024 <a class="code" href="classEcho.html#a1">~Echo</a>();
|
||||
00021
|
||||
00024 <a class="code" href="classEcho.html#a0">Echo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> maximumDelay = (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>) <a class="code" href="classStk.html#e0">Stk::sampleRate</a>() );
|
||||
00025
|
||||
00027 <span class="keywordtype">void</span> <a class="code" href="classEcho.html#a2">clear</a>();
|
||||
00027 <a class="code" href="classEcho.html#a1">~Echo</a>();
|
||||
00028
|
||||
00030 <span class="keywordtype">void</span> <a class="code" href="classEcho.html#a3">setDelay</a>(MY_FLOAT delay);
|
||||
00030 <span class="keywordtype">void</span> <a class="code" href="classEcho.html#a2">clear</a>();
|
||||
00031
|
||||
00033 <span class="keywordtype">void</span> <a class="code" href="classEcho.html#a4">setEffectMix</a>(MY_FLOAT mix);
|
||||
00033 <span class="keywordtype">void</span> <a class="code" href="classEcho.html#a3">setMaximumDelay</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> delay );
|
||||
00034
|
||||
00036 MY_FLOAT <a class="code" href="classEcho.html#a5">lastOut</a>() <span class="keyword">const</span>;
|
||||
00036 <span class="keywordtype">void</span> <a class="code" href="classEcho.html#a4">setDelay</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> delay );
|
||||
00037
|
||||
00039 MY_FLOAT <a class="code" href="classEcho.html#a6">tick</a>(MY_FLOAT input);
|
||||
00039 StkFloat <a class="code" href="classEcho.html#a5">tick</a>(StkFloat input);
|
||||
00040
|
||||
00042 MY_FLOAT *<a class="code" href="classEcho.html#a6">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00042 StkFloat *<a class="code" href="classEcho.html#a5">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00043
|
||||
00044 <span class="keyword">protected</span>:
|
||||
00045 <a class="code" href="classDelay.html">Delay</a> *delayLine;
|
||||
00046 <span class="keywordtype">long</span> length;
|
||||
00047 MY_FLOAT lastOutput;
|
||||
00048 MY_FLOAT effectMix;
|
||||
00049
|
||||
00050 };
|
||||
00051
|
||||
00052 <span class="preprocessor">#endif</span>
|
||||
00053 <span class="preprocessor"></span>
|
||||
00045
|
||||
00051 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classEcho.html#a5">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00052
|
||||
00053 <span class="keyword">protected</span>:
|
||||
00054 <a class="code" href="classDelay.html">Delay</a> delayLine_;
|
||||
00055 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length_;
|
||||
00056
|
||||
00057 };
|
||||
00058
|
||||
00059 <span class="preprocessor">#endif</span>
|
||||
00060 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
64
doc/html/Effect_8h-source.html
Normal file
64
doc/html/Effect_8h-source.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Effect.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00010 <span class="comment">/***************************************************/</span>
|
||||
00011
|
||||
00012 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00013
|
||||
00014 <span class="preprocessor">#ifndef STK_EFFECT_H</span>
|
||||
00015 <span class="preprocessor"></span><span class="preprocessor">#define STK_EFFECT_H</span>
|
||||
00016 <span class="preprocessor"></span>
|
||||
<a name="l00017"></a><a class="code" href="classEffect.html">00017</a> <span class="keyword">class </span><a class="code" href="classEffect.html">Effect</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00018 {
|
||||
00019 <span class="keyword">public</span>:
|
||||
00021 <a class="code" href="classEffect.html#a0">Effect</a>();
|
||||
00022
|
||||
00024 <span class="keyword">virtual</span> <a class="code" href="classEffect.html#a1">~Effect</a>();
|
||||
00025
|
||||
00027 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEffect.html#a2">clear</a>() = 0;
|
||||
00028
|
||||
00030 <span class="keywordtype">void</span> <a class="code" href="classEffect.html#a3">setEffectMix</a>(StkFloat mix);
|
||||
00031
|
||||
00033 StkFloat <a class="code" href="classEffect.html#a4">lastOut</a>() <span class="keyword">const</span>;
|
||||
00034
|
||||
00036 StkFloat <a class="code" href="classEffect.html#a5">lastOutLeft</a>() <span class="keyword">const</span>;
|
||||
00037
|
||||
00039 StkFloat <a class="code" href="classEffect.html#a6">lastOutRight</a>() <span class="keyword">const</span>;
|
||||
00040
|
||||
00042 <span class="keyword">virtual</span> StkFloat <a class="code" href="classEffect.html#a7">tick</a>( StkFloat input ) = 0;
|
||||
00043
|
||||
00045 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classEffect.html#a7">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00046
|
||||
00048
|
||||
00054 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classEffect.html#a7">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00055
|
||||
00056 <span class="keyword">protected</span>:
|
||||
00057
|
||||
00058 <span class="comment">// Returns true if argument value is prime.</span>
|
||||
00059 <span class="keywordtype">bool</span> isPrime( <span class="keywordtype">int</span> number );
|
||||
00060
|
||||
00061 StkFloat lastOutput_[2];
|
||||
00062 StkFloat effectMix_;
|
||||
00063
|
||||
00064 };
|
||||
00065
|
||||
00066 <span class="preprocessor">#endif</span>
|
||||
00067 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,16 +8,16 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Envelope.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00014 <span class="comment">/***************************************************/</span>
|
||||
00015
|
||||
00016 <span class="preprocessor">#if !defined(__ENVELOPE_H)</span>
|
||||
00017 <span class="preprocessor"></span><span class="preprocessor">#define __ENVELOPE_H</span>
|
||||
00016 <span class="preprocessor">#ifndef STK_ENVELOPE_H</span>
|
||||
00017 <span class="preprocessor"></span><span class="preprocessor">#define STK_ENVELOPE_H</span>
|
||||
00018 <span class="preprocessor"></span>
|
||||
00019 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00019 <span class="preprocessor">#include "Generator.h"</span>
|
||||
00020
|
||||
<a name="l00021"></a><a class="code" href="classEnvelope.html">00021</a> <span class="keyword">class </span><a class="code" href="classEnvelope.html">Envelope</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
<a name="l00021"></a><a class="code" href="classEnvelope.html">00021</a> <span class="keyword">class </span><a class="code" href="classEnvelope.html">Envelope</a> : <span class="keyword">public</span> <a class="code" href="classGenerator.html">Generator</a>
|
||||
00022 {
|
||||
00023 <span class="keyword">public</span>:
|
||||
00024
|
||||
@@ -29,34 +29,35 @@
|
||||
00033
|
||||
00035 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a3">keyOff</a>(<span class="keywordtype">void</span>);
|
||||
00036
|
||||
00038 <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a4">setRate</a>(MY_FLOAT aRate);
|
||||
00038 <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a4">setRate</a>(StkFloat rate);
|
||||
00039
|
||||
00041 <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a5">setTime</a>(MY_FLOAT aTime);
|
||||
00041 <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a5">setTime</a>(StkFloat time);
|
||||
00042
|
||||
00044 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a6">setTarget</a>(MY_FLOAT aTarget);
|
||||
00044 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a6">setTarget</a>(StkFloat target);
|
||||
00045
|
||||
00047 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a7">setValue</a>(MY_FLOAT aValue);
|
||||
00047 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEnvelope.html#a7">setValue</a>(StkFloat value);
|
||||
00048
|
||||
00050 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classEnvelope.html#a8">getState</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00051
|
||||
00053 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classEnvelope.html#a9">tick</a>(<span class="keywordtype">void</span>);
|
||||
00053 <span class="keyword">virtual</span> StkFloat <a class="code" href="classEnvelope.html#a9">tick</a>(<span class="keywordtype">void</span>);
|
||||
00054
|
||||
00056 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classEnvelope.html#a9">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00056 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classEnvelope.html#a9">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00057
|
||||
00059 MY_FLOAT <a class="code" href="classEnvelope.html#a11">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00060
|
||||
00061 <span class="keyword">protected</span>:
|
||||
00062 MY_FLOAT value;
|
||||
00063 MY_FLOAT target;
|
||||
00064 MY_FLOAT rate;
|
||||
00065 <span class="keywordtype">int</span> state;
|
||||
00066 };
|
||||
00067
|
||||
00068 <span class="preprocessor">#endif</span>
|
||||
00059
|
||||
00065 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classEnvelope.html#a9">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00066
|
||||
00067 <span class="keyword">protected</span>:
|
||||
00068 StkFloat value_;
|
||||
00069 StkFloat target_;
|
||||
00070 StkFloat rate_;
|
||||
00071 <span class="keywordtype">int</span> state_;
|
||||
00072 };
|
||||
00073
|
||||
00074 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,41 +8,47 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>FMVoices.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00031 <span class="comment">/***************************************************/</span>
|
||||
00032
|
||||
00033 <span class="preprocessor">#if !defined(__FMVOICES_H)</span>
|
||||
00034 <span class="preprocessor"></span><span class="preprocessor">#define __FMVOICES_H</span>
|
||||
00033 <span class="preprocessor">#ifndef STK_FMVOICES_H</span>
|
||||
00034 <span class="preprocessor"></span><span class="preprocessor">#define STK_FMVOICES_H</span>
|
||||
00035 <span class="preprocessor"></span>
|
||||
00036 <span class="preprocessor">#include "FM.h"</span>
|
||||
00037
|
||||
<a name="l00038"></a><a class="code" href="classFMVoices.html">00038</a> <span class="keyword">class </span><a class="code" href="classFMVoices.html">FMVoices</a> : <span class="keyword">public</span> <a class="code" href="classFM.html">FM</a>
|
||||
00039 {
|
||||
00040 <span class="keyword">public</span>:
|
||||
00042 <a class="code" href="classFMVoices.html#a0">FMVoices</a>();
|
||||
00043
|
||||
00045 <a class="code" href="classFMVoices.html#a1">~FMVoices</a>();
|
||||
00042
|
||||
00045 <a class="code" href="classFMVoices.html#a0">FMVoices</a>();
|
||||
00046
|
||||
00048 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFMVoices.html#a2">setFrequency</a>(MY_FLOAT frequency);
|
||||
00048 <a class="code" href="classFMVoices.html#a1">~FMVoices</a>();
|
||||
00049
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classFMVoices.html#a3">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00051 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFMVoices.html#a2">setFrequency</a>(StkFloat frequency);
|
||||
00052
|
||||
00054 MY_FLOAT <a class="code" href="classFMVoices.html#a4">tick</a>();
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classFMVoices.html#a3">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00055
|
||||
00057 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFMVoices.html#a5">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00057 StkFloat <a class="code" href="classFMVoices.html#a4">tick</a>();
|
||||
00058
|
||||
00059 <span class="keyword">protected</span>:
|
||||
00060 <span class="keywordtype">int</span> currentVowel;
|
||||
00061 MY_FLOAT tilt[3];
|
||||
00062 MY_FLOAT mods[3];
|
||||
00063 };
|
||||
00064
|
||||
00065 <span class="preprocessor">#endif</span>
|
||||
00060 StkFloat *<a class="code" href="classFMVoices.html#a4">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00061
|
||||
00063
|
||||
00069 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classFMVoices.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00070
|
||||
00072 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFMVoices.html#a7">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00073
|
||||
00074 <span class="keyword">protected</span>:
|
||||
00075 <span class="keywordtype">int</span> currentVowel_;
|
||||
00076 StkFloat tilt_[3];
|
||||
00077 StkFloat mods_[3];
|
||||
00078 };
|
||||
00079
|
||||
00080 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>FM.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00024 <span class="comment">/***************************************************/</span>
|
||||
00025
|
||||
00026 <span class="preprocessor">#if !defined(__FM_H)</span>
|
||||
00027 <span class="preprocessor"></span><span class="preprocessor">#define __FM_H</span>
|
||||
00026 <span class="preprocessor">#ifndef STK_FM_H</span>
|
||||
00027 <span class="preprocessor"></span><span class="preprocessor">#define STK_FM_H</span>
|
||||
00028 <span class="preprocessor"></span>
|
||||
00029 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00030 <span class="preprocessor">#include "ADSR.h"</span>
|
||||
@@ -23,61 +23,67 @@
|
||||
<a name="l00034"></a><a class="code" href="classFM.html">00034</a> <span class="keyword">class </span><a class="code" href="classFM.html">FM</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00035 {
|
||||
00036 <span class="keyword">public</span>:
|
||||
00038 <a class="code" href="classFM.html#a0">FM</a>( <span class="keywordtype">int</span> operators = 4 );
|
||||
00039
|
||||
00041 <span class="keyword">virtual</span> <a class="code" href="classFM.html#a1">~FM</a>();
|
||||
00038
|
||||
00041 <a class="code" href="classFM.html#a0">FM</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> operators = 4 );
|
||||
00042
|
||||
00044 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a2">clear</a>();
|
||||
00044 <span class="keyword">virtual</span> <a class="code" href="classFM.html#a1">~FM</a>();
|
||||
00045
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a3">loadWaves</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> **filenames);
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a2">clear</a>();
|
||||
00048
|
||||
00050 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFM.html#a4">setFrequency</a>(MY_FLOAT frequency);
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a3">loadWaves</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> **filenames);
|
||||
00051
|
||||
00053 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a5">setRatio</a>(<span class="keywordtype">int</span> waveIndex, MY_FLOAT ratio);
|
||||
00053 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFM.html#a4">setFrequency</a>(StkFloat frequency);
|
||||
00054
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a6">setGain</a>(<span class="keywordtype">int</span> waveIndex, MY_FLOAT gain);
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a5">setRatio</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> waveIndex, StkFloat ratio);
|
||||
00057
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a7">setModulationSpeed</a>(MY_FLOAT mSpeed);
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a6">setGain</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> waveIndex, StkFloat gain);
|
||||
00060
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a8">setModulationDepth</a>(MY_FLOAT mDepth);
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a7">setModulationSpeed</a>(StkFloat mSpeed);
|
||||
00063
|
||||
00065 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a9">setControl1</a>(MY_FLOAT cVal);
|
||||
00065 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a8">setModulationDepth</a>(StkFloat mDepth);
|
||||
00066
|
||||
00068 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a10">setControl2</a>(MY_FLOAT cVal);
|
||||
00068 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a9">setControl1</a>(StkFloat cVal);
|
||||
00069
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a11">keyOn</a>();
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a10">setControl2</a>(StkFloat cVal);
|
||||
00072
|
||||
00074 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a12">keyOff</a>();
|
||||
00074 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a11">keyOn</a>();
|
||||
00075
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a13">noteOff</a>(MY_FLOAT amplitude);
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a12">keyOff</a>();
|
||||
00078
|
||||
00080 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classFM.html#a14">tick</a>() = 0;
|
||||
00080 <span class="keywordtype">void</span> <a class="code" href="classFM.html#a13">noteOff</a>(StkFloat amplitude);
|
||||
00081
|
||||
00083 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFM.html#a15">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00083 <span class="keyword">virtual</span> StkFloat <a class="code" href="classFM.html#a14">tick</a>() = 0;
|
||||
00084
|
||||
00085 <span class="keyword">protected</span>:
|
||||
00086 <a class="code" href="classADSR.html">ADSR</a> **adsr;
|
||||
00087 <a class="code" href="classWaveLoop.html">WaveLoop</a> **waves;
|
||||
00088 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00089 <a class="code" href="classTwoZero.html">TwoZero</a> *twozero;
|
||||
00090 <span class="keywordtype">int</span> nOperators;
|
||||
00091 MY_FLOAT baseFrequency;
|
||||
00092 MY_FLOAT *ratios;
|
||||
00093 MY_FLOAT *gains;
|
||||
00094 MY_FLOAT modDepth;
|
||||
00095 MY_FLOAT control1;
|
||||
00096 MY_FLOAT control2;
|
||||
00097 MY_FLOAT __FM_gains[100];
|
||||
00098 MY_FLOAT __FM_susLevels[16];
|
||||
00099 MY_FLOAT __FM_attTimes[32];
|
||||
00100
|
||||
00101 };
|
||||
00102
|
||||
00103 <span class="preprocessor">#endif</span>
|
||||
00086 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classFM.html#a14">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize) = 0;
|
||||
00087
|
||||
00089
|
||||
00095 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classFM.html#a14">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 ) = 0;
|
||||
00096
|
||||
00098 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFM.html#a17">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00099
|
||||
00100 <span class="keyword">protected</span>:
|
||||
00101 std::vector<ADSR *> adsr_;
|
||||
00102 std::vector<WaveLoop *> waves_;
|
||||
00103 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00104 <a class="code" href="classTwoZero.html">TwoZero</a> twozero_;
|
||||
00105 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nOperators_;
|
||||
00106 StkFloat baseFrequency_;
|
||||
00107 std::vector<StkFloat> ratios_;
|
||||
00108 std::vector<StkFloat> gains_;
|
||||
00109 StkFloat modDepth_;
|
||||
00110 StkFloat control1_;
|
||||
00111 StkFloat control2_;
|
||||
00112 StkFloat fmGains_[100];
|
||||
00113 StkFloat fmSusLevels_[16];
|
||||
00114 StkFloat fmAttTimes_[32];
|
||||
00115
|
||||
00116 };
|
||||
00117
|
||||
00118 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,63 +8,66 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Filter.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00028 <span class="comment">/***************************************************/</span>
|
||||
00029
|
||||
00030 <span class="preprocessor">#if !defined(__FILTER_H)</span>
|
||||
00031 <span class="preprocessor"></span><span class="preprocessor">#define __FILTER_H</span>
|
||||
00030 <span class="preprocessor">#ifndef STK_FILTER_H</span>
|
||||
00031 <span class="preprocessor"></span><span class="preprocessor">#define STK_FILTER_H</span>
|
||||
00032 <span class="preprocessor"></span>
|
||||
00033 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00034
|
||||
<a name="l00035"></a><a class="code" href="classFilter.html">00035</a> <span class="keyword">class </span><a class="code" href="classFilter.html">Filter</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00036 {
|
||||
00037 <span class="keyword">public</span>:
|
||||
00039 <a class="code" href="classFilter.html#a0">Filter</a>(<span class="keywordtype">void</span>);
|
||||
00040
|
||||
00034 <span class="preprocessor">#include <vector></span>
|
||||
00035 <span class="preprocessor">#include <valarray></span>
|
||||
00036
|
||||
<a name="l00037"></a><a class="code" href="classFilter.html">00037</a> <span class="keyword">class </span><a class="code" href="classFilter.html">Filter</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00038 {
|
||||
00039 <span class="keyword">public</span>:
|
||||
00041 <a class="code" href="classFilter.html#a0">Filter</a>(<span class="keywordtype">void</span>);
|
||||
00042
|
||||
00046 <a class="code" href="classFilter.html#a0">Filter</a>(<span class="keywordtype">int</span> nb, MY_FLOAT *bCoefficients, <span class="keywordtype">int</span> na, MY_FLOAT *aCoefficients);
|
||||
00047
|
||||
00049 <span class="keyword">virtual</span> <a class="code" href="classFilter.html#a2">~Filter</a>(<span class="keywordtype">void</span>);
|
||||
00050
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a3">clear</a>(<span class="keywordtype">void</span>);
|
||||
00053
|
||||
00044
|
||||
00048 <a class="code" href="classFilter.html#a0">Filter</a>( std::vector<StkFloat> &bCoefficients, std::vector<StkFloat> &aCoefficients );
|
||||
00049
|
||||
00051 <span class="keyword">virtual</span> <a class="code" href="classFilter.html#a2">~Filter</a>(<span class="keywordtype">void</span>);
|
||||
00052
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a3">clear</a>(<span class="keywordtype">void</span>);
|
||||
00055
|
||||
00060 <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a4">setCoefficients</a>(<span class="keywordtype">int</span> nb, MY_FLOAT *bCoefficients, <span class="keywordtype">int</span> na, MY_FLOAT *aCoefficients);
|
||||
00061
|
||||
00063
|
||||
00069 <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a5">setNumerator</a>(<span class="keywordtype">int</span> nb, MY_FLOAT *bCoefficients);
|
||||
00070
|
||||
00072
|
||||
00080 <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a6">setDenominator</a>(<span class="keywordtype">int</span> na, MY_FLOAT *aCoefficients);
|
||||
00081
|
||||
00083
|
||||
00087 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a7">setGain</a>(MY_FLOAT theGain);
|
||||
00088
|
||||
00090 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classFilter.html#a8">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00091
|
||||
00093 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classFilter.html#a9">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00094
|
||||
00096 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classFilter.html#a10">tick</a>(MY_FLOAT sample);
|
||||
00097
|
||||
00099 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classFilter.html#a10">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00100
|
||||
00101 <span class="keyword">protected</span>:
|
||||
00102 MY_FLOAT gain;
|
||||
00103 <span class="keywordtype">int</span> nB;
|
||||
00104 <span class="keywordtype">int</span> nA;
|
||||
00105 MY_FLOAT *b;
|
||||
00106 MY_FLOAT *a;
|
||||
00107 MY_FLOAT *outputs;
|
||||
00108 MY_FLOAT *inputs;
|
||||
00109
|
||||
00110 };
|
||||
00111
|
||||
00112 <span class="preprocessor">#endif</span>
|
||||
00057
|
||||
00063 <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a4">setCoefficients</a>( std::vector<StkFloat> &bCoefficients, std::vector<StkFloat> &aCoefficients );
|
||||
00064
|
||||
00066
|
||||
00073 <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a5">setNumerator</a>( std::vector<StkFloat> &bCoefficients );
|
||||
00074
|
||||
00076
|
||||
00084 <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a6">setDenominator</a>( std::vector<StkFloat> &aCoefficients );
|
||||
00085
|
||||
00087
|
||||
00091 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFilter.html#a7">setGain</a>(StkFloat gain);
|
||||
00092
|
||||
00094 <span class="keyword">virtual</span> StkFloat <a class="code" href="classFilter.html#a8">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00095
|
||||
00097 <span class="keyword">virtual</span> StkFloat <a class="code" href="classFilter.html#a9">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00098
|
||||
00100 <span class="keyword">virtual</span> StkFloat <a class="code" href="classFilter.html#a10">tick</a>(StkFloat sample);
|
||||
00101
|
||||
00103 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classFilter.html#a10">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00104
|
||||
00106
|
||||
00112 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classFilter.html#a10">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00113
|
||||
00114 <span class="keyword">protected</span>:
|
||||
00115 StkFloat gain_;
|
||||
00116 std::vector<StkFloat> b_;
|
||||
00117 std::vector<StkFloat> a_;
|
||||
00118 std::vector<StkFloat> outputs_;
|
||||
00119 std::vector<StkFloat> inputs_;
|
||||
00120
|
||||
00121 };
|
||||
00122
|
||||
00123 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Flute.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00023 <span class="comment">/***************************************************/</span>
|
||||
00024
|
||||
00025 <span class="preprocessor">#if !defined(__FLUTE_H)</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define __FLUTE_H</span>
|
||||
00025 <span class="preprocessor">#ifndef STK_FLUTE_H</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define STK_FLUTE_H</span>
|
||||
00027 <span class="preprocessor"></span>
|
||||
00028 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00029 <span class="preprocessor">#include "JetTabl.h"</span>
|
||||
00029 <span class="preprocessor">#include "JetTable.h"</span>
|
||||
00030 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
00031 <span class="preprocessor">#include "OnePole.h"</span>
|
||||
00032 <span class="preprocessor">#include "PoleZero.h"</span>
|
||||
@@ -27,58 +27,64 @@
|
||||
<a name="l00037"></a><a class="code" href="classFlute.html">00037</a> <span class="keyword">class </span><a class="code" href="classFlute.html">Flute</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00038 {
|
||||
00039 <span class="keyword">public</span>:
|
||||
00041 <a class="code" href="classFlute.html#a0">Flute</a>(MY_FLOAT lowestFrequency);
|
||||
00042
|
||||
00044 <a class="code" href="classFlute.html#a1">~Flute</a>();
|
||||
00041
|
||||
00044 <a class="code" href="classFlute.html#a0">Flute</a>(StkFloat lowestFrequency);
|
||||
00045
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a2">clear</a>();
|
||||
00047 <a class="code" href="classFlute.html#a1">~Flute</a>();
|
||||
00048
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a2">clear</a>();
|
||||
00051
|
||||
00053 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a4">setJetReflection</a>(MY_FLOAT coefficient);
|
||||
00053 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00054
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a5">setEndReflection</a>(MY_FLOAT coefficient);
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a4">setJetReflection</a>(StkFloat coefficient);
|
||||
00057
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a6">setJetDelay</a>(MY_FLOAT aRatio);
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a5">setEndReflection</a>(StkFloat coefficient);
|
||||
00060
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a7">startBlowing</a>(MY_FLOAT amplitude, MY_FLOAT rate);
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a6">setJetDelay</a>(StkFloat aRatio);
|
||||
00063
|
||||
00065 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a8">stopBlowing</a>(MY_FLOAT rate);
|
||||
00065 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a7">startBlowing</a>(StkFloat amplitude, StkFloat rate);
|
||||
00066
|
||||
00068 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a9">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00068 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a8">stopBlowing</a>(StkFloat rate);
|
||||
00069
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a10">noteOff</a>(MY_FLOAT amplitude);
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a9">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00072
|
||||
00074 MY_FLOAT <a class="code" href="classFlute.html#a11">tick</a>();
|
||||
00074 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a10">noteOff</a>(StkFloat amplitude);
|
||||
00075
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a12">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00077 StkFloat <a class="code" href="classFlute.html#a11">tick</a>();
|
||||
00078
|
||||
00079 <span class="keyword">protected</span>:
|
||||
00080 <a class="code" href="classDelayL.html">DelayL</a> *jetDelay;
|
||||
00081 <a class="code" href="classDelayL.html">DelayL</a> *boreDelay;
|
||||
00082 <a class="code" href="classJetTabl.html">JetTabl</a> *jetTable;
|
||||
00083 <a class="code" href="classOnePole.html">OnePole</a> *filter;
|
||||
00084 <a class="code" href="classPoleZero.html">PoleZero</a> *dcBlock;
|
||||
00085 <a class="code" href="classNoise.html">Noise</a> *noise;
|
||||
00086 <a class="code" href="classADSR.html">ADSR</a> *adsr;
|
||||
00087 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00088 <span class="keywordtype">long</span> length;
|
||||
00089 MY_FLOAT lastFrequency;
|
||||
00090 MY_FLOAT maxPressure;
|
||||
00091 MY_FLOAT jetReflection;
|
||||
00092 MY_FLOAT endReflection;
|
||||
00093 MY_FLOAT noiseGain;
|
||||
00094 MY_FLOAT vibratoGain;
|
||||
00095 MY_FLOAT outputGain;
|
||||
00096 MY_FLOAT jetRatio;
|
||||
00097
|
||||
00098 };
|
||||
00099
|
||||
00100 <span class="preprocessor">#endif</span>
|
||||
00080 StkFloat *<a class="code" href="classFlute.html#a11">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00081
|
||||
00083
|
||||
00089 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classFlute.html#a11">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00090
|
||||
00092 <span class="keywordtype">void</span> <a class="code" href="classFlute.html#a14">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00093
|
||||
00094 <span class="keyword">protected</span>:
|
||||
00095 <a class="code" href="classDelayL.html">DelayL</a> jetDelay_;
|
||||
00096 <a class="code" href="classDelayL.html">DelayL</a> boreDelay_;
|
||||
00097 <a class="code" href="classJetTable.html">JetTable</a> jetTable_;
|
||||
00098 <a class="code" href="classOnePole.html">OnePole</a> filter_;
|
||||
00099 <a class="code" href="classPoleZero.html">PoleZero</a> dcBlock_;
|
||||
00100 <a class="code" href="classNoise.html">Noise</a> noise_;
|
||||
00101 <a class="code" href="classADSR.html">ADSR</a> adsr_;
|
||||
00102 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00103 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length_;
|
||||
00104 StkFloat lastFrequency_;
|
||||
00105 StkFloat maxPressure_;
|
||||
00106 StkFloat jetReflection_;
|
||||
00107 StkFloat endReflection_;
|
||||
00108 StkFloat noiseGain_;
|
||||
00109 StkFloat vibratoGain_;
|
||||
00110 StkFloat outputGain_;
|
||||
00111 StkFloat jetRatio_;
|
||||
00112
|
||||
00113 };
|
||||
00114
|
||||
00115 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>FormSwep.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00013 <span class="comment">/***************************************************/</span>
|
||||
00014
|
||||
00015 <span class="preprocessor">#if !defined(__FORMSWEP_H)</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define __FORMSWEP_H</span>
|
||||
00015 <span class="preprocessor">#ifndef STK_FORMSWEP_H</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define STK_FORMSWEP_H</span>
|
||||
00017 <span class="preprocessor"></span>
|
||||
00018 <span class="preprocessor">#include "BiQuad.h"</span>
|
||||
00019
|
||||
@@ -26,45 +26,48 @@
|
||||
00028 <a class="code" href="classFormSwep.html#a1">~FormSwep</a>();
|
||||
00029
|
||||
00031
|
||||
00042 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a2">setResonance</a>(MY_FLOAT aFrequency, MY_FLOAT aRadius);
|
||||
00042 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a2">setResonance</a>(StkFloat frequency, StkFloat radius);
|
||||
00043
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a3">setStates</a>(MY_FLOAT aFrequency, MY_FLOAT aRadius, MY_FLOAT aGain = 1.0);
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a3">setStates</a>(StkFloat frequency, StkFloat radius, StkFloat gain = 1.0);
|
||||
00046
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a4">setTargets</a>(MY_FLOAT aFrequency, MY_FLOAT aRadius, MY_FLOAT aGain = 1.0);
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a4">setTargets</a>(StkFloat frequency, StkFloat radius, StkFloat gain = 1.0);
|
||||
00049
|
||||
00051
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a5">setSweepRate</a>(MY_FLOAT aRate);
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a5">setSweepRate</a>(StkFloat rate);
|
||||
00060
|
||||
00062
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a6">setSweepTime</a>(MY_FLOAT aTime);
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classFormSwep.html#a6">setSweepTime</a>(StkFloat time);
|
||||
00068
|
||||
00070 MY_FLOAT <a class="code" href="classFormSwep.html#a7">tick</a>(MY_FLOAT sample);
|
||||
00070 StkFloat <a class="code" href="classFormSwep.html#a7">tick</a>(StkFloat sample);
|
||||
00071
|
||||
00073 MY_FLOAT *<a class="code" href="classFormSwep.html#a7">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00073 StkFloat *<a class="code" href="classFormSwep.html#a7">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00074
|
||||
00075 <span class="keyword">protected</span>:
|
||||
00076 <span class="keywordtype">bool</span> dirty;
|
||||
00077 MY_FLOAT frequency;
|
||||
00078 MY_FLOAT radius;
|
||||
00079 MY_FLOAT startFrequency;
|
||||
00080 MY_FLOAT startRadius;
|
||||
00081 MY_FLOAT startGain;
|
||||
00082 MY_FLOAT targetFrequency;
|
||||
00083 MY_FLOAT targetRadius;
|
||||
00084 MY_FLOAT targetGain;
|
||||
00085 MY_FLOAT deltaFrequency;
|
||||
00086 MY_FLOAT deltaRadius;
|
||||
00087 MY_FLOAT deltaGain;
|
||||
00088 MY_FLOAT sweepState;
|
||||
00089 MY_FLOAT sweepRate;
|
||||
00090
|
||||
00091 };
|
||||
00092
|
||||
00093 <span class="preprocessor">#endif</span>
|
||||
00076
|
||||
00082 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classFormSwep.html#a7">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00083
|
||||
00084 <span class="keyword">protected</span>:
|
||||
00085 <span class="keywordtype">bool</span> dirty_;
|
||||
00086 StkFloat frequency_;
|
||||
00087 StkFloat radius_;
|
||||
00088 StkFloat startFrequency_;
|
||||
00089 StkFloat startRadius_;
|
||||
00090 StkFloat startGain_;
|
||||
00091 StkFloat targetFrequency_;
|
||||
00092 StkFloat targetRadius_;
|
||||
00093 StkFloat targetGain_;
|
||||
00094 StkFloat deltaFrequency_;
|
||||
00095 StkFloat deltaRadius_;
|
||||
00096 StkFloat deltaGain_;
|
||||
00097 StkFloat sweepState_;
|
||||
00098 StkFloat sweepRate_;
|
||||
00099
|
||||
00100 };
|
||||
00101
|
||||
00102 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
52
doc/html/Function_8h-source.html
Normal file
52
doc/html/Function_8h-source.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Function.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00011 <span class="comment">/***************************************************/</span>
|
||||
00012
|
||||
00013 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00014
|
||||
00015 <span class="preprocessor">#ifndef STK_FUNCTION_H</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define STK_FUNCTION_H</span>
|
||||
00017 <span class="preprocessor"></span>
|
||||
<a name="l00018"></a><a class="code" href="classFunction.html">00018</a> <span class="keyword">class </span><a class="code" href="classFunction.html">Function</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00019 {
|
||||
00020 <span class="keyword">public</span>:
|
||||
00022 <a class="code" href="classFunction.html#a0">Function</a>();
|
||||
00023
|
||||
00025 <span class="keyword">virtual</span> <a class="code" href="classFunction.html#a1">~Function</a>();
|
||||
00026
|
||||
<a name="l00028"></a><a class="code" href="classFunction.html#a2">00028</a> <span class="keyword">virtual</span> StkFloat <a class="code" href="classFunction.html#a2">lastOut</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> lastOutput_; };
|
||||
00029
|
||||
00031 <span class="keyword">virtual</span> StkFloat <a class="code" href="classFunction.html#a3">tick</a>( StkFloat input ) = 0;
|
||||
00032
|
||||
00034 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classFunction.html#a3">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00035
|
||||
00037
|
||||
00043 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classFunction.html#a3">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00044
|
||||
00045 <span class="keyword">protected</span>:
|
||||
00046
|
||||
00047 StkFloat lastOutput_;
|
||||
00048
|
||||
00049 };
|
||||
00050
|
||||
00051 <span class="preprocessor">#endif</span>
|
||||
00052 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
52
doc/html/Generator_8h-source.html
Normal file
52
doc/html/Generator_8h-source.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Generator.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00010 <span class="comment">/***************************************************/</span>
|
||||
00011
|
||||
00012 <span class="preprocessor">#ifndef STK_GENERATOR_H</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define STK_GENERATOR_H</span>
|
||||
00014 <span class="preprocessor"></span>
|
||||
00015 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00016
|
||||
<a name="l00017"></a><a class="code" href="classGenerator.html">00017</a> <span class="keyword">class </span><a class="code" href="classGenerator.html">Generator</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00018 {
|
||||
00019 <span class="keyword">public</span>:
|
||||
00021 <a class="code" href="classGenerator.html#a0">Generator</a>();
|
||||
00022
|
||||
00024 <span class="keyword">virtual</span> <a class="code" href="classGenerator.html#a1">~Generator</a>();
|
||||
00025
|
||||
<a name="l00027"></a><a class="code" href="classGenerator.html#a2">00027</a> <span class="keyword">virtual</span> StkFloat <a class="code" href="classGenerator.html#a2">lastOut</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> lastOutput_; };
|
||||
00028
|
||||
00030 <span class="keyword">virtual</span> StkFloat <a class="code" href="classGenerator.html#a3">tick</a>( <span class="keywordtype">void</span> ) = 0;
|
||||
00031
|
||||
00033 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classGenerator.html#a3">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00034
|
||||
00036
|
||||
00042 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classGenerator.html#a3">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00043
|
||||
00044 <span class="keyword">protected</span>:
|
||||
00045
|
||||
00046 StkFloat lastOutput_;
|
||||
00047
|
||||
00048 };
|
||||
00049
|
||||
00050 <span class="preprocessor">#endif</span>
|
||||
00051 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,32 +8,38 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>HevyMetl.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00029 <span class="comment">/***************************************************/</span>
|
||||
00030
|
||||
00031 <span class="preprocessor">#if !defined(__HEVYMETL_H)</span>
|
||||
00032 <span class="preprocessor"></span><span class="preprocessor">#define __HEVYMETL_H</span>
|
||||
00031 <span class="preprocessor">#ifndef STK_HEVYMETL_H</span>
|
||||
00032 <span class="preprocessor"></span><span class="preprocessor">#define STK_HEVYMETL_H</span>
|
||||
00033 <span class="preprocessor"></span>
|
||||
00034 <span class="preprocessor">#include "FM.h"</span>
|
||||
00035
|
||||
<a name="l00036"></a><a class="code" href="classHevyMetl.html">00036</a> <span class="keyword">class </span><a class="code" href="classHevyMetl.html">HevyMetl</a> : <span class="keyword">public</span> <a class="code" href="classFM.html">FM</a>
|
||||
00037 {
|
||||
00038 <span class="keyword">public</span>:
|
||||
00040 <a class="code" href="classHevyMetl.html#a0">HevyMetl</a>();
|
||||
00041
|
||||
00043 <a class="code" href="classHevyMetl.html#a1">~HevyMetl</a>();
|
||||
00040
|
||||
00043 <a class="code" href="classHevyMetl.html#a0">HevyMetl</a>();
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classHevyMetl.html#a2">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00046 <a class="code" href="classHevyMetl.html#a1">~HevyMetl</a>();
|
||||
00047
|
||||
00049 MY_FLOAT <a class="code" href="classHevyMetl.html#a3">tick</a>();
|
||||
00050 };
|
||||
00051
|
||||
00052 <span class="preprocessor">#endif</span>
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classHevyMetl.html#a2">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00050
|
||||
00052 StkFloat <a class="code" href="classHevyMetl.html#a3">tick</a>();
|
||||
00053
|
||||
00055 StkFloat *<a class="code" href="classHevyMetl.html#a3">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00056
|
||||
00058
|
||||
00064 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classHevyMetl.html#a3">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00065 };
|
||||
00066
|
||||
00067 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,51 +8,53 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Instrmnt.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00010 <span class="comment">/***************************************************/</span>
|
||||
00011
|
||||
00012 <span class="preprocessor">#if !defined(__INSTRMNT_H)</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define __INSTRMNT_H</span>
|
||||
00012 <span class="preprocessor">#ifndef STK_INSTRMNT_H</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define STK_INSTRMNT_H</span>
|
||||
00014 <span class="preprocessor"></span>
|
||||
00015 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00016 <span class="preprocessor">#include <iostream></span>
|
||||
00017
|
||||
<a name="l00018"></a><a class="code" href="classInstrmnt.html">00018</a> <span class="keyword">class </span><a class="code" href="classInstrmnt.html">Instrmnt</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00019 {
|
||||
00020 <span class="keyword">public</span>:
|
||||
00022 <a class="code" href="classInstrmnt.html#a0">Instrmnt</a>();
|
||||
00023
|
||||
00025 <span class="keyword">virtual</span> <a class="code" href="classInstrmnt.html#a1">~Instrmnt</a>();
|
||||
00026
|
||||
00028 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classInstrmnt.html#a2">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude) = 0;
|
||||
00029
|
||||
00031 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classInstrmnt.html#a3">noteOff</a>(MY_FLOAT amplitude) = 0;
|
||||
00032
|
||||
00034 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classInstrmnt.html#a4">setFrequency</a>(MY_FLOAT frequency);
|
||||
00035
|
||||
00037 MY_FLOAT <a class="code" href="classInstrmnt.html#a5">lastOut</a>() <span class="keyword">const</span>;
|
||||
00038
|
||||
00040 MY_FLOAT <a class="code" href="classInstrmnt.html#a6">lastOutLeft</a>() <span class="keyword">const</span>;
|
||||
00041
|
||||
00043 MY_FLOAT <a class="code" href="classInstrmnt.html#a7">lastOutRight</a>() <span class="keyword">const</span>;
|
||||
00044
|
||||
00046 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classInstrmnt.html#a8">tick</a>() = 0;
|
||||
00047
|
||||
00049 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classInstrmnt.html#a8">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00050
|
||||
00052 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classInstrmnt.html#a10">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00053
|
||||
00054 <span class="keyword">protected</span>:
|
||||
00055 MY_FLOAT lastOutput;
|
||||
00056
|
||||
00057 };
|
||||
00016
|
||||
<a name="l00017"></a><a class="code" href="classInstrmnt.html">00017</a> <span class="keyword">class </span><a class="code" href="classInstrmnt.html">Instrmnt</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00018 {
|
||||
00019 <span class="keyword">public</span>:
|
||||
00021 <a class="code" href="classInstrmnt.html#a0">Instrmnt</a>();
|
||||
00022
|
||||
00024 <span class="keyword">virtual</span> <a class="code" href="classInstrmnt.html#a1">~Instrmnt</a>();
|
||||
00025
|
||||
00027 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classInstrmnt.html#a2">noteOn</a>(StkFloat frequency, StkFloat amplitude) = 0;
|
||||
00028
|
||||
00030 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classInstrmnt.html#a3">noteOff</a>(StkFloat amplitude) = 0;
|
||||
00031
|
||||
00033 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classInstrmnt.html#a4">setFrequency</a>(StkFloat frequency);
|
||||
00034
|
||||
00036 StkFloat <a class="code" href="classInstrmnt.html#a5">lastOut</a>() <span class="keyword">const</span>;
|
||||
00037
|
||||
00039 StkFloat <a class="code" href="classInstrmnt.html#a6">lastOutLeft</a>() <span class="keyword">const</span>;
|
||||
00040
|
||||
00042 StkFloat <a class="code" href="classInstrmnt.html#a7">lastOutRight</a>() <span class="keyword">const</span>;
|
||||
00043
|
||||
00045 <span class="keyword">virtual</span> StkFloat <a class="code" href="classInstrmnt.html#a8">tick</a>() = 0;
|
||||
00046
|
||||
00048 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classInstrmnt.html#a8">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00049
|
||||
00051
|
||||
00057 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classInstrmnt.html#a8">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00058
|
||||
00059 <span class="preprocessor">#endif</span>
|
||||
00060 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classInstrmnt.html#a11">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00061
|
||||
00062 <span class="keyword">protected</span>:
|
||||
00063 StkFloat lastOutput_;
|
||||
00064
|
||||
00065 };
|
||||
00066
|
||||
00067 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,43 +8,50 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>JCRev.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00015 <span class="comment">/***************************************************/</span>
|
||||
00016
|
||||
00017 <span class="preprocessor">#if !defined(__JCREV_H)</span>
|
||||
00018 <span class="preprocessor"></span><span class="preprocessor">#define __JCREV_H</span>
|
||||
00017 <span class="preprocessor">#ifndef STK_JCREV_H</span>
|
||||
00018 <span class="preprocessor"></span><span class="preprocessor">#define STK_JCREV_H</span>
|
||||
00019 <span class="preprocessor"></span>
|
||||
00020 <span class="preprocessor">#include "Reverb.h"</span>
|
||||
00020 <span class="preprocessor">#include "Effect.h"</span>
|
||||
00021 <span class="preprocessor">#include "Delay.h"</span>
|
||||
00022
|
||||
<a name="l00023"></a><a class="code" href="classJCRev.html">00023</a> <span class="keyword">class </span><a class="code" href="classJCRev.html">JCRev</a> : <span class="keyword">public</span> <a class="code" href="classReverb.html">Reverb</a>
|
||||
<a name="l00023"></a><a class="code" href="classJCRev.html">00023</a> <span class="keyword">class </span><a class="code" href="classJCRev.html">JCRev</a> : <span class="keyword">public</span> <a class="code" href="classEffect.html">Effect</a>
|
||||
00024 {
|
||||
00025 <span class="keyword">public</span>:
|
||||
00027 <a class="code" href="classJCRev.html#a0">JCRev</a>(MY_FLOAT T60);
|
||||
00027 <a class="code" href="classJCRev.html#a0">JCRev</a>( StkFloat T60 = 1.0 );
|
||||
00028
|
||||
00030 <a class="code" href="classJCRev.html#a1">~JCRev</a>();
|
||||
00031
|
||||
00033 <span class="keywordtype">void</span> <a class="code" href="classJCRev.html#a2">clear</a>();
|
||||
00034
|
||||
00036 MY_FLOAT <a class="code" href="classJCRev.html#a3">tick</a>(MY_FLOAT input);
|
||||
00036 <span class="keywordtype">void</span> <a class="code" href="classJCRev.html#a3">setT60</a>( StkFloat T60 );
|
||||
00037
|
||||
00038 <span class="keyword">protected</span>:
|
||||
00039 <a class="code" href="classDelay.html">Delay</a> *allpassDelays[3];
|
||||
00040 <a class="code" href="classDelay.html">Delay</a> *combDelays[4];
|
||||
00041 <a class="code" href="classDelay.html">Delay</a> *outLeftDelay;
|
||||
00042 <a class="code" href="classDelay.html">Delay</a> *outRightDelay;
|
||||
00043 MY_FLOAT allpassCoefficient;
|
||||
00044 MY_FLOAT combCoefficient[4];
|
||||
00039 StkFloat <a class="code" href="classJCRev.html#a4">tick</a>(StkFloat input);
|
||||
00040
|
||||
00042 StkFloat *<a class="code" href="classJCRev.html#a4">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00043
|
||||
00045
|
||||
00046 };
|
||||
00047
|
||||
00048 <span class="preprocessor">#endif</span>
|
||||
00049 <span class="preprocessor"></span>
|
||||
00051 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classJCRev.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00052
|
||||
00053 <span class="keyword">protected</span>:
|
||||
00054 <a class="code" href="classDelay.html">Delay</a> allpassDelays_[3];
|
||||
00055 <a class="code" href="classDelay.html">Delay</a> combDelays_[4];
|
||||
00056 <a class="code" href="classDelay.html">Delay</a> outLeftDelay_;
|
||||
00057 <a class="code" href="classDelay.html">Delay</a> outRightDelay_;
|
||||
00058 StkFloat allpassCoefficient_;
|
||||
00059 StkFloat combCoefficient_[4];
|
||||
00060
|
||||
00061 };
|
||||
00062
|
||||
00063 <span class="preprocessor">#endif</span>
|
||||
00064 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<h1>JetTabl.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00014 <span class="comment">/***************************************************/</span>
|
||||
00015
|
||||
00016 <span class="preprocessor">#if !defined(__JETTABL_H)</span>
|
||||
00017 <span class="preprocessor"></span><span class="preprocessor">#define __JETTABL_H</span>
|
||||
00018 <span class="preprocessor"></span>
|
||||
00019 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00020
|
||||
<a name="l00021"></a><a class="code" href="classJetTabl.html">00021</a> <span class="keyword">class </span><a class="code" href="classJetTabl.html">JetTabl</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00022 {
|
||||
00023 <span class="keyword">public</span>:
|
||||
00025 <a class="code" href="classJetTabl.html#a0">JetTabl</a>();
|
||||
00026
|
||||
00028 <a class="code" href="classJetTabl.html#a1">~JetTabl</a>();
|
||||
00029
|
||||
00031 MY_FLOAT <a class="code" href="classJetTabl.html#a2">lastOut</a>() <span class="keyword">const</span>;
|
||||
00032
|
||||
00034 MY_FLOAT <a class="code" href="classJetTabl.html#a3">tick</a>(MY_FLOAT input);
|
||||
00035
|
||||
00037 MY_FLOAT *<a class="code" href="classJetTabl.html#a3">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00038
|
||||
00039 <span class="keyword">protected</span>:
|
||||
00040 MY_FLOAT lastOutput;
|
||||
00041
|
||||
00042 };
|
||||
00043
|
||||
00044 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
47
doc/html/JetTable_8h-source.html
Normal file
47
doc/html/JetTable_8h-source.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>JetTable.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00014 <span class="comment">/***************************************************/</span>
|
||||
00015
|
||||
00016 <span class="preprocessor">#ifndef STK_JETTABL_H</span>
|
||||
00017 <span class="preprocessor"></span><span class="preprocessor">#define STK_JETTABL_H</span>
|
||||
00018 <span class="preprocessor"></span>
|
||||
00019 <span class="preprocessor">#include "Function.h"</span>
|
||||
00020
|
||||
<a name="l00021"></a><a class="code" href="classJetTable.html">00021</a> <span class="keyword">class </span><a class="code" href="classJetTable.html">JetTable</a> : <span class="keyword">public</span> <a class="code" href="classFunction.html">Function</a>
|
||||
00022 {
|
||||
00023 <span class="keyword">public</span>:
|
||||
00025 <a class="code" href="classJetTable.html#a0">JetTable</a>();
|
||||
00026
|
||||
00028 <a class="code" href="classJetTable.html#a1">~JetTable</a>();
|
||||
00029
|
||||
00031 StkFloat <a class="code" href="classJetTable.html#a2">tick</a>(StkFloat input);
|
||||
00032
|
||||
00034 StkFloat *<a class="code" href="classJetTable.html#a2">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00035
|
||||
00037
|
||||
00043 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classJetTable.html#a2">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00044
|
||||
00045 <span class="keyword">protected</span>:
|
||||
00046
|
||||
00047 };
|
||||
00048
|
||||
00049 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Mandolin.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00028 <span class="comment">/***************************************************/</span>
|
||||
00029
|
||||
00030 <span class="preprocessor">#if !defined(__MANDOLIN_H)</span>
|
||||
00031 <span class="preprocessor"></span><span class="preprocessor">#define __MANDOLIN_H</span>
|
||||
00030 <span class="preprocessor">#ifndef STK_MANDOLIN_H</span>
|
||||
00031 <span class="preprocessor"></span><span class="preprocessor">#define STK_MANDOLIN_H</span>
|
||||
00032 <span class="preprocessor"></span>
|
||||
00033 <span class="preprocessor">#include "PluckTwo.h"</span>
|
||||
00034 <span class="preprocessor">#include "WvIn.h"</span>
|
||||
@@ -21,35 +21,39 @@
|
||||
<a name="l00036"></a><a class="code" href="classMandolin.html">00036</a> <span class="keyword">class </span><a class="code" href="classMandolin.html">Mandolin</a> : <span class="keyword">public</span> <a class="code" href="classPluckTwo.html">PluckTwo</a>
|
||||
00037 {
|
||||
00038 <span class="keyword">public</span>:
|
||||
00040 <a class="code" href="classMandolin.html#a0">Mandolin</a>(MY_FLOAT lowestFrequency);
|
||||
00040 <a class="code" href="classMandolin.html#a0">Mandolin</a>(StkFloat lowestFrequency);
|
||||
00041
|
||||
00043 <span class="keyword">virtual</span> <a class="code" href="classMandolin.html#a1">~Mandolin</a>();
|
||||
00043 <a class="code" href="classMandolin.html#a1">~Mandolin</a>();
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a2">pluck</a>(MY_FLOAT amplitude);
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a2">pluck</a>(StkFloat amplitude);
|
||||
00047
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a2">pluck</a>(MY_FLOAT amplitude,MY_FLOAT position);
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a2">pluck</a>(StkFloat amplitude,StkFloat position);
|
||||
00050
|
||||
00052 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a4">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a4">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00053
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a5">setBodySize</a>(MY_FLOAT size);
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a5">setBodySize</a>(StkFloat size);
|
||||
00056
|
||||
00058 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classMandolin.html#a6">tick</a>();
|
||||
00058 StkFloat <a class="code" href="classMandolin.html#a6">tick</a>();
|
||||
00059
|
||||
00061 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a7">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00061 StkFloat *<a class="code" href="classMandolin.html#a6">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00062
|
||||
00063 <span class="keyword">protected</span>:
|
||||
00064 <a class="code" href="classWvIn.html">WvIn</a> *soundfile[12];
|
||||
00065 MY_FLOAT directBody;
|
||||
00066 <span class="keywordtype">int</span> mic;
|
||||
00067 <span class="keywordtype">long</span> dampTime;
|
||||
00068 <span class="keywordtype">bool</span> waveDone;
|
||||
00069 };
|
||||
00070
|
||||
00071 <span class="preprocessor">#endif</span>
|
||||
00064
|
||||
00070 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classMandolin.html#a6">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00071
|
||||
00073 <span class="keywordtype">void</span> <a class="code" href="classMandolin.html#a9">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00074
|
||||
00075 <span class="keyword">protected</span>:
|
||||
00076 <a class="code" href="classWvIn.html">WvIn</a> *soundfile_[12];
|
||||
00077 <span class="keywordtype">int</span> mic_;
|
||||
00078 <span class="keywordtype">long</span> dampTime_;
|
||||
00079 <span class="keywordtype">bool</span> waveDone_;
|
||||
00080 };
|
||||
00081
|
||||
00082 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,19 +8,19 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Mesh2D.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00025 <span class="comment">/***************************************************/</span>
|
||||
00026
|
||||
00027 <span class="preprocessor">#if !defined(__MESH2D_H)</span>
|
||||
00028 <span class="preprocessor"></span><span class="preprocessor">#define __MESH2D_H</span>
|
||||
00027 <span class="preprocessor">#ifndef STK_MESH2D_H</span>
|
||||
00028 <span class="preprocessor"></span><span class="preprocessor">#define STK_MESH2D_H</span>
|
||||
00029 <span class="preprocessor"></span>
|
||||
00030 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00031 <span class="preprocessor">#include "OnePole.h"</span>
|
||||
00032
|
||||
00033 <span class="preprocessor">#define NXMAX ((short)(12))</span>
|
||||
00034 <span class="preprocessor"></span><span class="preprocessor">#define NYMAX ((short)(12))</span>
|
||||
00035 <span class="preprocessor"></span>
|
||||
00033 <span class="keyword">const</span> <span class="keywordtype">short</span> NXMAX = 12;
|
||||
00034 <span class="keyword">const</span> <span class="keywordtype">short</span> NYMAX = 12;
|
||||
00035
|
||||
<a name="l00036"></a><a class="code" href="classMesh2D.html">00036</a> <span class="keyword">class </span><a class="code" href="classMesh2D.html">Mesh2D</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00037 {
|
||||
00038 <span class="keyword">public</span>:
|
||||
@@ -34,54 +34,57 @@
|
||||
00050
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a4">setNY</a>(<span class="keywordtype">short</span> lenY);
|
||||
00053
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a5">setInputPosition</a>(MY_FLOAT xFactor, MY_FLOAT yFactor);
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a5">setInputPosition</a>(StkFloat xFactor, StkFloat yFactor);
|
||||
00056
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a6">setDecay</a>(MY_FLOAT decayFactor);
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a6">setDecay</a>(StkFloat decayFactor);
|
||||
00059
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a7">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a7">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00062
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a8">noteOff</a>(MY_FLOAT amplitude);
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a8">noteOff</a>(StkFloat amplitude);
|
||||
00065
|
||||
00067 MY_FLOAT <a class="code" href="classMesh2D.html#a9">energy</a>();
|
||||
00067 StkFloat <a class="code" href="classMesh2D.html#a9">energy</a>();
|
||||
00068
|
||||
00070 MY_FLOAT <a class="code" href="classMesh2D.html#a10">tick</a>();
|
||||
00070 StkFloat <a class="code" href="classMesh2D.html#a10">tick</a>();
|
||||
00071
|
||||
00073 MY_FLOAT <a class="code" href="classMesh2D.html#a10">tick</a>(MY_FLOAT input);
|
||||
00073 StkFloat <a class="code" href="classMesh2D.html#a10">tick</a>(StkFloat input);
|
||||
00074
|
||||
00076 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a12">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00076 StkFloat *<a class="code" href="classMesh2D.html#a10">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00077
|
||||
00078 <span class="keyword">protected</span>:
|
||||
00079
|
||||
00080 MY_FLOAT tick0();
|
||||
00081 MY_FLOAT tick1();
|
||||
00082 <span class="keywordtype">void</span> clearMesh();
|
||||
00083
|
||||
00084 <span class="keywordtype">short</span> NX, NY;
|
||||
00085 <span class="keywordtype">short</span> xInput, yInput;
|
||||
00086 <a class="code" href="classOnePole.html">OnePole</a> *filterX[NXMAX];
|
||||
00087 <a class="code" href="classOnePole.html">OnePole</a> *filterY[NYMAX];
|
||||
00088 MY_FLOAT v[NXMAX-1][NYMAX-1]; <span class="comment">// junction velocities</span>
|
||||
00089 MY_FLOAT vxp[NXMAX][NYMAX]; <span class="comment">// positive-x velocity wave</span>
|
||||
00090 MY_FLOAT vxm[NXMAX][NYMAX]; <span class="comment">// negative-x velocity wave</span>
|
||||
00091 MY_FLOAT vyp[NXMAX][NYMAX]; <span class="comment">// positive-y velocity wave</span>
|
||||
00092 MY_FLOAT vym[NXMAX][NYMAX]; <span class="comment">// negative-y velocity wave</span>
|
||||
00093
|
||||
00094 <span class="comment">// Alternate buffers</span>
|
||||
00095 MY_FLOAT vxp1[NXMAX][NYMAX]; <span class="comment">// positive-x velocity wave</span>
|
||||
00096 MY_FLOAT vxm1[NXMAX][NYMAX]; <span class="comment">// negative-x velocity wave</span>
|
||||
00097 MY_FLOAT vyp1[NXMAX][NYMAX]; <span class="comment">// positive-y velocity wave</span>
|
||||
00098 MY_FLOAT vym1[NXMAX][NYMAX]; <span class="comment">// negative-y velocity wave</span>
|
||||
00099
|
||||
00100 <span class="keywordtype">int</span> counter; <span class="comment">// time in samples</span>
|
||||
00101
|
||||
00102
|
||||
00103 };
|
||||
00104
|
||||
00105 <span class="preprocessor">#endif</span>
|
||||
00085 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classMesh2D.html#a10">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00086
|
||||
00088 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a14">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00089
|
||||
00090 <span class="keyword">protected</span>:
|
||||
00091
|
||||
00092 StkFloat tick0();
|
||||
00093 StkFloat tick1();
|
||||
00094 <span class="keywordtype">void</span> clearMesh();
|
||||
00095
|
||||
00096 <span class="keywordtype">short</span> NX_, NY_;
|
||||
00097 <span class="keywordtype">short</span> xInput_, yInput_;
|
||||
00098 <a class="code" href="classOnePole.html">OnePole</a> filterX_[NXMAX];
|
||||
00099 <a class="code" href="classOnePole.html">OnePole</a> filterY_[NYMAX];
|
||||
00100 StkFloat v_[NXMAX-1][NYMAX-1]; <span class="comment">// junction velocities</span>
|
||||
00101 StkFloat vxp_[NXMAX][NYMAX]; <span class="comment">// positive-x velocity wave</span>
|
||||
00102 StkFloat vxm_[NXMAX][NYMAX]; <span class="comment">// negative-x velocity wave</span>
|
||||
00103 StkFloat vyp_[NXMAX][NYMAX]; <span class="comment">// positive-y velocity wave</span>
|
||||
00104 StkFloat vym_[NXMAX][NYMAX]; <span class="comment">// negative-y velocity wave</span>
|
||||
00105
|
||||
00106 <span class="comment">// Alternate buffers</span>
|
||||
00107 StkFloat vxp1_[NXMAX][NYMAX]; <span class="comment">// positive-x velocity wave</span>
|
||||
00108 StkFloat vxm1_[NXMAX][NYMAX]; <span class="comment">// negative-x velocity wave</span>
|
||||
00109 StkFloat vyp1_[NXMAX][NYMAX]; <span class="comment">// positive-y velocity wave</span>
|
||||
00110 StkFloat vym1_[NXMAX][NYMAX]; <span class="comment">// negative-y velocity wave</span>
|
||||
00111
|
||||
00112 <span class="keywordtype">int</span> counter_; <span class="comment">// time in samples</span>
|
||||
00113 };
|
||||
00114
|
||||
00115 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,105 +8,98 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Messager.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00034 <span class="comment">/***************************************************/</span>
|
||||
00035
|
||||
00036 <span class="preprocessor">#if !defined(__MESSAGER_H)</span>
|
||||
00037 <span class="preprocessor"></span><span class="preprocessor">#define __MESSSAGER_H</span>
|
||||
00038 <span class="preprocessor"></span>
|
||||
00039 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00040 <span class="preprocessor">#include "SKINI.h"</span>
|
||||
00033 <span class="comment">/***************************************************/</span>
|
||||
00034
|
||||
00035 <span class="preprocessor">#ifndef STK_MESSAGER_H</span>
|
||||
00036 <span class="preprocessor"></span><span class="preprocessor">#define STK_MESSAGER_H</span>
|
||||
00037 <span class="preprocessor"></span>
|
||||
00038 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00039 <span class="preprocessor">#include "Skini.h"</span>
|
||||
00040 <span class="preprocessor">#include <queue></span>
|
||||
00041
|
||||
00042 <span class="preprocessor">#define MESSAGE_LENGTH 128</span>
|
||||
00043 <span class="preprocessor"></span><span class="preprocessor">#define MAX_MESSAGES 25</span>
|
||||
00044 <span class="preprocessor"></span><span class="preprocessor">#define STK_MIDI 0x0001</span>
|
||||
00045 <span class="preprocessor"></span><span class="preprocessor">#define STK_PIPE 0x0002</span>
|
||||
00046 <span class="preprocessor"></span><span class="preprocessor">#define STK_SOCKET 0x0004</span>
|
||||
00047 <span class="preprocessor"></span>
|
||||
00048 <span class="preprocessor">#if defined(__STK_REALTIME__)</span>
|
||||
00049 <span class="preprocessor"></span>
|
||||
00050 <span class="preprocessor">#include "Thread.h"</span>
|
||||
00051 <span class="preprocessor">#include "Socket.h"</span>
|
||||
00052 <span class="preprocessor">#include "RtMidi.h"</span>
|
||||
00053
|
||||
00054 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> THREAD_RETURN THREAD_TYPE stdinHandler(<span class="keywordtype">void</span> * ptr);
|
||||
00055
|
||||
00056 <span class="preprocessor">#if (defined(__OS_IRIX__) || defined(__OS_LINUX__) || defined(__OS_MACOSX__))</span>
|
||||
00057 <span class="preprocessor"></span><span class="preprocessor"> #include <sys/types.h></span>
|
||||
00058 <span class="preprocessor"> #include <sys/time.h></span>
|
||||
00059 <span class="preprocessor">#endif</span>
|
||||
00060 <span class="preprocessor"></span>
|
||||
00061 <span class="preprocessor">#endif // __STK_REALTIME__</span>
|
||||
00062 <span class="preprocessor"></span>
|
||||
<a name="l00063"></a><a class="code" href="classMessager.html">00063</a> <span class="keyword">class </span><a class="code" href="classMessager.html">Messager</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00064 {
|
||||
00065 <span class="keyword">public</span>:
|
||||
00067
|
||||
00075 <a class="code" href="classMessager.html#a0">Messager</a>(<span class="keywordtype">int</span> inputMask = 0, <span class="keywordtype">int</span> port = 2001);
|
||||
00076
|
||||
00078 <a class="code" href="classMessager.html#a1">~Messager</a>();
|
||||
00079
|
||||
00042 <span class="keyword">const</span> <span class="keywordtype">int</span> DEFAULT_QUEUE_LIMIT = 200;
|
||||
00043
|
||||
00044 <span class="preprocessor">#if defined(__STK_REALTIME__)</span>
|
||||
00045 <span class="preprocessor"></span>
|
||||
00046 <span class="preprocessor">#include "Mutex.h"</span>
|
||||
00047 <span class="preprocessor">#include "Thread.h"</span>
|
||||
00048 <span class="preprocessor">#include "Socket.h"</span>
|
||||
00049 <span class="preprocessor">#include "RtMidi.h"</span>
|
||||
00050
|
||||
00051 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> THREAD_RETURN THREAD_TYPE stdinHandler(<span class="keywordtype">void</span> * ptr);
|
||||
00052
|
||||
00053 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> THREAD_RETURN THREAD_TYPE socketHandler(<span class="keywordtype">void</span> * ptr);
|
||||
00054
|
||||
00055 <span class="preprocessor">#endif // __STK_REALTIME__</span>
|
||||
00056 <span class="preprocessor"></span>
|
||||
<a name="l00057"></a><a class="code" href="classMessager.html">00057</a> <span class="keyword">class </span><a class="code" href="classMessager.html">Messager</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00058 {
|
||||
00059 <span class="keyword">public</span>:
|
||||
00060
|
||||
00061 <span class="comment">// This structure is used to share data among the various realtime</span>
|
||||
00062 <span class="comment">// messager threads. It must be public.</span>
|
||||
00063 <span class="keyword">struct </span>MessagerData {
|
||||
00064 <a class="code" href="classSkini.html">Skini</a> skini;
|
||||
00065 std::queue<Skini::Message> queue;
|
||||
00066 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueLimit;
|
||||
00067 <span class="keywordtype">int</span> sources;
|
||||
00068
|
||||
00069 <span class="preprocessor">#if defined(__STK_REALTIME__)</span>
|
||||
00070 <span class="preprocessor"></span> <a class="code" href="classMutex.html">Mutex</a> mutex;
|
||||
00071 <a class="code" href="classRtMidiIn.html">RtMidiIn</a> *midi;
|
||||
00072 <a class="code" href="classSocket.html">Socket</a> *socket;
|
||||
00073 std::vector<int> fd;
|
||||
00074 fd_set mask;
|
||||
00075 <span class="preprocessor">#endif</span>
|
||||
00076 <span class="preprocessor"></span>
|
||||
00077 <span class="comment">// Default constructor.</span>
|
||||
00078 MessagerData()
|
||||
00079 :queueLimit(0), sources(0) {}
|
||||
00080 };
|
||||
00081
|
||||
00087 <span class="keywordtype">long</span> <a class="code" href="classMessager.html#a2">nextMessage</a>(<span class="keywordtype">void</span>);
|
||||
00088
|
||||
00090 <span class="keywordtype">void</span> <a class="code" href="classMessager.html#a3">setRtDelta</a>(<span class="keywordtype">long</span> nSamples);
|
||||
00091
|
||||
00093 <span class="keywordtype">long</span> <a class="code" href="classMessager.html#a4">getDelta</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00094
|
||||
00096 <span class="keywordtype">long</span> <a class="code" href="classMessager.html#a5">getType</a>() <span class="keyword">const</span>;
|
||||
00097
|
||||
00099 MY_FLOAT <a class="code" href="classMessager.html#a6">getByteTwo</a>() <span class="keyword">const</span>;
|
||||
00100
|
||||
00102 MY_FLOAT <a class="code" href="classMessager.html#a7">getByteThree</a>() <span class="keyword">const</span>;
|
||||
00103
|
||||
00105 <span class="keywordtype">long</span> <a class="code" href="classMessager.html#a8">getChannel</a>() <span class="keyword">const</span>;
|
||||
00106
|
||||
00107 <span class="keyword">protected</span>:
|
||||
00108
|
||||
00109 <a class="code" href="classSKINI.html">SKINI</a> *skini;
|
||||
00110 <span class="keywordtype">long</span> type;
|
||||
00111 <span class="keywordtype">long</span> channel;
|
||||
00112 MY_FLOAT byte2;
|
||||
00113 MY_FLOAT byte3;
|
||||
00114 <span class="keywordtype">int</span> sources;
|
||||
00115 <span class="keywordtype">long</span> delta;
|
||||
00116 <span class="keywordtype">long</span> rtDelta;
|
||||
00117 <span class="keywordtype">char</span> message[MAX_MESSAGES][MESSAGE_LENGTH];
|
||||
00118 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> messageIndex;
|
||||
00119 <span class="keywordtype">int</span> nMessages;
|
||||
00120
|
||||
00121 <span class="preprocessor">#if defined(__STK_REALTIME__)</span>
|
||||
00122 <span class="preprocessor"></span>
|
||||
00123 <span class="comment">// Check MIDI source for new messages.</span>
|
||||
00124 <span class="keywordtype">bool</span> midiMessage(<span class="keywordtype">void</span>);
|
||||
00083 <a class="code" href="classMessager.html#a0">Messager</a>();
|
||||
00084
|
||||
00086 <a class="code" href="classMessager.html#a1">~Messager</a>();
|
||||
00087
|
||||
00089
|
||||
00095 <span class="keywordtype">void</span> <a class="code" href="classMessager.html#a2">popMessage</a>( <a class="code" href="structSkini_1_1Message.html">Skini::Message</a>& message );
|
||||
00096
|
||||
00098 <span class="keywordtype">void</span> <a class="code" href="classMessager.html#a3">pushMessage</a>( <a class="code" href="structSkini_1_1Message.html">Skini::Message</a>& message );
|
||||
00099
|
||||
00101
|
||||
00109 <span class="keywordtype">bool</span> <a class="code" href="classMessager.html#a4">setScoreFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* filename );
|
||||
00110
|
||||
00111 <span class="preprocessor">#if defined(__STK_REALTIME__)</span>
|
||||
00112 <span class="preprocessor"></span>
|
||||
00113
|
||||
00122 <span class="keywordtype">bool</span> startStdInput();
|
||||
00123
|
||||
00125
|
||||
00126 <span class="comment">// Check socket sources for new messages.</span>
|
||||
00127 <span class="keywordtype">bool</span> socketMessage(<span class="keywordtype">void</span>);
|
||||
00128
|
||||
00129 <span class="comment">// Receive and parse socket data.</span>
|
||||
00130 <span class="keywordtype">bool</span> readSocket(<span class="keywordtype">int</span> fd);
|
||||
00131
|
||||
00132 <a class="code" href="classRtMidi.html">RtMidi</a> *midi;
|
||||
00133 <a class="code" href="classThread.html">Thread</a> *thread;
|
||||
00134 <a class="code" href="classSocket.html">Socket</a> *soket;
|
||||
00135
|
||||
00136 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nSockets;
|
||||
00137 fd_set mask;
|
||||
00138 <span class="keywordtype">int</span> maxfd;
|
||||
00139 <span class="keywordtype">int</span> pipefd;
|
||||
00140 <span class="keywordtype">int</span> fd[16];
|
||||
00141 <span class="keywordtype">char</span> error[256];
|
||||
00142
|
||||
00143 <span class="preprocessor">#endif // __STK_REALTIME__</span>
|
||||
00144 <span class="preprocessor"></span>
|
||||
00145 };
|
||||
00146
|
||||
00147 <span class="preprocessor">#endif // defined(__MESSAGER_H)</span>
|
||||
00136 <span class="keywordtype">bool</span> startSocketInput( <span class="keywordtype">int</span> port=2001 );
|
||||
00137
|
||||
00139
|
||||
00151 <span class="keywordtype">bool</span> startMidiInput( <span class="keywordtype">int</span> port=0 );
|
||||
00152
|
||||
00153 <span class="preprocessor">#endif</span>
|
||||
00154 <span class="preprocessor"></span>
|
||||
00155 <span class="keyword">protected</span>:
|
||||
00156
|
||||
00157 MessagerData data_;
|
||||
00158
|
||||
00159 <span class="preprocessor">#if defined(__STK_REALTIME__)</span>
|
||||
00160 <span class="preprocessor"></span> <a class="code" href="classThread.html">Thread</a> stdinThread_;
|
||||
00161 <a class="code" href="classThread.html">Thread</a> socketThread_;
|
||||
00162 <span class="preprocessor">#endif</span>
|
||||
00163 <span class="preprocessor"></span>
|
||||
00164 };
|
||||
00165
|
||||
00166 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
92
doc/html/MidiFileIn_8h-source.html
Normal file
92
doc/html/MidiFileIn_8h-source.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>MidiFileIn.h</h1><div class="fragment"><pre>00001 <span class="comment">/**********************************************************************/</span>
|
||||
00016 <span class="comment">/**********************************************************************/</span>
|
||||
00017
|
||||
00018 <span class="preprocessor">#ifndef STK_MIDIFILEIN_H</span>
|
||||
00019 <span class="preprocessor"></span><span class="preprocessor">#define STK_MIDIFILEIN_H</span>
|
||||
00020 <span class="preprocessor"></span>
|
||||
00021 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00022 <span class="preprocessor">#include <string></span>
|
||||
00023 <span class="preprocessor">#include <vector></span>
|
||||
00024 <span class="preprocessor">#include <fstream></span>
|
||||
00025 <span class="preprocessor">#include <sstream></span>
|
||||
00026
|
||||
<a name="l00027"></a><a class="code" href="classMidiFileIn.html">00027</a> <span class="keyword">class </span><a class="code" href="classMidiFileIn.html">MidiFileIn</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00028 {
|
||||
00029 <span class="keyword">public</span>:
|
||||
00031
|
||||
00035 <a class="code" href="classMidiFileIn.html#a0">MidiFileIn</a>( std::string fileName );
|
||||
00036
|
||||
00038 <a class="code" href="classMidiFileIn.html#a1">~MidiFileIn</a>();
|
||||
00039
|
||||
00041 <span class="keywordtype">int</span> <a class="code" href="classMidiFileIn.html#a2">getFileFormat</a>() <span class="keyword">const</span>;
|
||||
00042
|
||||
00044 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classMidiFileIn.html#a3">getNumberOfTracks</a>() <span class="keyword">const</span>;
|
||||
00045
|
||||
00047
|
||||
00052 <span class="keywordtype">int</span> <a class="code" href="classMidiFileIn.html#a4">getDivision</a>() <span class="keyword">const</span>;
|
||||
00053
|
||||
00055
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classMidiFileIn.html#a5">rewindTrack</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> track = 0 );
|
||||
00060
|
||||
00062
|
||||
00069 <span class="keywordtype">double</span> <a class="code" href="classMidiFileIn.html#a6">getTickSeconds</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> track = 0 );
|
||||
00070
|
||||
00072
|
||||
00084 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classMidiFileIn.html#a7">getNextEvent</a>( std::vector<unsigned char> *event, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> track = 0 );
|
||||
00085
|
||||
00087
|
||||
00097 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classMidiFileIn.html#a8">getNextMidiEvent</a>( std::vector<unsigned char> *midiEvent, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> track = 0 );
|
||||
00098
|
||||
00099 <span class="keyword">protected</span>:
|
||||
00100
|
||||
00101 <span class="comment">// This protected class function is used for reading variable-length</span>
|
||||
00102 <span class="comment">// MIDI file values. It is assumed that this function is called with</span>
|
||||
00103 <span class="comment">// the file read pointer positioned at the start of a</span>
|
||||
00104 <span class="comment">// variable-length value. The function returns true if the value is</span>
|
||||
00105 <span class="comment">// successfully parsed. Otherwise, it returns false.</span>
|
||||
00106 <span class="keywordtype">bool</span> readVariableLength( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *value );
|
||||
00107
|
||||
00108 std::ifstream file_;
|
||||
00109 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nTracks_;
|
||||
00110 <span class="keywordtype">int</span> format_;
|
||||
00111 <span class="keywordtype">int</span> division_;
|
||||
00112 <span class="keywordtype">bool</span> usingTimeCode_;
|
||||
00113 std::vector<double> tickSeconds_;
|
||||
00114 std::vector<long> trackPointers_;
|
||||
00115 std::vector<long> trackOffsets_;
|
||||
00116 std::vector<long> trackLengths_;
|
||||
00117 std::vector<char> trackStatus_;
|
||||
00118
|
||||
00119 <span class="comment">// This structure and the following variables are used to save and</span>
|
||||
00120 <span class="comment">// keep track of a format 1 tempo map (and the initial tickSeconds</span>
|
||||
00121 <span class="comment">// parameter for formats 0 and 2).</span>
|
||||
00122 <span class="keyword">struct </span>TempoChange {
|
||||
00123 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> count;
|
||||
00124 <span class="keywordtype">double</span> tickSeconds;
|
||||
00125 };
|
||||
00126 std::vector<TempoChange> tempoEvents_;
|
||||
00127 std::vector<unsigned long> trackCounters_;
|
||||
00128 std::vector<unsigned int> trackTempoIndex_;
|
||||
00129 };
|
||||
00130
|
||||
00131 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,38 +8,38 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>ModalBar.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00028 <span class="comment">/***************************************************/</span>
|
||||
00029
|
||||
00030 <span class="preprocessor">#if !defined(__MODALBAR_H)</span>
|
||||
00031 <span class="preprocessor"></span><span class="preprocessor">#define __MODALBAR_H</span>
|
||||
00032 <span class="preprocessor"></span>
|
||||
00033 <span class="preprocessor">#include "Modal.h"</span>
|
||||
00034
|
||||
<a name="l00035"></a><a class="code" href="classModalBar.html">00035</a> <span class="keyword">class </span><a class="code" href="classModalBar.html">ModalBar</a> : <span class="keyword">public</span> <a class="code" href="classModal.html">Modal</a>
|
||||
00036 {
|
||||
00037 <span class="keyword">public</span>:
|
||||
00039 <a class="code" href="classModalBar.html#a0">ModalBar</a>();
|
||||
00040
|
||||
00042 <a class="code" href="classModalBar.html#a1">~ModalBar</a>();
|
||||
00043
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a2">setStickHardness</a>(MY_FLOAT hardness);
|
||||
00046
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a3">setStrikePosition</a>(MY_FLOAT position);
|
||||
00049
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a4">setPreset</a>(<span class="keywordtype">int</span> preset);
|
||||
00052
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a5">setModulationDepth</a>(MY_FLOAT mDepth);
|
||||
00055
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a6">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00058 };
|
||||
00059
|
||||
00060 <span class="preprocessor">#endif</span>
|
||||
00029 <span class="comment">/***************************************************/</span>
|
||||
00030
|
||||
00031 <span class="preprocessor">#ifndef STK_MODALBAR_H</span>
|
||||
00032 <span class="preprocessor"></span><span class="preprocessor">#define STK_MODALBAR_H</span>
|
||||
00033 <span class="preprocessor"></span>
|
||||
00034 <span class="preprocessor">#include "Modal.h"</span>
|
||||
00035
|
||||
<a name="l00036"></a><a class="code" href="classModalBar.html">00036</a> <span class="keyword">class </span><a class="code" href="classModalBar.html">ModalBar</a> : <span class="keyword">public</span> <a class="code" href="classModal.html">Modal</a>
|
||||
00037 {
|
||||
00038 <span class="keyword">public</span>:
|
||||
00040 <a class="code" href="classModalBar.html#a0">ModalBar</a>();
|
||||
00041
|
||||
00043 <a class="code" href="classModalBar.html#a1">~ModalBar</a>();
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a2">setStickHardness</a>(StkFloat hardness);
|
||||
00047
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a3">setStrikePosition</a>(StkFloat position);
|
||||
00050
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a4">setPreset</a>(<span class="keywordtype">int</span> preset);
|
||||
00053
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a5">setModulationDepth</a>(StkFloat mDepth);
|
||||
00056
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classModalBar.html#a6">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00059 };
|
||||
00060
|
||||
00061 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Modal.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00012 <span class="comment">/***************************************************/</span>
|
||||
00013
|
||||
00014 <span class="preprocessor">#if !defined(__MODAL_H)</span>
|
||||
00015 <span class="preprocessor"></span><span class="preprocessor">#define __MODAL_H</span>
|
||||
00014 <span class="preprocessor">#ifndef STK_MODAL_H</span>
|
||||
00015 <span class="preprocessor"></span><span class="preprocessor">#define STK_MODAL_H</span>
|
||||
00016 <span class="preprocessor"></span>
|
||||
00017 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00018 <span class="preprocessor">#include "Envelope.h"</span>
|
||||
@@ -24,57 +24,64 @@
|
||||
<a name="l00023"></a><a class="code" href="classModal.html">00023</a> <span class="keyword">class </span><a class="code" href="classModal.html">Modal</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00024 {
|
||||
00025 <span class="keyword">public</span>:
|
||||
00027 <a class="code" href="classModal.html#a0">Modal</a>( <span class="keywordtype">int</span> modes = 4 );
|
||||
00028
|
||||
00030 <span class="keyword">virtual</span> <a class="code" href="classModal.html#a1">~Modal</a>();
|
||||
00027
|
||||
00030 <a class="code" href="classModal.html#a0">Modal</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> modes = 4 );
|
||||
00031
|
||||
00033 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a2">clear</a>();
|
||||
00033 <span class="keyword">virtual</span> <a class="code" href="classModal.html#a1">~Modal</a>();
|
||||
00034
|
||||
00036 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classModal.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00036 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a2">clear</a>();
|
||||
00037
|
||||
00039 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a4">setRatioAndRadius</a>(<span class="keywordtype">int</span> modeIndex, MY_FLOAT ratio, MY_FLOAT radius);
|
||||
00039 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classModal.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00040
|
||||
00042 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a5">setMasterGain</a>(MY_FLOAT aGain);
|
||||
00042 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a4">setRatioAndRadius</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> modeIndex, StkFloat ratio, StkFloat radius);
|
||||
00043
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a6">setDirectGain</a>(MY_FLOAT aGain);
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a5">setMasterGain</a>(StkFloat aGain);
|
||||
00046
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a7">setModeGain</a>(<span class="keywordtype">int</span> modeIndex, MY_FLOAT gain);
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a6">setDirectGain</a>(StkFloat aGain);
|
||||
00049
|
||||
00051 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classModal.html#a8">strike</a>(MY_FLOAT amplitude);
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a7">setModeGain</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> modeIndex, StkFloat gain);
|
||||
00052
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a9">damp</a>(MY_FLOAT amplitude);
|
||||
00054 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classModal.html#a8">strike</a>(StkFloat amplitude);
|
||||
00055
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a10">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a9">damp</a>(StkFloat amplitude);
|
||||
00058
|
||||
00060 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a11">noteOff</a>(MY_FLOAT amplitude);
|
||||
00060 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a10">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00061
|
||||
00063 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classModal.html#a12">tick</a>();
|
||||
00063 <span class="keywordtype">void</span> <a class="code" href="classModal.html#a11">noteOff</a>(StkFloat amplitude);
|
||||
00064
|
||||
00066 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classModal.html#a13">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value) = 0;
|
||||
00066 <span class="keyword">virtual</span> StkFloat <a class="code" href="classModal.html#a12">tick</a>();
|
||||
00067
|
||||
00068 <span class="keyword">protected</span>:
|
||||
00069 <a class="code" href="classEnvelope.html">Envelope</a> *envelope;
|
||||
00070 <a class="code" href="classWvIn.html">WvIn</a> *wave;
|
||||
00071 <a class="code" href="classBiQuad.html">BiQuad</a> **filters;
|
||||
00072 <a class="code" href="classOnePole.html">OnePole</a> *onepole;
|
||||
00073 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00074 <span class="keywordtype">int</span> nModes;
|
||||
00075 MY_FLOAT vibratoGain;
|
||||
00076 MY_FLOAT masterGain;
|
||||
00077 MY_FLOAT directGain;
|
||||
00078 MY_FLOAT stickHardness;
|
||||
00079 MY_FLOAT strikePosition;
|
||||
00080 MY_FLOAT baseFrequency;
|
||||
00081 MY_FLOAT *ratios;
|
||||
00082 MY_FLOAT *radii;
|
||||
00083
|
||||
00084 };
|
||||
00085
|
||||
00086 <span class="preprocessor">#endif</span>
|
||||
00069 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classModal.html#a12">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00070
|
||||
00072
|
||||
00078 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classModal.html#a12">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00079
|
||||
00081 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classModal.html#a15">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value) = 0;
|
||||
00082
|
||||
00083 <span class="keyword">protected</span>:
|
||||
00084 <a class="code" href="classEnvelope.html">Envelope</a> envelope_;
|
||||
00085 <a class="code" href="classWvIn.html">WvIn</a> *wave_;
|
||||
00086 <a class="code" href="classBiQuad.html">BiQuad</a> **filters_;
|
||||
00087 <a class="code" href="classOnePole.html">OnePole</a> onepole_;
|
||||
00088 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00089
|
||||
00090 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nModes_;
|
||||
00091 std::vector<StkFloat> ratios_;
|
||||
00092 std::vector<StkFloat> radii_;
|
||||
00093
|
||||
00094 StkFloat vibratoGain_;
|
||||
00095 StkFloat masterGain_;
|
||||
00096 StkFloat directGain_;
|
||||
00097 StkFloat stickHardness_;
|
||||
00098 StkFloat strikePosition_;
|
||||
00099 StkFloat baseFrequency_;
|
||||
00100 };
|
||||
00101
|
||||
00102 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,54 +8,55 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Modulate.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00011 <span class="comment">/***************************************************/</span>
|
||||
00012
|
||||
00013 <span class="preprocessor">#if !defined(__MODULATE_H)</span>
|
||||
00014 <span class="preprocessor"></span><span class="preprocessor">#define __MODULATE_H</span>
|
||||
00013 <span class="preprocessor">#ifndef STK_MODULATE_H</span>
|
||||
00014 <span class="preprocessor"></span><span class="preprocessor">#define STK_MODULATE_H</span>
|
||||
00015 <span class="preprocessor"></span>
|
||||
00016 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00016 <span class="preprocessor">#include "Generator.h"</span>
|
||||
00017 <span class="preprocessor">#include "WaveLoop.h"</span>
|
||||
00018 <span class="preprocessor">#include "SubNoise.h"</span>
|
||||
00019 <span class="preprocessor">#include "OnePole.h"</span>
|
||||
00020
|
||||
<a name="l00021"></a><a class="code" href="classModulate.html">00021</a> <span class="keyword">class </span><a class="code" href="classModulate.html">Modulate</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
<a name="l00021"></a><a class="code" href="classModulate.html">00021</a> <span class="keyword">class </span><a class="code" href="classModulate.html">Modulate</a> : <span class="keyword">public</span> <a class="code" href="classGenerator.html">Generator</a>
|
||||
00022 {
|
||||
00023 <span class="keyword">public</span>:
|
||||
00025 <a class="code" href="classModulate.html#a0">Modulate</a>();
|
||||
00026
|
||||
00028 <a class="code" href="classModulate.html#a1">~Modulate</a>();
|
||||
00025
|
||||
00028 <a class="code" href="classModulate.html#a0">Modulate</a>();
|
||||
00029
|
||||
00031 <span class="keywordtype">void</span> <a class="code" href="classModulate.html#a2">reset</a>();
|
||||
00031 <a class="code" href="classModulate.html#a1">~Modulate</a>();
|
||||
00032
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classModulate.html#a3">setVibratoRate</a>(MY_FLOAT aRate);
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classModulate.html#a2">reset</a>();
|
||||
00035
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classModulate.html#a4">setVibratoGain</a>(MY_FLOAT aGain);
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classModulate.html#a3">setVibratoRate</a>(StkFloat rate);
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classModulate.html#a5">setRandomGain</a>(MY_FLOAT aGain);
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classModulate.html#a4">setVibratoGain</a>(StkFloat gain);
|
||||
00041
|
||||
00043 MY_FLOAT <a class="code" href="classModulate.html#a6">tick</a>();
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classModulate.html#a5">setRandomGain</a>(StkFloat gain);
|
||||
00044
|
||||
00046 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classModulate.html#a6">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00046 StkFloat <a class="code" href="classModulate.html#a6">tick</a>();
|
||||
00047
|
||||
00049 MY_FLOAT <a class="code" href="classModulate.html#a8">lastOut</a>() <span class="keyword">const</span>;
|
||||
00049 StkFloat *<a class="code" href="classModulate.html#a6">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00050
|
||||
00051 <span class="keyword">protected</span>:
|
||||
00052 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00053 <a class="code" href="classSubNoise.html">SubNoise</a> *noise;
|
||||
00054 <a class="code" href="classOnePole.html">OnePole</a> *filter;
|
||||
00055 MY_FLOAT vibratoGain;
|
||||
00056 MY_FLOAT randomGain;
|
||||
00057 MY_FLOAT lastOutput;
|
||||
00058
|
||||
00059 };
|
||||
00060
|
||||
00061 <span class="preprocessor">#endif</span>
|
||||
00052
|
||||
00058 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classModulate.html#a6">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00059
|
||||
00060 <span class="keyword">protected</span>:
|
||||
00061 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00062 <a class="code" href="classSubNoise.html">SubNoise</a> noise_;
|
||||
00063 <a class="code" href="classOnePole.html">OnePole</a> filter_;
|
||||
00064 StkFloat vibratoGain_;
|
||||
00065 StkFloat randomGain_;
|
||||
00066
|
||||
00067 };
|
||||
00068
|
||||
00069 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Moog.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00019 <span class="comment">/***************************************************/</span>
|
||||
00020
|
||||
00021 <span class="preprocessor">#if !defined(__MOOG_H)</span>
|
||||
00022 <span class="preprocessor"></span><span class="preprocessor">#define __MOOG_H</span>
|
||||
00021 <span class="preprocessor">#ifndef STK_MOOG_H</span>
|
||||
00022 <span class="preprocessor"></span><span class="preprocessor">#define STK_MOOG_H</span>
|
||||
00023 <span class="preprocessor"></span>
|
||||
00024 <span class="preprocessor">#include "Sampler.h"</span>
|
||||
00025 <span class="preprocessor">#include "FormSwep.h"</span>
|
||||
@@ -21,35 +21,41 @@
|
||||
<a name="l00027"></a><a class="code" href="classMoog.html">00027</a> <span class="keyword">class </span><a class="code" href="classMoog.html">Moog</a> : <span class="keyword">public</span> <a class="code" href="classSampler.html">Sampler</a>
|
||||
00028 {
|
||||
00029 <span class="keyword">public</span>:
|
||||
00031 <a class="code" href="classMoog.html#a0">Moog</a>();
|
||||
00032
|
||||
00034 <a class="code" href="classMoog.html#a1">~Moog</a>();
|
||||
00031
|
||||
00034 <a class="code" href="classMoog.html#a0">Moog</a>();
|
||||
00035
|
||||
00037 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a2">setFrequency</a>(MY_FLOAT frequency);
|
||||
00037 <a class="code" href="classMoog.html#a1">~Moog</a>();
|
||||
00038
|
||||
00040 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a3">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a2">setFrequency</a>(StkFloat frequency);
|
||||
00041
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a4">setModulationSpeed</a>(MY_FLOAT mSpeed);
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a3">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a5">setModulationDepth</a>(MY_FLOAT mDepth);
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a4">setModulationSpeed</a>(StkFloat mSpeed);
|
||||
00047
|
||||
00049 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classMoog.html#a6">tick</a>();
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a5">setModulationDepth</a>(StkFloat mDepth);
|
||||
00050
|
||||
00052 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a7">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00052 StkFloat <a class="code" href="classMoog.html#a6">tick</a>();
|
||||
00053
|
||||
00054 <span class="keyword">protected</span>:
|
||||
00055 <a class="code" href="classFormSwep.html">FormSwep</a> *filters[2];
|
||||
00056 MY_FLOAT modDepth;
|
||||
00057 MY_FLOAT filterQ;
|
||||
00058 MY_FLOAT filterRate;
|
||||
00059
|
||||
00060 };
|
||||
00061
|
||||
00062 <span class="preprocessor">#endif</span>
|
||||
00055 StkFloat *<a class="code" href="classMoog.html#a6">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00056
|
||||
00058
|
||||
00064 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classMoog.html#a6">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00065
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classMoog.html#a9">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00068
|
||||
00069 <span class="keyword">protected</span>:
|
||||
00070 <a class="code" href="classFormSwep.html">FormSwep</a> filters_[2];
|
||||
00071 StkFloat modDepth_;
|
||||
00072 StkFloat filterQ_;
|
||||
00073 StkFloat filterRate_;
|
||||
00074
|
||||
00075 };
|
||||
00076
|
||||
00077 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
68
doc/html/Mutex_8h-source.html
Normal file
68
doc/html/Mutex_8h-source.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Mutex.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00012 <span class="comment">/***************************************************/</span>
|
||||
00013
|
||||
00014 <span class="preprocessor">#ifndef STK_MUTEX_H</span>
|
||||
00015 <span class="preprocessor"></span><span class="preprocessor">#define STK_MUTEX_H</span>
|
||||
00016 <span class="preprocessor"></span>
|
||||
00017 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00018
|
||||
00019 <span class="preprocessor">#if (defined(__OS_IRIX__) || defined(__OS_LINUX__) || defined(__OS_MACOSX__))</span>
|
||||
00020 <span class="preprocessor"></span>
|
||||
00021 <span class="preprocessor"> #include <pthread.h></span>
|
||||
00022 <span class="keyword">typedef</span> pthread_mutex_t MUTEX;
|
||||
00023 <span class="keyword">typedef</span> pthread_cond_t CONDITION;
|
||||
00024
|
||||
00025 <span class="preprocessor">#elif defined(__OS_WINDOWS__)</span>
|
||||
00026 <span class="preprocessor"></span>
|
||||
00027 <span class="preprocessor"> #include <windows.h></span>
|
||||
00028 <span class="preprocessor"> #include <process.h></span>
|
||||
00029 <span class="keyword">typedef</span> CRITICAL_SECTION MUTEX;
|
||||
00030 <span class="keyword">typedef</span> HANDLE CONDITION;
|
||||
00031
|
||||
00032 <span class="preprocessor">#endif</span>
|
||||
00033 <span class="preprocessor"></span>
|
||||
<a name="l00034"></a><a class="code" href="classMutex.html">00034</a> <span class="keyword">class </span><a class="code" href="classMutex.html">Mutex</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00035 {
|
||||
00036 <span class="keyword">public</span>:
|
||||
00038 <a class="code" href="classMutex.html#a0">Mutex</a>();
|
||||
00039
|
||||
00041 <a class="code" href="classMutex.html#a1">~Mutex</a>();
|
||||
00042
|
||||
00044 <span class="keywordtype">void</span> <a class="code" href="classMutex.html#a2">lock</a>(<span class="keywordtype">void</span>);
|
||||
00045
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classMutex.html#a3">unlock</a>(<span class="keywordtype">void</span>);
|
||||
00048
|
||||
00050
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classMutex.html#a4">wait</a>(<span class="keywordtype">void</span>);
|
||||
00055
|
||||
00057
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classMutex.html#a5">signal</a>(<span class="keywordtype">void</span>);
|
||||
00062
|
||||
00063 <span class="keyword">protected</span>:
|
||||
00064
|
||||
00065 MUTEX mutex_;
|
||||
00066 CONDITION condition_;
|
||||
00067
|
||||
00068 };
|
||||
00069
|
||||
00070 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,42 +8,49 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>NRev.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00017 <span class="comment">/***************************************************/</span>
|
||||
00018
|
||||
00019 <span class="preprocessor">#if !defined(__NREV_H)</span>
|
||||
00020 <span class="preprocessor"></span><span class="preprocessor">#define __NREV_H</span>
|
||||
00019 <span class="preprocessor">#ifndef STK_NREV_H</span>
|
||||
00020 <span class="preprocessor"></span><span class="preprocessor">#define STK_NREV_H</span>
|
||||
00021 <span class="preprocessor"></span>
|
||||
00022 <span class="preprocessor">#include "Reverb.h"</span>
|
||||
00022 <span class="preprocessor">#include "Effect.h"</span>
|
||||
00023 <span class="preprocessor">#include "Delay.h"</span>
|
||||
00024
|
||||
<a name="l00025"></a><a class="code" href="classNRev.html">00025</a> <span class="keyword">class </span><a class="code" href="classNRev.html">NRev</a> : <span class="keyword">public</span> <a class="code" href="classReverb.html">Reverb</a>
|
||||
<a name="l00025"></a><a class="code" href="classNRev.html">00025</a> <span class="keyword">class </span><a class="code" href="classNRev.html">NRev</a> : <span class="keyword">public</span> <a class="code" href="classEffect.html">Effect</a>
|
||||
00026 {
|
||||
00027 <span class="keyword">public</span>:
|
||||
00029 <a class="code" href="classNRev.html#a0">NRev</a>(MY_FLOAT T60);
|
||||
00029 <a class="code" href="classNRev.html#a0">NRev</a>( StkFloat T60 = 1.0 );
|
||||
00030
|
||||
00032 <a class="code" href="classNRev.html#a1">~NRev</a>();
|
||||
00033
|
||||
00035 <span class="keywordtype">void</span> <a class="code" href="classNRev.html#a2">clear</a>();
|
||||
00036
|
||||
00038 MY_FLOAT <a class="code" href="classNRev.html#a3">tick</a>(MY_FLOAT input);
|
||||
00038 <span class="keywordtype">void</span> <a class="code" href="classNRev.html#a3">setT60</a>( StkFloat T60 );
|
||||
00039
|
||||
00040 <span class="keyword">protected</span>:
|
||||
00041 <a class="code" href="classDelay.html">Delay</a> *allpassDelays[8];
|
||||
00042 <a class="code" href="classDelay.html">Delay</a> *combDelays[6];
|
||||
00043 MY_FLOAT allpassCoefficient;
|
||||
00044 MY_FLOAT combCoefficient[6];
|
||||
00045 MY_FLOAT lowpassState;
|
||||
00046
|
||||
00047 };
|
||||
00048
|
||||
00049 <span class="preprocessor">#endif</span>
|
||||
00050 <span class="preprocessor"></span>
|
||||
00041 StkFloat <a class="code" href="classNRev.html#a4">tick</a>(StkFloat input);
|
||||
00042
|
||||
00044 StkFloat *<a class="code" href="classNRev.html#a4">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00045
|
||||
00047
|
||||
00053 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classNRev.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00054
|
||||
00055 <span class="keyword">protected</span>:
|
||||
00056 <a class="code" href="classDelay.html">Delay</a> allpassDelays_[8];
|
||||
00057 <a class="code" href="classDelay.html">Delay</a> combDelays_[6];
|
||||
00058 StkFloat allpassCoefficient_;
|
||||
00059 StkFloat combCoefficient_[6];
|
||||
00060 StkFloat lowpassState_;
|
||||
00061
|
||||
00062 };
|
||||
00063
|
||||
00064 <span class="preprocessor">#endif</span>
|
||||
00065 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Noise.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00011 <span class="comment">/***************************************************/</span>
|
||||
00012
|
||||
00013 <span class="preprocessor">#if !defined(__NOISE_H)</span>
|
||||
00014 <span class="preprocessor"></span><span class="preprocessor">#define __NOISE_H</span>
|
||||
00013 <span class="preprocessor">#ifndef STK_NOISE_H</span>
|
||||
00014 <span class="preprocessor"></span><span class="preprocessor">#define STK_NOISE_H</span>
|
||||
00015 <span class="preprocessor"></span>
|
||||
00016 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00016 <span class="preprocessor">#include "Generator.h"</span>
|
||||
00017
|
||||
<a name="l00018"></a><a class="code" href="classNoise.html">00018</a> <span class="keyword">class </span><a class="code" href="classNoise.html">Noise</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
<a name="l00018"></a><a class="code" href="classNoise.html">00018</a> <span class="keyword">class </span><a class="code" href="classNoise.html">Noise</a> : <span class="keyword">public</span> <a class="code" href="classGenerator.html">Generator</a>
|
||||
00019 {
|
||||
00020 <span class="keyword">public</span>:
|
||||
00021
|
||||
@@ -31,23 +31,22 @@
|
||||
00036
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classNoise.html#a3">setSeed</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> seed = 0 );
|
||||
00041
|
||||
00043 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classNoise.html#a4">tick</a>();
|
||||
00043 <span class="keyword">virtual</span> StkFloat <a class="code" href="classNoise.html#a4">tick</a>();
|
||||
00044
|
||||
00046 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classNoise.html#a4">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00046 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classNoise.html#a4">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00047
|
||||
00049 MY_FLOAT <a class="code" href="classNoise.html#a6">lastOut</a>() <span class="keyword">const</span>;
|
||||
00050
|
||||
00051 <span class="keyword">protected</span>:
|
||||
00052
|
||||
00053 MY_FLOAT lastOutput;
|
||||
00054
|
||||
00055 };
|
||||
00049
|
||||
00055 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classNoise.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00056
|
||||
00057 <span class="preprocessor">#endif</span>
|
||||
00057 <span class="keyword">protected</span>:
|
||||
00058
|
||||
00059 };
|
||||
00060
|
||||
00061 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>OnePole.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00013 <span class="comment">/***************************************************/</span>
|
||||
00014
|
||||
00015 <span class="preprocessor">#if !defined(__ONEPOLE_H)</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define __ONEPOLE_H</span>
|
||||
00015 <span class="preprocessor">#ifndef STK_ONEPOLE_H</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define STK_ONEPOLE_H</span>
|
||||
00017 <span class="preprocessor"></span>
|
||||
00018 <span class="preprocessor">#include "Filter.h"</span>
|
||||
00019
|
||||
@@ -23,36 +23,40 @@
|
||||
00023
|
||||
00025 <a class="code" href="classOnePole.html#a0">OnePole</a>();
|
||||
00026
|
||||
00028 <a class="code" href="classOnePole.html#a0">OnePole</a>(MY_FLOAT thePole);
|
||||
00028 <a class="code" href="classOnePole.html#a0">OnePole</a>(StkFloat thePole);
|
||||
00029
|
||||
00031 <a class="code" href="classOnePole.html#a2">~OnePole</a>();
|
||||
00032
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a3">clear</a>(<span class="keywordtype">void</span>);
|
||||
00035
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a4">setB0</a>(MY_FLOAT b0);
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a4">setB0</a>(StkFloat b0);
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a5">setA1</a>(MY_FLOAT a1);
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a5">setA1</a>(StkFloat a1);
|
||||
00041
|
||||
00043
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a6">setPole</a>(MY_FLOAT thePole);
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a6">setPole</a>(StkFloat thePole);
|
||||
00051
|
||||
00053
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a7">setGain</a>(MY_FLOAT theGain);
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classOnePole.html#a7">setGain</a>(StkFloat gain);
|
||||
00058
|
||||
00060 MY_FLOAT <a class="code" href="classOnePole.html#a8">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00060 StkFloat <a class="code" href="classOnePole.html#a8">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00061
|
||||
00063 MY_FLOAT <a class="code" href="classOnePole.html#a9">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00063 StkFloat <a class="code" href="classOnePole.html#a9">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00064
|
||||
00066 MY_FLOAT <a class="code" href="classOnePole.html#a10">tick</a>(MY_FLOAT sample);
|
||||
00066 StkFloat <a class="code" href="classOnePole.html#a10">tick</a>(StkFloat sample);
|
||||
00067
|
||||
00069 MY_FLOAT *<a class="code" href="classOnePole.html#a10">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00070 };
|
||||
00071
|
||||
00072 <span class="preprocessor">#endif</span>
|
||||
00069 StkFloat *<a class="code" href="classOnePole.html#a10">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00070
|
||||
00072
|
||||
00078 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classOnePole.html#a10">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00079
|
||||
00080 };
|
||||
00081
|
||||
00082 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>OneZero.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00013 <span class="comment">/***************************************************/</span>
|
||||
00014
|
||||
00015 <span class="preprocessor">#if !defined(__ONEZERO_H)</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define __ONEZERO_H</span>
|
||||
00015 <span class="preprocessor">#ifndef STK_ONEZERO_H</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define STK_ONEZERO_H</span>
|
||||
00017 <span class="preprocessor"></span>
|
||||
00018 <span class="preprocessor">#include "Filter.h"</span>
|
||||
00019
|
||||
@@ -23,36 +23,40 @@
|
||||
00023
|
||||
00025 <a class="code" href="classOneZero.html#a0">OneZero</a>();
|
||||
00026
|
||||
00028 <a class="code" href="classOneZero.html#a0">OneZero</a>(MY_FLOAT theZero);
|
||||
00028 <a class="code" href="classOneZero.html#a0">OneZero</a>(StkFloat theZero);
|
||||
00029
|
||||
00031 <a class="code" href="classOneZero.html#a2">~OneZero</a>();
|
||||
00032
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a3">clear</a>(<span class="keywordtype">void</span>);
|
||||
00035
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a4">setB0</a>(MY_FLOAT b0);
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a4">setB0</a>(StkFloat b0);
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a5">setB1</a>(MY_FLOAT b1);
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a5">setB1</a>(StkFloat b1);
|
||||
00041
|
||||
00043
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a6">setZero</a>(MY_FLOAT theZero);
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a6">setZero</a>(StkFloat theZero);
|
||||
00051
|
||||
00053
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a7">setGain</a>(MY_FLOAT theGain);
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classOneZero.html#a7">setGain</a>(StkFloat gain);
|
||||
00058
|
||||
00060 MY_FLOAT <a class="code" href="classOneZero.html#a8">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00060 StkFloat <a class="code" href="classOneZero.html#a8">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00061
|
||||
00063 MY_FLOAT <a class="code" href="classOneZero.html#a9">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00063 StkFloat <a class="code" href="classOneZero.html#a9">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00064
|
||||
00066 MY_FLOAT <a class="code" href="classOneZero.html#a10">tick</a>(MY_FLOAT sample);
|
||||
00066 StkFloat <a class="code" href="classOneZero.html#a10">tick</a>(StkFloat sample);
|
||||
00067
|
||||
00069 MY_FLOAT *<a class="code" href="classOneZero.html#a10">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00070 };
|
||||
00071
|
||||
00072 <span class="preprocessor">#endif</span>
|
||||
00069 StkFloat *<a class="code" href="classOneZero.html#a10">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00070
|
||||
00072
|
||||
00078 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classOneZero.html#a10">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00079
|
||||
00080 };
|
||||
00081
|
||||
00082 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,41 +8,48 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>PRCRev.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00015 <span class="comment">/***************************************************/</span>
|
||||
00016
|
||||
00017 <span class="preprocessor">#if !defined(__PRCREV_H)</span>
|
||||
00018 <span class="preprocessor"></span><span class="preprocessor">#define __PRCREV_H</span>
|
||||
00017 <span class="preprocessor">#ifndef STK_PRCREV_H</span>
|
||||
00018 <span class="preprocessor"></span><span class="preprocessor">#define STK_PRCREV_H</span>
|
||||
00019 <span class="preprocessor"></span>
|
||||
00020 <span class="preprocessor">#include "Reverb.h"</span>
|
||||
00020 <span class="preprocessor">#include "Effect.h"</span>
|
||||
00021 <span class="preprocessor">#include "Delay.h"</span>
|
||||
00022
|
||||
<a name="l00023"></a><a class="code" href="classPRCRev.html">00023</a> <span class="keyword">class </span><a class="code" href="classPRCRev.html">PRCRev</a> : <span class="keyword">public</span> <a class="code" href="classReverb.html">Reverb</a>
|
||||
<a name="l00023"></a><a class="code" href="classPRCRev.html">00023</a> <span class="keyword">class </span><a class="code" href="classPRCRev.html">PRCRev</a> : <span class="keyword">public</span> <a class="code" href="classEffect.html">Effect</a>
|
||||
00024 {
|
||||
00025 <span class="keyword">public</span>:
|
||||
00027 <a class="code" href="classPRCRev.html#a0">PRCRev</a>(MY_FLOAT T60);
|
||||
00027 <a class="code" href="classPRCRev.html#a0">PRCRev</a>( StkFloat T60 = 1.0 );
|
||||
00028
|
||||
00030 <a class="code" href="classPRCRev.html#a1">~PRCRev</a>();
|
||||
00031
|
||||
00033 <span class="keywordtype">void</span> <a class="code" href="classPRCRev.html#a2">clear</a>();
|
||||
00034
|
||||
00036 MY_FLOAT <a class="code" href="classPRCRev.html#a3">tick</a>(MY_FLOAT input);
|
||||
00036 <span class="keywordtype">void</span> <a class="code" href="classPRCRev.html#a3">setT60</a>( StkFloat T60 );
|
||||
00037
|
||||
00038 <span class="keyword">protected</span>:
|
||||
00039 <a class="code" href="classDelay.html">Delay</a> *allpassDelays[2];
|
||||
00040 <a class="code" href="classDelay.html">Delay</a> *combDelays[2];
|
||||
00041 MY_FLOAT allpassCoefficient;
|
||||
00042 MY_FLOAT combCoefficient[2];
|
||||
00039 StkFloat <a class="code" href="classPRCRev.html#a4">tick</a>(StkFloat input);
|
||||
00040
|
||||
00042 StkFloat *<a class="code" href="classPRCRev.html#a4">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00043
|
||||
00044 };
|
||||
00045
|
||||
00046 <span class="preprocessor">#endif</span>
|
||||
00047 <span class="preprocessor"></span>
|
||||
00051 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classPRCRev.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00052
|
||||
00053 <span class="keyword">protected</span>:
|
||||
00054 <a class="code" href="classDelay.html">Delay</a> allpassDelays_[2];
|
||||
00055 <a class="code" href="classDelay.html">Delay</a> combDelays_[2];
|
||||
00056 StkFloat allpassCoefficient_;
|
||||
00057 StkFloat combCoefficient_[2];
|
||||
00058
|
||||
00059 };
|
||||
00060
|
||||
00061 <span class="preprocessor">#endif</span>
|
||||
00062 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,34 +8,40 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>PercFlut.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00027 <span class="comment">/***************************************************/</span>
|
||||
00028
|
||||
00029 <span class="preprocessor">#if !defined(__PERCFLUT_H)</span>
|
||||
00030 <span class="preprocessor"></span><span class="preprocessor">#define __PERCFLUT_H</span>
|
||||
00029 <span class="preprocessor">#ifndef STK_PERCFLUT_H</span>
|
||||
00030 <span class="preprocessor"></span><span class="preprocessor">#define STK_PERCFLUT_H</span>
|
||||
00031 <span class="preprocessor"></span>
|
||||
00032 <span class="preprocessor">#include "FM.h"</span>
|
||||
00033
|
||||
<a name="l00034"></a><a class="code" href="classPercFlut.html">00034</a> <span class="keyword">class </span><a class="code" href="classPercFlut.html">PercFlut</a> : <span class="keyword">public</span> <a class="code" href="classFM.html">FM</a>
|
||||
00035 {
|
||||
00036 <span class="keyword">public</span>:
|
||||
00038 <a class="code" href="classPercFlut.html#a0">PercFlut</a>();
|
||||
00039
|
||||
00041 <a class="code" href="classPercFlut.html#a1">~PercFlut</a>();
|
||||
00038
|
||||
00041 <a class="code" href="classPercFlut.html#a0">PercFlut</a>();
|
||||
00042
|
||||
00044 <span class="keywordtype">void</span> <a class="code" href="classPercFlut.html#a2">setFrequency</a>(MY_FLOAT frequency);
|
||||
00044 <a class="code" href="classPercFlut.html#a1">~PercFlut</a>();
|
||||
00045
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classPercFlut.html#a3">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classPercFlut.html#a2">setFrequency</a>(StkFloat frequency);
|
||||
00048
|
||||
00050 MY_FLOAT <a class="code" href="classPercFlut.html#a4">tick</a>();
|
||||
00051 };
|
||||
00052
|
||||
00053 <span class="preprocessor">#endif</span>
|
||||
00050 <span class="keywordtype">void</span> <a class="code" href="classPercFlut.html#a3">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00051
|
||||
00053 StkFloat <a class="code" href="classPercFlut.html#a4">tick</a>();
|
||||
00054
|
||||
00056 StkFloat *<a class="code" href="classPercFlut.html#a4">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00057
|
||||
00059
|
||||
00065 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classPercFlut.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00066 };
|
||||
00067
|
||||
00068 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Phonemes.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00011 <span class="comment">/***************************************************/</span>
|
||||
00012
|
||||
00013 <span class="preprocessor">#if !defined(__PHONEMES_H)</span>
|
||||
00014 <span class="preprocessor"></span><span class="preprocessor">#define __PHONEMES_H</span>
|
||||
00013 <span class="preprocessor">#ifndef STK_PHONEMES_H</span>
|
||||
00014 <span class="preprocessor"></span><span class="preprocessor">#define STK_PHONEMES_H</span>
|
||||
00015 <span class="preprocessor"></span>
|
||||
00016 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00017
|
||||
<a name="l00018"></a><a class="code" href="classPhonemes.html">00018</a> <span class="keyword">class </span><a class="code" href="classPhonemes.html">Phonemes</a>
|
||||
<a name="l00018"></a><a class="code" href="classPhonemes.html">00018</a> <span class="keyword">class </span><a class="code" href="classPhonemes.html">Phonemes</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00019 {
|
||||
00020 <span class="keyword">public</span>:
|
||||
00021
|
||||
@@ -26,29 +26,28 @@
|
||||
00024
|
||||
00026 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classPhonemes.html#e0">name</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index );
|
||||
00027
|
||||
00029 <span class="keyword">static</span> MY_FLOAT <a class="code" href="classPhonemes.html#e1">voiceGain</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index );
|
||||
00029 <span class="keyword">static</span> StkFloat <a class="code" href="classPhonemes.html#e1">voiceGain</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index );
|
||||
00030
|
||||
00032 <span class="keyword">static</span> MY_FLOAT <a class="code" href="classPhonemes.html#e2">noiseGain</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index );
|
||||
00032 <span class="keyword">static</span> StkFloat <a class="code" href="classPhonemes.html#e2">noiseGain</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index );
|
||||
00033
|
||||
00035 <span class="keyword">static</span> MY_FLOAT <a class="code" href="classPhonemes.html#e3">formantFrequency</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> partial );
|
||||
00035 <span class="keyword">static</span> StkFloat <a class="code" href="classPhonemes.html#e3">formantFrequency</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> partial );
|
||||
00036
|
||||
00038 <span class="keyword">static</span> MY_FLOAT <a class="code" href="classPhonemes.html#e4">formantRadius</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> partial );
|
||||
00038 <span class="keyword">static</span> StkFloat <a class="code" href="classPhonemes.html#e4">formantRadius</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> partial );
|
||||
00039
|
||||
00041 <span class="keyword">static</span> MY_FLOAT <a class="code" href="classPhonemes.html#e5">formantGain</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> partial );
|
||||
00041 <span class="keyword">static</span> StkFloat <a class="code" href="classPhonemes.html#e5">formantGain</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> partial );
|
||||
00042
|
||||
00043 <span class="keyword">private</span>:
|
||||
00044
|
||||
00045 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> phonemeNames[][4];
|
||||
00046 <span class="keyword">static</span> <span class="keyword">const</span> MY_FLOAT phonemeGains[][2];
|
||||
00047 <span class="keyword">static</span> <span class="keyword">const</span> MY_FLOAT phonemeParameters[][4][3];
|
||||
00048
|
||||
00049 };
|
||||
00050
|
||||
00051 <span class="preprocessor">#endif</span>
|
||||
00046 <span class="keyword">static</span> <span class="keyword">const</span> StkFloat phonemeGains[][2];
|
||||
00047 <span class="keyword">static</span> <span class="keyword">const</span> StkFloat phonemeParameters[][4][3];
|
||||
00048 };
|
||||
00049
|
||||
00050 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>PitShift.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00010 <span class="comment">/***************************************************/</span>
|
||||
00011
|
||||
00012 <span class="preprocessor">#if !defined(__PITSHIFT_H)</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define __PITSHIFT_H</span>
|
||||
00012 <span class="preprocessor">#ifndef STK_PITSHIFT_H</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define STK_PITSHIFT_H</span>
|
||||
00014 <span class="preprocessor"></span>
|
||||
00015 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00015 <span class="preprocessor">#include "Effect.h"</span>
|
||||
00016 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
00017
|
||||
<a name="l00018"></a><a class="code" href="classPitShift.html">00018</a> <span class="keyword">class </span><a class="code" href="classPitShift.html">PitShift</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
<a name="l00018"></a><a class="code" href="classPitShift.html">00018</a> <span class="keyword">class </span><a class="code" href="classPitShift.html">PitShift</a> : <span class="keyword">public</span> <a class="code" href="classEffect.html">Effect</a>
|
||||
00019 {
|
||||
00020 <span class="keyword">public</span>:
|
||||
00022 <a class="code" href="classPitShift.html#a0">PitShift</a>();
|
||||
@@ -27,32 +27,31 @@
|
||||
00026
|
||||
00028 <span class="keywordtype">void</span> <a class="code" href="classPitShift.html#a2">clear</a>();
|
||||
00029
|
||||
00031 <span class="keywordtype">void</span> <a class="code" href="classPitShift.html#a3">setShift</a>(MY_FLOAT shift);
|
||||
00031 <span class="keywordtype">void</span> <a class="code" href="classPitShift.html#a3">setShift</a>(StkFloat shift);
|
||||
00032
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classPitShift.html#a4">setEffectMix</a>(MY_FLOAT mix);
|
||||
00034 StkFloat <a class="code" href="classPitShift.html#a4">tick</a>(StkFloat input);
|
||||
00035
|
||||
00037 MY_FLOAT <a class="code" href="classPitShift.html#a5">lastOut</a>() <span class="keyword">const</span>;
|
||||
00037 StkFloat *<a class="code" href="classPitShift.html#a4">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00038
|
||||
00040 MY_FLOAT <a class="code" href="classPitShift.html#a6">tick</a>(MY_FLOAT input);
|
||||
00041
|
||||
00043 MY_FLOAT *<a class="code" href="classPitShift.html#a6">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00044
|
||||
00045 <span class="keyword">protected</span>:
|
||||
00046 <a class="code" href="classDelayL.html">DelayL</a> *delayLine[2];
|
||||
00047 MY_FLOAT lastOutput;
|
||||
00048 MY_FLOAT delay[2];
|
||||
00049 MY_FLOAT env[2];
|
||||
00050 MY_FLOAT effectMix;
|
||||
00051 MY_FLOAT rate;
|
||||
00052
|
||||
00053 };
|
||||
00054
|
||||
00055 <span class="preprocessor">#endif</span>
|
||||
00056 <span class="preprocessor"></span>
|
||||
00040
|
||||
00046 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classPitShift.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00047
|
||||
00048 <span class="keyword">protected</span>:
|
||||
00049 <a class="code" href="classDelayL.html">DelayL</a> delayLine_[2];
|
||||
00050 StkFloat delay_[2];
|
||||
00051 StkFloat env_[2];
|
||||
00052 StkFloat rate_;
|
||||
00053 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> delayLength;
|
||||
00054 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> halfLength;
|
||||
00055
|
||||
00056 };
|
||||
00057
|
||||
00058 <span class="preprocessor">#endif</span>
|
||||
00059 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>PluckTwo.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00019 <span class="comment">/***************************************************/</span>
|
||||
00020
|
||||
00021 <span class="preprocessor">#if !defined(__PLUCKTWO_H)</span>
|
||||
00022 <span class="preprocessor"></span><span class="preprocessor">#define __PLUCKTWO_H</span>
|
||||
00021 <span class="preprocessor">#ifndef STK_PLUCKTWO_H</span>
|
||||
00022 <span class="preprocessor"></span><span class="preprocessor">#define STK_PLUCKTWO_H</span>
|
||||
00023 <span class="preprocessor"></span>
|
||||
00024 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00025 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
@@ -23,49 +23,55 @@
|
||||
<a name="l00029"></a><a class="code" href="classPluckTwo.html">00029</a> <span class="keyword">class </span><a class="code" href="classPluckTwo.html">PluckTwo</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00030 {
|
||||
00031 <span class="keyword">public</span>:
|
||||
00033 <a class="code" href="classPluckTwo.html#a0">PluckTwo</a>(MY_FLOAT lowestFrequency);
|
||||
00033 <a class="code" href="classPluckTwo.html#a0">PluckTwo</a>(StkFloat lowestFrequency);
|
||||
00034
|
||||
00036 <span class="keyword">virtual</span> <a class="code" href="classPluckTwo.html#a1">~PluckTwo</a>();
|
||||
00037
|
||||
00039 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a2">clear</a>();
|
||||
00040
|
||||
00042 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00042 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00043
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a4">setDetune</a>(MY_FLOAT detune);
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a4">setDetune</a>(StkFloat detune);
|
||||
00046
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a5">setFreqAndDetune</a>(MY_FLOAT frequency, MY_FLOAT detune);
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a5">setFreqAndDetune</a>(StkFloat frequency, StkFloat detune);
|
||||
00049
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a6">setPluckPosition</a>(MY_FLOAT position);
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a6">setPluckPosition</a>(StkFloat position);
|
||||
00052
|
||||
00054
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a7">setBaseLoopGain</a>(MY_FLOAT aGain);
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a7">setBaseLoopGain</a>(StkFloat aGain);
|
||||
00060
|
||||
00062 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a8">noteOff</a>(MY_FLOAT amplitude);
|
||||
00062 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPluckTwo.html#a8">noteOff</a>(StkFloat amplitude);
|
||||
00063
|
||||
00065 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classPluckTwo.html#a9">tick</a>() = 0;
|
||||
00065 <span class="keyword">virtual</span> StkFloat <a class="code" href="classPluckTwo.html#a9">tick</a>() = 0;
|
||||
00066
|
||||
00067 <span class="keyword">protected</span>:
|
||||
00068 <a class="code" href="classDelayA.html">DelayA</a> *delayLine;
|
||||
00069 <a class="code" href="classDelayA.html">DelayA</a> *delayLine2;
|
||||
00070 <a class="code" href="classDelayL.html">DelayL</a> *combDelay;
|
||||
00071 <a class="code" href="classOneZero.html">OneZero</a> *filter;
|
||||
00072 <a class="code" href="classOneZero.html">OneZero</a> *filter2;
|
||||
00073 <span class="keywordtype">long</span> length;
|
||||
00074 MY_FLOAT loopGain;
|
||||
00075 MY_FLOAT baseLoopGain;
|
||||
00076 MY_FLOAT lastFrequency;
|
||||
00077 MY_FLOAT lastLength;
|
||||
00078 MY_FLOAT detuning;
|
||||
00079 MY_FLOAT pluckAmplitude;
|
||||
00080 MY_FLOAT pluckPosition;
|
||||
00081
|
||||
00082 };
|
||||
00083
|
||||
00084 <span class="preprocessor">#endif</span>
|
||||
00068 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classPluckTwo.html#a9">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize) = 0;
|
||||
00069
|
||||
00071
|
||||
00077 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classPluckTwo.html#a9">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 ) = 0;
|
||||
00078
|
||||
00079 <span class="keyword">protected</span>:
|
||||
00080 <a class="code" href="classDelayA.html">DelayA</a> delayLine_;
|
||||
00081 <a class="code" href="classDelayA.html">DelayA</a> delayLine2_;
|
||||
00082 <a class="code" href="classDelayL.html">DelayL</a> combDelay_;
|
||||
00083 <a class="code" href="classOneZero.html">OneZero</a> filter_;
|
||||
00084 <a class="code" href="classOneZero.html">OneZero</a> filter2_;
|
||||
00085
|
||||
00086 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length_;
|
||||
00087 StkFloat loopGain_;
|
||||
00088 StkFloat baseLoopGain_;
|
||||
00089 StkFloat lastFrequency_;
|
||||
00090 StkFloat lastLength_;
|
||||
00091 StkFloat detuning_;
|
||||
00092 StkFloat pluckAmplitude_;
|
||||
00093 StkFloat pluckPosition_;
|
||||
00094
|
||||
00095 };
|
||||
00096
|
||||
00097 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Plucked.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00018 <span class="comment">/***************************************************/</span>
|
||||
00019
|
||||
00020 <span class="preprocessor">#if !defined(__PLUCKED_H)</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define __PLUCKED_H</span>
|
||||
00020 <span class="preprocessor">#ifndef STK_PLUCKED_H</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define STK_PLUCKED_H</span>
|
||||
00022 <span class="preprocessor"></span>
|
||||
00023 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00024 <span class="preprocessor">#include "DelayA.h"</span>
|
||||
@@ -24,38 +24,43 @@
|
||||
<a name="l00029"></a><a class="code" href="classPlucked.html">00029</a> <span class="keyword">class </span><a class="code" href="classPlucked.html">Plucked</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00030 {
|
||||
00031 <span class="keyword">public</span>:
|
||||
00033 <a class="code" href="classPlucked.html#a0">Plucked</a>(MY_FLOAT lowestFrequency);
|
||||
00033 <a class="code" href="classPlucked.html#a0">Plucked</a>(StkFloat lowestFrequency);
|
||||
00034
|
||||
00036 <a class="code" href="classPlucked.html#a1">~Plucked</a>();
|
||||
00037
|
||||
00039 <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a2">clear</a>();
|
||||
00040
|
||||
00042 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00042 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00043
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a4">pluck</a>(MY_FLOAT amplitude);
|
||||
00045 <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a4">pluck</a>(StkFloat amplitude);
|
||||
00046
|
||||
00048 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a5">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00048 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a5">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00049
|
||||
00051 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a6">noteOff</a>(MY_FLOAT amplitude);
|
||||
00051 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPlucked.html#a6">noteOff</a>(StkFloat amplitude);
|
||||
00052
|
||||
00054 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classPlucked.html#a7">tick</a>();
|
||||
00054 <span class="keyword">virtual</span> StkFloat <a class="code" href="classPlucked.html#a7">tick</a>();
|
||||
00055
|
||||
00056 <span class="keyword">protected</span>:
|
||||
00057 <a class="code" href="classDelayA.html">DelayA</a> *delayLine;
|
||||
00058 <a class="code" href="classOneZero.html">OneZero</a> *loopFilter;
|
||||
00059 <a class="code" href="classOnePole.html">OnePole</a> *pickFilter;
|
||||
00060 <a class="code" href="classNoise.html">Noise</a> *noise;
|
||||
00061 <span class="keywordtype">long</span> length;
|
||||
00062 MY_FLOAT loopGain;
|
||||
00063
|
||||
00064 };
|
||||
00065
|
||||
00066 <span class="preprocessor">#endif</span>
|
||||
00067 <span class="preprocessor"></span>
|
||||
00057 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classPlucked.html#a7">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00058
|
||||
00060
|
||||
00066 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classPlucked.html#a7">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00067
|
||||
00068 <span class="keyword">protected</span>:
|
||||
00069 <a class="code" href="classDelayA.html">DelayA</a> delayLine_;
|
||||
00070 <a class="code" href="classOneZero.html">OneZero</a> loopFilter_;
|
||||
00071 <a class="code" href="classOnePole.html">OnePole</a> pickFilter_;
|
||||
00072 <a class="code" href="classNoise.html">Noise</a> noise_;
|
||||
00073 StkFloat loopGain_;
|
||||
00074 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length_;
|
||||
00075
|
||||
00076 };
|
||||
00077
|
||||
00078 <span class="preprocessor">#endif</span>
|
||||
00079 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>PoleZero.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00013 <span class="comment">/***************************************************/</span>
|
||||
00014
|
||||
00015 <span class="preprocessor">#if !defined(__POLEZERO_H)</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define __POLEZERO_H</span>
|
||||
00015 <span class="preprocessor">#ifndef STK_POLEZERO_H</span>
|
||||
00016 <span class="preprocessor"></span><span class="preprocessor">#define STK_POLEZERO_H</span>
|
||||
00017 <span class="preprocessor"></span>
|
||||
00018 <span class="preprocessor">#include "Filter.h"</span>
|
||||
00019
|
||||
@@ -27,35 +27,39 @@
|
||||
00029
|
||||
00031 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a2">clear</a>(<span class="keywordtype">void</span>);
|
||||
00032
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a3">setB0</a>(MY_FLOAT b0);
|
||||
00034 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a3">setB0</a>(StkFloat b0);
|
||||
00035
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a4">setB1</a>(MY_FLOAT b1);
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a4">setB1</a>(StkFloat b1);
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a5">setA1</a>(MY_FLOAT a1);
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a5">setA1</a>(StkFloat a1);
|
||||
00041
|
||||
00043
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a6">setAllpass</a>(MY_FLOAT coefficient);
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a6">setAllpass</a>(StkFloat coefficient);
|
||||
00049
|
||||
00051
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a7">setBlockZero</a>(MY_FLOAT thePole = 0.99);
|
||||
00057 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a7">setBlockZero</a>(StkFloat thePole = 0.99);
|
||||
00058
|
||||
00060
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a8">setGain</a>(MY_FLOAT theGain);
|
||||
00064 <span class="keywordtype">void</span> <a class="code" href="classPoleZero.html#a8">setGain</a>(StkFloat gain);
|
||||
00065
|
||||
00067 MY_FLOAT <a class="code" href="classPoleZero.html#a9">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00067 StkFloat <a class="code" href="classPoleZero.html#a9">getGain</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00068
|
||||
00070 MY_FLOAT <a class="code" href="classPoleZero.html#a10">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00070 StkFloat <a class="code" href="classPoleZero.html#a10">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00071
|
||||
00073 MY_FLOAT <a class="code" href="classPoleZero.html#a11">tick</a>(MY_FLOAT sample);
|
||||
00073 StkFloat <a class="code" href="classPoleZero.html#a11">tick</a>(StkFloat sample);
|
||||
00074
|
||||
00076 MY_FLOAT *<a class="code" href="classPoleZero.html#a11">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00077 };
|
||||
00078
|
||||
00079 <span class="preprocessor">#endif</span>
|
||||
00076 StkFloat *<a class="code" href="classPoleZero.html#a11">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00077
|
||||
00079
|
||||
00085 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classPoleZero.html#a11">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00086
|
||||
00087 };
|
||||
00088
|
||||
00089 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<h1>ReedTabl.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00018 <span class="comment">/***************************************************/</span>
|
||||
00019
|
||||
00020 <span class="preprocessor">#if !defined(__REEDTABL_H)</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define __REEDTABL_H</span>
|
||||
00022 <span class="preprocessor"></span>
|
||||
00023 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00024
|
||||
<a name="l00025"></a><a class="code" href="classReedTabl.html">00025</a> <span class="keyword">class </span><a class="code" href="classReedTabl.html">ReedTabl</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00026 {
|
||||
00027 <span class="keyword">public</span>:
|
||||
00029 <a class="code" href="classReedTabl.html#a0">ReedTabl</a>();
|
||||
00030
|
||||
00032 <a class="code" href="classReedTabl.html#a1">~ReedTabl</a>();
|
||||
00033
|
||||
00035
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classReedTabl.html#a2">setOffset</a>(MY_FLOAT aValue);
|
||||
00041
|
||||
00043
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classReedTabl.html#a3">setSlope</a>(MY_FLOAT aValue);
|
||||
00049
|
||||
00051 MY_FLOAT <a class="code" href="classReedTabl.html#a4">lastOut</a>() <span class="keyword">const</span>;
|
||||
00052
|
||||
00054
|
||||
00058 MY_FLOAT <a class="code" href="classReedTabl.html#a5">tick</a>(MY_FLOAT input);
|
||||
00059
|
||||
00061 MY_FLOAT *<a class="code" href="classReedTabl.html#a5">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00062
|
||||
00063 <span class="keyword">protected</span>:
|
||||
00064 MY_FLOAT offSet;
|
||||
00065 MY_FLOAT slope;
|
||||
00066 MY_FLOAT lastOutput;
|
||||
00067
|
||||
00068 };
|
||||
00069
|
||||
00070 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
56
doc/html/ReedTable_8h-source.html
Normal file
56
doc/html/ReedTable_8h-source.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>ReedTable.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00018 <span class="comment">/***************************************************/</span>
|
||||
00019
|
||||
00020 <span class="preprocessor">#ifndef STK_REEDTABLE_H</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define STK_REEDTABLE_H</span>
|
||||
00022 <span class="preprocessor"></span>
|
||||
00023 <span class="preprocessor">#include "Function.h"</span>
|
||||
00024
|
||||
<a name="l00025"></a><a class="code" href="classReedTable.html">00025</a> <span class="keyword">class </span><a class="code" href="classReedTable.html">ReedTable</a> : <span class="keyword">public</span> <a class="code" href="classFunction.html">Function</a>
|
||||
00026 {
|
||||
00027 <span class="keyword">public</span>:
|
||||
00029 <a class="code" href="classReedTable.html#a0">ReedTable</a>();
|
||||
00030
|
||||
00032 <a class="code" href="classReedTable.html#a1">~ReedTable</a>();
|
||||
00033
|
||||
00035
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classReedTable.html#a2">setOffset</a>(StkFloat offset);
|
||||
00041
|
||||
00043
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classReedTable.html#a3">setSlope</a>(StkFloat slope);
|
||||
00049
|
||||
00051
|
||||
00055 StkFloat <a class="code" href="classReedTable.html#a4">tick</a>(StkFloat input);
|
||||
00056
|
||||
00058 StkFloat *<a class="code" href="classReedTable.html#a4">tick</a>( StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00059
|
||||
00061
|
||||
00067 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classReedTable.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00068
|
||||
00069 <span class="keyword">protected</span>:
|
||||
00070 StkFloat offset_;
|
||||
00071 StkFloat slope_;
|
||||
00072
|
||||
00073 };
|
||||
00074
|
||||
00075 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Resonate.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00018 <span class="comment">/***************************************************/</span>
|
||||
00019
|
||||
00020 <span class="preprocessor">#if !defined(__RESONATE_H)</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define __RESONATE_H</span>
|
||||
00020 <span class="preprocessor">#ifndef STK_RESONATE_H</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define STK_RESONATE_H</span>
|
||||
00022 <span class="preprocessor"></span>
|
||||
00023 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00024 <span class="preprocessor">#include "ADSR.h"</span>
|
||||
@@ -29,9 +29,9 @@
|
||||
00036
|
||||
00038 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a2">clear</a>();
|
||||
00039
|
||||
00041 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a3">setResonance</a>(MY_FLOAT frequency, MY_FLOAT radius);
|
||||
00041 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a3">setResonance</a>(StkFloat frequency, StkFloat radius);
|
||||
00042
|
||||
00044 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a4">setNotch</a>(MY_FLOAT frequency, MY_FLOAT radius);
|
||||
00044 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a4">setNotch</a>(StkFloat frequency, StkFloat radius);
|
||||
00045
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a5">setEqualGainZeroes</a>();
|
||||
00048
|
||||
@@ -39,30 +39,35 @@
|
||||
00051
|
||||
00053 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a7">keyOff</a>();
|
||||
00054
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a8">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a8">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00057
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a9">noteOff</a>(MY_FLOAT amplitude);
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a9">noteOff</a>(StkFloat amplitude);
|
||||
00060
|
||||
00062 MY_FLOAT <a class="code" href="classResonate.html#a10">tick</a>();
|
||||
00062 StkFloat <a class="code" href="classResonate.html#a10">tick</a>();
|
||||
00063
|
||||
00065 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a11">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00065 StkFloat *<a class="code" href="classResonate.html#a10">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00066
|
||||
00067 <span class="keyword">protected</span>:
|
||||
00068 <a class="code" href="classADSR.html">ADSR</a> *adsr;
|
||||
00069 <a class="code" href="classBiQuad.html">BiQuad</a> *filter;
|
||||
00070 <a class="code" href="classNoise.html">Noise</a> *noise;
|
||||
00071 MY_FLOAT poleFrequency;
|
||||
00072 MY_FLOAT poleRadius;
|
||||
00073 MY_FLOAT zeroFrequency;
|
||||
00074 MY_FLOAT zeroRadius;
|
||||
00068
|
||||
00074 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classResonate.html#a10">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00075
|
||||
00076 };
|
||||
00077
|
||||
00078 <span class="preprocessor">#endif</span>
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classResonate.html#a13">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00078
|
||||
00079 <span class="keyword">protected</span>:
|
||||
00080 <a class="code" href="classADSR.html">ADSR</a> adsr_;
|
||||
00081 <a class="code" href="classBiQuad.html">BiQuad</a> filter_;
|
||||
00082 <a class="code" href="classNoise.html">Noise</a> noise_;
|
||||
00083 StkFloat poleFrequency_;
|
||||
00084 StkFloat poleRadius_;
|
||||
00085 StkFloat zeroFrequency_;
|
||||
00086 StkFloat zeroRadius_;
|
||||
00087
|
||||
00088 };
|
||||
00089
|
||||
00090 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<h1>Reverb.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00010 <span class="comment">/***************************************************/</span>
|
||||
00011
|
||||
00012 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00013
|
||||
00014 <span class="preprocessor">#if !defined(__REVERB_H)</span>
|
||||
00015 <span class="preprocessor"></span><span class="preprocessor">#define __REVERB_H</span>
|
||||
00016 <span class="preprocessor"></span>
|
||||
<a name="l00017"></a><a class="code" href="classReverb.html">00017</a> <span class="keyword">class </span><a class="code" href="classReverb.html">Reverb</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00018 {
|
||||
00019 <span class="keyword">public</span>:
|
||||
00021 <a class="code" href="classReverb.html#a0">Reverb</a>();
|
||||
00022
|
||||
00024 <span class="keyword">virtual</span> <a class="code" href="classReverb.html#a1">~Reverb</a>();
|
||||
00025
|
||||
00027 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classReverb.html#a2">clear</a>() = 0;
|
||||
00028
|
||||
00030 <span class="keywordtype">void</span> <a class="code" href="classReverb.html#a3">setEffectMix</a>(MY_FLOAT mix);
|
||||
00031
|
||||
00033 MY_FLOAT <a class="code" href="classReverb.html#a4">lastOut</a>() <span class="keyword">const</span>;
|
||||
00034
|
||||
00036 MY_FLOAT <a class="code" href="classReverb.html#a5">lastOutLeft</a>() <span class="keyword">const</span>;
|
||||
00037
|
||||
00039 MY_FLOAT <a class="code" href="classReverb.html#a6">lastOutRight</a>() <span class="keyword">const</span>;
|
||||
00040
|
||||
00042 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classReverb.html#a7">tick</a>(MY_FLOAT input) = 0;
|
||||
00043
|
||||
00045 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classReverb.html#a7">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00046
|
||||
00047 <span class="keyword">protected</span>:
|
||||
00048
|
||||
00049 <span class="comment">// Returns true if argument value is prime.</span>
|
||||
00050 <span class="keywordtype">bool</span> isPrime(<span class="keywordtype">int</span> number);
|
||||
00051
|
||||
00052 MY_FLOAT lastOutput[2];
|
||||
00053 MY_FLOAT effectMix;
|
||||
00054
|
||||
00055 };
|
||||
00056
|
||||
00057 <span class="preprocessor">#endif // defined(__REVERB_H)</span>
|
||||
00058 <span class="preprocessor"></span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,34 +8,40 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Rhodey.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00031 <span class="comment">/***************************************************/</span>
|
||||
00032
|
||||
00033 <span class="preprocessor">#if !defined(__RHODEY_H)</span>
|
||||
00034 <span class="preprocessor"></span><span class="preprocessor">#define __RHODEY_H</span>
|
||||
00033 <span class="preprocessor">#ifndef STK_RHODEY_H</span>
|
||||
00034 <span class="preprocessor"></span><span class="preprocessor">#define STK_RHODEY_H</span>
|
||||
00035 <span class="preprocessor"></span>
|
||||
00036 <span class="preprocessor">#include "FM.h"</span>
|
||||
00037
|
||||
<a name="l00038"></a><a class="code" href="classRhodey.html">00038</a> <span class="keyword">class </span><a class="code" href="classRhodey.html">Rhodey</a> : <span class="keyword">public</span> <a class="code" href="classFM.html">FM</a>
|
||||
00039 {
|
||||
00040 <span class="keyword">public</span>:
|
||||
00042 <a class="code" href="classRhodey.html#a0">Rhodey</a>();
|
||||
00043
|
||||
00045 <a class="code" href="classRhodey.html#a1">~Rhodey</a>();
|
||||
00042
|
||||
00045 <a class="code" href="classRhodey.html#a0">Rhodey</a>();
|
||||
00046
|
||||
00048 <span class="keywordtype">void</span> <a class="code" href="classRhodey.html#a2">setFrequency</a>(MY_FLOAT frequency);
|
||||
00048 <a class="code" href="classRhodey.html#a1">~Rhodey</a>();
|
||||
00049
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classRhodey.html#a3">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00051 <span class="keywordtype">void</span> <a class="code" href="classRhodey.html#a2">setFrequency</a>(StkFloat frequency);
|
||||
00052
|
||||
00054 MY_FLOAT <a class="code" href="classRhodey.html#a4">tick</a>();
|
||||
00055 };
|
||||
00056
|
||||
00057 <span class="preprocessor">#endif</span>
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classRhodey.html#a3">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00055
|
||||
00057 StkFloat <a class="code" href="classRhodey.html#a4">tick</a>();
|
||||
00058
|
||||
00060 StkFloat *<a class="code" href="classRhodey.html#a4">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00061
|
||||
00063
|
||||
00069 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classRhodey.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00070 };
|
||||
00071
|
||||
00072 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>RtAudio.h</h1><div class="fragment"><pre>00001 <span class="comment">/************************************************************************/</span>
|
||||
00038 <span class="comment">/************************************************************************/</span>
|
||||
00039
|
||||
00040 <span class="comment">// RtAudio: Version 3.0, 1 March 2004</span>
|
||||
00040 <span class="comment">// RtAudio: Version 3.0.2, pre-release for STK 4.2.0</span>
|
||||
00041
|
||||
00042 <span class="preprocessor">#ifndef __RTAUDIO_H</span>
|
||||
00043 <span class="preprocessor"></span><span class="preprocessor">#define __RTAUDIO_H</span>
|
||||
@@ -99,441 +99,466 @@
|
||||
00127 {
|
||||
00128 <span class="keyword">public</span>:
|
||||
00129
|
||||
00130 RtApi();
|
||||
00131 <span class="keyword">virtual</span> ~RtApi();
|
||||
00132 <span class="keywordtype">void</span> openStream( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00133 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00134 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00135 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00136 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData ) = 0;
|
||||
00137 <span class="keyword">virtual</span> <span class="keywordtype">void</span> cancelStreamCallback() = 0;
|
||||
00138 <span class="keywordtype">int</span> getDeviceCount(<span class="keywordtype">void</span>);
|
||||
00139 <a class="code" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> getDeviceInfo( <span class="keywordtype">int</span> device );
|
||||
00140 <span class="keywordtype">char</span> * <span class="keyword">const</span> getStreamBuffer();
|
||||
00141 <span class="keyword">virtual</span> <span class="keywordtype">void</span> tickStream() = 0;
|
||||
00142 <span class="keyword">virtual</span> <span class="keywordtype">void</span> closeStream();
|
||||
00143 <span class="keyword">virtual</span> <span class="keywordtype">void</span> startStream() = 0;
|
||||
00144 <span class="keyword">virtual</span> <span class="keywordtype">void</span> stopStream() = 0;
|
||||
00145 <span class="keyword">virtual</span> <span class="keywordtype">void</span> abortStream() = 0;
|
||||
00146
|
||||
00147 <span class="keyword">protected</span>:
|
||||
00148
|
||||
00149 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> MAX_SAMPLE_RATES;
|
||||
00150 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SAMPLE_RATES[];
|
||||
00151
|
||||
00152 <span class="keyword">enum</span> { FAILURE, SUCCESS };
|
||||
00153
|
||||
00154 <span class="keyword">enum</span> StreamMode {
|
||||
00155 OUTPUT,
|
||||
00156 INPUT,
|
||||
00157 DUPLEX,
|
||||
00158 UNINITIALIZED = -75
|
||||
00159 };
|
||||
00160
|
||||
00161 <span class="keyword">enum</span> StreamState {
|
||||
00162 STREAM_STOPPED,
|
||||
00163 STREAM_RUNNING
|
||||
00164 };
|
||||
00165
|
||||
00166 <span class="comment">// A protected structure for audio streams.</span>
|
||||
00167 <span class="keyword">struct </span>RtApiStream {
|
||||
00168 <span class="keywordtype">int</span> device[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00169 <span class="keywordtype">void</span> *apiHandle; <span class="comment">// void pointer for API specific stream handle information</span>
|
||||
00170 StreamMode mode; <span class="comment">// OUTPUT, INPUT, or DUPLEX.</span>
|
||||
00171 StreamState state; <span class="comment">// STOPPED or RUNNING</span>
|
||||
00172 <span class="keywordtype">char</span> *userBuffer;
|
||||
00173 <span class="keywordtype">char</span> *deviceBuffer;
|
||||
00174 <span class="keywordtype">bool</span> doConvertBuffer[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00175 <span class="keywordtype">bool</span> deInterleave[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00176 <span class="keywordtype">bool</span> doByteSwap[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00177 <span class="keywordtype">int</span> sampleRate;
|
||||
00178 <span class="keywordtype">int</span> bufferSize;
|
||||
00179 <span class="keywordtype">int</span> nBuffers;
|
||||
00180 <span class="keywordtype">int</span> nUserChannels[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00181 <span class="keywordtype">int</span> nDeviceChannels[2]; <span class="comment">// Playback and record channels, respectively.</span>
|
||||
00182 RtAudioFormat userFormat;
|
||||
00183 RtAudioFormat deviceFormat[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00184 StreamMutex mutex;
|
||||
00185 CallbackInfo callbackInfo;
|
||||
00186
|
||||
00187 RtApiStream()
|
||||
00188 :apiHandle(0), userBuffer(0), deviceBuffer(0) {}
|
||||
00189 <span class="comment">// :apiHandle(0), mode(UNINITIALIZED), state(STREAM_STOPPED),</span>
|
||||
00190 <span class="comment">// userBuffer(0), deviceBuffer(0) {}</span>
|
||||
00191 };
|
||||
00192
|
||||
00193 <span class="comment">// A protected device structure for audio devices.</span>
|
||||
00194 <span class="keyword">struct </span>RtApiDevice {
|
||||
00195 std::string name;
|
||||
00196 <span class="keywordtype">bool</span> probed;
|
||||
00197 <span class="keywordtype">void</span> *apiDeviceId; <span class="comment">// void pointer for API specific device information</span>
|
||||
00198 <span class="keywordtype">int</span> maxOutputChannels;
|
||||
00199 <span class="keywordtype">int</span> maxInputChannels;
|
||||
00200 <span class="keywordtype">int</span> maxDuplexChannels;
|
||||
00201 <span class="keywordtype">int</span> minOutputChannels;
|
||||
00202 <span class="keywordtype">int</span> minInputChannels;
|
||||
00203 <span class="keywordtype">int</span> minDuplexChannels;
|
||||
00204 <span class="keywordtype">bool</span> hasDuplexSupport;
|
||||
00205 <span class="keywordtype">bool</span> isDefault;
|
||||
00206 std::vector<int> sampleRates;
|
||||
00207 RtAudioFormat nativeFormats;
|
||||
00209 <span class="comment">// Default constructor.</span>
|
||||
00210 RtApiDevice()
|
||||
00211 :probed(false), apiDeviceId(0), maxOutputChannels(0), maxInputChannels(0),
|
||||
00212 maxDuplexChannels(0), minOutputChannels(0), minInputChannels(0),
|
||||
00213 minDuplexChannels(0), isDefault(false), nativeFormats(0) {}
|
||||
00214 };
|
||||
00215
|
||||
00216 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> Int16;
|
||||
00217 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> Int32;
|
||||
00218 <span class="keyword">typedef</span> <span class="keywordtype">float</span> Float32;
|
||||
00219 <span class="keyword">typedef</span> <span class="keywordtype">double</span> Float64;
|
||||
00220
|
||||
00221 <span class="keywordtype">char</span> message_[256];
|
||||
00222 <span class="keywordtype">int</span> nDevices_;
|
||||
00223 std::vector<RtApiDevice> devices_;
|
||||
00224 RtApiStream stream_;
|
||||
00225
|
||||
00230 <span class="keyword">virtual</span> <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>) = 0;
|
||||
00231
|
||||
00240 <span class="keyword">virtual</span> <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00241
|
||||
00250 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00251 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00252 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00253
|
||||
00258 <span class="keyword">virtual</span> <span class="keywordtype">int</span> getDefaultInputDevice(<span class="keywordtype">void</span>);
|
||||
00259
|
||||
00264 <span class="keyword">virtual</span> <span class="keywordtype">int</span> getDefaultOutputDevice(<span class="keywordtype">void</span>);
|
||||
00265
|
||||
00267 <span class="keywordtype">void</span> clearDeviceInfo( RtApiDevice *info );
|
||||
00268
|
||||
00270 <span class="keywordtype">void</span> clearStreamInfo();
|
||||
00271
|
||||
00273 <span class="keywordtype">void</span> error( RtError::Type type );
|
||||
00274
|
||||
00279 <span class="keywordtype">void</span> verifyStream();
|
||||
00280
|
||||
00285 <span class="keywordtype">void</span> convertStreamBuffer( StreamMode mode );
|
||||
00286
|
||||
00288 <span class="keywordtype">void</span> byteSwapBuffer( <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> samples, RtAudioFormat format );
|
||||
00289
|
||||
00291 <span class="keywordtype">int</span> formatBytes( RtAudioFormat format );
|
||||
00292 };
|
||||
00130 <span class="keyword">enum</span> StreamState {
|
||||
00131 STREAM_STOPPED,
|
||||
00132 STREAM_RUNNING
|
||||
00133 };
|
||||
00134
|
||||
00135 RtApi();
|
||||
00136 <span class="keyword">virtual</span> ~RtApi();
|
||||
00137 <span class="keywordtype">void</span> openStream( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00138 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00139 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00140 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00141 <span class="keywordtype">void</span> openStream( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00142 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00143 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00144 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> *numberOfBuffers );
|
||||
00145 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData ) = 0;
|
||||
00146 <span class="keyword">virtual</span> <span class="keywordtype">void</span> cancelStreamCallback() = 0;
|
||||
00147 <span class="keywordtype">int</span> getDeviceCount(<span class="keywordtype">void</span>);
|
||||
00148 <a class="code" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> getDeviceInfo( <span class="keywordtype">int</span> device );
|
||||
00149 <span class="keywordtype">char</span> * <span class="keyword">const</span> getStreamBuffer();
|
||||
00150 RtApi::StreamState getStreamState() <span class="keyword">const</span>;
|
||||
00151 <span class="keyword">virtual</span> <span class="keywordtype">void</span> tickStream() = 0;
|
||||
00152 <span class="keyword">virtual</span> <span class="keywordtype">void</span> closeStream();
|
||||
00153 <span class="keyword">virtual</span> <span class="keywordtype">void</span> startStream() = 0;
|
||||
00154 <span class="keyword">virtual</span> <span class="keywordtype">void</span> stopStream() = 0;
|
||||
00155 <span class="keyword">virtual</span> <span class="keywordtype">void</span> abortStream() = 0;
|
||||
00156
|
||||
00157 <span class="keyword">protected</span>:
|
||||
00158
|
||||
00159 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> MAX_SAMPLE_RATES;
|
||||
00160 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SAMPLE_RATES[];
|
||||
00161
|
||||
00162 <span class="keyword">enum</span> { FAILURE, SUCCESS };
|
||||
00163
|
||||
00164 <span class="keyword">enum</span> StreamMode {
|
||||
00165 OUTPUT,
|
||||
00166 INPUT,
|
||||
00167 DUPLEX,
|
||||
00168 UNINITIALIZED = -75
|
||||
00169 };
|
||||
00170
|
||||
00171 <span class="comment">// A protected structure used for buffer conversion.</span>
|
||||
00172 <span class="keyword">struct </span>ConvertInfo {
|
||||
00173 <span class="keywordtype">int</span> channels;
|
||||
00174 <span class="keywordtype">int</span> inJump, outJump;
|
||||
00175 RtAudioFormat inFormat, outFormat;
|
||||
00176 std::vector<int> inOffset;
|
||||
00177 std::vector<int> outOffset;
|
||||
00178 };
|
||||
00179
|
||||
00180 <span class="comment">// A protected structure for audio streams.</span>
|
||||
00181 <span class="keyword">struct </span>RtApiStream {
|
||||
00182 <span class="keywordtype">int</span> device[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00183 <span class="keywordtype">void</span> *apiHandle; <span class="comment">// void pointer for API specific stream handle information</span>
|
||||
00184 StreamMode mode; <span class="comment">// OUTPUT, INPUT, or DUPLEX.</span>
|
||||
00185 StreamState state; <span class="comment">// STOPPED or RUNNING</span>
|
||||
00186 <span class="keywordtype">char</span> *userBuffer;
|
||||
00187 <span class="keywordtype">char</span> *deviceBuffer;
|
||||
00188 <span class="keywordtype">bool</span> doConvertBuffer[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00189 <span class="keywordtype">bool</span> deInterleave[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00190 <span class="keywordtype">bool</span> doByteSwap[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00191 <span class="keywordtype">int</span> sampleRate;
|
||||
00192 <span class="keywordtype">int</span> bufferSize;
|
||||
00193 <span class="keywordtype">int</span> nBuffers;
|
||||
00194 <span class="keywordtype">int</span> nUserChannels[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00195 <span class="keywordtype">int</span> nDeviceChannels[2]; <span class="comment">// Playback and record channels, respectively.</span>
|
||||
00196 RtAudioFormat userFormat;
|
||||
00197 RtAudioFormat deviceFormat[2]; <span class="comment">// Playback and record, respectively.</span>
|
||||
00198 StreamMutex mutex;
|
||||
00199 CallbackInfo callbackInfo;
|
||||
00200 ConvertInfo convertInfo[2];
|
||||
00201
|
||||
00202 RtApiStream()
|
||||
00203 :apiHandle(0), userBuffer(0), deviceBuffer(0) {}
|
||||
00204 };
|
||||
00205
|
||||
00206 <span class="comment">// A protected device structure for audio devices.</span>
|
||||
00207 <span class="keyword">struct </span>RtApiDevice {
|
||||
00208 std::string name;
|
||||
00209 <span class="keywordtype">bool</span> probed;
|
||||
00210 <span class="keywordtype">void</span> *apiDeviceId; <span class="comment">// void pointer for API specific device information</span>
|
||||
00211 <span class="keywordtype">int</span> maxOutputChannels;
|
||||
00212 <span class="keywordtype">int</span> maxInputChannels;
|
||||
00213 <span class="keywordtype">int</span> maxDuplexChannels;
|
||||
00214 <span class="keywordtype">int</span> minOutputChannels;
|
||||
00215 <span class="keywordtype">int</span> minInputChannels;
|
||||
00216 <span class="keywordtype">int</span> minDuplexChannels;
|
||||
00217 <span class="keywordtype">bool</span> hasDuplexSupport;
|
||||
00218 <span class="keywordtype">bool</span> isDefault;
|
||||
00219 std::vector<int> sampleRates;
|
||||
00220 RtAudioFormat nativeFormats;
|
||||
00222 <span class="comment">// Default constructor.</span>
|
||||
00223 RtApiDevice()
|
||||
00224 :probed(false), apiDeviceId(0), maxOutputChannels(0), maxInputChannels(0),
|
||||
00225 maxDuplexChannels(0), minOutputChannels(0), minInputChannels(0),
|
||||
00226 minDuplexChannels(0), isDefault(false), nativeFormats(0) {}
|
||||
00227 };
|
||||
00228
|
||||
00229 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> Int16;
|
||||
00230 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> Int32;
|
||||
00231 <span class="keyword">typedef</span> <span class="keywordtype">float</span> Float32;
|
||||
00232 <span class="keyword">typedef</span> <span class="keywordtype">double</span> Float64;
|
||||
00233
|
||||
00234 <span class="keywordtype">char</span> message_[1024];
|
||||
00235 <span class="keywordtype">int</span> nDevices_;
|
||||
00236 std::vector<RtApiDevice> devices_;
|
||||
00237 RtApiStream stream_;
|
||||
00238
|
||||
00243 <span class="keyword">virtual</span> <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>) = 0;
|
||||
00244
|
||||
00253 <span class="keyword">virtual</span> <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00254
|
||||
00263 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00264 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00265 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00266
|
||||
00271 <span class="keyword">virtual</span> <span class="keywordtype">int</span> getDefaultInputDevice(<span class="keywordtype">void</span>);
|
||||
00272
|
||||
00277 <span class="keyword">virtual</span> <span class="keywordtype">int</span> getDefaultOutputDevice(<span class="keywordtype">void</span>);
|
||||
00278
|
||||
00280 <span class="keywordtype">void</span> clearDeviceInfo( RtApiDevice *info );
|
||||
00281
|
||||
00283 <span class="keywordtype">void</span> clearStreamInfo();
|
||||
00284
|
||||
00286 <span class="keywordtype">void</span> error( RtError::Type type );
|
||||
00287
|
||||
00292 <span class="keywordtype">void</span> verifyStream();
|
||||
00293
|
||||
00294
|
||||
00295 <span class="comment">// **************************************************************** //</span>
|
||||
00296 <span class="comment">//</span>
|
||||
00297 <span class="comment">// RtAudio class declaration.</span>
|
||||
00298 <span class="comment">//</span>
|
||||
00299 <span class="comment">// RtAudio is a "controller" used to select an available audio i/o</span>
|
||||
00300 <span class="comment">// interface. It presents a common API for the user to call but all</span>
|
||||
00301 <span class="comment">// functionality is implemented by the class RtAudioApi and its</span>
|
||||
00302 <span class="comment">// subclasses. RtAudio creates an instance of an RtAudioApi subclass</span>
|
||||
00303 <span class="comment">// based on the user's API choice. If no choice is made, RtAudio</span>
|
||||
00304 <span class="comment">// attempts to make a "logical" API selection.</span>
|
||||
00305 <span class="comment">//</span>
|
||||
00306 <span class="comment">// **************************************************************** //</span>
|
||||
00298 <span class="keywordtype">void</span> convertBuffer( <span class="keywordtype">char</span> *outBuffer, <span class="keywordtype">char</span> *inBuffer, ConvertInfo &info );
|
||||
00299
|
||||
00301 <span class="keywordtype">void</span> byteSwapBuffer( <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> samples, RtAudioFormat format );
|
||||
00302
|
||||
00304 <span class="keywordtype">int</span> formatBytes( RtAudioFormat format );
|
||||
00305 };
|
||||
00306
|
||||
00307
|
||||
<a name="l00308"></a><a class="code" href="classRtAudio.html">00308</a> <span class="keyword">class </span><a class="code" href="classRtAudio.html">RtAudio</a>
|
||||
00309 {
|
||||
00310 <span class="keyword">public</span>:
|
||||
00311
|
||||
<a name="l00313"></a><a class="code" href="classRtAudio.html#w8">00313</a> <span class="keyword">enum</span> <a class="code" href="classRtAudio.html#w8">RtAudioApi</a> {
|
||||
00314 <a class="code" href="classRtAudio.html#w8w0">UNSPECIFIED</a>,
|
||||
00315 <a class="code" href="classRtAudio.html#w8w1">LINUX_ALSA</a>,
|
||||
00316 <a class="code" href="classRtAudio.html#w8w2">LINUX_OSS</a>,
|
||||
00317 <a class="code" href="classRtAudio.html#w8w3">LINUX_JACK</a>,
|
||||
00318 <a class="code" href="classRtAudio.html#w8w4">MACOSX_CORE</a>,
|
||||
00319 <a class="code" href="classRtAudio.html#w8w5">IRIX_AL</a>,
|
||||
00320 <a class="code" href="classRtAudio.html#w8w6">WINDOWS_ASIO</a>,
|
||||
00321 <a class="code" href="classRtAudio.html#w8w7">WINDOWS_DS</a>
|
||||
00322 };
|
||||
00323
|
||||
00325
|
||||
00335 <a class="code" href="classRtAudio.html#a0">RtAudio</a>( RtAudioApi api=UNSPECIFIED );
|
||||
00308 <span class="comment">// **************************************************************** //</span>
|
||||
00309 <span class="comment">//</span>
|
||||
00310 <span class="comment">// RtAudio class declaration.</span>
|
||||
00311 <span class="comment">//</span>
|
||||
00312 <span class="comment">// RtAudio is a "controller" used to select an available audio i/o</span>
|
||||
00313 <span class="comment">// interface. It presents a common API for the user to call but all</span>
|
||||
00314 <span class="comment">// functionality is implemented by the class RtAudioApi and its</span>
|
||||
00315 <span class="comment">// subclasses. RtAudio creates an instance of an RtAudioApi subclass</span>
|
||||
00316 <span class="comment">// based on the user's API choice. If no choice is made, RtAudio</span>
|
||||
00317 <span class="comment">// attempts to make a "logical" API selection.</span>
|
||||
00318 <span class="comment">//</span>
|
||||
00319 <span class="comment">// **************************************************************** //</span>
|
||||
00320
|
||||
<a name="l00321"></a><a class="code" href="classRtAudio.html">00321</a> <span class="keyword">class </span><a class="code" href="classRtAudio.html">RtAudio</a>
|
||||
00322 {
|
||||
00323 <span class="keyword">public</span>:
|
||||
00324
|
||||
<a name="l00326"></a><a class="code" href="classRtAudio.html#w8">00326</a> <span class="keyword">enum</span> <a class="code" href="classRtAudio.html#w8">RtAudioApi</a> {
|
||||
00327 <a class="code" href="classRtAudio.html#w8w0">UNSPECIFIED</a>,
|
||||
00328 <a class="code" href="classRtAudio.html#w8w1">LINUX_ALSA</a>,
|
||||
00329 <a class="code" href="classRtAudio.html#w8w2">LINUX_OSS</a>,
|
||||
00330 <a class="code" href="classRtAudio.html#w8w3">LINUX_JACK</a>,
|
||||
00331 <a class="code" href="classRtAudio.html#w8w4">MACOSX_CORE</a>,
|
||||
00332 <a class="code" href="classRtAudio.html#w8w5">IRIX_AL</a>,
|
||||
00333 <a class="code" href="classRtAudio.html#w8w6">WINDOWS_ASIO</a>,
|
||||
00334 <a class="code" href="classRtAudio.html#w8w7">WINDOWS_DS</a>
|
||||
00335 };
|
||||
00336
|
||||
00338
|
||||
00349 <a class="code" href="classRtAudio.html#a0">RtAudio</a>( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00350 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00351 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00352 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers, RtAudioApi api=UNSPECIFIED );
|
||||
00353
|
||||
00355
|
||||
00359 <a class="code" href="classRtAudio.html#a2">~RtAudio</a>();
|
||||
00360
|
||||
00362
|
||||
00388 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a3">openStream</a>( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00389 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00390 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00391 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00392
|
||||
00394
|
||||
<a name="l00413"></a><a class="code" href="classRtAudio.html#a4">00413</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a4">setStreamCallback</a>(RtAudioCallback callback, <span class="keywordtype">void</span> *userData) { rtapi_->setStreamCallback( callback, userData ); };
|
||||
00414
|
||||
00416
|
||||
<a name="l00423"></a><a class="code" href="classRtAudio.html#a5">00423</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a5">cancelStreamCallback</a>() { rtapi_->cancelStreamCallback(); };
|
||||
00424
|
||||
<a name="l00426"></a><a class="code" href="classRtAudio.html#a6">00426</a> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a6">getDeviceCount</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> rtapi_->getDeviceCount(); };
|
||||
00427
|
||||
00429
|
||||
<a name="l00437"></a><a class="code" href="classRtAudio.html#a7">00437</a> <a class="code" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> <a class="code" href="classRtAudio.html#a7">getDeviceInfo</a>(<span class="keywordtype">int</span> device) { <span class="keywordflow">return</span> rtapi_->getDeviceInfo( device ); };
|
||||
00438
|
||||
00440
|
||||
<a name="l00445"></a><a class="code" href="classRtAudio.html#a8">00445</a> <span class="keywordtype">char</span> * <span class="keyword">const</span> <a class="code" href="classRtAudio.html#a8">getStreamBuffer</a>() { <span class="keywordflow">return</span> rtapi_->getStreamBuffer(); };
|
||||
00446
|
||||
00448
|
||||
<a name="l00453"></a><a class="code" href="classRtAudio.html#a9">00453</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a9">tickStream</a>() { rtapi_->tickStream(); };
|
||||
00454
|
||||
00456
|
||||
<a name="l00460"></a><a class="code" href="classRtAudio.html#a10">00460</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a10">closeStream</a>() { rtapi_->closeStream(); };
|
||||
00461
|
||||
00463
|
||||
<a name="l00467"></a><a class="code" href="classRtAudio.html#a11">00467</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a11">startStream</a>() { rtapi_->startStream(); };
|
||||
00348 <a class="code" href="classRtAudio.html#a0">RtAudio</a>( RtAudioApi api=UNSPECIFIED );
|
||||
00349
|
||||
00351
|
||||
00362 <a class="code" href="classRtAudio.html#a0">RtAudio</a>( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00363 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00364 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00365 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers, RtAudioApi api=UNSPECIFIED );
|
||||
00366
|
||||
00368
|
||||
00376 <a class="code" href="classRtAudio.html#a0">RtAudio</a>( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00377 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00378 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00379 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> *numberOfBuffers, RtAudioApi api=UNSPECIFIED );
|
||||
00380
|
||||
00382
|
||||
00386 <a class="code" href="classRtAudio.html#a3">~RtAudio</a>();
|
||||
00387
|
||||
00389
|
||||
00415 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a4">openStream</a>( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00416 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00417 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00418 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00419
|
||||
00421
|
||||
00429 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a4">openStream</a>( <span class="keywordtype">int</span> outputDevice, <span class="keywordtype">int</span> outputChannels,
|
||||
00430 <span class="keywordtype">int</span> inputDevice, <span class="keywordtype">int</span> inputChannels,
|
||||
00431 RtAudioFormat format, <span class="keywordtype">int</span> sampleRate,
|
||||
00432 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> *numberOfBuffers );
|
||||
00433
|
||||
00435
|
||||
<a name="l00454"></a><a class="code" href="classRtAudio.html#a6">00454</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a6">setStreamCallback</a>(RtAudioCallback callback, <span class="keywordtype">void</span> *userData) { rtapi_->setStreamCallback( callback, userData ); };
|
||||
00455
|
||||
00457
|
||||
<a name="l00464"></a><a class="code" href="classRtAudio.html#a7">00464</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a7">cancelStreamCallback</a>() { rtapi_->cancelStreamCallback(); };
|
||||
00465
|
||||
<a name="l00467"></a><a class="code" href="classRtAudio.html#a8">00467</a> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a8">getDeviceCount</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> rtapi_->getDeviceCount(); };
|
||||
00468
|
||||
00470
|
||||
<a name="l00474"></a><a class="code" href="classRtAudio.html#a12">00474</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a12">stopStream</a>() { rtapi_->stopStream(); };
|
||||
00475
|
||||
00477
|
||||
<a name="l00481"></a><a class="code" href="classRtAudio.html#a13">00481</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a13">abortStream</a>() { rtapi_->abortStream(); };
|
||||
00482
|
||||
00483
|
||||
00484 <span class="keyword">protected</span>:
|
||||
00485
|
||||
00486 <span class="keywordtype">void</span> initialize( RtAudioApi api );
|
||||
<a name="l00478"></a><a class="code" href="classRtAudio.html#a9">00478</a> <a class="code" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> <a class="code" href="classRtAudio.html#a9">getDeviceInfo</a>(<span class="keywordtype">int</span> device) { <span class="keywordflow">return</span> rtapi_->getDeviceInfo( device ); };
|
||||
00479
|
||||
00481
|
||||
<a name="l00486"></a><a class="code" href="classRtAudio.html#a10">00486</a> <span class="keywordtype">char</span> * <span class="keyword">const</span> <a class="code" href="classRtAudio.html#a10">getStreamBuffer</a>() { <span class="keywordflow">return</span> rtapi_->getStreamBuffer(); };
|
||||
00487
|
||||
00488 RtApi *rtapi_;
|
||||
00489 };
|
||||
00490
|
||||
00491
|
||||
00492 <span class="comment">// RtApi Subclass prototypes.</span>
|
||||
00493
|
||||
00494 <span class="preprocessor">#if defined(__LINUX_ALSA__)</span>
|
||||
00495 <span class="preprocessor"></span>
|
||||
00496 <span class="keyword">class </span>RtApiAlsa: <span class="keyword">public</span> RtApi
|
||||
00497 {
|
||||
00498 <span class="keyword">public</span>:
|
||||
00499
|
||||
00500 RtApiAlsa();
|
||||
00501 ~RtApiAlsa();
|
||||
00502 <span class="keywordtype">void</span> tickStream();
|
||||
00503 <span class="keywordtype">void</span> closeStream();
|
||||
00504 <span class="keywordtype">void</span> startStream();
|
||||
00505 <span class="keywordtype">void</span> stopStream();
|
||||
00506 <span class="keywordtype">void</span> abortStream();
|
||||
00507 <span class="keywordtype">int</span> streamWillBlock();
|
||||
00508 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00509 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00510
|
||||
00511 <span class="keyword">private</span>:
|
||||
00512
|
||||
00513 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00514 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00515 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00516 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00517 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00518 };
|
||||
00519
|
||||
00520 <span class="preprocessor">#endif</span>
|
||||
00521 <span class="preprocessor"></span>
|
||||
00522 <span class="preprocessor">#if defined(__LINUX_JACK__)</span>
|
||||
00523 <span class="preprocessor"></span>
|
||||
00524 <span class="keyword">class </span>RtApiJack: <span class="keyword">public</span> RtApi
|
||||
00525 {
|
||||
00526 <span class="keyword">public</span>:
|
||||
00527
|
||||
00528 RtApiJack();
|
||||
00529 ~RtApiJack();
|
||||
00530 <span class="keywordtype">void</span> tickStream();
|
||||
00531 <span class="keywordtype">void</span> closeStream();
|
||||
00532 <span class="keywordtype">void</span> startStream();
|
||||
00533 <span class="keywordtype">void</span> stopStream();
|
||||
00534 <span class="keywordtype">void</span> abortStream();
|
||||
00535 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00536 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00537 <span class="comment">// This function is intended for internal use only. It must be</span>
|
||||
00538 <span class="comment">// public because it is called by the internal callback handler,</span>
|
||||
00539 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
|
||||
00540 <span class="comment">// will most likely produce highly undesireable results!</span>
|
||||
00541 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> nframes );
|
||||
00542
|
||||
00543 <span class="keyword">private</span>:
|
||||
00544
|
||||
00545 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00546 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00547 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00548 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00549 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00550 };
|
||||
00489
|
||||
<a name="l00494"></a><a class="code" href="classRtAudio.html#a11">00494</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a11">tickStream</a>() { rtapi_->tickStream(); };
|
||||
00495
|
||||
00497
|
||||
<a name="l00501"></a><a class="code" href="classRtAudio.html#a12">00501</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a12">closeStream</a>() { rtapi_->closeStream(); };
|
||||
00502
|
||||
00504
|
||||
<a name="l00508"></a><a class="code" href="classRtAudio.html#a13">00508</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a13">startStream</a>() { rtapi_->startStream(); };
|
||||
00509
|
||||
00511
|
||||
<a name="l00515"></a><a class="code" href="classRtAudio.html#a14">00515</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a14">stopStream</a>() { rtapi_->stopStream(); };
|
||||
00516
|
||||
00518
|
||||
<a name="l00522"></a><a class="code" href="classRtAudio.html#a15">00522</a> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a15">abortStream</a>() { rtapi_->abortStream(); };
|
||||
00523
|
||||
00524
|
||||
00525 <span class="keyword">protected</span>:
|
||||
00526
|
||||
00527 <span class="keywordtype">void</span> initialize( RtAudioApi api );
|
||||
00528
|
||||
00529 RtApi *rtapi_;
|
||||
00530 };
|
||||
00531
|
||||
00532
|
||||
00533 <span class="comment">// RtApi Subclass prototypes.</span>
|
||||
00534
|
||||
00535 <span class="preprocessor">#if defined(__LINUX_ALSA__)</span>
|
||||
00536 <span class="preprocessor"></span>
|
||||
00537 <span class="keyword">class </span>RtApiAlsa: <span class="keyword">public</span> RtApi
|
||||
00538 {
|
||||
00539 <span class="keyword">public</span>:
|
||||
00540
|
||||
00541 RtApiAlsa();
|
||||
00542 ~RtApiAlsa();
|
||||
00543 <span class="keywordtype">void</span> tickStream();
|
||||
00544 <span class="keywordtype">void</span> closeStream();
|
||||
00545 <span class="keywordtype">void</span> startStream();
|
||||
00546 <span class="keywordtype">void</span> stopStream();
|
||||
00547 <span class="keywordtype">void</span> abortStream();
|
||||
00548 <span class="keywordtype">int</span> streamWillBlock();
|
||||
00549 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00550 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00551
|
||||
00552 <span class="preprocessor">#endif</span>
|
||||
00553 <span class="preprocessor"></span>
|
||||
00554 <span class="preprocessor">#if defined(__LINUX_OSS__)</span>
|
||||
00555 <span class="preprocessor"></span>
|
||||
00556 <span class="keyword">class </span>RtApiOss: <span class="keyword">public</span> RtApi
|
||||
00557 {
|
||||
00558 <span class="keyword">public</span>:
|
||||
00559
|
||||
00560 RtApiOss();
|
||||
00561 ~RtApiOss();
|
||||
00562 <span class="keywordtype">void</span> tickStream();
|
||||
00563 <span class="keywordtype">void</span> closeStream();
|
||||
00564 <span class="keywordtype">void</span> startStream();
|
||||
00565 <span class="keywordtype">void</span> stopStream();
|
||||
00566 <span class="keywordtype">void</span> abortStream();
|
||||
00567 <span class="keywordtype">int</span> streamWillBlock();
|
||||
00568 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00569 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00570
|
||||
00571 <span class="keyword">private</span>:
|
||||
00572
|
||||
00573 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00574 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00575 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00576 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00577 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00578 };
|
||||
00579
|
||||
00580 <span class="preprocessor">#endif</span>
|
||||
00581 <span class="preprocessor"></span>
|
||||
00582 <span class="preprocessor">#if defined(__MACOSX_CORE__)</span>
|
||||
00583 <span class="preprocessor"></span>
|
||||
00584 <span class="preprocessor">#include <CoreAudio/AudioHardware.h></span>
|
||||
00552 <span class="keyword">private</span>:
|
||||
00553
|
||||
00554 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00555 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00556 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00557 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00558 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00559 };
|
||||
00560
|
||||
00561 <span class="preprocessor">#endif</span>
|
||||
00562 <span class="preprocessor"></span>
|
||||
00563 <span class="preprocessor">#if defined(__LINUX_JACK__)</span>
|
||||
00564 <span class="preprocessor"></span>
|
||||
00565 <span class="keyword">class </span>RtApiJack: <span class="keyword">public</span> RtApi
|
||||
00566 {
|
||||
00567 <span class="keyword">public</span>:
|
||||
00568
|
||||
00569 RtApiJack();
|
||||
00570 ~RtApiJack();
|
||||
00571 <span class="keywordtype">void</span> tickStream();
|
||||
00572 <span class="keywordtype">void</span> closeStream();
|
||||
00573 <span class="keywordtype">void</span> startStream();
|
||||
00574 <span class="keywordtype">void</span> stopStream();
|
||||
00575 <span class="keywordtype">void</span> abortStream();
|
||||
00576 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00577 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00578 <span class="comment">// This function is intended for internal use only. It must be</span>
|
||||
00579 <span class="comment">// public because it is called by the internal callback handler,</span>
|
||||
00580 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
|
||||
00581 <span class="comment">// will most likely produce highly undesireable results!</span>
|
||||
00582 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> nframes );
|
||||
00583
|
||||
00584 <span class="keyword">private</span>:
|
||||
00585
|
||||
00586 <span class="keyword">class </span>RtApiCore: <span class="keyword">public</span> RtApi
|
||||
00587 {
|
||||
00588 <span class="keyword">public</span>:
|
||||
00589
|
||||
00590 RtApiCore();
|
||||
00591 ~RtApiCore();
|
||||
00592 <span class="keywordtype">int</span> getDefaultOutputDevice(<span class="keywordtype">void</span>);
|
||||
00593 <span class="keywordtype">int</span> getDefaultInputDevice(<span class="keywordtype">void</span>);
|
||||
00594 <span class="keywordtype">void</span> tickStream();
|
||||
00595 <span class="keywordtype">void</span> closeStream();
|
||||
00596 <span class="keywordtype">void</span> startStream();
|
||||
00597 <span class="keywordtype">void</span> stopStream();
|
||||
00598 <span class="keywordtype">void</span> abortStream();
|
||||
00599 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00600 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00601
|
||||
00602 <span class="comment">// This function is intended for internal use only. It must be</span>
|
||||
00603 <span class="comment">// public because it is called by the internal callback handler,</span>
|
||||
00604 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
|
||||
00605 <span class="comment">// will most likely produce highly undesireable results!</span>
|
||||
00606 <span class="keywordtype">void</span> callbackEvent( AudioDeviceID deviceId, <span class="keywordtype">void</span> *inData, <span class="keywordtype">void</span> *outData );
|
||||
00607
|
||||
00608 <span class="keyword">private</span>:
|
||||
00609
|
||||
00610 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00611 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00612 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00613 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00614 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00615 };
|
||||
00616
|
||||
00617 <span class="preprocessor">#endif</span>
|
||||
00618 <span class="preprocessor"></span>
|
||||
00619 <span class="preprocessor">#if defined(__WINDOWS_DS__)</span>
|
||||
00620 <span class="preprocessor"></span>
|
||||
00621 <span class="keyword">class </span>RtApiDs: <span class="keyword">public</span> RtApi
|
||||
00622 {
|
||||
00623 <span class="keyword">public</span>:
|
||||
00624
|
||||
00625 RtApiDs();
|
||||
00626 ~RtApiDs();
|
||||
00627 <span class="keywordtype">int</span> getDefaultOutputDevice(<span class="keywordtype">void</span>);
|
||||
00628 <span class="keywordtype">int</span> getDefaultInputDevice(<span class="keywordtype">void</span>);
|
||||
00629 <span class="keywordtype">void</span> tickStream();
|
||||
00630 <span class="keywordtype">void</span> closeStream();
|
||||
00631 <span class="keywordtype">void</span> startStream();
|
||||
00632 <span class="keywordtype">void</span> stopStream();
|
||||
00633 <span class="keywordtype">void</span> abortStream();
|
||||
00634 <span class="keywordtype">int</span> streamWillBlock();
|
||||
00635 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00636 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00637
|
||||
00638 <span class="keyword">private</span>:
|
||||
00639
|
||||
00640 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00641 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00642 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00643 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00644 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00645 };
|
||||
00646
|
||||
00647 <span class="preprocessor">#endif</span>
|
||||
00648 <span class="preprocessor"></span>
|
||||
00649 <span class="preprocessor">#if defined(__WINDOWS_ASIO__)</span>
|
||||
00650 <span class="preprocessor"></span>
|
||||
00651 <span class="keyword">class </span>RtApiAsio: <span class="keyword">public</span> RtApi
|
||||
00652 {
|
||||
00653 <span class="keyword">public</span>:
|
||||
00654
|
||||
00655 RtApiAsio();
|
||||
00656 ~RtApiAsio();
|
||||
00657 <span class="keywordtype">void</span> tickStream();
|
||||
00658 <span class="keywordtype">void</span> closeStream();
|
||||
00659 <span class="keywordtype">void</span> startStream();
|
||||
00660 <span class="keywordtype">void</span> stopStream();
|
||||
00661 <span class="keywordtype">void</span> abortStream();
|
||||
00662 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00663 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00664
|
||||
00665 <span class="comment">// This function is intended for internal use only. It must be</span>
|
||||
00666 <span class="comment">// public because it is called by the internal callback handler,</span>
|
||||
00667 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
|
||||
00668 <span class="comment">// will most likely produce highly undesireable results!</span>
|
||||
00669 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">long</span> bufferIndex );
|
||||
00670
|
||||
00671 <span class="keyword">private</span>:
|
||||
00672
|
||||
00673 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00674 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00675 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00676 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00677 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00678 };
|
||||
00679
|
||||
00680 <span class="preprocessor">#endif</span>
|
||||
00681 <span class="preprocessor"></span>
|
||||
00682 <span class="preprocessor">#if defined(__IRIX_AL__)</span>
|
||||
00683 <span class="preprocessor"></span>
|
||||
00684 <span class="keyword">class </span>RtApiAl: <span class="keyword">public</span> RtApi
|
||||
00685 {
|
||||
00686 <span class="keyword">public</span>:
|
||||
00586 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00587 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00588 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00589 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00590 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00591 };
|
||||
00592
|
||||
00593 <span class="preprocessor">#endif</span>
|
||||
00594 <span class="preprocessor"></span>
|
||||
00595 <span class="preprocessor">#if defined(__LINUX_OSS__)</span>
|
||||
00596 <span class="preprocessor"></span>
|
||||
00597 <span class="keyword">class </span>RtApiOss: <span class="keyword">public</span> RtApi
|
||||
00598 {
|
||||
00599 <span class="keyword">public</span>:
|
||||
00600
|
||||
00601 RtApiOss();
|
||||
00602 ~RtApiOss();
|
||||
00603 <span class="keywordtype">void</span> tickStream();
|
||||
00604 <span class="keywordtype">void</span> closeStream();
|
||||
00605 <span class="keywordtype">void</span> startStream();
|
||||
00606 <span class="keywordtype">void</span> stopStream();
|
||||
00607 <span class="keywordtype">void</span> abortStream();
|
||||
00608 <span class="keywordtype">int</span> streamWillBlock();
|
||||
00609 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00610 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00611
|
||||
00612 <span class="keyword">private</span>:
|
||||
00613
|
||||
00614 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00615 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00616 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00617 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00618 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00619 };
|
||||
00620
|
||||
00621 <span class="preprocessor">#endif</span>
|
||||
00622 <span class="preprocessor"></span>
|
||||
00623 <span class="preprocessor">#if defined(__MACOSX_CORE__)</span>
|
||||
00624 <span class="preprocessor"></span>
|
||||
00625 <span class="preprocessor">#include <CoreAudio/AudioHardware.h></span>
|
||||
00626
|
||||
00627 <span class="keyword">class </span>RtApiCore: <span class="keyword">public</span> RtApi
|
||||
00628 {
|
||||
00629 <span class="keyword">public</span>:
|
||||
00630
|
||||
00631 RtApiCore();
|
||||
00632 ~RtApiCore();
|
||||
00633 <span class="keywordtype">int</span> getDefaultOutputDevice(<span class="keywordtype">void</span>);
|
||||
00634 <span class="keywordtype">int</span> getDefaultInputDevice(<span class="keywordtype">void</span>);
|
||||
00635 <span class="keywordtype">void</span> tickStream();
|
||||
00636 <span class="keywordtype">void</span> closeStream();
|
||||
00637 <span class="keywordtype">void</span> startStream();
|
||||
00638 <span class="keywordtype">void</span> stopStream();
|
||||
00639 <span class="keywordtype">void</span> abortStream();
|
||||
00640 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00641 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00642
|
||||
00643 <span class="comment">// This function is intended for internal use only. It must be</span>
|
||||
00644 <span class="comment">// public because it is called by the internal callback handler,</span>
|
||||
00645 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
|
||||
00646 <span class="comment">// will most likely produce highly undesireable results!</span>
|
||||
00647 <span class="keywordtype">void</span> callbackEvent( AudioDeviceID deviceId, <span class="keywordtype">void</span> *inData, <span class="keywordtype">void</span> *outData );
|
||||
00648
|
||||
00649 <span class="keyword">private</span>:
|
||||
00650
|
||||
00651 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00652 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00653 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00654 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00655 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00656 };
|
||||
00657
|
||||
00658 <span class="preprocessor">#endif</span>
|
||||
00659 <span class="preprocessor"></span>
|
||||
00660 <span class="preprocessor">#if defined(__WINDOWS_DS__)</span>
|
||||
00661 <span class="preprocessor"></span>
|
||||
00662 <span class="keyword">class </span>RtApiDs: <span class="keyword">public</span> RtApi
|
||||
00663 {
|
||||
00664 <span class="keyword">public</span>:
|
||||
00665
|
||||
00666 RtApiDs();
|
||||
00667 ~RtApiDs();
|
||||
00668 <span class="keywordtype">int</span> getDefaultOutputDevice(<span class="keywordtype">void</span>);
|
||||
00669 <span class="keywordtype">int</span> getDefaultInputDevice(<span class="keywordtype">void</span>);
|
||||
00670 <span class="keywordtype">void</span> tickStream();
|
||||
00671 <span class="keywordtype">void</span> closeStream();
|
||||
00672 <span class="keywordtype">void</span> startStream();
|
||||
00673 <span class="keywordtype">void</span> stopStream();
|
||||
00674 <span class="keywordtype">void</span> abortStream();
|
||||
00675 <span class="keywordtype">int</span> streamWillBlock();
|
||||
00676 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00677 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00678
|
||||
00679 <span class="keyword">private</span>:
|
||||
00680
|
||||
00681 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00682 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00683 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00684 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00685 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00686 };
|
||||
00687
|
||||
00688 RtApiAl();
|
||||
00689 ~RtApiAl();
|
||||
00690 <span class="keywordtype">int</span> getDefaultOutputDevice(<span class="keywordtype">void</span>);
|
||||
00691 <span class="keywordtype">int</span> getDefaultInputDevice(<span class="keywordtype">void</span>);
|
||||
00692 <span class="keywordtype">void</span> tickStream();
|
||||
00693 <span class="keywordtype">void</span> closeStream();
|
||||
00694 <span class="keywordtype">void</span> startStream();
|
||||
00695 <span class="keywordtype">void</span> stopStream();
|
||||
00696 <span class="keywordtype">void</span> abortStream();
|
||||
00697 <span class="keywordtype">int</span> streamWillBlock();
|
||||
00698 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00699 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00700
|
||||
00701 <span class="keyword">private</span>:
|
||||
00702
|
||||
00703 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00704 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00705 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00706 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00707 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00708 };
|
||||
00709
|
||||
00710 <span class="preprocessor">#endif</span>
|
||||
00711 <span class="preprocessor"></span>
|
||||
00712 <span class="comment">// Define the following flag to have extra information spewed to stderr.</span>
|
||||
00713 <span class="comment">//#define __RTAUDIO_DEBUG__</span>
|
||||
00714
|
||||
00715 <span class="preprocessor">#endif</span>
|
||||
00688 <span class="preprocessor">#endif</span>
|
||||
00689 <span class="preprocessor"></span>
|
||||
00690 <span class="preprocessor">#if defined(__WINDOWS_ASIO__)</span>
|
||||
00691 <span class="preprocessor"></span>
|
||||
00692 <span class="keyword">class </span>RtApiAsio: <span class="keyword">public</span> RtApi
|
||||
00693 {
|
||||
00694 <span class="keyword">public</span>:
|
||||
00695
|
||||
00696 RtApiAsio();
|
||||
00697 ~RtApiAsio();
|
||||
00698 <span class="keywordtype">void</span> tickStream();
|
||||
00699 <span class="keywordtype">void</span> closeStream();
|
||||
00700 <span class="keywordtype">void</span> startStream();
|
||||
00701 <span class="keywordtype">void</span> stopStream();
|
||||
00702 <span class="keywordtype">void</span> abortStream();
|
||||
00703 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00704 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00705
|
||||
00706 <span class="comment">// This function is intended for internal use only. It must be</span>
|
||||
00707 <span class="comment">// public because it is called by the internal callback handler,</span>
|
||||
00708 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
|
||||
00709 <span class="comment">// will most likely produce highly undesireable results!</span>
|
||||
00710 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">long</span> bufferIndex );
|
||||
00711
|
||||
00712 <span class="keyword">private</span>:
|
||||
00713
|
||||
00714 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00715 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00716 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00717 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00718 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00719 };
|
||||
00720
|
||||
00721 <span class="preprocessor">#endif</span>
|
||||
00722 <span class="preprocessor"></span>
|
||||
00723 <span class="preprocessor">#if defined(__IRIX_AL__)</span>
|
||||
00724 <span class="preprocessor"></span>
|
||||
00725 <span class="keyword">class </span>RtApiAl: <span class="keyword">public</span> RtApi
|
||||
00726 {
|
||||
00727 <span class="keyword">public</span>:
|
||||
00728
|
||||
00729 RtApiAl();
|
||||
00730 ~RtApiAl();
|
||||
00731 <span class="keywordtype">int</span> getDefaultOutputDevice(<span class="keywordtype">void</span>);
|
||||
00732 <span class="keywordtype">int</span> getDefaultInputDevice(<span class="keywordtype">void</span>);
|
||||
00733 <span class="keywordtype">void</span> tickStream();
|
||||
00734 <span class="keywordtype">void</span> closeStream();
|
||||
00735 <span class="keywordtype">void</span> startStream();
|
||||
00736 <span class="keywordtype">void</span> stopStream();
|
||||
00737 <span class="keywordtype">void</span> abortStream();
|
||||
00738 <span class="keywordtype">int</span> streamWillBlock();
|
||||
00739 <span class="keywordtype">void</span> setStreamCallback( RtAudioCallback callback, <span class="keywordtype">void</span> *userData );
|
||||
00740 <span class="keywordtype">void</span> cancelStreamCallback();
|
||||
00741
|
||||
00742 <span class="keyword">private</span>:
|
||||
00743
|
||||
00744 <span class="keywordtype">void</span> initialize(<span class="keywordtype">void</span>);
|
||||
00745 <span class="keywordtype">void</span> probeDeviceInfo( RtApiDevice *info );
|
||||
00746 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">int</span> channels,
|
||||
00747 <span class="keywordtype">int</span> sampleRate, RtAudioFormat format,
|
||||
00748 <span class="keywordtype">int</span> *bufferSize, <span class="keywordtype">int</span> numberOfBuffers );
|
||||
00749 };
|
||||
00750
|
||||
00751 <span class="preprocessor">#endif</span>
|
||||
00752 <span class="preprocessor"></span>
|
||||
00753 <span class="comment">// Define the following flag to have extra information spewed to stderr.</span>
|
||||
00754 <span class="comment">//#define __RTAUDIO_DEBUG__</span>
|
||||
00755
|
||||
00756 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,60 +8,66 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>RtDuplex.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00022 <span class="comment">/***************************************************/</span>
|
||||
00023
|
||||
00024 <span class="preprocessor">#if !defined(__RTDUPLEX_H)</span>
|
||||
00025 <span class="preprocessor"></span><span class="preprocessor">#define __RTDUPLEX_H</span>
|
||||
00026 <span class="preprocessor"></span>
|
||||
00027 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00028 <span class="preprocessor">#include "RtAudio.h"</span>
|
||||
00029
|
||||
<a name="l00030"></a><a class="code" href="classRtDuplex.html">00030</a> <span class="keyword">class </span><a class="code" href="classRtDuplex.html">RtDuplex</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00031 {
|
||||
00032 <span class="keyword">public</span>:
|
||||
00034
|
||||
00045 <a class="code" href="classRtDuplex.html#a0">RtDuplex</a>(<span class="keywordtype">int</span> nChannels = 1, MY_FLOAT sampleRate = Stk::sampleRate(), <span class="keywordtype">int</span> device = 0, <span class="keywordtype">int</span> bufferFrames = RT_BUFFER_SIZE, <span class="keywordtype">int</span> nBuffers = 2);
|
||||
00046
|
||||
00048 <a class="code" href="classRtDuplex.html#a1">~RtDuplex</a>();
|
||||
00049
|
||||
00051
|
||||
00054 <span class="keywordtype">void</span> <a class="code" href="classRtDuplex.html#a2">start</a>(<span class="keywordtype">void</span>);
|
||||
00055
|
||||
00057
|
||||
00060 <span class="keywordtype">void</span> <a class="code" href="classRtDuplex.html#a3">stop</a>(<span class="keywordtype">void</span>);
|
||||
00061
|
||||
00063 MY_FLOAT <a class="code" href="classRtDuplex.html#a4">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00029 <span class="comment">/***************************************************/</span>
|
||||
00030
|
||||
00031 <span class="preprocessor">#ifndef STK_RTDUPLEX_H</span>
|
||||
00032 <span class="preprocessor"></span><span class="preprocessor">#define STK_RTDUPLEX_H</span>
|
||||
00033 <span class="preprocessor"></span>
|
||||
00034 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00035 <span class="preprocessor">#include "RtAudio.h"</span>
|
||||
00036
|
||||
<a name="l00037"></a><a class="code" href="classRtDuplex.html">00037</a> <span class="keyword">class </span><a class="code" href="classRtDuplex.html">RtDuplex</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00038 {
|
||||
00039 <span class="keyword">public</span>:
|
||||
00041
|
||||
00052 <a class="code" href="classRtDuplex.html#a0">RtDuplex</a>(<span class="keywordtype">int</span> nChannels = 1, StkFloat <a class="code" href="classStk.html#e0">sampleRate</a> = <a class="code" href="classStk.html#e0">Stk::sampleRate</a>(), <span class="keywordtype">int</span> device = 0, <span class="keywordtype">int</span> bufferFrames = RT_BUFFER_SIZE, <span class="keywordtype">int</span> nBuffers = 2);
|
||||
00053
|
||||
00055 <a class="code" href="classRtDuplex.html#a1">~RtDuplex</a>();
|
||||
00056
|
||||
00058
|
||||
00061 <span class="keywordtype">void</span> <a class="code" href="classRtDuplex.html#a2">start</a>(<span class="keywordtype">void</span>);
|
||||
00062
|
||||
00064
|
||||
00066
|
||||
00069 MY_FLOAT <a class="code" href="classRtDuplex.html#a5">tick</a>(<span class="keyword">const</span> MY_FLOAT sample);
|
||||
00070
|
||||
00072
|
||||
00075 MY_FLOAT *<a class="code" href="classRtDuplex.html#a5">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00076
|
||||
00078 <span class="keyword">const</span> MY_FLOAT *<a class="code" href="classRtDuplex.html#a7">lastFrame</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00067 <span class="keywordtype">void</span> <a class="code" href="classRtDuplex.html#a3">stop</a>(<span class="keywordtype">void</span>);
|
||||
00068
|
||||
00070 StkFloat <a class="code" href="classRtDuplex.html#a4">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00071
|
||||
00073
|
||||
00076 StkFloat <a class="code" href="classRtDuplex.html#a5">tick</a>(<span class="keyword">const</span> StkFloat sample);
|
||||
00077
|
||||
00079
|
||||
00081
|
||||
00084 MY_FLOAT *<a class="code" href="classRtDuplex.html#a8">tickFrame</a>(MY_FLOAT *frameVector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frames = 1);
|
||||
00082 StkFloat *<a class="code" href="classRtDuplex.html#a5">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00083
|
||||
00085
|
||||
00086 <span class="keyword">protected</span>:
|
||||
00087
|
||||
00088 <a class="code" href="classRtAudio.html">RtAudio</a> *audio_;
|
||||
00089 MY_FLOAT *data_;
|
||||
00090 MY_FLOAT *lastOutput_;
|
||||
00091 <span class="keywordtype">int</span> bufferSize_;
|
||||
00092 <span class="keywordtype">bool</span> stopped_;
|
||||
00093 <span class="keywordtype">long</span> counter_;
|
||||
00094 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels_;
|
||||
00095
|
||||
00096 };
|
||||
00097
|
||||
00098 <span class="preprocessor">#endif</span>
|
||||
00092 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classRtDuplex.html#a5">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00093
|
||||
00095 <span class="keyword">const</span> StkFloat *<a class="code" href="classRtDuplex.html#a8">lastFrame</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00096
|
||||
00098
|
||||
00101 StkFloat *<a class="code" href="classRtDuplex.html#a9">tickFrame</a>(StkFloat *frameVector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frames = 1);
|
||||
00102
|
||||
00104
|
||||
00110 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classRtDuplex.html#a9">tickFrame</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames );
|
||||
00111
|
||||
00112 <span class="keyword">protected</span>:
|
||||
00113
|
||||
00114 <a class="code" href="classRtAudio.html">RtAudio</a> *audio_;
|
||||
00115 StkFloat *data_;
|
||||
00116 StkFloat *lastOutput_;
|
||||
00117 <span class="keywordtype">int</span> bufferSize_;
|
||||
00118 <span class="keywordtype">bool</span> stopped_;
|
||||
00119 <span class="keywordtype">long</span> counter_;
|
||||
00120 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels_;
|
||||
00121
|
||||
00122 };
|
||||
00123
|
||||
00124 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>RtError.h</h1><div class="fragment"><pre>00001 <span class="comment">/************************************************************************/</span>
|
||||
00010 <span class="comment">/************************************************************************/</span>
|
||||
00011
|
||||
@@ -24,7 +24,7 @@
|
||||
<a name="l00022"></a><a class="code" href="classRtError.html#w11">00022</a> <span class="keyword">enum</span> <a class="code" href="classRtError.html#w11">Type</a> {
|
||||
00023 <a class="code" href="classRtError.html#w11w0">WARNING</a>,
|
||||
00024 <a class="code" href="classRtError.html#w11w1">DEBUG_WARNING</a>,
|
||||
00025 UNSPECIFIED,
|
||||
00025 <a class="code" href="classRtError.html#w11w2">UNSPECIFIED</a>,
|
||||
00026 <a class="code" href="classRtError.html#w11w3">NO_DEVICES_FOUND</a>,
|
||||
00027 <a class="code" href="classRtError.html#w11w4">INVALID_DEVICE</a>,
|
||||
00028 <a class="code" href="classRtError.html#w11w5">INVALID_STREAM</a>,
|
||||
@@ -37,10 +37,10 @@
|
||||
00035
|
||||
00036 <span class="keyword">protected</span>:
|
||||
00037 std::string message_;
|
||||
00038 Type type_;
|
||||
00038 <a class="code" href="classRtError.html#w11">Type</a> type_;
|
||||
00039
|
||||
00040 <span class="keyword">public</span>:
|
||||
<a name="l00042"></a><a class="code" href="classRtError.html#a0">00042</a> <a class="code" href="classRtError.html#a0">RtError</a>(<span class="keyword">const</span> std::string& message, Type type = RtError::UNSPECIFIED) : message_(message), type_(type){}
|
||||
<a name="l00042"></a><a class="code" href="classRtError.html#a0">00042</a> <a class="code" href="classRtError.html#a0">RtError</a>(<span class="keyword">const</span> std::string& message, Type type = RtError::UNSPECIFIED) : message_(message), type_(type) {}
|
||||
00043
|
||||
<a name="l00045"></a><a class="code" href="classRtError.html#a1">00045</a> <span class="keyword">virtual</span> <a class="code" href="classRtError.html#a1">~RtError</a>(<span class="keywordtype">void</span>) {};
|
||||
00046
|
||||
@@ -57,7 +57,7 @@
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,52 +8,158 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<h1>RtMidi.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00030 <span class="comment">/***************************************************/</span>
|
||||
00031
|
||||
00032 <span class="preprocessor">#if !defined(__RTMIDI_H)</span>
|
||||
00033 <span class="preprocessor"></span><span class="preprocessor">#define __RTMIDI_H</span>
|
||||
00034 <span class="preprocessor"></span>
|
||||
00035 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00036
|
||||
<a name="l00037"></a><a class="code" href="classRtMidi.html">00037</a> <span class="keyword">class </span><a class="code" href="classRtMidi.html">RtMidi</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00038 {
|
||||
00039 <span class="keyword">public</span>:
|
||||
00041 <a class="code" href="classRtMidi.html#a0">RtMidi</a>(<span class="keywordtype">int</span> device = 0);
|
||||
00042
|
||||
00044 <a class="code" href="classRtMidi.html#a1">~RtMidi</a>();
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>RtMidi.h</h1><div class="fragment"><pre>00001 <span class="comment">/**********************************************************************/</span>
|
||||
00036 <span class="comment">/**********************************************************************/</span>
|
||||
00037
|
||||
00038 <span class="comment">// RtMidi: Version 1.0.2, 21 September 2004</span>
|
||||
00039
|
||||
00040 <span class="preprocessor">#ifndef RTMIDI_H</span>
|
||||
00041 <span class="preprocessor"></span><span class="preprocessor">#define RTMIDI_H</span>
|
||||
00042 <span class="preprocessor"></span>
|
||||
00043 <span class="preprocessor">#include "RtError.h"</span>
|
||||
00044 <span class="preprocessor">#include <string></span>
|
||||
00045
|
||||
00047 <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a2">printMessage</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00048
|
||||
00050
|
||||
00053 <span class="keywordtype">int</span> <a class="code" href="classRtMidi.html#a3">nextMessage</a>(<span class="keywordtype">void</span>);
|
||||
00054
|
||||
00056 <span class="keywordtype">int</span> <a class="code" href="classRtMidi.html#a4">getType</a>() <span class="keyword">const</span>;
|
||||
00057
|
||||
00059 <span class="keywordtype">int</span> <a class="code" href="classRtMidi.html#a5">getChannel</a>() <span class="keyword">const</span>;
|
||||
<a name="l00046"></a><a class="code" href="classRtMidi.html">00046</a> <span class="keyword">class </span><a class="code" href="classRtMidi.html">RtMidi</a>
|
||||
00047 {
|
||||
00048 <span class="keyword">protected</span>:
|
||||
00049
|
||||
00050 <a class="code" href="classRtMidi.html">RtMidi</a>();
|
||||
00051
|
||||
00052 <span class="keyword">virtual</span> ~<a class="code" href="classRtMidi.html">RtMidi</a>() {};
|
||||
00053
|
||||
00054 <span class="comment">// A basic error reporting function for internal use in the RtMidi</span>
|
||||
00055 <span class="comment">// subclasses. The behavior of this function can be modified to</span>
|
||||
00056 <span class="comment">// suit specific needs.</span>
|
||||
00057 <span class="keywordtype">void</span> error( <a class="code" href="classRtError.html#w11">RtError::Type</a> type );
|
||||
00058
|
||||
00059 <span class="keyword">virtual</span> <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 ) = 0;
|
||||
00060
|
||||
00062 MY_FLOAT <a class="code" href="classRtMidi.html#a6">getByteTwo</a>() <span class="keyword">const</span>;
|
||||
00063
|
||||
00065 MY_FLOAT <a class="code" href="classRtMidi.html#a7">getByteThree</a>() <span class="keyword">const</span>;
|
||||
00066
|
||||
00068 MY_FLOAT <a class="code" href="classRtMidi.html#a8">getDeltaTime</a>() <span class="keyword">const</span>;
|
||||
00069
|
||||
00070 <span class="keyword">protected</span>:
|
||||
00071 <span class="keywordtype">int</span> messageType;
|
||||
00072 <span class="keywordtype">int</span> channel;
|
||||
00073 <span class="keywordtype">float</span> byteTwo;
|
||||
00074 <span class="keywordtype">float</span> byteThree;
|
||||
00075 MY_FLOAT deltaTime;
|
||||
00076 <span class="keywordtype">int</span> readIndex;
|
||||
00077
|
||||
00078 };
|
||||
00079
|
||||
00080 <span class="preprocessor">#endif</span>
|
||||
00061 <span class="keywordtype">void</span> *apiData_;
|
||||
00062 <span class="keywordtype">bool</span> connected_;
|
||||
00063 std::string errorString_;
|
||||
00064 };
|
||||
00065
|
||||
00066 <span class="comment">/**********************************************************************/</span>
|
||||
00082 <span class="comment">/**********************************************************************/</span>
|
||||
00083
|
||||
00084 <span class="preprocessor">#include <vector></span>
|
||||
00085 <span class="preprocessor">#include <queue></span>
|
||||
00086
|
||||
<a name="l00087"></a><a class="code" href="classRtMidiIn.html">00087</a> <span class="keyword">class </span><a class="code" href="classRtMidiIn.html">RtMidiIn</a> : <span class="keyword">public</span> <a class="code" href="classRtMidi.html">RtMidi</a>
|
||||
00088 {
|
||||
00089 <span class="keyword">public</span>:
|
||||
00090
|
||||
<a name="l00092"></a><a class="code" href="classRtMidiIn.html#w0">00092</a> <span class="keyword">typedef</span> void (*<a class="code" href="classRtMidiIn.html#w0">RtMidiCallback</a>)( <span class="keywordtype">double</span> timeStamp, std::vector<unsigned char> *message, <span class="keywordtype">void</span> *userData);
|
||||
00093
|
||||
00095
|
||||
00098 <a class="code" href="classRtMidiIn.html#a0">RtMidiIn</a>();
|
||||
00099
|
||||
00101 <a class="code" href="classRtMidiIn.html#a1">~RtMidiIn</a>();
|
||||
00102
|
||||
00104
|
||||
00108 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a2">openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 );
|
||||
00109
|
||||
00111
|
||||
00117 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a3">openVirtualPort</a>();
|
||||
00118
|
||||
00120
|
||||
00126 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a4">setCallback</a>( <a class="code" href="classRtMidiIn.html#w0">RtMidiCallback</a> callback, <span class="keywordtype">void</span> *userData = 0 );
|
||||
00127
|
||||
00129
|
||||
00133 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a5">cancelCallback</a>();
|
||||
00134
|
||||
00136 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a6">closePort</a>( <span class="keywordtype">void</span> );
|
||||
00137
|
||||
00139 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidiIn.html#a7">getPortCount</a>();
|
||||
00140
|
||||
00142
|
||||
00145 std::string <a class="code" href="classRtMidiIn.html#a8">getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 );
|
||||
00146
|
||||
00148
|
||||
00152 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a9">setQueueSizeLimit</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSize );
|
||||
00153
|
||||
00155
|
||||
00162 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a10">ignoreTypes</a>( <span class="keywordtype">bool</span> midiSysex = <span class="keyword">true</span>, <span class="keywordtype">bool</span> midiTime = <span class="keyword">true</span>, <span class="keywordtype">bool</span> midiSense = <span class="keyword">true</span> );
|
||||
00163
|
||||
00165
|
||||
00172 <span class="keywordtype">double</span> <a class="code" href="classRtMidiIn.html#a11">getMessage</a>( std::vector<unsigned char> *message );
|
||||
00173
|
||||
00174 <span class="comment">// A MIDI structure used internally by the class to store incoming</span>
|
||||
00175 <span class="comment">// messages. Each message represents one and only one MIDI message.</span>
|
||||
00176 <span class="keyword">struct </span>MidiMessage {
|
||||
00177 std::vector<unsigned char> bytes;
|
||||
00178 <span class="keywordtype">double</span> timeStamp;
|
||||
00179
|
||||
00180 <span class="comment">// Default constructor.</span>
|
||||
00181 MidiMessage()
|
||||
00182 :bytes(3), timeStamp(0.0) {}
|
||||
00183 };
|
||||
00184
|
||||
00185 <span class="comment">// The RtMidiInData structure is used to pass private class data to</span>
|
||||
00186 <span class="comment">// the MIDI input handling function or thread.</span>
|
||||
00187 <span class="keyword">struct </span>RtMidiInData {
|
||||
00188 std::queue<MidiMessage> queue;
|
||||
00189 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueLimit;
|
||||
00190 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ignoreFlags;
|
||||
00191 <span class="keywordtype">bool</span> doInput;
|
||||
00192 <span class="keywordtype">bool</span> firstMessage;
|
||||
00193 <span class="keywordtype">void</span> *apiData;
|
||||
00194 <span class="keywordtype">bool</span> usingCallback;
|
||||
00195 <span class="keywordtype">void</span> *userCallback;
|
||||
00196 <span class="keywordtype">void</span> *userData;
|
||||
00197
|
||||
00198 <span class="comment">// Default constructor.</span>
|
||||
00199 RtMidiInData()
|
||||
00200 : queueLimit(1024), ignoreFlags(7), doInput(false), firstMessage(true),
|
||||
00201 apiData(0), usingCallback(false), userCallback(0), userData(0) {}
|
||||
00202 };
|
||||
00203
|
||||
00204 <span class="keyword">private</span>:
|
||||
00205
|
||||
00206 <span class="keywordtype">void</span> initialize( <span class="keywordtype">void</span> );
|
||||
00207 RtMidiInData inputData_;
|
||||
00208
|
||||
00209 };
|
||||
00210
|
||||
00211 <span class="comment">/**********************************************************************/</span>
|
||||
00223 <span class="comment">/**********************************************************************/</span>
|
||||
00224
|
||||
<a name="l00225"></a><a class="code" href="classRtMidiOut.html">00225</a> <span class="keyword">class </span><a class="code" href="classRtMidiOut.html">RtMidiOut</a> : <span class="keyword">public</span> <a class="code" href="classRtMidi.html">RtMidi</a>
|
||||
00226 {
|
||||
00227 <span class="keyword">public</span>:
|
||||
00228
|
||||
00230
|
||||
00233 <a class="code" href="classRtMidiOut.html#a0">RtMidiOut</a>();
|
||||
00234
|
||||
00236 <a class="code" href="classRtMidiOut.html#a1">~RtMidiOut</a>();
|
||||
00237
|
||||
00239
|
||||
00245 <span class="keywordtype">void</span> <a class="code" href="classRtMidiOut.html#a2">openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 );
|
||||
00246
|
||||
00248 <span class="keywordtype">void</span> <a class="code" href="classRtMidiOut.html#a3">closePort</a>();
|
||||
00249
|
||||
00251
|
||||
00259 <span class="keywordtype">void</span> <a class="code" href="classRtMidiOut.html#a4">openVirtualPort</a>();
|
||||
00260
|
||||
00262 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidiOut.html#a5">getPortCount</a>();
|
||||
00263
|
||||
00265
|
||||
00268 std::string <a class="code" href="classRtMidiOut.html#a6">getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
|
||||
00269
|
||||
00271
|
||||
00275 <span class="keywordtype">void</span> <a class="code" href="classRtMidiOut.html#a7">sendMessage</a>( std::vector<unsigned char> *message );
|
||||
00276
|
||||
00277 <span class="keyword">private</span>:
|
||||
00278
|
||||
00279 <span class="keywordtype">void</span> initialize( <span class="keywordtype">void</span> );
|
||||
00280 };
|
||||
00281
|
||||
00282 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,60 +8,65 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>RtWvIn.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00020 <span class="comment">/***************************************************/</span>
|
||||
00021
|
||||
00022 <span class="preprocessor">#if !defined(__RTWVIN_H)</span>
|
||||
00023 <span class="preprocessor"></span><span class="preprocessor">#define __RTWVIN_H</span>
|
||||
00024 <span class="preprocessor"></span>
|
||||
00025 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00026 <span class="preprocessor">#include "WvIn.h"</span>
|
||||
00027 <span class="preprocessor">#include "RtAudio.h"</span>
|
||||
00028
|
||||
<a name="l00029"></a><a class="code" href="classRtWvIn.html">00029</a> <span class="keyword">class </span><a class="code" href="classRtWvIn.html">RtWvIn</a> : <span class="keyword">protected</span> <a class="code" href="classWvIn.html">WvIn</a>
|
||||
00030 {
|
||||
00031 <span class="keyword">public</span>:
|
||||
00033
|
||||
00044 <a class="code" href="classRtWvIn.html#a0">RtWvIn</a>(<span class="keywordtype">int</span> nChannels = 1, MY_FLOAT sampleRate = Stk::sampleRate(), <span class="keywordtype">int</span> device = 0, <span class="keywordtype">int</span> bufferFrames = RT_BUFFER_SIZE, <span class="keywordtype">int</span> nBuffers = 2);
|
||||
00045
|
||||
00047 <a class="code" href="classRtWvIn.html#a1">~RtWvIn</a>();
|
||||
00024 <span class="comment">/***************************************************/</span>
|
||||
00025
|
||||
00026 <span class="preprocessor">#ifndef STK_RTWVIN_H</span>
|
||||
00027 <span class="preprocessor"></span><span class="preprocessor">#define STK_RTWVIN_H</span>
|
||||
00028 <span class="preprocessor"></span>
|
||||
00029 <span class="preprocessor">#include "WvIn.h"</span>
|
||||
00030 <span class="preprocessor">#include "RtAudio.h"</span>
|
||||
00031
|
||||
<a name="l00032"></a><a class="code" href="classRtWvIn.html">00032</a> <span class="keyword">class </span><a class="code" href="classRtWvIn.html">RtWvIn</a> : <span class="keyword">protected</span> <a class="code" href="classWvIn.html">WvIn</a>
|
||||
00033 {
|
||||
00034 <span class="keyword">public</span>:
|
||||
00036
|
||||
00047 <a class="code" href="classRtWvIn.html#a0">RtWvIn</a>(<span class="keywordtype">int</span> nChannels = 1, StkFloat <a class="code" href="classStk.html#e0">sampleRate</a> = <a class="code" href="classStk.html#e0">Stk::sampleRate</a>(), <span class="keywordtype">int</span> device = 0, <span class="keywordtype">int</span> bufferFrames = RT_BUFFER_SIZE, <span class="keywordtype">int</span> nBuffers = 2);
|
||||
00048
|
||||
00050
|
||||
00053 <span class="keywordtype">void</span> <a class="code" href="classRtWvIn.html#a2">start</a>(<span class="keywordtype">void</span>);
|
||||
00054
|
||||
00056
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classRtWvIn.html#a3">stop</a>(<span class="keywordtype">void</span>);
|
||||
00060
|
||||
00062 MY_FLOAT <a class="code" href="classRtWvIn.html#a4">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00050 <a class="code" href="classRtWvIn.html#a1">~RtWvIn</a>();
|
||||
00051
|
||||
00053
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classRtWvIn.html#a2">start</a>(<span class="keywordtype">void</span>);
|
||||
00057
|
||||
00059
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classRtWvIn.html#a3">stop</a>(<span class="keywordtype">void</span>);
|
||||
00063
|
||||
00065
|
||||
00068 MY_FLOAT <a class="code" href="classRtWvIn.html#a5">tick</a>(<span class="keywordtype">void</span>);
|
||||
00069
|
||||
00071
|
||||
00074 MY_FLOAT *<a class="code" href="classRtWvIn.html#a5">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00075
|
||||
00077 <span class="keyword">const</span> MY_FLOAT *<a class="code" href="classRtWvIn.html#a7">lastFrame</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00065 StkFloat <a class="code" href="classRtWvIn.html#a4">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00066
|
||||
00068
|
||||
00071 StkFloat <a class="code" href="classRtWvIn.html#a5">tick</a>(<span class="keywordtype">void</span>);
|
||||
00072
|
||||
00074
|
||||
00077 StkFloat *<a class="code" href="classRtWvIn.html#a5">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00078
|
||||
00080
|
||||
00083 <span class="keyword">const</span> MY_FLOAT *<a class="code" href="classRtWvIn.html#a8">tickFrame</a>(<span class="keywordtype">void</span>);
|
||||
00084
|
||||
00086
|
||||
00089 MY_FLOAT *<a class="code" href="classRtWvIn.html#a8">tickFrame</a>(MY_FLOAT *frameVector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frames);
|
||||
00086 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classRtWvIn.html#a5">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00087
|
||||
00089 <span class="keyword">const</span> StkFloat *<a class="code" href="classRtWvIn.html#a8">lastFrame</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00090
|
||||
00091 <span class="keyword">protected</span>:
|
||||
00092
|
||||
00093 <a class="code" href="classRtAudio.html">RtAudio</a> *audio_;
|
||||
00094 <span class="keywordtype">bool</span> stopped_;
|
||||
00095 <span class="keywordtype">long</span> counter_;
|
||||
00095 <span class="keyword">const</span> StkFloat *<a class="code" href="classRtWvIn.html#a9">tickFrame</a>(<span class="keywordtype">void</span>);
|
||||
00096
|
||||
00097 };
|
||||
00098
|
||||
00099 <span class="preprocessor">#endif</span>
|
||||
00101 StkFloat *<a class="code" href="classRtWvIn.html#a9">tickFrame</a>(StkFloat *frameVector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frames);
|
||||
00102
|
||||
00104
|
||||
00109 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classRtWvIn.html#a9">tickFrame</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames );
|
||||
00110
|
||||
00111 <span class="keyword">protected</span>:
|
||||
00112
|
||||
00113 <a class="code" href="classRtAudio.html">RtAudio</a> *audio_;
|
||||
00114 <span class="keywordtype">bool</span> stopped_;
|
||||
00115 <span class="keywordtype">long</span> counter_;
|
||||
00116
|
||||
00117 };
|
||||
00118
|
||||
00119 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,58 +8,64 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>RtWvOut.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00019 <span class="comment">/***************************************************/</span>
|
||||
00020
|
||||
00021 <span class="preprocessor">#if !defined(__RTWVOUT_H)</span>
|
||||
00022 <span class="preprocessor"></span><span class="preprocessor">#define __RTWVOUT_H</span>
|
||||
00023 <span class="preprocessor"></span>
|
||||
00024 <span class="preprocessor">#include "WvOut.h"</span>
|
||||
00025 <span class="preprocessor">#include "RtAudio.h"</span>
|
||||
00026 <span class="preprocessor">#include "Thread.h"</span>
|
||||
00027
|
||||
<a name="l00028"></a><a class="code" href="classRtWvOut.html">00028</a> <span class="keyword">class </span><a class="code" href="classRtWvOut.html">RtWvOut</a> : <span class="keyword">protected</span> <a class="code" href="classWvOut.html">WvOut</a>
|
||||
00029 {
|
||||
00030 <span class="keyword">public</span>:
|
||||
00031
|
||||
00033
|
||||
00044 <a class="code" href="classRtWvOut.html#a0">RtWvOut</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1, MY_FLOAT sampleRate = Stk::sampleRate(), <span class="keywordtype">int</span> device = 0, <span class="keywordtype">int</span> bufferFrames = RT_BUFFER_SIZE, <span class="keywordtype">int</span> nBuffers = 4 );
|
||||
00045
|
||||
00047 <a class="code" href="classRtWvOut.html#a1">~RtWvOut</a>();
|
||||
00023 <span class="comment">/***************************************************/</span>
|
||||
00024
|
||||
00025 <span class="preprocessor">#ifndef STK_RTWVOUT_H</span>
|
||||
00026 <span class="preprocessor"></span><span class="preprocessor">#define STK_RTWVOUT_H</span>
|
||||
00027 <span class="preprocessor"></span>
|
||||
00028 <span class="preprocessor">#include "WvOut.h"</span>
|
||||
00029 <span class="preprocessor">#include "RtAudio.h"</span>
|
||||
00030
|
||||
<a name="l00031"></a><a class="code" href="classRtWvOut.html">00031</a> <span class="keyword">class </span><a class="code" href="classRtWvOut.html">RtWvOut</a> : <span class="keyword">protected</span> <a class="code" href="classWvOut.html">WvOut</a>
|
||||
00032 {
|
||||
00033 <span class="keyword">public</span>:
|
||||
00034
|
||||
00036
|
||||
00047 <a class="code" href="classRtWvOut.html#a0">RtWvOut</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1, StkFloat <a class="code" href="classStk.html#e0">sampleRate</a> = <a class="code" href="classStk.html#e0">Stk::sampleRate</a>(), <span class="keywordtype">int</span> device = 0, <span class="keywordtype">int</span> bufferFrames = RT_BUFFER_SIZE, <span class="keywordtype">int</span> nBuffers = 4 );
|
||||
00048
|
||||
00050
|
||||
00053 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a2">start</a>(<span class="keywordtype">void</span>);
|
||||
00054
|
||||
00056
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a3">stop</a>(<span class="keywordtype">void</span>);
|
||||
00060
|
||||
00062 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classRtWvOut.html#a4">getFrames</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>;
|
||||
00050 <a class="code" href="classRtWvOut.html#a1">~RtWvOut</a>();
|
||||
00051
|
||||
00053
|
||||
00056 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a2">start</a>(<span class="keywordtype">void</span>);
|
||||
00057
|
||||
00059
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a3">stop</a>(<span class="keywordtype">void</span>);
|
||||
00063
|
||||
00065 MY_FLOAT <a class="code" href="classRtWvOut.html#a5">getTime</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>;
|
||||
00065 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classRtWvOut.html#a4">getFrames</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>;
|
||||
00066
|
||||
00068
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a6">tick</a>(<span class="keyword">const</span> MY_FLOAT sample);
|
||||
00072
|
||||
00074
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a6">tick</a>(<span class="keyword">const</span> MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00078
|
||||
00080
|
||||
00083 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a8">tickFrame</a>(<span class="keyword">const</span> MY_FLOAT *frameVector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frames = 1);
|
||||
00084
|
||||
00085 <span class="keyword">protected</span>:
|
||||
00086
|
||||
00087 <a class="code" href="classRtAudio.html">RtAudio</a> *audio_;
|
||||
00088 <span class="keywordtype">bool</span> stopped_;
|
||||
00089 <span class="keywordtype">int</span> bufferSize_;
|
||||
00068 StkFloat <a class="code" href="classRtWvOut.html#a5">getTime</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>;
|
||||
00069
|
||||
00071
|
||||
00074 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a6">tick</a>( <span class="keyword">const</span> StkFloat sample );
|
||||
00075
|
||||
00077
|
||||
00080 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a6">tick</a>( <span class="keyword">const</span> StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize );
|
||||
00081
|
||||
00083
|
||||
00089 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a6">tick</a>( <span class="keyword">const</span> <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00090
|
||||
00091 };
|
||||
00092
|
||||
00093 <span class="preprocessor">#endif // defined(__RTWVOUT_H)</span>
|
||||
00095 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a9">tickFrame</a>( <span class="keyword">const</span> StkFloat *frameVector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frames = 1 );
|
||||
00096
|
||||
00098
|
||||
00103 <span class="keywordtype">void</span> <a class="code" href="classRtWvOut.html#a9">tickFrame</a>( <span class="keyword">const</span> <a class="code" href="classStkFrames.html">StkFrames</a>& frames );
|
||||
00104
|
||||
00105 <span class="keyword">protected</span>:
|
||||
00106
|
||||
00107 <a class="code" href="classRtAudio.html">RtAudio</a> *audio_;
|
||||
00108 StkFloat *dataPtr_;
|
||||
00109 <span class="keywordtype">bool</span> stopped_;
|
||||
00110 <span class="keywordtype">int</span> bufferSize_;
|
||||
00111
|
||||
00112 };
|
||||
00113
|
||||
00114 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<h1>SKINI.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00026 <span class="comment">/***************************************************/</span>
|
||||
00027
|
||||
00028 <span class="preprocessor">#if !defined(__SKINI_H)</span>
|
||||
00029 <span class="preprocessor"></span><span class="preprocessor">#define __SKINI_H</span>
|
||||
00030 <span class="preprocessor"></span>
|
||||
00031 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00032 <span class="preprocessor">#include <stdio.h></span>
|
||||
00033
|
||||
<a name="l00034"></a><a class="code" href="classSKINI.html">00034</a> <span class="keyword">class </span><a class="code" href="classSKINI.html">SKINI</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00035 {
|
||||
00036 <span class="keyword">public</span>:
|
||||
00038 <a class="code" href="classSKINI.html#a0">SKINI</a>();
|
||||
00039
|
||||
00041 <a class="code" href="classSKINI.html#a0">SKINI</a>(<span class="keywordtype">char</span> *fileName);
|
||||
00042
|
||||
00044 <a class="code" href="classSKINI.html#a2">~SKINI</a>();
|
||||
00045
|
||||
00047
|
||||
00050 <span class="keywordtype">long</span> <a class="code" href="classSKINI.html#a3">parseThis</a>(<span class="keywordtype">char</span>* aString);
|
||||
00051
|
||||
00053
|
||||
00056 <span class="keywordtype">long</span> <a class="code" href="classSKINI.html#a4">nextMessage</a>();
|
||||
00057
|
||||
00059 <span class="keywordtype">long</span> <a class="code" href="classSKINI.html#a5">getType</a>() <span class="keyword">const</span>;
|
||||
00060
|
||||
00062 <span class="keywordtype">long</span> <a class="code" href="classSKINI.html#a6">getChannel</a>() <span class="keyword">const</span>;
|
||||
00063
|
||||
00065 MY_FLOAT <a class="code" href="classSKINI.html#a7">getDelta</a>() <span class="keyword">const</span>;
|
||||
00066
|
||||
00068 MY_FLOAT <a class="code" href="classSKINI.html#a8">getByteTwo</a>() <span class="keyword">const</span>;
|
||||
00069
|
||||
00071 MY_FLOAT <a class="code" href="classSKINI.html#a9">getByteThree</a>() <span class="keyword">const</span>;
|
||||
00072
|
||||
00074 <span class="keywordtype">long</span> <a class="code" href="classSKINI.html#a10">getByteTwoInt</a>() <span class="keyword">const</span>;
|
||||
00075
|
||||
00077 <span class="keywordtype">long</span> <a class="code" href="classSKINI.html#a11">getByteThreeInt</a>() <span class="keyword">const</span>;
|
||||
00078
|
||||
00080 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classSKINI.html#a12">getRemainderString</a>();
|
||||
00081
|
||||
00083 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classSKINI.html#a13">getMessageTypeString</a>();
|
||||
00084
|
||||
00086 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classSKINI.html#a14">whatsThisType</a>(<span class="keywordtype">long</span> type);
|
||||
00087
|
||||
00089 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classSKINI.html#a15">whatsThisController</a>(<span class="keywordtype">long</span> number);
|
||||
00090
|
||||
00091 <span class="keyword">protected</span>:
|
||||
00092
|
||||
00093 FILE *myFile;
|
||||
00094 <span class="keywordtype">long</span> messageType;
|
||||
00095 <span class="keywordtype">char</span> msgTypeString[64];
|
||||
00096 <span class="keywordtype">long</span> channel;
|
||||
00097 MY_FLOAT deltaTime;
|
||||
00098 MY_FLOAT byteTwo;
|
||||
00099 MY_FLOAT byteThree;
|
||||
00100 <span class="keywordtype">long</span> byteTwoInt;
|
||||
00101 <span class="keywordtype">long</span> byteThreeInt;
|
||||
00102 <span class="keywordtype">char</span> remainderString[1024];
|
||||
00103 <span class="keywordtype">char</span> whatString[1024];
|
||||
00104 };
|
||||
00105
|
||||
00106 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> Midi2Pitch[129] = {
|
||||
00107 8.18,8.66,9.18,9.72,10.30,10.91,11.56,12.25,
|
||||
00108 12.98,13.75,14.57,15.43,16.35,17.32,18.35,19.45,
|
||||
00109 20.60,21.83,23.12,24.50,25.96,27.50,29.14,30.87,
|
||||
00110 32.70,34.65,36.71,38.89,41.20,43.65,46.25,49.00,
|
||||
00111 51.91,55.00,58.27,61.74,65.41,69.30,73.42,77.78,
|
||||
00112 82.41,87.31,92.50,98.00,103.83,110.00,116.54,123.47,
|
||||
00113 130.81,138.59,146.83,155.56,164.81,174.61,185.00,196.00,
|
||||
00114 207.65,220.00,233.08,246.94,261.63,277.18,293.66,311.13,
|
||||
00115 329.63,349.23,369.99,392.00,415.30,440.00,466.16,493.88,
|
||||
00116 523.25,554.37,587.33,622.25,659.26,698.46,739.99,783.99,
|
||||
00117 830.61,880.00,932.33,987.77,1046.50,1108.73,1174.66,1244.51,
|
||||
00118 1318.51,1396.91,1479.98,1567.98,1661.22,1760.00,1864.66,1975.53,
|
||||
00119 2093.00,2217.46,2349.32,2489.02,2637.02,2793.83,2959.96,3135.96,
|
||||
00120 3322.44,3520.00,3729.31,3951.07,4186.01,4434.92,4698.64,4978.03,
|
||||
00121 5274.04,5587.65,5919.91,6271.93,6644.88,7040.00,7458.62,7902.13,
|
||||
00122 8372.02,8869.84,9397.27,9956.06,10548.08,11175.30,11839.82,12543.85,
|
||||
00123 13289.75};
|
||||
00124
|
||||
00125 <span class="preprocessor">#endif</span>
|
||||
00126 <span class="preprocessor"></span>
|
||||
00127
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
147
doc/html/SKINI_8msg-source.html
Normal file
147
doc/html/SKINI_8msg-source.html
Normal file
@@ -0,0 +1,147 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
||||
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>SKINI.msg</h1><div class="fragment"><pre>00001 <span class="comment">/*********************************************************/</span>
|
||||
00002 <span class="comment">/*</span>
|
||||
00003 <span class="comment"> Definition of SKINI Message Types and Special Symbols</span>
|
||||
00004 <span class="comment"> Synthesis toolKit Instrument Network Interface</span>
|
||||
00005 <span class="comment"></span>
|
||||
00006 <span class="comment"> These symbols should have the form:</span>
|
||||
00007 <span class="comment"></span>
|
||||
00008 <span class="comment"> \c __SK_<name>_</span>
|
||||
00009 <span class="comment"></span>
|
||||
00010 <span class="comment"> where <name> is the string used in the SKINI stream.</span>
|
||||
00011 <span class="comment"></span>
|
||||
00012 <span class="comment"> by Perry R. Cook, 1995 - 2004.</span>
|
||||
00013 <span class="comment">*/</span>
|
||||
00014 <span class="comment">/*********************************************************/</span>
|
||||
00015
|
||||
00016 <span class="preprocessor">#define NOPE -32767</span>
|
||||
00017 <span class="preprocessor"></span><span class="preprocessor">#define YEP 1</span>
|
||||
00018 <span class="preprocessor"></span><span class="preprocessor">#define SK_DBL -32766</span>
|
||||
00019 <span class="preprocessor"></span><span class="preprocessor">#define SK_INT -32765</span>
|
||||
00020 <span class="preprocessor"></span><span class="preprocessor">#define SK_STR -32764</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Exit_ 999</span>
|
||||
00022 <span class="preprocessor"></span>
|
||||
00023 <span class="comment">/***** MIDI COMPATIBLE MESSAGES *****/</span>
|
||||
00024 <span class="comment">/*** (Status bytes for channel=0) ***/</span>
|
||||
00025
|
||||
00026 <span class="preprocessor">#define __SK_NoteOff_ 128</span>
|
||||
00027 <span class="preprocessor"></span><span class="preprocessor">#define __SK_NoteOn_ 144</span>
|
||||
00028 <span class="preprocessor"></span><span class="preprocessor">#define __SK_PolyPressure_ 160</span>
|
||||
00029 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ControlChange_ 176</span>
|
||||
00030 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ProgramChange_ 192</span>
|
||||
00031 <span class="preprocessor"></span><span class="preprocessor">#define __SK_AfterTouch_ 208</span>
|
||||
00032 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ChannelPressure_ __SK_AfterTouch_</span>
|
||||
00033 <span class="preprocessor"></span><span class="preprocessor">#define __SK_PitchWheel_ 224</span>
|
||||
00034 <span class="preprocessor"></span><span class="preprocessor">#define __SK_PitchBend_ __SK_PitchWheel_</span>
|
||||
00035 <span class="preprocessor"></span><span class="preprocessor">#define __SK_PitchChange_ 49</span>
|
||||
00036 <span class="preprocessor"></span>
|
||||
00037 <span class="preprocessor">#define __SK_Clock_ 248</span>
|
||||
00038 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SongStart_ 250</span>
|
||||
00039 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Continue_ 251</span>
|
||||
00040 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SongStop_ 252</span>
|
||||
00041 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ActiveSensing_ 254</span>
|
||||
00042 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SystemReset_ 255</span>
|
||||
00043 <span class="preprocessor"></span>
|
||||
00044 <span class="preprocessor">#define __SK_Volume_ 7</span>
|
||||
00045 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ModWheel_ 1</span>
|
||||
00046 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Modulation_ __SK_ModWheel_</span>
|
||||
00047 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Breath_ 2</span>
|
||||
00048 <span class="preprocessor"></span><span class="preprocessor">#define __SK_FootControl_ 4</span>
|
||||
00049 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Portamento_ 65</span>
|
||||
00050 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Balance_ 8</span>
|
||||
00051 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Pan_ 10</span>
|
||||
00052 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Sustain_ 64</span>
|
||||
00053 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Damper_ __SK_Sustain_</span>
|
||||
00054 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Expression_ 11 </span>
|
||||
00055 <span class="preprocessor"></span>
|
||||
00056 <span class="preprocessor">#define __SK_AfterTouch_Cont_ 128</span>
|
||||
00057 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ModFrequency_ __SK_Expression_</span>
|
||||
00058 <span class="preprocessor"></span>
|
||||
00059 <span class="preprocessor">#define __SK_ProphesyRibbon_ 16</span>
|
||||
00060 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ProphesyWheelUp_ 2</span>
|
||||
00061 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ProphesyWheelDown_ 3</span>
|
||||
00062 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ProphesyPedal_ 18</span>
|
||||
00063 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ProphesyKnob1_ 21</span>
|
||||
00064 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ProphesyKnob2_ 22</span>
|
||||
00065 <span class="preprocessor"></span>
|
||||
00066 <span class="comment">/*** Instrument Family Specific ***/</span>
|
||||
00067
|
||||
00068 <span class="preprocessor">#define __SK_NoiseLevel_ __SK_FootControl_</span>
|
||||
00069 <span class="preprocessor"></span>
|
||||
00070 <span class="preprocessor">#define __SK_PickPosition_ __SK_FootControl_</span>
|
||||
00071 <span class="preprocessor"></span><span class="preprocessor">#define __SK_StringDamping_ __SK_Expression_</span>
|
||||
00072 <span class="preprocessor"></span><span class="preprocessor">#define __SK_StringDetune_ __SK_ModWheel_</span>
|
||||
00073 <span class="preprocessor"></span><span class="preprocessor">#define __SK_BodySize_ __SK_Breath_</span>
|
||||
00074 <span class="preprocessor"></span><span class="preprocessor">#define __SK_BowPressure_ __SK_Breath_</span>
|
||||
00075 <span class="preprocessor"></span><span class="preprocessor">#define __SK_BowPosition_ __SK_PickPosition_</span>
|
||||
00076 <span class="preprocessor"></span><span class="preprocessor">#define __SK_BowBeta_ __SK_BowPosition_</span>
|
||||
00077 <span class="preprocessor"></span>
|
||||
00078 <span class="preprocessor">#define __SK_ReedStiffness_ __SK_Breath_</span>
|
||||
00079 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ReedRestPos_ __SK_FootControl_</span>
|
||||
00080 <span class="preprocessor"></span>
|
||||
00081 <span class="preprocessor">#define __SK_FluteEmbouchure_ __SK_Breath_</span>
|
||||
00082 <span class="preprocessor"></span><span class="preprocessor">#define __SK_JetDelay_ __SK_FluteEmbouchure_</span>
|
||||
00083 <span class="preprocessor"></span>
|
||||
00084 <span class="preprocessor">#define __SK_LipTension_ __SK_Breath_</span>
|
||||
00085 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SlideLength_ __SK_FootControl_</span>
|
||||
00086 <span class="preprocessor"></span>
|
||||
00087 <span class="preprocessor">#define __SK_StrikePosition_ __SK_PickPosition_</span>
|
||||
00088 <span class="preprocessor"></span><span class="preprocessor">#define __SK_StickHardness_ __SK_Breath_</span>
|
||||
00089 <span class="preprocessor"></span>
|
||||
00090 <span class="preprocessor">#define __SK_TrillDepth_ 1051</span>
|
||||
00091 <span class="preprocessor"></span><span class="preprocessor">#define __SK_TrillSpeed_ 1052</span>
|
||||
00092 <span class="preprocessor"></span><span class="preprocessor">#define __SK_StrumSpeed_ __SK_TrillSpeed_</span>
|
||||
00093 <span class="preprocessor"></span><span class="preprocessor">#define __SK_RollSpeed_ __SK_TrillSpeed_</span>
|
||||
00094 <span class="preprocessor"></span>
|
||||
00095 <span class="preprocessor">#define __SK_FilterQ_ __SK_Breath_</span>
|
||||
00096 <span class="preprocessor"></span><span class="preprocessor">#define __SK_FilterFreq_ 1062</span>
|
||||
00097 <span class="preprocessor"></span><span class="preprocessor">#define __SK_FilterSweepRate_ __SK_FootControl_</span>
|
||||
00098 <span class="preprocessor"></span>
|
||||
00099 <span class="preprocessor">#define __SK_ShakerInst_ 1071 </span>
|
||||
00100 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ShakerEnergy_ __SK_Breath_</span>
|
||||
00101 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ShakerDamping_ __SK_ModFrequency_</span>
|
||||
00102 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ShakerNumObjects_ __SK_FootControl_</span>
|
||||
00103 <span class="preprocessor"></span>
|
||||
00104 <span class="preprocessor">#define __SK_Strumming_ 1090</span>
|
||||
00105 <span class="preprocessor"></span><span class="preprocessor">#define __SK_NotStrumming_ 1091</span>
|
||||
00106 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Trilling_ 1092</span>
|
||||
00107 <span class="preprocessor"></span><span class="preprocessor">#define __SK_NotTrilling_ 1093</span>
|
||||
00108 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Rolling_ __SK_Strumming_</span>
|
||||
00109 <span class="preprocessor"></span><span class="preprocessor">#define __SK_NotRolling_ __SK_NotStrumming_</span>
|
||||
00110 <span class="preprocessor"></span>
|
||||
00111 <span class="preprocessor">#define __SK_PlayerSkill_ 2001</span>
|
||||
00112 <span class="preprocessor"></span><span class="preprocessor">#define __SK_Chord_ 2002</span>
|
||||
00113 <span class="preprocessor"></span><span class="preprocessor">#define __SK_ChordOff_ 2003</span>
|
||||
00114 <span class="preprocessor"></span>
|
||||
00115 <span class="preprocessor">#define __SK_SINGER_FilePath_ 3000</span>
|
||||
00116 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_Frequency_ 3001</span>
|
||||
00117 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_NoteName_ 3002</span>
|
||||
00118 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_Shape_ 3003</span>
|
||||
00119 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_Glot_ 3004</span>
|
||||
00120 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_VoicedUnVoiced_ 3005</span>
|
||||
00121 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_Synthesize_ 3006</span>
|
||||
00122 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_Silence_ 3007</span>
|
||||
00123 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_VibratoAmt_ __SK_ModWheel_</span>
|
||||
00124 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_RndVibAmt_ 3008</span>
|
||||
00125 <span class="preprocessor"></span><span class="preprocessor">#define __SK_SINGER_VibFreq_ __SK_Expression_</span>
|
||||
00126 <span class="preprocessor"></span>
|
||||
00127
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Sampler.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00010 <span class="comment">/***************************************************/</span>
|
||||
00011
|
||||
00012 <span class="preprocessor">#if !defined(__SAMPLER_H)</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define __SAMPLER_H</span>
|
||||
00012 <span class="preprocessor">#ifndef STK_SAMPLER_H</span>
|
||||
00013 <span class="preprocessor"></span><span class="preprocessor">#define STK_SAMPLER_H</span>
|
||||
00014 <span class="preprocessor"></span>
|
||||
00015 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00016 <span class="preprocessor">#include "ADSR.h"</span>
|
||||
@@ -30,37 +30,41 @@
|
||||
00029
|
||||
00031 <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a2">clear</a>();
|
||||
00032
|
||||
00034 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a3">setFrequency</a>(MY_FLOAT frequency) = 0;
|
||||
00034 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a3">setFrequency</a>(StkFloat frequency) = 0;
|
||||
00035
|
||||
00037 <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a4">keyOn</a>();
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a5">keyOff</a>();
|
||||
00041
|
||||
00043 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a6">noteOff</a>(MY_FLOAT amplitude);
|
||||
00043 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a6">noteOff</a>(StkFloat amplitude);
|
||||
00044
|
||||
00046 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classSampler.html#a7">tick</a>();
|
||||
00046 <span class="keyword">virtual</span> StkFloat <a class="code" href="classSampler.html#a7">tick</a>() = 0;
|
||||
00047
|
||||
00049 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a8">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value) = 0;
|
||||
00049 <span class="keyword">virtual</span> StkFloat *<a class="code" href="classSampler.html#a7">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize) = 0;
|
||||
00050
|
||||
00051 <span class="keyword">protected</span>:
|
||||
00052 <a class="code" href="classADSR.html">ADSR</a> *adsr;
|
||||
00053 <a class="code" href="classWvIn.html">WvIn</a> *attacks[5];
|
||||
00054 <a class="code" href="classWaveLoop.html">WaveLoop</a> *loops[5];
|
||||
00055 <a class="code" href="classOnePole.html">OnePole</a> *filter;
|
||||
00056 MY_FLOAT baseFrequency;
|
||||
00057 MY_FLOAT attackRatios[5];
|
||||
00058 MY_FLOAT loopRatios[5];
|
||||
00059 MY_FLOAT attackGain;
|
||||
00060 MY_FLOAT loopGain;
|
||||
00061 <span class="keywordtype">int</span> whichOne;
|
||||
00052
|
||||
00058 <span class="keyword">virtual</span> <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classSampler.html#a7">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 ) = 0;
|
||||
00059
|
||||
00061 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSampler.html#a10">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value) = 0;
|
||||
00062
|
||||
00063 };
|
||||
00064
|
||||
00065 <span class="preprocessor">#endif</span>
|
||||
00063 <span class="keyword">protected</span>:
|
||||
00064 <a class="code" href="classADSR.html">ADSR</a> adsr_;
|
||||
00065 std::vector<WvIn *> attacks_;
|
||||
00066 std::vector<WaveLoop *> loops_;
|
||||
00067 <a class="code" href="classOnePole.html">OnePole</a> filter_;
|
||||
00068 StkFloat baseFrequency_;
|
||||
00069 std::vector<StkFloat> attackRatios_;
|
||||
00070 std::vector<StkFloat> loopRatios_;
|
||||
00071 StkFloat attackGain_;
|
||||
00072 StkFloat loopGain_;
|
||||
00073
|
||||
00074 };
|
||||
00075
|
||||
00076 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Saxofony.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00036 <span class="comment">/***************************************************/</span>
|
||||
00037
|
||||
00038 <span class="preprocessor">#if !defined(__SAXOFONY_H)</span>
|
||||
00039 <span class="preprocessor"></span><span class="preprocessor">#define __SAXOFONY_H</span>
|
||||
00038 <span class="preprocessor">#ifndef STK_SAXOFONY_H</span>
|
||||
00039 <span class="preprocessor"></span><span class="preprocessor">#define STK_SAXOFONY_H</span>
|
||||
00040 <span class="preprocessor"></span>
|
||||
00041 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00042 <span class="preprocessor">#include "DelayL.h"</span>
|
||||
00043 <span class="preprocessor">#include "ReedTabl.h"</span>
|
||||
00043 <span class="preprocessor">#include "ReedTable.h"</span>
|
||||
00044 <span class="preprocessor">#include "OneZero.h"</span>
|
||||
00045 <span class="preprocessor">#include "Envelope.h"</span>
|
||||
00046 <span class="preprocessor">#include "Noise.h"</span>
|
||||
@@ -26,48 +26,54 @@
|
||||
<a name="l00049"></a><a class="code" href="classSaxofony.html">00049</a> <span class="keyword">class </span><a class="code" href="classSaxofony.html">Saxofony</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00050 {
|
||||
00051 <span class="keyword">public</span>:
|
||||
00053 <a class="code" href="classSaxofony.html#a0">Saxofony</a>(MY_FLOAT lowestFrequency);
|
||||
00054
|
||||
00056 <a class="code" href="classSaxofony.html#a1">~Saxofony</a>();
|
||||
00053
|
||||
00056 <a class="code" href="classSaxofony.html#a0">Saxofony</a>(StkFloat lowestFrequency);
|
||||
00057
|
||||
00059 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a2">clear</a>();
|
||||
00059 <a class="code" href="classSaxofony.html#a1">~Saxofony</a>();
|
||||
00060
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00062 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a2">clear</a>();
|
||||
00063
|
||||
00065 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a4">setBlowPosition</a>(MY_FLOAT aPosition);
|
||||
00065 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00066
|
||||
00068 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a5">startBlowing</a>(MY_FLOAT amplitude, MY_FLOAT rate);
|
||||
00068 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a4">setBlowPosition</a>(StkFloat aPosition);
|
||||
00069
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a6">stopBlowing</a>(MY_FLOAT rate);
|
||||
00071 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a5">startBlowing</a>(StkFloat amplitude, StkFloat rate);
|
||||
00072
|
||||
00074 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a7">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00074 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a6">stopBlowing</a>(StkFloat rate);
|
||||
00075
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a8">noteOff</a>(MY_FLOAT amplitude);
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a7">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00078
|
||||
00080 MY_FLOAT <a class="code" href="classSaxofony.html#a9">tick</a>();
|
||||
00080 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a8">noteOff</a>(StkFloat amplitude);
|
||||
00081
|
||||
00083 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a10">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00083 StkFloat <a class="code" href="classSaxofony.html#a9">tick</a>();
|
||||
00084
|
||||
00085 <span class="keyword">protected</span>:
|
||||
00086 <a class="code" href="classDelayL.html">DelayL</a> *delays[2];
|
||||
00087 <a class="code" href="classReedTabl.html">ReedTabl</a> *reedTable;
|
||||
00088 <a class="code" href="classOneZero.html">OneZero</a> *filter;
|
||||
00089 <a class="code" href="classEnvelope.html">Envelope</a> *envelope;
|
||||
00090 <a class="code" href="classNoise.html">Noise</a> *noise;
|
||||
00091 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato;
|
||||
00092 <span class="keywordtype">long</span> length;
|
||||
00093 MY_FLOAT outputGain;
|
||||
00094 MY_FLOAT noiseGain;
|
||||
00095 MY_FLOAT vibratoGain;
|
||||
00096 MY_FLOAT position;
|
||||
00097
|
||||
00098 };
|
||||
00086 StkFloat *<a class="code" href="classSaxofony.html#a9">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00087
|
||||
00089
|
||||
00095 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classSaxofony.html#a9">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00096
|
||||
00098 <span class="keywordtype">void</span> <a class="code" href="classSaxofony.html#a12">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00099
|
||||
00100 <span class="preprocessor">#endif</span>
|
||||
00100 <span class="keyword">protected</span>:
|
||||
00101 <a class="code" href="classDelayL.html">DelayL</a> delays_[2];
|
||||
00102 <a class="code" href="classReedTable.html">ReedTable</a> reedTable_;
|
||||
00103 <a class="code" href="classOneZero.html">OneZero</a> filter_;
|
||||
00104 <a class="code" href="classEnvelope.html">Envelope</a> envelope_;
|
||||
00105 <a class="code" href="classNoise.html">Noise</a> noise_;
|
||||
00106 <a class="code" href="classWaveLoop.html">WaveLoop</a> *vibrato_;
|
||||
00107 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> length_;
|
||||
00108 StkFloat outputGain_;
|
||||
00109 StkFloat noiseGain_;
|
||||
00110 StkFloat vibratoGain_;
|
||||
00111 StkFloat position_;
|
||||
00112
|
||||
00113 };
|
||||
00114
|
||||
00115 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Shakers.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00053 <span class="comment">/***************************************************/</span>
|
||||
00054
|
||||
00055 <span class="preprocessor">#if !defined(__SHAKERS_H)</span>
|
||||
00056 <span class="preprocessor"></span><span class="preprocessor">#define __SHAKERS_H</span>
|
||||
00055 <span class="preprocessor">#ifndef STK_SHAKERS_H</span>
|
||||
00056 <span class="preprocessor"></span><span class="preprocessor">#define STK_SHAKERS_H</span>
|
||||
00057 <span class="preprocessor"></span>
|
||||
00058 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00059
|
||||
00060 <span class="preprocessor">#define MAX_FREQS 8</span>
|
||||
00061 <span class="preprocessor"></span><span class="preprocessor">#define NUM_INSTR 24</span>
|
||||
00062 <span class="preprocessor"></span>
|
||||
00060 <span class="keyword">const</span> <span class="keywordtype">int</span> MAX_FREQS = 8;
|
||||
00061 <span class="keyword">const</span> <span class="keywordtype">int</span> NUM_INSTR = 24;
|
||||
00062
|
||||
<a name="l00063"></a><a class="code" href="classShakers.html">00063</a> <span class="keyword">class </span><a class="code" href="classShakers.html">Shakers</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00064 {
|
||||
00065 <span class="keyword">public</span>:
|
||||
@@ -28,59 +28,63 @@
|
||||
00070 <a class="code" href="classShakers.html#a1">~Shakers</a>();
|
||||
00071
|
||||
00073
|
||||
00077 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a2">noteOn</a>(MY_FLOAT instrument, MY_FLOAT amplitude);
|
||||
00077 <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a2">noteOn</a>(StkFloat instrument, StkFloat amplitude);
|
||||
00078
|
||||
00080 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a3">noteOff</a>(MY_FLOAT amplitude);
|
||||
00080 <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a3">noteOff</a>(StkFloat amplitude);
|
||||
00081
|
||||
00083 MY_FLOAT <a class="code" href="classShakers.html#a4">tick</a>();
|
||||
00083 StkFloat <a class="code" href="classShakers.html#a4">tick</a>();
|
||||
00084
|
||||
00086 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a5">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00086 StkFloat *<a class="code" href="classShakers.html#a4">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00087
|
||||
00088 <span class="keyword">protected</span>:
|
||||
00089
|
||||
00090 <span class="keywordtype">int</span> setupName(<span class="keywordtype">char</span>* instr);
|
||||
00091 <span class="keywordtype">int</span> setupNum(<span class="keywordtype">int</span> inst);
|
||||
00092 <span class="keywordtype">int</span> setFreqAndReson(<span class="keywordtype">int</span> which, MY_FLOAT freq, MY_FLOAT reson);
|
||||
00093 <span class="keywordtype">void</span> setDecays(MY_FLOAT sndDecay, MY_FLOAT sysDecay);
|
||||
00094 <span class="keywordtype">void</span> setFinalZs(MY_FLOAT z0, MY_FLOAT z1, MY_FLOAT z2);
|
||||
00095 MY_FLOAT wuter_tick();
|
||||
00096 MY_FLOAT tbamb_tick();
|
||||
00097 MY_FLOAT ratchet_tick();
|
||||
00098
|
||||
00099 <span class="keywordtype">int</span> instType;
|
||||
00100 <span class="keywordtype">int</span> ratchetPos, lastRatchetPos;
|
||||
00101 MY_FLOAT shakeEnergy;
|
||||
00102 MY_FLOAT inputs[MAX_FREQS];
|
||||
00103 MY_FLOAT outputs[MAX_FREQS][2];
|
||||
00104 MY_FLOAT coeffs[MAX_FREQS][2];
|
||||
00105 MY_FLOAT sndLevel;
|
||||
00106 MY_FLOAT baseGain;
|
||||
00107 MY_FLOAT gains[MAX_FREQS];
|
||||
00108 <span class="keywordtype">int</span> nFreqs;
|
||||
00109 MY_FLOAT t_center_freqs[MAX_FREQS];
|
||||
00110 MY_FLOAT center_freqs[MAX_FREQS];
|
||||
00111 MY_FLOAT resons[MAX_FREQS];
|
||||
00112 MY_FLOAT freq_rand[MAX_FREQS];
|
||||
00113 <span class="keywordtype">int</span> freqalloc[MAX_FREQS];
|
||||
00114 MY_FLOAT soundDecay;
|
||||
00115 MY_FLOAT systemDecay;
|
||||
00116 MY_FLOAT nObjects;
|
||||
00117 MY_FLOAT collLikely;
|
||||
00118 MY_FLOAT totalEnergy;
|
||||
00119 MY_FLOAT ratchet,ratchetDelta;
|
||||
00120 MY_FLOAT finalZ[3];
|
||||
00121 MY_FLOAT finalZCoeffs[3];
|
||||
00122 MY_FLOAT defObjs[NUM_INSTR];
|
||||
00123 MY_FLOAT defDecays[NUM_INSTR];
|
||||
00124 MY_FLOAT decayScale[NUM_INSTR];
|
||||
00125
|
||||
00126 };
|
||||
00127
|
||||
00128 <span class="preprocessor">#endif</span>
|
||||
00095 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classShakers.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00096
|
||||
00098 <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a7">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00099
|
||||
00100 <span class="keyword">protected</span>:
|
||||
00101
|
||||
00102 <span class="keywordtype">int</span> setupName(<span class="keywordtype">char</span>* instr);
|
||||
00103 <span class="keywordtype">int</span> setupNum(<span class="keywordtype">int</span> inst);
|
||||
00104 <span class="keywordtype">int</span> setFreqAndReson(<span class="keywordtype">int</span> which, StkFloat freq, StkFloat reson);
|
||||
00105 <span class="keywordtype">void</span> setDecays(StkFloat sndDecay, StkFloat sysDecay);
|
||||
00106 <span class="keywordtype">void</span> setFinalZs(StkFloat z0, StkFloat z1, StkFloat z2);
|
||||
00107 StkFloat wuter_tick();
|
||||
00108 StkFloat tbamb_tick();
|
||||
00109 StkFloat ratchet_tick();
|
||||
00110
|
||||
00111 <span class="keywordtype">int</span> instType_;
|
||||
00112 <span class="keywordtype">int</span> ratchetPos_, lastRatchetPos_;
|
||||
00113 StkFloat shakeEnergy_;
|
||||
00114 StkFloat inputs_[MAX_FREQS];
|
||||
00115 StkFloat outputs_[MAX_FREQS][2];
|
||||
00116 StkFloat coeffs_[MAX_FREQS][2];
|
||||
00117 StkFloat sndLevel_;
|
||||
00118 StkFloat baseGain_;
|
||||
00119 StkFloat gains_[MAX_FREQS];
|
||||
00120 <span class="keywordtype">int</span> nFreqs_;
|
||||
00121 StkFloat t_center_freqs_[MAX_FREQS];
|
||||
00122 StkFloat center_freqs_[MAX_FREQS];
|
||||
00123 StkFloat resons_[MAX_FREQS];
|
||||
00124 StkFloat freq_rand_[MAX_FREQS];
|
||||
00125 <span class="keywordtype">int</span> freqalloc_[MAX_FREQS];
|
||||
00126 StkFloat soundDecay_;
|
||||
00127 StkFloat systemDecay_;
|
||||
00128 StkFloat nObjects_;
|
||||
00129 StkFloat totalEnergy_;
|
||||
00130 StkFloat ratchet_, ratchetDelta_;
|
||||
00131 StkFloat finalZ_[3];
|
||||
00132 StkFloat finalZCoeffs_[3];
|
||||
00133 StkFloat defObjs_[NUM_INSTR];
|
||||
00134 StkFloat defDecays_[NUM_INSTR];
|
||||
00135 StkFloat decayScale_[NUM_INSTR];
|
||||
00136
|
||||
00137 };
|
||||
00138
|
||||
00139 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>Simple.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00018 <span class="comment">/***************************************************/</span>
|
||||
00019
|
||||
00020 <span class="preprocessor">#if !defined(__SIMPLE_H)</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define __SIMPLE_H</span>
|
||||
00020 <span class="preprocessor">#ifndef STK_SIMPLE_H</span>
|
||||
00021 <span class="preprocessor"></span><span class="preprocessor">#define STK_SIMPLE_H</span>
|
||||
00022 <span class="preprocessor"></span>
|
||||
00023 <span class="preprocessor">#include "Instrmnt.h"</span>
|
||||
00024 <span class="preprocessor">#include "ADSR.h"</span>
|
||||
@@ -25,42 +25,48 @@
|
||||
<a name="l00030"></a><a class="code" href="classSimple.html">00030</a> <span class="keyword">class </span><a class="code" href="classSimple.html">Simple</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
||||
00031 {
|
||||
00032 <span class="keyword">public</span>:
|
||||
00034 <a class="code" href="classSimple.html#a0">Simple</a>();
|
||||
00035
|
||||
00037 <span class="keyword">virtual</span> <a class="code" href="classSimple.html#a1">~Simple</a>();
|
||||
00034
|
||||
00037 <a class="code" href="classSimple.html#a0">Simple</a>();
|
||||
00038
|
||||
00040 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a2">clear</a>();
|
||||
00040 <a class="code" href="classSimple.html#a1">~Simple</a>();
|
||||
00041
|
||||
00043 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a3">setFrequency</a>(MY_FLOAT frequency);
|
||||
00043 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a2">clear</a>();
|
||||
00044
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a4">keyOn</a>();
|
||||
00046 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a3">setFrequency</a>(StkFloat frequency);
|
||||
00047
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a5">keyOff</a>();
|
||||
00049 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a4">keyOn</a>();
|
||||
00050
|
||||
00052 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a6">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
||||
00052 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a5">keyOff</a>();
|
||||
00053
|
||||
00055 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a7">noteOff</a>(MY_FLOAT amplitude);
|
||||
00055 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a6">noteOn</a>(StkFloat frequency, StkFloat amplitude);
|
||||
00056
|
||||
00058 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classSimple.html#a8">tick</a>();
|
||||
00058 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a7">noteOff</a>(StkFloat amplitude);
|
||||
00059
|
||||
00061 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a9">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
||||
00061 StkFloat <a class="code" href="classSimple.html#a8">tick</a>();
|
||||
00062
|
||||
00063 <span class="keyword">protected</span>:
|
||||
00064 <a class="code" href="classADSR.html">ADSR</a> *adsr;
|
||||
00065 <a class="code" href="classWaveLoop.html">WaveLoop</a> *loop;
|
||||
00066 <a class="code" href="classOnePole.html">OnePole</a> *filter;
|
||||
00067 <a class="code" href="classBiQuad.html">BiQuad</a> *biquad;
|
||||
00068 <a class="code" href="classNoise.html">Noise</a> *noise;
|
||||
00069 MY_FLOAT baseFrequency;
|
||||
00070 MY_FLOAT loopGain;
|
||||
00071
|
||||
00072 };
|
||||
00073
|
||||
00074 <span class="preprocessor">#endif</span>
|
||||
00064 StkFloat *<a class="code" href="classSimple.html#a8">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00065
|
||||
00067
|
||||
00073 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classSimple.html#a8">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
||||
00074
|
||||
00076 <span class="keywordtype">void</span> <a class="code" href="classSimple.html#a11">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
||||
00077
|
||||
00078 <span class="keyword">protected</span>:
|
||||
00079 <a class="code" href="classADSR.html">ADSR</a> adsr_;
|
||||
00080 <a class="code" href="classWaveLoop.html">WaveLoop</a> *loop_;
|
||||
00081 <a class="code" href="classOnePole.html">OnePole</a> filter_;
|
||||
00082 <a class="code" href="classBiQuad.html">BiQuad</a> biquad_;
|
||||
00083 <a class="code" href="classNoise.html">Noise</a> noise_;
|
||||
00084 StkFloat baseFrequency_;
|
||||
00085 StkFloat loopGain_;
|
||||
00086
|
||||
00087 };
|
||||
00088
|
||||
00089 <span class="preprocessor">#endif</span>
|
||||
</pre></div><HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user