mirror of
https://github.com/thestk/stk
synced 2026-01-17 06:41:51 +00:00
Compare commits
117 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6aacd357d7 | ||
|
|
0d4bb84732 | ||
|
|
270edc855f | ||
|
|
d7d6079f6b | ||
|
|
cea6f547d2 | ||
|
|
212950d364 | ||
|
|
aeaef391ef | ||
|
|
d0345712db | ||
|
|
1cb2c81d04 | ||
|
|
b671638f99 | ||
|
|
169b005a2d | ||
|
|
73008d02a1 | ||
|
|
e364d81c8f | ||
|
|
3675846c66 | ||
|
|
fd5e37863d | ||
|
|
7f97ab5f71 | ||
|
|
8b29e0ea6d | ||
|
|
2af2f1c816 | ||
|
|
f39c1fb06d | ||
|
|
35ca4abcb9 | ||
|
|
cc2dd22e97 | ||
|
|
e0279e305b | ||
|
|
ce765cc391 | ||
|
|
9bf39f53c6 | ||
|
|
4397e05158 | ||
|
|
70835eccb4 | ||
|
|
79334d2c8d | ||
|
|
16918b0914 | ||
|
|
3acb9502ae | ||
|
|
92d81d67c2 | ||
|
|
893ff3d954 | ||
|
|
b343913233 | ||
|
|
f3ce5f4d04 | ||
|
|
d4750edc66 | ||
|
|
6a6a9cdfbe | ||
|
|
dec667bab5 | ||
|
|
1fd900263b | ||
|
|
67d573b169 | ||
|
|
500d2972f9 | ||
|
|
ee7a1a31f8 | ||
|
|
feb123c9b8 | ||
|
|
509c6cf9e9 | ||
|
|
e5454b85c7 | ||
|
|
f0a22c463d | ||
|
|
ba6ea9f5db | ||
|
|
f00e38611c | ||
|
|
367893bf50 | ||
|
|
a6266131cb | ||
|
|
1fec6e0157 | ||
|
|
d308c8aeb7 | ||
|
|
deddcbaa3e | ||
|
|
76127ffc6c | ||
|
|
d77b093a9d | ||
|
|
c7d37545d3 | ||
|
|
15a1359671 | ||
|
|
51f9676229 | ||
|
|
7840967816 | ||
|
|
8132c90515 | ||
|
|
73004ac9c4 | ||
|
|
a49f6e71e7 | ||
|
|
926a9faca7 | ||
|
|
34192d9a63 | ||
|
|
fb2b0aa305 | ||
|
|
ba967ff851 | ||
|
|
109f0bd9a8 | ||
|
|
7b94384705 | ||
|
|
b379160f2b | ||
|
|
4b5b142531 | ||
|
|
f1a75a8691 | ||
|
|
e5cab23433 | ||
|
|
5a8b2234c7 | ||
|
|
314835cc70 | ||
|
|
700ff2c459 | ||
|
|
fb15f76d45 | ||
|
|
921493d4fe | ||
|
|
4cbdd0d3dc | ||
|
|
c97f5b4b3a | ||
|
|
809cb26e12 | ||
|
|
dbe725c40d | ||
|
|
f47fde31b0 | ||
|
|
5ec15d2043 | ||
|
|
33baf69d3e | ||
|
|
975c9a365f | ||
|
|
00ddf89798 | ||
|
|
a8b6affd8c | ||
|
|
444dab21fd | ||
|
|
7fc638ce32 | ||
|
|
f489451660 | ||
|
|
b6143915a9 | ||
|
|
38970124ec | ||
|
|
ae2bac1601 | ||
|
|
8de7543266 | ||
|
|
f8550110d6 | ||
|
|
e4d373b658 | ||
|
|
2fffa79174 | ||
|
|
448c12b0f4 | ||
|
|
f88fc8690b | ||
|
|
0591733bd7 | ||
|
|
7fe70c4223 | ||
|
|
3d455a4644 | ||
|
|
db79599c01 | ||
|
|
7f06bf46f3 | ||
|
|
03b4299af4 | ||
|
|
c531f68a56 | ||
|
|
0a5dbf59d2 | ||
|
|
493fb35b3f | ||
|
|
00f7424140 | ||
|
|
47822b8ce8 | ||
|
|
4a27274c0f | ||
|
|
d1f08072f9 | ||
|
|
3211b94abb | ||
|
|
5e28beb4db | ||
|
|
21d392dca7 | ||
|
|
f79d75037a | ||
|
|
3efa214fbd | ||
|
|
6acefc08a8 | ||
|
|
6ce3ac9e10 |
13
.gitignore
vendored
13
.gitignore
vendored
@@ -104,7 +104,7 @@ xcuserdata
|
|||||||
#!xcuserdata/**/xcschemes/*
|
#!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 :)
|
# Workspaces are important! They are a core feature of Xcode - don't exclude them :)
|
||||||
#
|
#
|
||||||
@@ -186,3 +186,14 @@ src/libstk.a
|
|||||||
src/Release
|
src/Release
|
||||||
src/Debug
|
src/Debug
|
||||||
src/Makefile
|
src/Makefile
|
||||||
|
|
||||||
|
####
|
||||||
|
# Files generated by Visual Studio
|
||||||
|
|
||||||
|
projects/*/.vs/
|
||||||
|
projects/*/*.exe
|
||||||
|
projects/*/*.ilk
|
||||||
|
projects/*/*.pdb
|
||||||
|
projects/*/*.vcxproj.user
|
||||||
|
projects/*/Release/
|
||||||
|
projects/*/Debug/
|
||||||
|
|||||||
207
CMakeLists.txt
Normal file
207
CMakeLists.txt
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.1) ##TODO: which version is better
|
||||||
|
|
||||||
|
project(STK VERSION 4.6.1)
|
||||||
|
set (CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
|
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})
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /DNDEBUG")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7 /Ob0 /Od /RTC1 /D_ITERATOR_DEBUG_LEVEL=2 /D_STK_DEBUG_ /D__RTAUDIO_DEBUG__ /D__RTMIDI_DEBUG__")
|
||||||
|
else()
|
||||||
|
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__")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
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)
|
||||||
|
option(INSTALL_HEADERS "Install headers" 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)
|
||||||
|
# Try to find PkgConfig
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
# PkgConfig is available, use it
|
||||||
|
pkg_check_modules(JACK QUIET jack)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT JACK_FOUND)
|
||||||
|
# PkgConfig was not found or Jack was not found through it, try a fallback
|
||||||
|
message(STATUS "PkgConfig not found or failed to find Jack, attempting fallback")
|
||||||
|
|
||||||
|
# Fallback: Search in common locations
|
||||||
|
find_path(JACK_INCLUDE_DIR
|
||||||
|
NAMES jack/jack.h
|
||||||
|
HINTS
|
||||||
|
ENV JACK_ROOT
|
||||||
|
"$ENV{ProgramFiles}/Jack"
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(JACK_LIBRARY
|
||||||
|
NAMES jack
|
||||||
|
HINTS
|
||||||
|
ENV JACK_ROOT
|
||||||
|
"$ENV{ProgramFiles}/Jack"
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
# Check if the fallback was successful
|
||||||
|
if(JACK_INCLUDE_DIR AND JACK_LIBRARY)
|
||||||
|
set(JACK_FOUND TRUE)
|
||||||
|
set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
|
||||||
|
set(JACK_LIBRARIES ${JACK_LIBRARY})
|
||||||
|
message(STATUS "Found Jack (fallback):")
|
||||||
|
message(STATUS " Includes: ${JACK_INCLUDE_DIRS}")
|
||||||
|
message(STATUS " Libraries: ${JACK_LIBRARIES}")
|
||||||
|
else()
|
||||||
|
message(WARNING "Failed to find Jack library even with fallback. Please install Jack development package or ensure it is in a standard location.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(JACK_FOUND)
|
||||||
|
include_directories(${JACK_INCLUDE_DIRS})
|
||||||
|
link_libraries(${JACK_LIBRARIES})
|
||||||
|
add_definitions(-D__UNIX_JACK__)
|
||||||
|
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()
|
||||||
|
add_definitions(-D_USE_MATH_DEFINES)
|
||||||
|
if(INSTALL_HEADERS)
|
||||||
|
file(GLOB STK_HEADERS "include/*.h")
|
||||||
|
install(FILES ${STK_HEADERS} DESTINATION include/stk)
|
||||||
|
endif()
|
||||||
|
#========================================#
|
||||||
|
#========== Build the Library ===========#
|
||||||
|
#========================================#
|
||||||
|
if(BUILD_STATIC)
|
||||||
|
add_library(stk STATIC ${STK_SRC} )
|
||||||
|
target_include_directories(stk PRIVATE include PUBLIC $<INSTALL_INTERFACE:include>)
|
||||||
|
set_target_properties(stk PROPERTIES PUBLIC_HEADER "${LIBSTK_HEADERS}")
|
||||||
|
list(APPEND STK_TARGETS stk)
|
||||||
|
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
|
||||||
|
target_include_directories(stk_SHARED PRIVATE include PUBLIC $<INSTALL_INTERFACE:include>)
|
||||||
|
set_target_properties(stk_SHARED PROPERTIES PUBLIC_HEADER "${LIBSTK_HEADERS}")
|
||||||
|
list(APPEND STK_TARGETS stk_SHARED)
|
||||||
|
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()
|
||||||
|
|
||||||
|
#========================================#
|
||||||
|
#========= Install ======================#
|
||||||
|
#========================================#
|
||||||
|
|
||||||
|
install(TARGETS ${STK_TARGETS} EXPORT stk-config
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
PUBLIC_HEADER DESTINATION include/stk)
|
||||||
|
|
||||||
|
install(EXPORT stk-config DESTINATION lib/cmake/stk)
|
||||||
18
INSTALL.md
18
INSTALL.md
@@ -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)
|
# 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-2023.
|
||||||
|
|
||||||
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.
|
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-alsa = choose native ALSA API support (default, linux only)
|
||||||
--with-oss = choose native OSS API support (unixes only)
|
--with-oss = choose native OSS API support (unixes only)
|
||||||
--with-jack = choose native JACK server API support (linux and macintosh OS-X)
|
--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-asio = choose ASIO API support (windows only)
|
||||||
--with-ds = choose DirectSound API support (windows only)
|
--with-ds = choose DirectSound API support (windows only)
|
||||||
--with-wasapi = choose Windows Audio Session 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 RAWWAVE_PATH='$(HOME)/rawwaves/'
|
||||||
./configure INCLUDE_PATH='$(HOME)/include/'
|
./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.
|
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
|
./configure CXX=CC
|
||||||
|
|
||||||
|
|
||||||
## Windows
|
## 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.
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
The Synthesis ToolKit in C++ (STK)
|
The Synthesis ToolKit in C++ (STK)
|
||||||
|
|
||||||
Copyright (c) 1995--2017 Perry R. Cook and Gary P. Scavone
|
Copyright (c) 1995-2023 Perry R. Cook and Gary P. Scavone
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
14
README.md
14
README.md
@@ -1,5 +1,5 @@
|
|||||||
# The Synthesis ToolKit in C++ (STK)
|
# 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--2023.
|
||||||
|
|
||||||
This distribution of the Synthesis ToolKit in C++ (STK) contains the following:
|
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.
|
For compiling and installing STK, see the [INSTALL.md](INSTALL.md) file in this directory.
|
||||||
|
|
||||||
##Contents
|
## Contents
|
||||||
|
|
||||||
* [Overview](#overview)
|
* [Overview](#overview)
|
||||||
* [System Requirements](#system-requirements)
|
* [System Requirements](#system-requirements)
|
||||||
@@ -63,7 +63,7 @@ against one of the fundamental design goals of the ToolKit - platform
|
|||||||
independence.
|
independence.
|
||||||
|
|
||||||
For those instances where a simple GUI with sliders and buttons is
|
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
|
distributed for all the supported ToolKit platforms. A number of
|
||||||
Tcl/Tk GUI scripts are distributed with the ToolKit release. For
|
Tcl/Tk GUI scripts are distributed with the ToolKit release. For
|
||||||
control, the Synthesis Toolkit uses raw MIDI (on supported platforms),
|
control, the Synthesis Toolkit uses raw MIDI (on supported platforms),
|
||||||
@@ -73,10 +73,10 @@ text message synthesis control format).
|
|||||||
|
|
||||||
# SYSTEM REQUIREMENTS
|
# 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
|
for platform specific information and system requirements. In
|
||||||
general, you will use the configure script to create Makefiles on unix
|
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
|
example programs. To use the Tcl/Tk GUIs, you will need Tcl/Tk
|
||||||
version 8.0 or higher.
|
version 8.0 or higher.
|
||||||
|
|
||||||
@@ -104,10 +104,10 @@ Md2Skini program.
|
|||||||
Realtime audio input capabilities were added to STK with release 3.0,
|
Realtime audio input capabilities were added to STK with release 3.0,
|
||||||
though the behavior of such is very hardware dependent. Under Linux
|
though the behavior of such is very hardware dependent. Under Linux
|
||||||
and Macintosh OS-X, audio input and output are possible with very low
|
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 seems to be around 20 milliseconds or so, while input
|
||||||
sound latency is generally higher. Performance with the ASIO audio
|
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
|
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
|
program to .snd, .wav, .raw, .aif, and .mat (Matlab MAT-file) output
|
||||||
|
|||||||
55
STK.podspec
Normal file
55
STK.podspec
Normal 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
21
cmake/FindCoreAudio.cmake
Normal 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)
|
||||||
|
|
||||||
|
|
||||||
38
configure.ac
38
configure.ac
@@ -1,5 +1,5 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
AC_INIT(STK, 4.6.0, gary@music.mcgill.ca, stk)
|
AC_INIT([STK],[5.0.0],[gary.scavone@mcgill.ca],[stk])
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AC_CONFIG_SRCDIR(src/Stk.cpp)
|
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)
|
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.
|
# Fill GXX with something before test.
|
||||||
AC_SUBST( GXX, ["no"] )
|
AC_SUBST( GXX, ["no"] )
|
||||||
|
|
||||||
|
# standards version
|
||||||
|
m4_include([m4/ax_cxx_compile_stdcxx.m4])
|
||||||
|
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CXX(g++ CC c++ cxx)
|
AC_PROG_CXX(g++ CC c++ cxx)
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
@@ -16,13 +20,15 @@ if [[ $AR = "no" ]] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_CHECK_INCLUDES_DEFAULT
|
||||||
|
AC_PROG_EGREP
|
||||||
|
|
||||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h termio.h unistd.h)
|
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h termio.h unistd.h)
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_HEADER_TIME
|
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
AC_EGREP_CPP(yes,
|
AC_EGREP_CPP(yes,
|
||||||
[#ifndef WORDS_BIGENDIAN
|
[#ifndef WORDS_BIGENDIAN
|
||||||
@@ -120,7 +126,7 @@ case $host in
|
|||||||
*-apple*)
|
*-apple*)
|
||||||
AC_SUBST( sharedlib, ["libstk.dylib"] )
|
AC_SUBST( sharedlib, ["libstk.dylib"] )
|
||||||
AC_SUBST( sharedname, ["${basesharedname}.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
|
esac
|
||||||
|
|
||||||
if test $realtime = yes; then
|
if test $realtime = yes; then
|
||||||
@@ -134,6 +140,22 @@ api="$api -D__UNIX_JACK__"
|
|||||||
AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))])
|
AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))])
|
||||||
|
|
||||||
case $host in
|
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*)
|
*-*-linux*)
|
||||||
# Look for ALSA flag
|
# Look for ALSA flag
|
||||||
AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)])
|
AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)])
|
||||||
@@ -142,6 +164,14 @@ api="$api -D__UNIX_JACK__"
|
|||||||
AC_MSG_RESULT(using ALSA)
|
AC_MSG_RESULT(using ALSA)
|
||||||
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))])
|
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))])
|
||||||
|
|
||||||
|
# Look for PulseAudio flag
|
||||||
|
AC_ARG_WITH(pulse, [ --with-pulse = choose PulseAudio support (linux only)])
|
||||||
|
AS_IF([test "x$with_pulse" == "xyes"], [
|
||||||
|
api="$api -D__LINUX_PULSE__"
|
||||||
|
AC_MSG_RESULT(using PulseAudio)
|
||||||
|
AC_CHECK_LIB(pulse, pa_proplist_gets, , AC_MSG_ERROR(PulseAudio support requires the libpulse library!))
|
||||||
|
AC_CHECK_LIB(pulse-simple, pa_simple_new, , AC_MSG_ERROR(PulseAudio support requires the libpulse-simple library!))])
|
||||||
|
|
||||||
# Look for OSS flag
|
# Look for OSS flag
|
||||||
AC_ARG_WITH(oss, [ --with-oss = choose OSS API support (unixes only)])
|
AC_ARG_WITH(oss, [ --with-oss = choose OSS API support (unixes only)])
|
||||||
AS_IF([test "x$with_oss" == "xyes"], [
|
AS_IF([test "x$with_oss" == "xyes"], [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
The Synthesis ToolKit in C++ (STK)
|
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--2023.
|
||||||
|
|
||||||
Please read the file README and INSTALL for more general STK information.
|
Please read the file README and INSTALL for more general STK information.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
The Synthesis ToolKit in C++ (STK)
|
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--2023.
|
||||||
|
|
||||||
Please read the file README and INSTALL for more general STK information.
|
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:
|
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.
|
The Tcl/Tk interpreter included in the Xcode package seems outdated. Try getting tcl-tk through HomeBrew for an updated version.
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
The Synthesis ToolKit in C++ (STK)
|
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--2023.
|
||||||
|
|
||||||
Please read the file README and INSTALL for more general STK information.
|
Please read the file README and INSTALL for more general STK information.
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +1,26 @@
|
|||||||
The Synthesis ToolKit in C++ (STK)
|
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--2023.
|
||||||
|
|
||||||
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.
|
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.
|
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.
|
|
||||||
|
|||||||
@@ -1,6 +1,31 @@
|
|||||||
The Synthesis ToolKit in C++ (STK)
|
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--2023.
|
||||||
|
|
||||||
|
v.5.0.1 (10 August 2023)
|
||||||
|
- see github site for complete details (github.com/thestk/stk)
|
||||||
|
- cmake updates
|
||||||
|
- fix for demo msvc project in Windows
|
||||||
|
|
||||||
|
v.5.0.0 (4 August 2023)
|
||||||
|
- see github site for complete details (github.com/thestk/stk)
|
||||||
|
- new filter design functionality in BiQuad (thanks to Navin Kumar!)
|
||||||
|
- update to PitShift to use a single delay line
|
||||||
|
- various updates for new RtAudio API
|
||||||
|
|
||||||
|
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)
|
v.4.6.0 (31 August 2017)
|
||||||
- see github site for complete details
|
- see github site for complete details
|
||||||
@@ -155,7 +180,7 @@ v4.1.3: (22 March 2004)
|
|||||||
v4.1.2: (15 March 2004)
|
v4.1.2: (15 March 2004)
|
||||||
- added Linux JACK support to RtAudio
|
- added Linux JACK support to RtAudio
|
||||||
- added optional doNormalize argument to WvIn to allow specification of data normalization or not
|
- 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
|
- added support for dynamic rawwavePath() setting
|
||||||
- WaveLoop bug fix
|
- WaveLoop bug fix
|
||||||
- fixed bug in ADSR::setReleaseTime() method
|
- fixed bug in ADSR::setReleaseTime() method
|
||||||
@@ -179,7 +204,7 @@ v4.1: (8 October 2002)
|
|||||||
- added Voicer, SingWave, and VoicForm classes
|
- added Voicer, SingWave, and VoicForm classes
|
||||||
- improvements/fixes to the banded waveguide instruments
|
- improvements/fixes to the banded waveguide instruments
|
||||||
- demo program now uses Voicer, allowing polyphony
|
- 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
|
- demo program response to PitchBend modified to octave up/down
|
||||||
- several RtAudio fixes and improvements (OS X and Windows ASIO support added)
|
- several RtAudio fixes and improvements (OS X and Windows ASIO support added)
|
||||||
- added nextOut() method to Delay classes
|
- added nextOut() method to Delay classes
|
||||||
|
|||||||
2818
doc/doxygen/Doxyfile
2818
doc/doxygen/Doxyfile
File diff suppressed because it is too large
Load Diff
@@ -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.
|
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"
|
\section rtvsnonrt "Realtime" vs. "Non-Realtime"
|
||||||
|
|
||||||
@@ -37,19 +38,19 @@ STK compiles with realtime support on the following flavors of the Unix operatin
|
|||||||
<TR>
|
<TR>
|
||||||
<TD>Linux</TD>
|
<TD>Linux</TD>
|
||||||
<TD>ALSA</TD>
|
<TD>ALSA</TD>
|
||||||
<TD>__LINUX_ALSA__, __LITTLE_ENDIAN__</TD>
|
<TD>__LINUX_ALSA__, \__LITTLE_ENDIAN__</TD>
|
||||||
<TD><TT>asound, pthread</TT></TD>
|
<TD><TT>asound, pthread</TT></TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>Linux</TD>
|
<TD>Linux</TD>
|
||||||
<TD>OSS (version 4.0 only, use ALSA for MIDI support)</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>
|
<TD><TT>asound, pthread</TT></TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>Linux and Macintosh OS-X</TD>
|
<TD>Linux and Macintosh OS-X</TD>
|
||||||
<TD>Jack</TD>
|
<TD>Jack</TD>
|
||||||
<TD>__UNIX_JACK__, __LITTLE_ENDIAN__</TD>
|
<TD>__UNIX_JACK__, \__LITTLE_ENDIAN__</TD>
|
||||||
<TD><TT>asound, pthread, jack</TT></TD>
|
<TD><TT>asound, pthread, jack</TT></TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@@ -104,24 +105,5 @@ g++ -Wall -D__LITTLE_ENDIAN__ -o sineosc sineosc.cpp -lstk
|
|||||||
\endcode
|
\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>] [<A HREF="filtering.html">Next tutorial</A>]
|
[<A HREF="tutorial.html">Main tutorial page</A>] [<A HREF="filtering.html">Next tutorial</A>]
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ then uses the stk::Messager:popMessage() function to retrieve incoming
|
|||||||
control messages. This function does not block, instead returning a
|
control messages. This function does not block, instead returning a
|
||||||
message type of zero when no more messages are in the queue. Many of
|
message type of zero when no more messages are in the queue. Many of
|
||||||
the example programs included with the ToolKit distribution use a
|
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
|
graphical user interfaces, from external MIDI devices, or from SKINI
|
||||||
scorefiles.
|
scorefiles.
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,35 @@
|
|||||||
/*! \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 5.0.1 (10 August 2023):
|
||||||
|
|
||||||
- <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-5.0.1.tar.gz">Source distribution</A>
|
||||||
|
|
||||||
\section notes Release Notes:
|
\section notes Release Notes:
|
||||||
|
\subsection v5dot0dot1 Version 5.0.1
|
||||||
|
- see github site for complete details (github.com/thestk/stk)
|
||||||
|
- cmake updates
|
||||||
|
- fix for demo msvc project in Windows
|
||||||
|
|
||||||
|
\subsection v5dot0dot0 Version 5.0.0
|
||||||
|
- see github site for complete details (github.com/thestk/stk)
|
||||||
|
- new filter design functionality in BiQuad (thanks to Navin Kumar!)
|
||||||
|
- update to PitShift to use a single delay line
|
||||||
|
- various updates for new RtAudio API
|
||||||
|
|
||||||
|
\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
|
\subsection v4dot6dot0 Version 4.6.0
|
||||||
- see github site for complete details (github.com/thestk/stk)
|
- see github site for complete details (github.com/thestk/stk)
|
||||||
- various build system updates
|
- various build system updates
|
||||||
@@ -149,7 +174,7 @@
|
|||||||
\subsection v4dot1dot2 Version 4.1.2
|
\subsection v4dot1dot2 Version 4.1.2
|
||||||
- Added Linux JACK support to RtAudio.
|
- Added Linux JACK support to RtAudio.
|
||||||
- Added optional doNormalize argument to WvIn to allow specification of data normalization or not.
|
- 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.
|
- Added support for dynamic rawwavePath() setting.
|
||||||
- WaveLoop bug fix.
|
- WaveLoop bug fix.
|
||||||
- Fixed bug in ADSR::setReleaseTime() method.
|
- Fixed bug in ADSR::setReleaseTime() method.
|
||||||
@@ -173,7 +198,7 @@
|
|||||||
- Added Voicer, SingWave, and VoicForm classes.
|
- Added Voicer, SingWave, and VoicForm classes.
|
||||||
- Improvements/fixes to the banded waveguide instruments.
|
- Improvements/fixes to the banded waveguide instruments.
|
||||||
- Demo program now uses Voicer, allowing polyphony.
|
- 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.
|
- Demo program response to PitchBend modified to octave up/down.
|
||||||
- Several RtAudio fixes and improvements (OS X and Windows ASIO support added).
|
- Several RtAudio fixes and improvements (OS X and Windows ASIO support added).
|
||||||
- Added nextOut() method to Delay classes.
|
- Added nextOut() method to Delay classes.
|
||||||
@@ -267,7 +292,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.
|
- 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.
|
- 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.
|
- 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).
|
- 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.
|
- 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.
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ and Windows computer platforms. Generic, non-realtime support has
|
|||||||
been tested under NeXTStep, Sun, and other platforms and should
|
been tested under NeXTStep, Sun, and other platforms and should
|
||||||
work with any standard C++ compiler.
|
work with any standard C++ compiler.
|
||||||
|
|
||||||
|
STK GitHub site: https://github.com/thestk/stk
|
||||||
STK WWW site: http://ccrma.stanford.edu/software/stk/
|
STK WWW site: http://ccrma.stanford.edu/software/stk/
|
||||||
|
|
||||||
The Synthesis ToolKit in C++ (STK)
|
The Synthesis ToolKit in C++ (STK)
|
||||||
Copyright (c) 1995--2017 Perry R. Cook and Gary P. Scavone
|
Copyright (c) 1995--2023 Perry R. Cook and Gary P. Scavone
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
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?
|
\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
|
\code
|
||||||
Application initialization failed: this isn't a Tk applicationcouldn't connect to display ":0.0"
|
Application initialization failed: this isn't a Tk applicationcouldn't connect to display ":0.0"
|
||||||
|
|||||||
@@ -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],
|
a[0]*y[n] = b[0]*x[n] + ... + b[nb]*x[n-nb] - a[1]*y[n-1] - ... - a[na]*y[n-na],
|
||||||
\endcode
|
\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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||||
<tr><td>©1995--2017 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
<tr><td>©1995--2023 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ platforms and should work with any standard C++ compiler.
|
|||||||
- \ref links
|
- \ref links
|
||||||
- \ref faq
|
- \ref faq
|
||||||
- \ref tutorial
|
- \ref tutorial
|
||||||
|
- <A href="http://github.com/thestk/stk">Stk on GitHub</A>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -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 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>
|
<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.
|
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>
|
<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
|
greatly expanded the synthesis techniques available. With the help of
|
||||||
Bill Putnam, Perry also made a port of STK to Windows95. Gary Scavone
|
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
|
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
|
port of STK to Linux early in 1998. He finished the fully compatible
|
||||||
Windows port (using Direct Sound API) in June 1998. Numerous
|
Windows port (using DirectSound API) in June 1998. Numerous
|
||||||
improvements and extensions have been made since then.
|
improvements and extensions have been made since then.
|
||||||
|
|
||||||
The Toolkit has been distributed continuously since 1996 via the <A
|
The Toolkit has been distributed continuously since 1996 via the <A
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ We have written this program to accept control messages from \c STDIN. Assuming
|
|||||||
threebees < scores/bachfugue.ski
|
threebees < scores/bachfugue.ski
|
||||||
\endcode
|
\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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<B>General:</B>
|
<B>General:</B>
|
||||||
<UL>
|
<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 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>
|
</UL>
|
||||||
|
|
||||||
<B>Linux (specific):</B>
|
<B>Linux (specific):</B>
|
||||||
@@ -17,13 +17,13 @@
|
|||||||
<UL>
|
<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>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>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>
|
</UL>
|
||||||
|
|
||||||
<B>Windows95/98/2000/XP/7 (specific):</B>
|
<B>Windows95 and later (specific):</B>
|
||||||
<UL>
|
<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 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>
|
<LI><A HREF="http://www.microsoft.com/directx/">DirectX</A> 5.0 (or higher) runtime libraries.</LI>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ This release of STK comes with four separate "project" directories:
|
|||||||
\section compiling Compiling:
|
\section compiling Compiling:
|
||||||
|
|
||||||
<UL>
|
<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.
|
<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-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-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-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-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>
|
</UL>
|
||||||
<P>
|
<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:
|
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>
|
<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>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>
|
<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>
|
</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>
|
<LI>Acquire realtime MIDI messages from a MIDI port on your computer.</LI>
|
||||||
</OL>
|
</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
|
\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
|
\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>
|
<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:
|
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:
|
\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
|
\code
|
||||||
wish < tcl/Physical.tcl | stk-demo Clarinet -or -ip
|
wish < tcl/Physical.tcl | stk-demo Clarinet -or -ip
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
STK: A ToolKit of Audio Synthesis Classes and Instruments in C++
|
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--2023.
|
||||||
|
|
||||||
STK Classes - See the HTML documentation in the html directory for complete information.
|
STK Classes - See the HTML documentation in the html directory for complete information.
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ Stk -| UdpSocket
|
|||||||
.- Instrmnt -|
|
.- Instrmnt -|
|
||||||
|- Drummer
|
|- Drummer
|
||||||
|
|
|
|
||||||
|- Clarinet, BlowHole, Saxofony, Flute, Brass, BlowBotl, Bowed, Plucked, StifKarp, Sitar
|
|- Clarinet, BlowHole, Saxofony, Flute, Brass, BlowBotl, Bowed, Plucked, StifKarp, Sitar, Recorder
|
||||||
|
|
|
|
||||||
|- Shakers
|
|- 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
|
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
|
Saxofony.cpp A Faux Saxophone DelayL, ReedTabl, OneZero, Envelope, Noise, WaveLoop
|
||||||
Flute.cpp Pretty Good Flute JetTabl, DelayL, OnePole, PoleZero, Noise, ADSR, 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
|
BlowBotl.cpp Blown Bottle JetTabl, BiQuad, PoleZero, Noise, ADSR, WaveLoop
|
||||||
BandedWG.cpp Banded Waveguide Meta-Object Delay, BowTabl, ADSR, BiQuad
|
BandedWG.cpp Banded Waveguide Meta-Object Delay, BowTabl, ADSR, BiQuad
|
||||||
Modal.cpp N Resonances Envelope, WaveLoop, BiQuad, OnePole
|
Modal.cpp N Resonances Envelope, WaveLoop, BiQuad, OnePole
|
||||||
|
|||||||
BIN
doc/html/ccrma.gif
Normal file
BIN
doc/html/ccrma.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
BIN
doc/html/mcgill.gif
Normal file
BIN
doc/html/mcgill.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
doc/html/princeton.gif
Normal file
BIN
doc/html/princeton.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
@@ -1,14 +1,18 @@
|
|||||||
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
|
## 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`
|
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. Clone or [download][download_link] the STK into your project's directory.
|
||||||
|
|
||||||
@@ -17,19 +21,23 @@ This file contains instructions for integrating the STK in Xcode projects and so
|
|||||||
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]
|
![][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.
|
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]
|
![][header_search_paths_screenshot]
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## 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"`
|
* 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**
|
* 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
|
## Troubleshooting
|
||||||
@@ -47,21 +55,21 @@ If this problem doesn't go away:
|
|||||||
1. Follow step 1 from **Setup**, add `stk/include` to the *Header Search Paths*.
|
1. Follow step 1 from **Setup**, add `stk/include` to the *Header Search Paths*.
|
||||||
|
|
||||||
If that doesn't solve it:
|
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)!
|
### 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:
|
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)!`
|
`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
|
```objective-c
|
||||||
stk::Stk::setRawwavePath([[[NSBundle mainBundle] pathForResource:@"rawwaves" ofType:@"bundle"] UTF8String]);
|
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. 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. In the *Copy Bundle Resources*, drag and drop **rawwaves.bundle** (it's located in **STK.xcodeproj**'s **Helpers** folder).
|
||||||
@@ -72,17 +80,6 @@ NSBundle *rawwaveBundle = [NSBundle bundleWithURL:[[NSBundle mainBundle] URLForR
|
|||||||
stk::Stk::setRawwavePath([[rawwaveBundle resourcePath] UTF8String]);
|
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
|
### 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).
|
||||||
|
|||||||
@@ -726,14 +726,15 @@
|
|||||||
B08F608818BA9B0600C14A90 /* Project object */ = {
|
B08F608818BA9B0600C14A90 /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0720;
|
LastUpgradeCheck = 1140;
|
||||||
};
|
};
|
||||||
buildConfigurationList = B08F608B18BA9B0600C14A90 /* Build configuration list for PBXProject "STK" */;
|
buildConfigurationList = B08F608B18BA9B0600C14A90 /* Build configuration list for PBXProject "STK" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
developmentRegion = English;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
en,
|
en,
|
||||||
|
Base,
|
||||||
);
|
);
|
||||||
mainGroup = B08F608718BA9B0600C14A90;
|
mainGroup = B08F608718BA9B0600C14A90;
|
||||||
productRefGroup = B05F5A5A18BC1018008EE790 /* Helpers */;
|
productRefGroup = B05F5A5A18BC1018008EE790 /* Helpers */;
|
||||||
@@ -895,7 +896,33 @@
|
|||||||
B08F608C18BA9B0600C14A90 /* Debug */ = {
|
B08F608C18BA9B0600C14A90 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
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;
|
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;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -903,6 +930,32 @@
|
|||||||
B08F608D18BA9B0600C14A90 /* Release */ = {
|
B08F608D18BA9B0600C14A90 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
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;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -945,7 +998,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
);
|
);
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
MACOSX_DEPLOYMENT_TARGET = "";
|
MACOSX_DEPLOYMENT_TARGET = "";
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@@ -988,7 +1041,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
);
|
);
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
MACOSX_DEPLOYMENT_TARGET = "";
|
MACOSX_DEPLOYMENT_TARGET = "";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
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.
|
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:
|
Note the following:
|
||||||
|
|
||||||
@@ -25,6 +25,13 @@
|
|||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
834A47CB24435D350028575A /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = B0779A7E18D376A5004DA9B7 /* STK.xcodeproj */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = B0EC337B18CB73480005787B;
|
||||||
|
remoteInfo = rawwaves;
|
||||||
|
};
|
||||||
B02FD55218C520D70009ECA9 /* PBXContainerItemProxy */ = {
|
B02FD55218C520D70009ECA9 /* PBXContainerItemProxy */ = {
|
||||||
isa = PBXContainerItemProxy;
|
isa = PBXContainerItemProxy;
|
||||||
containerPortal = B02FD52A18C520D60009ECA9 /* Project object */;
|
containerPortal = B02FD52A18C520D60009ECA9 /* Project object */;
|
||||||
@@ -68,7 +75,7 @@
|
|||||||
B02FD56E18C521560009ECA9 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
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>"; };
|
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>"; };
|
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 */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -99,7 +106,7 @@
|
|||||||
B02FD52918C520D60009ECA9 = {
|
B02FD52918C520D60009ECA9 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
B0779A8918D37977004DA9B7 /* README.MD */,
|
B0779A8918D37977004DA9B7 /* README.md */,
|
||||||
B0779A7E18D376A5004DA9B7 /* STK.xcodeproj */,
|
B0779A7E18D376A5004DA9B7 /* STK.xcodeproj */,
|
||||||
B02FD53B18C520D60009ECA9 /* iOS Demo */,
|
B02FD53B18C520D60009ECA9 /* iOS Demo */,
|
||||||
B02FD55418C520D70009ECA9 /* iOS DemoTests */,
|
B02FD55418C520D70009ECA9 /* iOS DemoTests */,
|
||||||
@@ -193,6 +200,7 @@
|
|||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
dependencies = (
|
dependencies = (
|
||||||
|
834A47CC24435D350028575A /* PBXTargetDependency */,
|
||||||
);
|
);
|
||||||
name = "iOS Demo";
|
name = "iOS Demo";
|
||||||
productName = "iOS Demo";
|
productName = "iOS Demo";
|
||||||
@@ -223,7 +231,7 @@
|
|||||||
B02FD52A18C520D60009ECA9 /* Project object */ = {
|
B02FD52A18C520D60009ECA9 /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0510;
|
LastUpgradeCheck = 1140;
|
||||||
ORGANIZATIONNAME = "Ariel Elkin";
|
ORGANIZATIONNAME = "Ariel Elkin";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
B02FD54C18C520D70009ECA9 = {
|
B02FD54C18C520D70009ECA9 = {
|
||||||
@@ -233,10 +241,11 @@
|
|||||||
};
|
};
|
||||||
buildConfigurationList = B02FD52D18C520D60009ECA9 /* Build configuration list for PBXProject "iOS Demo" */;
|
buildConfigurationList = B02FD52D18C520D60009ECA9 /* Build configuration list for PBXProject "iOS Demo" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
developmentRegion = English;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
en,
|
en,
|
||||||
|
Base,
|
||||||
);
|
);
|
||||||
mainGroup = B02FD52918C520D60009ECA9;
|
mainGroup = B02FD52918C520D60009ECA9;
|
||||||
productRefGroup = B02FD53318C520D60009ECA9 /* Products */;
|
productRefGroup = B02FD53318C520D60009ECA9 /* Products */;
|
||||||
@@ -315,6 +324,11 @@
|
|||||||
/* End PBXSourcesBuildPhase section */
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXTargetDependency section */
|
/* Begin PBXTargetDependency section */
|
||||||
|
834A47CC24435D350028575A /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
name = rawwaves;
|
||||||
|
targetProxy = 834A47CB24435D350028575A /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
B02FD55318C520D70009ECA9 /* PBXTargetDependency */ = {
|
B02FD55318C520D70009ECA9 /* PBXTargetDependency */ = {
|
||||||
isa = PBXTargetDependency;
|
isa = PBXTargetDependency;
|
||||||
target = B02FD53118C520D60009ECA9 /* iOS Demo */;
|
target = B02FD53118C520D60009ECA9 /* iOS Demo */;
|
||||||
@@ -346,22 +360,37 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = 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_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;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
"DEBUG=1",
|
"DEBUG=1",
|
||||||
@@ -374,7 +403,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
};
|
};
|
||||||
@@ -384,29 +413,43 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = 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_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;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
COPY_PHASE_STRIP = YES;
|
COPY_PHASE_STRIP = YES;
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
@@ -425,6 +468,7 @@
|
|||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "iOS Demo/iOS Demo-Info.plist";
|
INFOPLIST_FILE = "iOS Demo/iOS Demo-Info.plist";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "stk.${PRODUCT_NAME:rfc1034identifier}";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
WRAPPER_EXTENSION = app;
|
WRAPPER_EXTENSION = app;
|
||||||
};
|
};
|
||||||
@@ -443,6 +487,7 @@
|
|||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "iOS Demo/iOS Demo-Info.plist";
|
INFOPLIST_FILE = "iOS Demo/iOS Demo-Info.plist";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "stk.${PRODUCT_NAME:rfc1034identifier}";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
WRAPPER_EXTENSION = app;
|
WRAPPER_EXTENSION = app;
|
||||||
};
|
};
|
||||||
@@ -464,6 +509,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "iOS DemoTests/iOS DemoTests-Info.plist";
|
INFOPLIST_FILE = "iOS DemoTests/iOS DemoTests-Info.plist";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "stk.${PRODUCT_NAME:rfc1034identifier}";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||||
WRAPPER_EXTENSION = xctest;
|
WRAPPER_EXTENSION = xctest;
|
||||||
@@ -482,6 +528,7 @@
|
|||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = "iOS Demo/iOS Demo-Prefix.pch";
|
GCC_PREFIX_HEADER = "iOS Demo/iOS Demo-Prefix.pch";
|
||||||
INFOPLIST_FILE = "iOS DemoTests/iOS DemoTests-Info.plist";
|
INFOPLIST_FILE = "iOS DemoTests/iOS DemoTests-Info.plist";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "stk.${PRODUCT_NAME:rfc1034identifier}";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||||
WRAPPER_EXTENSION = xctest;
|
WRAPPER_EXTENSION = xctest;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>stk.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>stk.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace stk {
|
|||||||
be non-negative. All time settings are in seconds and must be
|
be non-negative. All time settings are in seconds and must be
|
||||||
positive.
|
positive.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace stk {
|
|||||||
to \e keyOn and \e keyOff messages by ramping to
|
to \e keyOn and \e keyOff messages by ramping to
|
||||||
1.0 on keyOn and to 0.0 on keyOff.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace stk {
|
|||||||
- Glass Harmonica = 2
|
- Glass Harmonica = 2
|
||||||
- Tibetan Bowl = 3
|
- Tibetan Bowl = 3
|
||||||
|
|
||||||
by Georg Essl, 1999 - 2004.
|
by Georg Essl, 1999--2004.
|
||||||
Modified for STK 4.0 by Gary Scavone.
|
Modified for STK 4.0 by Gary Scavone.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace stk {
|
|||||||
type who should worry about this (making
|
type who should worry about this (making
|
||||||
money) worry away.
|
money) worry away.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,15 @@ namespace stk {
|
|||||||
Methods are provided for creating a resonance or notch in the
|
Methods are provided for creating a resonance or notch in the
|
||||||
frequency response while maintaining a constant filter gain.
|
frequency response while maintaining a constant filter gain.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
Formulae used calculate coefficients for lowpass, highpass,
|
||||||
|
bandpass, bandreject and allpass are found on pg. 55 of
|
||||||
|
Udo Zölzer's "DAFX - Digital Audio Effects" (2011 2nd ed).
|
||||||
|
|
||||||
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
const StkFloat RECIP_SQRT_2 = static_cast<StkFloat>( M_SQRT1_2 );
|
||||||
class BiQuad : public Filter
|
class BiQuad : public Filter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -74,12 +79,72 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setNotch( StkFloat frequency, StkFloat radius );
|
void setNotch( StkFloat frequency, StkFloat radius );
|
||||||
|
|
||||||
|
//! Set the filter coefficients for a low-pass with cutoff frequency \e fc (in Hz) and Q-factor \e Q.
|
||||||
|
/*!
|
||||||
|
This method determines the filter coefficients corresponding to a
|
||||||
|
low-pass filter with cutoff placed at \e fc, where sloping behaviour
|
||||||
|
and resonance are determined by \e Q. The default value for \e Q is
|
||||||
|
1/sqrt(2), resulting in a gradual attenuation of frequencies higher than
|
||||||
|
\e fc without added resonance. Values greater than this will more
|
||||||
|
aggressively attenuate frequencies above \e fc while also adding a
|
||||||
|
resonance at \e fc. Values less than this will result in a more gradual
|
||||||
|
attenuation of frequencies above \e fc, but will also attenuate
|
||||||
|
frequencies below \e fc as well. Both \e fc and \e Q must be positive.
|
||||||
|
*/
|
||||||
|
void setLowPass( StkFloat fc, StkFloat Q=RECIP_SQRT_2 );
|
||||||
|
|
||||||
|
//! Set the filter coefficients for a high-pass with cutoff frequency \e fc (in Hz) and Q-factor \e Q.
|
||||||
|
/*!
|
||||||
|
This method determines the filter coefficients corresponding to a high-pass
|
||||||
|
filter with cutoff placed at \e fc, where sloping behaviour and resonance
|
||||||
|
are determined by \e Q. The default value for \e Q is 1/sqrt(2), resulting
|
||||||
|
in a gradual attenuation of frequencies lower than \e fc without added
|
||||||
|
resonance. Values greater than this will more aggressively attenuate
|
||||||
|
frequencies below \e fc while also adding a resonance at \e fc. Values less
|
||||||
|
than this will result in a more gradual attenuation of frequencies below
|
||||||
|
\e fc, but will also attenuate frequencies above \e fc as well.
|
||||||
|
Both \e fc and \e Q must be positive.
|
||||||
|
*/
|
||||||
|
void setHighPass( StkFloat fc, StkFloat Q=RECIP_SQRT_2 );
|
||||||
|
|
||||||
|
//! Set the filter coefficients for a band-pass centered at \e fc (in Hz) with Q-factor \e Q.
|
||||||
|
/*!
|
||||||
|
This method determines the filter coefficients corresponding to a band-pass
|
||||||
|
filter with pass-band centered at \e fc, where band width and slope a
|
||||||
|
determined by \e Q. Values for \e Q that are less than 1.0 will attenuate
|
||||||
|
frequencies above and below \e fc more gradually, resulting in a convex
|
||||||
|
slope and a wider band. Values for \e Q greater than 1.0 will attenuate
|
||||||
|
frequencies above and below \e fc more aggressively, resulting in a
|
||||||
|
concave slope and a narrower band. Both \e fc and \e Q must be positive.
|
||||||
|
*/
|
||||||
|
void setBandPass( StkFloat fc, StkFloat Q );
|
||||||
|
|
||||||
|
//! Set the filter coefficients for a band-reject centered at \e fc (in Hz) with Q-factor \e Q.
|
||||||
|
/*!
|
||||||
|
This method determines the filter coefficients corresponding to a
|
||||||
|
band-reject filter with stop-band centered at \e fc, where band width
|
||||||
|
and slope are determined by \e Q. Values for \e Q that are less than 1.0
|
||||||
|
will yield a wider band with greater attenuation of \e fc. Values for \e Q
|
||||||
|
greater than 1.0 will yield a narrower band with less attenuation of \e fc.
|
||||||
|
Both \e fc and \e Q must be positive.
|
||||||
|
*/
|
||||||
|
void setBandReject( StkFloat fc, StkFloat Q );
|
||||||
|
|
||||||
|
//! Set the filter coefficients for an all-pass centered at \e fc (in Hz) with Q-factor \e Q.
|
||||||
|
/*!
|
||||||
|
This method determines the filter coefficients corresponding to
|
||||||
|
an all-pass filter whose phase response crosses -pi radians at \e fc.
|
||||||
|
High values for \e Q will result in a more instantaenous shift in phase
|
||||||
|
response at \e fc. Lower values will result in a more gradual shift in
|
||||||
|
phase response around \e fc. Both \e fc and \e Q must be positive.
|
||||||
|
*/
|
||||||
|
void setAllPass( StkFloat fc, StkFloat Q );
|
||||||
|
|
||||||
//! Sets the filter zeroes for equal resonance gain.
|
//! Sets the filter zeroes for equal resonance gain.
|
||||||
/*!
|
/*!
|
||||||
When using the filter as a resonator, zeroes places at z = 1, z
|
When using the filter as a resonator, zeroes places at z = 1, z
|
||||||
= -1 will result in a constant gain at resonance of 1 / (1 - R),
|
= -1 will result in a constant gain at resonance of 1 / (1 - R),
|
||||||
where R is the pole radius setting.
|
where R is the pole radius setting.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
void setEqualGainZeroes( void );
|
void setEqualGainZeroes( void );
|
||||||
|
|
||||||
@@ -114,6 +179,14 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual void sampleRateChanged( StkFloat newRate, StkFloat oldRate );
|
virtual void sampleRateChanged( StkFloat newRate, StkFloat oldRate );
|
||||||
|
|
||||||
|
// Helper function to update the three intermediate values for the predefined filter types
|
||||||
|
// along with the feedback filter coefficients. Performs the debug check for fc and Q-factor arguments.
|
||||||
|
void setCommonFilterValues( StkFloat fc, StkFloat Q );
|
||||||
|
|
||||||
|
StkFloat K_;
|
||||||
|
StkFloat kSqr_;
|
||||||
|
StkFloat denom_;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline StkFloat BiQuad :: tick( StkFloat input )
|
inline StkFloat BiQuad :: tick( StkFloat input )
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace stk {
|
|||||||
in the presence of significant aliasing.
|
in the presence of significant aliasing.
|
||||||
|
|
||||||
Based on initial code of Robin Davies, 2005.
|
Based on initial code of Robin Davies, 2005.
|
||||||
Modified algorithm code by Gary Scavone, 2005 - 2006.
|
Modified algorithm code by Gary Scavone, 2005--2006.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace stk {
|
|||||||
- Vibrato Gain = 1
|
- Vibrato Gain = 1
|
||||||
- Volume = 128
|
- Volume = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace stk {
|
|||||||
- Register State = 1
|
- Register State = 1
|
||||||
- Breath Pressure = 128
|
- Breath Pressure = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace stk {
|
|||||||
(1986). The output is an instantaneous
|
(1986). The output is an instantaneous
|
||||||
reflection coefficient value.
|
reflection coefficient value.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace stk {
|
|||||||
- Frequency = 101
|
- Frequency = 101
|
||||||
- Volume = 128
|
- Volume = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
Contributions by Esteban Maestre, 2011.
|
Contributions by Esteban Maestre, 2011.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace stk {
|
|||||||
- Vibrato Gain = 1
|
- Vibrato Gain = 1
|
||||||
- Volume = 128
|
- Volume = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace stk {
|
|||||||
This class implements a chorus effect. It takes a monophonic
|
This class implements a chorus effect. It takes a monophonic
|
||||||
input signal and produces a stereo output signal.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace stk {
|
|||||||
- Vibrato Gain = 1
|
- Vibrato Gain = 1
|
||||||
- Breath Pressure = 128
|
- Breath Pressure = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace stk {
|
|||||||
A non-interpolating delay line is typically used in fixed
|
A non-interpolating delay line is typically used in fixed
|
||||||
delay-length applications, such as for reverberation.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace stk {
|
|||||||
minimum delay possible in this implementation is limited to a
|
minimum delay possible in this implementation is limited to a
|
||||||
value of 0.5.
|
value of 0.5.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace stk {
|
|||||||
delay setting. The use of higher order Lagrange interpolators can
|
delay setting. The use of higher order Lagrange interpolators can
|
||||||
typically improve (minimize) this attenuation characteristic.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace stk {
|
|||||||
of simultaneous voices) via a #define in the
|
of simultaneous voices) via a #define in the
|
||||||
Drummer.h.
|
Drummer.h.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace stk {
|
|||||||
|
|
||||||
This class implements an echo effect.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace stk {
|
|||||||
subclasses. It is general enough to support both monophonic and
|
subclasses. It is general enough to support both monophonic and
|
||||||
polyphonic input/output classes.
|
polyphonic input/output classes.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ namespace stk {
|
|||||||
This class implements a simple linear line envelope generator
|
This class implements a simple linear line envelope generator
|
||||||
which is capable of ramping to an arbitrary target value by a
|
which is capable of ramping to an arbitrary target value by a
|
||||||
specified \e rate. It also responds to simple \e keyOn and \e
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
@@ -31,11 +32,11 @@ class Envelope : public Generator
|
|||||||
//! Assignment operator.
|
//! Assignment operator.
|
||||||
Envelope& operator= ( const Envelope& e );
|
Envelope& operator= ( const Envelope& e );
|
||||||
|
|
||||||
//! Set target = 1.
|
//! Start ramping to specified target (default = 1).
|
||||||
void keyOn( void ) { this->setTarget( 1.0 ); };
|
void keyOn( StkFloat target = 1.0 ) { this->setTarget( target ); };
|
||||||
|
|
||||||
//! Set target = 0.
|
//! Start ramping to specified target (default = 0).
|
||||||
void keyOff( void ) { this->setTarget( 0.0 ); };
|
void keyOff( StkFloat target = 0.0 ) { this->setTarget( target ); };
|
||||||
|
|
||||||
//! Set the \e rate.
|
//! Set the \e rate.
|
||||||
/*!
|
/*!
|
||||||
@@ -46,7 +47,7 @@ class Envelope : public Generator
|
|||||||
//! Set the \e rate based on a positive time duration (seconds).
|
//! Set the \e rate based on a positive time duration (seconds).
|
||||||
/*!
|
/*!
|
||||||
The \e rate is calculated such that the envelope will ramp from
|
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 );
|
void setTime( StkFloat time );
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace stk {
|
|||||||
type who should worry about this (making
|
type who should worry about this (making
|
||||||
money) worry away.
|
money) worry away.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace stk {
|
|||||||
type who should worry about this (making
|
type who should worry about this (making
|
||||||
money) worry away.
|
money) worry away.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace stk {
|
|||||||
the overloaded one that takes an StkFrames object for
|
the overloaded one that takes an StkFrames object for
|
||||||
multi-channel and/or multi-frame data.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
@@ -74,7 +74,8 @@ class FileLoop : protected FileWvIn
|
|||||||
void normalize( StkFloat peak ) { FileWvIn::normalize( peak ); };
|
void normalize( StkFloat peak ) { FileWvIn::normalize( peak ); };
|
||||||
|
|
||||||
//! Return the file size in sample frames.
|
//! 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).
|
//! Return the input file sample rate in Hz (not the data read rate).
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace stk {
|
|||||||
such variable is found, the sample rate is
|
such variable is found, the sample rate is
|
||||||
assumed to be 44100 Hz.
|
assumed to be 44100 Hz.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace stk {
|
|||||||
type, the data type will automatically be modified. Compressed
|
type, the data type will automatically be modified. Compressed
|
||||||
data types are not supported.
|
data types are not supported.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace stk {
|
|||||||
See the FileRead class for a description of the supported audio
|
See the FileRead class for a description of the supported audio
|
||||||
file formats.
|
file formats.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace stk {
|
|||||||
Currently, FileWvOut is non-interpolating and the output rate is
|
Currently, FileWvOut is non-interpolating and the output rate is
|
||||||
always Stk::sampleRate().
|
always Stk::sampleRate().
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace stk {
|
|||||||
filter subclasses. It is general enough to support both
|
filter subclasses. It is general enough to support both
|
||||||
monophonic and polyphonic input/output classes.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace stk {
|
|||||||
This structure results in one extra multiply per computed sample,
|
This structure results in one extra multiply per computed sample,
|
||||||
but allows easy control of the overall filter gain.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace stk {
|
|||||||
- Vibrato Gain = 1
|
- Vibrato Gain = 1
|
||||||
- Breath Pressure = 128
|
- Breath Pressure = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
@@ -123,11 +123,12 @@ inline StkFloat Flute :: tick( unsigned int )
|
|||||||
breathPressure += breathPressure * ( noiseGain_ * noise_.tick() + vibratoGain_ * vibrato_.tick() );
|
breathPressure += breathPressure * ( noiseGain_ * noise_.tick() + vibratoGain_ * vibrato_.tick() );
|
||||||
|
|
||||||
StkFloat temp = -filter_.tick( boreDelay_.lastOut() );
|
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 = breathPressure - (jetReflection_ * temp);
|
||||||
pressureDiff = jetDelay_.tick( pressureDiff );
|
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] = (StkFloat) 0.3 * boreDelay_.tick( pressureDiff );
|
||||||
|
|
||||||
lastFrame_[0] *= outputGain_;
|
lastFrame_[0] *= outputGain_;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace stk {
|
|||||||
over time from one frequency setting to another. It provides
|
over time from one frequency setting to another. It provides
|
||||||
methods for controlling the sweep rate and target frequency.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace stk {
|
|||||||
implement tables or other types of input to output function
|
implement tables or other types of input to output function
|
||||||
mappings.
|
mappings.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace stk {
|
|||||||
generator sample-source subclasses. It is general enough to
|
generator sample-source subclasses. It is general enough to
|
||||||
support both monophonic and polyphonic output classes.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace stk {
|
|||||||
Chris Rolfe and Damian Keller, though there are likely to be a
|
Chris Rolfe and Damian Keller, though there are likely to be a
|
||||||
number of differences in the actual implementation.
|
number of differences in the actual implementation.
|
||||||
|
|
||||||
by Gary Scavone, 2005 - 2010.
|
by Gary Scavone, 2005--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -132,17 +132,20 @@ class Guitar : public Stk
|
|||||||
StkFrames lastFrame_;
|
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 )
|
inline StkFloat Guitar :: tick( StkFloat input )
|
||||||
{
|
{
|
||||||
StkFloat temp, output = 0.0;
|
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++ ) {
|
for ( unsigned int i=0; i<strings_.size(); i++ ) {
|
||||||
if ( stringState_[i] ) {
|
if ( stringState_[i] ) {
|
||||||
temp = input;
|
temp = input;
|
||||||
// If pluckGain < 0.2, let string ring but don't pluck it.
|
// If pluckGain < 0.2, let string ring but don't pluck it.
|
||||||
if ( filePointer_[i] < excitation_.frames() && pluckGains_[i] > 0.2 )
|
if ( filePointer_[i] < excitation_.frames() && pluckGains_[i] > 0.2 )
|
||||||
temp += pluckGains_[i] * excitation_[filePointer_[i]++];
|
temp += pluckGains_[i] * excitation_[filePointer_[i]++];
|
||||||
temp += couplingGain_ * couplingFilter_.tick( lastFrame_[0] ); // bridge coupling
|
temp += lastFrame_[0]; // bridge coupling
|
||||||
output += strings_[i].tick( temp );
|
output += strings_[i].tick( temp );
|
||||||
// Check if string energy has decayed sufficiently to turn it off.
|
// Check if string energy has decayed sufficiently to turn it off.
|
||||||
if ( stringState_[i] == 1 ) {
|
if ( stringState_[i] == 1 ) {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace stk {
|
|||||||
type who should worry about this (making
|
type who should worry about this (making
|
||||||
money) worry away.
|
money) worry away.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace stk {
|
|||||||
This structure results in one extra multiply per computed sample,
|
This structure results in one extra multiply per computed sample,
|
||||||
but allows easy control of the overall filter gain.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace stk {
|
|||||||
data type for the incoming stream is signed 16-bit integers,
|
data type for the incoming stream is signed 16-bit integers,
|
||||||
though any of the defined StkFormats are permissible.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace stk {
|
|||||||
data type is signed 16-bit integers but any of the defined
|
data type is signed 16-bit integers but any of the defined
|
||||||
StkFormats are permissible.
|
StkFormats are permissible.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace stk {
|
|||||||
This class provides a common interface for
|
This class provides a common interface for
|
||||||
all STK instruments.
|
all STK instruments.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace stk {
|
|||||||
one-pole lowpass filters have been added inside
|
one-pole lowpass filters have been added inside
|
||||||
the feedback comb filters.
|
the feedback comb filters.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace stk {
|
|||||||
Consult Fletcher and Rossing, Karjalainen,
|
Consult Fletcher and Rossing, Karjalainen,
|
||||||
Cook, and others for more information.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ inline void LentPitShift::process()
|
|||||||
dpt[delay_] = dt[delay_] * delay_ / cumDt[delay_];
|
dpt[delay_] = dt[delay_] * delay_ / cumDt[delay_];
|
||||||
|
|
||||||
// Look for a minimum
|
// 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
|
// Check if the minimum is under the threshold
|
||||||
if ( dpt[delay_-1] < threshold_ ){
|
if ( dpt[delay_-1] < threshold_ ){
|
||||||
lastPeriod_ = delay_-1;
|
lastPeriod_ = delay_-1;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace stk {
|
|||||||
- String Detuning = 1
|
- String Detuning = 1
|
||||||
- Microphone Position = 128
|
- Microphone Position = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace stk {
|
|||||||
- Mesh Decay = 11
|
- Mesh Decay = 11
|
||||||
- X-Y Input Position = 1
|
- X-Y Input Position = 1
|
||||||
|
|
||||||
by Julius Smith, 2000 - 2002.
|
by Julius Smith, 2000--2002.
|
||||||
Revised by Gary Scavone for STK, 2002.
|
Revised by Gary Scavone for STK, 2002.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace stk {
|
|||||||
This class is primarily for use in STK example programs but it is
|
This class is primarily for use in STK example programs but it is
|
||||||
generic enough to work in many other contexts.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace stk {
|
|||||||
Tempo changes are internally tracked by the class and reflected in
|
Tempo changes are internally tracked by the class and reflected in
|
||||||
the values returned by the function getTickSeconds().
|
the values returned by the function getTickSeconds().
|
||||||
|
|
||||||
by Gary P. Scavone, 2003 - 2010.
|
by Gary P. Scavone, 2003--2023.
|
||||||
*/
|
*/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace stk {
|
|||||||
(non-sweeping BiQuad filters), where N is set
|
(non-sweeping BiQuad filters), where N is set
|
||||||
during instantiation.
|
during instantiation.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace stk {
|
|||||||
- Two Fixed = 7
|
- Two Fixed = 7
|
||||||
- Clump = 8
|
- Clump = 8
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
//! Select a bar preset (currently modulo 9).
|
//! Select a bar preset (currently modulo 9).
|
||||||
void setPreset( int preset );
|
void setPreset( int preset );
|
||||||
|
|
||||||
//! Set the modulation (vibrato) depth.
|
//! Set the modulation (vibrato) depth (0.0 - 1.0).
|
||||||
void setModulationDepth( StkFloat mDepth );
|
void setModulationDepth( StkFloat mDepth );
|
||||||
|
|
||||||
//! Perform the control change specified by \e number and \e value (0.0 - 128.0).
|
//! Perform the control change specified by \e number and \e value (0.0 - 128.0).
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace stk {
|
|||||||
modulations to give a nice, natural human
|
modulations to give a nice, natural human
|
||||||
modulation function.
|
modulation function.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
@@ -41,6 +41,9 @@ class Modulate : public Generator
|
|||||||
//! Set the periodic (vibrato) gain.
|
//! Set the periodic (vibrato) gain.
|
||||||
void setVibratoGain( StkFloat gain ) { vibratoGain_ = 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.
|
//! Set the random modulation gain.
|
||||||
void setRandomGain( StkFloat gain );
|
void setRandomGain( StkFloat gain );
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace stk {
|
|||||||
- Vibrato Gain = 1
|
- Vibrato Gain = 1
|
||||||
- Gain = 128
|
- Gain = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace stk {
|
|||||||
systems, the pthread library is used. Under
|
systems, the pthread library is used. Under
|
||||||
Windows, critical sections are used.
|
Windows, critical sections are used.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace stk {
|
|||||||
another allpass in series, followed by two allpass filters in
|
another allpass in series, followed by two allpass filters in
|
||||||
parallel with corresponding right and left outputs.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace stk {
|
|||||||
C rand() function. The quality of the rand()
|
C rand() function. The quality of the rand()
|
||||||
function varies from one OS to another.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace stk {
|
|||||||
provided for setting the pole position along the real axis of the
|
provided for setting the pole position along the real axis of the
|
||||||
z-plane while maintaining a constant peak filter gain.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace stk {
|
|||||||
provided for setting the zero position along the real axis of the
|
provided for setting the zero position along the real axis of the
|
||||||
z-plane while maintaining a constant filter gain.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace stk {
|
|||||||
allpass and comb delay filters. This class implements two series
|
allpass and comb delay filters. This class implements two series
|
||||||
allpass units and two parallel comb filters.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace stk {
|
|||||||
type who should worry about this (making
|
type who should worry about this (making
|
||||||
money) worry away.
|
money) worry away.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace stk {
|
|||||||
set of 32 static phoneme formant parameters
|
set of 32 static phoneme formant parameters
|
||||||
and provide access to those values.
|
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--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ namespace stk {
|
|||||||
\brief STK simple pitch shifter effect class.
|
\brief STK simple pitch shifter effect class.
|
||||||
|
|
||||||
This class implements a simple pitch shifter
|
This class implements a simple pitch shifter
|
||||||
using delay lines.
|
using a delay line.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
const int maxDelay = 5024;
|
const int maxDelay = 5000; //5024;
|
||||||
|
|
||||||
class PitShift : public Effect
|
class PitShift : public Effect
|
||||||
{
|
{
|
||||||
@@ -61,9 +61,10 @@ class PitShift : public Effect
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
DelayL delayLine_[2];
|
DelayL delayLine_;
|
||||||
StkFloat delay_[2];
|
StkFloat delay_[2];
|
||||||
StkFloat env_[2];
|
StkFloat env_[2];
|
||||||
|
StkFrames window_;
|
||||||
StkFloat rate_;
|
StkFloat rate_;
|
||||||
unsigned long delayLength_;
|
unsigned long delayLength_;
|
||||||
unsigned long halfLength_;
|
unsigned long halfLength_;
|
||||||
@@ -73,26 +74,29 @@ class PitShift : public Effect
|
|||||||
inline StkFloat PitShift :: tick( StkFloat input )
|
inline StkFloat PitShift :: tick( StkFloat input )
|
||||||
{
|
{
|
||||||
// Calculate the two delay length values, keeping them within the
|
// Calculate the two delay length values, keeping them within the
|
||||||
// range 12 to maxDelay-12.
|
// range 0 to delayLength.
|
||||||
delay_[0] += rate_;
|
delay_[0] += rate_;
|
||||||
while ( delay_[0] > maxDelay-12 ) delay_[0] -= delayLength_;
|
while ( delay_[0] >= delayLength_ ) delay_[0] -= delayLength_;
|
||||||
while ( delay_[0] < 12 ) delay_[0] += delayLength_;
|
while ( delay_[0] < 0 ) delay_[0] += delayLength_;
|
||||||
|
|
||||||
delay_[1] = delay_[0] + halfLength_;
|
delay_[1] = delay_[0] + halfLength_;
|
||||||
while ( delay_[1] > maxDelay-12 ) delay_[1] -= delayLength_;
|
while ( delay_[1] >= delayLength_ ) delay_[1] -= delayLength_;
|
||||||
while ( delay_[1] < 12 ) delay_[1] += delayLength_;
|
while ( delay_[1] < 0 ) delay_[1] += delayLength_;
|
||||||
|
|
||||||
// Set the new delay line lengths.
|
// Set the new delay line lengths.
|
||||||
delayLine_[0].setDelay( delay_[0] );
|
delayLine_.setDelay( delay_[0] );
|
||||||
delayLine_[1].setDelay( delay_[1] );
|
|
||||||
|
|
||||||
// Calculate a triangular envelope.
|
// Calculate a triangular envelope.
|
||||||
env_[1] = fabs( ( delay_[0] - halfLength_ + 12 ) * ( 1.0 / (halfLength_ + 12 ) ) );
|
//env_[1] = fabs( ( delay_[0] - halfLength_ ) * ( 1.0 / (halfLength_ ) ) );
|
||||||
env_[0] = 1.0 - env_[1];
|
//env_[0] = 1.0 - env_[1];
|
||||||
|
|
||||||
|
// Or use the precomputed hanning window.
|
||||||
|
env_[1] = window_[delay_[0]];
|
||||||
|
env_[0] = window_[delay_[1]];
|
||||||
|
|
||||||
// Delay input and apply envelope.
|
// Delay input and apply envelope.
|
||||||
lastFrame_[0] = env_[0] * delayLine_[0].tick( input );
|
lastFrame_[0] = env_[1] * delayLine_.tapOut( delay_[1] );
|
||||||
lastFrame_[0] += env_[1] * delayLine_[1].tick( input );
|
lastFrame_[0] += env_[0] * delayLine_.tick( input );
|
||||||
|
|
||||||
// Compute effect mix and output.
|
// Compute effect mix and output.
|
||||||
lastFrame_[0] *= effectMix_;
|
lastFrame_[0] *= effectMix_;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace stk {
|
|||||||
Stanford, bearing the names of Karplus and/or
|
Stanford, bearing the names of Karplus and/or
|
||||||
Strong.
|
Strong.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace stk {
|
|||||||
coefficient. Another method is provided to create a DC blocking
|
coefficient. Another method is provided to create a DC blocking
|
||||||
filter.
|
filter.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
167
include/Recorder.h
Normal file
167
include/Recorder.h
Normal 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, 2023.
|
||||||
|
*/
|
||||||
|
/***************************************************/
|
||||||
|
|
||||||
|
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
|
||||||
@@ -20,7 +20,7 @@ namespace stk {
|
|||||||
Smith (1986), Hirschman, Cook, Scavone, and
|
Smith (1986), Hirschman, Cook, Scavone, and
|
||||||
others for more information.
|
others for more information.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace stk {
|
|||||||
- Zero Radii = 1
|
- Zero Radii = 1
|
||||||
- Envelope Gain = 128
|
- Envelope Gain = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2017.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user