├── .gitignore ├── .gitmodules ├── README.md ├── stk_wrapper.cpp ├── stk_wrapper.h └── stk_wrapper.mm /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_STORE -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "stk"] 2 | path = stk 3 | url = https://github.com/thestk/stk 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | stk_wrapper 2 | ========== 3 | 4 | JUCE module wrapper for the STK library. 5 | 6 | This wrapper simply wraps the whole STK library into a JUCE module, as a Git submodule. 7 | 8 | Use it to quickly add effects and generators to a JUCE based audio project. 9 | 10 | ### Installation 11 | 12 | ```git clone https://github.com/adamski/stk_wrapper.git``` 13 | 14 | ```cd stk_wrapper``` 15 | 16 | ```git submodule init``` 17 | 18 | ```git submodule update``` 19 | 20 | Then add the module folder to your JUCE project in Projucer. 21 | 22 | -------------------------------------------------------------------------------- /stk_wrapper.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | The Synthesis ToolKit in C++ (STK) is a set of open source audio 5 | signal processing and algorithmic synthesis classes written in the 6 | C++ programming language. STK was designed to facilitate rapid 7 | development of music synthesis and audio processing software, with 8 | an emphasis on cross-platform functionality, realtime control, 9 | ease of use, and educational example code. STK currently runs 10 | with realtime support (audio and MIDI) on Linux, Macintosh OS X, 11 | and Windows computer platforms. Generic, non-realtime support has 12 | been tested under NeXTStep, Sun, and other platforms and should 13 | work with any standard C++ compiler. 14 | 15 | STK WWW site: http://ccrma.stanford.edu/software/stk/src/ 16 | 17 | The Synthesis ToolKit in C++ (STK) 18 | Copyright (c) 1995-2011 Perry R. Cook and Gary P. Scavone 19 | 20 | Permission is hereby granted, free of charge, to any person 21 | obtaining a copy of this software and associated documentation files 22 | (the "Software"), to deal in the Software without restriction, 23 | including without limitation the rights to use, copy, modify, merge, 24 | publish, distribute, sublicense, and/or sell copies of the Software, 25 | and to permit persons to whom the Software is furnished to do so, 26 | subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be 29 | included in all copies or substantial portions of the Software. 30 | 31 | Any person wishing to distribute modifications to the Software is 32 | asked to send the modifications to the original developer so that 33 | they can be incorporated into the canonical version. This is, 34 | however, not a binding provision of this license. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 38 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 39 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 40 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 41 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 42 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 43 | 44 | ============================================================================== 45 | */ 46 | 47 | #ifdef __STK_STKHEADER__ 48 | /* When you add this cpp file to your project, you mustn't include it in a file where you've 49 | already included any other headers - just put it inside a file on its own, possibly with your config 50 | flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix 51 | header files that the compiler may be using. 52 | */ 53 | #error "Incorrect use of JUCE cpp file" 54 | #endif 55 | 56 | #include "stk_wrapper.h" 57 | 58 | // stops a warning with clang 59 | #ifdef __clang__ 60 | #pragma clang diagnostic ignored "-Wtautological-compare" 61 | #endif 62 | 63 | #if JUCE_MSVC 64 | #pragma warning (push) 65 | #pragma warning (disable: 4127 4702 4244 4305 4100 4996 4309) 66 | #endif 67 | 68 | #include "stk/src/ADSR.cpp" 69 | #include "stk/src/Asymp.cpp" 70 | #include "stk/src/BandedWG.cpp" 71 | #include "stk/src/BeeThree.cpp" 72 | #include "stk/src/BiQuad.cpp" 73 | #include "stk/src/Blit.cpp" 74 | #include "stk/src/BlitSaw.cpp" 75 | #include "stk/src/BlitSquare.cpp" 76 | #include "stk/src/BlowBotl.cpp" 77 | #include "stk/src/BlowHole.cpp" 78 | #include "stk/src/Bowed.cpp" 79 | #include "stk/src/Brass.cpp" 80 | #include "stk/src/Chorus.cpp" 81 | #include "stk/src/Clarinet.cpp" 82 | #include "stk/src/Delay.cpp" 83 | #include "stk/src/DelayA.cpp" 84 | #include "stk/src/DelayL.cpp" 85 | #include "stk/src/Drummer.cpp" 86 | #include "stk/src/Echo.cpp" 87 | #include "stk/src/Envelope.cpp" 88 | #include "stk/src/FileLoop.cpp" 89 | #include "stk/src/FileRead.cpp" 90 | #include "stk/src/FileWrite.cpp" 91 | #include "stk/src/FileWvIn.cpp" 92 | #include "stk/src/FileWvOut.cpp" 93 | #include "stk/src/Fir.cpp" 94 | #include "stk/src/Flute.cpp" 95 | #include "stk/src/FM.cpp" 96 | #include "stk/src/FMVoices.cpp" 97 | #include "stk/src/FormSwep.cpp" 98 | #include "stk/src/Granulate.cpp" 99 | #include "stk/src/HevyMetl.cpp" 100 | #include "stk/src/Iir.cpp" 101 | #include "stk/src/JCRev.cpp" 102 | #include "stk/src/LentPitShift.cpp" 103 | #include "stk/src/Mandolin.cpp" 104 | #include "stk/src/Mesh2D.cpp" 105 | #include "stk/src/MidiFileIn.cpp" 106 | #include "stk/src/Modal.cpp" 107 | #include "stk/src/ModalBar.cpp" 108 | #include "stk/src/Modulate.cpp" 109 | #include "stk/src/Moog.cpp" 110 | #include "stk/src/Noise.cpp" 111 | #include "stk/src/NRev.cpp" 112 | #include "stk/src/OnePole.cpp" 113 | #include "stk/src/OneZero.cpp" 114 | #include "stk/src/PercFlut.cpp" 115 | #include "stk/src/Phonemes.cpp" 116 | #include "stk/src/PitShift.cpp" 117 | #include "stk/src/Plucked.cpp" 118 | #include "stk/src/PoleZero.cpp" 119 | #include "stk/src/PRCRev.cpp" 120 | #include "stk/src/Resonate.cpp" 121 | #include "stk/src/Rhodey.cpp" 122 | #include "stk/src/Sampler.cpp" 123 | #include "stk/src/Saxofony.cpp" 124 | #include "stk/src/Shakers.cpp" 125 | #include "stk/src/Simple.cpp" 126 | #include "stk/src/SineWave.cpp" 127 | #include "stk/src/SingWave.cpp" 128 | #include "stk/src/Sitar.cpp" 129 | #include "stk/src/Skini.cpp" 130 | #include "stk/src/Sphere.cpp" 131 | #include "stk/src/StifKarp.cpp" 132 | #include "stk/src/Stk.cpp" 133 | #include "stk/src/TapDelay.cpp" 134 | #include "stk/src/TubeBell.cpp" 135 | #include "stk/src/Twang.cpp" 136 | #include "stk/src/TwoPole.cpp" 137 | #include "stk/src/TwoZero.cpp" 138 | #include "stk/src/Voicer.cpp" 139 | #include "stk/src/VoicForm.cpp" 140 | #include "stk/src/Whistle.cpp" 141 | #include "stk/src/Wurley.cpp" 142 | 143 | #if JUCE_MSVC 144 | #pragma warning (pop) 145 | #pragma warning (disable: 4127 4702 4244 4305 4100 4996 4309) 146 | #endif 147 | 148 | #ifdef __clang__ 149 | #pragma pop // -Wtautological-compare 150 | #endif 151 | -------------------------------------------------------------------------------- /stk_wrapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | The Synthesis ToolKit in C++ (STK) is a set of open source audio 5 | signal processing and algorithmic synthesis classes written in the 6 | C++ programming language. STK was designed to facilitate rapid 7 | development of music synthesis and audio processing software, with 8 | an emphasis on cross-platform functionality, realtime control, 9 | ease of use, and educational example code. STK currently runs 10 | with realtime support (audio and MIDI) on Linux, Macintosh OS X, 11 | and Windows computer platforms. Generic, non-realtime support has 12 | been tested under NeXTStep, Sun, and other platforms and should 13 | work with any standard C++ compiler. 14 | 15 | STK WWW site: http://ccrma.stanford.edu/software/stk/include/ 16 | 17 | The Synthesis ToolKit in C++ (STK) 18 | Copyright (c) 1995-2011 Perry R. Cook and Gary P. Scavone 19 | 20 | Permission is hereby granted, free of charge, to any person 21 | obtaining a copy of this software and associated documentation files 22 | (the "Software"), to deal in the Software without restriction, 23 | including without limitation the rights to use, copy, modify, merge, 24 | publish, distribute, sublicense, and/or sell copies of the Software, 25 | and to permit persons to whom the Software is furnished to do so, 26 | subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be 29 | included in all copies or substantial portions of the Software. 30 | 31 | Any person wishing to distribute modifications to the Software is 32 | asked to send the modifications to the original developer so that 33 | they can be incorporated into the canonical version. This is, 34 | however, not a binding provision of this license. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 38 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 39 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 40 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 41 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 42 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 43 | 44 | ============================================================================== 45 | */ 46 | 47 | /******************************************************************************* 48 | The block below describes the properties of this module, and is read by 49 | the Projucer to automatically generate project code that uses it. 50 | For details about the syntax and how to create or use a module, see the 51 | JUCE Module Format.txt file. 52 | 53 | 54 | BEGIN_JUCE_MODULE_DECLARATION 55 | 56 | ID: stk_wrapper 57 | vendor: adamski 58 | version: 1.1.0 59 | name: STK Wrapper 60 | description: JUCE wrapper for the STK library 61 | website: https://ccrma.stanford.edu/software/stk/ 62 | license: GPL/Commercial 63 | 64 | dependencies: juce_core 65 | searchpaths: stk/include 66 | 67 | END_JUCE_MODULE_DECLARATION 68 | 69 | *******************************************************************************/ 70 | 71 | #ifndef __STK_STKHEADER__ 72 | #define __STK_STKHEADER__ 73 | 74 | #if JUCE_LITTLE_ENDIAN && ! defined (__LITTLE_ENDIAN__) 75 | #define __LITTLE_ENDIAN__ 76 | #endif 77 | 78 | #if JUCE_MAC 79 | #define __MACOSX_CORE__ 80 | #endif 81 | 82 | #if JUCE_MSVC 83 | #pragma warning (push) 84 | #pragma warning (disable: 4127 4702 4244 4305 4100 4996 4309) 85 | #endif 86 | 87 | //============================================================================= 88 | #include "stk/include/ADSR.h" 89 | #include "stk/include/Asymp.h" 90 | #include "stk/include/BandedWG.h" 91 | #include "stk/include/BeeThree.h" 92 | #include "stk/include/BiQuad.h" 93 | #include "stk/include/Blit.h" 94 | #include "stk/include/BlitSaw.h" 95 | #include "stk/include/BlitSquare.h" 96 | #include "stk/include/BlowBotl.h" 97 | #include "stk/include/BlowHole.h" 98 | #include "stk/include/Bowed.h" 99 | #include "stk/include/BowTable.h" 100 | #include "stk/include/Brass.h" 101 | #include "stk/include/Chorus.h" 102 | #include "stk/include/Clarinet.h" 103 | #include "stk/include/Cubic.h" 104 | #include "stk/include/Delay.h" 105 | #include "stk/include/DelayA.h" 106 | #include "stk/include/DelayL.h" 107 | #include "stk/include/Drummer.h" 108 | #include "stk/include/Echo.h" 109 | #include "stk/include/Effect.h" 110 | #include "stk/include/Envelope.h" 111 | #include "stk/include/FileLoop.h" 112 | #include "stk/include/FileRead.h" 113 | #include "stk/include/FileWrite.h" 114 | #include "stk/include/FileWvIn.h" 115 | #include "stk/include/FileWvOut.h" 116 | #include "stk/include/Filter.h" 117 | #include "stk/include/Fir.h" 118 | #include "stk/include/Flute.h" 119 | #include "stk/include/FM.h" 120 | #include "stk/include/FMVoices.h" 121 | #include "stk/include/FormSwep.h" 122 | #include "stk/include/Function.h" 123 | #include "stk/include/Generator.h" 124 | #include "stk/include/Granulate.h" 125 | #include "stk/include/HevyMetl.h" 126 | #include "stk/include/Iir.h" 127 | #include "stk/include/Instrmnt.h" 128 | #include "stk/include/JCRev.h" 129 | #include "stk/include/JetTable.h" 130 | #include "stk/include/LentPitShift.h" 131 | #include "stk/include/Mandolin.h" 132 | #include "stk/include/Mesh2D.h" 133 | #include "stk/include/MidiFileIn.h" 134 | #include "stk/include/Modal.h" 135 | #include "stk/include/ModalBar.h" 136 | #include "stk/include/Modulate.h" 137 | #include "stk/include/Moog.h" 138 | #include "stk/include/Noise.h" 139 | #include "stk/include/NRev.h" 140 | #include "stk/include/OnePole.h" 141 | #include "stk/include/OneZero.h" 142 | #include "stk/include/PercFlut.h" 143 | #include "stk/include/Phonemes.h" 144 | #include "stk/include/PitShift.h" 145 | #include "stk/include/Plucked.h" 146 | #include "stk/include/PoleZero.h" 147 | #include "stk/include/PRCRev.h" 148 | #include "stk/include/ReedTable.h" 149 | #include "stk/include/Resonate.h" 150 | #include "stk/include/Rhodey.h" 151 | #include "stk/include/Sampler.h" 152 | #include "stk/include/Saxofony.h" 153 | #include "stk/include/Shakers.h" 154 | #include "stk/include/Simple.h" 155 | #include "stk/include/SineWave.h" 156 | #include "stk/include/SingWave.h" 157 | #include "stk/include/Sitar.h" 158 | #include "stk/include/Skini.h" 159 | #include "stk/include/Sphere.h" 160 | #include "stk/include/StifKarp.h" 161 | #include "stk/include/Stk.h" 162 | #include "stk/include/TapDelay.h" 163 | #include "stk/include/TubeBell.h" 164 | #include "stk/include/Twang.h" 165 | #include "stk/include/TwoPole.h" 166 | #include "stk/include/TwoZero.h" 167 | #include "stk/include/Vector3D.h" 168 | #include "stk/include/Voicer.h" 169 | #include "stk/include/VoicForm.h" 170 | #include "stk/include/Whistle.h" 171 | #include "stk/include/Wurley.h" 172 | #include "stk/include/WvIn.h" 173 | #include "stk/include/WvOut.h" 174 | 175 | #if JUCE_MSVC 176 | #pragma warning (pop) 177 | #endif 178 | 179 | #endif // __STK_STKHEADER__ 180 | -------------------------------------------------------------------------------- /stk_wrapper.mm: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | The Synthesis ToolKit in C++ (STK) is a set of open source audio 5 | signal processing and algorithmic synthesis classes written in the 6 | C++ programming language. STK was designed to facilitate rapid 7 | development of music synthesis and audio processing software, with 8 | an emphasis on cross-platform functionality, realtime control, 9 | ease of use, and educational example code. STK currently runs 10 | with realtime support (audio and MIDI) on Linux, Macintosh OS X, 11 | and Windows computer platforms. Generic, non-realtime support has 12 | been tested under NeXTStep, Sun, and other platforms and should 13 | work with any standard C++ compiler. 14 | 15 | STK WWW site: http://ccrma.stanford.edu/software/stk/ 16 | 17 | The Synthesis ToolKit in C++ (STK) 18 | Copyright (c) 1995-2011 Perry R. Cook and Gary P. Scavone 19 | 20 | Permission is hereby granted, free of charge, to any person 21 | obtaining a copy of this software and associated documentation files 22 | (the "Software"), to deal in the Software without restriction, 23 | including without limitation the rights to use, copy, modify, merge, 24 | publish, distribute, sublicense, and/or sell copies of the Software, 25 | and to permit persons to whom the Software is furnished to do so, 26 | subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be 29 | included in all copies or substantial portions of the Software. 30 | 31 | Any person wishing to distribute modifications to the Software is 32 | asked to send the modifications to the original developer so that 33 | they can be incorporated into the canonical version. This is, 34 | however, not a binding provision of this license. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 38 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 39 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 40 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 41 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 42 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 43 | 44 | ============================================================================== 45 | */ 46 | 47 | #include "stk_wrapper.cpp" 48 | --------------------------------------------------------------------------------