85 Commits

Author SHA1 Message Date
Gary Scavone
f3ce5f4d04 Version fix in doxygen download file. 2021-11-17 21:08:39 -05:00
garyscavone
d4750edc66 Merge pull request #118 from swang251/CMake-Support
CMake support
2021-11-17 21:02:51 -05:00
Gary Scavone
6a6a9cdfbe Updated asio SDK files. 2021-11-17 21:00:06 -05:00
Stephen Sinclair
dec667bab5 Add C++11 requirement autoconf check. 2021-11-17 20:21:52 +01:00
Gary Scavone
1fd900263b New versions of RtAudio and RtMidi in preparation for new release. 2021-11-16 21:28:04 -05:00
Gary Scavone
67d573b169 Version and date updates in preparation for new release. 2021-11-16 21:26:00 -05:00
garyscavone
500d2972f9 Merge pull request #99 from ryandesign/install_name
Set the install_name for the macOS dylib
2021-11-16 12:48:43 -05:00
CAML-Song
ee7a1a31f8 fix the ALSA compile flag 2021-10-23 13:14:01 -04:00
CAML-Song
feb123c9b8 support jack on Linux 2021-10-23 13:13:37 -04:00
swang251-MB
509c6cf9e9 shared library support 2021-10-22 23:25:09 -04:00
swang251-MB
e5454b85c7 preliminary Jack support 2021-10-22 23:24:12 -04:00
swang251
f0a22c463d support DS and WASAPI 2021-09-18 23:53:46 -04:00
swang251-MB
ba6ea9f5db a bit format changes 2021-09-18 14:30:13 -04:00
swang251-MB
f00e38611c include add_subdirectory for STK projects 2021-09-18 13:52:26 -04:00
swang251-MB
367893bf50 [FindCoreAudio.cmake] Updated 2021-09-17 21:52:08 -04:00
swang251-MB
a6266131cb preliminary CMakeLists.txt 2021-08-24 23:27:14 -04:00
garyscavone
1fec6e0157 Merge pull request #115 from vuki/lps
Fix out-of-bounds read in LentPitShift
2021-04-23 15:19:45 -04:00
Grzegorz Szwoch (sound)
d308c8aeb7 Fix out-of-bounds read in LenPitShift 2021-04-22 11:47:58 +02:00
garyscavone
deddcbaa3e Merge pull request #114 from bydariogamer/patch-1
Update INSTALL.md
2021-03-29 10:18:04 -04:00
bydariogamer
76127ffc6c Update INSTALL.md 2021-03-25 16:14:23 +01:00
garyscavone
d77b093a9d Merge pull request #113 from vuki/modframes
Allow deriving classes from StkFrames
2021-03-24 09:39:35 -04:00
Grzegorz Szwoch (sound)
c7d37545d3 Allow deriving classes from StkFrames 2021-03-23 15:20:16 +01:00
Gary Scavone
15a1359671 Removal of external data ptr functionality in StkFrames, as revert merge did not work. 2021-03-19 13:40:45 -04:00
garyscavone
51f9676229 Merge pull request #112 from thestk/revert-110-master
Revert "Fix for #108"
2021-03-19 13:31:08 -04:00
garyscavone
7840967816 Revert "Fix for #108" 2021-03-19 13:30:25 -04:00
Gary Scavone
8132c90515 Added throw() to ~StkError declaration to support all C++ versions. 2021-03-18 15:09:01 -04:00
garyscavone
73004ac9c4 Merge pull request #110 from vuki/master
Fix for #108
2021-03-18 14:44:50 -04:00
garyscavone
a49f6e71e7 Merge pull request #109 from vuki/makefix
Add missing TapDelay to src/Makefile
2021-03-18 14:42:37 -04:00
Grzegorz Szwoch (sound)
926a9faca7 Fix for #108 2021-03-18 19:42:26 +01:00
Grzegorz Szwoch (sound)
34192d9a63 Fix for #108 2021-03-18 19:39:41 +01:00
Grzegorz Szwoch (sound)
fb2b0aa305 Add missing TapDelay to src/Makefile 2021-03-18 19:11:33 +01:00
garyscavone
ba967ff851 Merge pull request #108 from vuki/wrappointer
Add StkFrames constructor that wraps pointer to existing buffer
2021-03-18 11:47:11 -04:00
Grzegorz Szwoch (sound)
109f0bd9a8 Add StkFrames constructor that wraps pointer to existing buffer 2021-03-08 09:26:15 +01:00
Gary Scavone
7b94384705 Doxygen fix for underscores 2021-03-05 14:47:44 -05:00
garyscavone
b379160f2b Merge pull request #107 from vuki/operators
StkFrames: add * and *= operators for multiplication by StkFloat; ret…
2021-02-25 20:39:46 -05:00
Grzegorz Szwoch (sound)
4b5b142531 StkFrames: add * and *= operators for multiplication by StkFloat; return reference from += and *- operators 2021-02-25 13:17:58 +01:00
garyscavone
f1a75a8691 Merge pull request #106 from vuki/stkerror
Make StkError inherit from std::exception
2021-02-24 09:18:15 -05:00
Grzegorz Szwoch (sound)
e5cab23433 Make StkError inherit from std::exception 2021-02-24 11:13:47 +01:00
garyscavone
5a8b2234c7 Merge pull request #105 from vuki/master
Fix infinite loop in RtWvOut destructor
2021-02-23 17:22:56 -05:00
Grzegorz Szwoch (sound)
314835cc70 Fix infinite loop in RtWvOut destructor 2021-02-23 21:19:36 +01:00
Ryan Schmidt
700ff2c459 Set the install_name for the macOS dylib
Just like on Linux where one sets a shared library's soname, one should
set a macOS dylib's install_name, but unlike on Linux, on macOS the
install_name should be the absolute path where the library will be
installed.

Fixes #40
2020-05-08 23:10:14 -05:00
garyscavone
fb15f76d45 Merge pull request #97 from ryandesign/autoconf-vars
Support exec_prefix, bindir, includedir, libdir
2020-05-08 12:37:06 -04:00
garyscavone
921493d4fe Merge pull request #96 from ryandesign/LDFLAGS
Use any LDFLAGS set when running ./configure
2020-05-08 12:35:47 -04:00
Ryan Schmidt
4cbdd0d3dc Support exec_prefix, bindir, includedir, libdir
Autoconf configure scripts allow the user to specify alternate
directories for exec_prefix, bindir, includedir, and libdir (see
./configure --help). Now, they are honored by the Makefile.
2020-05-06 13:33:45 -05:00
Ryan Schmidt
c97f5b4b3a Use any LDFLAGS set when running ./configure 2020-05-06 12:47:50 -05:00
garyscavone
809cb26e12 Merge pull request #95 from thestk/cocoapods-update
Update iOS demo project
2020-04-12 11:12:00 -04:00
Ariel Elkin
dbe725c40d update readme 2020-04-12 15:33:04 +01:00
Ariel Elkin
f47fde31b0 update iOS Demos 2020-04-12 15:21:48 +01:00
Ariel Elkin
5ec15d2043 updated podspec for release 4.6.1 2020-04-12 11:32:38 +01:00
Stephen Sinclair
33baf69d3e Envelope.cpp: include cmath for fabs 2020-03-31 13:44:38 +02:00
Stephen Sinclair
975c9a365f Add configure cases to select OSS for netbsd and freebsd. 2020-03-31 13:40:43 +02:00
aarón montoya-moraga
00ddf89798 fix subtitle format in README.md 2020-03-31 13:38:45 +02:00
Gary Scavone
a8b6affd8c New default argument to keyOn and keyOff in Envelope, fix in setTime function, updates to Guitar string coupling, EGuitar tcl interface, reordering of operations in Flute algorithm. 2020-03-15 16:45:30 -04:00
garyscavone
444dab21fd Merge pull request #93 from alxarsenault/master
Fix setRandomFactor range error in Granulate.
2020-03-09 10:50:59 -04:00
Alexandre Arsenault
7fc638ce32 Fix setRandomFactor range error in Granulate. 2020-03-09 10:28:44 -04:00
Gary Scavone
f489451660 Final doc updates before release 4.6.1. 2019-04-18 09:27:12 -04:00
Gary Scavone
b6143915a9 Updated RtAudio/RtMidi for new release, plus additional documentation updates. 2019-04-18 09:18:19 -04:00
Gary Scavone
38970124ec Documentation updates in advance of release 4.6.1 2019-04-18 08:56:31 -04:00
Gary Scavone
ae2bac1601 Added new Recorder class, fixed bug in StifKarp. 2019-04-16 11:04:41 -04:00
Gary Scavone
8de7543266 Update to Modulate to allow noise rate control. 2019-02-05 20:34:18 -05:00
Stephen Sinclair
f8550110d6 VS2017: rename demo.exe -> stk-demo.exe 2018-12-21 12:28:09 +01:00
cepthomas
e4d373b658 Updated docs for windows. Still could use some re-org but would need to consider all platforms.
Fixed a few links. Still lots more broken.
2018-11-13 12:28:23 -06:00
cepthomas
2fffa79174 Added template to create new VS2017 applications easily. 2018-11-13 11:52:08 -06:00
cepthomas
448c12b0f4 Updated all solution and project files to VS2017. 2018-11-12 16:15:48 -06:00
cepthomas
f88fc8690b stk issue 87: Updated demo project to VS2017. Removed old project build files. Updated doc. 2018-11-08 10:00:33 -06:00
garyscavone
0591733bd7 Merge pull request #83 from ryandesign/CocoaPods
Use intercaps for CocoaPods and use https for web site
2018-08-27 17:39:13 -04:00
garyscavone
7fe70c4223 Merge pull request #82 from ryandesign/API-name-typos
Fix API names
2018-08-27 17:38:53 -04:00
garyscavone
3d455a4644 Merge pull request #81 from ryandesign/lowercase-extension
Rename "README.MD" to "README.md"
2018-08-27 17:36:35 -04:00
garyscavone
db79599c01 Merge pull request #84 from ryandesign/eg
Fix spelling of "e.g."
2018-08-27 17:36:11 -04:00
garyscavone
7f06bf46f3 Merge pull request #85 from ryandesign/tcl-tk-xcode
Fix capitalization of Tcl, Tk, and Xcode
2018-08-27 17:34:20 -04:00
Ryan Schmidt
03b4299af4 Change "tcl" to "Tcl" 2018-08-25 22:21:18 -05:00
Ryan Schmidt
c531f68a56 Change "tcl/tk" to "Tcl/Tk" 2018-08-25 22:20:12 -05:00
Ryan Schmidt
0a5dbf59d2 Change "XCode" to "Xcode" 2018-08-25 22:17:29 -05:00
Ryan Schmidt
493fb35b3f Add missing apostrophe and parentheses
And capitalize and add a period at the end of the next sentence.
2018-08-25 20:53:32 -05:00
Ryan Schmidt
00f7424140 Change "ex." to "e.g." 2018-08-25 20:51:15 -05:00
Ryan Schmidt
47822b8ce8 Change "eg:" to "e.g." 2018-08-25 20:46:09 -05:00
Ryan Schmidt
4a27274c0f Change "eg." to "e.g." 2018-08-25 20:44:44 -05:00
Ryan Schmidt
d1f08072f9 Change "http://cocoapods.org/" to "https://cocoapods.org"
Their web server enforces https now.
2018-08-25 20:31:28 -05:00
Ryan Schmidt
3211b94abb Change "Cocoapods" to "CocoaPods"
That seems to be the preferred capitalization.
2018-08-25 20:31:15 -05:00
Ryan Schmidt
5e28beb4db Change "Direct Sound" to "DirectSound" 2018-08-25 20:16:07 -05:00
Ryan Schmidt
21d392dca7 Change "Core Audio" to "CoreAudio" 2018-08-25 20:15:08 -05:00
Ryan Schmidt
f79d75037a Change "Core Midi" to "CoreMIDI" 2018-08-25 20:13:57 -05:00
Ryan Schmidt
3efa214fbd Rename "README.MD" to "README.md"
Lowercase filename extensions are used everywhere else in this project.
2018-08-25 19:50:05 -05:00
Ryan Schmidt
6acefc08a8 Use cp -R instead of cp -r
According to the cp(1) manpage on macOS, the -r option is historic its
use is strongly discouraged.
2018-08-25 20:27:41 -03:00
Gary Scavone
6ce3ac9e10 Fix in FileLoop::getSize() to return file size in samples, rather than the chunk size if chunking.(GPS) 2018-04-27 13:21:14 +02:00
315 changed files with 11406 additions and 7060 deletions

13
.gitignore vendored
View File

