├── .gitignore ├── .gitmodules ├── .travis.yml ├── CMakeLists.txt ├── COPYING ├── LICENSE ├── README.md ├── docs └── index.html ├── help ├── sc.brownnoise~.maxhelp ├── sc.clipnoise~.maxhelp ├── sc.crackle~.maxhelp ├── sc.dust2~.maxhelp ├── sc.dust~.maxhelp ├── sc.gendy1~.maxhelp ├── sc.gendy2~.maxhelp ├── sc.gendy3~.maxhelp ├── sc.graynoise~.maxhelp ├── sc.lfclipnoise~.maxhelp ├── sc.lfnoise0~.maxhelp ├── sc.lfnoise1~.maxhelp ├── sc.lfnoise2~.maxhelp ├── sc.logistic~.maxhelp ├── sc.mantissamask~.maxhelp ├── sc.pinknoise~.maxhelp ├── sc.range~.maxhelp ├── sc.weaklynonlinear~.maxhelp └── sc.whitenoise~.maxhelp ├── package-info.json.in └── source ├── include └── scmax.h └── projects ├── sc.brownnoise_tilde ├── CMakeLists.txt └── sc.brownnoise_tilde.cpp ├── sc.clipnoise_tilde ├── CMakeLists.txt └── sc.clipnoise_tilde.cpp ├── sc.crackle_tilde ├── CMakeLists.txt └── sc.crackle_tilde.cpp ├── sc.dust2_tilde ├── CMakeLists.txt └── sc.dust2_tilde.cpp ├── sc.dust_tilde ├── CMakeLists.txt └── sc.dust_tilde.cpp ├── sc.gendy1_tilde ├── CMakeLists.txt └── sc.gendy1_tilde.cpp ├── sc.gendy2_tilde ├── CMakeLists.txt └── sc.gendy2_tilde.cpp ├── sc.gendy3_tilde ├── CMakeLists.txt └── sc.gendy3_tilde.cpp ├── sc.graynoise_tilde ├── CMakeLists.txt └── sc.graynoise_tilde.cpp ├── sc.lfclipnoise_tilde ├── CMakeLists.txt └── sc.lfclipnoise_tilde.cpp ├── sc.lfnoise0_tilde ├── CMakeLists.txt └── sc.lfnoise0_tilde.cpp ├── sc.lfnoise1_tilde ├── CMakeLists.txt └── sc.lfnoise1_tilde.cpp ├── sc.lfnoise2_tilde ├── CMakeLists.txt └── sc.lfnoise2_tilde.cpp ├── sc.logistic_tilde ├── CMakeLists.txt └── sc.logistic_tilde.cpp ├── sc.mantissamask_tilde └── sc.mantissamask_tilde.cpp ├── sc.pinknoise_tilde ├── CMakeLists.txt └── sc.pinknoise_tilde.cpp ├── sc.range_tilde ├── CMakeLists.txt └── sc.range_tilde.cpp ├── sc.weaklynonlinear_tilde └── sc.weaklynonlinear_tilde.cpp ├── sc.whitenoise_tilde ├── CMakeLists.txt └── sc.whitenoise_tilde.cpp ├── scmax-posttarget.cmake └── scmax-pretarget.cmake /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | 4 | build/ 5 | tmp/ 6 | externals/ 7 | package-info.json 8 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbl/sc-max/8aeaa05309d0aa59beb8b17f57d3e1c435978acc/.gitmodules -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: 2 | - objective-c 3 | - c++ 4 | 5 | compiler: 6 | - clang 7 | 8 | sudo: false 9 | os: osx 10 | osx_image: xcode7.3 11 | 12 | script: 13 | - mkdir build 14 | - cd build 15 | - cmake -G Xcode .. 16 | - cmake --build . --config Release 17 | - cd .. 18 | - PACKAGE_NAME=`echo $TRAVIS_REPO_SLUG | sed 's/.*\///g'` 19 | - PACKAGE_REV=`echo $TRAVIS_COMMIT | sed -e 's/^[[:alnum:]]\{6\}/&-/g' | sed 's/-.*//'` 20 | - mkdir $PACKAGE_NAME 21 | - if [ -e *.json ]; then cp *.json $PACKAGE_NAME; fi 22 | - if [ -e *.md ]; then cp *.json $PACKAGE_NAME; fi 23 | - if [ -e *.png ]; then cp *.json $PACKAGE_NAME; fi 24 | - if [ -d docs ]; then cp -r docs $PACKAGE_NAME; fi 25 | - if [ -d externals ]; then cp -r externals $PACKAGE_NAME; fi 26 | - if [ -d extras ]; then cp -r extras $PACKAGE_NAME; fi 27 | - if [ -d help ]; then cp -r help $PACKAGE_NAME; fi 28 | - if [ -d init ]; then cp -r init $PACKAGE_NAME; fi 29 | - if [ -d javascript ]; then cp -r javascript $PACKAGE_NAME; fi 30 | - if [ -d media ]; then cp -r media $PACKAGE_NAME; fi 31 | - if [ -d misc ]; then cp -r misc $PACKAGE_NAME; fi 32 | - if [ -d patchers ]; then cp -r help $PACKAGE_NAME; fi 33 | - mkdir dist 34 | - zip -r dist/$PACKAGE_NAME-$PACKAGE_REV.zip $PACKAGE_NAME 35 | 36 | #deploy: 37 | #provider: s3 38 | #access_key_id: AKIAIWE3SI2TMXC5AJBA 39 | #secret_access_key: 40 | #secure: HUKaAnjUJOF9N4TQhhXqDb7ZJQPD/VLFOzRtf7cmt8fhLCv7yE2tmIC8GcW+CJbMKIxszgcw19Wasl9vY6gUOCRd6f8jkqFYEZr9fyD+pJ2sUniZBjuJrR6iNmZy+pBmH/z6ho8H4U/VhDKNz2rAudzjEgUzmgqDfJBR3qz2x+7CG6C+V8r4Yj71HzfT6F/vD0vO8vR+D1/h+H3J66HTCJNNd9fpYrEfEOLGxN7+4P9tSUyXGWAzWrZuzobnH9grz9mZuH3NSYXje+q9uFlgHM45lYJzAu8SLoxEcwcJ1YJPOciZRLUM/NKrDQM7j/0zFuzLHZxn+ZJgVSYQPol+xQ9AP/q/RpWTCNNMt4y9UFLigTTav6kbM8vHex1T7lu9Lub5NKOJBbtrTrVKFgIJOc5dwP6ldMxVCjvrzvX0UxU7e0lIsBLEHaNN5tn9M4wO4HbjDBjlybuqeQgIY/jzpAFMzTweO75Fc4bZSjz1EPmjxc1SREpGzRJoKa4z5iSmnKNSDY3BUuyE6ZCKeYJ3WnyMs3r6+OMe/ukP1WKMcGrZIGWmsfhlGbLTo2aDUMqD9GJoRLAO8XSFFtBP1Z7LqwOLQJI1+Dg8GGrD/w07WdJuTHguF4LYhFupABgWCIjjeohv5I1cmEiJ7Tb//F++TrTe8Qt/mmzKMwGV4Zg3PNc= 41 | #bucket: cycling74-ci 42 | #skip_cleanup: true 43 | #local-dir: dist 44 | #upload-dir: max-devkit 45 | #acl: public_read 46 | #on: 47 | #repo: Cycling74/max-devkit 48 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(sc-max) 3 | 4 | # Fetch the correct verion of the max-api 5 | message(STATUS "Updating Git Submodules") 6 | execute_process( 7 | COMMAND git submodule update --init --recursive 8 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" 9 | ) 10 | 11 | # global PATHS, cmake -DSC_PATH=../.. -DMAX_API_PATH=../.. 12 | set(SC_PATH "" CACHE PATH "supercollider path") 13 | set(C74_MAX_API_DIR "" CACHE PATH "c74 max api path") 14 | 15 | # Misc setup and subroutines 16 | include(${C74_MAX_API_DIR}/script/max-package.cmake) 17 | 18 | 19 | # Generate a project for every folder in the "source/projects" folder 20 | SUBDIRLIST(PROJECT_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/source/projects) 21 | foreach (project_dir ${PROJECT_DIRS}) 22 | if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/source/projects/${project_dir}/CMakeLists.txt") 23 | message("Generating: ${project_dir}") 24 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/source/projects/${project_dir}) 25 | endif () 26 | endforeach () 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This program is free software; you can redistribute it and/or modify 2 | it under the terms of the GNU General Public License as published by 3 | the Free Software Foundation; either version 2 of the License, or 4 | (at your option) any later version. 5 | 6 | This program is distributed in the hope that it will be useful, 7 | but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | GNU General Public License for more details. 10 | 11 | You should have received a copy of the GNU General Public License 12 | along with this program; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sc-max 2 | [![Build Status](https://travis-ci.org/sbl/sc-max.svg?branch=master)](https://travis-ci.org/sbl/sc-max) 3 | 4 | Some supercollider ugens ported to max-msp (v>6.19 - 32 + 64 bit) the focus lies on the noisier ones. 5 | Ports by Stephen Lumenta. 6 | 7 | - gendys 8 | - dusts 9 | - noises 10 | - lfnoises 11 | 12 | All credits are due to the original authors (James McCartney et alt.). these 13 | are merely ports to max/msp and might be helpful. 14 | Helptext is taken directly from the original supercollider helpfiles. If you 15 | haven't done so, check out [supercollider](http://supercollider.github.io/) as 16 | well. It is a really nice language for sound. 17 | 18 | Use the issue tracker for bug reports or other issues. 19 | 20 | ## Installation: 21 | 22 | - latest version [mac](https://github.com/sbl/sc-max/releases/download/1.0.0/sc-max-1.0.0.zip) 23 | 24 | Drop the sc-max folder somewhere in your max-search-path for projects. 25 | 26 | ## Older versions: 27 | 28 | If you're looking for an older unmaintained (32 bit only) version: 29 | 30 | - [0.2.1 mac UB](http://github.com/downloads/sbl/sc-max/sc-max-0.2.1.zip) 31 | 32 | ## Compilation Prerequisites 33 | 34 | To build the externals in this package you will need some form of compiler support on your system. 35 | 36 | * On the Mac this means Xcode (you can get from the App Store for free). 37 | * On Windows this most likely means some version of Visual Studio (the free versions should work fine). 38 | 39 | You will also need to install [CMake](https://cmake.org/download/). 40 | 41 | ## Building 42 | 43 | 0. Get the code from Github, or download a zip and unpack it into a folder. 44 | 1. In the Terminal or Console app of your choice, change directories (cd) into the folder you created in step 0. 45 | 2. `mkdir build` to create a folder with your various build files 46 | 3. `cd build` to put yourself into that folder 47 | 4. Now you can generate the projects for your choosen build environment: 48 | 49 | ## MAX-API and SC_PATH 50 | 51 | When configuring there are two global paths that you should configure. When inside the `build` directory add them once you generate the project. 52 | 53 | `cmake -DSC_PATH=../.. -DC74_MAX_API_DIR=../..` 54 | 55 | ### Mac 56 | 57 | You can build on the command line using Makefiles, or you can generate an Xcode project and use the GUI to build. 58 | 59 | * Xcode: Run `cmake -G Xcode ..` and then run `cmake --build .` or open the Xcode project from this "build" folder and use the GUI. 60 | * Make: Run `cmake ..` and then run `cmake --build .` or `make`. Note that the Xcode project is preferrable because it is able substitute values for e.g. the Info.plist files in your builds. 61 | 62 | ### Windows 63 | 64 | The exact command line you use will depend on what version of Visual Studio you have installed. You can run `cmake --help` to get a list of the options available. Assuming some version of Visual Studio 2013, the commands to generate the projects will look like this: 65 | 66 | * 32 bit: `cmake -G "Visual Studio 12" ..` 67 | * 64 bit: `cmake -G "Visual Studio 12 Win64" -DWIN64:Bool=True ..` 68 | 69 | Having generated the projects, you can now build by opening the .sln file in the build folder with the Visual Studio app (just double-click the .sln file) or you can build on the command line like this: 70 | 71 | `cmake --build . --config Release` 72 | 73 | ## LICENSE 74 | 75 | All SuperCollider code and sc-max are licensed under the gpl 76 | http://www.gnu.org/licenses/gpl.html 77 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | sc-mac 6 | 7 | 8 |

sc-max

9 |

10 | some supercollider UGENs ported to max-msp 11 |

12 |

13 | go to github for downloads. 14 |

