mirror of
https://github.com/thestk/stk
synced 2026-01-15 05:51:52 +00:00
Compare commits
78 Commits
cocoapods-
...
master
| 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 |
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)
|
||||||
@@ -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-2019.
|
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.
|
||||||
|
|
||||||
@@ -49,6 +49,6 @@ If you wish to use a different compiler than that selected by configure, specify
|
|||||||
|
|
||||||
MinGW support is provided in the configure script. In addition, Visual Studio 2017 project files are included for each of the example STK projects.
|
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-2019 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
|
||||||
|
|||||||
@@ -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--2019.
|
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:
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Pod::Spec.new do |spec|
|
Pod::Spec.new do |spec|
|
||||||
spec.name = 'STK'
|
spec.name = 'STK'
|
||||||
spec.version = '4.6.1'
|
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.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.homepage = 'https://ccrma.stanford.edu/software/stk/'
|
||||||
spec.source = { :git => 'https://github.com/thestk/stk.git', :tag => spec.version }
|
spec.source = { :git => 'https://github.com/thestk/stk.git', :tag => spec.version }
|
||||||
|
|||||||
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)
|
||||||
|
|
||||||
|
|
||||||
22
configure.ac
22
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.1, 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
|
||||||
@@ -158,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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
By Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
|
|
||||||
Please read the file README.md for more general STK information.
|
Please read the file README.md for more general STK information.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,23 @@
|
|||||||
The Synthesis ToolKit in C++ (STK)
|
The Synthesis ToolKit in C++ (STK)
|
||||||
|
|
||||||
By Perry R. Cook and Gary P. Scavone, 1995--2019.
|
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)
|
v.4.6.1 (18 April 2019)
|
||||||
- see github site for complete details (github.com/thestk/stk)
|
- see github site for complete details (github.com/thestk/stk)
|
||||||
|
|||||||
3105
doc/doxygen/Doxyfile
3105
doc/doxygen/Doxyfile
File diff suppressed because it is too large
Load Diff
@@ -38,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>
|
||||||
|
|||||||
@@ -1,10 +1,27 @@
|
|||||||
/*! \page download Download and Release Notes
|
/*! \page download Download and Release Notes
|
||||||
|
|
||||||
\section down Download Version 4.6.1 (18 April 2019):
|
\section down Download Version 5.0.1 (10 August 2023):
|
||||||
|
|
||||||
- <A HREF="http://ccrma.stanford.edu/software/stk/release/stk-4.6.1.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
|
\subsection v4dot6dot1 Version 4.6.1
|
||||||
- see github site for complete details (github.com/thestk/stk)
|
- see github site for complete details (github.com/thestk/stk)
|
||||||
- various documentation updates
|
- various documentation updates
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ 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--2019 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
|
||||||
|
|||||||
@@ -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--2019 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>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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.
|
||||||
|
|
||||||
|
|||||||
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 |
@@ -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--2019.
|
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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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 )
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace stk {
|
|||||||
keyOff messages, ramping to a specified target (default = 1.0) on
|
keyOff messages, ramping to a specified target (default = 1.0) on
|
||||||
keyOn and to a specified target (default = 0.0) on keyOff.
|
keyOn and to a specified target (default = 0.0) on keyOff.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
by Gary Scavone, 2005--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace stk {
|
|||||||
- Breath Pressure = 128
|
- Breath Pressure = 128
|
||||||
|
|
||||||
by Mathias Bredholt, McGill University.
|
by Mathias Bredholt, McGill University.
|
||||||
Formatted for STK by Gary Scavone, 2019.
|
Formatted for STK by Gary Scavone, 2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -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--2019.
|
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--2019.
|
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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@
|
|||||||
RtMidi WWW site: http://www.music.mcgill.ca/~gary/rtmidi/
|
RtMidi WWW site: http://www.music.mcgill.ca/~gary/rtmidi/
|
||||||
|
|
||||||
RtMidi: realtime MIDI i/o C++ classes
|
RtMidi: realtime MIDI i/o C++ classes
|
||||||
Copyright (c) 2003-2019 Gary P. Scavone
|
Copyright (c) 2003-2023 Gary P. Scavone
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation files
|
obtaining a copy of this software and associated documentation files
|
||||||
@@ -58,13 +58,31 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RTMIDI_VERSION "4.0.0"
|
#define RTMIDI_VERSION_MAJOR 6
|
||||||
|
#define RTMIDI_VERSION_MINOR 0
|
||||||
|
#define RTMIDI_VERSION_PATCH 0
|
||||||
|
#define RTMIDI_VERSION_BETA 0
|
||||||
|
|
||||||
|
#define RTMIDI_TOSTRING2(n) #n
|
||||||
|
#define RTMIDI_TOSTRING(n) RTMIDI_TOSTRING2(n)
|
||||||
|
|
||||||
|
#if RTMIDI_VERSION_BETA > 0
|
||||||
|
#define RTMIDI_VERSION RTMIDI_TOSTRING(RTMIDI_VERSION_MAJOR) \
|
||||||
|
"." RTMIDI_TOSTRING(RTMIDI_VERSION_MINOR) \
|
||||||
|
"." RTMIDI_TOSTRING(RTMIDI_VERSION_PATCH) \
|
||||||
|
"beta" RTMIDI_TOSTRING(RTMIDI_VERSION_BETA)
|
||||||
|
#else
|
||||||
|
#define RTMIDI_VERSION RTMIDI_TOSTRING(RTMIDI_VERSION_MAJOR) \
|
||||||
|
"." RTMIDI_TOSTRING(RTMIDI_VERSION_MINOR) \
|
||||||
|
"." RTMIDI_TOSTRING(RTMIDI_VERSION_PATCH)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/*! \class RtMidiError
|
/*! \class RtMidiError
|
||||||
\brief Exception handling class for RtMidi.
|
\brief Exception handling class for RtMidi.
|
||||||
@@ -85,12 +103,12 @@ class RTMIDI_DLL_PUBLIC RtMidiError : public std::exception
|
|||||||
UNSPECIFIED, /*!< The default, unspecified error type. */
|
UNSPECIFIED, /*!< The default, unspecified error type. */
|
||||||
NO_DEVICES_FOUND, /*!< No devices found on system. */
|
NO_DEVICES_FOUND, /*!< No devices found on system. */
|
||||||
INVALID_DEVICE, /*!< An invalid device ID was specified. */
|
INVALID_DEVICE, /*!< An invalid device ID was specified. */
|
||||||
MEMORY_ERROR, /*!< An error occured during memory allocation. */
|
MEMORY_ERROR, /*!< An error occurred during memory allocation. */
|
||||||
INVALID_PARAMETER, /*!< An invalid parameter was specified to a function. */
|
INVALID_PARAMETER, /*!< An invalid parameter was specified to a function. */
|
||||||
INVALID_USE, /*!< The function was called incorrectly. */
|
INVALID_USE, /*!< The function was called incorrectly. */
|
||||||
DRIVER_ERROR, /*!< A system driver error occured. */
|
DRIVER_ERROR, /*!< A system driver error occurred. */
|
||||||
SYSTEM_ERROR, /*!< A system error occured. */
|
SYSTEM_ERROR, /*!< A system error occurred. */
|
||||||
THREAD_ERROR /*!< A thread error occured. */
|
THREAD_ERROR /*!< A thread error occurred. */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! The constructor.
|
//! The constructor.
|
||||||
@@ -132,6 +150,8 @@ class MidiApi;
|
|||||||
class RTMIDI_DLL_PUBLIC RtMidi
|
class RTMIDI_DLL_PUBLIC RtMidi
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
RtMidi(RtMidi&& other) noexcept;
|
||||||
//! MIDI API specifier arguments.
|
//! MIDI API specifier arguments.
|
||||||
enum Api {
|
enum Api {
|
||||||
UNSPECIFIED, /*!< Search for a working compiled API. */
|
UNSPECIFIED, /*!< Search for a working compiled API. */
|
||||||
@@ -140,6 +160,9 @@ class RTMIDI_DLL_PUBLIC RtMidi
|
|||||||
UNIX_JACK, /*!< The JACK Low-Latency MIDI Server API. */
|
UNIX_JACK, /*!< The JACK Low-Latency MIDI Server API. */
|
||||||
WINDOWS_MM, /*!< The Microsoft Multimedia MIDI API. */
|
WINDOWS_MM, /*!< The Microsoft Multimedia MIDI API. */
|
||||||
RTMIDI_DUMMY, /*!< A compilable but non-functional API. */
|
RTMIDI_DUMMY, /*!< A compilable but non-functional API. */
|
||||||
|
WEB_MIDI_API, /*!< W3C Web MIDI API. */
|
||||||
|
WINDOWS_UWP, /*!< The Microsoft Universal Windows Platform MIDI API. */
|
||||||
|
ANDROID_AMIDI, /*!< Native Android MIDI API. */
|
||||||
NUM_APIS /*!< Number of values in this enum. */
|
NUM_APIS /*!< Number of values in this enum. */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -202,9 +225,9 @@ class RTMIDI_DLL_PUBLIC RtMidi
|
|||||||
*/
|
*/
|
||||||
virtual bool isPortOpen( void ) const = 0;
|
virtual bool isPortOpen( void ) const = 0;
|
||||||
|
|
||||||
//! Set an error callback function to be invoked when an error has occured.
|
//! Set an error callback function to be invoked when an error has occurred.
|
||||||
/*!
|
/*!
|
||||||
The callback function will be called whenever an error has occured. It is best
|
The callback function will be called whenever an error has occurred. It is best
|
||||||
to set the error callback function before opening a port.
|
to set the error callback function before opening a port.
|
||||||
*/
|
*/
|
||||||
virtual void setErrorCallback( RtMidiErrorCallback errorCallback = NULL, void *userData = 0 ) = 0;
|
virtual void setErrorCallback( RtMidiErrorCallback errorCallback = NULL, void *userData = 0 ) = 0;
|
||||||
@@ -213,6 +236,10 @@ class RTMIDI_DLL_PUBLIC RtMidi
|
|||||||
RtMidi();
|
RtMidi();
|
||||||
virtual ~RtMidi();
|
virtual ~RtMidi();
|
||||||
MidiApi *rtapi_;
|
MidiApi *rtapi_;
|
||||||
|
|
||||||
|
/* Make the class non-copyable */
|
||||||
|
RtMidi(RtMidi& other) = delete;
|
||||||
|
RtMidi& operator=(RtMidi& other) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
@@ -248,7 +275,6 @@ class RTMIDI_DLL_PUBLIC RtMidi
|
|||||||
class RTMIDI_DLL_PUBLIC RtMidiIn : public RtMidi
|
class RTMIDI_DLL_PUBLIC RtMidiIn : public RtMidi
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! User callback function type definition.
|
//! User callback function type definition.
|
||||||
typedef void (*RtMidiCallback)( double timeStamp, std::vector<unsigned char> *message, void *userData );
|
typedef void (*RtMidiCallback)( double timeStamp, std::vector<unsigned char> *message, void *userData );
|
||||||
|
|
||||||
@@ -274,6 +300,8 @@ class RTMIDI_DLL_PUBLIC RtMidiIn : public RtMidi
|
|||||||
const std::string& clientName = "RtMidi Input Client",
|
const std::string& clientName = "RtMidi Input Client",
|
||||||
unsigned int queueSizeLimit = 100 );
|
unsigned int queueSizeLimit = 100 );
|
||||||
|
|
||||||
|
RtMidiIn(RtMidiIn&& other) noexcept : RtMidi(std::move(other)) { }
|
||||||
|
|
||||||
//! If a MIDI connection is still open, it will be closed by the destructor.
|
//! If a MIDI connection is still open, it will be closed by the destructor.
|
||||||
~RtMidiIn ( void ) throw();
|
~RtMidiIn ( void ) throw();
|
||||||
|
|
||||||
@@ -364,13 +392,26 @@ class RTMIDI_DLL_PUBLIC RtMidiIn : public RtMidi
|
|||||||
*/
|
*/
|
||||||
double getMessage( std::vector<unsigned char> *message );
|
double getMessage( std::vector<unsigned char> *message );
|
||||||
|
|
||||||
//! Set an error callback function to be invoked when an error has occured.
|
//! Set an error callback function to be invoked when an error has occurred.
|
||||||
/*!
|
/*!
|
||||||
The callback function will be called whenever an error has occured. It is best
|
The callback function will be called whenever an error has occurred. It is best
|
||||||
to set the error callback function before opening a port.
|
to set the error callback function before opening a port.
|
||||||
*/
|
*/
|
||||||
virtual void setErrorCallback( RtMidiErrorCallback errorCallback = NULL, void *userData = 0 );
|
virtual void setErrorCallback( RtMidiErrorCallback errorCallback = NULL, void *userData = 0 );
|
||||||
|
|
||||||
|
//! Set maximum expected incoming message size.
|
||||||
|
/*!
|
||||||
|
For APIs that require manual buffer management, it can be useful to set the buffer
|
||||||
|
size and buffer count when expecting to receive large SysEx messages. Note that
|
||||||
|
currently this function has no effect when called after openPort(). The default
|
||||||
|
buffer size is 1024 with a count of 4 buffers, which should be sufficient for most
|
||||||
|
cases; as mentioned, this does not affect all API backends, since most either support
|
||||||
|
dynamically scalable buffers or take care of buffer handling themselves. It is
|
||||||
|
principally intended for users of the Windows MM backend who must support receiving
|
||||||
|
especially large messages.
|
||||||
|
*/
|
||||||
|
virtual void setBufferSize( unsigned int size, unsigned int count );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void openMidiApi( RtMidi::Api api, const std::string &clientName, unsigned int queueSizeLimit );
|
void openMidiApi( RtMidi::Api api, const std::string &clientName, unsigned int queueSizeLimit );
|
||||||
};
|
};
|
||||||
@@ -403,6 +444,8 @@ class RTMIDI_DLL_PUBLIC RtMidiOut : public RtMidi
|
|||||||
RtMidiOut( RtMidi::Api api=UNSPECIFIED,
|
RtMidiOut( RtMidi::Api api=UNSPECIFIED,
|
||||||
const std::string& clientName = "RtMidi Output Client" );
|
const std::string& clientName = "RtMidi Output Client" );
|
||||||
|
|
||||||
|
RtMidiOut(RtMidiOut&& other) noexcept : RtMidi(std::move(other)) { }
|
||||||
|
|
||||||
//! The destructor closes any open MIDI connections.
|
//! The destructor closes any open MIDI connections.
|
||||||
~RtMidiOut( void ) throw();
|
~RtMidiOut( void ) throw();
|
||||||
|
|
||||||
@@ -467,9 +510,9 @@ class RTMIDI_DLL_PUBLIC RtMidiOut : public RtMidi
|
|||||||
*/
|
*/
|
||||||
void sendMessage( const unsigned char *message, size_t size );
|
void sendMessage( const unsigned char *message, size_t size );
|
||||||
|
|
||||||
//! Set an error callback function to be invoked when an error has occured.
|
//! Set an error callback function to be invoked when an error has occurred.
|
||||||
/*!
|
/*!
|
||||||
The callback function will be called whenever an error has occured. It is best
|
The callback function will be called whenever an error has occurred. It is best
|
||||||
to set the error callback function before opening a port.
|
to set the error callback function before opening a port.
|
||||||
*/
|
*/
|
||||||
virtual void setErrorCallback( RtMidiErrorCallback errorCallback = NULL, void *userData = 0 );
|
virtual void setErrorCallback( RtMidiErrorCallback errorCallback = NULL, void *userData = 0 );
|
||||||
@@ -523,6 +566,7 @@ protected:
|
|||||||
RtMidiErrorCallback errorCallback_;
|
RtMidiErrorCallback errorCallback_;
|
||||||
bool firstErrorOccurred_;
|
bool firstErrorOccurred_;
|
||||||
void *errorCallbackUserData_;
|
void *errorCallbackUserData_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RTMIDI_DLL_PUBLIC MidiInApi : public MidiApi
|
class RTMIDI_DLL_PUBLIC MidiInApi : public MidiApi
|
||||||
@@ -534,7 +578,8 @@ class RTMIDI_DLL_PUBLIC MidiInApi : public MidiApi
|
|||||||
void setCallback( RtMidiIn::RtMidiCallback callback, void *userData );
|
void setCallback( RtMidiIn::RtMidiCallback callback, void *userData );
|
||||||
void cancelCallback( void );
|
void cancelCallback( void );
|
||||||
virtual void ignoreTypes( bool midiSysex, bool midiTime, bool midiSense );
|
virtual void ignoreTypes( bool midiSysex, bool midiTime, bool midiSense );
|
||||||
double getMessage( std::vector<unsigned char> *message );
|
virtual double getMessage( std::vector<unsigned char> *message );
|
||||||
|
virtual void setBufferSize( unsigned int size, unsigned int count );
|
||||||
|
|
||||||
// A MIDI structure used internally by the class to store incoming
|
// A MIDI structure used internally by the class to store incoming
|
||||||
// messages. Each message represents one and only one MIDI message.
|
// messages. Each message represents one and only one MIDI message.
|
||||||
@@ -576,11 +621,13 @@ class RTMIDI_DLL_PUBLIC MidiInApi : public MidiApi
|
|||||||
RtMidiIn::RtMidiCallback userCallback;
|
RtMidiIn::RtMidiCallback userCallback;
|
||||||
void *userData;
|
void *userData;
|
||||||
bool continueSysex;
|
bool continueSysex;
|
||||||
|
unsigned int bufferSize;
|
||||||
|
unsigned int bufferCount;
|
||||||
|
|
||||||
// Default constructor.
|
// Default constructor.
|
||||||
RtMidiInData()
|
RtMidiInData()
|
||||||
: ignoreFlags(7), doInput(false), firstMessage(true), apiData(0), usingCallback(false),
|
: ignoreFlags(7), doInput(false), firstMessage(true), apiData(0), usingCallback(false),
|
||||||
userCallback(0), userData(0), continueSysex(false) {}
|
userCallback(0), userData(0), continueSysex(false), bufferSize(1024), bufferCount(4) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -614,6 +661,7 @@ inline std::string RtMidiIn :: getPortName( unsigned int portNumber ) { return r
|
|||||||
inline void RtMidiIn :: ignoreTypes( bool midiSysex, bool midiTime, bool midiSense ) { static_cast<MidiInApi *>(rtapi_)->ignoreTypes( midiSysex, midiTime, midiSense ); }
|
inline void RtMidiIn :: ignoreTypes( bool midiSysex, bool midiTime, bool midiSense ) { static_cast<MidiInApi *>(rtapi_)->ignoreTypes( midiSysex, midiTime, midiSense ); }
|
||||||
inline double RtMidiIn :: getMessage( std::vector<unsigned char> *message ) { return static_cast<MidiInApi *>(rtapi_)->getMessage( message ); }
|
inline double RtMidiIn :: getMessage( std::vector<unsigned char> *message ) { return static_cast<MidiInApi *>(rtapi_)->getMessage( message ); }
|
||||||
inline void RtMidiIn :: setErrorCallback( RtMidiErrorCallback errorCallback, void *userData ) { rtapi_->setErrorCallback(errorCallback, userData); }
|
inline void RtMidiIn :: setErrorCallback( RtMidiErrorCallback errorCallback, void *userData ) { rtapi_->setErrorCallback(errorCallback, userData); }
|
||||||
|
inline void RtMidiIn :: setBufferSize( unsigned int size, unsigned int count ) { static_cast<MidiInApi *>(rtapi_)->setBufferSize(size, count); }
|
||||||
|
|
||||||
inline RtMidi::Api RtMidiOut :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }
|
inline RtMidi::Api RtMidiOut :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }
|
||||||
inline void RtMidiOut :: openPort( unsigned int portNumber, const std::string &portName ) { rtapi_->openPort( portNumber, portName ); }
|
inline void RtMidiOut :: openPort( unsigned int portNumber, const std::string &portName ) { rtapi_->openPort( portNumber, portName ); }
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace stk {
|
|||||||
that takes an StkFrames object for multi-channel and/or
|
that takes an StkFrames object for multi-channel and/or
|
||||||
multi-frame data.
|
multi-frame data.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
@@ -33,14 +33,14 @@ class RtWvIn : public WvIn
|
|||||||
public:
|
public:
|
||||||
//! Default constructor.
|
//! Default constructor.
|
||||||
/*!
|
/*!
|
||||||
The default \e device argument value (zero) will select the
|
The default \e deviceIndex argument value (zero) will select the
|
||||||
default input device on your system. The first device enumerated
|
default input device on your system. The first device enumerated
|
||||||
by the underlying audio API is specified with a value of one. The
|
by the underlying audio API is specified with a value of one. The
|
||||||
default buffer size of RT_BUFFER_SIZE is defined in Stk.h. An
|
default buffer size of RT_BUFFER_SIZE is defined in Stk.h. An
|
||||||
StkError will be thrown if an error occurs duing instantiation.
|
StkError will be thrown if an error occurs duing instantiation.
|
||||||
*/
|
*/
|
||||||
RtWvIn( unsigned int nChannels = 1, StkFloat sampleRate = Stk::sampleRate(),
|
RtWvIn( unsigned int nChannels = 1, StkFloat sampleRate = Stk::sampleRate(),
|
||||||
int device = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 20 );
|
int deviceIndex = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 20 );
|
||||||
|
|
||||||
//! Class destructor.
|
//! Class destructor.
|
||||||
~RtWvIn();
|
~RtWvIn();
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace stk {
|
|||||||
that takes a reference to an StkFrames object for multi-channel
|
that takes a reference to an StkFrames object for multi-channel
|
||||||
and/or multi-frame data.
|
and/or multi-frame data.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
@@ -33,14 +33,14 @@ class RtWvOut : public WvOut
|
|||||||
|
|
||||||
//! Default constructor.
|
//! Default constructor.
|
||||||
/*!
|
/*!
|
||||||
The default \e device argument value (zero) will select the
|
The default \e deviceIndex argument value (zero) will select the
|
||||||
default output device on your system. The first device enumerated
|
default output device on your system. The first device enumerated
|
||||||
by the underlying audio API is specified with a value of one. The
|
by the underlying audio API is specified with a value of one. The
|
||||||
default buffer size of RT_BUFFER_SIZE is defined in Stk.h. An
|
default buffer size of RT_BUFFER_SIZE is defined in Stk.h. An
|
||||||
StkError will be thrown if an error occurs duing instantiation.
|
StkError will be thrown if an error occurs duing instantiation.
|
||||||
*/
|
*/
|
||||||
RtWvOut( unsigned int nChannels = 1, StkFloat sampleRate = Stk::sampleRate(),
|
RtWvOut( unsigned int nChannels = 1, StkFloat sampleRate = Stk::sampleRate(),
|
||||||
int device = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 20 );
|
int deviceIndex = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 20 );
|
||||||
|
|
||||||
//! Class destructor.
|
//! Class destructor.
|
||||||
~RtWvOut();
|
~RtWvOut();
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
where <name> is the string used in the SKINI stream.
|
where <name> is the string used in the SKINI stream.
|
||||||
|
|
||||||
by Perry R. Cook, 1995--2019.
|
by Perry R. Cook, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace stk {
|
|||||||
This instrument provides an ADSR envelope, a one-pole filter, and
|
This instrument provides an ADSR envelope, a one-pole filter, and
|
||||||
structures for an arbitrary number of attack and looped files.
|
structures for an arbitrary number of attack and looped files.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace stk {
|
|||||||
- Vibrato Gain = 1
|
- Vibrato Gain = 1
|
||||||
- Breath Pressure = 128
|
- Breath Pressure = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace stk {
|
|||||||
- Water Drops = 21
|
- Water Drops = 21
|
||||||
- Tuned Bamboo Chimes = 22
|
- Tuned Bamboo Chimes = 22
|
||||||
|
|
||||||
by Perry R. Cook with updates by Gary Scavone, 1995--2019.
|
by Perry R. Cook with updates by Gary Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace stk {
|
|||||||
- Envelope Rate = 11
|
- Envelope Rate = 11
|
||||||
- Gain = 128
|
- Gain = 128
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace stk {
|
|||||||
|
|
||||||
The "table" length, set in SineWave.h, is 2048 samples by default.
|
The "table" length, set in SineWave.h, is 2048 samples by default.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace stk {
|
|||||||
Within STK, it is used as an excitation source for other
|
Within STK, it is used as an excitation source for other
|
||||||
instruments.
|
instruments.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,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--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace stk {
|
|||||||
|
|
||||||
\sa \ref skini
|
\sa \ref skini
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace stk {
|
|||||||
number of static functions for use with external socket
|
number of static functions for use with external socket
|
||||||
descriptors.
|
descriptors.
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
by Perry R. Cook and Gary P. Scavone, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace stk {
|
|||||||
This class implements a spherical ball with
|
This class implements a spherical ball with
|
||||||
radius, mass, position, and velocity parameters.
|
radius, mass, position, and velocity parameters.
|
||||||
|
|
||||||
by Perry R. Cook, 1995--2019.
|
by Perry R. Cook, 1995--2023.
|
||||||
*/
|
*/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace stk {
|
|||||||
- String Sustain = 11
|
- String Sustain = 11
|
||||||
- String Stretch = 1
|
- String Stretch = 1
|
||||||
|
|
||||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
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