@@ -104,7 +104,7 @@ xcuserdata
#!xcuserdata/**/xcschemes/*
####
# XCode 4 workspaces - more detailed
# Xcode 4 workspaces - more detailed
#
# Workspaces are important! They are a core feature of Xcode - don't exclude them :)
#
@@ -186,3 +186,14 @@ src/libstk.a
src/Release
src/Debug
src/Makefile
####
# Files generated by Visual Studio
projects/*/.vs/
projects/*/*.exe
projects/*/*.ilk
projects/*/*.pdb
projects/*/*.vcxproj.user
projects/*/Release/
projects/*/Debug/

138
CMakeLists.txt Normal file
View File

@@ -0,0 +1,138 @@
cmake_minimum_required(VERSION 3.1) ##TODO: which version is better
project(STK VERSION 4.6.1)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release" "Debug" "RelWithDebInfo" "MinSizeRel")
message("Build type: " ${CMAKE_BUILD_TYPE})
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -D_STK_DEBUG_ -D__RTAUDIO_DEBUG__ -D__RTMIDI_DEBUG__")
if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
message("GCC.")
set(CMAKE_CXX_FLAGS "-Wall")
endif()
option(BUILD_SHARED "Whether to build the shared library" ON)
option(BUILD_STATIC "Whether to build the static library" ON)
option(REALTIME "Realtime support" ON)
option(ENABLE_JACK "Enable JACK" ON)
option(ENABLE_ALSA "Enable ALSA API support (linux only)" ON)
# option(ENABLE_OSS "Enable OSS API Support (unixes only)" ON)
option(ENABLE_ASIO "Enable ASIO API support (windows only)" OFF)
option(ENABLE_DS "Enable DirectSound API support (windows only)" ON)
option(ENABLE_WASAPI "Enable Windows Audio Session API support (windows only)" OFF)
# option(ENABLE_CORE "Enable CoreAudio API support (mac only)" ON)
option(COMPILE_PROJECTS "Compile all the example projects" ON)
include_directories("./include")
file(GLOB STK_SRC "./src/*.cpp") # GLOB instead of GLOB_RECURSE as the asio depends on system
#========================================#
#========== Realtime Support ============#
#========================================#
if(REALTIME)
if(ENABLE_JACK)
find_library(JACK_LIBRARY jack) # find_package(JACK) # TODO: NEED FindJACK.cmake
if(JACK_LIBRARY)
message("Jack API found: ${JACK_LIBRARY}")
link_libraries(${JACK_LIBRARY})
add_definitions(-D__UNIX_JACK__)
else()
message(WARNING "JACK support requires the jack library!")
endif()
endif()
message("${CMAKE_SYSTEM_NAME}")
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
link_libraries(Threads::Threads)
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
# TODO: Finish Linux configuration, include different audio API supports
#============== LINUX ================#
message("Linux DETECTED!")
if(ENABLE_ALSA)
find_package(ALSA REQUIRED)
if(ALSA_FOUND)
include_directories(${ALSA_INCLUDE_DIRS})
link_libraries(${ALSA_LIBRARIES})
add_definitions(-D__LINUX_ALSA__)
endif()
endif()
elseif(${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
#============== MAC OS ================#
message("Machintosh DETECTED!")
find_package(CoreAudio REQUIRED)
include_directories(${COREAUDIO_INCLUDE_DIRS})
add_definitions(-D__MACOSX_CORE__)
link_libraries(${COREAUDIO_LIBRARY} ${COREAUDIO_FOUNDATION} ${COREAUDIO_MIDI})
elseif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
# TODO: MORE SUPPORT (e.g., MSYS)?
# Tested under MSYS2 with Mingw64 toolchain
#============== WINDOWS ================#
message("Windows DETECTED!")
link_libraries(winmm ole32 wsock32)
add_definitions(-D__WINDOWS_MM__)
# TODO: ASIO NOT WORKING YET
if(ENABLE_ASIO)
message("ENALBING ASIO")
include_directories("./src/include")
# target_sources(stk PUBLIC "${CMAKE_SOURCE_DIR}/src/include/asio.cpp" "${CMAKE_SOURCE_DIR}/src/include/asiodrivers.cpp"
# "${CMAKE_SOURCE_DIR}/src/include/asiolist.cpp" "${CMAKE_SOURCE_DIR}/src/include/iasiothiscallresolver.cpp")
add_definitions(-D__WINDOWS_ASIO__)
endif()
if(ENABLE_WASAPI)
message("ENALBING WASAPI")
link_libraries(mfuuid mfplat wmcodecdspuuid ksuser)
add_definitions(-D__WINDOWS_WASAPI__)
endif()
if(ENABLE_DS)
message("ENALBING Directsound")
link_libraries(dsound)
add_definitions(-D__WINDOWS_DS__)
endif()
else()
message("CMAKE_SYSTEM_NAME:" ${CMAKE_SYSTEM_NAME})
message(FATAL_ERROR "Unknown system type for realtime support.")
endif()
endif()
include(TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if(NOT IS_BIG_ENDIAN)
add_definitions(-D__LITTLE_ENDIAN__)
endif()
#========================================#
#========== Build the Library ===========#
#========================================#
if(BUILD_STATIC)
add_library(stk STATIC ${STK_SRC} )
endif()
if(BUILD_SHARED)
add_library(stk_SHARED SHARED ${STK_SRC})
set_target_properties(stk_SHARED PROPERTIES OUTPUT_NAME stk) # rename the shared library name
endif()
#========================================#
#========= Build the examples ===========#
#========================================#
if(COMPILE_PROJECTS)
message("COMPILE PROJECTS!")
add_subdirectory(projects/examples)
add_subdirectory(projects/eguitar)
add_subdirectory(projects/demo)
add_subdirectory(projects/effects)
add_subdirectory(projects/ragamatic)
endif()

View File

@@ -1,9 +1,5 @@
% The Synthesis ToolKit in C++ (STK)
% Perry R. Cook and Gary P. Scavone
% 1995--2017
# The Synthesis ToolKit in C++ (STK)
By Perry R. Cook and Gary P. Scavone, 1995--2017.
By Perry R. Cook and Gary P. Scavone, 1995-2021.
The Synthesis ToolKit in C++ can be used in a variety of ways, depending on your particular needs. Some people simply choose the classes they need for a particular project and copy those to their project directory. Others like to compile and link to a library of object files. STK was not designed with one particular style of use in mind.
@@ -32,27 +28,27 @@ Several options can be passed to configure, including:
--with-alsa = choose native ALSA API support (default, linux only)
--with-oss = choose native OSS API support (unixes only)
--with-jack = choose native JACK server API support (linux and macintosh OS-X)
--with-core = choose OS-X Core Audio API (macintosh OS-X only)
--with-core = choose OS-X CoreAudio API (macintosh OS-X only)
--with-asio = choose ASIO API support (windows only)
--with-ds = choose DirectSound API support (windows only)
--with-wasapi = choose Windows Audio Session API support (windows only)
It is now possible to specify more than one audio and MIDI API where supported. Note, however, that the ALSA library is required in order to compile the RtMidi class in Linux 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/me/rawwaves and /home/me/include):
It is now possible to specify more than one audio and MIDI API where supported. Note, however, that the ALSA library is required in order to compile the RtMidi class in Linux 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 (e.g. to set to /home/me/rawwaves and /home/me/include):
./configure RAWWAVE_PATH='$(HOME)/rawwaves/'
./configure INCLUDE_PATH='$(HOME)/include/'
The ending "/" is required for the RAWWAVES path. The default behavior will set a relative path that works for the project files included with the distribution (assuming they are not moved). You can also change the RAWWAVE_PATH dynamically via the static Stk::setRawwavePath() function.
If you wish to use a different compiler than that selected by configure, specify that compiler in the command line (ex. to use CC):
If you wish to use a different compiler than that selected by configure, specify that compiler in the command line (e.g. to use CC):
./configure CXX=CC
## Windows
MinGW support is provided in the configure script. In addition, Visual C++ 6.0 project files are included for each of the example STK projects, though these may not work with more recent versions of Visual Studio.
MinGW support is provided in the configure script. In addition, Visual Studio 2017 project files are included for each of the example STK projects.
##iOS
## iOS
You can integrate the STK in iOS projects either by using its iOS static library or Cocoapods. See the [iOS README file](iOS/README-iOS.md) for instructions.
You can integrate the STK in iOS projects either by using its iOS static library or CocoaPods. See the [iOS README file](iOS/README-iOS.md) for instructions.

View File

@@ -1,6 +1,6 @@
The Synthesis ToolKit in C++ (STK)
Copyright (c) 1995--2017 Perry R. Cook and Gary P. Scavone
Copyright (c) 1995-2021 Perry R. Cook and Gary P. Scavone
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -1,5 +1,5 @@
# The Synthesis ToolKit in C++ (STK)
By Perry R. Cook and Gary P. Scavone, 1995--2017.
By Perry R. Cook and Gary P. Scavone, 1995--2021.
This distribution of the Synthesis ToolKit in C++ (STK) contains the following:
@@ -13,7 +13,7 @@ Please read the [Legal and Ethical notes](#legal-and-ethical) near the bottom of
For compiling and installing STK, see the [INSTALL.md](INSTALL.md) file in this directory.
##Contents
## Contents
* [Overview](#overview)
* [System Requirements](#system-requirements)
@@ -63,7 +63,7 @@ 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 Tcl/Tk (http://dev.scriptics.com) which is freely
helpful, we use Tcl/Tk (https://www.tcl.tk/) 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),
@@ -73,10 +73,10 @@ text message synthesis control format).
# SYSTEM REQUIREMENTS
See the individual README's (eg. README-linux) in the /doc directory
See the individual README's (e.g. 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 (and MinGW) or the VC++ workspace files to compile the
platforms (and MinGW) or the VS2017 workspace files to compile the
example programs. To use the Tcl/Tk GUIs, you will need Tcl/Tk
version 8.0 or higher.
@@ -104,10 +104,10 @@ 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 Macintosh OS-X, audio input and output are possible with very low
latency. Using the Windoze DirectSound API, minimum dependable output
latency. Using the Windows DirectSound API, minimum dependable output
sound latency seems to be around 20 milliseconds or so, while input
sound latency is generally higher. Performance with the ASIO audio
API on Windoze provides much better performance.
API on Windows provides much better performance.
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

55
STK.podspec Normal file
View File

@@ -0,0 +1,55 @@
# To lint the spec:
# pod spec lint --skip-import-validation --allow-warnings
# To publish:
# pod trunk push STK.podspec --skip-import-validation --allow-warnings
Pod::Spec.new do |spec|
spec.name = 'STK'
spec.version = '4.6.2'
spec.summary = 'The Synthesis ToolKit in C++ is a set of open source audio signal processing and algorithmic synthesis classes.'
spec.homepage = 'https://ccrma.stanford.edu/software/stk/'
spec.source = { :git => 'https://github.com/thestk/stk.git', :tag => spec.version }
spec.license = { :type => 'MIT' }
spec.author = { "Ariel Elkin" => "ariel@arivibes.com" }
spec.platform = :ios
spec.ios.deployment_target = "10.0"
spec.source_files = [
"src/*.cpp",
"include/*.h"
]
spec.public_header_files = [
"include/*.h",
"include/SKINImsg.h",
"include/SKINItbl.h"
]
spec.exclude_files = [
"include/Thread.h",
"src/Thread.cpp",
"include/Mutex.h",
"src/Mutex.cpp",
"include/UdpSocket.h",
"src/UdpSocket.cpp",
"include/Socket.h",
"src/Socket.cpp",
"include/TcpClient.h",
"src/TcpClient.cpp",
"include/TcpServer.h",
"src/TcpServer.cpp",
"include/InetWvIn.h",
"src/InetWvIn.cpp",
"include/InetWvOut.h",
"src/InetWvOut.cpp",
"include/RtAudio.h",
"src/RtAudio.cpp",
"include/RtMidi.h",
"src/RtMidi.cpp",
"include/RtWvIn.h",
"src/RtWvIn.cpp",
"include/RtWvOut.h",
"src/RtWvOut.cpp",
"include/RtError.h"
]
spec.preserve_paths = "README.MD"
spec.resource_bundles = { "rawwaves": "rawwaves/*.raw" }
spec.libraries = 'c++'
end

21
cmake/FindCoreAudio.cmake Normal file
View File

@@ -0,0 +1,21 @@
find_library(COREAUDIO_LIBRARY CoreAudio)
find_library(COREAUDIO_FOUNDATION CoreFoundation)
find_library(COREAUDIO_MIDI CoreMIDI)
find_path(COREAUDIO_INCLUDE_DIRS CoreAudio/CoreAudio.h)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
CoreAudio
DEFAULT_MSG
COREAUDIO_LIBRARY
COREAUDIO_FOUNDATION
COREAUDIO_MIDI
COREAUDIO_INCLUDE_DIRS)
mark_as_advanced(
COREAUDIO_LIBRARY
COREAUDIO_FOUNDATION
COREAUDIO_MIDI
COREAUDIO_INCLUDE_DIRS)

View File

@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(STK, 4.6.0, gary@music.mcgill.ca, stk)
AC_INIT(STK, 4.6.2, gary.scavone@mcgill.ca, stk)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(src/Stk.cpp)
AC_CONFIG_FILES(Makefile src/Makefile projects/demo/Makefile projects/effects/Makefile projects/ragamatic/Makefile projects/examples/Makefile projects/examples/libMakefile projects/eguitar/Makefile)
@@ -7,6 +7,10 @@ AC_CONFIG_FILES(Makefile src/Makefile projects/demo/Makefile projects/effects/Ma
# Fill GXX with something before test.
AC_SUBST( GXX, ["no"] )
# standards version
m4_include([m4/ax_cxx_compile_stdcxx.m4])
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
# Checks for programs.
AC_PROG_CXX(g++ CC c++ cxx)
AC_PROG_RANLIB
@@ -120,7 +124,7 @@ case $host in
*-apple*)
AC_SUBST( sharedlib, ["libstk.dylib"] )
AC_SUBST( sharedname, ["${basesharedname}.dylib"] )
AC_SUBST( libflags, ["-dynamiclib -o ${basesharedname}.dylib"] )
AC_SUBST( libflags, ["-dynamiclib -install_name \$(libdir)/${basesharedname}.dylib -o ${basesharedname}.dylib"] )
esac
if test $realtime = yes; then
@@ -134,6 +138,22 @@ api="$api -D__UNIX_JACK__"
AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))])
case $host in
*-*-netbsd*)
AS_IF([test "$api" == ""], [
AC_MSG_RESULT(using OSS)
api="$api -D__LINUX_OSS__"
LIBS="$LIBS -lossaudio"
AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))])
;;
*-*-freebsd*)
AS_IF([test "$api" == ""], [
AC_MSG_RESULT(using OSS)
api="$api -D__LINUX_OSS__"
LIBS="$LIBS -lossaudio"
AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))])
;;
*-*-linux*)
# Look for ALSA flag
AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)])

View File

@@ -1,6 +1,6 @@
The Synthesis ToolKit in C++ (STK)
By Perry R. Cook and Gary P. Scavone, 1995--2017.
By Perry R. Cook and Gary P. Scavone, 1995--2021.
Please read the file README and INSTALL for more general STK information.

View File

@@ -1,6 +1,6 @@
The Synthesis ToolKit in C++ (STK)
By Perry R. Cook and Gary P. Scavone, 1995--2017.
By Perry R. Cook and Gary P. Scavone, 1995--2021.
Please read the file README and INSTALL for more general STK information.
@@ -10,7 +10,7 @@ It is necessary to install the OS X developer kit (or the command line tools) in
Tcl/Tk on OS X:
I think that tcl/tk interpreter is now included in the XCode package, since I haven't had to download it for several years now.
I think that Tcl/Tk interpreter is now included in the Xcode package, since I haven't had to download it for several years now.
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 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.

View File

@@ -1,6 +1,6 @@
The Synthesis ToolKit in C++ (STK)
By Perry R. Cook and Gary P. Scavone, 1995--2017.
By Perry R. Cook and Gary P. Scavone, 1995--2021.
Please read the file README and INSTALL for more general STK information.

View File

@@ -1,35 +1,26 @@
The Synthesis ToolKit in C++ (STK)
By Perry R. Cook and Gary P. Scavone, 1995--2017.
By Perry R. Cook and Gary P. Scavone, 1995--2021.
Please read the file README for more general STK information.
Please read the file README.md for more general STK information.
The configure script supports MinGW. As well, STK is distributed with Visual C++ .NET project and workspace files (though these may no longer work with current versions of Visual Studio). It no longer compiles with Visual C++ 6.0.
The configure script supports MinGW.
With Windows XP/7, piping works as under unix. Simply fire up the script files (ex. StkDemo.bat) by either double-clicking on them or from within a shell.
STK has been built and tested on Windows platforms using Visual Studio. It is assumed here that you're familiar with Visual C++ and its particular idiosyncrasies. The currently supported version is VS2017. You can download the free non-commercial community edition from the Microsoft website. The folders in the projects directory contain VS2017 solution files.
If you are creating a new stk application, it's easiest to use the supplied template:
- Copy stk\projects\stk-template.zip to C:\Users\<user>\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C++ Project\
- Start VS2017.
- Select create new project...
- Select Visual C++.
- Select stk-template and enter your preferred project name and location. Note that if you do not put the project at the same level as stk\projects you will have to fix all paths in the project properties to match.
- The template is based on one of the projects in the examples directory. Add/remove files as needed and edit main.cpp to taste.
IMPORTANT VC++ NOTE: When compiling "release" versions of STK programs, link to the release multithreaded library. When compiling "debug" versions, link to the debug multithreaded library. Compiler errors will result otherwise.
To use the Tcl/Tk GUIs, you will have to install Tcl/Tk and build using MinGW.
The DirectSound, WASAPI and Steinberg ASIO audio APIs are supported for realtime audio input/output. The Visual C++ project files included with this distribution are configured to use all supported APIs. In order to use the ASIO API, it is necessary to use the preprocessor definition __WINDOWS_ASIO__, as well as include most of the files in the /src/include/ directory (i.e. asio.h, asio.cpp, ...). If you have a good quality soundcard and a native ASIO driver (not emulated), you are likely to get much better input/output response using that.
With Windows XP and later, piping works as under unix. Simply fire up the script files (e.g. StkDemo.bat) by either double-clicking on them or from within a shell.
The DirectSound, WASAPI and Steinberg ASIO audio APIs are supported for realtime audio input/output. The VS2017 project files included with this distribution are configured to use all supported APIs. The default (as in stk-template) is the DirectSound API (preprocessor definition __WINDOWS_DS__). In order to use the ASIO API, it is necessary to use the preprocessor definition __WINDOWS_ASIO__, as well as include most of the files in the /src/include/ directory (i.e. asio.h, asio.cpp, ...). If you have a good quality soundcard and a native ASIO driver (not emulated), you are likely to get much better input/output response using that.
When using the DirectSound API for audio input, latency can be high. If you experience realtime audio "stuttering", you should experiment with different "buffer size" and "number of buffers" values.
Realtime MIDI input/output is supported by RtMidi using the winmm.lib API and requires the __WINDOWS_MM__ preprocessor definition.
Visual C++ 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" (this was for VC 6.0 ... things have changed with the newer versions of the VC compiler):
1. Under General: Set "Output files:" to <blank> (this will put the executable in the main project directory.
2. Under C/C++ > Code Generation: Set "Use run-time library:" to Multithreaded (use "debug" versions for the debug configuration).
3. Under Link > General: Add winmm.lib, dsound.lib, and Wsock32.lib to the end of the Object/library modules list.
4. Under C/C++ > Preprocessor: Add "../../include" directory to the "extra include" 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.
Remember that items 1-5 above need to be done for each project and for each configuration. There might be an easy way to make global changes, but I couldn't figure it out.
To use the Tcl/Tk GUIs, you will have to install Tcl/Tk.

View File

@@ -1,6 +1,20 @@
The Synthesis ToolKit in C++ (STK)
By Perry R. Cook and Gary P. Scavone, 1995--2017.
By Perry R. Cook and Gary P. Scavone, 1995--2021.
v.4.6.2 (17 November 2021)
- see github site for complete details (github.com/thestk/stk)
- bug fixes in LentPitShift and Granulate classes
- Makefile fixes
- miscellaneous bug fixes
v.4.6.1 (18 April 2019)
- see github site for complete details (github.com/thestk/stk)
- various documentation updates
- new Recorder (flute a la Verge) class (thanks to Mathias Bredholt)
- updated Modulate class to allow noise rate control
- new VS2017 project files
- fix in FileLoop::getSize() to return file size (not chunk size)
v.4.6.0 (31 August 2017)
- see github site for complete details
@@ -155,7 +169,7 @@ v4.1.3: (22 March 2004)
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
- added volume control to demo program and various tcl scripts
- added volume control to demo program and various Tcl scripts
- added support for dynamic rawwavePath() setting
- WaveLoop bug fix
- fixed bug in ADSR::setReleaseTime() method
@@ -179,7 +193,7 @@ v4.1: (8 October 2002)
- added Voicer, SingWave, and VoicForm classes
- improvements/fixes to the banded waveguide instruments
- demo program now uses Voicer, allowing polyphony
- demo tcl/tk scripts changed to use SKINI PitchChange instead of PitchBend
- demo Tcl/Tk scripts changed to use SKINI PitchChange instead of PitchBend
- demo program response to PitchBend modified to octave up/down
- several RtAudio fixes and improvements (OS X and Windows ASIO support added)
- added nextOut() method to Delay classes

View File

@@ -1,4 +1,4 @@
# Doxyfile 1.6.2
# Doxyfile 1.8.3.1
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
@@ -22,8 +22,9 @@
DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
# The PROJECT_NAME tag is a single word (or sequence of words) that should
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
PROJECT_NAME = STK
@@ -31,7 +32,20 @@ PROJECT_NAME = STK
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 4.6.0
PROJECT_NUMBER = 4.6.2
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
# a quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF =
# With the PROJECT_LOGO tag one can specify an logo or icon that is
# included in the documentation. The maximum height of the logo should not
# exceed 55 pixels and the maximum width should not exceed 200 pixels.
# Doxygen will copy the logo to the output directory.
PROJECT_LOGO =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@@ -57,7 +71,7 @@ CREATE_SUBDIRS = NO
# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
OUTPUT_LANGUAGE = English
@@ -112,7 +126,9 @@ FULL_PATH_NAMES = NO
# only done if one of the specified strings matches the left-hand part of
# the path. The tag can be used to show relative paths in the file list.
# If left blank the directory from which doxygen is run is used as the
# path to strip.
# path to strip. Note that you specify absolute paths here, but also
# relative paths, which will be relative from the directory where doxygen is
# started.
STRIP_FROM_PATH =
@@ -126,7 +142,7 @@ STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
# (but less readable) file names. This can be useful is your file systems
# (but less readable) file names. This can be useful if your file system
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
@@ -181,6 +197,13 @@ TAB_SIZE = 9
ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding
# "class=itcl::class" will allow you to use the command class in the
# itcl::class meaning.
TCL_SUBST =
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.
# For instance, some of the names that are used will be different. The list
@@ -207,23 +230,40 @@ OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
# Doxygen selects the parser to use depending on the extension of the files it parses.
# With this tag you can assign which parser to use for a given extension.
# Doxygen has a built-in mapping, but you can override or extend it using this tag.
# The format is ext=language, where ext is a file extension, and language is one of
# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
# use: inc=Fortran f=C. Note that for custom extensions you also need to set
# FILE_PATTERNS otherwise the files are not read by doxygen.
# Doxygen selects the parser to use depending on the extension of the files it
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension,
# and language is one of the parsers supported by doxygen: IDL, Java,
# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,
# C++. For instance to make doxygen treat .inc files as Fortran files (default
# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note
# that for custom extensions you also need to set FILE_PATTERNS otherwise the
# files are not read by doxygen.
EXTENSION_MAPPING =
# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
# comments according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you
# can mix doxygen, HTML, and XML commands with Markdown formatting.
# Disable only in case of backward compatibilities issues.
MARKDOWN_SUPPORT = YES
# When enabled doxygen tries to link words that correspond to documented classes,
# or namespaces to their corresponding documentation. Such a link can be
# prevented in individual cases by by putting a % sign in front of the word or
# globally by setting AUTOLINK_SUPPORT to NO.
AUTOLINK_SUPPORT = YES
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should
# set this tag to YES in order to let doxygen match functions declarations and
# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
# func(std::string) {}). This also make the inheritance and collaboration
# func(std::string) {}). This also makes the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
BUILTIN_STL_SUPPORT = YES
@@ -239,10 +279,10 @@ CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
# For Microsoft's IDL there are propget and propput attributes to indicate getter
# and setter methods for a property. Setting this option to YES (the default)
# will make doxygen to replace the get and set methods by a property in the
# documentation. This will only work if the methods are indeed getting or
# For Microsoft's IDL there are propget and propput attributes to indicate
# getter and setter methods for a property. Setting this option to YES (the
# default) will make doxygen replace the get and set methods by a property in
# the documentation. This will only work if the methods are indeed getting or
# setting a simple type. If this is not the case, or you want to show the
# methods anyway, you should set this option to NO.
@@ -263,6 +303,22 @@ DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
# unions are shown inside the group in which they are included (e.g. using
# @ingroup) instead of on a separate page (for HTML and Man pages) or
# section (for LaTeX and RTF).
INLINE_GROUPED_CLASSES = NO
# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
# unions with only public data fields will be shown inline in the documentation
# of the scope in which they are defined (i.e. file, namespace, or group
# documentation), provided this scope is documented. If set to NO (the default),
# structs, classes, and unions are shown on a separate page (for HTML and Man
# pages) or section (for LaTeX and RTF).
INLINE_SIMPLE_STRUCTS = NO
# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
# is documented as struct, union, or enum with the name of the typedef. So
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
@@ -279,16 +335,27 @@ TYPEDEF_HIDES_STRUCT = NO
# For small to medium size projects (<1000 input files) the default value is
# probably good enough. For larger projects a too small cache size can cause
# doxygen to be busy swapping symbols to and from disk most of the time
# causing a significant performance penality.
# causing a significant performance penalty.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will rougly double the
# a logarithmic scale so increasing the size by one will roughly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols
# corresponding to a cache size of 2^16 = 65536 symbols.
SYMBOL_CACHE_SIZE = 0
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
# their name and scope. Since this can be an expensive process and often the
# same symbol appear multiple times in the code, doxygen keeps a cache of
# pre-resolved symbols. If the cache is too small doxygen will become slower.
# If the cache is too large, memory is wasted. The cache size is given by this
# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols.
LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@@ -305,6 +372,11 @@ EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
# scope will be included in the documentation.
EXTRACT_PACKAGE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
@@ -327,7 +399,7 @@ EXTRACT_LOCAL_METHODS = NO
# extracted and appear in the documentation as a namespace called
# 'anonymous_namespace{file}', where file will be replaced with the base
# name of the file that contains the anonymous namespace. By default
# anonymous namespace are hidden.
# anonymous namespaces are hidden.
EXTRACT_ANON_NSPACES = NO
@@ -412,12 +484,12 @@ SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
# will sort the (brief and detailed) documentation of class members so that
# constructors and destructors are listed first. If set to NO (the default)
# the constructors will appear in the respective orders defined by
# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
# will sort the (brief and detailed) documentation of class members so that
# constructors and destructors are listed first. If set to NO (the default)
# the constructors will appear in the respective orders defined by
# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
SORT_MEMBERS_CTORS_1ST = NO
@@ -438,6 +510,15 @@ SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
# do proper type resolution of all parameters of a function it will reject a
# match between the prototype and the implementation of a member function even
# if there is only one candidate or it is obvious which candidate to choose
# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
# will still accept a match between prototype and implementation in such cases.
STRICT_PROTO_MATCHING = NO
# The GENERATE_TODOLIST tag can be used to enable (YES) or
# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
@@ -463,15 +544,16 @@ GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
# documentation sections, marked by \if section-label ... \endif
# and \cond section-label ... \endcond blocks.
ENABLED_SECTIONS =
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
# the initial value of a variable or define consists of for it to appear in
# the initial value of a variable or macro consists of for it to appear in
# the documentation. If the initializer consists of more lines than specified
# here it will be hidden. Use a value of 0 to hide initializers completely.
# The appearance of the initializer of individual variables and defines in the
# The appearance of the initializer of individual variables and macros in the
# documentation can be controlled using \showinitializer or \hideinitializer
# command in the documentation regardless of this setting.
@@ -483,12 +565,6 @@ MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
# If the sources in your project are distributed over multiple directories
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
# in the documentation. The default is NO.
SHOW_DIRECTORIES = YES
# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
# This will remove the Files entry from the Quick Index and from the
# Folder Tree View (if specified). The default is YES.
@@ -511,15 +587,26 @@ SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
# doxygen. The layout file controls the global structure of the generated output files
# in an output format independent way. The create the layout file that represents
# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
# file name after the option, if omitted DoxygenLayout.xml will be used as the name
# of the layout file.
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
# output files in an output format independent way. To create the layout file
# that represents doxygen's defaults, run doxygen with the -l option.
# You can optionally specify a file name after the option, if omitted
# DoxygenLayout.xml will be used as the name of the layout file.
LAYOUT_FILE =
# The CITE_BIB_FILES tag can be used to specify one or more bib files
# containing the references data. This must be a list of .bib files. The
# .bib extension is automatically appended if omitted. Using this command
# requires the bibtex tool to be installed. See also
# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
# feature you need bibtex and perl available in the search path. Do not use
# file names with spaces, bibtex cannot handle them.
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
@@ -548,7 +635,7 @@ WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
# This WARN_NO_PARAMDOC option can be abled to get warnings for
# The WARN_NO_PARAMDOC option can be enabled to get warnings for
# functions that are documented, but have no documentation for their parameters
# or return value. If set to NO (the default) doxygen will only warn about
# wrong or incomplete parameter documentation, but not about the absence of
@@ -595,8 +682,9 @@ INPUT_ENCODING = UTF-8
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank the following patterns are tested:
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
# *.f90 *.f *.for *.vhd *.vhdl
FILE_PATTERNS = *.txt \
*.msg \
@@ -608,14 +696,16 @@ FILE_PATTERNS = *.txt \
RECURSIVE = NO
# The EXCLUDE tag can be used to specify files and/or directories that should
# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
# subdirectory from a directory tree whose root is specified with the INPUT tag.
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE = ../../src/asio
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
EXCLUDE_SYMLINKS = NO
@@ -676,8 +766,8 @@ INPUT_FILTER =
# basis. Doxygen will compare the file name with each pattern and apply the
# filter if there is a match. The filters are a list of the form:
# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
# is applied to all files.
# info on how filters are used. If FILTER_PATTERNS is empty or if
# non of the patterns match the file name, INPUT_FILTER is applied.
FILTER_PATTERNS =
@@ -687,6 +777,21 @@ FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
# and it is also possible to disable source filtering for a specific pattern
# using *.ext= (so without naming a filter). This option only has effect when
# FILTER_SOURCE_FILES is enabled.
FILTER_SOURCE_PATTERNS =
# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
# is part of the input, its contents will be placed on the main page (index.html).
# This can be useful if you have a project on for instance GitHub and want reuse
# the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
@@ -705,7 +810,7 @@ INLINE_SOURCES = YES
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
# fragments. Normal C, C++ and Fortran comments will always remain visible.
STRIP_CODE_COMMENTS = YES
@@ -788,7 +893,14 @@ HTML_FILE_EXTENSION = .html
# The HTML_HEADER tag can be used to specify a personal HTML header for
# each generated HTML page. If it is left blank doxygen will generate a
# standard header.
# standard header. Note that when using a custom header you are responsible
# for the proper inclusion of any scripts and style sheets that doxygen
# needs, which is dependent on the configuration options used.
# It is advised to generate a default header using "doxygen -w html
# header.html footer.html stylesheet.css YourConfigFile" and then modify
# that header. Note that the header is subject to change so you typically
# have to redo this when upgrading to a newer version of doxygen or when
# changing the value of configuration settings such as GENERATE_TREEVIEW!
HTML_HEADER = header.html
@@ -800,33 +912,80 @@ HTML_FOOTER = footer.html
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
# style sheet that is used by each HTML page. It can be used to
# fine-tune the look of the HTML output. If the tag is left blank doxygen
# will generate a default style sheet. Note that doxygen will try to copy
# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
# fine-tune the look of the HTML output. If left blank doxygen will
# generate a default style sheet. Note that it is recommended to use
# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
# tag will in the future become obsolete.
HTML_STYLESHEET =
# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
# user-defined cascading style sheet that is included after the standard
# style sheets created by doxygen. Using this option one can overrule
# certain style aspects. This is preferred over using HTML_STYLESHEET
# since it does not replace the standard style sheet and is therefor more
# robust against future updates. Doxygen will copy the style sheet file to
# the output directory.
HTML_EXTRA_STYLESHEET =
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
# that these files will be copied to the base HTML output directory. Use the
# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
# files. In the HTML_STYLESHEET file, use the file name only. Also note that
# the files will be copied as-is; there are no commands or markers available.
HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
# Doxygen will adjust the colors in the style sheet and background images
# according to this color. Hue is specified as an angle on a colorwheel,
# see http://en.wikipedia.org/wiki/Hue for more information.
# For instance the value 0 represents red, 60 is yellow, 120 is green,
# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
# The allowed range is 0 to 359.
HTML_COLORSTYLE_HUE = 220
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
# the colors in the HTML output. For a value of 0 the output will use
# grayscales only. A value of 255 will produce the most vivid colors.
HTML_COLORSTYLE_SAT = 100
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
# the luminance component of the colors in the HTML output. Values below
# 100 gradually make the output lighter, whereas values above 100 make
# the output darker. The value divided by 100 is the actual gamma applied,
# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
# and 100 does not change the gamma.
HTML_COLORSTYLE_GAMMA = 80
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting
# this to NO can help when comparing the output of multiple runs.
HTML_TIMESTAMP = NO
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
HTML_ALIGN_MEMBERS = YES
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded. For this to work a browser that supports
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
# page has loaded.
HTML_DYNAMIC_SECTIONS = NO
# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
# entries shown in the various tree structured indices initially; the user
# can expand and collapse entries dynamically later on. Doxygen will expand
# the tree to such a level that at most the specified number of entries are
# visible (unless a fully collapsed tree already exceeds this amount).
# So setting the number of entries 1 will produce a full collapsed tree by
# default. 0 is a special value representing an infinite number of entries
# and will result in a full expanded tree by default.
HTML_INDEX_NUM_ENTRIES = 100
# If the GENERATE_DOCSET tag is set to YES, additional index files
# will be generated that can be used as input for Apple's Xcode 3
# integrated development environment, introduced with OSX 10.5 (Leopard).
@@ -835,7 +994,8 @@ HTML_DYNAMIC_SECTIONS = NO
# directory and running "make install" will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
# it at startup.
# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
GENERATE_DOCSET = NO
@@ -853,6 +1013,16 @@ DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely
# identify the documentation publisher. This should be a reverse domain-name
# style string, e.g. com.mycompany.MyDocSet.documentation.
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
DOCSET_PUBLISHER_NAME = Publisher
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the
# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
@@ -897,10 +1067,10 @@ BINARY_TOC = NO
TOC_EXPAND = NO
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
# are set, an additional index file will be generated that can be used as input for
# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
# HTML documentation.
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
# that can be used as input for Qt's qhelpgenerator to generate a
# Qt Compressed Help (.qch) of the generated HTML documentation.
GENERATE_QHP = NO
@@ -922,20 +1092,24 @@ QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
# For more information please see
# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
# add. For more information please see
# http://doc.trolltech.com/qthelpproject.html#custom-filters
QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see
# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
# Qt Help Project / Custom Filters</a>.
QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's
# filter section matches.
# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
# Qt Help Project / Filter Attributes</a>.
QHP_SECT_FILTER_ATTRS =
@@ -947,12 +1121,12 @@ QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
# will be generated, which together with the HTML files, form an Eclipse help
# will be generated, which together with the HTML files, form an Eclipse help
# plugin. To install this plugin and make it available under the help contents
# menu in Eclipse, the contents of the directory containing the HTML and XML
# files needs to be copied into the plugins directory of eclipse. The name of
# the directory within the plugins directory should be the same as
# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
# the help appears.
GENERATE_ECLIPSEHELP = NO
@@ -963,31 +1137,32 @@ GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
# at top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it. Since the tabs have the same information as the
# navigation tree you can set this option to NO if you already set
# GENERATE_TREEVIEW to YES.
DISABLE_INDEX = YES
# This tag can be used to set the number of enum values (range [1..20])
# that doxygen will group on one line in the generated HTML documentation.
ENUM_VALUES_PER_LINE = 4
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
# structure should be generated to display hierarchical information.
# If the tag value is set to YES, a side panel will be generated
# containing a tree-like index structure (just like the one that
# is generated for HTML Help). For this to work a browser that supports
# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
# Windows users are probably better off using the HTML help feature.
# Windows users are probably better off using the HTML help feature.
# Since the tree basically has the same information as the tab index you
# could consider to set DISABLE_INDEX to NO when enabling this option.
GENERATE_TREEVIEW = NO
# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
# and Class Hierarchy pages using a tree view instead of an ordered list.
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
# (range [0,1..20]) that doxygen will group on one line in the generated HTML
# documentation. Note that a value of 0 will completely suppress the enum
# values from appearing in the overview section.
USE_INLINE_TREES = NO
ENUM_VALUES_PER_LINE = 4
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
# used to set the initial width (in pixels) of the frame in which the tree
@@ -995,6 +1170,11 @@ USE_INLINE_TREES = NO
TREEVIEW_WIDTH = 250
# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
# links to external symbols imported via tag files in a separate window.
EXT_LINKS_IN_WINDOW = NO
# Use this tag to change the font size of Latex formulas included
# as images in the HTML documentation. The default is 10. Note that
# when you change the font size after a successful doxygen run you need
@@ -1003,26 +1183,106 @@ TREEVIEW_WIDTH = 250
FORMULA_FONTSIZE = 10
# When the SEARCHENGINE tag is enabled doxygen will generate a search box
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are
# not supported properly for IE 6.0, but are supported on all modern browsers.
# Note that when changing this option you need to delete any form_*.png files
# in the HTML output before the changes have effect.
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
# (see http://www.mathjax.org) which uses client side Javascript for the
# rendering instead of using prerendered bitmaps. Use this if you do not
# have LaTeX installed or if you want to formulas look prettier in the HTML
# output. When enabled you may also need to install MathJax separately and
# configure the path to it using the MATHJAX_RELPATH option.
USE_MATHJAX = NO
# When MathJax is enabled you can set the default output format to be used for
# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
# SVG. The default value is HTML-CSS, which is slower, but has the best
# compatibility.
MATHJAX_FORMAT = HTML-CSS
# When MathJax is enabled you need to specify the location relative to the
# HTML output directory using the MATHJAX_RELPATH option. The destination
# directory should contain the MathJax.js script. For instance, if the mathjax
# directory is located at the same level as the HTML output directory, then
# MATHJAX_RELPATH should be ../mathjax. The default value points to
# the MathJax Content Delivery Network so you can quickly see the result without
# installing MathJax. However, it is strongly recommended to install a local
# copy of MathJax from http://www.mathjax.org before deployment.
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
# names that should be enabled during MathJax rendering.
MATHJAX_EXTENSIONS =
# When the SEARCHENGINE tag is enabled doxygen will generate a search box
# for the HTML output. The underlying search engine uses javascript
# and DHTML and should work on any modern browser. Note that when using
# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
# and DHTML and should work on any modern browser. Note that when using
# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
# (GENERATE_DOCSET) there is already a search function so this one should
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client
# using Javascript. Doxygen will generate the search PHP script and index
# file to put on the web server. The advantage of the server
# based approach is that it scales better to large projects and allows
# full text search. The disadvances is that it is more difficult to setup
# and does not have live searching capabilities.
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a web server instead of a web client using Javascript.
# There are two flavours of web server based search depending on the
# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
# searching and an index file used by the script. When EXTERNAL_SEARCH is
# enabled the indexing and searching needs to be provided by external tools.
# See the manual for details.
SERVER_BASED_SEARCH = NO
# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP
# script for searching. Instead the search results are written to an XML file
# which needs to be processed by an external indexer. Doxygen will invoke an
# external search engine pointed to by the SEARCHENGINE_URL option to obtain
# the search results. Doxygen ships with an example indexer (doxyindexer) and
# search engine (doxysearch.cgi) which are based on the open source search engine
# library Xapian. See the manual for configuration details.
EXTERNAL_SEARCH = NO
# The SEARCHENGINE_URL should point to a search engine hosted by a web server
# which will returned the search results when EXTERNAL_SEARCH is enabled.
# Doxygen ships with an example search engine (doxysearch) which is based on
# the open source search engine library Xapian. See the manual for configuration
# details.
SEARCHENGINE_URL =
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
# search data is written to a file for indexing by an external tool. With the
# SEARCHDATA_FILE tag the name of this file can be specified.
SEARCHDATA_FILE = searchdata.xml
# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the
# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
# projects and redirect the results back to the right project.
EXTERNAL_SEARCH_ID =
# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
# projects other than the one defined by this configuration file, but that are
# all added to the same external search index. Each project needs to have a
# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id
# of to a relative location where the documentation can be found.
# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
@@ -1059,7 +1319,7 @@ MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
# The PAPER_TYPE tag can be used to set the paper type that is used
# by the printer. Possible values are: a4, a4wide, letter, legal and
# by the printer. Possible values are: a4, letter, legal and
# executive. If left blank a4wide will be used.
PAPER_TYPE = letter
@@ -1076,6 +1336,13 @@ EXTRA_PACKAGES =
LATEX_HEADER = header.tex
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
# the generated latex document. The footer should contain everything after
# the last chapter. If it is left blank doxygen will generate a
# standard footer. Notice: only use this tag if you know what you are doing!
LATEX_FOOTER =
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
# contain links (just like the HTML output) instead of page references
@@ -1102,13 +1369,19 @@ LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
# If LATEX_SOURCE_CODE is set to YES then doxygen will include
# source code with syntax highlighting in the LaTeX output.
# Note that which sources are shown also depends on other settings
# If LATEX_SOURCE_CODE is set to YES then doxygen will include
# source code with syntax highlighting in the LaTeX output.
# Note that which sources are shown also depends on other settings
# such as SOURCE_BROWSER.
LATEX_SOURCE_CODE = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
# http://en.wikipedia.org/wiki/BibTeX for more info.
LATEX_BIB_STYLE = plain
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
@@ -1140,7 +1413,7 @@ COMPACT_RTF = NO
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
# Load style sheet definitions from file. Syntax is similar to doxygen's
# config file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
@@ -1283,7 +1556,7 @@ MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
# pointed to by INCLUDE_PATH will be searched when a #include is found.
SEARCH_INCLUDES = YES
@@ -1313,15 +1586,15 @@ PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
# Use the PREDEFINED tag if you want to use a different macro definition that
# overrules the definition found in the source code.
EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
# on a line, have an all uppercase name, and do not end with a semicolon. Such
# function macros are typically used for boiler-plate code, and will confuse
# the parser if not removed.
# doxygen's preprocessor will remove all references to function-like macros
# that are alone on a line, have an all uppercase name, and do not end with a
# semicolon, because these will confuse the parser if not removed.
SKIP_FUNCTION_MACROS = YES
@@ -1329,20 +1602,16 @@ SKIP_FUNCTION_MACROS = YES
# Configuration::additions related to external references
#---------------------------------------------------------------------------
# The TAGFILES option can be used to specify one or more tagfiles.
# Optionally an initial location of the external documentation
# can be added for each tagfile. The format of a tag file without
# this location is as follows:
# The TAGFILES option can be used to specify one or more tagfiles. For each
# tag file the location of the external documentation should be added. The
# format of a tag file without this location is as follows:
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
# TAGFILES = file1=loc1 "file2 = loc2" ...
# where "loc1" and "loc2" can be relative or absolute paths or
# URLs. If a location is present for each tag, the installdox tool
# does not have to be run to correct the links.
# Note that each tag file must have a unique name
# (where the name does NOT include the path)
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
# where "loc1" and "loc2" can be relative or absolute paths
# or URLs. Note that each tag file must have a unique name (where the name does
# NOT include the path). If a tag file is not located in the directory in which
# doxygen is run, you must also specify the path to the tagfile here.
TAGFILES =
@@ -1375,9 +1644,8 @@ PERL_PATH = /usr/bin/perl
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
# or super classes. Setting the tag to NO turns the diagrams off. Note that
# this option is superseded by the HAVE_DOT option below. This is only a
# fallback. It is recommended to install and use dot, since it yields more
# powerful graphs.
# this option also works with HAVE_DOT disabled, but it is recommended to
# install and use dot, since it yields more powerful graphs.
CLASS_DIAGRAMS = YES
@@ -1403,14 +1671,20 @@ HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
# By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This
# font does not include all possible unicode characters however, so when you need
# these (or just want a differently looking font) you can specify the font name
# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
# which can be done by putting it in a standard location or by setting the
# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
# containing the font.
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
# allowed to run in parallel. When set to 0 (the default) doxygen will
# base this on the number of processors available in the system. You can set it
# explicitly to a value larger than 0 to get control over the balance
# between CPU load and processing speed.
DOT_NUM_THREADS = 0
# By default doxygen will use the Helvetica font for all dot files that
# doxygen generates. When you want a differently looking font you can specify
# the font name using DOT_FONTNAME. You need to make sure dot is able to find
# the font, which can be done by putting it in a standard location or by setting
# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
# directory containing the font.
DOT_FONTNAME = FreeSans
@@ -1419,17 +1693,16 @@ DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10
# By default doxygen will tell dot to use the output directory to look for the
# FreeSans.ttf font (which doxygen will put there itself). If you specify a
# different font using DOT_FONTNAME you can set the path where dot
# can find it using this tag.
# By default doxygen will tell dot to use the Helvetica font.
# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
# set the path where dot can find it.
DOT_FONTPATH =
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
# CLASS_DIAGRAMS tag to NO.
CLASS_GRAPH = YES
@@ -1451,6 +1724,15 @@ GROUP_GRAPHS = YES
UML_LOOK = NO
# If the UML_LOOK tag is enabled, the fields and methods are shown inside
# the class node. If there are many fields or methods and many nodes the
# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
# threshold limits the number of items for each type to make the size more
# managable. Set this to 0 for no limit. Note that the threshold may be
# exceeded by 50% before the limit is enforced.
UML_LIMIT_NUM_FIELDS = 10
# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
@@ -1487,11 +1769,11 @@ CALL_GRAPH = NO
CALLER_GRAPH = NO
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
# will graphical hierarchy of all classes instead of a textual one.
# will generate a graphical hierarchy of all classes instead of a textual one.
GRAPHICAL_HIERARCHY = YES
# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
# then doxygen will show the dependencies a directory has on other directories
# in a graphical way. The dependency relations are determined by the #include
# relations between the files in the directories.
@@ -1499,11 +1781,22 @@ GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are png, jpg, or gif
# If left blank png will be used.
# generated by dot. Possible values are svg, png, jpg, or gif.
# If left blank png will be used. If you choose svg you need to set
# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
# visible in IE 9+ (other browsers do not have this requirement).
DOT_IMAGE_FORMAT = png
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
# Note that this requires a modern browser other than Internet Explorer.
# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
# visible. Older versions of IE do not have SVG support.
INTERACTIVE_SVG = NO
# The tag DOT_PATH can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
@@ -1515,6 +1808,12 @@ DOT_PATH = /sw/bin
DOTFILE_DIRS =
# The MSCFILE_DIRS tag can be used to specify one or more directories that
# contain msc files that are included in the documentation (see the
# \mscfile command).
MSCFILE_DIRS =
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
# nodes that will be shown in the graph. If the number of nodes in a graph
# becomes larger than this value, doxygen will truncate the graph, which is

View File

@@ -2,6 +2,7 @@
The Synthesis ToolKit can be used in a variety of ways, depending on your particular needs. Some people choose the classes they need for a particular project and copy those to their working directory. Others create <TT>Makefiles</TT> that compile project-specific class objects from common <TT>src</TT> and <TT>include</TT> directories. And still others like to compile and link to a common library of object files. STK was not designed with one particular style of use in mind.
For specifics on creating Windows applications, see README-Win.txt.
\section rtvsnonrt "Realtime" vs. "Non-Realtime"
@@ -37,19 +38,19 @@ 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__, \__LITTLE_ENDIAN__</TD>
<TD><TT>asound, pthread</TT></TD>
</TR>
<TR>
<TD>Linux</TD>
<TD>OSS (version 4.0 only, use ALSA for MIDI support)</TD>
<TD>__LINUX_OSS__, __LINUX_ALSA__, __LITTLE_ENDIAN__</TD>
<TD>__LINUX_OSS__, \__LINUX_ALSA__, \__LITTLE_ENDIAN__</TD>
<TD><TT>asound, pthread</TT></TD>
</TR>
<TR>
<TD>Linux and Macintosh OS-X</TD>
<TD>Jack</TD>
<TD>__UNIX_JACK__, __LITTLE_ENDIAN__</TD>
<TD>__UNIX_JACK__, \__LITTLE_ENDIAN__</TD>
<TD><TT>asound, pthread, jack</TT></TD>
</TR>
<TR>
@@ -104,24 +105,5 @@ g++ -Wall -D__LITTLE_ENDIAN__ -o sineosc sineosc.cpp -lstk
\endcode
\section compileWin Windows:
STK has been tested on Windows platforms using the Visual .NET compiler
only. It is assumed here that you're familiar with Visual C++ and its
particular idiosyncrasies. STK won't compile in Visual C++ 6.0 any more.
The approach when using Visual C++ is to build a project that
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, FileRead, FileWrite, WvIn, FileWvIn,
FileLoop, WvOut, and FileWvOut 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>, <TT>__WINDOWS_DS__</TT>, and <TT>__WINDOWS_MM__</TT> preprocessor definitions.
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="tutorial.html">Main tutorial page</A>] &nbsp; [<A HREF="filtering.html">Next tutorial</A>]
*/