15 | 16 | -------------------------------------------------------------------------------- /help/sc.brownnoise~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 230.0, 188.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 230.0, 188.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "scope~", 24 | "numoutlets" : 0, 25 | "patching_rect" : [ 339.0, 218.0, 384.0, 270.0 ], 26 | "id" : "obj-1", 27 | "numinlets" : 2 28 | } 29 | 30 | } 31 | , { 32 | "box" : { 33 | "maxclass" : "newobj", 34 | "text" : "sc.brownnoise~", 35 | "numoutlets" : 1, 36 | "outlettype" : [ "signal" ], 37 | "patching_rect" : [ 249.0, 162.0, 90.0, 19.0 ], 38 | "id" : "obj-3", 39 | "fontname" : "Verdana", 40 | "fontsize" : 10.0, 41 | "numinlets" : 1 42 | } 43 | 44 | } 45 | , { 46 | "box" : { 47 | "maxclass" : "newobj", 48 | "text" : "*~ 0.2", 49 | "numoutlets" : 1, 50 | "outlettype" : [ "signal" ], 51 | "patching_rect" : [ 249.0, 249.0, 45.0, 19.0 ], 52 | "id" : "obj-2", 53 | "fontname" : "Verdana", 54 | "fontsize" : 10.0, 55 | "numinlets" : 2 56 | } 57 | 58 | } 59 | , { 60 | "box" : { 61 | "maxclass" : "comment", 62 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 63 | "linecount" : 3, 64 | "numoutlets" : 0, 65 | "patching_rect" : [ 5.0, 458.0, 279.0, 43.0 ], 66 | "id" : "obj-12", 67 | "fontname" : "Verdana", 68 | "fontsize" : 10.0, 69 | "numinlets" : 1 70 | } 71 | 72 | } 73 | , { 74 | "box" : { 75 | "maxclass" : "comment", 76 | "text" : "Brownian motion.\nGenerates noise whose spectrum falls off in power by 6 dB per octave.", 77 | "linecount" : 2, 78 | "numoutlets" : 0, 79 | "patching_rect" : [ 9.0, 42.0, 367.0, 31.0 ], 80 | "id" : "obj-9", 81 | "fontname" : "Verdana", 82 | "fontsize" : 10.0, 83 | "numinlets" : 1 84 | } 85 | 86 | } 87 | , { 88 | "box" : { 89 | "maxclass" : "comment", 90 | "text" : "sc.brownnoise~", 91 | "numoutlets" : 0, 92 | "patching_rect" : [ 9.0, 11.0, 132.0, 25.0 ], 93 | "id" : "obj-7", 94 | "fontname" : "Arial", 95 | "fontface" : 3, 96 | "fontsize" : 16.0, 97 | "numinlets" : 1 98 | } 99 | 100 | } 101 | , { 102 | "box" : { 103 | "maxclass" : "ezdac~", 104 | "numoutlets" : 0, 105 | "patching_rect" : [ 249.0, 320.0, 45.0, 45.0 ], 106 | "id" : "obj-4", 107 | "numinlets" : 2 108 | } 109 | 110 | } 111 | , { 112 | "box" : { 113 | "maxclass" : "panel", 114 | "numoutlets" : 0, 115 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 116 | "id" : "obj-10", 117 | "rounded" : 0, 118 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 119 | "numinlets" : 1 120 | } 121 | 122 | } 123 | ], 124 | "lines" : [ { 125 | "patchline" : { 126 | "source" : [ "obj-3", 0 ], 127 | "destination" : [ "obj-1", 0 ], 128 | "hidden" : 0, 129 | "midpoints" : [ ] 130 | } 131 | 132 | } 133 | , { 134 | "patchline" : { 135 | "source" : [ "obj-3", 0 ], 136 | "destination" : [ "obj-2", 0 ], 137 | "hidden" : 0, 138 | "midpoints" : [ ] 139 | } 140 | 141 | } 142 | , { 143 | "patchline" : { 144 | "source" : [ "obj-2", 0 ], 145 | "destination" : [ "obj-4", 0 ], 146 | "hidden" : 0, 147 | "midpoints" : [ ] 148 | } 149 | 150 | } 151 | , { 152 | "patchline" : { 153 | "source" : [ "obj-2", 0 ], 154 | "destination" : [ "obj-4", 1 ], 155 | "hidden" : 0, 156 | "midpoints" : [ ] 157 | } 158 | 159 | } 160 | ] 161 | } 162 | 163 | } 164 | -------------------------------------------------------------------------------- /help/sc.clipnoise~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 230.0, 188.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 230.0, 188.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "scope~", 24 | "numoutlets" : 0, 25 | "id" : "obj-1", 26 | "numinlets" : 2, 27 | "patching_rect" : [ 339.0, 218.0, 384.0, 270.0 ] 28 | } 29 | 30 | } 31 | , { 32 | "box" : { 33 | "maxclass" : "newobj", 34 | "text" : "sc.clipnoise~", 35 | "numoutlets" : 1, 36 | "id" : "obj-3", 37 | "fontname" : "Verdana", 38 | "outlettype" : [ "signal" ], 39 | "fontsize" : 10.0, 40 | "numinlets" : 1, 41 | "patching_rect" : [ 249.0, 162.0, 76.0, 19.0 ] 42 | } 43 | 44 | } 45 | , { 46 | "box" : { 47 | "maxclass" : "newobj", 48 | "text" : "*~ 0.2", 49 | "numoutlets" : 1, 50 | "id" : "obj-2", 51 | "fontname" : "Verdana", 52 | "outlettype" : [ "signal" ], 53 | "fontsize" : 10.0, 54 | "numinlets" : 2, 55 | "patching_rect" : [ 249.0, 249.0, 45.0, 19.0 ] 56 | } 57 | 58 | } 59 | , { 60 | "box" : { 61 | "maxclass" : "comment", 62 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 63 | "linecount" : 3, 64 | "numoutlets" : 0, 65 | "id" : "obj-12", 66 | "fontname" : "Verdana", 67 | "fontsize" : 10.0, 68 | "numinlets" : 1, 69 | "patching_rect" : [ 5.0, 458.0, 279.0, 43.0 ] 70 | } 71 | 72 | } 73 | , { 74 | "box" : { 75 | "maxclass" : "comment", 76 | "text" : "Generates noise whose values are either -1 or 1. ", 77 | "numoutlets" : 0, 78 | "id" : "obj-9", 79 | "fontname" : "Verdana", 80 | "fontsize" : 10.0, 81 | "numinlets" : 1, 82 | "patching_rect" : [ 9.0, 42.0, 260.0, 19.0 ] 83 | } 84 | 85 | } 86 | , { 87 | "box" : { 88 | "maxclass" : "comment", 89 | "text" : "sc.clipnoise~", 90 | "numoutlets" : 0, 91 | "id" : "obj-7", 92 | "fontname" : "Arial", 93 | "fontface" : 3, 94 | "fontsize" : 16.0, 95 | "numinlets" : 1, 96 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ] 97 | } 98 | 99 | } 100 | , { 101 | "box" : { 102 | "maxclass" : "ezdac~", 103 | "numoutlets" : 0, 104 | "id" : "obj-4", 105 | "numinlets" : 2, 106 | "patching_rect" : [ 249.0, 320.0, 45.0, 45.0 ] 107 | } 108 | 109 | } 110 | , { 111 | "box" : { 112 | "maxclass" : "panel", 113 | "numoutlets" : 0, 114 | "rounded" : 0, 115 | "id" : "obj-10", 116 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 117 | "numinlets" : 1, 118 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ] 119 | } 120 | 121 | } 122 | ], 123 | "lines" : [ { 124 | "patchline" : { 125 | "source" : [ "obj-3", 0 ], 126 | "destination" : [ "obj-1", 0 ], 127 | "hidden" : 0, 128 | "midpoints" : [ ] 129 | } 130 | 131 | } 132 | , { 133 | "patchline" : { 134 | "source" : [ "obj-3", 0 ], 135 | "destination" : [ "obj-2", 0 ], 136 | "hidden" : 0, 137 | "midpoints" : [ ] 138 | } 139 | 140 | } 141 | , { 142 | "patchline" : { 143 | "source" : [ "obj-2", 0 ], 144 | "destination" : [ "obj-4", 0 ], 145 | "hidden" : 0, 146 | "midpoints" : [ ] 147 | } 148 | 149 | } 150 | , { 151 | "patchline" : { 152 | "source" : [ "obj-2", 0 ], 153 | "destination" : [ "obj-4", 1 ], 154 | "hidden" : 0, 155 | "midpoints" : [ ] 156 | } 157 | 158 | } 159 | ] 160 | } 161 | 162 | } 163 | -------------------------------------------------------------------------------- /help/sc.crackle~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 230.0, 188.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 230.0, 188.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "flonum", 24 | "fontname" : "Verdana", 25 | "numinlets" : 1, 26 | "patching_rect" : [ 249.0, 119.0, 50.0, 19.0 ], 27 | "id" : "obj-11", 28 | "numoutlets" : 2, 29 | "fontsize" : 10.0, 30 | "outlettype" : [ "float", "bang" ] 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "comment", 37 | "text" : "arg - a parameter of the chaotic function with useful values from\njust below 1.0 to just above 2.0. Towards 2.0 the sound crackles.\nParam values below 0 and above 2 are automatically clipped.", 38 | "linecount" : 3, 39 | "fontname" : "Verdana", 40 | "numinlets" : 1, 41 | "patching_rect" : [ 348.0, 160.0, 342.0, 43.0 ], 42 | "id" : "obj-6", 43 | "numoutlets" : 0, 44 | "fontsize" : 10.0 45 | } 46 | 47 | } 48 | , { 49 | "box" : { 50 | "maxclass" : "scope~", 51 | "numinlets" : 2, 52 | "patching_rect" : [ 339.0, 218.0, 384.0, 270.0 ], 53 | "id" : "obj-1", 54 | "numoutlets" : 0 55 | } 56 | 57 | } 58 | , { 59 | "box" : { 60 | "maxclass" : "newobj", 61 | "text" : "sc.crackle~ 1.99", 62 | "fontname" : "Verdana", 63 | "numinlets" : 1, 64 | "patching_rect" : [ 249.0, 162.0, 94.0, 19.0 ], 65 | "id" : "obj-3", 66 | "numoutlets" : 1, 67 | "fontsize" : 10.0, 68 | "outlettype" : [ "signal" ] 69 | } 70 | 71 | } 72 | , { 73 | "box" : { 74 | "maxclass" : "newobj", 75 | "text" : "*~ 0.2", 76 | "fontname" : "Verdana", 77 | "numinlets" : 2, 78 | "patching_rect" : [ 249.0, 249.0, 45.0, 19.0 ], 79 | "id" : "obj-2", 80 | "numoutlets" : 1, 81 | "fontsize" : 10.0, 82 | "outlettype" : [ "signal" ] 83 | } 84 | 85 | } 86 | , { 87 | "box" : { 88 | "maxclass" : "comment", 89 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 90 | "linecount" : 3, 91 | "fontname" : "Verdana", 92 | "numinlets" : 1, 93 | "patching_rect" : [ 5.0, 481.0, 279.0, 43.0 ], 94 | "id" : "obj-12", 95 | "numoutlets" : 0, 96 | "fontsize" : 10.0 97 | } 98 | 99 | } 100 | , { 101 | "box" : { 102 | "maxclass" : "comment", 103 | "text" : "A noise generator based on a chaotic function.\n", 104 | "fontname" : "Verdana", 105 | "numinlets" : 1, 106 | "patching_rect" : [ 10.0, 45.0, 244.0, 19.0 ], 107 | "id" : "obj-9", 108 | "numoutlets" : 0, 109 | "fontsize" : 10.0 110 | } 111 | 112 | } 113 | , { 114 | "box" : { 115 | "maxclass" : "comment", 116 | "text" : "sc.crackle~", 117 | "fontname" : "Arial", 118 | "numinlets" : 1, 119 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ], 120 | "id" : "obj-7", 121 | "numoutlets" : 0, 122 | "fontface" : 3, 123 | "fontsize" : 16.0 124 | } 125 | 126 | } 127 | , { 128 | "box" : { 129 | "maxclass" : "ezdac~", 130 | "numinlets" : 2, 131 | "patching_rect" : [ 249.0, 320.0, 45.0, 45.0 ], 132 | "id" : "obj-4", 133 | "numoutlets" : 0 134 | } 135 | 136 | } 137 | , { 138 | "box" : { 139 | "maxclass" : "panel", 140 | "numinlets" : 1, 141 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 142 | "id" : "obj-10", 143 | "numoutlets" : 0, 144 | "rounded" : 0, 145 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ] 146 | } 147 | 148 | } 149 | ], 150 | "lines" : [ { 151 | "patchline" : { 152 | "source" : [ "obj-11", 0 ], 153 | "destination" : [ "obj-3", 0 ], 154 | "hidden" : 0, 155 | "midpoints" : [ ] 156 | } 157 | 158 | } 159 | , { 160 | "patchline" : { 161 | "source" : [ "obj-2", 0 ], 162 | "destination" : [ "obj-4", 0 ], 163 | "hidden" : 0, 164 | "midpoints" : [ ] 165 | } 166 | 167 | } 168 | , { 169 | "patchline" : { 170 | "source" : [ "obj-2", 0 ], 171 | "destination" : [ "obj-4", 1 ], 172 | "hidden" : 0, 173 | "midpoints" : [ ] 174 | } 175 | 176 | } 177 | , { 178 | "patchline" : { 179 | "source" : [ "obj-3", 0 ], 180 | "destination" : [ "obj-1", 0 ], 181 | "hidden" : 0, 182 | "midpoints" : [ ] 183 | } 184 | 185 | } 186 | , { 187 | "patchline" : { 188 | "source" : [ "obj-3", 0 ], 189 | "destination" : [ "obj-2", 0 ], 190 | "hidden" : 0, 191 | "midpoints" : [ ] 192 | } 193 | 194 | } 195 | ] 196 | } 197 | 198 | } 199 | -------------------------------------------------------------------------------- /help/sc.dust2~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 306.0, 269.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 306.0, 269.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "comment", 24 | "text" : "arg density - average number of impulses per second", 25 | "fontsize" : 10.0, 26 | "numinlets" : 1, 27 | "numoutlets" : 0, 28 | "patching_rect" : [ 331.0, 163.0, 299.0, 19.0 ], 29 | "id" : "obj-6", 30 | "fontname" : "Verdana" 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "scope~", 37 | "numinlets" : 2, 38 | "numoutlets" : 0, 39 | "patching_rect" : [ 339.0, 218.0, 384.0, 270.0 ], 40 | "id" : "obj-1" 41 | } 42 | 43 | } 44 | , { 45 | "box" : { 46 | "maxclass" : "newobj", 47 | "text" : "sc.dust2~ 100", 48 | "fontsize" : 10.0, 49 | "numinlets" : 1, 50 | "numoutlets" : 1, 51 | "outlettype" : [ "signal" ], 52 | "patching_rect" : [ 248.0, 162.0, 83.0, 19.0 ], 53 | "id" : "obj-3", 54 | "fontname" : "Verdana" 55 | } 56 | 57 | } 58 | , { 59 | "box" : { 60 | "maxclass" : "newobj", 61 | "text" : "*~ 0.2", 62 | "fontsize" : 10.0, 63 | "numinlets" : 2, 64 | "numoutlets" : 1, 65 | "outlettype" : [ "signal" ], 66 | "patching_rect" : [ 249.0, 249.0, 45.0, 19.0 ], 67 | "id" : "obj-2", 68 | "fontname" : "Verdana" 69 | } 70 | 71 | } 72 | , { 73 | "box" : { 74 | "maxclass" : "comment", 75 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 76 | "linecount" : 3, 77 | "fontsize" : 10.0, 78 | "numinlets" : 1, 79 | "numoutlets" : 0, 80 | "patching_rect" : [ 5.0, 491.0, 279.0, 43.0 ], 81 | "id" : "obj-12", 82 | "fontname" : "Verdana" 83 | } 84 | 85 | } 86 | , { 87 | "box" : { 88 | "maxclass" : "comment", 89 | "text" : "Generates random impulses from -1. to +1.", 90 | "fontsize" : 10.0, 91 | "numinlets" : 1, 92 | "numoutlets" : 0, 93 | "patching_rect" : [ 9.0, 43.0, 291.0, 19.0 ], 94 | "id" : "obj-9", 95 | "fontname" : "Verdana" 96 | } 97 | 98 | } 99 | , { 100 | "box" : { 101 | "maxclass" : "comment", 102 | "text" : "sc.dust2~", 103 | "fontface" : 3, 104 | "fontsize" : 16.0, 105 | "numinlets" : 1, 106 | "numoutlets" : 0, 107 | "patching_rect" : [ 9.0, 11.0, 118.0, 25.0 ], 108 | "id" : "obj-7", 109 | "fontname" : "Arial" 110 | } 111 | 112 | } 113 | , { 114 | "box" : { 115 | "maxclass" : "ezdac~", 116 | "numinlets" : 2, 117 | "numoutlets" : 0, 118 | "patching_rect" : [ 249.0, 320.0, 45.0, 45.0 ], 119 | "id" : "obj-4" 120 | } 121 | 122 | } 123 | , { 124 | "box" : { 125 | "maxclass" : "panel", 126 | "numinlets" : 1, 127 | "numoutlets" : 0, 128 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 129 | "id" : "obj-10", 130 | "rounded" : 0, 131 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ] 132 | } 133 | 134 | } 135 | , { 136 | "box" : { 137 | "maxclass" : "flonum", 138 | "fontsize" : 10.0, 139 | "numinlets" : 1, 140 | "numoutlets" : 2, 141 | "outlettype" : [ "float", "bang" ], 142 | "patching_rect" : [ 248.0, 132.0, 50.0, 19.0 ], 143 | "id" : "obj-14", 144 | "fontname" : "Verdana" 145 | } 146 | 147 | } 148 | ], 149 | "lines" : [ { 150 | "patchline" : { 151 | "source" : [ "obj-3", 0 ], 152 | "destination" : [ "obj-2", 0 ], 153 | "hidden" : 0, 154 | "midpoints" : [ ] 155 | } 156 | 157 | } 158 | , { 159 | "patchline" : { 160 | "source" : [ "obj-3", 0 ], 161 | "destination" : [ "obj-1", 0 ], 162 | "hidden" : 0, 163 | "midpoints" : [ ] 164 | } 165 | 166 | } 167 | , { 168 | "patchline" : { 169 | "source" : [ "obj-14", 0 ], 170 | "destination" : [ "obj-3", 0 ], 171 | "hidden" : 0, 172 | "midpoints" : [ ] 173 | } 174 | 175 | } 176 | , { 177 | "patchline" : { 178 | "source" : [ "obj-2", 0 ], 179 | "destination" : [ "obj-4", 1 ], 180 | "hidden" : 0, 181 | "midpoints" : [ ] 182 | } 183 | 184 | } 185 | , { 186 | "patchline" : { 187 | "source" : [ "obj-2", 0 ], 188 | "destination" : [ "obj-4", 0 ], 189 | "hidden" : 0, 190 | "midpoints" : [ ] 191 | } 192 | 193 | } 194 | ] 195 | } 196 | 197 | } 198 | -------------------------------------------------------------------------------- /help/sc.dust~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 306.0, 269.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 306.0, 269.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "comment", 24 | "text" : "arg density - average number of impulses per second", 25 | "id" : "obj-6", 26 | "fontname" : "Verdana", 27 | "fontsize" : 10.0, 28 | "numinlets" : 1, 29 | "numoutlets" : 0, 30 | "patching_rect" : [ 331.0, 163.0, 299.0, 19.0 ] 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "scope~", 37 | "id" : "obj-1", 38 | "numinlets" : 2, 39 | "numoutlets" : 0, 40 | "patching_rect" : [ 339.0, 218.0, 384.0, 270.0 ] 41 | } 42 | 43 | } 44 | , { 45 | "box" : { 46 | "maxclass" : "newobj", 47 | "text" : "sc.dust~ 100", 48 | "id" : "obj-3", 49 | "fontname" : "Verdana", 50 | "outlettype" : [ "signal" ], 51 | "fontsize" : 10.0, 52 | "numinlets" : 1, 53 | "numoutlets" : 1, 54 | "patching_rect" : [ 248.0, 162.0, 77.0, 19.0 ] 55 | } 56 | 57 | } 58 | , { 59 | "box" : { 60 | "maxclass" : "newobj", 61 | "text" : "*~ 0.2", 62 | "id" : "obj-2", 63 | "fontname" : "Verdana", 64 | "outlettype" : [ "signal" ], 65 | "fontsize" : 10.0, 66 | "numinlets" : 2, 67 | "numoutlets" : 1, 68 | "patching_rect" : [ 249.0, 249.0, 45.0, 19.0 ] 69 | } 70 | 71 | } 72 | , { 73 | "box" : { 74 | "maxclass" : "comment", 75 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 76 | "linecount" : 3, 77 | "id" : "obj-12", 78 | "fontname" : "Verdana", 79 | "fontsize" : 10.0, 80 | "numinlets" : 1, 81 | "numoutlets" : 0, 82 | "patching_rect" : [ 5.0, 491.0, 279.0, 43.0 ] 83 | } 84 | 85 | } 86 | , { 87 | "box" : { 88 | "maxclass" : "comment", 89 | "text" : "Generates random impulses from 0 to +1.", 90 | "id" : "obj-9", 91 | "fontname" : "Verdana", 92 | "fontsize" : 10.0, 93 | "numinlets" : 1, 94 | "numoutlets" : 0, 95 | "patching_rect" : [ 9.0, 43.0, 291.0, 19.0 ] 96 | } 97 | 98 | } 99 | , { 100 | "box" : { 101 | "maxclass" : "comment", 102 | "text" : "sc.dust~", 103 | "id" : "obj-7", 104 | "fontname" : "Arial", 105 | "fontface" : 3, 106 | "fontsize" : 16.0, 107 | "numinlets" : 1, 108 | "numoutlets" : 0, 109 | "patching_rect" : [ 9.0, 11.0, 118.0, 25.0 ] 110 | } 111 | 112 | } 113 | , { 114 | "box" : { 115 | "maxclass" : "ezdac~", 116 | "id" : "obj-4", 117 | "numinlets" : 2, 118 | "numoutlets" : 0, 119 | "patching_rect" : [ 249.0, 320.0, 45.0, 45.0 ] 120 | } 121 | 122 | } 123 | , { 124 | "box" : { 125 | "maxclass" : "panel", 126 | "id" : "obj-10", 127 | "rounded" : 0, 128 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 129 | "numinlets" : 1, 130 | "numoutlets" : 0, 131 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ] 132 | } 133 | 134 | } 135 | , { 136 | "box" : { 137 | "maxclass" : "flonum", 138 | "id" : "obj-14", 139 | "fontname" : "Verdana", 140 | "outlettype" : [ "float", "bang" ], 141 | "fontsize" : 10.0, 142 | "numinlets" : 1, 143 | "numoutlets" : 2, 144 | "patching_rect" : [ 248.0, 132.0, 50.0, 19.0 ] 145 | } 146 | 147 | } 148 | ], 149 | "lines" : [ { 150 | "patchline" : { 151 | "source" : [ "obj-3", 0 ], 152 | "destination" : [ "obj-2", 0 ], 153 | "hidden" : 0, 154 | "midpoints" : [ ] 155 | } 156 | 157 | } 158 | , { 159 | "patchline" : { 160 | "source" : [ "obj-3", 0 ], 161 | "destination" : [ "obj-1", 0 ], 162 | "hidden" : 0, 163 | "midpoints" : [ ] 164 | } 165 | 166 | } 167 | , { 168 | "patchline" : { 169 | "source" : [ "obj-2", 0 ], 170 | "destination" : [ "obj-4", 0 ], 171 | "hidden" : 0, 172 | "midpoints" : [ ] 173 | } 174 | 175 | } 176 | , { 177 | "patchline" : { 178 | "source" : [ "obj-2", 0 ], 179 | "destination" : [ "obj-4", 1 ], 180 | "hidden" : 0, 181 | "midpoints" : [ ] 182 | } 183 | 184 | } 185 | , { 186 | "patchline" : { 187 | "source" : [ "obj-14", 0 ], 188 | "destination" : [ "obj-3", 0 ], 189 | "hidden" : 0, 190 | "midpoints" : [ ] 191 | } 192 | 193 | } 194 | ] 195 | } 196 | 197 | } 198 | -------------------------------------------------------------------------------- /help/sc.graynoise~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 171.0, 138.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 171.0, 138.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "scope~", 24 | "id" : "obj-1", 25 | "patching_rect" : [ 113.0, 214.0, 412.0, 148.0 ], 26 | "numinlets" : 2, 27 | "numoutlets" : 0 28 | } 29 | 30 | } 31 | , { 32 | "box" : { 33 | "maxclass" : "newobj", 34 | "text" : "sc.graynoise~", 35 | "fontname" : "Verdana", 36 | "outlettype" : [ "signal" ], 37 | "id" : "obj-3", 38 | "fontsize" : 10.0, 39 | "patching_rect" : [ 23.0, 158.0, 81.0, 19.0 ], 40 | "numinlets" : 1, 41 | "numoutlets" : 1 42 | } 43 | 44 | } 45 | , { 46 | "box" : { 47 | "maxclass" : "newobj", 48 | "text" : "*~ 0.2", 49 | "fontname" : "Verdana", 50 | "outlettype" : [ "signal" ], 51 | "id" : "obj-2", 52 | "fontsize" : 10.0, 53 | "patching_rect" : [ 23.0, 245.0, 45.0, 19.0 ], 54 | "numinlets" : 2, 55 | "numoutlets" : 1 56 | } 57 | 58 | } 59 | , { 60 | "box" : { 61 | "maxclass" : "comment", 62 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 63 | "linecount" : 3, 64 | "fontname" : "Verdana", 65 | "id" : "obj-12", 66 | "fontsize" : 10.0, 67 | "patching_rect" : [ 5.0, 458.0, 279.0, 43.0 ], 68 | "numinlets" : 1, 69 | "numoutlets" : 0 70 | } 71 | 72 | } 73 | , { 74 | "box" : { 75 | "maxclass" : "comment", 76 | "text" : "Generates noise which results from flipping random bits in a word.\nThis type of noise has a high RMS level relative to its peak to peak level.\nThe spectrum is emphasized towards lower frequencies.", 77 | "linecount" : 3, 78 | "fontname" : "Verdana", 79 | "id" : "obj-9", 80 | "fontsize" : 10.0, 81 | "patching_rect" : [ 9.0, 42.0, 384.0, 43.0 ], 82 | "numinlets" : 1, 83 | "numoutlets" : 0 84 | } 85 | 86 | } 87 | , { 88 | "box" : { 89 | "maxclass" : "comment", 90 | "text" : "sc.graynoise~", 91 | "fontname" : "Arial", 92 | "id" : "obj-7", 93 | "fontface" : 3, 94 | "fontsize" : 16.0, 95 | "patching_rect" : [ 9.0, 11.0, 118.0, 25.0 ], 96 | "numinlets" : 1, 97 | "numoutlets" : 0 98 | } 99 | 100 | } 101 | , { 102 | "box" : { 103 | "maxclass" : "ezdac~", 104 | "id" : "obj-4", 105 | "patching_rect" : [ 23.0, 316.0, 45.0, 45.0 ], 106 | "numinlets" : 2, 107 | "numoutlets" : 0 108 | } 109 | 110 | } 111 | , { 112 | "box" : { 113 | "maxclass" : "panel", 114 | "id" : "obj-10", 115 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 116 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 117 | "numinlets" : 1, 118 | "rounded" : 0, 119 | "numoutlets" : 0 120 | } 121 | 122 | } 123 | ], 124 | "lines" : [ { 125 | "patchline" : { 126 | "source" : [ "obj-2", 0 ], 127 | "destination" : [ "obj-4", 1 ], 128 | "hidden" : 0, 129 | "midpoints" : [ ] 130 | } 131 | 132 | } 133 | , { 134 | "patchline" : { 135 | "source" : [ "obj-2", 0 ], 136 | "destination" : [ "obj-4", 0 ], 137 | "hidden" : 0, 138 | "midpoints" : [ ] 139 | } 140 | 141 | } 142 | , { 143 | "patchline" : { 144 | "source" : [ "obj-3", 0 ], 145 | "destination" : [ "obj-2", 0 ], 146 | "hidden" : 0, 147 | "midpoints" : [ ] 148 | } 149 | 150 | } 151 | , { 152 | "patchline" : { 153 | "source" : [ "obj-3", 0 ], 154 | "destination" : [ "obj-1", 0 ], 155 | "hidden" : 0, 156 | "midpoints" : [ ] 157 | } 158 | 159 | } 160 | ] 161 | } 162 | 163 | } 164 | -------------------------------------------------------------------------------- /help/sc.lfclipnoise~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 230.0, 188.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 230.0, 188.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "comment", 24 | "text" : "not < 1", 25 | "fontsize" : 10.0, 26 | "numinlets" : 1, 27 | "numoutlets" : 0, 28 | "id" : "obj-16", 29 | "fontname" : "Verdana", 30 | "patching_rect" : [ 63.0, 89.0, 48.0, 19.0 ] 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "flonum", 37 | "fontsize" : 10.0, 38 | "numinlets" : 1, 39 | "numoutlets" : 2, 40 | "id" : "obj-9", 41 | "fontname" : "Verdana", 42 | "outlettype" : [ "float", "bang" ], 43 | "patching_rect" : [ 9.0, 89.0, 50.0, 19.0 ] 44 | } 45 | 46 | } 47 | , { 48 | "box" : { 49 | "maxclass" : "newobj", 50 | "text" : "saw~", 51 | "fontsize" : 10.0, 52 | "numinlets" : 2, 53 | "numoutlets" : 1, 54 | "id" : "obj-13", 55 | "fontname" : "Verdana", 56 | "outlettype" : [ "signal" ], 57 | "patching_rect" : [ 9.0, 237.0, 38.0, 19.0 ] 58 | } 59 | 60 | } 61 | , { 62 | "box" : { 63 | "maxclass" : "newobj", 64 | "text" : "+~ 600", 65 | "fontsize" : 10.0, 66 | "numinlets" : 2, 67 | "numoutlets" : 1, 68 | "id" : "obj-11", 69 | "fontname" : "Verdana", 70 | "outlettype" : [ "signal" ], 71 | "patching_rect" : [ 9.0, 201.0, 49.0, 19.0 ] 72 | } 73 | 74 | } 75 | , { 76 | "box" : { 77 | "maxclass" : "newobj", 78 | "text" : "*~ 300", 79 | "fontsize" : 10.0, 80 | "numinlets" : 2, 81 | "numoutlets" : 1, 82 | "id" : "obj-8", 83 | "fontname" : "Verdana", 84 | "outlettype" : [ "signal" ], 85 | "patching_rect" : [ 9.0, 166.0, 48.0, 19.0 ] 86 | } 87 | 88 | } 89 | , { 90 | "box" : { 91 | "maxclass" : "comment", 92 | "text" : "Randomly generates the values -1 or +1 at a rate given by the nearest integer division\nof the sample rate by the freq argument. It is probably pretty hard on your speakers!\n", 93 | "linecount" : 2, 94 | "fontsize" : 10.0, 95 | "numinlets" : 1, 96 | "numoutlets" : 0, 97 | "id" : "obj-6", 98 | "fontname" : "Verdana", 99 | "patching_rect" : [ 9.0, 44.0, 500.0, 31.0 ] 100 | } 101 | 102 | } 103 | , { 104 | "box" : { 105 | "maxclass" : "scope~", 106 | "numinlets" : 2, 107 | "numoutlets" : 0, 108 | "id" : "obj-1", 109 | "patching_rect" : [ 350.0, 245.0, 317.0, 161.0 ] 110 | } 111 | 112 | } 113 | , { 114 | "box" : { 115 | "maxclass" : "newobj", 116 | "text" : "sc.lfclipnoise~ 50", 117 | "fontsize" : 10.0, 118 | "numinlets" : 1, 119 | "numoutlets" : 1, 120 | "id" : "obj-3", 121 | "fontname" : "Verdana", 122 | "outlettype" : [ "signal" ], 123 | "patching_rect" : [ 9.0, 124.0, 98.0, 19.0 ] 124 | } 125 | 126 | } 127 | , { 128 | "box" : { 129 | "maxclass" : "newobj", 130 | "text" : "*~ 0.2", 131 | "fontsize" : 10.0, 132 | "numinlets" : 2, 133 | "numoutlets" : 1, 134 | "id" : "obj-2", 135 | "fontname" : "Verdana", 136 | "outlettype" : [ "signal" ], 137 | "patching_rect" : [ 9.0, 308.0, 45.0, 19.0 ] 138 | } 139 | 140 | } 141 | , { 142 | "box" : { 143 | "maxclass" : "comment", 144 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 145 | "linecount" : 3, 146 | "fontsize" : 10.0, 147 | "numinlets" : 1, 148 | "numoutlets" : 0, 149 | "id" : "obj-12", 150 | "fontname" : "Verdana", 151 | "patching_rect" : [ 4.0, 471.0, 279.0, 43.0 ] 152 | } 153 | 154 | } 155 | , { 156 | "box" : { 157 | "maxclass" : "comment", 158 | "text" : "sc.lfclipnoise~", 159 | "fontsize" : 16.0, 160 | "numinlets" : 1, 161 | "numoutlets" : 0, 162 | "id" : "obj-7", 163 | "fontname" : "Arial", 164 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ], 165 | "fontface" : 3 166 | } 167 | 168 | } 169 | , { 170 | "box" : { 171 | "maxclass" : "ezdac~", 172 | "numinlets" : 2, 173 | "numoutlets" : 0, 174 | "id" : "obj-4", 175 | "patching_rect" : [ 9.0, 379.0, 45.0, 45.0 ] 176 | } 177 | 178 | } 179 | , { 180 | "box" : { 181 | "maxclass" : "panel", 182 | "numinlets" : 1, 183 | "numoutlets" : 0, 184 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 185 | "id" : "obj-10", 186 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 187 | "rounded" : 0 188 | } 189 | 190 | } 191 | ], 192 | "lines" : [ { 193 | "patchline" : { 194 | "source" : [ "obj-8", 0 ], 195 | "destination" : [ "obj-11", 0 ], 196 | "hidden" : 0, 197 | "midpoints" : [ ] 198 | } 199 | 200 | } 201 | , { 202 | "patchline" : { 203 | "source" : [ "obj-11", 0 ], 204 | "destination" : [ "obj-13", 0 ], 205 | "hidden" : 0, 206 | "midpoints" : [ ] 207 | } 208 | 209 | } 210 | , { 211 | "patchline" : { 212 | "source" : [ "obj-3", 0 ], 213 | "destination" : [ "obj-8", 0 ], 214 | "hidden" : 0, 215 | "midpoints" : [ ] 216 | } 217 | 218 | } 219 | , { 220 | "patchline" : { 221 | "source" : [ "obj-9", 0 ], 222 | "destination" : [ "obj-3", 0 ], 223 | "hidden" : 0, 224 | "midpoints" : [ ] 225 | } 226 | 227 | } 228 | , { 229 | "patchline" : { 230 | "source" : [ "obj-3", 0 ], 231 | "destination" : [ "obj-1", 0 ], 232 | "hidden" : 0, 233 | "midpoints" : [ 18.5, 149.0, 54.0, 149.0, 97.0, 196.0, 124.0, 215.0, 147.0, 215.0, 166.0, 215.0, 185.0, 231.0, 118.0, 288.0, 112.0, 288.0, 105.0, 304.0, 126.0, 304.0, 149.0, 304.0, 168.0, 285.0, 181.0, 259.0, 219.0, 232.0, 230.0, 232.0, 230.0, 256.0 ] 234 | } 235 | 236 | } 237 | , { 238 | "patchline" : { 239 | "source" : [ "obj-13", 0 ], 240 | "destination" : [ "obj-2", 0 ], 241 | "hidden" : 0, 242 | "midpoints" : [ ] 243 | } 244 | 245 | } 246 | , { 247 | "patchline" : { 248 | "source" : [ "obj-2", 0 ], 249 | "destination" : [ "obj-4", 1 ], 250 | "hidden" : 0, 251 | "midpoints" : [ ] 252 | } 253 | 254 | } 255 | , { 256 | "patchline" : { 257 | "source" : [ "obj-2", 0 ], 258 | "destination" : [ "obj-4", 0 ], 259 | "hidden" : 0, 260 | "midpoints" : [ ] 261 | } 262 | 263 | } 264 | ] 265 | } 266 | 267 | } 268 | -------------------------------------------------------------------------------- /help/sc.lfnoise0~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 230.0, 188.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 230.0, 188.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "flonum", 24 | "patching_rect" : [ 9.0, 123.0, 50.0, 19.0 ], 25 | "id" : "obj-16", 26 | "fontname" : "Verdana", 27 | "numinlets" : 1, 28 | "numoutlets" : 2, 29 | "fontsize" : 10.0, 30 | "outlettype" : [ "float", "bang" ] 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "comment", 37 | "text" : "freq changes waits until one \"phase\" has finished. So very low freq values might seem broken or appear to keep on forever.", 38 | "linecount" : 2, 39 | "patching_rect" : [ 66.0, 114.0, 330.0, 31.0 ], 40 | "id" : "obj-14", 41 | "fontname" : "Verdana", 42 | "numinlets" : 1, 43 | "numoutlets" : 0, 44 | "fontsize" : 10.0 45 | } 46 | 47 | } 48 | , { 49 | "box" : { 50 | "maxclass" : "newobj", 51 | "text" : "saw~", 52 | "patching_rect" : [ 9.0, 265.0, 38.0, 19.0 ], 53 | "id" : "obj-13", 54 | "fontname" : "Verdana", 55 | "numinlets" : 2, 56 | "numoutlets" : 1, 57 | "fontsize" : 10.0, 58 | "outlettype" : [ "signal" ] 59 | } 60 | 61 | } 62 | , { 63 | "box" : { 64 | "maxclass" : "newobj", 65 | "text" : "+~ 600", 66 | "patching_rect" : [ 9.0, 229.0, 49.0, 19.0 ], 67 | "id" : "obj-11", 68 | "fontname" : "Verdana", 69 | "numinlets" : 2, 70 | "numoutlets" : 1, 71 | "fontsize" : 10.0, 72 | "outlettype" : [ "signal" ] 73 | } 74 | 75 | } 76 | , { 77 | "box" : { 78 | "maxclass" : "newobj", 79 | "text" : "*~ 300", 80 | "patching_rect" : [ 9.0, 194.0, 48.0, 19.0 ], 81 | "id" : "obj-8", 82 | "fontname" : "Verdana", 83 | "numinlets" : 2, 84 | "numoutlets" : 1, 85 | "fontsize" : 10.0, 86 | "outlettype" : [ "signal" ] 87 | } 88 | 89 | } 90 | , { 91 | "box" : { 92 | "maxclass" : "comment", 93 | "text" : "Step Noise\n\nGenerates random values at a given rate.", 94 | "linecount" : 3, 95 | "patching_rect" : [ 9.0, 44.0, 221.0, 43.0 ], 96 | "id" : "obj-6", 97 | "fontname" : "Verdana", 98 | "numinlets" : 1, 99 | "numoutlets" : 0, 100 | "fontsize" : 10.0 101 | } 102 | 103 | } 104 | , { 105 | "box" : { 106 | "maxclass" : "scope~", 107 | "patching_rect" : [ 350.0, 273.0, 317.0, 161.0 ], 108 | "id" : "obj-1", 109 | "numinlets" : 2, 110 | "numoutlets" : 0 111 | } 112 | 113 | } 114 | , { 115 | "box" : { 116 | "maxclass" : "newobj", 117 | "text" : "sc.lfnoise0~ 10", 118 | "patching_rect" : [ 9.0, 152.0, 88.0, 19.0 ], 119 | "id" : "obj-3", 120 | "fontname" : "Verdana", 121 | "numinlets" : 1, 122 | "numoutlets" : 1, 123 | "fontsize" : 10.0, 124 | "outlettype" : [ "signal" ] 125 | } 126 | 127 | } 128 | , { 129 | "box" : { 130 | "maxclass" : "newobj", 131 | "text" : "*~ 0.2", 132 | "patching_rect" : [ 9.0, 336.0, 45.0, 19.0 ], 133 | "id" : "obj-2", 134 | "fontname" : "Verdana", 135 | "numinlets" : 2, 136 | "numoutlets" : 1, 137 | "fontsize" : 10.0, 138 | "outlettype" : [ "signal" ] 139 | } 140 | 141 | } 142 | , { 143 | "box" : { 144 | "maxclass" : "comment", 145 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 146 | "linecount" : 3, 147 | "patching_rect" : [ 4.0, 471.0, 279.0, 43.0 ], 148 | "id" : "obj-12", 149 | "fontname" : "Verdana", 150 | "numinlets" : 1, 151 | "numoutlets" : 0, 152 | "fontsize" : 10.0 153 | } 154 | 155 | } 156 | , { 157 | "box" : { 158 | "maxclass" : "comment", 159 | "text" : "sc.lfnoise0~", 160 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ], 161 | "id" : "obj-7", 162 | "fontname" : "Arial", 163 | "numinlets" : 1, 164 | "numoutlets" : 0, 165 | "fontface" : 3, 166 | "fontsize" : 16.0 167 | } 168 | 169 | } 170 | , { 171 | "box" : { 172 | "maxclass" : "ezdac~", 173 | "patching_rect" : [ 9.0, 407.0, 45.0, 45.0 ], 174 | "id" : "obj-4", 175 | "numinlets" : 2, 176 | "numoutlets" : 0 177 | } 178 | 179 | } 180 | , { 181 | "box" : { 182 | "maxclass" : "panel", 183 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 184 | "id" : "obj-10", 185 | "rounded" : 0, 186 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 187 | "numinlets" : 1, 188 | "numoutlets" : 0 189 | } 190 | 191 | } 192 | ], 193 | "lines" : [ { 194 | "patchline" : { 195 | "source" : [ "obj-2", 0 ], 196 | "destination" : [ "obj-4", 0 ], 197 | "hidden" : 0, 198 | "midpoints" : [ ] 199 | } 200 | 201 | } 202 | , { 203 | "patchline" : { 204 | "source" : [ "obj-2", 0 ], 205 | "destination" : [ "obj-4", 1 ], 206 | "hidden" : 0, 207 | "midpoints" : [ ] 208 | } 209 | 210 | } 211 | , { 212 | "patchline" : { 213 | "source" : [ "obj-13", 0 ], 214 | "destination" : [ "obj-2", 0 ], 215 | "hidden" : 0, 216 | "midpoints" : [ ] 217 | } 218 | 219 | } 220 | , { 221 | "patchline" : { 222 | "source" : [ "obj-11", 0 ], 223 | "destination" : [ "obj-13", 0 ], 224 | "hidden" : 0, 225 | "midpoints" : [ ] 226 | } 227 | 228 | } 229 | , { 230 | "patchline" : { 231 | "source" : [ "obj-8", 0 ], 232 | "destination" : [ "obj-11", 0 ], 233 | "hidden" : 0, 234 | "midpoints" : [ ] 235 | } 236 | 237 | } 238 | , { 239 | "patchline" : { 240 | "source" : [ "obj-16", 0 ], 241 | "destination" : [ "obj-3", 0 ], 242 | "hidden" : 0, 243 | "midpoints" : [ ] 244 | } 245 | 246 | } 247 | , { 248 | "patchline" : { 249 | "source" : [ "obj-3", 0 ], 250 | "destination" : [ "obj-1", 0 ], 251 | "hidden" : 0, 252 | "midpoints" : [ 18.5, 177.0, 54.0, 177.0, 97.0, 224.0, 124.0, 243.0, 147.0, 243.0, 166.0, 243.0, 185.0, 259.0, 118.0, 316.0, 112.0, 316.0, 105.0, 332.0, 126.0, 332.0, 149.0, 332.0, 168.0, 313.0, 181.0, 287.0, 219.0, 260.0, 230.0, 260.0, 230.0, 284.0 ] 253 | } 254 | 255 | } 256 | , { 257 | "patchline" : { 258 | "source" : [ "obj-3", 0 ], 259 | "destination" : [ "obj-8", 0 ], 260 | "hidden" : 0, 261 | "midpoints" : [ ] 262 | } 263 | 264 | } 265 | ] 266 | } 267 | 268 | } 269 | -------------------------------------------------------------------------------- /help/sc.lfnoise1~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 230.0, 188.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 230.0, 188.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "newobj", 24 | "text" : "loadmess 10", 25 | "patching_rect" : [ 9.0, 94.0, 74.0, 19.0 ], 26 | "id" : "obj-17", 27 | "fontname" : "Verdana", 28 | "numinlets" : 1, 29 | "numoutlets" : 1, 30 | "fontsize" : 10.0, 31 | "outlettype" : [ "" ] 32 | } 33 | 34 | } 35 | , { 36 | "box" : { 37 | "maxclass" : "newobj", 38 | "text" : "lores~ 600 0.95", 39 | "patching_rect" : [ 9.0, 330.0, 99.0, 19.0 ], 40 | "id" : "obj-15", 41 | "fontname" : "Verdana", 42 | "numinlets" : 3, 43 | "numoutlets" : 1, 44 | "presentation_rect" : [ 19.0, 333.0, 0.0, 0.0 ], 45 | "fontsize" : 10.0, 46 | "outlettype" : [ "signal" ] 47 | } 48 | 49 | } 50 | , { 51 | "box" : { 52 | "maxclass" : "newobj", 53 | "text" : "-~ 100", 54 | "patching_rect" : [ 82.0, 266.0, 46.0, 19.0 ], 55 | "id" : "obj-14", 56 | "fontname" : "Verdana", 57 | "numinlets" : 2, 58 | "numoutlets" : 1, 59 | "fontsize" : 10.0, 60 | "outlettype" : [ "signal" ] 61 | } 62 | 63 | } 64 | , { 65 | "box" : { 66 | "maxclass" : "newobj", 67 | "text" : "lores~ 600 0.95", 68 | "patching_rect" : [ 9.0, 299.0, 99.0, 19.0 ], 69 | "id" : "obj-9", 70 | "fontname" : "Verdana", 71 | "numinlets" : 3, 72 | "numoutlets" : 1, 73 | "fontsize" : 10.0, 74 | "outlettype" : [ "signal" ] 75 | } 76 | 77 | } 78 | , { 79 | "box" : { 80 | "maxclass" : "comment", 81 | "text" : "freq changes waits until one \"phase\" has finished. So very low freq values might seem broken or appear to keep on forever.", 82 | "linecount" : 2, 83 | "patching_rect" : [ 65.0, 117.0, 330.0, 31.0 ], 84 | "id" : "obj-5", 85 | "fontname" : "Verdana", 86 | "numinlets" : 1, 87 | "numoutlets" : 0, 88 | "fontsize" : 10.0 89 | } 90 | 91 | } 92 | , { 93 | "box" : { 94 | "maxclass" : "flonum", 95 | "patching_rect" : [ 9.0, 123.0, 50.0, 19.0 ], 96 | "id" : "obj-16", 97 | "fontname" : "Verdana", 98 | "numinlets" : 1, 99 | "numoutlets" : 2, 100 | "fontsize" : 10.0, 101 | "outlettype" : [ "float", "bang" ] 102 | } 103 | 104 | } 105 | , { 106 | "box" : { 107 | "maxclass" : "newobj", 108 | "text" : "saw~", 109 | "patching_rect" : [ 9.0, 265.0, 38.0, 19.0 ], 110 | "id" : "obj-13", 111 | "fontname" : "Verdana", 112 | "numinlets" : 2, 113 | "numoutlets" : 1, 114 | "fontsize" : 10.0, 115 | "outlettype" : [ "signal" ] 116 | } 117 | 118 | } 119 | , { 120 | "box" : { 121 | "maxclass" : "newobj", 122 | "text" : "+~ 600", 123 | "patching_rect" : [ 9.0, 229.0, 49.0, 19.0 ], 124 | "id" : "obj-11", 125 | "fontname" : "Verdana", 126 | "numinlets" : 2, 127 | "numoutlets" : 1, 128 | "fontsize" : 10.0, 129 | "outlettype" : [ "signal" ] 130 | } 131 | 132 | } 133 | , { 134 | "box" : { 135 | "maxclass" : "newobj", 136 | "text" : "*~ 300", 137 | "patching_rect" : [ 9.0, 194.0, 48.0, 19.0 ], 138 | "id" : "obj-8", 139 | "fontname" : "Verdana", 140 | "numinlets" : 2, 141 | "numoutlets" : 1, 142 | "fontsize" : 10.0, 143 | "outlettype" : [ "signal" ] 144 | } 145 | 146 | } 147 | , { 148 | "box" : { 149 | "maxclass" : "comment", 150 | "text" : "Ramp Noise\n\nGenerates linearly interpolated random values at a rate. \n", 151 | "linecount" : 3, 152 | "patching_rect" : [ 10.0, 44.0, 297.0, 43.0 ], 153 | "id" : "obj-6", 154 | "fontname" : "Verdana", 155 | "numinlets" : 1, 156 | "numoutlets" : 0, 157 | "fontsize" : 10.0 158 | } 159 | 160 | } 161 | , { 162 | "box" : { 163 | "maxclass" : "scope~", 164 | "patching_rect" : [ 350.0, 273.0, 317.0, 161.0 ], 165 | "id" : "obj-1", 166 | "numinlets" : 2, 167 | "numoutlets" : 0 168 | } 169 | 170 | } 171 | , { 172 | "box" : { 173 | "maxclass" : "newobj", 174 | "text" : "sc.lfnoise1~ 10", 175 | "patching_rect" : [ 9.0, 152.0, 89.0, 19.0 ], 176 | "id" : "obj-3", 177 | "fontname" : "Verdana", 178 | "numinlets" : 1, 179 | "numoutlets" : 1, 180 | "fontsize" : 10.0, 181 | "outlettype" : [ "signal" ] 182 | } 183 | 184 | } 185 | , { 186 | "box" : { 187 | "maxclass" : "newobj", 188 | "text" : "*~ 0.2", 189 | "patching_rect" : [ 9.0, 359.0, 45.0, 19.0 ], 190 | "id" : "obj-2", 191 | "fontname" : "Verdana", 192 | "numinlets" : 2, 193 | "numoutlets" : 1, 194 | "fontsize" : 10.0, 195 | "outlettype" : [ "signal" ] 196 | } 197 | 198 | } 199 | , { 200 | "box" : { 201 | "maxclass" : "comment", 202 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 203 | "linecount" : 3, 204 | "patching_rect" : [ 4.0, 471.0, 279.0, 43.0 ], 205 | "id" : "obj-12", 206 | "fontname" : "Verdana", 207 | "numinlets" : 1, 208 | "numoutlets" : 0, 209 | "fontsize" : 10.0 210 | } 211 | 212 | } 213 | , { 214 | "box" : { 215 | "maxclass" : "comment", 216 | "text" : "sc.lfnoise1~", 217 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ], 218 | "id" : "obj-7", 219 | "fontname" : "Arial", 220 | "numinlets" : 1, 221 | "numoutlets" : 0, 222 | "fontface" : 3, 223 | "fontsize" : 16.0 224 | } 225 | 226 | } 227 | , { 228 | "box" : { 229 | "maxclass" : "ezdac~", 230 | "patching_rect" : [ 9.0, 407.0, 45.0, 45.0 ], 231 | "id" : "obj-4", 232 | "numinlets" : 2, 233 | "numoutlets" : 0 234 | } 235 | 236 | } 237 | , { 238 | "box" : { 239 | "maxclass" : "panel", 240 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 241 | "id" : "obj-10", 242 | "rounded" : 0, 243 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 244 | "numinlets" : 1, 245 | "numoutlets" : 0 246 | } 247 | 248 | } 249 | ], 250 | "lines" : [ { 251 | "patchline" : { 252 | "source" : [ "obj-17", 0 ], 253 | "destination" : [ "obj-16", 0 ], 254 | "hidden" : 0, 255 | "midpoints" : [ ] 256 | } 257 | 258 | } 259 | , { 260 | "patchline" : { 261 | "source" : [ "obj-3", 0 ], 262 | "destination" : [ "obj-8", 0 ], 263 | "hidden" : 0, 264 | "midpoints" : [ ] 265 | } 266 | 267 | } 268 | , { 269 | "patchline" : { 270 | "source" : [ "obj-3", 0 ], 271 | "destination" : [ "obj-1", 0 ], 272 | "hidden" : 0, 273 | "midpoints" : [ 18.5, 177.0, 54.0, 177.0, 97.0, 224.0, 124.0, 243.0, 147.0, 243.0, 166.0, 243.0, 185.0, 259.0, 118.0, 316.0, 128.0, 309.0, 121.0, 325.0, 121.0, 332.0, 149.0, 332.0, 168.0, 313.0, 181.0, 287.0, 219.0, 260.0, 230.0, 260.0, 230.0, 284.0 ] 274 | } 275 | 276 | } 277 | , { 278 | "patchline" : { 279 | "source" : [ "obj-16", 0 ], 280 | "destination" : [ "obj-3", 0 ], 281 | "hidden" : 0, 282 | "midpoints" : [ ] 283 | } 284 | 285 | } 286 | , { 287 | "patchline" : { 288 | "source" : [ "obj-11", 0 ], 289 | "destination" : [ "obj-14", 0 ], 290 | "hidden" : 0, 291 | "midpoints" : [ ] 292 | } 293 | 294 | } 295 | , { 296 | "patchline" : { 297 | "source" : [ "obj-14", 0 ], 298 | "destination" : [ "obj-9", 1 ], 299 | "hidden" : 0, 300 | "midpoints" : [ ] 301 | } 302 | 303 | } 304 | , { 305 | "patchline" : { 306 | "source" : [ "obj-14", 0 ], 307 | "destination" : [ "obj-15", 1 ], 308 | "hidden" : 0, 309 | "midpoints" : [ ] 310 | } 311 | 312 | } 313 | , { 314 | "patchline" : { 315 | "source" : [ "obj-15", 0 ], 316 | "destination" : [ "obj-2", 0 ], 317 | "hidden" : 0, 318 | "midpoints" : [ ] 319 | } 320 | 321 | } 322 | , { 323 | "patchline" : { 324 | "source" : [ "obj-9", 0 ], 325 | "destination" : [ "obj-15", 0 ], 326 | "hidden" : 0, 327 | "midpoints" : [ ] 328 | } 329 | 330 | } 331 | , { 332 | "patchline" : { 333 | "source" : [ "obj-13", 0 ], 334 | "destination" : [ "obj-9", 0 ], 335 | "hidden" : 0, 336 | "midpoints" : [ ] 337 | } 338 | 339 | } 340 | , { 341 | "patchline" : { 342 | "source" : [ "obj-2", 0 ], 343 | "destination" : [ "obj-4", 0 ], 344 | "hidden" : 0, 345 | "midpoints" : [ ] 346 | } 347 | 348 | } 349 | , { 350 | "patchline" : { 351 | "source" : [ "obj-2", 0 ], 352 | "destination" : [ "obj-4", 1 ], 353 | "hidden" : 0, 354 | "midpoints" : [ ] 355 | } 356 | 357 | } 358 | , { 359 | "patchline" : { 360 | "source" : [ "obj-11", 0 ], 361 | "destination" : [ "obj-13", 0 ], 362 | "hidden" : 0, 363 | "midpoints" : [ ] 364 | } 365 | 366 | } 367 | , { 368 | "patchline" : { 369 | "source" : [ "obj-8", 0 ], 370 | "destination" : [ "obj-11", 0 ], 371 | "hidden" : 0, 372 | "midpoints" : [ ] 373 | } 374 | 375 | } 376 | ] 377 | } 378 | 379 | } 380 | -------------------------------------------------------------------------------- /help/sc.lfnoise2~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 230.0, 188.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 230.0, 188.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "newobj", 24 | "text" : "loadmess 10", 25 | "fontsize" : 10.0, 26 | "numoutlets" : 1, 27 | "id" : "obj-17", 28 | "outlettype" : [ "" ], 29 | "fontname" : "Verdana", 30 | "patching_rect" : [ 9.0, 94.0, 74.0, 19.0 ], 31 | "numinlets" : 1 32 | } 33 | 34 | } 35 | , { 36 | "box" : { 37 | "maxclass" : "comment", 38 | "text" : "freq changes waits until one \"phase\" has finished. So very low freq values might seem broken or appear to keep on forever.", 39 | "linecount" : 2, 40 | "fontsize" : 10.0, 41 | "numoutlets" : 0, 42 | "id" : "obj-5", 43 | "fontname" : "Verdana", 44 | "patching_rect" : [ 65.0, 117.0, 330.0, 31.0 ], 45 | "numinlets" : 1 46 | } 47 | 48 | } 49 | , { 50 | "box" : { 51 | "maxclass" : "flonum", 52 | "fontsize" : 10.0, 53 | "numoutlets" : 2, 54 | "id" : "obj-16", 55 | "outlettype" : [ "float", "bang" ], 56 | "fontname" : "Verdana", 57 | "patching_rect" : [ 9.0, 124.0, 50.0, 19.0 ], 58 | "numinlets" : 1 59 | } 60 | 61 | } 62 | , { 63 | "box" : { 64 | "maxclass" : "newobj", 65 | "text" : "cycle~", 66 | "fontsize" : 10.0, 67 | "numoutlets" : 1, 68 | "id" : "obj-13", 69 | "outlettype" : [ "signal" ], 70 | "fontname" : "Verdana", 71 | "patching_rect" : [ 9.0, 265.0, 44.0, 19.0 ], 72 | "numinlets" : 2 73 | } 74 | 75 | } 76 | , { 77 | "box" : { 78 | "maxclass" : "newobj", 79 | "text" : "+~ 1000", 80 | "fontsize" : 10.0, 81 | "numoutlets" : 1, 82 | "id" : "obj-11", 83 | "outlettype" : [ "signal" ], 84 | "fontname" : "Verdana", 85 | "patching_rect" : [ 9.0, 229.0, 57.0, 19.0 ], 86 | "numinlets" : 2 87 | } 88 | 89 | } 90 | , { 91 | "box" : { 92 | "maxclass" : "newobj", 93 | "text" : "*~ 100", 94 | "fontsize" : 10.0, 95 | "numoutlets" : 1, 96 | "id" : "obj-8", 97 | "outlettype" : [ "signal" ], 98 | "fontname" : "Verdana", 99 | "patching_rect" : [ 9.0, 194.0, 48.0, 19.0 ], 100 | "numinlets" : 2 101 | } 102 | 103 | } 104 | , { 105 | "box" : { 106 | "maxclass" : "comment", 107 | "text" : "Quadratic Noise\n\nGenerates quadratically interpolated random values at a rate.\n\n", 108 | "linecount" : 3, 109 | "fontsize" : 10.0, 110 | "numoutlets" : 0, 111 | "id" : "obj-6", 112 | "fontname" : "Verdana", 113 | "patching_rect" : [ 10.0, 44.0, 343.0, 43.0 ], 114 | "numinlets" : 1 115 | } 116 | 117 | } 118 | , { 119 | "box" : { 120 | "maxclass" : "scope~", 121 | "numoutlets" : 0, 122 | "id" : "obj-1", 123 | "patching_rect" : [ 350.0, 273.0, 317.0, 161.0 ], 124 | "numinlets" : 2 125 | } 126 | 127 | } 128 | , { 129 | "box" : { 130 | "maxclass" : "newobj", 131 | "text" : "sc.lfnoise2~ 10", 132 | "fontsize" : 10.0, 133 | "numoutlets" : 1, 134 | "id" : "obj-3", 135 | "outlettype" : [ "signal" ], 136 | "fontname" : "Verdana", 137 | "patching_rect" : [ 8.0, 153.0, 88.0, 19.0 ], 138 | "numinlets" : 1 139 | } 140 | 141 | } 142 | , { 143 | "box" : { 144 | "maxclass" : "newobj", 145 | "text" : "*~ 0.2", 146 | "fontsize" : 10.0, 147 | "numoutlets" : 1, 148 | "id" : "obj-2", 149 | "outlettype" : [ "signal" ], 150 | "fontname" : "Verdana", 151 | "patching_rect" : [ 9.0, 359.0, 45.0, 19.0 ], 152 | "numinlets" : 2 153 | } 154 | 155 | } 156 | , { 157 | "box" : { 158 | "maxclass" : "comment", 159 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 160 | "linecount" : 3, 161 | "fontsize" : 10.0, 162 | "numoutlets" : 0, 163 | "id" : "obj-12", 164 | "fontname" : "Verdana", 165 | "patching_rect" : [ 4.0, 471.0, 279.0, 43.0 ], 166 | "numinlets" : 1 167 | } 168 | 169 | } 170 | , { 171 | "box" : { 172 | "maxclass" : "comment", 173 | "text" : "sc.lfnoise2~", 174 | "fontsize" : 16.0, 175 | "numoutlets" : 0, 176 | "id" : "obj-7", 177 | "fontname" : "Arial", 178 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ], 179 | "fontface" : 3, 180 | "numinlets" : 1 181 | } 182 | 183 | } 184 | , { 185 | "box" : { 186 | "maxclass" : "ezdac~", 187 | "numoutlets" : 0, 188 | "id" : "obj-4", 189 | "patching_rect" : [ 9.0, 407.0, 45.0, 45.0 ], 190 | "numinlets" : 2 191 | } 192 | 193 | } 194 | , { 195 | "box" : { 196 | "maxclass" : "panel", 197 | "rounded" : 0, 198 | "numoutlets" : 0, 199 | "id" : "obj-10", 200 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 201 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 202 | "numinlets" : 1 203 | } 204 | 205 | } 206 | ], 207 | "lines" : [ { 208 | "patchline" : { 209 | "source" : [ "obj-16", 0 ], 210 | "destination" : [ "obj-3", 0 ], 211 | "hidden" : 0, 212 | "midpoints" : [ ] 213 | } 214 | 215 | } 216 | , { 217 | "patchline" : { 218 | "source" : [ "obj-3", 0 ], 219 | "destination" : [ "obj-1", 0 ], 220 | "hidden" : 0, 221 | "midpoints" : [ 17.5, 177.0, 54.0, 177.0, 97.0, 224.0, 124.0, 243.0, 147.0, 243.0, 166.0, 243.0, 185.0, 259.0, 118.0, 316.0, 128.0, 309.0, 121.0, 325.0, 121.0, 332.0, 149.0, 332.0, 168.0, 313.0, 181.0, 287.0, 219.0, 260.0, 230.0, 260.0, 230.0, 284.0 ] 222 | } 223 | 224 | } 225 | , { 226 | "patchline" : { 227 | "source" : [ "obj-3", 0 ], 228 | "destination" : [ "obj-8", 0 ], 229 | "hidden" : 0, 230 | "midpoints" : [ ] 231 | } 232 | 233 | } 234 | , { 235 | "patchline" : { 236 | "source" : [ "obj-2", 0 ], 237 | "destination" : [ "obj-4", 1 ], 238 | "hidden" : 0, 239 | "midpoints" : [ ] 240 | } 241 | 242 | } 243 | , { 244 | "patchline" : { 245 | "source" : [ "obj-2", 0 ], 246 | "destination" : [ "obj-4", 0 ], 247 | "hidden" : 0, 248 | "midpoints" : [ ] 249 | } 250 | 251 | } 252 | , { 253 | "patchline" : { 254 | "source" : [ "obj-17", 0 ], 255 | "destination" : [ "obj-16", 0 ], 256 | "hidden" : 0, 257 | "midpoints" : [ ] 258 | } 259 | 260 | } 261 | , { 262 | "patchline" : { 263 | "source" : [ "obj-13", 0 ], 264 | "destination" : [ "obj-2", 0 ], 265 | "hidden" : 0, 266 | "midpoints" : [ ] 267 | } 268 | 269 | } 270 | , { 271 | "patchline" : { 272 | "source" : [ "obj-11", 0 ], 273 | "destination" : [ "obj-13", 0 ], 274 | "hidden" : 0, 275 | "midpoints" : [ ] 276 | } 277 | 278 | } 279 | , { 280 | "patchline" : { 281 | "source" : [ "obj-8", 0 ], 282 | "destination" : [ "obj-11", 0 ], 283 | "hidden" : 0, 284 | "midpoints" : [ ] 285 | } 286 | 287 | } 288 | ] 289 | } 290 | 291 | } 292 | -------------------------------------------------------------------------------- /help/sc.logistic~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 122.0, 129.0, 938.0, 690.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 122.0, 129.0, 938.0, 690.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "comment", 24 | "text" : "dcblock", 25 | "fontname" : "Verdana", 26 | "numoutlets" : 0, 27 | "patching_rect" : [ 201.0, 247.0, 52.0, 19.0 ], 28 | "id" : "obj-20", 29 | "fontsize" : 10.0, 30 | "numinlets" : 1 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "comment", 37 | "text" : "freq", 38 | "fontname" : "Verdana", 39 | "numoutlets" : 0, 40 | "patching_rect" : [ 371.0, 138.0, 82.0, 19.0 ], 41 | "id" : "obj-15", 42 | "fontsize" : 10.0, 43 | "numinlets" : 1 44 | } 45 | 46 | } 47 | , { 48 | "box" : { 49 | "maxclass" : "comment", 50 | "text" : "chaos", 51 | "fontname" : "Verdana", 52 | "numoutlets" : 0, 53 | "patching_rect" : [ 259.0, 142.0, 82.0, 19.0 ], 54 | "id" : "obj-14", 55 | "fontsize" : 10.0, 56 | "numinlets" : 1 57 | } 58 | 59 | } 60 | , { 61 | "box" : { 62 | "maxclass" : "newobj", 63 | "text" : "p mouse_coords", 64 | "fontname" : "Verdana", 65 | "numoutlets" : 2, 66 | "patching_rect" : [ 251.0, 118.0, 128.0, 19.0 ], 67 | "outlettype" : [ "", "" ], 68 | "id" : "obj-38", 69 | "fontsize" : 10.0, 70 | "numinlets" : 0, 71 | "patcher" : { 72 | "fileversion" : 1, 73 | "rect" : [ 0.0, 0.0, 640.0, 480.0 ], 74 | "bglocked" : 0, 75 | "defrect" : [ 0.0, 0.0, 640.0, 480.0 ], 76 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 77 | "openinpresentation" : 0, 78 | "default_fontsize" : 12.0, 79 | "default_fontface" : 0, 80 | "default_fontname" : "Arial", 81 | "gridonopen" : 0, 82 | "gridsize" : [ 10.0, 10.0 ], 83 | "gridsnaponopen" : 0, 84 | "toolbarvisible" : 1, 85 | "boxanimatetime" : 200, 86 | "imprint" : 0, 87 | "enablehscroll" : 1, 88 | "enablevscroll" : 1, 89 | "devicewidth" : 0.0, 90 | "boxes" : [ { 91 | "box" : { 92 | "maxclass" : "newobj", 93 | "text" : "scale 0 900 10. 10000. 1.01", 94 | "fontname" : "Verdana", 95 | "numoutlets" : 1, 96 | "patching_rect" : [ 280.0, 247.0, 153.0, 19.0 ], 97 | "outlettype" : [ "" ], 98 | "id" : "obj-27", 99 | "fontsize" : 10.0, 100 | "numinlets" : 6 101 | } 102 | 103 | } 104 | , { 105 | "box" : { 106 | "maxclass" : "newobj", 107 | "text" : "unpack 0 0 0 0", 108 | "fontname" : "Verdana", 109 | "numoutlets" : 4, 110 | "patching_rect" : [ 267.0, 185.0, 86.0, 19.0 ], 111 | "outlettype" : [ "int", "int", "int", "int" ], 112 | "id" : "obj-26", 113 | "fontsize" : 10.0, 114 | "numinlets" : 1 115 | } 116 | 117 | } 118 | , { 119 | "box" : { 120 | "maxclass" : "newobj", 121 | "text" : "scale 0 1440 3. 3.99", 122 | "fontname" : "Verdana", 123 | "numoutlets" : 1, 124 | "patching_rect" : [ 86.0, 245.0, 114.0, 19.0 ], 125 | "outlettype" : [ "" ], 126 | "id" : "obj-25", 127 | "fontsize" : 10.0, 128 | "numinlets" : 6 129 | } 130 | 131 | } 132 | , { 133 | "box" : { 134 | "maxclass" : "newobj", 135 | "text" : "loadbang", 136 | "fontname" : "Verdana", 137 | "numoutlets" : 1, 138 | "patching_rect" : [ 267.0, 109.0, 56.0, 19.0 ], 139 | "outlettype" : [ "bang" ], 140 | "id" : "obj-24", 141 | "fontsize" : 10.0, 142 | "numinlets" : 1 143 | } 144 | 145 | } 146 | , { 147 | "box" : { 148 | "maxclass" : "newobj", 149 | "text" : "screensize", 150 | "fontname" : "Verdana", 151 | "numoutlets" : 2, 152 | "patching_rect" : [ 267.0, 142.0, 63.0, 19.0 ], 153 | "outlettype" : [ "list", "list" ], 154 | "id" : "obj-23", 155 | "fontsize" : 10.0, 156 | "numinlets" : 1 157 | } 158 | 159 | } 160 | , { 161 | "box" : { 162 | "maxclass" : "number", 163 | "fontname" : "Verdana", 164 | "numoutlets" : 2, 165 | "patching_rect" : [ 122.0, 201.0, 50.0, 19.0 ], 166 | "outlettype" : [ "int", "bang" ], 167 | "id" : "obj-22", 168 | "fontsize" : 10.0, 169 | "numinlets" : 1 170 | } 171 | 172 | } 173 | , { 174 | "box" : { 175 | "maxclass" : "number", 176 | "fontname" : "Verdana", 177 | "numoutlets" : 2, 178 | "patching_rect" : [ 86.0, 181.0, 50.0, 19.0 ], 179 | "outlettype" : [ "int", "bang" ], 180 | "id" : "obj-20", 181 | "fontsize" : 10.0, 182 | "numinlets" : 1 183 | } 184 | 185 | } 186 | , { 187 | "box" : { 188 | "maxclass" : "newobj", 189 | "text" : "metro 2 @active 1", 190 | "fontname" : "Verdana", 191 | "numoutlets" : 1, 192 | "patching_rect" : [ 50.0, 100.0, 103.0, 19.0 ], 193 | "outlettype" : [ "bang" ], 194 | "id" : "obj-13", 195 | "fontsize" : 10.0, 196 | "numinlets" : 2 197 | } 198 | 199 | } 200 | , { 201 | "box" : { 202 | "maxclass" : "newobj", 203 | "text" : "mousestate", 204 | "fontname" : "Verdana", 205 | "numoutlets" : 5, 206 | "patching_rect" : [ 50.0, 128.0, 162.0, 19.0 ], 207 | "outlettype" : [ "int", "int", "int", "int", "int" ], 208 | "id" : "obj-11", 209 | "fontsize" : 10.0, 210 | "numinlets" : 1 211 | } 212 | 213 | } 214 | , { 215 | "box" : { 216 | "maxclass" : "outlet", 217 | "numoutlets" : 0, 218 | "patching_rect" : [ 86.0, 326.0, 25.0, 25.0 ], 219 | "id" : "obj-36", 220 | "numinlets" : 1, 221 | "comment" : "" 222 | } 223 | 224 | } 225 | , { 226 | "box" : { 227 | "maxclass" : "outlet", 228 | "numoutlets" : 0, 229 | "patching_rect" : [ 280.0, 326.0, 25.0, 25.0 ], 230 | "id" : "obj-37", 231 | "numinlets" : 1, 232 | "comment" : "" 233 | } 234 | 235 | } 236 | ], 237 | "lines" : [ { 238 | "patchline" : { 239 | "source" : [ "obj-13", 0 ], 240 | "destination" : [ "obj-11", 0 ], 241 | "hidden" : 0, 242 | "midpoints" : [ ] 243 | } 244 | 245 | } 246 | , { 247 | "patchline" : { 248 | "source" : [ "obj-11", 1 ], 249 | "destination" : [ "obj-20", 0 ], 250 | "hidden" : 0, 251 | "midpoints" : [ ] 252 | } 253 | 254 | } 255 | , { 256 | "patchline" : { 257 | "source" : [ "obj-11", 2 ], 258 | "destination" : [ "obj-22", 0 ], 259 | "hidden" : 0, 260 | "midpoints" : [ ] 261 | } 262 | 263 | } 264 | , { 265 | "patchline" : { 266 | "source" : [ "obj-24", 0 ], 267 | "destination" : [ "obj-23", 0 ], 268 | "hidden" : 0, 269 | "midpoints" : [ ] 270 | } 271 | 272 | } 273 | , { 274 | "patchline" : { 275 | "source" : [ "obj-20", 0 ], 276 | "destination" : [ "obj-25", 0 ], 277 | "hidden" : 0, 278 | "midpoints" : [ ] 279 | } 280 | 281 | } 282 | , { 283 | "patchline" : { 284 | "source" : [ "obj-23", 0 ], 285 | "destination" : [ "obj-26", 0 ], 286 | "hidden" : 0, 287 | "midpoints" : [ ] 288 | } 289 | 290 | } 291 | , { 292 | "patchline" : { 293 | "source" : [ "obj-26", 2 ], 294 | "destination" : [ "obj-25", 2 ], 295 | "hidden" : 0, 296 | "midpoints" : [ 321.166656, 233.0, 133.5, 233.0 ] 297 | } 298 | 299 | } 300 | , { 301 | "patchline" : { 302 | "source" : [ "obj-26", 3 ], 303 | "destination" : [ "obj-27", 2 ], 304 | "hidden" : 0, 305 | "midpoints" : [ ] 306 | } 307 | 308 | } 309 | , { 310 | "patchline" : { 311 | "source" : [ "obj-22", 0 ], 312 | "destination" : [ "obj-27", 0 ], 313 | "hidden" : 0, 314 | "midpoints" : [ 131.5, 233.0, 289.5, 233.0 ] 315 | } 316 | 317 | } 318 | , { 319 | "patchline" : { 320 | "source" : [ "obj-25", 0 ], 321 | "destination" : [ "obj-36", 0 ], 322 | "hidden" : 0, 323 | "midpoints" : [ ] 324 | } 325 | 326 | } 327 | , { 328 | "patchline" : { 329 | "source" : [ "obj-27", 0 ], 330 | "destination" : [ "obj-37", 0 ], 331 | "hidden" : 0, 332 | "midpoints" : [ ] 333 | } 334 | 335 | } 336 | ] 337 | } 338 | , 339 | "saved_object_attributes" : { 340 | "fontname" : "Arial", 341 | "default_fontsize" : 12.0, 342 | "fontface" : 0, 343 | "fontsize" : 12.0, 344 | "globalpatchername" : "", 345 | "default_fontface" : 0, 346 | "default_fontname" : "Arial" 347 | } 348 | 349 | } 350 | 351 | } 352 | , { 353 | "box" : { 354 | "maxclass" : "flonum", 355 | "fontname" : "Verdana", 356 | "numoutlets" : 2, 357 | "patching_rect" : [ 360.0, 160.0, 72.0, 19.0 ], 358 | "outlettype" : [ "float", "bang" ], 359 | "id" : "obj-35", 360 | "fontsize" : 10.0, 361 | "numinlets" : 1 362 | } 363 | 364 | } 365 | , { 366 | "box" : { 367 | "maxclass" : "flonum", 368 | "fontname" : "Verdana", 369 | "numoutlets" : 2, 370 | "patching_rect" : [ 251.0, 159.0, 55.0, 19.0 ], 371 | "outlettype" : [ "float", "bang" ], 372 | "id" : "obj-29", 373 | "fontsize" : 10.0, 374 | "numinlets" : 1 375 | } 376 | 377 | } 378 | , { 379 | "box" : { 380 | "maxclass" : "comment", 381 | "text" : "arg 1: chaos_param: a parameter of the chaotic function with useful values from 0.0 to 4.0. Chaos occurs from 3.57 up. Don't use values outside this range if you don't want the external to blow up.\n\narg 2: freq: Frequency of calculation; if over the sampling rate, this is clamped to the sampling rate ", 382 | "linecount" : 4, 383 | "fontname" : "Verdana", 384 | "numoutlets" : 0, 385 | "patching_rect" : [ 405.0, 186.0, 526.0, 55.0 ], 386 | "id" : "obj-6", 387 | "fontsize" : 10.0, 388 | "numinlets" : 1 389 | } 390 | 391 | } 392 | , { 393 | "box" : { 394 | "maxclass" : "scope~", 395 | "numoutlets" : 0, 396 | "patching_rect" : [ 356.0, 349.0, 384.0, 270.0 ], 397 | "id" : "obj-1", 398 | "numinlets" : 2 399 | } 400 | 401 | } 402 | , { 403 | "box" : { 404 | "maxclass" : "newobj", 405 | "text" : "sc.logistic~ 3.56 2000", 406 | "fontname" : "Verdana", 407 | "numoutlets" : 1, 408 | "patching_rect" : [ 251.0, 211.0, 128.0, 19.0 ], 409 | "outlettype" : [ "signal" ], 410 | "id" : "obj-3", 411 | "fontsize" : 10.0, 412 | "numinlets" : 2 413 | } 414 | 415 | } 416 | , { 417 | "box" : { 418 | "maxclass" : "newobj", 419 | "text" : "*~ 0.2", 420 | "fontname" : "Verdana", 421 | "numoutlets" : 1, 422 | "patching_rect" : [ 251.0, 280.0, 50.0, 19.0 ], 423 | "outlettype" : [ "signal" ], 424 | "id" : "obj-2", 425 | "fontsize" : 10.0, 426 | "numinlets" : 2 427 | } 428 | 429 | } 430 | , { 431 | "box" : { 432 | "maxclass" : "comment", 433 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 434 | "linecount" : 3, 435 | "fontname" : "Verdana", 436 | "numoutlets" : 0, 437 | "patching_rect" : [ 5.0, 458.0, 284.0, 43.0 ], 438 | "id" : "obj-12", 439 | "fontsize" : 10.0, 440 | "numinlets" : 1 441 | } 442 | 443 | } 444 | , { 445 | "box" : { 446 | "maxclass" : "comment", 447 | "text" : "Chaotic noise function.\nA noise generator based on the logistic map:\n\ny = chaosParam * y * (1.0 - y)", 448 | "linecount" : 4, 449 | "fontname" : "Verdana", 450 | "numoutlets" : 0, 451 | "patching_rect" : [ 7.0, 42.0, 242.0, 55.0 ], 452 | "id" : "obj-9", 453 | "fontsize" : 10.0, 454 | "numinlets" : 1 455 | } 456 | 457 | } 458 | , { 459 | "box" : { 460 | "maxclass" : "comment", 461 | "text" : "sc.logistic~", 462 | "fontname" : "Verdana", 463 | "numoutlets" : 0, 464 | "patching_rect" : [ 11.0, 11.0, 136.0, 24.0 ], 465 | "id" : "obj-7", 466 | "fontface" : 3, 467 | "fontsize" : 14.0, 468 | "numinlets" : 1 469 | } 470 | 471 | } 472 | , { 473 | "box" : { 474 | "maxclass" : "ezdac~", 475 | "numoutlets" : 0, 476 | "patching_rect" : [ 251.0, 330.0, 45.0, 45.0 ], 477 | "id" : "obj-4", 478 | "numinlets" : 2 479 | } 480 | 481 | } 482 | , { 483 | "box" : { 484 | "maxclass" : "panel", 485 | "numoutlets" : 0, 486 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 487 | "id" : "obj-10", 488 | "rounded" : 0, 489 | "numinlets" : 1, 490 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ] 491 | } 492 | 493 | } 494 | , { 495 | "box" : { 496 | "maxclass" : "newobj", 497 | "text" : "biquad~ 1. -1. 0. -0.9997 0.", 498 | "fontname" : "Verdana", 499 | "numoutlets" : 1, 500 | "patching_rect" : [ 251.0, 247.0, 161.0, 19.0 ], 501 | "outlettype" : [ "signal" ], 502 | "id" : "obj-18", 503 | "fontsize" : 10.0, 504 | "numinlets" : 6 505 | } 506 | 507 | } 508 | ], 509 | "lines" : [ { 510 | "patchline" : { 511 | "source" : [ "obj-3", 0 ], 512 | "destination" : [ "obj-18", 0 ], 513 | "hidden" : 0, 514 | "midpoints" : [ ] 515 | } 516 | 517 | } 518 | , { 519 | "patchline" : { 520 | "source" : [ "obj-18", 0 ], 521 | "destination" : [ "obj-1", 0 ], 522 | "hidden" : 0, 523 | "midpoints" : [ 260.5, 272.0, 365.5, 272.0 ] 524 | } 525 | 526 | } 527 | , { 528 | "patchline" : { 529 | "source" : [ "obj-18", 0 ], 530 | "destination" : [ "obj-2", 0 ], 531 | "hidden" : 0, 532 | "midpoints" : [ ] 533 | } 534 | 535 | } 536 | , { 537 | "patchline" : { 538 | "source" : [ "obj-35", 0 ], 539 | "destination" : [ "obj-3", 1 ], 540 | "hidden" : 0, 541 | "midpoints" : [ ] 542 | } 543 | 544 | } 545 | , { 546 | "patchline" : { 547 | "source" : [ "obj-29", 0 ], 548 | "destination" : [ "obj-3", 0 ], 549 | "hidden" : 0, 550 | "midpoints" : [ ] 551 | } 552 | 553 | } 554 | , { 555 | "patchline" : { 556 | "source" : [ "obj-38", 0 ], 557 | "destination" : [ "obj-29", 0 ], 558 | "hidden" : 0, 559 | "midpoints" : [ ] 560 | } 561 | 562 | } 563 | , { 564 | "patchline" : { 565 | "source" : [ "obj-38", 1 ], 566 | "destination" : [ "obj-35", 0 ], 567 | "hidden" : 0, 568 | "midpoints" : [ ] 569 | } 570 | 571 | } 572 | , { 573 | "patchline" : { 574 | "source" : [ "obj-2", 0 ], 575 | "destination" : [ "obj-4", 0 ], 576 | "hidden" : 0, 577 | "midpoints" : [ ] 578 | } 579 | 580 | } 581 | , { 582 | "patchline" : { 583 | "source" : [ "obj-2", 0 ], 584 | "destination" : [ "obj-4", 1 ], 585 | "hidden" : 0, 586 | "midpoints" : [ ] 587 | } 588 | 589 | } 590 | ] 591 | } 592 | 593 | } 594 | -------------------------------------------------------------------------------- /help/sc.mantissamask~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 141.0, 186.0, 629.0, 517.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 141.0, 186.0, 629.0, 517.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "number", 24 | "id" : "obj-16", 25 | "fontsize" : 10.0, 26 | "numinlets" : 1, 27 | "patching_rect" : [ 129.0, 173.0, 50.0, 19.0 ], 28 | "numoutlets" : 2, 29 | "outlettype" : [ "int", "bang" ], 30 | "fontname" : "Verdana" 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "newobj", 37 | "text" : "cycle~", 38 | "id" : "obj-13", 39 | "fontsize" : 10.0, 40 | "numinlets" : 2, 41 | "patching_rect" : [ 33.0, 186.0, 44.0, 19.0 ], 42 | "numoutlets" : 1, 43 | "outlettype" : [ "signal" ], 44 | "fontname" : "Verdana" 45 | } 46 | 47 | } 48 | , { 49 | "box" : { 50 | "maxclass" : "newobj", 51 | "text" : "+~ 500", 52 | "id" : "obj-11", 53 | "fontsize" : 10.0, 54 | "numinlets" : 2, 55 | "patching_rect" : [ 33.0, 154.0, 49.0, 19.0 ], 56 | "numoutlets" : 1, 57 | "outlettype" : [ "signal" ], 58 | "fontname" : "Verdana" 59 | } 60 | 61 | } 62 | , { 63 | "box" : { 64 | "maxclass" : "newobj", 65 | "text" : "*~ 400", 66 | "id" : "obj-8", 67 | "fontsize" : 10.0, 68 | "numinlets" : 2, 69 | "patching_rect" : [ 33.0, 129.0, 48.0, 19.0 ], 70 | "numoutlets" : 1, 71 | "outlettype" : [ "signal" ], 72 | "fontname" : "Verdana" 73 | } 74 | 75 | } 76 | , { 77 | "box" : { 78 | "maxclass" : "newobj", 79 | "text" : "cycle~ 0.2", 80 | "id" : "obj-5", 81 | "fontsize" : 10.0, 82 | "numinlets" : 2, 83 | "patching_rect" : [ 33.0, 104.0, 64.0, 19.0 ], 84 | "numoutlets" : 1, 85 | "outlettype" : [ "signal" ], 86 | "fontname" : "Verdana" 87 | } 88 | 89 | } 90 | , { 91 | "box" : { 92 | "maxclass" : "comment", 93 | "text" : "arg bits (required) - the number of mantissa bits to preserve. a number from 0 to 23.", 94 | "linecount" : 2, 95 | "id" : "obj-6", 96 | "fontsize" : 10.0, 97 | "numinlets" : 1, 98 | "patching_rect" : [ 159.0, 217.0, 415.0, 31.0 ], 99 | "numoutlets" : 0, 100 | "fontname" : "Verdana" 101 | } 102 | 103 | } 104 | , { 105 | "box" : { 106 | "maxclass" : "newobj", 107 | "text" : "sc.mantissamask~ 3", 108 | "id" : "obj-3", 109 | "fontsize" : 10.0, 110 | "numinlets" : 2, 111 | "patching_rect" : [ 33.0, 218.0, 115.0, 19.0 ], 112 | "numoutlets" : 1, 113 | "outlettype" : [ "signal" ], 114 | "fontname" : "Verdana" 115 | } 116 | 117 | } 118 | , { 119 | "box" : { 120 | "maxclass" : "newobj", 121 | "text" : "*~ 0.2", 122 | "id" : "obj-2", 123 | "fontsize" : 10.0, 124 | "numinlets" : 2, 125 | "patching_rect" : [ 33.0, 305.0, 45.0, 19.0 ], 126 | "numoutlets" : 1, 127 | "outlettype" : [ "signal" ], 128 | "fontname" : "Verdana" 129 | } 130 | 131 | } 132 | , { 133 | "box" : { 134 | "maxclass" : "comment", 135 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 136 | "linecount" : 3, 137 | "id" : "obj-12", 138 | "fontsize" : 10.0, 139 | "numinlets" : 1, 140 | "patching_rect" : [ 5.0, 458.0, 279.0, 43.0 ], 141 | "numoutlets" : 0, 142 | "fontname" : "Verdana" 143 | } 144 | 145 | } 146 | , { 147 | "box" : { 148 | "maxclass" : "comment", 149 | "text" : "Masks off bits in the mantissa of the floating point sample value. This introduces a quantization noise, but is less severe than linearly quantizing the signal.\n", 150 | "linecount" : 2, 151 | "id" : "obj-9", 152 | "fontsize" : 10.0, 153 | "numinlets" : 1, 154 | "patching_rect" : [ 9.0, 42.0, 583.0, 31.0 ], 155 | "numoutlets" : 0, 156 | "fontname" : "Verdana" 157 | } 158 | 159 | } 160 | , { 161 | "box" : { 162 | "maxclass" : "comment", 163 | "text" : "sc.mantissamask~", 164 | "fontface" : 3, 165 | "id" : "obj-7", 166 | "fontsize" : 16.0, 167 | "numinlets" : 1, 168 | "patching_rect" : [ 9.0, 11.0, 152.0, 25.0 ], 169 | "numoutlets" : 0, 170 | "fontname" : "Arial" 171 | } 172 | 173 | } 174 | , { 175 | "box" : { 176 | "maxclass" : "ezdac~", 177 | "id" : "obj-4", 178 | "numinlets" : 2, 179 | "patching_rect" : [ 33.0, 376.0, 45.0, 45.0 ], 180 | "numoutlets" : 0 181 | } 182 | 183 | } 184 | , { 185 | "box" : { 186 | "maxclass" : "panel", 187 | "id" : "obj-10", 188 | "numinlets" : 1, 189 | "patching_rect" : [ 9.0, 6.0, 156.0, 34.0 ], 190 | "rounded" : 0, 191 | "numoutlets" : 0, 192 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ] 193 | } 194 | 195 | } 196 | ], 197 | "lines" : [ { 198 | "patchline" : { 199 | "source" : [ "obj-16", 0 ], 200 | "destination" : [ "obj-3", 1 ], 201 | "hidden" : 0, 202 | "midpoints" : [ ] 203 | } 204 | 205 | } 206 | , { 207 | "patchline" : { 208 | "source" : [ "obj-13", 0 ], 209 | "destination" : [ "obj-3", 0 ], 210 | "hidden" : 0, 211 | "midpoints" : [ ] 212 | } 213 | 214 | } 215 | , { 216 | "patchline" : { 217 | "source" : [ "obj-3", 0 ], 218 | "destination" : [ "obj-2", 0 ], 219 | "hidden" : 0, 220 | "midpoints" : [ ] 221 | } 222 | 223 | } 224 | , { 225 | "patchline" : { 226 | "source" : [ "obj-2", 0 ], 227 | "destination" : [ "obj-4", 0 ], 228 | "hidden" : 0, 229 | "midpoints" : [ ] 230 | } 231 | 232 | } 233 | , { 234 | "patchline" : { 235 | "source" : [ "obj-2", 0 ], 236 | "destination" : [ "obj-4", 1 ], 237 | "hidden" : 0, 238 | "midpoints" : [ ] 239 | } 240 | 241 | } 242 | , { 243 | "patchline" : { 244 | "source" : [ "obj-5", 0 ], 245 | "destination" : [ "obj-8", 0 ], 246 | "hidden" : 0, 247 | "midpoints" : [ ] 248 | } 249 | 250 | } 251 | , { 252 | "patchline" : { 253 | "source" : [ "obj-8", 0 ], 254 | "destination" : [ "obj-11", 0 ], 255 | "hidden" : 0, 256 | "midpoints" : [ ] 257 | } 258 | 259 | } 260 | , { 261 | "patchline" : { 262 | "source" : [ "obj-11", 0 ], 263 | "destination" : [ "obj-13", 0 ], 264 | "hidden" : 0, 265 | "midpoints" : [ ] 266 | } 267 | 268 | } 269 | ] 270 | } 271 | 272 | } 273 | -------------------------------------------------------------------------------- /help/sc.pinknoise~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 359.0, 255.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 359.0, 255.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "scope~", 24 | "patching_rect" : [ 339.0, 218.0, 384.0, 270.0 ], 25 | "id" : "obj-1", 26 | "numinlets" : 2, 27 | "numoutlets" : 0 28 | } 29 | 30 | } 31 | , { 32 | "box" : { 33 | "maxclass" : "newobj", 34 | "text" : "sc.pinknoise~", 35 | "patching_rect" : [ 249.0, 162.0, 80.0, 19.0 ], 36 | "id" : "obj-3", 37 | "fontname" : "Verdana", 38 | "numinlets" : 1, 39 | "numoutlets" : 1, 40 | "outlettype" : [ "signal" ], 41 | "fontsize" : 10.0 42 | } 43 | 44 | } 45 | , { 46 | "box" : { 47 | "maxclass" : "newobj", 48 | "text" : "*~ 0.2", 49 | "patching_rect" : [ 249.0, 249.0, 45.0, 19.0 ], 50 | "id" : "obj-2", 51 | "fontname" : "Verdana", 52 | "numinlets" : 2, 53 | "numoutlets" : 1, 54 | "outlettype" : [ "signal" ], 55 | "fontsize" : 10.0 56 | } 57 | 58 | } 59 | , { 60 | "box" : { 61 | "maxclass" : "comment", 62 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 63 | "linecount" : 3, 64 | "patching_rect" : [ 5.0, 458.0, 279.0, 43.0 ], 65 | "id" : "obj-12", 66 | "fontname" : "Verdana", 67 | "numinlets" : 1, 68 | "numoutlets" : 0, 69 | "fontsize" : 10.0 70 | } 71 | 72 | } 73 | , { 74 | "box" : { 75 | "maxclass" : "comment", 76 | "text" : "Generates noise whose spectrum falls off in power by 3 dB per octave.\nThis gives equal power over the span of each octave.\nThis version gives 8 octaves of pink noise.", 77 | "linecount" : 3, 78 | "patching_rect" : [ 9.0, 42.0, 369.0, 43.0 ], 79 | "id" : "obj-9", 80 | "fontname" : "Verdana", 81 | "numinlets" : 1, 82 | "numoutlets" : 0, 83 | "fontsize" : 10.0 84 | } 85 | 86 | } 87 | , { 88 | "box" : { 89 | "maxclass" : "comment", 90 | "text" : "sc.pinknoise~", 91 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ], 92 | "id" : "obj-7", 93 | "fontname" : "Arial", 94 | "numinlets" : 1, 95 | "numoutlets" : 0, 96 | "fontface" : 3, 97 | "fontsize" : 16.0 98 | } 99 | 100 | } 101 | , { 102 | "box" : { 103 | "maxclass" : "ezdac~", 104 | "patching_rect" : [ 249.0, 320.0, 45.0, 45.0 ], 105 | "id" : "obj-4", 106 | "numinlets" : 2, 107 | "numoutlets" : 0 108 | } 109 | 110 | } 111 | , { 112 | "box" : { 113 | "maxclass" : "panel", 114 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 115 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 116 | "id" : "obj-10", 117 | "numinlets" : 1, 118 | "rounded" : 0, 119 | "numoutlets" : 0 120 | } 121 | 122 | } 123 | ], 124 | "lines" : [ { 125 | "patchline" : { 126 | "source" : [ "obj-3", 0 ], 127 | "destination" : [ "obj-2", 0 ], 128 | "hidden" : 0, 129 | "midpoints" : [ ] 130 | } 131 | 132 | } 133 | , { 134 | "patchline" : { 135 | "source" : [ "obj-3", 0 ], 136 | "destination" : [ "obj-1", 0 ], 137 | "hidden" : 0, 138 | "midpoints" : [ ] 139 | } 140 | 141 | } 142 | , { 143 | "patchline" : { 144 | "source" : [ "obj-2", 0 ], 145 | "destination" : [ "obj-4", 0 ], 146 | "hidden" : 0, 147 | "midpoints" : [ ] 148 | } 149 | 150 | } 151 | , { 152 | "patchline" : { 153 | "source" : [ "obj-2", 0 ], 154 | "destination" : [ "obj-4", 1 ], 155 | "hidden" : 0, 156 | "midpoints" : [ ] 157 | } 158 | 159 | } 160 | ] 161 | } 162 | 163 | } 164 | -------------------------------------------------------------------------------- /help/sc.range~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 496.0, 192.0, 505.0, 448.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 496.0, 192.0, 505.0, 448.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "newobj", 24 | "text" : "dac~", 25 | "fontname" : "Verdana", 26 | "patching_rect" : [ 84.0, 304.0, 36.0, 19.0 ], 27 | "id" : "obj-13", 28 | "numinlets" : 2, 29 | "fontsize" : 10.0, 30 | "numoutlets" : 0 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "newobj", 37 | "text" : "*~ 0.2", 38 | "outlettype" : [ "signal" ], 39 | "fontname" : "Verdana", 40 | "patching_rect" : [ 84.0, 265.0, 45.0, 19.0 ], 41 | "id" : "obj-11", 42 | "numinlets" : 2, 43 | "fontsize" : 10.0, 44 | "numoutlets" : 1 45 | } 46 | 47 | } 48 | , { 49 | "box" : { 50 | "maxclass" : "newobj", 51 | "text" : "cycle~ 440", 52 | "outlettype" : [ "signal" ], 53 | "fontname" : "Verdana", 54 | "patching_rect" : [ 84.0, 240.0, 66.0, 19.0 ], 55 | "id" : "obj-5", 56 | "numinlets" : 2, 57 | "fontsize" : 10.0, 58 | "numoutlets" : 1 59 | } 60 | 61 | } 62 | , { 63 | "box" : { 64 | "maxclass" : "flonum", 65 | "outlettype" : [ "float", "bang" ], 66 | "fontname" : "Verdana", 67 | "patching_rect" : [ 90.0, 137.0, 50.0, 19.0 ], 68 | "id" : "obj-8", 69 | "numinlets" : 1, 70 | "fontsize" : 10.0, 71 | "numoutlets" : 2 72 | } 73 | 74 | } 75 | , { 76 | "box" : { 77 | "maxclass" : "flonum", 78 | "outlettype" : [ "float", "bang" ], 79 | "fontname" : "Verdana", 80 | "patching_rect" : [ 36.0, 137.0, 50.0, 19.0 ], 81 | "id" : "obj-6", 82 | "numinlets" : 1, 83 | "fontsize" : 10.0, 84 | "numoutlets" : 2 85 | } 86 | 87 | } 88 | , { 89 | "box" : { 90 | "maxclass" : "number~", 91 | "outlettype" : [ "signal", "float" ], 92 | "sig" : 0.0, 93 | "fontname" : "Verdana", 94 | "patching_rect" : [ 14.0, 272.0, 56.0, 19.0 ], 95 | "id" : "obj-17", 96 | "interval" : 20.0, 97 | "numinlets" : 2, 98 | "fontsize" : 10.0, 99 | "mode" : 2, 100 | "numoutlets" : 2 101 | } 102 | 103 | } 104 | , { 105 | "box" : { 106 | "maxclass" : "comment", 107 | "text" : "default mode is bipolar", 108 | "fontname" : "Verdana", 109 | "patching_rect" : [ 76.0, 88.0, 126.0, 19.0 ], 110 | "id" : "obj-18", 111 | "numinlets" : 1, 112 | "fontsize" : 10.0, 113 | "numoutlets" : 0 114 | } 115 | 116 | } 117 | , { 118 | "box" : { 119 | "maxclass" : "newobj", 120 | "text" : "cycle~ 0.1", 121 | "outlettype" : [ "signal" ], 122 | "fontname" : "Verdana", 123 | "patching_rect" : [ 14.0, 88.0, 64.0, 19.0 ], 124 | "id" : "obj-19", 125 | "numinlets" : 2, 126 | "fontsize" : 10.0, 127 | "numoutlets" : 1 128 | } 129 | 130 | } 131 | , { 132 | "box" : { 133 | "maxclass" : "newobj", 134 | "text" : "sc.range~ @low 74 @high 666", 135 | "outlettype" : [ "signal" ], 136 | "fontname" : "Verdana", 137 | "patching_rect" : [ 14.0, 197.0, 166.0, 19.0 ], 138 | "id" : "obj-20", 139 | "numinlets" : 1, 140 | "fontsize" : 10.0, 141 | "numoutlets" : 1 142 | } 143 | 144 | } 145 | , { 146 | "box" : { 147 | "maxclass" : "ezdac~", 148 | "patching_rect" : [ 296.0, 365.0, 45.0, 45.0 ], 149 | "id" : "obj-16", 150 | "numinlets" : 2, 151 | "numoutlets" : 0 152 | } 153 | 154 | } 155 | , { 156 | "box" : { 157 | "maxclass" : "number~", 158 | "outlettype" : [ "signal", "float" ], 159 | "sig" : 0.0, 160 | "fontname" : "Verdana", 161 | "patching_rect" : [ 220.0, 273.0, 56.0, 19.0 ], 162 | "id" : "obj-15", 163 | "interval" : 20.0, 164 | "numinlets" : 2, 165 | "fontsize" : 10.0, 166 | "mode" : 2, 167 | "numoutlets" : 2 168 | } 169 | 170 | } 171 | , { 172 | "box" : { 173 | "maxclass" : "comment", 174 | "text" : "phasor has output 0-1 so we use the polar mode", 175 | "linecount" : 2, 176 | "fontname" : "Verdana", 177 | "patching_rect" : [ 296.0, 88.0, 150.0, 31.0 ], 178 | "id" : "obj-14", 179 | "numinlets" : 1, 180 | "fontsize" : 10.0, 181 | "numoutlets" : 0 182 | } 183 | 184 | } 185 | , { 186 | "box" : { 187 | "maxclass" : "newobj", 188 | "text" : "phasor~ 0.2", 189 | "outlettype" : [ "signal" ], 190 | "fontname" : "Verdana", 191 | "patching_rect" : [ 220.0, 89.0, 73.0, 19.0 ], 192 | "id" : "obj-1", 193 | "numinlets" : 2, 194 | "fontsize" : 10.0, 195 | "numoutlets" : 1 196 | } 197 | 198 | } 199 | , { 200 | "box" : { 201 | "maxclass" : "newobj", 202 | "text" : "sc.range~ @low 20 @high 99 @mode 1", 203 | "outlettype" : [ "signal" ], 204 | "fontname" : "Verdana", 205 | "patching_rect" : [ 220.0, 198.0, 211.0, 19.0 ], 206 | "id" : "obj-3", 207 | "numinlets" : 1, 208 | "fontsize" : 10.0, 209 | "numoutlets" : 1 210 | } 211 | 212 | } 213 | , { 214 | "box" : { 215 | "maxclass" : "comment", 216 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 217 | "linecount" : 3, 218 | "fontname" : "Verdana", 219 | "patching_rect" : [ 12.0, 367.0, 279.0, 43.0 ], 220 | "id" : "obj-12", 221 | "numinlets" : 1, 222 | "fontsize" : 10.0, 223 | "numoutlets" : 0 224 | } 225 | 226 | } 227 | , { 228 | "box" : { 229 | "maxclass" : "comment", 230 | "text" : " Not really a SC Ugen. A convenience to scale a signal to determined values.\n Scaling can be for polar (0 - 1) or bipolar (-1 - 1) values.\n", 231 | "linecount" : 2, 232 | "fontname" : "Verdana", 233 | "patching_rect" : [ 6.0, 44.0, 408.0, 31.0 ], 234 | "id" : "obj-9", 235 | "numinlets" : 1, 236 | "fontsize" : 10.0, 237 | "numoutlets" : 0 238 | } 239 | 240 | } 241 | , { 242 | "box" : { 243 | "maxclass" : "comment", 244 | "text" : "sc.range~", 245 | "fontname" : "Arial", 246 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ], 247 | "id" : "obj-7", 248 | "numinlets" : 1, 249 | "fontface" : 3, 250 | "fontsize" : 16.0, 251 | "numoutlets" : 0 252 | } 253 | 254 | } 255 | , { 256 | "box" : { 257 | "maxclass" : "panel", 258 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ], 259 | "id" : "obj-10", 260 | "rounded" : 0, 261 | "numinlets" : 1, 262 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 263 | "numoutlets" : 0 264 | } 265 | 266 | } 267 | , { 268 | "box" : { 269 | "maxclass" : "message", 270 | "text" : "low $1", 271 | "outlettype" : [ "" ], 272 | "fontname" : "Verdana", 273 | "patching_rect" : [ 36.0, 167.0, 50.0, 17.0 ], 274 | "id" : "obj-2", 275 | "numinlets" : 2, 276 | "fontsize" : 10.0, 277 | "numoutlets" : 1 278 | } 279 | 280 | } 281 | , { 282 | "box" : { 283 | "maxclass" : "message", 284 | "text" : "high $1", 285 | "outlettype" : [ "" ], 286 | "fontname" : "Verdana", 287 | "patching_rect" : [ 90.0, 167.0, 50.0, 17.0 ], 288 | "id" : "obj-4", 289 | "numinlets" : 2, 290 | "fontsize" : 10.0, 291 | "numoutlets" : 1 292 | } 293 | 294 | } 295 | ], 296 | "lines" : [ { 297 | "patchline" : { 298 | "source" : [ "obj-5", 0 ], 299 | "destination" : [ "obj-11", 0 ], 300 | "hidden" : 0, 301 | "midpoints" : [ ] 302 | } 303 | 304 | } 305 | , { 306 | "patchline" : { 307 | "source" : [ "obj-20", 0 ], 308 | "destination" : [ "obj-5", 0 ], 309 | "hidden" : 0, 310 | "midpoints" : [ ] 311 | } 312 | 313 | } 314 | , { 315 | "patchline" : { 316 | "source" : [ "obj-3", 0 ], 317 | "destination" : [ "obj-15", 0 ], 318 | "hidden" : 0, 319 | "midpoints" : [ ] 320 | } 321 | 322 | } 323 | , { 324 | "patchline" : { 325 | "source" : [ "obj-1", 0 ], 326 | "destination" : [ "obj-3", 0 ], 327 | "hidden" : 0, 328 | "midpoints" : [ ] 329 | } 330 | 331 | } 332 | , { 333 | "patchline" : { 334 | "source" : [ "obj-19", 0 ], 335 | "destination" : [ "obj-20", 0 ], 336 | "hidden" : 0, 337 | "midpoints" : [ ] 338 | } 339 | 340 | } 341 | , { 342 | "patchline" : { 343 | "source" : [ "obj-8", 0 ], 344 | "destination" : [ "obj-4", 0 ], 345 | "hidden" : 0, 346 | "midpoints" : [ ] 347 | } 348 | 349 | } 350 | , { 351 | "patchline" : { 352 | "source" : [ "obj-6", 0 ], 353 | "destination" : [ "obj-2", 0 ], 354 | "hidden" : 0, 355 | "midpoints" : [ ] 356 | } 357 | 358 | } 359 | , { 360 | "patchline" : { 361 | "source" : [ "obj-4", 0 ], 362 | "destination" : [ "obj-20", 0 ], 363 | "hidden" : 0, 364 | "midpoints" : [ ] 365 | } 366 | 367 | } 368 | , { 369 | "patchline" : { 370 | "source" : [ "obj-2", 0 ], 371 | "destination" : [ "obj-20", 0 ], 372 | "hidden" : 0, 373 | "midpoints" : [ ] 374 | } 375 | 376 | } 377 | , { 378 | "patchline" : { 379 | "source" : [ "obj-20", 0 ], 380 | "destination" : [ "obj-17", 0 ], 381 | "hidden" : 0, 382 | "midpoints" : [ ] 383 | } 384 | 385 | } 386 | , { 387 | "patchline" : { 388 | "source" : [ "obj-11", 0 ], 389 | "destination" : [ "obj-13", 0 ], 390 | "hidden" : 0, 391 | "midpoints" : [ ] 392 | } 393 | 394 | } 395 | , { 396 | "patchline" : { 397 | "source" : [ "obj-11", 0 ], 398 | "destination" : [ "obj-13", 1 ], 399 | "hidden" : 0, 400 | "midpoints" : [ ] 401 | } 402 | 403 | } 404 | ] 405 | } 406 | 407 | } 408 | -------------------------------------------------------------------------------- /help/sc.whitenoise~.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 230.0, 188.0, 864.0, 552.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 230.0, 188.0, 864.0, 552.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 10.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Verdana", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 5.0, 5.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "scope~", 24 | "numinlets" : 2, 25 | "numoutlets" : 0, 26 | "id" : "obj-1", 27 | "patching_rect" : [ 339.0, 218.0, 384.0, 270.0 ] 28 | } 29 | 30 | } 31 | , { 32 | "box" : { 33 | "maxclass" : "newobj", 34 | "text" : "sc.whitenoise~", 35 | "fontsize" : 10.0, 36 | "numinlets" : 1, 37 | "numoutlets" : 1, 38 | "outlettype" : [ "signal" ], 39 | "id" : "obj-3", 40 | "fontname" : "Verdana", 41 | "patching_rect" : [ 249.0, 162.0, 87.0, 19.0 ] 42 | } 43 | 44 | } 45 | , { 46 | "box" : { 47 | "maxclass" : "newobj", 48 | "text" : "*~ 0.2", 49 | "fontsize" : 10.0, 50 | "numinlets" : 2, 51 | "numoutlets" : 1, 52 | "outlettype" : [ "signal" ], 53 | "id" : "obj-2", 54 | "fontname" : "Verdana", 55 | "patching_rect" : [ 249.0, 249.0, 45.0, 19.0 ] 56 | } 57 | 58 | } 59 | , { 60 | "box" : { 61 | "maxclass" : "comment", 62 | "text" : "part of sc-max. http://github.com/sbl/sc-max\nport by stephen lumenta\nsupercollider is licensed under the GPL so is this.", 63 | "linecount" : 3, 64 | "fontsize" : 10.0, 65 | "numinlets" : 1, 66 | "numoutlets" : 0, 67 | "id" : "obj-12", 68 | "fontname" : "Verdana", 69 | "patching_rect" : [ 5.0, 458.0, 279.0, 43.0 ] 70 | } 71 | 72 | } 73 | , { 74 | "box" : { 75 | "maxclass" : "comment", 76 | "text" : "Generates noise whose spectrum has equal power at all frequencies.", 77 | "fontsize" : 10.0, 78 | "numinlets" : 1, 79 | "numoutlets" : 0, 80 | "id" : "obj-9", 81 | "fontname" : "Verdana", 82 | "patching_rect" : [ 9.0, 42.0, 357.0, 19.0 ] 83 | } 84 | 85 | } 86 | , { 87 | "box" : { 88 | "maxclass" : "comment", 89 | "text" : "sc.whitenoise~", 90 | "fontface" : 3, 91 | "fontsize" : 16.0, 92 | "numinlets" : 1, 93 | "numoutlets" : 0, 94 | "id" : "obj-7", 95 | "fontname" : "Arial", 96 | "patching_rect" : [ 9.0, 11.0, 125.0, 25.0 ] 97 | } 98 | 99 | } 100 | , { 101 | "box" : { 102 | "maxclass" : "ezdac~", 103 | "numinlets" : 2, 104 | "numoutlets" : 0, 105 | "id" : "obj-4", 106 | "patching_rect" : [ 249.0, 320.0, 45.0, 45.0 ] 107 | } 108 | 109 | } 110 | , { 111 | "box" : { 112 | "maxclass" : "panel", 113 | "rounded" : 0, 114 | "numinlets" : 1, 115 | "bgcolor" : [ 0.501961, 0.717647, 0.764706, 1.0 ], 116 | "numoutlets" : 0, 117 | "id" : "obj-10", 118 | "patching_rect" : [ 9.0, 6.0, 134.0, 34.0 ] 119 | } 120 | 121 | } 122 | ], 123 | "lines" : [ { 124 | "patchline" : { 125 | "source" : [ "obj-3", 0 ], 126 | "destination" : [ "obj-1", 0 ], 127 | "hidden" : 0, 128 | "midpoints" : [ ] 129 | } 130 | 131 | } 132 | , { 133 | "patchline" : { 134 | "source" : [ "obj-3", 0 ], 135 | "destination" : [ "obj-2", 0 ], 136 | "hidden" : 0, 137 | "midpoints" : [ ] 138 | } 139 | 140 | } 141 | , { 142 | "patchline" : { 143 | "source" : [ "obj-2", 0 ], 144 | "destination" : [ "obj-4", 1 ], 145 | "hidden" : 0, 146 | "midpoints" : [ ] 147 | } 148 | 149 | } 150 | , { 151 | "patchline" : { 152 | "source" : [ "obj-2", 0 ], 153 | "destination" : [ "obj-4", 0 ], 154 | "hidden" : 0, 155 | "midpoints" : [ ] 156 | } 157 | 158 | } 159 | ] 160 | } 161 | 162 | } 163 | -------------------------------------------------------------------------------- /package-info.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "author" : "Stephen Lumenta", 3 | "description" : "supercollider UGENs ported to max/msp.", 4 | "max_version_min" : "7.1", 5 | "name" : "sc-max", 6 | "os" : { 7 | "macintosh" : { 8 | "platform" : [ "ia32", "x64" ], 9 | "min_version" : "none" 10 | }, 11 | "windows" : { 12 | "platform" : [ "ia32", "x64" ], 13 | "min_version" : "none" 14 | } 15 | }, 16 | "package_extra" : { 17 | "reverse_domain" : "com.cycling74", 18 | "copyright" : "Copyright (c) 2016 Cycling '74" 19 | }, 20 | "tags" : [ ], 21 | "version" : "@GIT_VERSION_MAJ@.@GIT_VERSION_MIN@.@GIT_VERSION_SUB@", 22 | "website" : "https://github.com/sbl/sc-max" 23 | } 24 | -------------------------------------------------------------------------------- /source/include/scmax.h: -------------------------------------------------------------------------------- 1 | /* 2 | * scmax.h 3 | * (c) stephen lumenta under GPL 4 | * 5 | * http://www.gnu.org/licenses/gpl.html 6 | * part of sc-max http://github.com/sbl/sc-max 7 | * see README 8 | */ 9 | 10 | #ifndef SCMAX_H_XHP91X4G 11 | #define SCMAX_H_XHP91X4G 12 | 13 | #include "SC_Constants.h" 14 | #include "SC_RGen.h" 15 | 16 | 17 | // http://www.musicdsp.org/archive.php?classid=1#59 18 | unsigned long sc_randomSeed( void ) { 19 | static unsigned long randSeed = 22222; 20 | randSeed = (randSeed * 196314165) + 907633515; 21 | return randSeed; 22 | } 23 | 24 | // DSP loops 25 | 26 | #define ZXP(z) (*(z)++) 27 | 28 | #define sc_max(a,b) (((a) > (b)) ? (a) : (b)) 29 | #define sc_min(a,b) (((a) < (b)) ? (a) : (b)) 30 | 31 | #define RGET \ 32 | RGen& rgen = self->rgen; \ 33 | uint32 s1 = rgen.s1; \ 34 | uint32 s2 = rgen.s2; \ 35 | uint32 s3 = rgen.s3; 36 | #define RPUT \ 37 | rgen.s1 = s1; \ 38 | rgen.s2 = s2; \ 39 | rgen.s3 = s3; 40 | 41 | 42 | inline double zapgremlins(double x) { 43 | double absx = std::abs(x); 44 | // very small numbers fail the first test, eliminating denormalized numbers 45 | // (zero also fails the first test, but that is OK since it returns zero.) 46 | // very large numbers fail the second test, eliminating infinities 47 | // Not-a-Numbers fail both tests and are eliminated. 48 | return (absx > (double)1e-15 && absx < (double)1e15) ? x : (double)0.; 49 | } 50 | 51 | #endif -------------------------------------------------------------------------------- /source/projects/sc.brownnoise_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.brownnoise_tilde/sc.brownnoise_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | 23 | sc.brownnoise~ 24 | (c) stephen lumenta under GPL 25 | http://www.gnu.org/licenses/gpl.html 26 | 27 | part of sc-max http://github.com/sbl/sc-max 28 | see README 29 | */ 30 | 31 | #include "c74_msp.h" 32 | #include "scmax.h" 33 | 34 | using namespace c74::max; 35 | 36 | 37 | static t_class* this_class = nullptr; 38 | 39 | struct t_brownnoise { 40 | t_pxobject ob; 41 | double m_level; 42 | RGen rgen; 43 | }; 44 | 45 | void *brownnoise_new(long argc, t_atom *argv) { 46 | t_brownnoise *self = (t_brownnoise *)object_alloc(this_class); 47 | 48 | dsp_setup((t_pxobject *)self, 0); 49 | outlet_new((t_object *)self, "signal"); 50 | 51 | self->rgen.init(sc_randomSeed()); 52 | RGET 53 | self->m_level = frand2(s1, s2, s3); 54 | RPUT 55 | 56 | return self; 57 | } 58 | 59 | void brownnoise_perform64(t_brownnoise* self, 60 | t_object* dsp64, 61 | double** ins, 62 | long numins, 63 | double** outs, 64 | long numouts, 65 | long sampleframes, 66 | long flags, 67 | void* userparam) { 68 | double *out = outs[0]; 69 | long n = sampleframes; 70 | 71 | RGET 72 | 73 | float z = self->m_level; 74 | 75 | while (n--){ 76 | z += frand8(s1, s2, s3); 77 | if (z > 1.f) z = 2.f - z; 78 | else if (z < -1.f) z = -2.f - z; 79 | 80 | *out++ = z; 81 | } 82 | 83 | self->m_level = z; 84 | 85 | RPUT 86 | } 87 | 88 | void brownnoise_dsp64(t_brownnoise* self, 89 | t_object* dsp64, 90 | short* count, 91 | double samplerate, 92 | long maxvectorsize, 93 | long flags) { 94 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 95 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)brownnoise_perform64, 0, NULL); 96 | } 97 | 98 | void brownnoise_assist(t_brownnoise *self, void *unused, t_assist_function io, long index, char *string_dest) { 99 | if (io == ASSIST_INLET) { 100 | strncpy(string_dest, "Ignore this inlet", ASSIST_STRING_MAXSIZE); 101 | } 102 | else { // outlet 103 | strncpy(string_dest, "(signal) Brown Noise", ASSIST_STRING_MAXSIZE); 104 | } 105 | } 106 | 107 | void ext_main(void* r) { 108 | this_class = class_new("sc.brownnoise~", 109 | (method)brownnoise_new, 110 | (method)dsp_free, 111 | sizeof(t_brownnoise), 0, A_GIMME, 0); 112 | class_addmethod(this_class, (method)brownnoise_dsp64, "dsp64", A_CANT, 0); 113 | class_addmethod(this_class, (method)brownnoise_assist, "assist", A_CANT, 0); 114 | 115 | class_dspinit(this_class); 116 | class_register(CLASS_BOX, this_class); 117 | } 118 | -------------------------------------------------------------------------------- /source/projects/sc.clipnoise_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.clipnoise_tilde/sc.clipnoise_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | 23 | sc.clipnoise~ 24 | (c) stephen lumenta under GPL 25 | http://www.gnu.org/licenses/gpl.html 26 | 27 | part of sc-max http://github.com/sbl/sc-max 28 | see README 29 | */ 30 | 31 | #include "c74_msp.h" 32 | #include "scmax.h" 33 | 34 | using namespace c74::max; 35 | 36 | 37 | static t_class *this_class = nullptr; 38 | 39 | struct t_clipnoise { 40 | t_pxobject ob; 41 | RGen rgen; 42 | }; 43 | 44 | void *clipnoise_new(long argc, t_atom *argv) { 45 | t_clipnoise *self = (t_clipnoise *)object_alloc(this_class); 46 | 47 | dsp_setup((t_pxobject *)self, 0); 48 | outlet_new((t_object *)self, "signal"); 49 | self->rgen.init(sc_randomSeed()); 50 | 51 | return self; 52 | } 53 | 54 | void clipnoise_perform64(t_clipnoise* self, 55 | t_object* dsp64, 56 | double** ins, 57 | long numins, 58 | double** outs, 59 | long numouts, 60 | long sampleframes, 61 | long flags, 62 | void* userparam) { 63 | double *out = outs[0]; 64 | long n = sampleframes; 65 | 66 | RGET 67 | while (n--){ 68 | *out++ = fcoin(s1, s2, s3); 69 | } 70 | RPUT 71 | } 72 | 73 | void clipnoise_dsp64(t_clipnoise *self, 74 | t_object* dsp64, 75 | short* count, 76 | double samplerate, 77 | long maxvectorsize, 78 | long flags) { 79 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 80 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)clipnoise_perform64, 0, NULL); 81 | } 82 | 83 | void clipnoise_assist(t_clipnoise *self, void *b, long m, long a, char *s) { 84 | if (m == ASSIST_INLET) { //inlet 85 | sprintf(s, "Ignore this inlet"); 86 | } 87 | else { // outlet 88 | sprintf(s, "(signal) Clip Noise"); 89 | } 90 | } 91 | 92 | void ext_main(void* r) { 93 | this_class = class_new("sc.clipnoise~", (method)clipnoise_new, (method)dsp_free, (long)sizeof(t_clipnoise), 0L, A_GIMME, 0); 94 | 95 | class_addmethod(this_class, (method)clipnoise_dsp64, "dsp64", A_CANT, 0); 96 | class_addmethod(this_class, (method)clipnoise_assist, "assist", A_CANT, 0); 97 | 98 | class_dspinit(this_class); 99 | class_register(CLASS_BOX, this_class); 100 | } 101 | -------------------------------------------------------------------------------- /source/projects/sc.crackle_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.crackle_tilde/sc.crackle_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | 23 | sc.crackle~ 24 | (c) stephen lumenta under GPL 25 | http://www.gnu.org/licenses/gpl.html 26 | 27 | part of sc-max http://github.com/sbl/sc-max 28 | see README 29 | */ 30 | 31 | #include "c74_msp.h" 32 | 33 | using namespace c74::max; 34 | 35 | 36 | static t_class *crackle_class = nullptr; 37 | 38 | struct t_crackle { 39 | t_pxobject ob; 40 | short m_connected; 41 | 42 | double m_param; 43 | double m_y1; 44 | double m_y2; 45 | }; 46 | 47 | void *crackle_new(double param) { 48 | t_crackle *x = NULL; 49 | x = (t_crackle *)object_alloc(crackle_class); 50 | 51 | if (x) { 52 | dsp_setup((t_pxobject *)x, 1); 53 | outlet_new((t_object *)x, "signal"); 54 | 55 | x->m_param = param; 56 | x->m_y1 = 0.3f; 57 | x->m_y2 = 0.f; 58 | } else { 59 | object_free(x); 60 | } 61 | return (x); 62 | } 63 | 64 | void crackle_float(t_crackle *x, double param){ 65 | x->m_param = param; 66 | } 67 | 68 | void crackle_int(t_crackle *x, long param){ 69 | crackle_float(x, (double) param); 70 | } 71 | 72 | void crackle_perform64(t_crackle* x, 73 | t_object* dsp64, 74 | double** ins, 75 | long numins, 76 | double** outs, 77 | long numouts, 78 | long sampleframes, 79 | long flags, 80 | void* userparam) { 81 | 82 | double param = x->m_connected ? *ins[0] : x->m_param; 83 | double *out = outs[0]; 84 | int n = sampleframes; 85 | 86 | float y1 = x->m_y1; 87 | float y2 = x->m_y2; 88 | float y0; 89 | 90 | if (param < 0.f) param = 0.f; 91 | if (param > 2.f) param = 2.f; 92 | 93 | if (x->ob.z_disabled) return; 94 | 95 | while (n--){ 96 | *out++ = y0 = fabs(y1 * param - y2 - 0.05f); 97 | y2 = y1; y1 = y0; 98 | } 99 | 100 | x->m_y1 = y1; 101 | x->m_y2 = y2; 102 | } 103 | 104 | void crackle_dsp64(t_crackle *self, 105 | t_object* dsp64, 106 | short* count, 107 | double samplerate, 108 | long maxvectorsize, 109 | long flags) { 110 | self->m_connected = count[0]; 111 | 112 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 113 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)crackle_perform64, 0, NULL); 114 | } 115 | 116 | void crackle_assist(t_crackle *x, void *b, long m, long a, char *s) { 117 | if (m == ASSIST_INLET) { //inlet 118 | sprintf(s, "(signal/float) param"); 119 | } 120 | else { // outlet 121 | sprintf(s, "(signal) crackle"); 122 | } 123 | } 124 | 125 | void ext_main(void *r) { 126 | t_class *c; 127 | 128 | c = class_new("sc.crackle~", (method)crackle_new, (method)dsp_free, (long)sizeof(t_crackle), 0L, A_DEFFLOAT, 0); 129 | 130 | class_addmethod(c, (method)crackle_dsp64,"dsp64", A_CANT, 0); 131 | class_addmethod(c, (method)crackle_assist,"assist", A_CANT, 0); 132 | class_addmethod(c, (method)crackle_float, "float", A_FLOAT, 0); 133 | class_addmethod(c, (method)crackle_int, "int", A_LONG, 0); 134 | 135 | class_dspinit(c); 136 | class_register(CLASS_BOX, c); 137 | crackle_class = c; 138 | } 139 | -------------------------------------------------------------------------------- /source/projects/sc.dust2_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.dust2_tilde/sc.dust2_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | sc.dust2~ 23 | (c) stephen lumenta under GPL 24 | http://www.gnu.org/licenses/gpl.html 25 | 26 | part of sc-max http://github.com/sbl/sc-max 27 | see README 28 | */ 29 | 30 | #include "c74_msp.h" 31 | #include "scmax.h" 32 | 33 | using namespace c74::max; 34 | 35 | static t_class *dust2_class = nullptr; 36 | struct t_dust2 { 37 | t_pxobject m_ob; 38 | short m_connected; 39 | 40 | double m_density; 41 | double m_thresh; 42 | double m_scale; 43 | double m_sr; 44 | double m_isr; 45 | RGen rgen; 46 | }; 47 | 48 | void dust2_calc_density(t_dust2 *x) { 49 | x->m_thresh = x->m_density * x->m_isr; 50 | x->m_scale = x->m_thresh > 0.f ? 2.f / x->m_thresh : 0.f; 51 | } 52 | 53 | void *dust2_new(double density) { 54 | t_dust2 *x = NULL; 55 | x = (t_dust2 *)object_alloc(dust2_class); 56 | 57 | if (x) { 58 | dsp_setup((t_pxobject *)x, 1); 59 | outlet_new((t_object *)x, "signal"); 60 | 61 | x->rgen.init(sc_randomSeed()); 62 | x->m_density = density; 63 | 64 | x->m_sr = sys_getsr(); 65 | x->m_isr = 1/x->m_sr; 66 | x->m_scale = 0.; 67 | x->m_thresh = 0.; 68 | 69 | dust2_calc_density(x); 70 | } 71 | return (x); 72 | } 73 | 74 | void dust2_float(t_dust2 *x, double density) { 75 | x->m_density = density; 76 | dust2_calc_density(x); 77 | } 78 | 79 | void dust2_int(t_dust2 *x, long density) { 80 | dust2_float(x, (double) density); 81 | } 82 | 83 | void dust2_perform64(t_dust2* self, 84 | t_object* dsp64, 85 | double** ins, 86 | long numins, 87 | double** outs, 88 | long numouts, 89 | long sampleframes, 90 | long flags, 91 | void* userparam) { 92 | double density = self->m_connected ? *ins[0] : self->m_density; 93 | double *out = outs[0]; 94 | int n = sampleframes; 95 | 96 | if (self->m_ob.z_disabled) return; 97 | 98 | if (density != self->m_density) { 99 | self->m_density = density; 100 | dust2_calc_density(self); 101 | } 102 | 103 | RGET 104 | while (n--){ 105 | float z = frand(s1, s2, s3); 106 | 107 | if (z < self->m_thresh) *out++ = z * self->m_scale - 1.f; 108 | else *out++ = 0.f; 109 | } 110 | RPUT 111 | } 112 | 113 | void dust2_dsp64(t_dust2 *self, 114 | t_object* dsp64, 115 | short* count, 116 | double samplerate, 117 | long maxvectorsize, 118 | long flags) { 119 | self->m_connected = count[0]; 120 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 121 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)dust2_perform64, 0, NULL); 122 | } 123 | 124 | void dust2_assist(t_dust2 *x, void *b, long m, long a, char *s) { 125 | if (m == ASSIST_INLET) { //inlet 126 | sprintf(s, "(signal/float) density"); 127 | } 128 | else { // outlet 129 | sprintf(s, "(signal) dust2 out"); 130 | } 131 | } 132 | 133 | void ext_main(void *r) { 134 | t_class *c; 135 | c = class_new("sc.dust2~", (method)dust2_new, (method)dsp_free, (long)sizeof(t_dust2), 0L, A_DEFFLOAT, 0); 136 | 137 | class_addmethod(c, (method)dust2_dsp64, "dsp64", A_CANT, 0); 138 | class_addmethod(c, (method)dust2_assist, "assist", A_CANT, 0); 139 | class_addmethod(c, (method)dust2_float, "float", A_FLOAT, 0); 140 | class_addmethod(c, (method)dust2_int, "int", A_LONG, 0); 141 | 142 | class_dspinit(c); 143 | class_register(CLASS_BOX, c); 144 | dust2_class = c; 145 | } 146 | -------------------------------------------------------------------------------- /source/projects/sc.dust_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.dust_tilde/sc.dust_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | sc.dust~ 23 | (c) stephen lumenta under GPL 24 | http://www.gnu.org/licenses/gpl.html 25 | 26 | part of sc-max http://github.com/sbl/sc-max 27 | see README 28 | */ 29 | 30 | #include "c74_msp.h" 31 | #include "scmax.h" 32 | 33 | using namespace c74::max; 34 | 35 | 36 | static t_class *dust_class = nullptr; 37 | 38 | struct t_dust { 39 | t_pxobject m_ob; 40 | short m_connected; 41 | 42 | double m_density; 43 | double m_thresh; 44 | double m_scale; 45 | double m_sr; 46 | double m_isr; 47 | RGen rgen; 48 | }; 49 | 50 | void dust_calc_density(t_dust *x) { 51 | x->m_thresh = x->m_density * x->m_isr; 52 | x->m_scale = x->m_thresh > 0.f ? 1.f / x->m_thresh : 0.f; 53 | } 54 | 55 | void *dust_new(double density) { 56 | t_dust *self = (t_dust *)object_alloc(dust_class); 57 | 58 | dsp_setup((t_pxobject *)self, 1); 59 | outlet_new((t_object *)self, "signal"); 60 | 61 | self->rgen.init(sc_randomSeed()); 62 | self->m_density = density; 63 | 64 | self->m_sr = sys_getsr(); 65 | self->m_isr = 1/self->m_sr; 66 | self->m_scale = 0.; 67 | self->m_thresh = 0.; 68 | 69 | dust_calc_density(self); 70 | 71 | return self; 72 | } 73 | 74 | void dust_float(t_dust *x, double density) { 75 | x->m_density = density; 76 | dust_calc_density(x); 77 | } 78 | 79 | void dust_int(t_dust *x, long density) { 80 | dust_float(x, (double) density); 81 | } 82 | 83 | void dust_perform64(t_dust* self, 84 | t_object* dsp64, 85 | double** ins, 86 | long numins, 87 | double** outs, 88 | long numouts, 89 | long sampleframes, 90 | long flags, 91 | void* userparam) { 92 | double density = self->m_connected ? *ins[0] : self->m_density; 93 | double *out = outs[0]; 94 | int n = sampleframes; 95 | 96 | if (density != self->m_density) { 97 | self->m_density = density; 98 | dust_calc_density(self); 99 | } 100 | 101 | RGET 102 | while (n--){ 103 | float z = frand(s1, s2, s3); 104 | 105 | if (z < self->m_thresh) { 106 | *out++ = z * self->m_scale; 107 | } 108 | else { 109 | *out++ = 0.f; 110 | } 111 | } 112 | RPUT 113 | } 114 | 115 | void dust_dsp64(t_dust *self, 116 | t_object* dsp64, 117 | short* count, 118 | double samplerate, 119 | long maxvectorsize, 120 | long flags) { 121 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 122 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)dust_perform64, 0, NULL); 123 | } 124 | 125 | void dust_assist(t_dust *x, void *b, long m, long a, char *s) { 126 | if (m == ASSIST_INLET) { //inlet 127 | sprintf(s, "(signal/float) density"); 128 | } 129 | else { // outlet 130 | sprintf(s, "(signal) Dust"); 131 | } 132 | } 133 | 134 | void ext_main(void *r) { 135 | t_class *c; 136 | c = class_new("sc.dust~", 137 | (method)dust_new, 138 | (method)dsp_free, 139 | (long)sizeof(t_dust), 0, 140 | A_DEFFLOAT, 0); 141 | 142 | class_addmethod(c, (method)dust_dsp64, "dsp64", A_CANT, 0); 143 | class_addmethod(c, (method)dust_assist, "assist", A_CANT, 0); 144 | class_addmethod(c, (method)dust_float, "float", A_FLOAT, 0); 145 | class_addmethod(c, (method)dust_int, "int", A_LONG, 0); 146 | 147 | class_dspinit(c); 148 | class_register(CLASS_BOX, c); 149 | dust_class = c; 150 | } 151 | -------------------------------------------------------------------------------- /source/projects/sc.gendy1_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.gendy1_tilde/sc.gendy1_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | */ 21 | 22 | /* 23 | 24 | Gendyn SuperColluder UGens implemented by Nick Collins (sicklincoln.org) 25 | Most of the comments are from his original c++ code 26 | 27 | */ 28 | 29 | /* 30 | sc.gendy1~ 31 | (c) stephen lumenta under GPL 32 | http://www.gnu.org/licenses/gpl.html 33 | 34 | part of sc-max http://github.com/sbl/sc-max 35 | see README 36 | */ 37 | 38 | #include "c74_msp.h" 39 | #include "scmax.h" 40 | 41 | using namespace c74::max; 42 | 43 | #define CONTROL_POINTS 12; 44 | 45 | static t_class *gendy_class = nullptr; 46 | 47 | // Iannis Xenakis/Marie-Helene Serra GENDYN simulation 48 | struct t_gendy { 49 | t_pxobject ob; 50 | 51 | // these are set from the outside 52 | long g_ampdist, g_durdist; 53 | double g_adparam, g_ddparam; 54 | double g_minfreq, g_maxfreq; 55 | double g_ampscale, g_durscale; 56 | int g_cps, g_knum; // defaults to 12 57 | 58 | double mPhase; 59 | double mFreqMul, mAmp, mNextAmp, mSpeed, mDur; 60 | long mIndex; 61 | 62 | double *mMemoryAmp; 63 | double *mMemoryDur; 64 | 65 | RGen rgen; 66 | }; 67 | 68 | void *gendy_new(t_symbol *s, long ac, t_atom *av){ 69 | int init_cps; 70 | t_gendy *self = (t_gendy *)object_alloc(gendy_class); 71 | 72 | if (!self) return nullptr; 73 | 74 | dsp_setup((t_pxobject *)self, 0); 75 | self->mFreqMul = (double) 1.0/sys_getsr(); 76 | self->mPhase = 1.0; //should immediately decide on new target 77 | self->mAmp = 0.0; 78 | self->mNextAmp = 0.0; 79 | self->mSpeed = 100; 80 | self->mIndex = 0; 81 | 82 | // if the first value is a long use it as our number of cps 83 | // non incremented av always points to the first value in the atom array 84 | if (attr_args_offset(ac, av) > 0 && atom_gettype(av) == A_LONG) { 85 | init_cps = atom_getlong(av); 86 | 87 | if(init_cps>0){ 88 | self->g_cps = init_cps; 89 | object_post((t_object*) self, "number of cps: %d", self->g_cps); 90 | } else { 91 | self->g_cps = CONTROL_POINTS; 92 | object_error((t_object*) self, "number of cps too small, setting to default (12)"); 93 | } 94 | } else { 95 | self->g_cps = CONTROL_POINTS; 96 | object_post((t_object*)self, "no number of cps supplied, using the default (12)"); 97 | } 98 | 99 | self->mMemoryAmp = (double*)sysmem_newptr(self->g_cps * sizeof(double)); 100 | self->mMemoryDur = (double*)sysmem_newptr(self->g_cps * sizeof(double)); 101 | 102 | // defaults 103 | self->g_ampdist = 0; 104 | self->g_durdist = 0; 105 | self->g_adparam = 1.0; 106 | self->g_ddparam = 1.0; 107 | self->g_minfreq = 440.0; 108 | self->g_maxfreq = 660.0; 109 | self->g_ampscale = 0.5; 110 | self->g_durscale = 0.5; 111 | 112 | // process the attributes after the defaults have been set 113 | attr_args_process(self, ac, av); 114 | 115 | // set up the random generator 116 | self->rgen.init(sc_randomSeed()); 117 | 118 | //initialise to zeroes and separations 119 | int i=0; 120 | for(i=0; i < self->g_cps; ++i) { 121 | self->mMemoryAmp[i] = 2 * self->rgen.drand() - 1.0; 122 | self->mMemoryDur[i] = self->rgen.drand(); 123 | } 124 | 125 | outlet_new((t_object *)self, "signal"); 126 | 127 | return self; 128 | } 129 | 130 | void gendy_free(t_gendy *self) { 131 | dsp_free((t_pxobject *)self); 132 | sysmem_freeptr(self->mMemoryAmp); 133 | sysmem_freeptr(self->mMemoryDur); 134 | } 135 | 136 | double gendy_distribution(int which, double a, double f) { 137 | double temp, c; 138 | 139 | if(a>1.0) a=1.0; //a must be in range 0 to 1 140 | if(a<0.0001) a=0.0001; //for safety with some distributions, don't want divide by zero errors 141 | 142 | switch (which) { 143 | case 0: //LINEAR 144 | //linear 145 | break; 146 | case 1: //CAUCHY 147 | //X has a*tan((z-0.5)*pi) 148 | //I went back to first principles of the Cauchy distribution and re-integrated with a 149 | //normalisation constant 150 | 151 | //choice of 10 here is such that f=0.95 gives about 0.35 for temp, could go with 2 to make it finer 152 | c= atan(10*a); //PERHAPS CHANGE TO a=1/a; 153 | //incorrect- missed out divisor of pi in norm temp= a*tan(c*(2*pi*f - 1)); 154 | temp= (1/a)*tan(c*(2*f - 1)); //Cauchy distribution, C is precalculated 155 | 156 | //printf("cauchy f %f c %f temp %f out %f \n",f, c, temp, temp/10); 157 | 158 | return temp*0.1; //(temp+100)/200; 159 | 160 | case 2: //LOGIST (ic) 161 | //X has -(log((1-z)/z)+b)/a which is not very usable as is 162 | 163 | c = 0.5+(0.499*a); //calculate normalisation constant 164 | c = log((1-c)/c); 165 | 166 | //remap into range of valid inputs to avoid infinities in the log 167 | 168 | //f= ((f-0.5)*0.499*a)+0.5; 169 | f = ((f-0.5)*0.998*a)+0.5; //[0,1]->[0.001,0.999]; squashed around midpoint 0.5 by a 170 | //Xenakis calls this the LOGIST map, it's from the range [0,1] to [inf,0] where 0.5->1 171 | //than take natural log. to avoid infinities in practise I take [0,1] -> [0.001,0.999]->[6.9,-6.9] 172 | //an interesting property is that 0.5-e is the reciprocal of 0.5+e under (1-f)/f 173 | //and hence the logs are the negative of each other 174 | temp = log((1-f)/f)/c; //n range [-1,1] 175 | //X also had two constants in his- I don't bother 176 | 177 | //printf("logist f %f temp %f\n", f, temp); 178 | 179 | return temp; //a*0.5*(temp+1.0); //to [0,1] 180 | 181 | case 3: //HYPERBCOS 182 | //X original a*log(tan(z*pi/2)) which is [0,1]->[0,pi/2]->[0,inf]->[-inf,inf] 183 | //unmanageable in this pure form 184 | c=tan(1.5692255*a); //tan(0.999*a*pi*0.5); //[0, 636.6] maximum range 185 | temp= tan(1.5692255*a*f)/c; //[0,1]->[0,1] 186 | temp= log(temp*0.999+0.001)*(-0.1447648); // multiplier same as /(-6.9077553); //[0,1]->[0,1] 187 | 188 | //printf("hyperbcos f %f c %f temp %f\n", f, c, temp); 189 | 190 | return 2*temp-1.0; 191 | 192 | case 4: //ARCSINE 193 | //X original a/2*(1-sin((0.5-z)*pi)) aha almost a better behaved one though [0,1]->[2,0]->[a,0] 194 | c= sin(1.5707963*a); //sin(pi*0.5*a); //a as scaling factor of domain of sine input to use 195 | temp= sin(pi*(f-0.5)*a)/c; //[-1,1] which is what I need 196 | 197 | //printf("arcsine f %f c %f temp %f\n", f, c, temp); 198 | 199 | return temp; 200 | 201 | case 5: //EXPON 202 | //X original -(log(1-z))/a [0,1]-> [1,0]-> [0,-inf]->[0,inf] 203 | c= log(1.0-(0.999*a)); 204 | temp= log(1.0-(f*0.999*a))/c; 205 | 206 | //printf("expon f %f c %f temp %f\n", f, c, temp); 207 | 208 | return 2*temp-1.0; 209 | 210 | case 6: //SINUS 211 | //X original a*sin(smp * 2*pi/44100 * b) ie depends on a second oscillator's value- 212 | //hmmm, plug this in as a I guess, will automatically accept control rate inputs then! 213 | return 2*a-1.0; 214 | 215 | default: 216 | break; 217 | } 218 | 219 | return 2*f-1.0; 220 | } 221 | 222 | void gendy_perform64(t_gendy* self, 223 | t_object* dsp64, 224 | double** ins, 225 | long numins, 226 | double** outs, 227 | long numouts, 228 | long sampleframes, 229 | long flags, 230 | void* userparam) { 231 | double* out = outs[0]; 232 | int n = sampleframes; 233 | 234 | 235 | if (self->ob.z_disabled) return ; 236 | 237 | // these are all set via max messages 238 | long whichamp = self->g_ampdist; 239 | long whichdur = self->g_durdist; 240 | double aamp = self->g_adparam; 241 | double adur = self->g_ddparam; 242 | double minfreq = self->g_minfreq; 243 | double maxfreq = self->g_maxfreq; 244 | double scaleamp = self->g_ampscale; 245 | double scaledur = self->g_durscale; 246 | 247 | double rate = self->mDur; 248 | //phase gives proportion for linear interpolation automatically 249 | double phase = self->mPhase; 250 | double amp = self->mAmp; 251 | double nextamp = self->mNextAmp; 252 | double speed = self->mSpeed; 253 | 254 | while (n--){ 255 | double z; 256 | 257 | if (phase >= 1.f) { 258 | phase -= 1.f; 259 | 260 | long index = self->mIndex; 261 | long num = self->g_knum; 262 | 263 | if((num>(self->g_cps)) || (num<1)) num=self->g_cps; // clip 264 | 265 | index=(index+1) % num; 266 | amp=nextamp; 267 | 268 | self->mIndex=index; 269 | 270 | //Gendy dist gives value [-1,1], then use scaleamp 271 | //first term was amp before, now must check new memory slot 272 | nextamp= (self->mMemoryAmp[index])+(scaleamp*gendy_distribution(whichamp, aamp,self->rgen.frand())); 273 | 274 | //mirroring for bounds- safe version 275 | if(nextamp>1.0 || nextamp<-1.0) { 276 | 277 | //to force mirroring to be sensible 278 | if(nextamp<0.0) nextamp=nextamp+4.0; 279 | 280 | nextamp=fmod(nextamp,4.0f); 281 | 282 | if(nextamp>1.0 && nextamp<3.0) 283 | nextamp= 2.0-nextamp; 284 | 285 | else if(nextamp>1.0) 286 | nextamp=nextamp-4.0; 287 | }; 288 | 289 | self->mMemoryAmp[index]= nextamp; 290 | 291 | //Gendy dist gives value [-1,1] 292 | rate= (self->mMemoryDur[index])+(scaledur*gendy_distribution(whichdur, adur, self->rgen.frand())); 293 | 294 | if(rate>1.0 || rate<0.0) { 295 | if(rate<0.0) rate=rate+2.0; 296 | rate= fmod(rate,2.0f); 297 | rate= 2.0-rate; 298 | } 299 | 300 | self->mMemoryDur[index]= rate; 301 | 302 | //define range of speeds (say between 20 and 1000 Hz) 303 | //can have bounds as fourth and fifth inputs 304 | speed= (minfreq+((maxfreq-minfreq)*rate))*(self->mFreqMul); 305 | 306 | //if there are 12 control points in memory, that is 12 per cycle 307 | //the speed is multiplied by 12 308 | //(I don't store this because updating rates must remain in range [0,1] 309 | speed *= num; 310 | } 311 | 312 | //linear interpolation could be changed 313 | z = ((1.0-phase)*amp) + (phase*nextamp); 314 | 315 | phase += speed; 316 | *out++ = z; 317 | } 318 | 319 | self->mPhase = phase; 320 | self->mAmp = amp; 321 | self->mNextAmp = nextamp; 322 | self->mSpeed = speed; 323 | self->mDur = rate; 324 | } 325 | 326 | void gendy_dsp64(t_gendy *self, t_object* dsp64, short* count, double samplerate, long maxvectorsize, long flags) { 327 | self->mFreqMul = (double) 1.0 / samplerate; 328 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 329 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)gendy_perform64, 0, NULL); 330 | } 331 | 332 | void gendy_assist(t_gendy *self, void *b, t_assist_function io, long a, char *s) { 333 | if (io == ASSIST_INLET) { //inlet 334 | sprintf(s, "messages to gendy"); 335 | } 336 | else { // outlet 337 | sprintf(s, "(signal) Gendy"); 338 | } 339 | } 340 | 341 | void ext_main(void *r) { 342 | t_class *c; 343 | c = class_new("sc.gendy1~", (method)gendy_new, (method)gendy_free, (long)sizeof(t_gendy), 0L, A_GIMME, 0); 344 | 345 | class_addmethod(c, (method)gendy_dsp64, "dsp64", A_CANT, 0); 346 | class_addmethod(c, (method)gendy_assist, "assist", A_CANT, 0); 347 | 348 | // the gendy parameters are set via attributes 349 | 350 | CLASS_ATTR_LONG(c, "ampdist", ATTR_FLAGS_NONE, t_gendy, g_ampdist); 351 | CLASS_ATTR_FILTER_CLIP(c, "ampdist", 0, 6); 352 | CLASS_ATTR_ORDER(c, "ampdist", ATTR_FLAGS_NONE, "1"); 353 | 354 | CLASS_ATTR_LONG(c, "durdist", ATTR_FLAGS_NONE, t_gendy, g_durdist); 355 | CLASS_ATTR_FILTER_CLIP(c, "durdist", 0, 6); 356 | CLASS_ATTR_ORDER(c, "durdist", ATTR_FLAGS_NONE, "2"); 357 | 358 | CLASS_ATTR_DOUBLE(c, "adparam", ATTR_FLAGS_NONE, t_gendy, g_adparam); 359 | CLASS_ATTR_ORDER(c, "adparam", ATTR_FLAGS_NONE, "3"); 360 | 361 | CLASS_ATTR_DOUBLE(c, "ddparam", ATTR_FLAGS_NONE, t_gendy, g_ddparam); 362 | CLASS_ATTR_ORDER(c, "ddparam", ATTR_FLAGS_NONE, "4"); 363 | 364 | CLASS_ATTR_DOUBLE(c, "minfreq", ATTR_FLAGS_NONE, t_gendy, g_minfreq); 365 | CLASS_ATTR_FILTER_MIN(c, "minfreq", 1.f); 366 | CLASS_ATTR_ORDER(c, "minfreq", ATTR_FLAGS_NONE, "5"); 367 | 368 | CLASS_ATTR_DOUBLE(c, "maxfreq", ATTR_FLAGS_NONE, t_gendy, g_maxfreq); 369 | CLASS_ATTR_FILTER_MIN(c, "maxfreq", 1.f); 370 | CLASS_ATTR_ORDER(c, "maxfreq", ATTR_FLAGS_NONE, "6"); 371 | 372 | CLASS_ATTR_DOUBLE(c, "ampscale", ATTR_FLAGS_NONE, t_gendy, g_ampscale); 373 | CLASS_ATTR_FILTER_CLIP(c, "ampscale", 0.f, 1.f); 374 | CLASS_ATTR_ORDER(c, "ampscale", ATTR_FLAGS_NONE, "7"); 375 | 376 | CLASS_ATTR_DOUBLE(c, "durscale", ATTR_FLAGS_NONE, t_gendy, g_durscale); 377 | CLASS_ATTR_FILTER_CLIP(c, "durscale", 0.f, 1.f); 378 | CLASS_ATTR_ORDER(c, "durscale", ATTR_FLAGS_NONE, "8"); 379 | 380 | CLASS_ATTR_LONG(c, "knum", ATTR_FLAGS_NONE, t_gendy, g_knum); 381 | CLASS_ATTR_ORDER(c, "knum", ATTR_FLAGS_NONE, "9"); 382 | 383 | class_dspinit(c); 384 | class_register(CLASS_BOX, c); 385 | gendy_class = c; 386 | } 387 | -------------------------------------------------------------------------------- /source/projects/sc.gendy2_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.gendy2_tilde/sc.gendy2_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | SuperCollider real time audio synthesis system 4 | Copyright (c) 2002 James McCartney. All rights reserved. 5 | http://www.audiosynth.com 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | */ 22 | 23 | /* 24 | 25 | Gendyn SuperColluder UGens implemented by Nick Collins (sicklincoln.org) 26 | Most of the comments are from his original c++ code 27 | 28 | */ 29 | 30 | /* 31 | 32 | sc.gendy2~ 33 | (c) stephen lumenta under GPL 34 | http://www.gnu.org/licenses/gpl.html 35 | 36 | part of sc-max http://github.com/sbl/sc-max 37 | see README 38 | */ 39 | 40 | #include "c74_msp.h" 41 | #include "scmax.h" 42 | 43 | #define CONTROL_POINTS 12 44 | 45 | using namespace c74::max; 46 | 47 | static t_class *gendy_class = nullptr; 48 | 49 | // following Hoffmann paper from CMJ- primary and secondary random walks 50 | struct t_gendy { 51 | t_pxobject ob; 52 | 53 | int g_ampdist, g_durdist; 54 | double g_adparam, g_ddparam; 55 | double g_minfreq, g_maxfreq; 56 | double g_ampscale, g_durscale; 57 | int g_cps, g_knum; // defaults to 12 58 | // random values made using a lehmer number generator xenakis style 59 | double g_a, g_c; 60 | 61 | double mPhase; 62 | double mFreqMul, mAmp, mNextAmp, mSpeed, mDur; 63 | int mIndex; 64 | 65 | double *mMemoryAmp; 66 | double *mMemoryAmpStep; 67 | double *mMemoryDur; 68 | double *mMemoryDurStep; 69 | 70 | RGen rgen; 71 | }; 72 | 73 | void *gendy_new(t_symbol *s, long ac, t_atom *av) { 74 | t_gendy *x = NULL; 75 | long init_cps; 76 | 77 | x = (t_gendy *)object_alloc(gendy_class); 78 | 79 | if (!x) return nullptr; 80 | 81 | dsp_setup((t_pxobject *)x, 0); 82 | outlet_new((t_object *)x, "signal"); 83 | 84 | x->mFreqMul = 1.0/sys_getsr(); 85 | x->mPhase = 1.0; //should immediately decide on new target 86 | x->mAmp = 0.0; 87 | x->mNextAmp = 0.0; 88 | x->mSpeed = 100; 89 | 90 | x->mIndex = 0; 91 | 92 | // if the first value is a long use it as our number of cps 93 | // non incremented av always points to the first value in the atom array 94 | if (attr_args_offset(ac, av) > 0 && atom_gettype(av) == A_LONG) { 95 | init_cps = atom_getlong(av); 96 | 97 | if(init_cps>0){ 98 | x->g_cps = init_cps; 99 | object_post((t_object*) x, "number of cps: %d", x->g_cps); 100 | } else { 101 | x->g_cps = CONTROL_POINTS; 102 | object_error((t_object*) x, "number of cps too small, setting to default (12)"); 103 | } 104 | } else { 105 | x->g_cps = CONTROL_POINTS; 106 | object_post((t_object*)x, "no number of cps supplied, using the default (12)"); 107 | } 108 | 109 | x->mMemoryAmp = (double*)sysmem_newptr(x->g_cps * sizeof(double)); 110 | x->mMemoryAmpStep = (double*)sysmem_newptr(x->g_cps * sizeof(double)); 111 | x->mMemoryDur = (double*)sysmem_newptr(x->g_cps * sizeof(double)); 112 | x->mMemoryDurStep = (double*)sysmem_newptr(x->g_cps * sizeof(double)); 113 | 114 | // defaults 115 | x->g_ampdist = 0; 116 | x->g_durdist = 0; 117 | x->g_adparam = 1; 118 | x->g_ddparam = 1; 119 | x->g_minfreq = 440; 120 | x->g_maxfreq = 660; 121 | x->g_ampscale = 0.5; 122 | x->g_durscale = 0.5; 123 | x->g_a = 1.17; 124 | x->g_c = 0.31; 125 | 126 | // process the attributes after the defaults have been set 127 | attr_args_process(x, ac, av); 128 | 129 | // set up the random generator 130 | x->rgen.init(rand()); 131 | 132 | //initialise to zeroes and separations 133 | int i=0; 134 | for(i=0; i < x->g_cps; ++i) { 135 | x->mMemoryAmp[i] = 2 * x->rgen.frand() - 1.0; 136 | x->mMemoryDur[i] = x->rgen.frand(); 137 | x->mMemoryAmpStep[i]= 2 * x->rgen.frand() - 1.0; 138 | x->mMemoryDurStep[i]= 2 * x->rgen.frand() - 1.0; 139 | } 140 | 141 | return x; 142 | } 143 | 144 | void gendy_free(t_gendy *x) { 145 | dsp_free((t_pxobject *)x); 146 | 147 | sysmem_freeptr(x->mMemoryAmp); 148 | sysmem_freeptr(x->mMemoryDur); 149 | sysmem_freeptr(x->mMemoryAmpStep); 150 | sysmem_freeptr(x->mMemoryDurStep); 151 | } 152 | 153 | double gendy_distribution(int which, double a, double f) { 154 | double temp, c; 155 | 156 | if(a > 1.0) a = 1.0; //a must be in range 0 to 1 157 | if(a < 0.0001) a = 0.0001; //for safety with some distributions, don't want divide by zero errors 158 | 159 | switch (which) { 160 | case 0: //LINEAR 161 | //linear 162 | break; 163 | case 1: //CAUCHY 164 | //X has a*tan((z-0.5)*pi) 165 | //I went back to first principles of the Cauchy distribution and re-integrated with a 166 | //normalisation constant 167 | 168 | //choice of 10 here is such that f=0.95 gives about 0.35 for temp, could go with 2 to make it finer 169 | c= atan(10*a); //PERHAPS CHANGE TO a=1/a; 170 | //incorrect- missed out divisor of pi in norm temp= a*tan(c*(2*pi*f - 1)); 171 | temp= (1/a)*tan(c*(2*f - 1)); //Cauchy distribution, C is precalculated 172 | 173 | //printf("cauchy f %f c %f temp %f out %f \n",f, c, temp, temp/10); 174 | 175 | return temp*0.1; //(temp+100)/200; 176 | 177 | case 2: //LOGIST (ic) 178 | //X has -(log((1-z)/z)+b)/a which is not very usable as is 179 | 180 | c=0.5+(0.499*a); //calculate normalisation constant 181 | c= log((1-c)/c); 182 | 183 | //remap into range of valid inputs to avoid infinities in the log 184 | 185 | //f= ((f-0.5)*0.499*a)+0.5; 186 | f= ((f-0.5)*0.998*a)+0.5; //[0,1]->[0.001,0.999]; squashed around midpoint 0.5 by a 187 | //Xenakis calls this the LOGIST map, it's from the range [0,1] to [inf,0] where 0.5->1 188 | //than take natural log. to avoid infinities in practise I take [0,1] -> [0.001,0.999]->[6.9,-6.9] 189 | //an interesting property is that 0.5-e is the reciprocal of 0.5+e under (1-f)/f 190 | //and hence the logs are the negative of each other 191 | temp= log((1-f)/f)/c; //n range [-1,1] 192 | //X also had two constants in his- I don't bother 193 | 194 | //printf("logist f %f temp %f\n", f, temp); 195 | 196 | return temp; //a*0.5*(temp+1.0); //to [0,1] 197 | 198 | case 3: // HYPERBCOS 199 | //X original a*log(tan(z*pi/2)) which is [0,1]->[0,pi/2]->[0,inf]->[-inf,inf] 200 | //unmanageable in this pure form 201 | c=tan(1.5692255*a); //tan(0.999*a*pi*0.5); //[0, 636.6] maximum range 202 | temp= tan(1.5692255*a*f)/c; //[0,1]->[0,1] 203 | temp= log(temp*0.999+0.001)*(-0.1447648); // multiplier same as /(-6.9077553); //[0,1]->[0,1] 204 | 205 | return 2 * temp-1.0; 206 | 207 | case 4: // ARCSINE 208 | c= sin(1.5707963*a); //sin(pi*0.5*a); //a as scaling factor of domain of sine input to use 209 | temp= sin(pi *(f-0.5)*a)/c; //[-1,1] which is what I need 210 | 211 | return temp; 212 | 213 | case 5: // EXPON 214 | c = log(1.0-(0.999*a)); 215 | temp = log(1.0-(f*0.999*a))/c; 216 | 217 | return 2*temp-1.0; 218 | 219 | case 6: // SINUS 220 | //X original a*sin(smp * 2*pi/44100 * b) ie depends on a second oscillator's value- 221 | //hmmm, plug this in as a I guess, will automatically accept control rate inputs then! 222 | return 2*a-1.0; 223 | 224 | default: 225 | break; 226 | } 227 | 228 | return 2 * f - 1.0; 229 | } 230 | 231 | double gendy_mirroring(double lower, double upper, double in) { 232 | //mirroring for bounds- safe version 233 | if(in > upper || in < lower) { 234 | double range = (upper - lower); 235 | 236 | if(in < lower) in = (2 * upper - lower) - in; 237 | 238 | in = fmod(in-upper,2*range); 239 | 240 | if(inob.z_disabled) return ; 260 | 261 | 262 | // these are all set via max messages 263 | int whichamp = x->g_ampdist; 264 | int whichdur = x->g_durdist; 265 | double aamp = x->g_adparam; 266 | double adur = x->g_ddparam; 267 | double minfreq = x->g_minfreq; 268 | double maxfreq = x->g_maxfreq; 269 | double scaleamp = x->g_ampscale; 270 | double scaledur = x->g_durscale; 271 | 272 | 273 | double rate = x->mDur; 274 | // phase gives proportion for linear interpolation automatically 275 | double phase = x->mPhase; 276 | double amp = x->mAmp; 277 | double nextamp = x->mNextAmp; 278 | double speed = x->mSpeed; 279 | 280 | while (n--){ 281 | double z; 282 | 283 | if (phase >= 1) { 284 | phase -= 1; 285 | 286 | int index = x->mIndex; 287 | int num = x->g_knum; 288 | 289 | if((num>(x->g_cps)) || (num<1)) num=x->g_cps; // clip 290 | 291 | // new code for indexing 292 | index=(index +1) % num; 293 | 294 | // using last amp value as seed 295 | // random values made using a lehmer number generator xenakis style 296 | double a = x->g_a; 297 | double c = x->g_c; 298 | 299 | double lehmerxen= fmod(((amp)*a)+c,1.0f); 300 | 301 | amp=nextamp; 302 | x->mIndex=index; 303 | 304 | //Gendy dist gives value [-1,1], then use scaleamp 305 | //first term was amp before, now must check new memory slot 306 | 307 | double ampstep = (x->mMemoryAmpStep[index])+ gendy_distribution(whichamp, aamp, fabs(lehmerxen)); 308 | ampstep = gendy_mirroring(-1.0,1.0,ampstep); 309 | 310 | x->mMemoryAmpStep[index] = ampstep; 311 | 312 | nextamp = (x->mMemoryAmp[index])+(scaleamp*ampstep); 313 | nextamp = gendy_mirroring(-1.0,1.0,nextamp); 314 | 315 | x->mMemoryAmp[index]= nextamp; 316 | 317 | double durstep = (x->mMemoryDurStep[index])+ gendy_distribution(whichdur, adur, x->rgen.frand()); 318 | durstep = gendy_mirroring(-1.0,1.0,durstep); 319 | 320 | x->mMemoryDurStep[index]= durstep; 321 | 322 | rate = (x->mMemoryDur[index])+(scaledur*durstep); 323 | rate = gendy_mirroring(0.0,1.0,rate); 324 | 325 | x->mMemoryDur[index]= rate; 326 | 327 | //printf("nextamp %f rate %f \n", nextamp, rate); 328 | 329 | //define range of speeds (say between 20 and 1000 Hz) 330 | //can have bounds as fourth and fifth inputs 331 | speed = (minfreq+((maxfreq-minfreq)*rate))*(x->mFreqMul); 332 | 333 | //if there are 12 control points in memory, that is 12 per cycle 334 | //the speed is multiplied by 12 335 | //(I don't store this because updating rates must remain in range [0,1] 336 | speed *= num; 337 | } 338 | 339 | //linear interpolation could be changed 340 | z = ((1.0-phase)*amp) + (phase*nextamp); 341 | 342 | phase += speed; 343 | *out++ = z; 344 | } 345 | 346 | x->mPhase = phase; 347 | x->mAmp = amp; 348 | x->mNextAmp = nextamp; 349 | x->mSpeed = speed; 350 | x->mDur = rate; 351 | } 352 | 353 | void gendy_dsp64(t_gendy *self, t_object* dsp64, short* count, double samplerate, long maxvectorsize, long flags) { 354 | self->mFreqMul = 1.0 / sys_getsr(); 355 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 356 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)gendy_perform64, 0, NULL); 357 | 358 | } 359 | 360 | void gendy_assist(t_gendy *x, void *b, t_assist_function io, long a, char *s) { 361 | if (io == ASSIST_INLET) { 362 | sprintf(s, "messages to gendy"); 363 | } 364 | else { 365 | sprintf(s, "(signal) Gendy"); 366 | } 367 | } 368 | 369 | void ext_main(void *r) { 370 | t_class *c; 371 | 372 | c = class_new("sc.gendy2~", (method)gendy_new, (method)gendy_free, (long)sizeof(t_gendy), 0L, A_GIMME, 0); 373 | 374 | class_addmethod(c, (method)gendy_dsp64, "dsp64", A_CANT, 0); 375 | class_addmethod(c, (method)gendy_assist, "assist", A_CANT, 0); 376 | 377 | // the gendy parameters are set via attributes 378 | 379 | CLASS_ATTR_LONG (c, "ampdist", ATTR_FLAGS_NONE, t_gendy, g_ampdist); 380 | CLASS_ATTR_FILTER_CLIP (c, "ampdist", 0, 6); 381 | CLASS_ATTR_ORDER (c, "ampdist", ATTR_FLAGS_NONE, "1"); 382 | 383 | CLASS_ATTR_LONG (c, "durdist", ATTR_FLAGS_NONE, t_gendy, g_durdist); 384 | CLASS_ATTR_FILTER_CLIP (c, "durdist", 0, 6); 385 | CLASS_ATTR_ORDER (c, "durdist", ATTR_FLAGS_NONE, "2"); 386 | 387 | CLASS_ATTR_DOUBLE (c, "adparam", ATTR_FLAGS_NONE, t_gendy, g_adparam); 388 | CLASS_ATTR_ORDER (c, "adparam", ATTR_FLAGS_NONE, "3"); 389 | 390 | CLASS_ATTR_DOUBLE (c, "ddparam", ATTR_FLAGS_NONE, t_gendy, g_ddparam); 391 | CLASS_ATTR_ORDER (c, "ddparam", ATTR_FLAGS_NONE, "4"); 392 | 393 | CLASS_ATTR_DOUBLE (c, "minfreq", ATTR_FLAGS_NONE, t_gendy, g_minfreq); 394 | CLASS_ATTR_FILTER_MIN (c, "minfreq", 1.f); 395 | CLASS_ATTR_ORDER (c, "minfreq", ATTR_FLAGS_NONE, "5"); 396 | 397 | CLASS_ATTR_DOUBLE (c, "maxfreq", ATTR_FLAGS_NONE, t_gendy, g_maxfreq); 398 | CLASS_ATTR_FILTER_MIN (c, "maxfreq", 1.f); 399 | CLASS_ATTR_ORDER (c, "maxfreq", ATTR_FLAGS_NONE, "6"); 400 | 401 | CLASS_ATTR_DOUBLE (c, "ampscale", ATTR_FLAGS_NONE, t_gendy, g_ampscale); 402 | CLASS_ATTR_FILTER_CLIP (c, "ampscale", 0.f, 1.f); 403 | CLASS_ATTR_ORDER (c, "ampscale", ATTR_FLAGS_NONE, "7"); 404 | 405 | CLASS_ATTR_DOUBLE (c, "durscale", ATTR_FLAGS_NONE, t_gendy, g_durscale); 406 | CLASS_ATTR_FILTER_CLIP (c, "durscale", 0.f, 1.f); 407 | CLASS_ATTR_ORDER (c, "durscale", ATTR_FLAGS_NONE, "8"); 408 | 409 | CLASS_ATTR_LONG (c, "knum", ATTR_FLAGS_NONE, t_gendy, g_knum); 410 | CLASS_ATTR_ORDER (c, "knum", ATTR_FLAGS_NONE, "9"); 411 | 412 | CLASS_ATTR_DOUBLE (c, "a", ATTR_FLAGS_NONE, t_gendy, g_a); 413 | CLASS_ATTR_ORDER (c, "a", ATTR_FLAGS_NONE, "10"); 414 | 415 | CLASS_ATTR_DOUBLE (c, "c", ATTR_FLAGS_NONE, t_gendy, g_c); 416 | CLASS_ATTR_ORDER (c, "c", ATTR_FLAGS_NONE, "11"); 417 | 418 | 419 | class_dspinit(c); 420 | class_register(CLASS_BOX, c); 421 | gendy_class = c; 422 | } 423 | -------------------------------------------------------------------------------- /source/projects/sc.gendy3_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.graynoise_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.graynoise_tilde/sc.graynoise_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | graynoise~ 23 | (c) stephen lumenta under GPL 24 | http://www.gnu.org/licenses/gpl.html 25 | 26 | part of sc-max http://github.com/sbl/sc-max 27 | see README 28 | */ 29 | 30 | #include "c74_msp.h" 31 | #include "scmax.h" 32 | 33 | using namespace c74::max; 34 | 35 | 36 | static t_class *graynoise_class = nullptr; 37 | 38 | struct t_graynoise { 39 | t_pxobject ob; 40 | int m_counter; 41 | RGen rgen; 42 | }; 43 | 44 | void *graynoise_new(long argc, t_atom *argv) { 45 | t_graynoise *x = NULL; 46 | x = (t_graynoise *)object_alloc(graynoise_class); 47 | 48 | if (x) { 49 | dsp_setup((t_pxobject *)x, 0); 50 | 51 | outlet_new((t_object *)x, "signal"); 52 | 53 | x->rgen.init(sc_randomSeed()); 54 | x->m_counter = 0; 55 | } 56 | return (x); 57 | } 58 | 59 | void graynoise_perform64(t_graynoise *self, 60 | t_object* dsp64, 61 | double** ins, 62 | long numins, 63 | double** outs, 64 | long numouts, 65 | long sampleframes, 66 | long flags, 67 | void* userparam) { 68 | int counter = self->m_counter; 69 | double *out = outs[0]; 70 | int n = sampleframes; 71 | 72 | if (self->ob.z_disabled) return ; 73 | 74 | RGET 75 | while (n--){ 76 | counter ^= 1L << (trand(s1,s2,s3) & 31); 77 | *out++ = counter * 4.65661287308e-10f; 78 | } 79 | RPUT 80 | 81 | self->m_counter = counter; 82 | } 83 | 84 | void graynoise_dsp64(t_graynoise *self, 85 | t_object* dsp64, 86 | short* count, 87 | double samplerate, 88 | long maxvectorsize, 89 | long flags) { 90 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 91 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)graynoise_perform64, 0, NULL); 92 | } 93 | 94 | void graynoise_assist(t_graynoise *x, void *b, long m, long a, char *s) { 95 | if (m == ASSIST_INLET) { //inlet 96 | sprintf(s, "Ignore this inlet"); 97 | } 98 | else { // outlet 99 | sprintf(s, "(signal) Gray Noise"); 100 | } 101 | } 102 | 103 | void ext_main(void *r) { 104 | t_class *c; 105 | c = class_new("sc.graynoise~", (method)graynoise_new, (method)dsp_free, (long)sizeof(t_graynoise), 0L, A_GIMME, 0); 106 | 107 | class_addmethod(c, (method)graynoise_dsp64, "dsp64", A_CANT, 0); 108 | class_addmethod(c, (method)graynoise_assist, "assist", A_CANT, 0); 109 | 110 | class_dspinit(c); 111 | class_register(CLASS_BOX, c); 112 | 113 | graynoise_class = c; 114 | } 115 | -------------------------------------------------------------------------------- /source/projects/sc.lfclipnoise_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.lfclipnoise_tilde/sc.lfclipnoise_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | 23 | sc.lfclipnoise~ 24 | (c) stephen lumenta under GPL 25 | http://www.gnu.org/licenses/gpl.html 26 | 27 | part of sc-max http://github.com/sbl/sc-max 28 | see README 29 | */ 30 | 31 | #include "c74_msp.h" 32 | #include "scmax.h" 33 | 34 | using namespace c74::max; 35 | 36 | static t_class *lfclipnoise_class = nullptr; 37 | 38 | struct t_lfclipnoise { 39 | t_pxobject ob; 40 | 41 | double m_freq; 42 | short m_connected; 43 | double m_level; 44 | double m_sr; 45 | int m_counter; 46 | 47 | RGen rgen; 48 | }; 49 | 50 | void *lfclipnoise_new(double freq) { 51 | t_lfclipnoise *x = NULL; 52 | x = (t_lfclipnoise *)object_alloc(lfclipnoise_class); 53 | 54 | if (!x) return x; 55 | 56 | dsp_setup((t_pxobject *)x, 1); 57 | 58 | x->m_freq = freq <= 0 ? 500 : freq; 59 | x->m_counter = 0; 60 | x->m_level = 0.0; 61 | x->m_sr = sys_getsr(); 62 | x->rgen.init(sc_randomSeed()); 63 | 64 | outlet_new((t_object *)x, "signal"); 65 | 66 | return x; 67 | } 68 | 69 | void lfclipnoise_float(t_lfclipnoise *x, double freq) { 70 | x->m_freq = freq; 71 | } 72 | 73 | void lfclipnoise_perform64(t_lfclipnoise* self, 74 | t_object* dsp64, 75 | double** ins, 76 | long numins, 77 | double** outs, 78 | long numouts, 79 | long sampleframes, 80 | long flags, 81 | void* userparam) { 82 | 83 | double *out = outs[0]; 84 | int remain = sampleframes; 85 | 86 | double freq = self->m_connected ? *ins[0] : self->m_freq; 87 | double level = self->m_level; 88 | long counter = self->m_counter; 89 | 90 | if (self->ob.z_disabled) return ; 91 | 92 | RGET 93 | do { 94 | if (counter<=0) { 95 | // otherwise not working 96 | if(freq < 0.0001) freq = 0.0001; 97 | 98 | counter = self->m_sr / sc_max(freq, 0.001f); 99 | counter = sc_max(1, counter); 100 | level = fcoin(s1,s2,s3); 101 | } 102 | int nsmps = sc_min(remain, counter); 103 | remain -= nsmps; 104 | counter -= nsmps; 105 | 106 | int i; 107 | for(i=0; im_level = level; 114 | self->m_counter = counter; 115 | } 116 | 117 | void lfclipnoise_dsp64(t_lfclipnoise *self, 118 | t_object* dsp64, 119 | short* count, 120 | double samplerate, 121 | long maxvectorsize, 122 | long flags) { 123 | self->m_sr = samplerate; 124 | self->m_connected = count[0]; 125 | 126 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 127 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)lfclipnoise_perform64, 0, NULL); 128 | } 129 | 130 | void lfclipnoise_assist(t_lfclipnoise *x, void *b, long m, long a, char *s) { 131 | if (m == ASSIST_INLET) { //inlet 132 | sprintf(s, "(signal/float) set freq"); 133 | } 134 | else { // outlet 135 | sprintf(s, "(signal) lfclipnoise"); 136 | } 137 | } 138 | 139 | void ext_main(void *r){ 140 | t_class *c; 141 | 142 | c = class_new("sc.lfclipnoise~", (method)lfclipnoise_new, (method)dsp_free, (long)sizeof(t_lfclipnoise), 0L, A_DEFFLOAT, 0); 143 | class_addmethod(c, (method)lfclipnoise_dsp64, "dsp64", A_CANT, 0); 144 | class_addmethod(c, (method)lfclipnoise_assist, "assist", A_CANT, 0); 145 | class_addmethod(c, (method)lfclipnoise_float, "float", A_FLOAT, 0); 146 | 147 | class_dspinit(c); 148 | class_register(CLASS_BOX, c); 149 | lfclipnoise_class = c; 150 | } 151 | -------------------------------------------------------------------------------- /source/projects/sc.lfnoise0_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.lfnoise0_tilde/sc.lfnoise0_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | sc.lfnoise0~ 23 | (c) stephen lumenta under GPL 24 | http://www.gnu.org/licenses/gpl.html 25 | 26 | part of sc-max http://github.com/sbl/sc-max 27 | see README 28 | */ 29 | 30 | #include "c74_msp.h" 31 | #include "scmax.h" 32 | 33 | using namespace c74::max; 34 | 35 | static t_class *lfnoise_class = nullptr; 36 | 37 | struct t_lfnoise { 38 | t_pxobject ob; 39 | 40 | double m_freq; 41 | double m_sr; 42 | short m_connected; 43 | double m_level; 44 | int m_counter; 45 | 46 | RGen rgen; 47 | }; 48 | 49 | void *lfnoise_new(double freq) { 50 | t_lfnoise *x = NULL; 51 | x = (t_lfnoise *)object_alloc(lfnoise_class); 52 | 53 | if (x) { 54 | // 1 inlet 55 | dsp_setup((t_pxobject *)x, 1); 56 | 57 | x->m_freq = freq <= 0 ? 500 : freq; 58 | x->m_counter = 0; 59 | x->m_level = 0.0; 60 | x->m_sr = sys_getsr(); 61 | 62 | 63 | x->rgen.init(sc_randomSeed()); 64 | 65 | outlet_new((t_object *)x, "signal"); 66 | } 67 | return (x); 68 | } 69 | 70 | void lfnoise_float(t_lfnoise *x, double freq){ 71 | x->m_freq = (float) freq; 72 | } 73 | 74 | void lfnoise_perform64(t_lfnoise* self, 75 | t_object* dsp64, 76 | double** ins, 77 | long numins, 78 | double** outs, 79 | long numouts, 80 | long sampleframes, 81 | long flags, 82 | void* userparam) { 83 | double *out = outs[0]; 84 | int remain = sampleframes; 85 | 86 | double freq = self->m_connected ? *ins[0] : self->m_freq; 87 | double level = self->m_level; 88 | int counter = self->m_counter; 89 | 90 | if (self->ob.z_disabled) return; 91 | 92 | RGET 93 | do { 94 | if (counter <= 0) { 95 | counter = (int)(self->m_sr / sc_max(freq, .001f)); 96 | counter = sc_max(1, counter); 97 | level = frand2(s1,s2,s3); 98 | } 99 | int nsmps = sc_min(remain, counter); 100 | remain -= nsmps; 101 | counter -= nsmps; 102 | 103 | while(nsmps--){ 104 | *out++ = level; 105 | } 106 | } while (remain); 107 | 108 | self->m_level = level; 109 | self->m_counter = counter; 110 | RPUT 111 | } 112 | 113 | void lfnoise_dsp64(t_lfnoise *self, 114 | t_object* dsp64, 115 | short* count, 116 | double samplerate, 117 | long maxvectorsize, 118 | long flags) { 119 | self->m_sr = samplerate; 120 | self->m_connected = count[0]; 121 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 122 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)lfnoise_perform64, 0, NULL); 123 | 124 | } 125 | 126 | void lfnoise_assist(t_lfnoise *x, void *unused, t_assist_function io, long index, char *s) { 127 | if (io == ASSIST_INLET) { //inlet 128 | sprintf(s, "(signal/float) set freq"); 129 | } 130 | else { // outlet 131 | sprintf(s, "(signal) lfnoise"); 132 | } 133 | } 134 | 135 | void ext_main(void *r) { 136 | t_class *c; 137 | c = class_new("sc.lfnoise0~", (method)lfnoise_new, (method)dsp_free, (long)sizeof(t_lfnoise), 0L, A_DEFFLOAT, 0); 138 | 139 | class_addmethod(c, (method)lfnoise_dsp64, "dsp64", A_CANT, 0); 140 | class_addmethod(c, (method)lfnoise_assist, "assist", A_CANT, 0); 141 | class_addmethod(c, (method)lfnoise_float, "float", A_FLOAT, 0); 142 | 143 | class_dspinit(c); 144 | class_register(CLASS_BOX, c); 145 | lfnoise_class = c; 146 | } 147 | -------------------------------------------------------------------------------- /source/projects/sc.lfnoise1_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.lfnoise1_tilde/sc.lfnoise1_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | sc.lfnoise1~ 23 | (c) stephen lumenta under GPL 24 | http://www.gnu.org/licenses/gpl.html 25 | 26 | part of sc-max http://github.com/sbl/sc-max 27 | see README 28 | */ 29 | 30 | #include "c74_msp.h" 31 | #include "scmax.h" 32 | 33 | using namespace c74::max; 34 | 35 | static t_class *lfnoise_class = nullptr; 36 | 37 | struct t_lfnoise { 38 | t_pxobject ob; 39 | 40 | double m_freq; 41 | short m_connected; 42 | double m_level, m_slope; 43 | double m_sr; 44 | int m_counter; 45 | 46 | RGen rgen; 47 | }; 48 | 49 | void *lfnoise_new(double freq) { 50 | t_lfnoise *self = NULL; 51 | self = (t_lfnoise *)object_alloc(lfnoise_class); 52 | 53 | if (!self) return self; 54 | 55 | dsp_setup((t_pxobject *)self, 1); 56 | outlet_new((t_object *)self, "signal"); 57 | 58 | self->rgen.init(sc_randomSeed()); 59 | self->m_freq = freq <= 0 ? 500 : freq; 60 | self->m_counter = 0; 61 | self->m_level = self->rgen.frand2(); 62 | self->m_slope = 0.f; 63 | self->m_sr = sys_getsr(); 64 | 65 | return self; 66 | } 67 | 68 | void lfnoise_float(t_lfnoise *x, double freq) { 69 | x->m_freq = freq; 70 | } 71 | 72 | void lfnoise_perform64(t_lfnoise* self, 73 | t_object* dsp64, 74 | double** ins, 75 | long numins, 76 | double** outs, 77 | long numouts, 78 | long sampleframes, 79 | long flags, 80 | void* userparam) { 81 | 82 | double *out = outs[0]; 83 | int remain = sampleframes; 84 | 85 | double freq = self->m_connected ? *ins[0] : self->m_freq; 86 | double level = self->m_level; 87 | double slope = self->m_slope; 88 | long counter = self->m_counter; 89 | 90 | if (self->ob.z_disabled) return; 91 | 92 | RGET 93 | do { 94 | if (counter<=0) { 95 | counter = (long)(self->m_sr / sc_max(freq, .001f)); 96 | counter = sc_max(1, counter); 97 | float nextlevel = frand2(s1,s2,s3); 98 | slope = (nextlevel - level) / counter; 99 | } 100 | int nsmps = sc_min(remain, counter); 101 | remain -= nsmps; 102 | counter -= nsmps; 103 | 104 | while (nsmps--) { 105 | *out++ = level; 106 | level += slope; 107 | } 108 | 109 | } while (remain); 110 | 111 | self->m_level = level; 112 | self->m_slope = slope; 113 | self->m_counter= counter; 114 | RPUT 115 | } 116 | 117 | void lfnoise_dsp64(t_lfnoise *self, 118 | t_object* dsp64, 119 | short* count, 120 | double samplerate, 121 | long maxvectorsize, 122 | long flags) { 123 | self->m_sr = samplerate; 124 | self->m_connected = count[0]; 125 | 126 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 127 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)lfnoise_perform64, 0, NULL); 128 | } 129 | 130 | void lfnoise_assist(t_lfnoise *x, void *b, long m, long a, char *s) { 131 | if (m == ASSIST_INLET) { //inlet 132 | sprintf(s, "(signal/float) set freq"); 133 | } 134 | else { // outlet 135 | sprintf(s, "(signal) lfnoise"); 136 | } 137 | } 138 | 139 | void ext_main(void* r) { 140 | t_class *c; 141 | c = class_new("sc.lfnoise1~", (method)lfnoise_new, (method)dsp_free, (long)sizeof(t_lfnoise), 0L, A_DEFFLOAT, 0); 142 | 143 | class_addmethod(c, (method)lfnoise_dsp64, "dsp64", A_CANT, 0); 144 | class_addmethod(c, (method)lfnoise_assist, "assist", A_CANT, 0); 145 | class_addmethod(c, (method)lfnoise_float, "float", A_FLOAT, 0); 146 | 147 | class_dspinit(c); 148 | class_register(CLASS_BOX, c); 149 | lfnoise_class = c; 150 | } 151 | -------------------------------------------------------------------------------- /source/projects/sc.lfnoise2_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.lfnoise2_tilde/sc.lfnoise2_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | sc.lfnoise2~ 23 | (c) stephen lumenta under GPL 24 | http://www.gnu.org/licenses/gpl.html 25 | 26 | part of sc-max http://github.com/sbl/sc-max 27 | see README 28 | */ 29 | 30 | #include "c74_msp.h" 31 | #include "scmax.h" 32 | 33 | using namespace c74::max; 34 | 35 | static t_class *lfnoise_class = nullptr; 36 | 37 | struct t_lfnoise { 38 | t_pxobject ob; 39 | 40 | double m_freq; 41 | short m_connected; 42 | double m_level, m_slope, m_curve; 43 | double m_nextvalue, m_nextmidpt; 44 | double m_sr; 45 | long m_counter; 46 | 47 | RGen rgen; 48 | }; 49 | 50 | void *lfnoise_new(double freq) { 51 | t_lfnoise *self = NULL; 52 | self = (t_lfnoise *)object_alloc(lfnoise_class); 53 | 54 | if (!self) return self; 55 | 56 | dsp_setup((t_pxobject *)self, 1); 57 | outlet_new((t_object *)self, "signal"); 58 | 59 | self->rgen.init(sc_randomSeed()); 60 | self->m_freq = freq <= 0 ? 500 : freq; 61 | self->m_counter = 0; 62 | self->m_slope = 0; 63 | self->m_level = 0; 64 | self->m_nextvalue = self->rgen.frand2(); 65 | self->m_nextmidpt = self->m_nextvalue * .5f; 66 | self->m_sr = sys_getsr(); 67 | 68 | return (self); 69 | } 70 | 71 | void lfnoise_float(t_lfnoise *x, double freq) { 72 | x->m_freq = freq; 73 | } 74 | 75 | void lfnoise_perform64(t_lfnoise* self, 76 | t_object* dsp64, 77 | double** ins, 78 | long numins, 79 | double** outs, 80 | long numouts, 81 | long sampleframes, 82 | long flags, 83 | void* userparam) { 84 | 85 | double *out = outs[0]; 86 | int remain = sampleframes; 87 | 88 | double freq = self->m_connected ? *ins[0] : self->m_freq; 89 | double level = self->m_level; 90 | double slope = self->m_slope; 91 | double curve = self->m_curve; 92 | long counter = self->m_counter; 93 | 94 | if (self->ob.z_disabled) return ; 95 | 96 | RGET 97 | do { 98 | if (counter<=0) { 99 | float value = self->m_nextvalue; 100 | self->m_nextvalue = frand2(s1,s2,s3); 101 | level = self->m_nextmidpt; 102 | self->m_nextmidpt = (self->m_nextvalue + value) * 0.5; 103 | 104 | counter = (int32)(self->m_sr / sc_max(freq, 0.001f)); 105 | counter = sc_max(2, counter); 106 | float fseglen = (float)counter; 107 | curve = 2.f * (self->m_nextmidpt - level - fseglen * slope) / (fseglen * fseglen + fseglen); 108 | } 109 | 110 | int nsmps = sc_min(remain, counter); 111 | remain -= nsmps; 112 | counter -= nsmps; 113 | 114 | while (nsmps--) { 115 | *out++ = level; 116 | slope += curve; 117 | level += slope; 118 | } 119 | 120 | } while (remain); 121 | 122 | self->m_level = level; 123 | self->m_slope = slope; 124 | self->m_curve = curve; 125 | self->m_counter= counter; 126 | RPUT 127 | } 128 | 129 | void lfnoise_dsp64(t_lfnoise *self, t_object* dsp64, short* count, double samplerate, long maxvectorsize, long flags) { 130 | self->m_sr = samplerate; 131 | self->m_connected = count[0]; 132 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 133 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)lfnoise_perform64, 0, NULL); 134 | } 135 | 136 | void lfnoise_assist(t_lfnoise *x, void *b, t_assist_function io, long a, char *s) { 137 | if (io == ASSIST_INLET) { //inlet 138 | sprintf(s, "(signal/float) set freq"); 139 | } 140 | else { // outlet 141 | sprintf(s, "(signal) lfnoise"); 142 | } 143 | } 144 | 145 | void ext_main(void* r) { 146 | t_class *c; 147 | c = class_new("sc.lfnoise2~", (method)lfnoise_new, (method)dsp_free, (long)sizeof(t_lfnoise), 0L, A_DEFFLOAT, 0); 148 | 149 | class_addmethod(c, (method)lfnoise_dsp64, "dsp64", A_CANT, 0); 150 | class_addmethod(c, (method)lfnoise_assist, "assist", A_CANT, 0); 151 | class_addmethod(c, (method)lfnoise_float, "float", A_FLOAT, 0); 152 | 153 | class_dspinit(c); 154 | class_register(CLASS_BOX, c); 155 | lfnoise_class = c; 156 | } 157 | -------------------------------------------------------------------------------- /source/projects/sc.logistic_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.logistic_tilde/sc.logistic_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | sc.logistic~ 23 | (c) stephen lumenta under GPL 24 | http://www.gnu.org/licenses/gpl.html 25 | 26 | part of sc-max http://github.com/sbl/sc-max 27 | see README 28 | */ 29 | 30 | #include "c74_msp.h" 31 | #include "scmax.h" 32 | 33 | using namespace c74::max; 34 | 35 | static t_class *logistic_class = nullptr; 36 | 37 | struct t_logistic { 38 | t_pxobject ob; 39 | 40 | short m_connected[2]; 41 | double m_chaos_param; 42 | double m_freq; 43 | double m_sr; 44 | 45 | double m_y1; // init value 46 | long m_counter; 47 | }; 48 | 49 | void *logistic_new(t_symbol *s, long argc, t_atom *argv) { 50 | t_logistic *x = NULL; 51 | x = (t_logistic *)object_alloc(logistic_class); 52 | 53 | if (!x) return x; 54 | 55 | dsp_setup((t_pxobject *)x, 2); 56 | outlet_new((t_object *)x, "signal"); 57 | 58 | double chaos_param = atom_getfloat(&argv[0]); 59 | double freq = atom_getfloat(&argv[1]); 60 | 61 | x->m_chaos_param = chaos_param ? chaos_param : 3.0; 62 | x->m_freq = (short) freq ? freq : 1000.0; 63 | x->m_y1 = 0.5; 64 | x->m_counter = 0; 65 | x->m_sr = sys_getsr(); 66 | 67 | return x; 68 | } 69 | 70 | void logistic_float(t_logistic *x, double f){ 71 | switch (proxy_getinlet((t_object *)x)) { 72 | case 0: 73 | x->m_chaos_param = f; 74 | break; 75 | case 1: 76 | x->m_freq = f; 77 | break; 78 | } 79 | } 80 | 81 | void logistic_int(t_logistic *x, long l) { 82 | logistic_float(x, (double) l); 83 | } 84 | 85 | void logistic_perform64(t_logistic* self, 86 | t_object* dsp64, 87 | double** ins, 88 | long numins, 89 | double** outs, 90 | long numouts, 91 | long sampleframes, 92 | long flags, 93 | void* userparam) { 94 | double *out = outs[0]; 95 | long i; 96 | 97 | double paramf = self->m_connected[0] ? *ins[0] : self->m_chaos_param; 98 | double freq = self->m_connected[1] ? *ins[1] : self->m_freq; 99 | 100 | double y1 = self->m_y1; 101 | long counter = self->m_counter; 102 | 103 | if (self->ob.z_disabled) return ; 104 | 105 | long remain = sampleframes; 106 | if (freq > self->m_sr) freq = self->m_sr; 107 | if (freq < 0) freq = 0; 108 | 109 | do { 110 | if (counter<=0) { 111 | counter = (long)(self->m_sr / sc_max(freq, 0.001)); 112 | counter = sc_max(1, counter); 113 | y1 = paramf * y1 * (1.0 - y1); // chaotic equation 114 | } 115 | long nsmps = sc_min(counter, remain); 116 | counter -= nsmps; 117 | remain -= nsmps; 118 | 119 | for(i=0; im_y1 = y1; 126 | self->m_counter = counter; 127 | } 128 | 129 | void logistic_dsp64(t_logistic *self, t_object* dsp64, short* count, double samplerate, long maxvectorsize, long flags) { 130 | self->m_connected[0] = count[0]; 131 | self->m_connected[1] = count[1]; 132 | 133 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 134 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)logistic_perform64, 0, NULL); 135 | } 136 | 137 | void logistic_assist(t_logistic *x, void *b, t_assist_function io, long a, char *s) { 138 | if (io == ASSIST_INLET) { //inlet 139 | switch (a) { 140 | case 0: 141 | sprintf(s, "(signal/float) chaos param"); 142 | break; 143 | case 1: 144 | sprintf(s, "(signal/float) freq"); 145 | break; 146 | default: 147 | break; 148 | } 149 | } 150 | else { // outlet 151 | sprintf(s, "(signal) Logistic"); 152 | } 153 | } 154 | 155 | void ext_main(void *r) { 156 | t_class *c; 157 | c = class_new("sc.logistic~", (method)logistic_new, (method)dsp_free, (long)sizeof(t_logistic), 0, A_GIMME, 0); 158 | 159 | class_addmethod(c, (method)logistic_dsp64, "dsp64", A_CANT, 0); 160 | class_addmethod(c, (method)logistic_assist, "assist", A_CANT, 0); 161 | class_addmethod(c, (method)logistic_float, "float", A_FLOAT, 0); 162 | class_addmethod(c, (method)logistic_int, "int", A_LONG, 0); 163 | 164 | class_dspinit(c); 165 | class_register(CLASS_BOX, c); 166 | logistic_class = c; 167 | } 168 | -------------------------------------------------------------------------------- /source/projects/sc.mantissamask_tilde/sc.mantissamask_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | sc.mantissamask~ 23 | (c) stephen lumenta under GPL 24 | http://www.gnu.org/licenses/gpl.html 25 | 26 | part of sc-max http://github.com/sbl/sc-max 27 | see README 28 | */ 29 | 30 | 31 | #include "c74_msp.h" 32 | 33 | using namespace c74::max; 34 | 35 | static t_class *mantissamask_class = nullptr; 36 | 37 | struct t_mantissamask { 38 | t_pxobject ob; 39 | int m_bits; 40 | }; 41 | 42 | void *mantissamask_new(long bits) { 43 | t_mantissamask *x = (t_mantissamask *)object_alloc(mantissamask_class); 44 | 45 | if (!x) return x; 46 | 47 | dsp_setup((t_pxobject *)x, 2); 48 | outlet_new((t_object *)x, "signal"); 49 | 50 | x->m_bits = bits; 51 | 52 | return x; 53 | } 54 | 55 | void mantissamask_int(t_mantissamask *self, long bits) { 56 | if(proxy_getinlet((t_object *)self) == 1) { 57 | self->m_bits = bits; 58 | } 59 | } 60 | 61 | void mantissamask_float(t_mantissamask *self, double bits) { 62 | mantissamask_int(self, (long)bits); 63 | } 64 | 65 | void mantissamask_perform64(t_mantissamask* self, 66 | t_object* dsp64, 67 | double** ins, 68 | long numins, 69 | double** outs, 70 | long numouts, 71 | long sampleframes, 72 | long flags, 73 | void* userparam) { 74 | double *in = ins[0]; 75 | long bits = self->m_bits; 76 | 77 | double *out = (outs[0]); 78 | long mask = -1 << (53 - bits); 79 | int n = sampleframes; 80 | 81 | if (self->ob.z_disabled) return ; 82 | 83 | while (n--) 84 | *out++ = mask & (long)(*(in)++); 85 | } 86 | 87 | void mantissamask_dsp64(t_mantissamask *self, t_object* dsp64, short* count, double samplerate, long maxvectorsize, long flags) { 88 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 89 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)mantissamask_perform64, 0, NULL); 90 | } 91 | 92 | void mantissamask_assist(t_mantissamask *self, void *b, t_assist_function io, long a, char *s) { 93 | if (io == ASSIST_INLET) { //inlet 94 | switch (a) { 95 | case 0: 96 | sprintf(s, "(signal) signal to mask"); 97 | break; 98 | case 1: 99 | sprintf(s, "(float/int) bit precision"); 100 | break; 101 | } 102 | } 103 | else { // outlet 104 | sprintf(s, "(signal) masked signal"); 105 | } 106 | } 107 | 108 | void ext_main(void *r) { 109 | t_class *c; 110 | c = class_new("sc.mantissamask~", (method)mantissamask_new, (method)dsp_free, (long)sizeof(t_mantissamask), 0L, A_LONG, 0); 111 | 112 | class_addmethod(c, (method)mantissamask_dsp64, "dsp64", A_CANT, 0); 113 | class_addmethod(c, (method)mantissamask_assist, "assist", A_CANT, 0); 114 | class_addmethod(c, (method)mantissamask_float, "float", A_FLOAT, 0); 115 | class_addmethod(c, (method)mantissamask_int, "int", A_LONG, 0); 116 | 117 | class_dspinit(c); 118 | class_register(CLASS_BOX, c); 119 | mantissamask_class = c; 120 | } 121 | -------------------------------------------------------------------------------- /source/projects/sc.pinknoise_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.pinknoise_tilde/sc.pinknoise_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | euperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | sc.pinknoise~ 23 | 24 | (c) stephen lumenta under GPL 25 | http://www.gnu.org/licenses/gpl.html 26 | 27 | part of sc-max http://github.com/sbl/sc-max 28 | see README 29 | */ 30 | 31 | #include "c74_msp.h" 32 | #include "scmax.h" 33 | #include "clz.h" 34 | 35 | #define N_DICE 16 36 | 37 | using namespace c74::max; 38 | 39 | static t_class *pinknoise_class = nullptr; 40 | 41 | struct t_pinknoise { 42 | t_pxobject ob; 43 | uint32 m_dice[N_DICE]; 44 | int32 m_total; 45 | RGen rgen; 46 | }; 47 | 48 | void *pinknoise_new(long argc, t_atom *argv) { 49 | t_pinknoise *self = (t_pinknoise *)object_alloc(pinknoise_class); 50 | 51 | if (!self) return self; 52 | 53 | dsp_setup((t_pxobject *)self, 0); 54 | 55 | outlet_new((t_object *)self, "signal"); 56 | self->rgen.init(sc_randomSeed()); 57 | 58 | RGET 59 | uint32 *dice = self->m_dice; 60 | int32 total = 0; 61 | for (int i=0; i < N_DICE; ++i) { 62 | uint32 newrand = trand(s1,s2,s3) >> 13; 63 | total += newrand; 64 | dice[i] = newrand; 65 | } 66 | self->m_total = total; 67 | RPUT 68 | 69 | return self; 70 | } 71 | 72 | void pinknoise_perform64(t_pinknoise* self, 73 | t_object* dsp64, 74 | double** ins, 75 | long numins, 76 | double** outs, 77 | long numouts, 78 | long sampleframes, 79 | long flags, 80 | void* userparam) { 81 | double *out = outs[0]; 82 | int n = sampleframes; 83 | 84 | if (self->ob.z_disabled) return; 85 | 86 | RGET 87 | uint32 total = self->m_total; 88 | uint32 *dice = self->m_dice; 89 | 90 | while (n--){ 91 | uint32 counter = trand(s1,s2,s3); // Magnus Jonsson's suggestion. 92 | uint32 newrand = counter >> 13; 93 | int k = (CTZ(counter)) & 15; 94 | uint32 prevrand = dice[k]; 95 | dice[k] = newrand; 96 | total += (newrand - prevrand); 97 | newrand = trand(s1,s2,s3) >> 13; 98 | elem32 val; // ensure write before read 99 | val.u = (total + newrand) | 0x40000000; 100 | *out++ = val.f - 3.0f; 101 | counter ++; 102 | } 103 | 104 | self->m_total = total; 105 | RPUT 106 | } 107 | 108 | void pinknoise_dsp64(t_pinknoise *self, t_object* dsp64, short* count, double samplerate, long maxvectorsize, long flags) { 109 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 110 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)pinknoise_perform64, 0, NULL); 111 | } 112 | 113 | void pinknoise_assist(t_pinknoise *self, void *b, t_assist_function io, long a, char *s) { 114 | if (io == ASSIST_INLET) { 115 | sprintf(s, "Ignore this inlet"); 116 | } 117 | else { 118 | sprintf(s, "(signal) Pink Noise"); 119 | } 120 | } 121 | 122 | void ext_main(void *r) { 123 | t_class *c; 124 | c = class_new("sc.pinknoise~", (method)pinknoise_new, (method)dsp_free, (long)sizeof(t_pinknoise), 0L, A_GIMME, 0); 125 | 126 | class_addmethod(c, (method)pinknoise_dsp64, "dsp64", A_CANT, 0); 127 | class_addmethod(c, (method)pinknoise_assist, "assist", A_CANT, 0); 128 | 129 | class_dspinit(c); 130 | class_register(CLASS_BOX, c); 131 | pinknoise_class = c; 132 | } 133 | -------------------------------------------------------------------------------- /source/projects/sc.range_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.range_tilde/sc.range_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | sc.range~ 3 | 4 | Not really a SC Ugen. A convenience to scale a signal to determined values. 5 | Scaling can be for polar (0 - 1) or bipolar (-1 - 1) values. 6 | 7 | We use attributes and only floats to set the boundaries since this is mostly not modulated. 8 | 9 | (c) stephen lumenta under GPL 10 | http://www.gnu.org/licenses/gpl.html 11 | 12 | part of sc-max http://github.com/sbl/sc-max 13 | see README 14 | */ 15 | 16 | #include "c74_msp.h" 17 | 18 | using namespace c74::max; 19 | 20 | static t_class *range_class = nullptr; 21 | 22 | struct t_range { 23 | t_pxobject ob; 24 | short m_connected; 25 | char m_mode; // 0: bipolar (default) 1: unipolar 26 | double m_high, m_low; // boundaries 27 | }; 28 | 29 | void *range_new(t_symbol *s, long ac, t_atom *av) { 30 | t_range *self = NULL; 31 | self = (t_range *)object_alloc(range_class); 32 | 33 | if (!self) return self; 34 | 35 | dsp_setup((t_pxobject *)self, 1); 36 | outlet_new((t_object *)self, "signal"); 37 | 38 | self->m_low = 0.0; 39 | self->m_high = 1.0; 40 | self->m_mode = 0; // bipolar 41 | 42 | attr_args_process(self, ac, av); 43 | 44 | return self; 45 | } 46 | 47 | void range_perform64(t_range* self, 48 | t_object* dsp64, 49 | double** ins, 50 | long numins, 51 | double** outs, 52 | long numouts, 53 | long sampleframes, 54 | long flags, 55 | void* userparam) { 56 | double *in = ins[0]; 57 | double *out = outs[0]; 58 | int n = sampleframes; 59 | double hi = self->m_high; 60 | double lo = self->m_low; 61 | 62 | if (self->ob.z_disabled) return ; 63 | 64 | while (n--){ 65 | double mul, add; 66 | 67 | // bipolar 68 | if(self->m_mode == 0){ 69 | mul = (hi - lo) * 0.5; 70 | add = mul + lo; 71 | } 72 | // unipolar 73 | else { 74 | mul = hi - lo; 75 | add = lo; 76 | } 77 | 78 | *out++ = (double)(*in++ * mul) + add; 79 | } 80 | } 81 | 82 | void range_dsp64(t_range *self, t_object* dsp64, short* count, double samplerate, long maxvectorsize, long flags) { 83 | self->m_connected = count[0]; 84 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 85 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)range_perform64, 0, NULL); 86 | } 87 | 88 | void range_assist(t_range *self, void *b, t_assist_function io, long a, char *s) { 89 | if (io == ASSIST_INLET) { 90 | sprintf(s, "(signal) something to scale"); 91 | } 92 | else { 93 | sprintf(s, "(signal) scaled signal"); 94 | } 95 | } 96 | 97 | void ext_main(void *r) { 98 | t_class *c; 99 | c = class_new("sc.range~", (method)range_new, (method)dsp_free, (long)sizeof(t_range), 0L, A_GIMME, 0); 100 | 101 | class_addmethod(c, (method)range_dsp64, "dsp64", A_CANT, 0); 102 | class_addmethod(c, (method)range_assist, "assist", A_CANT, 0); 103 | 104 | CLASS_ATTR_DOUBLE(c, "low", ATTR_FLAGS_NONE, t_range, m_low); 105 | CLASS_ATTR_DOUBLE(c, "high", ATTR_FLAGS_NONE, t_range, m_high); 106 | CLASS_ATTR_CHAR(c, "mode", ATTR_FLAGS_NONE, t_range, m_mode); 107 | CLASS_ATTR_STYLE_LABEL(c, "mode", ATTR_FLAGS_NONE, "onoff", "mode"); 108 | 109 | class_dspinit(c); 110 | class_register(CLASS_BOX, c); 111 | range_class = c; 112 | } 113 | -------------------------------------------------------------------------------- /source/projects/sc.weaklynonlinear_tilde/sc.weaklynonlinear_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | Original Ugens by Nick Collins 21 | SLUGens released under the GNU GPL as extensions for SuperCollider 3, by Nick Collins, http://www.informatics.sussex.ac.uk/users/nc81/ 22 | */ 23 | 24 | /* 25 | sc.weaklynonlinear~ 26 | (c) stephen lumenta under GPL 27 | http://www.gnu.org/licenses/gpl.html 28 | 29 | part of sc-max http://github.com/sbl/sc-max 30 | see README 31 | */ 32 | 33 | #include "c74_msp.h" 34 | 35 | using namespace c74::max; 36 | 37 | static t_class *weaklynonlinear_class = nullptr; 38 | 39 | struct t_weaklynonlinear { 40 | t_pxobject ob; 41 | double x,y,t; 42 | int reset; 43 | double pi_sr; 44 | 45 | double ratex, ratey, freq, initx, inity, alpha, xexponent, beta, yexponent; 46 | }; 47 | 48 | void *weaklynonlinear_new(t_symbol *s, long ac, t_atom *av) { 49 | t_weaklynonlinear *x = (t_weaklynonlinear *)object_alloc(weaklynonlinear_class); 50 | 51 | dsp_setup((t_pxobject *)x, 1); 52 | 53 | x->x = 0.0; 54 | x->y = 0.0; 55 | x->t = 0.0; 56 | 57 | x->pi_sr = 1.0; 58 | x->reset = 0; 59 | x->ratex = 1; 60 | x->ratey = 1; 61 | x->freq = 440; 62 | x->initx = 0; 63 | x->inity = 0; 64 | x->alpha = 0.; 65 | x->xexponent = 0; 66 | x->beta = 0; 67 | x->yexponent = 0; 68 | 69 | attr_args_process(x, ac, av); 70 | outlet_new((t_object *)x, "signal"); 71 | 72 | return x; 73 | } 74 | 75 | void weaklynonlinear_perform64(t_weaklynonlinear* self, 76 | t_object* dsp64, 77 | double** ins, 78 | long numins, 79 | double** outs, 80 | long numouts, 81 | long sampleframes, 82 | long flags, 83 | void* userparam) { 84 | double *in = ins[0]; 85 | double *out = outs[0]; 86 | long n = sampleframes; 87 | 88 | int reset = self->reset; 89 | double xrate = self->ratex; 90 | double yrate = self->ratey; 91 | double w0 = self->freq; 92 | double alpha = self->alpha; 93 | double xexponent = self->xexponent; 94 | double beta = self->beta; 95 | double yexponent = self->yexponent; 96 | 97 | w0 = w0 * self->pi_sr; //convert frequency in Hertz to angular frequency 98 | w0 = w0 * w0; //constant needed for equation 99 | 100 | double x, y, t; 101 | 102 | x = self->x; 103 | y = self->y; 104 | t = self->t; 105 | 106 | if(reset){ 107 | x = self->x; 108 | y = self->y; 109 | t=0; 110 | } 111 | 112 | for (int j = 0; j < n; ++j) { 113 | //the naive Euler update 114 | double dxdt = xrate * y; 115 | double nonlinear = 0.0; 116 | 117 | if(alpha > 0.000001 || alpha < (-0.000001)) { 118 | nonlinear = alpha * (pow(x,xexponent)+beta)*(pow(y,yexponent)); 119 | } 120 | 121 | double dydt = yrate * (*in++ - w0 * x + nonlinear); 122 | x += dxdt; 123 | y += dydt; 124 | 125 | if ((x>1.0) || (x<-1.0)) 126 | x=fabs(fmod((x-1.0),4.0)-2.0)-1.0; 127 | 128 | *out++ = x; 129 | } 130 | 131 | self->x = x; 132 | self->y = y; 133 | self->t = t; 134 | } 135 | 136 | void weaklynonlinear_dsp64(t_weaklynonlinear *self, 137 | t_object* dsp64, 138 | short* count, 139 | double samplerate, 140 | long maxvectorsize, 141 | long flags) { 142 | self->pi_sr = M_PI / samplerate; 143 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 144 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)weaklynonlinear_perform64, 0, NULL); 145 | } 146 | 147 | void weaklynonlinear_assist(t_weaklynonlinear *x, void *b, long m, long a, char *s) { 148 | if (m == ASSIST_INLET) { //inlet 149 | sprintf(s, "(signal) Audio Rate input: acts as external force"); 150 | } 151 | else { // outlet 152 | sprintf(s, "(signal) Weakly Nonlinear Oscillator"); 153 | } 154 | } 155 | 156 | void ext_main(void *r) { 157 | t_class *c = class_new("sc.weaklynonlinear~", 158 | (method)weaklynonlinear_new, 159 | (method)dsp_free, 160 | (long)sizeof(t_weaklynonlinear), 161 | 0, 162 | NULL, 163 | 0); 164 | 165 | class_addmethod(c, (method)weaklynonlinear_dsp64, "dsp64", A_CANT, 0); 166 | class_addmethod(c, (method)weaklynonlinear_assist, "assist", A_CANT, 0); 167 | 168 | CLASS_ATTR_LONG (c, "reset", ATTR_FLAGS_NONE, t_weaklynonlinear, reset); 169 | CLASS_ATTR_DOUBLE(c, "ratex", ATTR_FLAGS_NONE, t_weaklynonlinear, ratex); 170 | CLASS_ATTR_DOUBLE(c, "ratey", ATTR_FLAGS_NONE, t_weaklynonlinear, ratey); 171 | CLASS_ATTR_DOUBLE(c, "freq", ATTR_FLAGS_NONE, t_weaklynonlinear, freq); 172 | CLASS_ATTR_DOUBLE(c, "initx", ATTR_FLAGS_NONE, t_weaklynonlinear, initx); 173 | CLASS_ATTR_DOUBLE(c, "inity", ATTR_FLAGS_NONE, t_weaklynonlinear, inity); 174 | CLASS_ATTR_DOUBLE(c, "alpha", ATTR_FLAGS_NONE, t_weaklynonlinear, alpha); 175 | CLASS_ATTR_DOUBLE(c, "beta", ATTR_FLAGS_NONE, t_weaklynonlinear, beta); 176 | CLASS_ATTR_DOUBLE(c, "xexponent", ATTR_FLAGS_NONE, t_weaklynonlinear, xexponent); 177 | CLASS_ATTR_DOUBLE(c, "yexponent", ATTR_FLAGS_NONE, t_weaklynonlinear, yexponent); 178 | 179 | class_dspinit(c); 180 | class_register(CLASS_BOX, c); 181 | 182 | weaklynonlinear_class = c; 183 | } 184 | -------------------------------------------------------------------------------- /source/projects/sc.whitenoise_tilde/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-pretarget.cmake) 2 | 3 | add_library( 4 | ${PROJECT_NAME} 5 | MODULE 6 | ${PROJECT_NAME}.cpp 7 | ) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../scmax-posttarget.cmake) -------------------------------------------------------------------------------- /source/projects/sc.whitenoise_tilde/sc.whitenoise_tilde.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SuperCollider real time audio synthesis system 3 | Copyright (c) 2002 James McCartney. All rights reserved. 4 | http://www.audiosynth.com 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /* 22 | 23 | sc.whitenoise~ 24 | (c) stephen lumenta under GPL 25 | http://www.gnu.org/licenses/gpl.html 26 | 27 | part of sc-max http://github.com/sbl/sc-max 28 | see README 29 | */ 30 | 31 | #include "c74_msp.h" 32 | #include "scmax.h" 33 | 34 | using namespace c74::max; 35 | 36 | 37 | static t_class* this_class = nullptr; 38 | 39 | struct t_whitenoise { 40 | t_pxobject ob; 41 | RGen rgen; 42 | }; 43 | 44 | void *whitenoise_new(long argc, t_atom *argv) { 45 | t_whitenoise *self = (t_whitenoise *)object_alloc(this_class); 46 | 47 | dsp_setup((t_pxobject *)self, 0); 48 | outlet_new((t_object *)self, "signal"); 49 | self->rgen.init(sc_randomSeed()); 50 | 51 | return self; 52 | } 53 | 54 | void whitenoise_perform64(t_whitenoise* self, 55 | t_object* dsp64, 56 | double** ins, 57 | long numins, 58 | double** outs, 59 | long numouts, 60 | long sampleframes, 61 | long flags, 62 | void* userparam) { 63 | double *out = outs[0]; 64 | long n = sampleframes; 65 | 66 | RGET 67 | while (n--){ 68 | *out++ = frand2(s1, s2, s3); 69 | } 70 | RPUT 71 | } 72 | 73 | void whitenoise_dsp64(t_whitenoise *self, 74 | t_object* dsp64, 75 | short* count, 76 | double samplerate, 77 | long maxvectorsize, 78 | long flags) { 79 | object_method_direct(void, (t_object*, t_object*, t_perfroutine64, long, void*), 80 | dsp64, gensym("dsp_add64"), (t_object*)self, (t_perfroutine64)whitenoise_perform64, 0, NULL); 81 | } 82 | 83 | void whitenoise_assist(t_whitenoise *self, 84 | void *unused, 85 | t_assist_function io, 86 | long index, 87 | char *s) { 88 | if (io == ASSIST_INLET) { //inlet 89 | sprintf(s, "Ignore this inlet"); 90 | } 91 | else { // outlet 92 | sprintf(s, "(signal) White Noise"); 93 | } 94 | } 95 | 96 | void ext_main(void* r) { 97 | this_class = class_new("sc.whitenoise~", 98 | (method)whitenoise_new, 99 | (method)dsp_free, 100 | (long)sizeof(t_whitenoise), 101 | 0, A_GIMME, 0); 102 | 103 | class_addmethod(this_class, (method)whitenoise_dsp64, "dsp64", A_CANT, 0); 104 | class_addmethod(this_class, (method)whitenoise_assist, "assist", A_CANT, 0); 105 | 106 | class_dspinit(this_class); 107 | class_register(CLASS_BOX, this_class); 108 | } 109 | -------------------------------------------------------------------------------- /source/projects/scmax-posttarget.cmake: -------------------------------------------------------------------------------- 1 | #set(C74_CXX_STANDARD 98) 2 | target_include_directories( 3 | ${PROJECT_NAME} PRIVATE 4 | 5 | "${C74_INCLUDES}" 6 | ${CMAKE_CURRENT_SOURCE_DIR}/../../include 7 | ${SC_PATH}/include/common 8 | ${SC_PATH}/include/plugin_interface 9 | ) 10 | 11 | include(${C74_MAX_API_DIR}/script/max-posttarget.cmake) 12 | -------------------------------------------------------------------------------- /source/projects/scmax-pretarget.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | string(REGEX REPLACE "(.*)/" "" THIS_FOLDER_NAME "${CMAKE_CURRENT_SOURCE_DIR}") 4 | project(${THIS_FOLDER_NAME}) 5 | 6 | include(${C74_MAX_API_DIR}/script/max-pretarget.cmake) --------------------------------------------------------------------------------