View File

@@ -28,7 +28,7 @@ then uses the stk::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
stk::Messager instance to accept control input from the accompanying tcl/tk
stk::Messager instance to accept control input from the accompanying Tcl/Tk
graphical user interfaces, from external MIDI devices, or from SKINI
scorefiles.

View File

@@ -1,10 +1,24 @@
/*! \page download Download, Release Notes, and Bug Fixes
/*! \page download Download and Release Notes
\section down Download Version 4.6.0 (31 August 2017):
\section down Download Version 4.6.2 (17 November 2021):
- <A HREF="http://ccrma.stanford.edu/software/stk/release/stk-4.6.0.tar.gz">Source distribution</A>
- <A HREF="http://ccrma.stanford.edu/software/stk/release/stk-4.6.2.tar.gz">Source distribution</A>
\section notes Release Notes:
\subsection v4dot6dot2 Version 4.6.2
- see github site for complete details (github.com/thestk/stk)
- bug fixes in LentPitShift and Granulate classes
- Makefile fixes
- miscellaneous bug fixes
\subsection v4dot6dot1 Version 4.6.1
- see github site for complete details (github.com/thestk/stk)
- various documentation updates
- new Recorder (flute a la Verge) class (thanks to Mathias Bredholt)
- updated Modulate class to allow noise rate control
- new VS2017 project files
- fix in FileLoop::getSize() to return file size (not chunk size)
\subsection v4dot6dot0 Version 4.6.0
- see github site for complete details (github.com/thestk/stk)
- various build system updates
@@ -149,7 +163,7 @@
\subsection v4dot1dot2 Version 4.1.2
- Added Linux JACK support to RtAudio.
- Added optional doNormalize argument to WvIn to allow specification of data normalization or not.
- Added volume control to demo program and various tcl scripts.
- Added volume control to demo program and various Tcl scripts.
- Added support for dynamic rawwavePath() setting.
- WaveLoop bug fix.
- Fixed bug in ADSR::setReleaseTime() method.
@@ -173,7 +187,7 @@
- Added Voicer, SingWave, and VoicForm classes.
- Improvements/fixes to the banded waveguide instruments.
- Demo program now uses Voicer, allowing polyphony.
- Demo tcl/tk scripts changed to use SKINI PitchChange instead of PitchBend.
- Demo Tcl/Tk scripts changed to use SKINI PitchChange instead of PitchBend.
- Demo program response to PitchBend modified to octave up/down.
- Several RtAudio fixes and improvements (OS X and Windows ASIO support added).
- Added nextOut() method to Delay classes.
@@ -267,7 +281,7 @@
- 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.
- 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.
- 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.
- 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.
- 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 (e.g. <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.
- 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).
- 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.

View File

@@ -21,10 +21,11 @@ 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.
STK GitHub site: https://github.com/thestk/stk
STK WWW site: http://ccrma.stanford.edu/software/stk/
The Synthesis ToolKit in C++ (STK)
Copyright (c) 1995--2017 Perry R. Cook and Gary P. Scavone
Copyright (c) 1995--2021 Perry R. Cook and Gary P. Scavone
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -69,7 +70,7 @@ If the resultant sound generated by an STK program sounds like noise (and you're
\section xwindows Why do I get a Tk display error message?
The following error may be printed to your terminal window (depending on the version of the tcl/tk interpreter you are running) if you attempt to start an STK tcl/tk interface without the X Server first running:
The following error may be printed to your terminal window (depending on the version of the Tcl/Tk interpreter you are running) if you attempt to start an STK Tcl/Tk interface without the X Server first running:
\code
Application initialization failed: this isn't a Tk applicationcouldn't connect to display ":0.0"

View File

@@ -33,7 +33,7 @@ The stk::Iir class implements the standard difference equation
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 Iir class automatically normalizes all filter coefficients by that value. The coefficient values are passed to the Iir 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.
where "b" values are numerator coefficients and "a" values are denominator coefficients. Note that if the first denominator coefficient is not 1.0, the Iir class automatically normalizes all filter coefficients by that value. The coefficient values are passed to the Iir class via a C++ <a href="http://www.cplusplus.com/reference/vector/vector/">vector</a>, a container object provided by the C++ Standard Library.
Most STK classes use more specific types of digital filters, such as the stk::OneZero, stk::OnePole, stk::TwoPole, or stk::BiQuad varieties. These classes inherit from the stk::Filter abstract base class and provide specific functionality particular to their use, as well as functions to independently control individual coefficient values.

View File

@@ -2,7 +2,7 @@
<table>
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
<tr><td>&copy;1995--2017 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
<tr><td>&copy;1995--2021 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>

View File

@@ -20,14 +20,14 @@ Here's a link to a book that includes an chapter on STK.
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 20 years now. STK currently runs with realtime support (audio and MIDI) on 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. 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).
The Synthesis ToolKit is free. 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="https://www.tcl.tk/">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. 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> (that 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).
For those instances where a simple GUI with sliders and buttons is helpful, we use <A HREF="https://www.tcl.tk/">Tcl/Tk</A> (that 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).
<H4>A brief history of the <I>Synthesis ToolKit in C++.</I></H4>
@@ -39,8 +39,8 @@ 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
port of STK to Linux early in 1998. He finished the fully compatible
Windows port (using DirectSound API) in June 1998. Numerous
improvements and extensions have been made since then.
The Toolkit has been distributed continuously since 1996 via the <A

View File

@@ -14,7 +14,7 @@ We have written this program to accept control messages from \c STDIN. Assuming
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 that can be downloaded in the SKINI format.
For more fun, surf to <A HREF="http://kern.ccarh.org/">Kern Scores</A> for a huge assortment of other scorefiles that can be downloaded in the SKINI format.
Another easy extension would be to add the \c stk::Messager::startMidiInput() function to the program and then play the instruments via a MIDI keyboard.

View File

@@ -3,7 +3,7 @@
<B>General:</B>
<UL>
<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>
<LI><A HREF="https://www.tcl.tk/">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>
@@ -17,13 +17,13 @@
<UL>
<LI>A C++ compiler is not installed 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>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 and 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.
<LI>The Tcl/Tk interpreter does not ship by default with OS X and 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.
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>
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>
<B>Windows95/98/2000/XP/7 (specific):</B>
<B>Windows95 and later (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.microsoft.com/directx/">DirectX</A> 5.0 (or higher) runtime libraries.</LI>

View File

@@ -46,7 +46,7 @@ This release of STK comes with four separate "project" directories:
\section compiling Compiling:
<UL>
<LI><B>Windows95/98/2000/XP/7:</B> Realtime support is available using either DirectSound, ASIO or WASAPI 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. For WASAPI support, use the <TT>__WINDOWS_WASAPI__</TT> preprocessor definition. 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). Fairly old Visual C++ project files are provided in each project directory, though they may not work on newer versions of MSVS. As well, the MinGW compiler is supported (see below). 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 and later:</B> For specifics on creating Windows applications using Visual Studio, see README-Win.txt.</LI>
<LI><B>Unix (and MinGW) Systems:</B> A GNU <TT>configure</TT> shell script is included in the distribution for unix-based systems. From the top-level distribution directory, type <TT>'./configure'</TT> and the script will create <TT>Makefiles</TT> in each project directory specific to the characteristics of the host computer. Then from within any given project directory (example <TT>demo</TT>), type <TT>'make'</TT> to compile the project. In addition, an STK library can be compiled from within the <TT>src</TT> directory.
@@ -57,9 +57,9 @@ Several options can be supplied to the <TT>configure</TT> script to customize th
<LI><TT>--with-alsa</TT> to choose native ALSA API support (default, linux only)</LI>
<LI><TT>--with-oss</TT> to choose native OSS audio API support (linux only, no native OSS MIDI support)</LI>
<LI><TT>--with-jack</TT> to choose native JACK API support (linux and Macintosh OS-X)</LI>
<LI><TT>--with-core</TT> to choose Core Audio API support (Macintosh OS-X)</LI>
<LI><TT>--with-core</TT> to choose CoreAudio API support (Macintosh OS-X)</LI>
<LI><TT>--with-asio</TT> to choose ASIO Audio API support (Windows)</LI>
<LI><TT>--with-ds</TT> to choose Windows Direct Sound Audio API support (Windows)</LI>
<LI><TT>--with-ds</TT> to choose Windows DirectSound Audio API support (Windows)</LI>
</UL>
<P>
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:
@@ -75,7 +75,7 @@ For those who wish to create their own system-specific <TT>Makefiles</TT>:
<UL>
<LI><B>Linux:</B> Realtime audio support is enabled with either the <TT>__LINUX_ALSA__</TT>, <TT>__UNIX_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 (version 4.0) 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> and <TT>__UNIX_JACK__</TT> preprocessor definitions, which incorporate the CoreAudio audio/MIDI API and/or the JACK 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 (for Core Audio support) and/or the JACK library. See the README-MacOSX file for further system configuration information.</LI>
<LI><B>Macintosh OS X:</B> Realtime support is enabled with the <TT>__MACOSX_CORE__</TT> and <TT>__UNIX_JACK__</TT> preprocessor definitions, which incorporate the CoreAudio audio/MIDI API and/or the JACK 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 (for CoreAudio support) and/or the JACK library. See the README-MacOSX file for further system configuration information.</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>
@@ -94,7 +94,7 @@ All STK programs in this distribution take input control data in the form of <A
<LI>Acquire realtime MIDI messages from a MIDI port on your computer.</LI>
</OL>
<A HREF="http://dev.scriptics.com">Tcl/Tk</A> graphical user interfaces (GUI) are provided with this distribution that can generate realtime SKINI messages. Note that the Messager class allows multiple simultaneous socket client connections, together with MIDI and/or piped input. The <I><B>Md2Skini</B></I> program (in the <I><B>demo</B></I> directory) is mostly obsolete but can be used to create SKINI scorefiles from realtime MIDI input.
<A HREF="https://www.tcl.tk/">Tcl/Tk</A> graphical user interfaces (GUI) are provided with this distribution that can generate realtime SKINI messages. Note that the Messager class allows multiple simultaneous socket client connections, together with MIDI and/or piped input. The <I><B>Md2Skini</B></I> program (in the <I><B>demo</B></I> directory) is mostly obsolete but can be used to create SKINI scorefiles from realtime MIDI input.
\section voices Demo: STK Instruments
@@ -145,7 +145,7 @@ from the <I><B>demo</B></I> directory will play the scorefile <I>bookert.ski</I>
\section rt Demo: Realtime Use
STK realtime audio and MIDI input/output and realtime SKINI control input via socketing support is provided for Linux, Mac OS-X, and Windows95/98/2000/XP operating systems. STK realtime SKINI control input via piping is possible under Linux, Mac OS X, and Windows2000/XP only.
STK realtime audio and MIDI input/output and realtime SKINI control input via socketing support is provided for Linux, Mac OS-X, and Windows95 and later operating systems. STK realtime SKINI control input via piping is possible under Linux, Mac OS X, and Windows2000 and later only.
<P>
Control input and audio output options are typically specified as command-line arguments to STK programs. For example, the <I><B>stk-demo</B></I> program is invoked as:
@@ -178,7 +178,7 @@ from the <I><B>demo</B></I> directory will play the scorefile <I>bookert.ski</I>
\section tcl Realtime Control Input using Tcl/Tk Graphical User Interfaces:
There are a number of <A HREF="http://dev.scriptics.com">Tcl/Tk</A> GUIs supplied with the STK projects. These scripts require Tcl/Tk version 8.0 or later, which can be downloaded for free over the WWW. On Unix and Windows2000/XP platforms, you can run the various executable scripts (e.g. StkDemo.bat) provided with each project to start everything up (you may need to symbolically link the wishXX executable to the name <I>wish</I>). The Physical.bat script just implements the following command-line sequence:
There are a number of <A HREF="https://www.tcl.tk/">Tcl/Tk</A> GUIs supplied with the STK projects. These scripts require Tcl/Tk version 8.0 or later, which can be downloaded for free over the WWW. On Unix and Windows2000 and later platforms, you can run the various executable scripts (e.g. StkDemo.bat) provided with each project to start everything up (you may need to symbolically link the wishXX executable to the name <I>wish</I>). The Physical.bat script just implements the following command-line sequence:
\code
wish < tcl/Physical.tcl | stk-demo Clarinet -or -ip

View File

@@ -1,6 +1,6 @@
STK: A ToolKit of Audio Synthesis Classes and Instruments in C++
By Perry R. Cook and Gary P. Scavone, 1995--2017.
By Perry R. Cook and Gary P. Scavone, 1995--2021.
STK Classes - See the HTML documentation in the html directory for complete information.
@@ -49,7 +49,7 @@ Stk -| UdpSocket
.- Instrmnt -|
|- Drummer
|
|- Clarinet, BlowHole, Saxofony, Flute, Brass, BlowBotl, Bowed, Plucked, StifKarp, Sitar
|- Clarinet, BlowHole, Saxofony, Flute, Brass, BlowBotl, Bowed, Plucked, StifKarp, Sitar, Recorder
|
|- Shakers
|
@@ -129,6 +129,7 @@ Clarinet.cpp Pretty Good Clarinet DelayL, ReedTabl, OneZero, Envel
BlowHole.cpp Clarinet w/ Tone & Vent Holes DelayL, ReedTabl, OneZero, Envelope, Noise, WaveLoop, PoleZero
Saxofony.cpp A Faux Saxophone DelayL, ReedTabl, OneZero, Envelope, Noise, WaveLoop
Flute.cpp Pretty Good Flute JetTabl, DelayL, OnePole, PoleZero, Noise, ADSR, WaveLoop
Recorder.cpp A More Physical Flute DelayL, IIR, Noise, ADSR, SineWave
BlowBotl.cpp Blown Bottle JetTabl, BiQuad, PoleZero, Noise, ADSR, WaveLoop
BandedWG.cpp Banded Waveguide Meta-Object Delay, BowTabl, ADSR, BiQuad
Modal.cpp N Resonances Envelope, WaveLoop, BiQuad, OnePole

View File

@@ -1,35 +1,43 @@
This file contains instructions for integrating the STK in Xcode projects and solutions to common integration issues.
# Readme
* [Setup](#setup)
* [Usage](#usage)
* [Troubleshooting](#troubleshooting)
## Setup
### If you have [Cocoapods](http://cocoapods.org/)
### [CocoaPods](https://cocoapods.org) (Recommended)
1. Add `pod 'STK', '~> 4.5'` to your Podfile.
1. Add `pod 'STK', '~> 4.6'` to your Podfile.
1. Run `pod install`
### If you don't have Cocoapods
### Manual
1. Clone or [download][download_link] the STK into your project's directory.
1. Open the **STK for iOS** folder, and drag and drop **STK.xcodeproj** into your Xcode project.
1. Open your project's settings, open the *Build Phases* tab. In the *Link Binary with Libraries* section, add **libSTK.a**.
1. Open your project's settings, open the *Build Phases* tab. In the *Link Binary with Libraries* section, add **libSTK.a**.
![][linking_libSTK_screenshot]
1. In the *Dependencies* section, add "rawwaves"
1. In your project's settings, open the *Build Settings* tab. In the *Search Paths* section, double click on the field to the right of *Header Search Paths*, and add the path to the STK's **include** directory relative to your Xcode project's directory.
![][header_search_paths_screenshot]
## Usage
1. Import the STK classes in the source files you require.
1. Import the STK classes you require in your Objective-C source files (Swift does not yet support importing C++ code)
* E.g. `#import "SineWave.h"`
1. Change the extension of Objective-C files that import STK files to **.mm**.
1. Change the extension of any Objective-C files that import STK files to **.mm**.
* E.g. **ViewController.m** —> **ViewController.mm**
You can also look at the [iOS Demo project](..projects/demo/iOS%20Demo) for a sample usage.
1. If you use a class that makes use of raw wave files (such as `Mandolin`), make sure you call `Stk::setRawwavePath` beforehand in your code.
See the [iOS Demo project](..projects/demo/iOS%20Demo) for a sample usage.
## Troubleshooting
@@ -38,54 +46,43 @@ You can also look at the [iOS Demo project](..projects/demo/iOS%20Demo) for a sa
If you get this error when `#import`ing an STK header, you have added the wrong header search path for the STK in your project's settings (see Step 4 in Setup)
The STK's header search path you need to add is the path to the STK's **include** directory relative to your project's directory (as if you were `cd`ing into it). For example, it is `stk/include/` if the stk directory is inside your project's directory, but it is `../stk/include/` if both share the same directory.
The STK's header search path you need to add is the path to the STK's **include** directory relative to your project's directory (as if you were `cd`ing into it). For example, it is `stk/include/` if the stk directory is inside your project's directory, but it is `../stk/include/` if both share the same directory.
If this problem doesn't go away:
1. Delete **STK.xcodeproj** from your Xcode project
1. Move the STK directory within your project's directory.
1. Move the STK directory within your project's directory.
1. Follow step 1 from **Setup**, add `stk/include` to the *Header Search Paths*.
If that doesn't solve it:
Install Cocoapods and use it to install the STK. It takes one minute and will make your life easier. Visit the [Cocoapods website](http://cocoapods.org/) for installation instructions.
Install CocoaPods and use it to install the STK. It takes one minute and will make your life easier. Visit the [CocoaPods website](https://cocoapods.org) for installation instructions.
### FileRead::open: could not open or find file (../../rawwaves/filename.raw)!
If you use a class that makes use of raw waves (such as `Mandolin`, `Wurley`, or `Rhodey`) you need to make sure that the STK's raw wave files are copied into your bundle and that the STK knows where they are. You'll know you need to if you get this runtime error:
`FileRead::open: could not open or find file (../../rawwaves/filename.raw)!`
#### If you're using Cocoapods
#### If you're using CocoaPods
Add this code before using a class that needs the raw waves:
Add this code before using a class that needs the raw waves:
```objective-c
stk::Stk::setRawwavePath([[[NSBundle mainBundle] pathForResource:@"rawwaves" ofType:@"bundle"] UTF8String]);
```
#### If you're not using Cocoapods
#### If you're not using CocoaPods
1. Open your project's settings, open the *Build Phases* tab.
1. In the *Copy Bundle Resources*, drag and drop **rawwaves.bundle** (it's located in **STK.xcodeproj**'s **Helpers** folder).
1. Then add this code before using a class that needs the raw waves:
1. Open your project's settings, open the *Build Phases* tab.
1. In the *Copy Bundle Resources*, drag and drop **rawwaves.bundle** (it's located in **STK.xcodeproj**'s **Helpers** folder).
1. Then add this code before using a class that needs the raw waves:
```objective-c
NSBundle *rawwaveBundle = [NSBundle bundleWithURL:[[NSBundle mainBundle] URLForResource:@"rawwaves" withExtension:@"bundle"]];
stk::Stk::setRawwavePath([[rawwaveBundle resourcePath] UTF8String]);
```
### rawwaves.bundle: No such file or directory
This means that **rawwaves.bundle** hasn't been copied to the build folder, so you'll need to do it manually:
Select the rawwaves scheme:
![][rawwaves_scheme_screenshot]
Build it (⌘+B) then build your project's main scheme.
### Apple Mach-O Linker Error
This means that **STKLib.a** isn't being linked to your binary. Follow step 2 above in [Setup](#setup).
This means that **STKLib.a** isn't being linked to your binary. Follow step 2 above in [Setup](#setup).
[download_link]: https://github.com/thestk/stk/archive/master.zip

View File

@@ -726,14 +726,15 @@
B08F608818BA9B0600C14A90 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0720;
LastUpgradeCheck = 1140;
};
buildConfigurationList = B08F608B18BA9B0600C14A90 /* Build configuration list for PBXProject "STK" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = B08F608718BA9B0600C14A90;
productRefGroup = B05F5A5A18BC1018008EE790 /* Helpers */;
@@ -895,7 +896,33 @@
B08F608C18BA9B0600C14A90 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
};
name = Debug;
@@ -903,6 +930,32 @@
B08F608D18BA9B0600C14A90 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
};
name = Release;
};
@@ -945,7 +998,7 @@
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
);
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = "";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -988,7 +1041,7 @@
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
);
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = "";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;

View File

@@ -2,9 +2,9 @@
This project briefly shows how to manually integrate the STK static library into an Xcode project. See the **README** file in the STK's `iOS` directory for precise instructions.
Currently, this project does not output sound, it only shows how to generate audio samples from the STK classes within an iOS project, and how to control STK objects via UI controls.
Currently, this project does not output sound, it only shows how to generate audio samples from the STK classes within an iOS project, and how to control STK objects via UI controls. These samples need to be fed into an audio engine for them to be heard.
Note the following:
* ViewController needs to be renamed with the **.mm** extension as it's importing STK files, which are C++.
* The header search paths in the *Build Settings* of **iOS Demo.xcodeproj** point to `../../include/` because the STK's `include` directory is two directories up relative to it.
* The header search paths in the *Build Settings* of **iOS Demo.xcodeproj** point to `../../include/` because the STK's `include` directory is two directories up relative to it.

View File

@@ -25,6 +25,13 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
834A47CB24435D350028575A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B0779A7E18D376A5004DA9B7 /* STK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = B0EC337B18CB73480005787B;
remoteInfo = rawwaves;
};
B02FD55218C520D70009ECA9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B02FD52A18C520D60009ECA9 /* Project object */;
@@ -68,7 +75,7 @@
B02FD56E18C521560009ECA9 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
B02FD56F18C521560009ECA9 /* ViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewController.mm; sourceTree = "<group>"; };
B0779A7E18D376A5004DA9B7 /* STK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = STK.xcodeproj; path = ../STK.xcodeproj; sourceTree = "<group>"; };
B0779A8918D37977004DA9B7 /* README.MD */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.MD; sourceTree = "<group>"; };
B0779A8918D37977004DA9B7 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -99,7 +106,7 @@
B02FD52918C520D60009ECA9 = {
isa = PBXGroup;
children = (
B0779A8918D37977004DA9B7 /* README.MD */,
B0779A8918D37977004DA9B7 /* README.md */,
B0779A7E18D376A5004DA9B7 /* STK.xcodeproj */,
B02FD53B18C520D60009ECA9 /* iOS Demo */,
B02FD55418C520D70009ECA9 /* iOS DemoTests */,
@@ -193,6 +200,7 @@
buildRules = (
);
dependencies = (
834A47CC24435D350028575A /* PBXTargetDependency */,
);
name = "iOS Demo";
productName = "iOS Demo";
@@ -223,7 +231,7 @@
B02FD52A18C520D60009ECA9 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0510;
LastUpgradeCheck = 1140;
ORGANIZATIONNAME = "Ariel Elkin";
TargetAttributes = {
B02FD54C18C520D70009ECA9 = {
@@ -233,10 +241,11 @@
};
buildConfigurationList = B02FD52D18C520D60009ECA9 /* Build configuration list for PBXProject "iOS Demo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = B02FD52918C520D60009ECA9;
productRefGroup = B02FD53318C520D60009ECA9 /* Products */;
@@ -315,6 +324,11 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
834A47CC24435D350028575A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = rawwaves;
targetProxy = 834A47CB24435D350028575A /* PBXContainerItemProxy */;
};
B02FD55318C520D70009ECA9 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B02FD53118C520D60009ECA9 /* iOS Demo */;
@@ -346,22 +360,37 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -374,7 +403,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
@@ -384,29 +413,43 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
@@ -425,6 +468,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
);
INFOPLIST_FILE = "iOS Demo/iOS Demo-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "stk.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
@@ -443,6 +487,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
);
INFOPLIST_FILE = "iOS Demo/iOS Demo-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "stk.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
@@ -464,6 +509,7 @@
"$(inherited)",
);
INFOPLIST_FILE = "iOS DemoTests/iOS DemoTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "stk.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
@@ -482,6 +528,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "iOS Demo/iOS Demo-Prefix.pch";
INFOPLIST_FILE = "iOS DemoTests/iOS DemoTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "stk.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;

View File

@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>stk.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>stk.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>

View File

@@ -17,7 +17,7 @@ namespace stk {
be non-negative. All time settings are in seconds and must be
positive.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -26,7 +26,7 @@ namespace stk {
to \e keyOn and \e keyOff messages by ramping to
1.0 on keyOn and to 0.0 on keyOff.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -35,7 +35,7 @@ namespace stk {
- Glass Harmonica = 2
- Tibetan Bowl = 3
by Georg Essl, 1999 - 2004.
by Georg Essl, 1999--2004.
Modified for STK 4.0 by Gary Scavone.
*/
/***************************************************/

View File

@@ -35,7 +35,7 @@ namespace stk {
type who should worry about this (making
money) worry away.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -13,7 +13,7 @@ namespace stk {
Methods are provided for creating a resonance or notch in the
frequency response while maintaining a constant filter gain.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -35,7 +35,7 @@ namespace stk {
in the presence of significant aliasing.
Based on initial code of Robin Davies, 2005.
Modified algorithm code by Gary Scavone, 2005 - 2006.
Modified algorithm code by Gary Scavone, 2005--2006.
*/
/***************************************************/

View File

@@ -25,7 +25,7 @@ namespace stk {
- Vibrato Gain = 1
- Volume = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -43,7 +43,7 @@ namespace stk {
- Register State = 1
- Breath Pressure = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -15,7 +15,7 @@ namespace stk {
(1986). The output is an instantaneous
reflection coefficient value.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -32,7 +32,7 @@ namespace stk {
- Frequency = 101
- Volume = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
Contributions by Esteban Maestre, 2011.
*/
/***************************************************/

View File

@@ -28,7 +28,7 @@ namespace stk {
- Vibrato Gain = 1
- Volume = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -14,7 +14,7 @@ namespace stk {
This class implements a chorus effect. It takes a monophonic
input signal and produces a stereo output signal.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -31,7 +31,7 @@ namespace stk {
- Vibrato Gain = 1
- Breath Pressure = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -17,7 +17,7 @@ namespace stk {
A non-interpolating delay line is typically used in fixed
delay-length applications, such as for reverberation.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -21,7 +21,7 @@ namespace stk {
minimum delay possible in this implementation is limited to a
value of 0.5.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -20,7 +20,7 @@ namespace stk {
delay setting. The use of higher order Lagrange interpolators can
typically improve (minimize) this attenuation characteristic.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -20,7 +20,7 @@ namespace stk {
of simultaneous voices) via a #define in the
Drummer.h.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -12,7 +12,7 @@ namespace stk {
This class implements an echo effect.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -14,7 +14,7 @@ namespace stk {
subclasses. It is general enough to support both monophonic and
polyphonic input/output classes.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -12,9 +12,10 @@ namespace stk {
This class implements a simple linear line envelope generator
which is capable of ramping to an arbitrary target value by a
specified \e rate. It also responds to simple \e keyOn and \e
keyOff messages, ramping to 1.0 on keyOn and to 0.0 on keyOff.
keyOff messages, ramping to a specified target (default = 1.0) on
keyOn and to a specified target (default = 0.0) on keyOff.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/
@@ -31,11 +32,11 @@ class Envelope : public Generator
//! Assignment operator.
Envelope& operator= ( const Envelope& e );
//! Set target = 1.
void keyOn( void ) { this->setTarget( 1.0 ); };
//! Start ramping to specified target (default = 1).
void keyOn( StkFloat target = 1.0 ) { this->setTarget( target ); };
//! Set target = 0.
void keyOff( void ) { this->setTarget( 0.0 ); };
//! Start ramping to specified target (default = 0).
void keyOff( StkFloat target = 0.0 ) { this->setTarget( target ); };
//! Set the \e rate.
/*!
@@ -46,7 +47,7 @@ class Envelope : public Generator
//! Set the \e rate based on a positive time duration (seconds).
/*!
The \e rate is calculated such that the envelope will ramp from
a value of 0.0 to 1.0 in the specified time duration.
the current value to the current target in the specified time duration.
*/
void setTime( StkFloat time );

View File

@@ -30,7 +30,7 @@ namespace stk {
type who should worry about this (making
money) worry away.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -33,7 +33,7 @@ namespace stk {
type who should worry about this (making
money) worry away.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -19,7 +19,7 @@ namespace stk {
the overloaded one that takes an StkFrames object for
multi-channel and/or multi-frame data.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/
@@ -74,7 +74,8 @@ class FileLoop : protected FileWvIn
void normalize( StkFloat peak ) { FileWvIn::normalize( peak ); };
//! Return the file size in sample frames.
unsigned long getSize( void ) const { return data_.frames(); };
//unsigned long getSize( void ) const { return data_.frames(); };
unsigned long getSize( void ) const { return fileSize_; };
//! Return the input file sample rate in Hz (not the data read rate).
/*!

View File

@@ -34,7 +34,7 @@ namespace stk {
such variable is found, the sample rate is
assumed to be 44100 Hz.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -24,7 +24,7 @@ namespace stk {
type, the data type will automatically be modified. Compressed
data types are not supported.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -45,7 +45,7 @@ namespace stk {
See the FileRead class for a description of the supported audio
file formats.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -25,7 +25,7 @@ namespace stk {
Currently, FileWvOut is non-interpolating and the output rate is
always Stk::sampleRate().
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -15,7 +15,7 @@ namespace stk {
filter subclasses. It is general enough to support both
monophonic and polyphonic input/output classes.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -23,7 +23,7 @@ namespace stk {
This structure results in one extra multiply per computed sample,
but allows easy control of the overall filter gain.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -32,7 +32,7 @@ namespace stk {
- Vibrato Gain = 1
- Breath Pressure = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/
@@ -123,11 +123,12 @@ inline StkFloat Flute :: tick( unsigned int )
breathPressure += breathPressure * ( noiseGain_ * noise_.tick() + vibratoGain_ * vibrato_.tick() );
StkFloat temp = -filter_.tick( boreDelay_.lastOut() );
temp = dcBlock_.tick( temp ); // Block DC on reflection.
//temp = dcBlock_.tick( temp ); // Block DC on reflection.
pressureDiff = breathPressure - (jetReflection_ * temp);
pressureDiff = jetDelay_.tick( pressureDiff );
pressureDiff = jetTable_.tick( pressureDiff ) + (endReflection_ * temp);
//pressureDiff = jetTable_.tick( pressureDiff ) + (endReflection_ * temp);
pressureDiff = dcBlock_.tick(jetTable_.tick( pressureDiff )) + (endReflection_ * temp); // moved the DC blocker to after the jet non-linearity (GPS, 29 Jan. 2020)
lastFrame_[0] = (StkFloat) 0.3 * boreDelay_.tick( pressureDiff );
lastFrame_[0] *= outputGain_;

View File

@@ -13,7 +13,7 @@ namespace stk {
over time from one frequency setting to another. It provides
methods for controlling the sweep rate and target frequency.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -13,7 +13,7 @@ namespace stk {
implement tables or other types of input to output function
mappings.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -13,7 +13,7 @@ namespace stk {
generator sample-source subclasses. It is general enough to
support both monophonic and polyphonic output classes.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -21,7 +21,7 @@ namespace stk {
Chris Rolfe and Damian Keller, though there are likely to be a
number of differences in the actual implementation.
by Gary Scavone, 2005 - 2010.
by Gary Scavone, 2005--2021.
*/
/***************************************************/

View File

@@ -132,17 +132,20 @@ class Guitar : public Stk
StkFrames lastFrame_;
};
// NOTE: It is not possible to implement the Smith coupled string model here because the Twang class does
// not currently offer the chance to have access to a traveling-wave component. Thus, the coupling
// implemented here is approximate.
inline StkFloat Guitar :: tick( StkFloat input )
{
StkFloat temp, output = 0.0;
lastFrame_[0] /= strings_.size(); // evenly spread coupling across strings
lastFrame_[0] = couplingGain_ * couplingFilter_.tick( lastFrame_[0] ) / strings_.size();
for ( unsigned int i=0; i<strings_.size(); i++ ) {
if ( stringState_[i] ) {
temp = input;
// If pluckGain < 0.2, let string ring but don't pluck it.
if ( filePointer_[i] < excitation_.frames() && pluckGains_[i] > 0.2 )
temp += pluckGains_[i] * excitation_[filePointer_[i]++];
temp += couplingGain_ * couplingFilter_.tick( lastFrame_[0] ); // bridge coupling
temp += lastFrame_[0]; // bridge coupling
output += strings_[i].tick( temp );
// Check if string energy has decayed sufficiently to turn it off.
if ( stringState_[i] == 1 ) {

View File

@@ -31,7 +31,7 @@ namespace stk {
type who should worry about this (making
money) worry away.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -27,7 +27,7 @@ namespace stk {
This structure results in one extra multiply per computed sample,
but allows easy control of the overall filter gain.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -31,7 +31,7 @@ namespace stk {
data type for the incoming stream is signed 16-bit integers,
though any of the defined StkFormats are permissible.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -25,7 +25,7 @@ namespace stk {
data type is signed 16-bit integers but any of the defined
StkFormats are permissible.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -12,7 +12,7 @@ namespace stk {
This class provides a common interface for
all STK instruments.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -24,7 +24,7 @@ namespace stk {
one-pole lowpass filters have been added inside
the feedback comb filters.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -16,7 +16,7 @@ namespace stk {
Consult Fletcher and Rossing, Karjalainen,
Cook, and others for more information.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -142,7 +142,7 @@ inline void LentPitShift::process()
dpt[delay_] = dt[delay_] * delay_ / cumDt[delay_];
// Look for a minimum
if ( dpt[delay_-1]-dpt[delay_-2] < 0 && dpt[delay_]-dpt[delay_-1] > 0 ) {
if ( delay_ > 1 && dpt[delay_-1]-dpt[delay_-2] < 0 && dpt[delay_]-dpt[delay_-1] > 0 ) {
// Check if the minimum is under the threshold
if ( dpt[delay_-1] < threshold_ ){
lastPeriod_ = delay_-1;

View File

@@ -31,7 +31,7 @@ namespace stk {
- String Detuning = 1
- Microphone Position = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -27,7 +27,7 @@ namespace stk {
- Mesh Decay = 11
- X-Y Input Position = 1
by Julius Smith, 2000 - 2002.
by Julius Smith, 2000--2002.
Revised by Gary Scavone for STK, 2002.
*/
/***************************************************/

View File

@@ -46,7 +46,7 @@ namespace stk {
This class is primarily for use in STK example programs but it is
generic enough to work in many other contexts.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -22,7 +22,7 @@ namespace stk {
Tempo changes are internally tracked by the class and reflected in
the values returned by the function getTickSeconds().
by Gary P. Scavone, 2003 - 2010.
by Gary P. Scavone, 2003--2021.
*/
/**********************************************************************/

View File

@@ -19,7 +19,7 @@ namespace stk {
(non-sweeping BiQuad filters), where N is set
during instantiation.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -31,7 +31,7 @@ namespace stk {
- Two Fixed = 7
- Clump = 8
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -16,7 +16,7 @@ namespace stk {
modulations to give a nice, natural human
modulation function.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/
@@ -41,6 +41,9 @@ class Modulate : public Generator
//! Set the periodic (vibrato) gain.
void setVibratoGain( StkFloat gain ) { vibratoGain_ = gain; };
//! Set the periodic (vibrato) rate or frequency in Hz.
void setRandomRate( StkFloat rate ) { noiseRate_ = (unsigned int) ( rate * Stk::sampleRate() / 22050.0 ); };
//! Set the random modulation gain.
void setRandomGain( StkFloat gain );

View File

@@ -22,7 +22,7 @@ namespace stk {
- Vibrato Gain = 1
- Gain = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -29,7 +29,7 @@ namespace stk {
systems, the pthread library is used. Under
Windows, critical sections are used.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -18,7 +18,7 @@ namespace stk {
another allpass in series, followed by two allpass filters in
parallel with corresponding right and left outputs.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -14,7 +14,7 @@ namespace stk {
C rand() function. The quality of the rand()
function varies from one OS to another.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -13,7 +13,7 @@ namespace stk {
provided for setting the pole position along the real axis of the
z-plane while maintaining a constant peak filter gain.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -13,7 +13,7 @@ namespace stk {
provided for setting the zero position along the real axis of the
z-plane while maintaining a constant filter gain.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -17,7 +17,7 @@ namespace stk {
allpass and comb delay filters. This class implements two series
allpass units and two parallel comb filters.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -29,7 +29,7 @@ namespace stk {
type who should worry about this (making
money) worry away.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -13,7 +13,7 @@ namespace stk {
set of 32 static phoneme formant parameters
and provide access to those values.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -13,7 +13,7 @@ namespace stk {
This class implements a simple pitch shifter
using delay lines.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -27,7 +27,7 @@ namespace stk {
Stanford, bearing the names of Karplus and/or
Strong.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -14,7 +14,7 @@ namespace stk {
coefficient. Another method is provided to create a DC blocking
filter.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

167
include/Recorder.h Normal file
View File

@@ -0,0 +1,167 @@
#ifndef STK_RECORDER_H
#define STK_RECORDER_H
#include "Instrmnt.h"
#include "Iir.h"
#include "DelayL.h"
#include "Noise.h"
#include "SineWave.h"
#include "ADSR.h"
namespace stk {
/***************************************************/
/*! \class Recorder
\brief A recorder / flute physical model.
This class implements a physical model of a recorder /
flute instrument, based on the paper "Sound production
in recorderlike instruments. II. A simulation model."
by M.P. Verge, A. Hirschberg and R. Causse, Journal of
the Acoustical Society of America, 1997.
Control Change Numbers:
- Softness = 2
- Noise Gain = 4
- Noise Cutoff = 16
- Vibrato Frequency = 11
- Vibrato Gain = 1
- Breath Pressure = 128
by Mathias Bredholt, McGill University.
Formatted for STK by Gary Scavone, 2021.
*/
/***************************************************/
class Recorder : public Instrmnt
{
public:
//! Class constructor.
Recorder( void );
//! Class destructor.
~Recorder( void );
//! Reset and clear all internal state.
void clear( void );
//! Set instrument parameters for a particular frequency.
void setFrequency( StkFloat val );
//! Apply breath velocity to instrument with given amplitude and rate of increase.
void startBlowing( StkFloat amplitude, StkFloat rate );
//! Decrease breath velocity with given rate of decrease.
void stopBlowing( StkFloat rate );
//! Start a note with the given frequency and amplitude.
void noteOn( StkFloat frequency, StkFloat amplitude );
//! Stop a note with the given amplitude (speed of decay).
void noteOff( StkFloat amplitude );
//! Perform the control change specified by \e number and \e value (0.0 - 128.0).
void controlChange( int number, StkFloat value );
//! Compute and return one output sample.
StkFloat tick( unsigned int channel = 0 );
//! Fill a channel of the StkFrames object with computed outputs.
/*!
The \c channel argument must be less than the number of
channels in the StkFrames argument (the first channel is specified
by 0). However, range checking is only performed if _STK_DEBUG_
is defined during compilation, in which case an out-of-range value
will trigger an StkError exception.
*/
StkFrames& tick( StkFrames& frames, unsigned int channel = 0 );
void setBlowPressure( StkFloat val );
void setVibratoGain( StkFloat val );
void setVibratoFrequency( StkFloat val );
void setNoiseGain( StkFloat val );
void setBreathCutoff( StkFloat val );
void setSoftness( StkFloat val );
private:
DelayL pinDelay_;
DelayL poutDelay_;
DelayL jetDelay_;
Iir radiation_filter_;
Iir visco_in_filter_;
Iir visco_out_filter_;
Iir jetFilter_;
Noise turb_;
Iir turbFilter_;
SineWave vibrato_;
ADSR adsr_;
//StkFloat M{ 0 };
//StkFloat maxPressure_( 0 );
double maxPressure_;
//StkFloat blow{ 0 };
StkFloat vibratoGain_;
StkFloat noiseGain_;
StkFloat breathCutoff_;
StkFloat outputGain_;
StkFloat psi_;
StkFloat poutL_;
StkFloat pout_;
StkFloat poutm1_;
StkFloat poutm2_;
StkFloat pin_;
StkFloat pinm1_;
StkFloat pinm2_;
StkFloat b1;
StkFloat b3;
StkFloat b4;
StkFloat Uj_;
StkFloat Ujm1_;
StkFloat Qj_;
StkFloat Qjm1_;
StkFloat Qjm2_;
StkFloat Q1_;
StkFloat Q1m1_;
StkFloat Q1m2_;
StkFloat Qp_;
StkFloat Qpm1_;
StkFloat pm_;
};
inline StkFrames& Recorder :: tick( StkFrames& frames, unsigned int channel )
{
unsigned int nChannels = lastFrame_.channels();
#if defined(_STK_DEBUG_)
if ( channel > frames.channels() - nChannels ) {
oStream_ << "Recorder::tick(): channel and StkFrames arguments are incompatible!";
handleError( StkError::FUNCTION_ARGUMENT );
}
#endif
StkFloat *samples = &frames[channel];
unsigned int j, hop = frames.channels() - nChannels;
if ( nChannels == 1 ) {
for ( unsigned int i=0; i<frames.frames(); i++, samples += hop )
*samples++ = tick();
}
else {
for ( unsigned int i=0; i<frames.frames(); i++, samples += hop ) {
*samples++ = tick();
for ( j=1; j<nChannels; j++ )
*samples++ = lastFrame_[j];
}
}
return frames;
}
} // stk namespace
#endif

View File

@@ -20,7 +20,7 @@ namespace stk {
Smith (1986), Hirschman, Cook, Scavone, and
others for more information.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -23,7 +23,7 @@ namespace stk {
- Zero Radii = 1
- Envelope Gain = 128
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -33,7 +33,7 @@ namespace stk {
type who should worry about this (making
money) worry away.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

View File

@@ -7,10 +7,11 @@
and OSS), Macintosh OS X (CoreAudio and Jack), and Windows
(DirectSound, ASIO and WASAPI) operating systems.
RtAudio GitHub site: https://github.com/thestk/rtaudio
RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/
RtAudio: realtime audio i/o C++ classes
Copyright (c) 2001-2017 Gary P. Scavone
Copyright (c) 2001-2021 Gary P. Scavone
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
@@ -45,7 +46,21 @@
#ifndef __RTAUDIO_H
#define __RTAUDIO_H
#define RTAUDIO_VERSION "5.0.0"
#define RTAUDIO_VERSION "5.2.0"
#if defined _WIN32 || defined __CYGWIN__
#if defined(RTAUDIO_EXPORT)
#define RTAUDIO_DLL_PUBLIC __declspec(dllexport)
#else
#define RTAUDIO_DLL_PUBLIC
#endif
#else
#if __GNUC__ >= 4
#define RTAUDIO_DLL_PUBLIC __attribute__( (visibility( "default" )) )
#else
#define RTAUDIO_DLL_PUBLIC
#endif
#endif
#include <string>
#include <vector>
@@ -102,7 +117,7 @@ static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/mi
Certain audio APIs offer a number of parameters that influence the
I/O latency of a stream. By default, RtAudio will attempt to set
these parameters internally for robust (glitch-free) performance
(though some APIs, like Windows Direct Sound, make this difficult).
(though some APIs, like Windows DirectSound, make this difficult).
By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream()
function, internal stream settings will be influenced in an attempt
to minimize stream latency, though possibly at the expense of stream
@@ -179,6 +194,7 @@ static const RtAudioStreamStatus RTAUDIO_OUTPUT_UNDERFLOW = 0x2; // The output
\param userData A pointer to optional data provided by the client
when opening the stream (default = NULL).
\return
To continue normal stream operation, the RtAudioCallback function
should return a value of zero. To stop the stream and drain the
output buffer, the function should return a value of one. To abort
@@ -200,7 +216,7 @@ typedef int (*RtAudioCallback)( void *outputBuffer, void *inputBuffer,
*/
/************************************************************************/
class RtAudioError : public std::runtime_error
class RTAUDIO_DLL_PUBLIC RtAudioError : public std::runtime_error
{
public:
//! Defined RtAudioError types.
@@ -210,12 +226,12 @@ class RtAudioError : public std::runtime_error
UNSPECIFIED, /*!< The default, unspecified error type. */
NO_DEVICES_FOUND, /*!< No devices found on system. */
INVALID_DEVICE, /*!< An invalid device ID was specified. */
MEMORY_ERROR, /*!< An error occured during memory allocation. */
MEMORY_ERROR, /*!< An error occurred during memory allocation. */
INVALID_PARAMETER, /*!< An invalid parameter was specified to a function. */
INVALID_USE, /*!< The function was called incorrectly. */
DRIVER_ERROR, /*!< A system driver error occured. */
SYSTEM_ERROR, /*!< A system error occured. */
THREAD_ERROR /*!< A thread error occured. */
DRIVER_ERROR, /*!< A system driver error occurred. */
SYSTEM_ERROR, /*!< A system error occurred. */
THREAD_ERROR /*!< A thread error occurred. */
};
//! The constructor.
@@ -260,7 +276,7 @@ typedef void (*RtAudioErrorCallback)( RtAudioError::Type type, const std::string
class RtApi;
class RtAudio
class RTAUDIO_DLL_PUBLIC RtAudio
{
public:
@@ -274,38 +290,30 @@ class RtAudio
MACOSX_CORE, /*!< Macintosh OS-X Core Audio API. */
WINDOWS_WASAPI, /*!< The Microsoft WASAPI API. */
WINDOWS_ASIO, /*!< The Steinberg Audio Stream I/O API. */
WINDOWS_DS, /*!< The Microsoft Direct Sound API. */
RTAUDIO_DUMMY /*!< A compilable but non-functional API. */
WINDOWS_DS, /*!< The Microsoft DirectSound API. */
RTAUDIO_DUMMY, /*!< A compilable but non-functional API. */
NUM_APIS /*!< Number of values in this enum. */
};
//! The public device information structure for returning queried values.
struct DeviceInfo {
bool probed; /*!< true if the device capabilities were successfully probed. */
std::string name; /*!< Character string device identifier. */
unsigned int outputChannels; /*!< Maximum output channels supported by device. */
unsigned int inputChannels; /*!< Maximum input channels supported by device. */
unsigned int duplexChannels; /*!< Maximum simultaneous input/output channels supported by device. */
bool isDefaultOutput; /*!< true if this is the default output device. */
bool isDefaultInput; /*!< true if this is the default input device. */
unsigned int outputChannels{}; /*!< Maximum output channels supported by device. */
unsigned int inputChannels{}; /*!< Maximum input channels supported by device. */
unsigned int duplexChannels{}; /*!< Maximum simultaneous input/output channels supported by device. */
bool isDefaultOutput{false}; /*!< true if this is the default output device. */
bool isDefaultInput{false}; /*!< true if this is the default input device. */
std::vector<unsigned int> sampleRates; /*!< Supported sample rates (queried from list of standard rates). */
unsigned int preferredSampleRate; /*!< Preferred sample rate, eg. for WASAPI the system sample rate. */
RtAudioFormat nativeFormats; /*!< Bit mask of supported data formats. */
// Default constructor.
DeviceInfo()
:probed(false), outputChannels(0), inputChannels(0), duplexChannels(0),
isDefaultOutput(false), isDefaultInput(false), preferredSampleRate(0), nativeFormats(0) {}
unsigned int preferredSampleRate{}; /*!< Preferred sample rate, e.g. for WASAPI the system sample rate. */
RtAudioFormat nativeFormats{}; /*!< Bit mask of supported data formats. */
};
//! The structure for specifying input or ouput stream parameters.
//! The structure for specifying input or output stream parameters.
struct StreamParameters {
unsigned int deviceId; /*!< Device index (0 to getDeviceCount() - 1). */
unsigned int nChannels; /*!< Number of channels. */
unsigned int firstChannel; /*!< First channel index on device (default = 0). */
// Default constructor.
StreamParameters()
: deviceId(0), nChannels(0), firstChannel(0) {}
unsigned int deviceId{}; /*!< Device index (0 to getDeviceCount() - 1). */
unsigned int nChannels{}; /*!< Number of channels. */
unsigned int firstChannel{}; /*!< First channel index on device (default = 0). */
};
//! The structure for specifying stream options.
@@ -333,7 +341,7 @@ class RtAudio
Certain audio APIs offer a number of parameters that influence the
I/O latency of a stream. By default, RtAudio will attempt to set
these parameters internally for robust (glitch-free) performance
(though some APIs, like Windows Direct Sound, make this difficult).
(though some APIs, like Windows DirectSound, make this difficult).
By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream()
function, internal stream settings will be influenced in an attempt
to minimize stream latency, though possibly at the expense of stream
@@ -366,14 +374,10 @@ class RtAudio
RtAudio with Jack, each instance must have a unique client name.
*/
struct StreamOptions {
RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT). */
unsigned int numberOfBuffers; /*!< Number of stream buffers. */
RtAudioStreamFlags flags{}; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT). */
unsigned int numberOfBuffers{}; /*!< Number of stream buffers. */
std::string streamName; /*!< A stream name (currently used only in Jack). */
int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */
// Default constructor.
StreamOptions()
: flags(0), numberOfBuffers(0), priority(0) {}
int priority{}; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */
};
//! A static function to determine the current RtAudio version.
@@ -387,6 +391,29 @@ class RtAudio
*/
static void getCompiledApi( std::vector<RtAudio::Api> &apis );
//! Return the name of a specified compiled audio API.
/*!
This obtains a short lower-case name used for identification purposes.
This value is guaranteed to remain identical across library versions.
If the API is unknown, this function will return the empty string.
*/
static std::string getApiName( RtAudio::Api api );
//! Return the display name of a specified compiled audio API.
/*!
This obtains a long name used for display purposes.
If the API is unknown, this function will return the empty string.
*/
static std::string getApiDisplayName( RtAudio::Api api );
//! Return the compiled audio API having the given name.
/*!
A case insensitive comparison will check the specified name
against the list of compiled APIs, and return the one which
matches. On failure, the function returns UNSPECIFIED.
*/
static RtAudio::Api getCompiledApiByName( const std::string &name );
//! The class constructor.
/*!
The constructor performs minor initialization tasks. An exception
@@ -487,7 +514,7 @@ class RtAudio
lowest allowable value is used. The actual value used is
returned via the structure argument. The parameter is API dependent.
\param errorCallback A client-defined function that will be invoked
when an error has occured.
when an error has occurred.
*/
void openStream( RtAudio::StreamParameters *outputParameters,
RtAudio::StreamParameters *inputParameters,
@@ -576,29 +603,34 @@ class RtAudio
};
// Operating system dependent thread functionality.
#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_WASAPI__)
#if defined(_WIN32) || defined(__CYGWIN__)
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <process.h>
#include <stdint.h>
typedef uintptr_t ThreadHandle;
typedef CRITICAL_SECTION StreamMutex;
#elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)
#else
// Using pthread library for various flavors of unix.
#include <pthread.h>
typedef pthread_t ThreadHandle;
typedef pthread_mutex_t StreamMutex;
#else // Setup for "dummy" behavior
#endif
// Setup for "dummy" behavior if no apis specified.
#if !(defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_WASAPI__) \
|| defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) \
|| defined(__LINUX_OSS__) || defined(__MACOSX_CORE__))
#define __RTAUDIO_DUMMY__
typedef int ThreadHandle;
typedef int StreamMutex;
#endif
@@ -606,19 +638,15 @@ class RtAudio
// between the private RtAudio stream structure and global callback
// handling functions.
struct CallbackInfo {
void *object; // Used as a "this" pointer.
ThreadHandle thread;
void *callback;
void *userData;
void *errorCallback;
void *apiInfo; // void pointer for API specific callback information
bool isRunning;
bool doRealtime;
int priority;
// Default constructor.
CallbackInfo()
:object(0), callback(0), userData(0), errorCallback(0), apiInfo(0), isRunning(false), doRealtime(false), priority(0) {}
void *object{}; // Used as a "this" pointer.
ThreadHandle thread{};
void *callback{};
void *userData{};
void *errorCallback{};
void *apiInfo{}; // void pointer for API specific callback information
bool isRunning{false};
bool doRealtime{false};
int priority{};
};
// **************************************************************** //
@@ -645,13 +673,12 @@ class S24 {
S24() {}
S24& operator = ( const int& i ) {
c3[0] = (i & 0x000000ff);
c3[1] = (i & 0x0000ff00) >> 8;
c3[2] = (i & 0x00ff0000) >> 16;
c3[0] = (unsigned char)(i & 0x000000ff);
c3[1] = (unsigned char)((i & 0x0000ff00) >> 8);
c3[2] = (unsigned char)((i & 0x00ff0000) >> 16);
return *this;
}
S24( const S24& v ) { *this = v; }
S24( const double& d ) { *this = (int) d; }
S24( const float& f ) { *this = (int) f; }
S24( const signed short& s ) { *this = (int) s; }
@@ -671,7 +698,7 @@ class S24 {
#include <sstream>
class RtApi
class RTAUDIO_DLL_PUBLIC RtApi
{
public:
@@ -855,21 +882,20 @@ public:
RtApiCore();
~RtApiCore();
RtAudio::Api getCurrentApi( void ) { return RtAudio::MACOSX_CORE; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
unsigned int getDefaultOutputDevice( void );
unsigned int getDefaultInputDevice( void );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
long getStreamLatency( void );
RtAudio::Api getCurrentApi( void ) override { return RtAudio::MACOSX_CORE; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
unsigned int getDefaultOutputDevice( void ) override;
unsigned int getDefaultInputDevice( void ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesireable results!
// will most likely produce highly undesirable results!
bool callbackEvent( AudioDeviceID deviceId,
const AudioBufferList *inBufferList,
const AudioBufferList *outBufferList );
@@ -879,7 +905,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
RtAudio::StreamOptions *options ) override;
static const char* getErrorCode( OSStatus code );
};
@@ -893,19 +919,18 @@ public:
RtApiJack();
~RtApiJack();
RtAudio::Api getCurrentApi( void ) { return RtAudio::UNIX_JACK; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
long getStreamLatency( void );
RtAudio::Api getCurrentApi( void ) override { return RtAudio::UNIX_JACK; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesireable results!
// will most likely produce highly undesirable results!
bool callbackEvent( unsigned long nframes );
private:
@@ -913,7 +938,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
RtAudio::StreamOptions *options ) override;
bool shouldAutoconnect_;
};
@@ -928,19 +953,20 @@ public:
RtApiAsio();
~RtApiAsio();
RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_ASIO; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
long getStreamLatency( void );
RtAudio::Api getCurrentApi( void ) override { return RtAudio::WINDOWS_ASIO; }
unsigned int getDeviceCount( void ) override;
unsigned int getDefaultOutputDevice( void ) override;
unsigned int getDefaultInputDevice( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesireable results!
// will most likely produce highly undesirable results!
bool callbackEvent( long bufferIndex );
private:
@@ -951,7 +977,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
RtAudio::StreamOptions *options ) override;
};
#endif
@@ -964,21 +990,20 @@ public:
RtApiDs();
~RtApiDs();
RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_DS; }
unsigned int getDeviceCount( void );
unsigned int getDefaultOutputDevice( void );
unsigned int getDefaultInputDevice( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
long getStreamLatency( void );
RtAudio::Api getCurrentApi( void ) override { return RtAudio::WINDOWS_DS; }
unsigned int getDeviceCount( void ) override;
unsigned int getDefaultOutputDevice( void ) override;
unsigned int getDefaultInputDevice( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesireable results!
// will most likely produce highly undesirable results!
void callbackEvent( void );
private:
@@ -990,7 +1015,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
RtAudio::StreamOptions *options ) override;
};
#endif
@@ -1003,17 +1028,15 @@ class RtApiWasapi : public RtApi
{
public:
RtApiWasapi();
~RtApiWasapi();
virtual ~RtApiWasapi();
RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_WASAPI; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
unsigned int getDefaultOutputDevice( void );
unsigned int getDefaultInputDevice( void );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
RtAudio::Api getCurrentApi( void ) override { return RtAudio::WINDOWS_WASAPI; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
private:
bool coInitialized_;
@@ -1022,7 +1045,7 @@ private:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int* bufferSize,
RtAudio::StreamOptions* options );
RtAudio::StreamOptions* options ) override;
static DWORD WINAPI runWasapiThread( void* wasapiPtr );
static DWORD WINAPI stopWasapiThread( void* wasapiPtr );
@@ -1040,18 +1063,18 @@ public:
RtApiAlsa();
~RtApiAlsa();
RtAudio::Api getCurrentApi() { return RtAudio::LINUX_ALSA; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
RtAudio::Api getCurrentApi() override { return RtAudio::LINUX_ALSA; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesireable results!
// will most likely produce highly undesirable results!
void callbackEvent( void );
private:
@@ -1061,7 +1084,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
RtAudio::StreamOptions *options ) override;
};
#endif
@@ -1072,28 +1095,27 @@ class RtApiPulse: public RtApi
{
public:
~RtApiPulse();
RtAudio::Api getCurrentApi() { return RtAudio::LINUX_PULSE; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
RtAudio::Api getCurrentApi() override { return RtAudio::LINUX_PULSE; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesireable results!
// will most likely produce highly undesirable results!
void callbackEvent( void );
private:
std::vector<RtAudio::DeviceInfo> devices_;
void saveDeviceInfo( void );
void collectDeviceInfo( void );
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
RtAudio::StreamOptions *options ) override;
};
#endif
@@ -1106,18 +1128,18 @@ public:
RtApiOss();
~RtApiOss();
RtAudio::Api getCurrentApi() { return RtAudio::LINUX_OSS; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
RtAudio::Api getCurrentApi() override { return RtAudio::LINUX_OSS; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesireable results!
// will most likely produce highly undesirable results!
void callbackEvent( void );
private:
@@ -1125,7 +1147,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
RtAudio::StreamOptions *options ) override;
};
#endif
@@ -1137,20 +1159,20 @@ class RtApiDummy: public RtApi
public:
RtApiDummy() { errorText_ = "RtApiDummy: This class provides no functionality."; error( RtAudioError::WARNING ); }
RtAudio::Api getCurrentApi( void ) { return RtAudio::RTAUDIO_DUMMY; }
unsigned int getDeviceCount( void ) { return 0; }
RtAudio::DeviceInfo getDeviceInfo( unsigned int /*device*/ ) { RtAudio::DeviceInfo info; return info; }
void closeStream( void ) {}
void startStream( void ) {}
void stopStream( void ) {}
void abortStream( void ) {}
RtAudio::Api getCurrentApi( void ) override { return RtAudio::RTAUDIO_DUMMY; }
unsigned int getDeviceCount( void ) override { return 0; }
RtAudio::DeviceInfo getDeviceInfo( unsigned int /*device*/ ) override { RtAudio::DeviceInfo info; return info; }
void closeStream( void ) override {}
void startStream( void ) override {}
void stopStream( void ) override {}
void abortStream( void ) override {}
private:
bool probeDeviceOpen( unsigned int /*device*/, StreamMode /*mode*/, unsigned int /*channels*/,
unsigned int /*firstChannel*/, unsigned int /*sampleRate*/,
RtAudioFormat /*format*/, unsigned int * /*bufferSize*/,
RtAudio::StreamOptions * /*options*/ ) { return false; }
RtAudio::StreamOptions * /*options*/ ) override { return false; }
};
#endif

View File

@@ -5,10 +5,11 @@
This class implements some common functionality for the realtime
MIDI input/output subclasses RtMidiIn and RtMidiOut.
RtMidi WWW site: http://music.mcgill.ca/~gary/rtmidi/
RtMidi GitHub site: https://github.com/thestk/rtmidi
RtMidi WWW site: http://www.music.mcgill.ca/~gary/rtmidi/
RtMidi: realtime MIDI i/o C++ classes
Copyright (c) 2003-2017 Gary P. Scavone
Copyright (c) 2003-2021 Gary P. Scavone
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
@@ -43,13 +44,28 @@
#ifndef RTMIDI_H
#define RTMIDI_H
#define RTMIDI_VERSION "3.0.0"
#if defined _WIN32 || defined __CYGWIN__
#if defined(RTMIDI_EXPORT)
#define RTMIDI_DLL_PUBLIC __declspec(dllexport)
#else
#define RTMIDI_DLL_PUBLIC
#endif
#else
#if __GNUC__ >= 4
#define RTMIDI_DLL_PUBLIC __attribute__( (visibility( "default" )) )
#else
#define RTMIDI_DLL_PUBLIC
#endif
#endif
#define RTMIDI_VERSION "5.0.0"
#include <exception>
#include <iostream>
#include <string>
#include <vector>
/************************************************************************/
/*! \class RtMidiError
\brief Exception handling class for RtMidi.
@@ -60,7 +76,7 @@
*/
/************************************************************************/
class RtMidiError : public std::exception
class RTMIDI_DLL_PUBLIC RtMidiError : public std::exception
{
public:
//! Defined RtMidiError types.
@@ -79,8 +95,9 @@ class RtMidiError : public std::exception
};
//! The constructor.
RtMidiError( const std::string& message, Type type = RtMidiError::UNSPECIFIED ) throw() : message_(message), type_(type) {}
RtMidiError( const std::string& message, Type type = RtMidiError::UNSPECIFIED ) throw()
: message_(message), type_(type) {}
//! The destructor.
virtual ~RtMidiError( void ) throw() {}
@@ -88,10 +105,10 @@ class RtMidiError : public std::exception
virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }
//! Returns the thrown error message type.
virtual const Type& getType(void) const throw() { return type_; }
virtual const Type& getType( void ) const throw() { return type_; }
//! Returns the thrown error message string.
virtual const std::string& getMessage(void) const throw() { return message_; }
virtual const std::string& getMessage( void ) const throw() { return message_; }
//! Returns the thrown error message as a c-style string.
virtual const char* what( void ) const throw() { return message_.c_str(); }
@@ -113,18 +130,21 @@ typedef void (*RtMidiErrorCallback)( RtMidiError::Type type, const std::string &
class MidiApi;
class RtMidi
class RTMIDI_DLL_PUBLIC RtMidi
{
public:
RtMidi(RtMidi&& other) noexcept;
//! MIDI API specifier arguments.
enum Api {
UNSPECIFIED, /*!< Search for a working compiled API. */
MACOSX_CORE, /*!< Macintosh OS-X Core Midi API. */
MACOSX_CORE, /*!< Macintosh OS-X CoreMIDI API. */
LINUX_ALSA, /*!< The Advanced Linux Sound Architecture API. */
UNIX_JACK, /*!< The JACK Low-Latency MIDI Server API. */
WINDOWS_MM, /*!< The Microsoft Multimedia MIDI API. */
RTMIDI_DUMMY /*!< A compilable but non-functional API. */
RTMIDI_DUMMY, /*!< A compilable but non-functional API. */
WEB_MIDI_API, /*!< W3C Web MIDI API. */
NUM_APIS /*!< Number of values in this enum. */
};
//! A static function to determine the current RtMidi version.
@@ -138,6 +158,29 @@ class RtMidi
*/
static void getCompiledApi( std::vector<RtMidi::Api> &apis ) throw();
//! Return the name of a specified compiled MIDI API.
/*!
This obtains a short lower-case name used for identification purposes.
This value is guaranteed to remain identical across library versions.
If the API is unknown, this function will return the empty string.
*/
static std::string getApiName( RtMidi::Api api );
//! Return the display name of a specified compiled MIDI API.
/*!
This obtains a long name used for display purposes.
If the API is unknown, this function will return the empty string.
*/
static std::string getApiDisplayName( RtMidi::Api api );
//! Return the compiled MIDI API having the given name.
/*!
A case insensitive comparison will check the specified name
against the list of compiled APIs, and return the one which
matches. On failure, the function returns UNSPECIFIED.
*/
static RtMidi::Api getCompiledApiByName( const std::string &name );
//! Pure virtual openPort() function.
virtual void openPort( unsigned int portNumber = 0, const std::string &portName = std::string( "RtMidi" ) ) = 0;
@@ -153,6 +196,9 @@ class RtMidi
//! Pure virtual closePort() function.
virtual void closePort( void ) = 0;
void setClientName( const std::string &clientName );
void setPortName( const std::string &portName );
//! Returns true if a port is open and false if not.
/*!
Note that this only applies to connections made with the openPort()
@@ -168,11 +214,13 @@ class RtMidi
virtual void setErrorCallback( RtMidiErrorCallback errorCallback = NULL, void *userData = 0 ) = 0;
protected:
RtMidi();
virtual ~RtMidi();
MidiApi *rtapi_;
/* Make the class non-copyable */
RtMidi(RtMidi& other) = delete;
RtMidi& operator=(RtMidi& other) = delete;
};
/**********************************************************************/
@@ -188,8 +236,6 @@ class RtMidi
time. With the OS-X, Linux ALSA, and JACK MIDI APIs, it is also
possible to open a virtual input port to which other MIDI software
clients can connect.
by Gary P. Scavone, 2003-2017.
*/
/**********************************************************************/
@@ -207,12 +253,11 @@ class RtMidi
//
// **************************************************************** //
class RtMidiIn : public RtMidi
class RTMIDI_DLL_PUBLIC RtMidiIn : public RtMidi
{
public:
//! User callback function type definition.
typedef void (*RtMidiCallback)( double timeStamp, std::vector<unsigned char> *message, void *userData);
typedef void (*RtMidiCallback)( double timeStamp, std::vector<unsigned char> *message, void *userData );
//! Default constructor that allows an optional api, client name and queue size.
/*!
@@ -236,6 +281,8 @@ class RtMidiIn : public RtMidi
const std::string& clientName = "RtMidi Input Client",
unsigned int queueSizeLimit = 100 );
RtMidiIn(RtMidiIn&& other) noexcept : RtMidi(std::move(other)) { }
//! If a MIDI connection is still open, it will be closed by the destructor.
~RtMidiIn ( void ) throw();
@@ -333,9 +380,21 @@ class RtMidiIn : public RtMidi
*/
virtual void setErrorCallback( RtMidiErrorCallback errorCallback = NULL, void *userData = 0 );
//! Set maximum expected incoming message size.
/*!
For APIs that require manual buffer management, it can be useful to set the buffer
size and buffer count when expecting to receive large SysEx messages. Note that
currently this function has no effect when called after openPort(). The default
buffer size is 1024 with a count of 4 buffers, which should be sufficient for most
cases; as mentioned, this does not affect all API backends, since most either support
dynamically scalable buffers or take care of buffer handling themselves. It is
principally intended for users of the Windows MM backend who must support receiving
especially large messages.
*/
virtual void setBufferSize( unsigned int size, unsigned int count );
protected:
void openMidiApi( RtMidi::Api api, const std::string &clientName, unsigned int queueSizeLimit );
};
/**********************************************************************/
@@ -349,15 +408,12 @@ class RtMidiIn : public RtMidi
connect to more than one MIDI device at the same time. With the
OS-X, Linux ALSA and JACK MIDI APIs, it is also possible to open a
virtual port to which other MIDI software clients can connect.
by Gary P. Scavone, 2003-2017.
*/
/**********************************************************************/
class RtMidiOut : public RtMidi
class RTMIDI_DLL_PUBLIC RtMidiOut : public RtMidi
{
public:
//! Default constructor that allows an optional client name.
/*!
An exception will be thrown if a MIDI system initialization error occurs.
@@ -369,6 +425,8 @@ class RtMidiOut : public RtMidi
RtMidiOut( RtMidi::Api api=UNSPECIFIED,
const std::string& clientName = "RtMidi Output Client" );
RtMidiOut(RtMidiOut&& other) noexcept : RtMidi(std::move(other)) { }
//! The destructor closes any open MIDI connections.
~RtMidiOut( void ) throw();
@@ -458,7 +516,7 @@ class RtMidiOut : public RtMidi
//
// **************************************************************** //
class MidiApi
class RTMIDI_DLL_PUBLIC MidiApi
{
public:
@@ -468,6 +526,8 @@ class MidiApi
virtual void openPort( unsigned int portNumber, const std::string &portName ) = 0;
virtual void openVirtualPort( const std::string &portName ) = 0;
virtual void closePort( void ) = 0;
virtual void setClientName( const std::string &clientName ) = 0;
virtual void setPortName( const std::string &portName ) = 0;
virtual unsigned int getPortCount( void ) = 0;
virtual std::string getPortName( unsigned int portNumber ) = 0;
@@ -487,9 +547,10 @@ protected:
RtMidiErrorCallback errorCallback_;
bool firstErrorOccurred_;
void *errorCallbackUserData_;
};
class MidiInApi : public MidiApi
class RTMIDI_DLL_PUBLIC MidiInApi : public MidiApi
{
public:
@@ -499,18 +560,19 @@ class MidiInApi : public MidiApi
void cancelCallback( void );
virtual void ignoreTypes( bool midiSysex, bool midiTime, bool midiSense );
double getMessage( std::vector<unsigned char> *message );
virtual void setBufferSize( unsigned int size, unsigned int count );
// A MIDI structure used internally by the class to store incoming
// messages. Each message represents one and only one MIDI message.
struct MidiMessage {
std::vector<unsigned char> bytes;
struct MidiMessage {
std::vector<unsigned char> bytes;
//! Time in seconds elapsed since the previous message
double timeStamp;
// Default constructor.
MidiMessage()
:bytes(0), timeStamp(0.0) {}
MidiMessage()
: bytes(0), timeStamp(0.0) {}
};
struct MidiQueue {
@@ -520,12 +582,11 @@ class MidiInApi : public MidiApi
MidiMessage *ring;
// Default constructor.
MidiQueue()
:front(0), back(0), ringSize(0), ring(0) {}
bool push(const MidiMessage&);
bool pop(std::vector<unsigned char>*, double*);
unsigned int size(unsigned int *back=0,
unsigned int *front=0);
MidiQueue()
: front(0), back(0), ringSize(0), ring(0) {}
bool push( const MidiMessage& );
bool pop( std::vector<unsigned char>*, double* );
unsigned int size( unsigned int *back=0, unsigned int *front=0 );
};
// The RtMidiInData structure is used to pass private class data to
@@ -541,19 +602,20 @@ class MidiInApi : public MidiApi
RtMidiIn::RtMidiCallback userCallback;
void *userData;
bool continueSysex;
unsigned int bufferSize;
unsigned int bufferCount;
// Default constructor.
RtMidiInData()
: ignoreFlags(7), doInput(false), firstMessage(true),
apiData(0), usingCallback(false), userCallback(0), userData(0),
continueSysex(false) {}
RtMidiInData()
: ignoreFlags(7), doInput(false), firstMessage(true), apiData(0), usingCallback(false),
userCallback(0), userData(0), continueSysex(false), bufferSize(1024), bufferCount(4) {}
};
protected:
RtMidiInData inputData_;
};
class MidiOutApi : public MidiApi
class RTMIDI_DLL_PUBLIC MidiOutApi : public MidiApi
{
public:
@@ -573,13 +635,14 @@ inline void RtMidiIn :: openPort( unsigned int portNumber, const std::string &po
inline void RtMidiIn :: openVirtualPort( const std::string &portName ) { rtapi_->openVirtualPort( portName ); }
inline void RtMidiIn :: closePort( void ) { rtapi_->closePort(); }
inline bool RtMidiIn :: isPortOpen() const { return rtapi_->isPortOpen(); }
inline void RtMidiIn :: setCallback( RtMidiCallback callback, void *userData ) { ((MidiInApi *)rtapi_)->setCallback( callback, userData ); }
inline void RtMidiIn :: cancelCallback( void ) { ((MidiInApi *)rtapi_)->cancelCallback(); }
inline void RtMidiIn :: setCallback( RtMidiCallback callback, void *userData ) { static_cast<MidiInApi *>(rtapi_)->setCallback( callback, userData ); }
inline void RtMidiIn :: cancelCallback( void ) { static_cast<MidiInApi *>(rtapi_)->cancelCallback(); }
inline unsigned int RtMidiIn :: getPortCount( void ) { return rtapi_->getPortCount(); }
inline std::string RtMidiIn :: getPortName( unsigned int portNumber ) { return rtapi_->getPortName( portNumber ); }
inline void RtMidiIn :: ignoreTypes( bool midiSysex, bool midiTime, bool midiSense ) { ((MidiInApi *)rtapi_)->ignoreTypes( midiSysex, midiTime, midiSense ); }
inline double RtMidiIn :: getMessage( std::vector<unsigned char> *message ) { return ((MidiInApi *)rtapi_)->getMessage( message ); }
inline void RtMidiIn :: ignoreTypes( bool midiSysex, bool midiTime, bool midiSense ) { static_cast<MidiInApi *>(rtapi_)->ignoreTypes( midiSysex, midiTime, midiSense ); }
inline double RtMidiIn :: getMessage( std::vector<unsigned char> *message ) { return static_cast<MidiInApi *>(rtapi_)->getMessage( message ); }
inline void RtMidiIn :: setErrorCallback( RtMidiErrorCallback errorCallback, void *userData ) { rtapi_->setErrorCallback(errorCallback, userData); }
inline void RtMidiIn :: setBufferSize( unsigned int size, unsigned int count ) { static_cast<MidiInApi *>(rtapi_)->setBufferSize(size, count); }
inline RtMidi::Api RtMidiOut :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }
inline void RtMidiOut :: openPort( unsigned int portNumber, const std::string &portName ) { rtapi_->openPort( portNumber, portName ); }
@@ -588,207 +651,8 @@ inline void RtMidiOut :: closePort( void ) { rtapi_->closePort(); }
inline bool RtMidiOut :: isPortOpen() const { return rtapi_->isPortOpen(); }
inline unsigned int RtMidiOut :: getPortCount( void ) { return rtapi_->getPortCount(); }
inline std::string RtMidiOut :: getPortName( unsigned int portNumber ) { return rtapi_->getPortName( portNumber ); }
inline void RtMidiOut :: sendMessage( const std::vector<unsigned char> *message ) { ((MidiOutApi *)rtapi_)->sendMessage( &message->at(0), message->size() ); }
inline void RtMidiOut :: sendMessage( const unsigned char *message, size_t size ) { ((MidiOutApi *)rtapi_)->sendMessage( message, size ); }
inline void RtMidiOut :: sendMessage( const std::vector<unsigned char> *message ) { static_cast<MidiOutApi *>(rtapi_)->sendMessage( &message->at(0), message->size() ); }
inline void RtMidiOut :: sendMessage( const unsigned char *message, size_t size ) { static_cast<MidiOutApi *>(rtapi_)->sendMessage( message, size ); }
inline void RtMidiOut :: setErrorCallback( RtMidiErrorCallback errorCallback, void *userData ) { rtapi_->setErrorCallback(errorCallback, userData); }
// **************************************************************** //
//
// MidiInApi and MidiOutApi subclass prototypes.
//
// **************************************************************** //
#if !defined(__LINUX_ALSA__) && !defined(__UNIX_JACK__) && !defined(__MACOSX_CORE__) && !defined(__WINDOWS_MM__)
#define __RTMIDI_DUMMY__
#endif
#if defined(__MACOSX_CORE__)
class MidiInCore: public MidiInApi
{
public:
MidiInCore( const std::string &clientName, unsigned int queueSizeLimit );
~MidiInCore( void );
RtMidi::Api getCurrentApi( void ) { return RtMidi::MACOSX_CORE; };
void openPort( unsigned int portNumber, const std::string &portName );
void openVirtualPort( const std::string &portName );
void closePort( void );
unsigned int getPortCount( void );
std::string getPortName( unsigned int portNumber );
protected:
void initialize( const std::string& clientName );
};
class MidiOutCore: public MidiOutApi
{
public:
MidiOutCore( const std::string &clientName );
~MidiOutCore( void );
RtMidi::Api getCurrentApi( void ) { return RtMidi::MACOSX_CORE; };
void openPort( unsigned int portNumber, const std::string &portName );
void openVirtualPort( const std::string &portName );
void closePort( void );
unsigned int getPortCount( void );
std::string getPortName( unsigned int portNumber );
void sendMessage( const unsigned char *message, size_t size );
protected:
void initialize( const std::string& clientName );
};
#endif
#if defined(__UNIX_JACK__)
class MidiInJack: public MidiInApi
{
public:
MidiInJack( const std::string &clientName, unsigned int queueSizeLimit );
~MidiInJack( void );
RtMidi::Api getCurrentApi( void ) { return RtMidi::UNIX_JACK; };
void openPort( unsigned int portNumber, const std::string &portName );
void openVirtualPort( const std::string &portName );
void closePort( void );
unsigned int getPortCount( void );
std::string getPortName( unsigned int portNumber );
protected:
std::string clientName;
void connect( void );
void initialize( const std::string& clientName );
};
class MidiOutJack: public MidiOutApi
{
public:
MidiOutJack( const std::string &clientName );
~MidiOutJack( void );
RtMidi::Api getCurrentApi( void ) { return RtMidi::UNIX_JACK; };
void openPort( unsigned int portNumber, const std::string &portName );
void openVirtualPort( const std::string &portName );
void closePort( void );
unsigned int getPortCount( void );
std::string getPortName( unsigned int portNumber );
void sendMessage( const unsigned char *message, size_t size );
protected:
std::string clientName;
void connect( void );
void initialize( const std::string& clientName );
};
#endif
#if defined(__LINUX_ALSA__)
class MidiInAlsa: public MidiInApi
{
public:
MidiInAlsa( const std::string &clientName, unsigned int queueSizeLimit );
~MidiInAlsa( void );
RtMidi::Api getCurrentApi( void ) { return RtMidi::LINUX_ALSA; };
void openPort( unsigned int portNumber, const std::string &portName );
void openVirtualPort( const std::string &portName );
void closePort( void );
unsigned int getPortCount( void );
std::string getPortName( unsigned int portNumber );
protected:
void initialize( const std::string& clientName );
};
class MidiOutAlsa: public MidiOutApi
{
public:
MidiOutAlsa( const std::string &clientName );
~MidiOutAlsa( void );
RtMidi::Api getCurrentApi( void ) { return RtMidi::LINUX_ALSA; };
void openPort( unsigned int portNumber, const std::string &portName );
void openVirtualPort( const std::string &portName );
void closePort( void );
unsigned int getPortCount( void );
std::string getPortName( unsigned int portNumber );
void sendMessage( const unsigned char *message, size_t size );
protected:
void initialize( const std::string& clientName );
};
#endif
#if defined(__WINDOWS_MM__)
class MidiInWinMM: public MidiInApi
{
public:
MidiInWinMM( const std::string &clientName, unsigned int queueSizeLimit );
~MidiInWinMM( void );
RtMidi::Api getCurrentApi( void ) { return RtMidi::WINDOWS_MM; };
void openPort( unsigned int portNumber, const std::string &portName );
void openVirtualPort( const std::string &portName );
void closePort( void );
unsigned int getPortCount( void );
std::string getPortName( unsigned int portNumber );
protected:
void initialize( const std::string& clientName );
};
class MidiOutWinMM: public MidiOutApi
{
public:
MidiOutWinMM( const std::string &clientName );
~MidiOutWinMM( void );
RtMidi::Api getCurrentApi( void ) { return RtMidi::WINDOWS_MM; };
void openPort( unsigned int portNumber, const std::string &portName );
void openVirtualPort( const std::string &portName );
void closePort( void );
unsigned int getPortCount( void );
std::string getPortName( unsigned int portNumber );
void sendMessage( const unsigned char *message, size_t size );
protected:
void initialize( const std::string& clientName );
};
#endif
#if defined(__RTMIDI_DUMMY__)
class MidiInDummy: public MidiInApi
{
public:
MidiInDummy( const std::string &/*clientName*/, unsigned int queueSizeLimit ) : MidiInApi( queueSizeLimit ) { errorString_ = "MidiInDummy: This class provides no functionality."; error( RtMidiError::WARNING, errorString_ ); }
RtMidi::Api getCurrentApi( void ) { return RtMidi::RTMIDI_DUMMY; }
void openPort( unsigned int /*portNumber*/, const std::string &/*portName*/ ) {}
void openVirtualPort( const std::string &/*portName*/ ) {}
void closePort( void ) {}
unsigned int getPortCount( void ) { return 0; }
std::string getPortName( unsigned int /*portNumber*/ ) { return ""; }
protected:
void initialize( const std::string& /*clientName*/ ) {}
};
class MidiOutDummy: public MidiOutApi
{
public:
MidiOutDummy( const std::string &/*clientName*/ ) { errorString_ = "MidiOutDummy: This class provides no functionality."; error( RtMidiError::WARNING, errorString_ ); }
RtMidi::Api getCurrentApi( void ) { return RtMidi::RTMIDI_DUMMY; }
void openPort( unsigned int /*portNumber*/, const std::string &/*portName*/ ) {}
void openVirtualPort( const std::string &/*portName*/ ) {}
void closePort( void ) {}
unsigned int getPortCount( void ) { return 0; }
std::string getPortName( unsigned int /*portNumber*/ ) { return ""; }
void sendMessage( const unsigned char * /*message*/, size_t /*size*/ ) {}
protected:
void initialize( const std::string& /*clientName*/ ) {}
};
#endif
#endif

View File

@@ -24,7 +24,7 @@ namespace stk {
that takes an StkFrames object for multi-channel and/or
multi-frame data.
by Perry R. Cook and Gary P. Scavone, 1995--2017.
by Perry R. Cook and Gary P. Scavone, 1995--2021.
*/
/***************************************************/

Some files were not shown because too many files have changed in this diff Show More