├── .gitignore ├── .gitmodules ├── LICENCE ├── README.md ├── UnityPd ├── Android.meta ├── Android │ ├── UnityPdHelper.jar │ ├── UnityPdHelper.jar.meta │ ├── arm64-v8a │ │ ├── libAudioPlugin_UnityPd.a │ │ └── libAudioPlugin_UnityPd.so │ ├── armeabi-v7a │ │ ├── libAudioPlugin_UnityPd.a │ │ └── libAudioPlugin_UnityPd.so │ ├── armeabi.meta │ ├── armeabi │ │ ├── libAudioPlugin_UnityPd.so │ │ └── libAudioPlugin_UnityPd.so.meta │ ├── x86.meta │ └── x86 │ │ ├── libAudioPlugin_UnityPd.a │ │ ├── libAudioPlugin_UnityPd.so │ │ └── libAudioPlugin_UnityPd.so.meta ├── Bindings.meta ├── Bindings │ ├── UnityPD.cs │ └── UnityPD.cs.meta ├── OSX.meta ├── OSX │ ├── AudioPlugin_UnityPd.bundle.meta │ └── AudioPlugin_UnityPd.bundle │ │ ├── Contents.meta │ │ └── Contents │ │ ├── Info.plist │ │ ├── Info.plist.meta │ │ ├── MacOS.meta │ │ └── MacOS │ │ ├── AudioPlugin_UnityPd │ │ └── AudioPlugin_UnityPd.meta ├── Release.md ├── Release.md.meta ├── Utility.meta ├── Utility │ ├── SilentAudioSource.cs │ └── SilentAudioSource.cs.meta ├── Windows.meta ├── Windows │ ├── AudioPluginDemo.dll │ └── AudioPluginDemo.dll.meta ├── iOS.meta └── iOS │ ├── include.meta │ ├── include │ ├── AudioPluginInterface.h │ ├── AudioPluginInterface.h.meta │ ├── AudioPlugin_UnityPd_iOS.h │ └── AudioPlugin_UnityPd_iOS.h.meta │ ├── libAudioPlugin_UnityPd.a │ └── libAudioPlugin_UnityPd.a.meta ├── UnityTest ├── Assets │ ├── DotSoundConfig.asset │ ├── DotSoundConfig.asset.meta │ ├── DotsSynth.unity │ ├── DotsSynth.unity.meta │ ├── Master.mixer │ ├── Master.mixer.meta │ ├── Plugins.meta │ ├── Plugins │ │ ├── UnityPd │ │ ├── UnityPd.meta │ │ ├── iOS.meta │ │ └── iOS │ │ │ ├── UnityPdAppController.mm │ │ │ └── UnityPdAppController.mm.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── DotSoundConfig.cs │ │ ├── DotSoundConfig.cs.meta │ │ ├── DotSoundPlayer.cs │ │ ├── DotSoundPlayer.cs.meta │ │ ├── PDTest.cs │ │ └── PDTest.cs.meta │ ├── StreamingAssets.meta │ └── StreamingAssets │ │ ├── pd.meta │ │ └── pd │ │ ├── adder.pd │ │ ├── adder.pd.meta │ │ ├── envelope.pd │ │ ├── envelope.pd.meta │ │ ├── noteControl.pd │ │ ├── noteControl.pd.meta │ │ ├── simpleNote.pd │ │ ├── simpleNote.pd.meta │ │ ├── simpleSynth.pd │ │ └── simpleSynth.pd.meta └── ProjectSettings │ ├── AudioManager.asset │ ├── AudioManager.asset.orig │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NavMeshLayers.asset │ ├── NetworkManager.asset │ ├── Physics2DSettings.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── QualitySettings.asset.orig │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityAdsSettings.asset │ └── UnityConnectSettings.asset └── src ├── Android ├── .gitignore ├── Android.iml ├── app │ └── app.iml └── jni │ ├── Android.mk │ └── Application.mk ├── Plugin_UnityPd.cpp ├── UnityNativeAudioPlugin ├── AudioPluginInterface.h ├── AudioPluginUtil.cpp ├── AudioPluginUtil.h ├── LICENCE └── PluginList.h ├── UnityPdAndroidHelper ├── AndroidManifest.xml ├── ant.properties ├── bin │ ├── AndroidManifest.xml │ ├── R.txt │ ├── UnityPdHelper.jar │ ├── build.prop │ ├── classes.jar │ ├── classes │ │ └── com │ │ │ └── weplaydots │ │ │ └── UnityPdHelper │ │ │ ├── BuildConfig.class │ │ │ ├── R$attr.class │ │ │ ├── R$drawable.class │ │ │ ├── R$layout.class │ │ │ ├── R$string.class │ │ │ ├── R.class │ │ │ └── UnityPdHelper.class │ ├── proguard.txt │ └── res │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ └── drawable-xhdpi │ │ └── ic_launcher.png ├── build.xml ├── gen │ └── com │ │ └── weplaydots │ │ └── UnityPdHelper │ │ ├── BuildConfig.java │ │ └── R.java ├── proguard-project.txt ├── project.properties ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-ldpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── layout │ │ └── main.xml │ └── values │ │ └── strings.xml └── src │ └── UnityPdHelper.java ├── VisualStudio ├── AudioPluginDemo.vcproj ├── AudioPluginDemo.vcxproj ├── AudioPluginDemo.vcxproj.filters └── UpgradeLog.htm └── Xcode ├── .gitignore ├── AudioPlugin_UnityPd.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── AudioPlugin_UnityPd.xcscmblueprint ├── AudioPlugin_UnityPd_iOS ├── AudioPlugin_UnityPd_iOS.h └── AudioPlugin_UnityPd_iOS.m └── Info.plist /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.info 3 | 4 | UnityTest/[Ll]ibrary/ 5 | UnityTest/[Tt]emp/ 6 | UnityTest/[Oo]bj/ 7 | UnityTest/[Bb]uilds/ 8 | 9 | # Autogenerated VS/MD solution and project files 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.bin 20 | 21 | # Unity3D generated meta files 22 | *.pidb.meta 23 | 24 | # Unity3D Generated File On Crash Reports 25 | sysinfo.txt 26 | 27 | *.apk 28 | *.o 29 | *.d 30 | 31 | ## NDK build files 32 | .idea/ 33 | src/Android/obj/ 34 | src/Android/libs/ 35 | 36 | ## Android Java ignore files 37 | src/UnityPdAndroidHelper/local.properties 38 | src/UnityPdAndroidHelper/bin 39 | 40 | ## Other 41 | *.xccheckout 42 | *.moved-aside 43 | *.xcuserstate 44 | 45 | xcuserdata/ 46 | 47 | src/Xcode/DotsSynthNative/Library/metadata/ 48 | 49 | ######################### 50 | # .gitignore file for Xcode4 and Xcode5 Source projects 51 | # 52 | # Apple bugs, waiting for Apple to fix/respond: 53 | # 54 | # 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? 55 | # 56 | # Version 2.3 57 | # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects 58 | # 59 | # 2014 updates: 60 | # - appended non-standard items DISABLED by default (uncomment if you use those tools) 61 | # - removed the edit that an SO.com moderator made without bothering to ask me 62 | # - researched CocoaPods .lock more carefully, thanks to Gokhan Celiker 63 | # 2013 updates: 64 | # - fixed the broken "save personal Schemes" 65 | # - added line-by-line explanations for EVERYTHING (some were missing) 66 | # 67 | # NB: if you are storing "built" products, this WILL NOT WORK, 68 | # and you should use a different .gitignore (or none at all) 69 | # This file is for SOURCE projects, where there are many extra 70 | # files that we want to exclude 71 | # 72 | ######################### 73 | 74 | ##### 75 | # OS X temporary files that should never be committed 76 | # 77 | # c.f. http://www.westwind.com/reference/os-x/invisibles.html 78 | 79 | .DS_Store 80 | 81 | # c.f. http://www.westwind.com/reference/os-x/invisibles.html 82 | 83 | .Trashes 84 | 85 | # c.f. http://www.westwind.com/reference/os-x/invisibles.html 86 | 87 | *.swp 88 | 89 | # 90 | # *.lock - this is used and abused by many editors for many different things. 91 | # For the main ones I use (e.g. Eclipse), it should be excluded 92 | # from source-control, but YMMV. 93 | # (lock files are usually local-only file-synchronization on the local FS that should NOT go in git) 94 | # c.f. the "OPTIONAL" section at bottom though, for tool-specific variations! 95 | 96 | *.lock 97 | 98 | 99 | # 100 | # profile - REMOVED temporarily (on double-checking, I can't find it in OS X docs?) 101 | #profile 102 | 103 | 104 | #### 105 | # Xcode temporary files that should never be committed 106 | # 107 | # NB: NIB/XIB files still exist even on Storyboard projects, so we want this... 108 | 109 | *~.nib 110 | 111 | 112 | #### 113 | # Xcode build files - 114 | # 115 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData" 116 | 117 | DerivedData/ 118 | 119 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build" 120 | 121 | build/ 122 | 123 | 124 | ##### 125 | # Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) 126 | # 127 | # This is complicated: 128 | # 129 | # SOMETIMES you need to put this file in version control. 130 | # Apple designed it poorly - if you use "custom executables", they are 131 | # saved in this file. 132 | # 99% of projects do NOT use those, so they do NOT want to version control this file. 133 | # ..but if you're in the 1%, comment out the line "*.pbxuser" 134 | 135 | # .pbxuser: http://lists.apple.com/archives/xcode-users/2004/Jan/msg00193.html 136 | 137 | *.pbxuser 138 | 139 | # .mode1v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html 140 | 141 | *.mode1v3 142 | 143 | # .mode2v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html 144 | 145 | *.mode2v3 146 | 147 | # .perspectivev3: http://stackoverflow.com/questions/5223297/xcode-projects-what-is-a-perspectivev3-file 148 | 149 | *.perspectivev3 150 | 151 | # NB: also, whitelist the default ones, some projects need to use these 152 | !default.pbxuser 153 | !default.mode1v3 154 | !default.mode2v3 155 | !default.perspectivev3 156 | 157 | 158 | #### 159 | # Xcode 4 - semi-personal settings 160 | # 161 | # 162 | # OPTION 1: --------------------------------- 163 | # throw away ALL personal settings (including custom schemes! 164 | # - unless they are "shared") 165 | # 166 | # NB: this is exclusive with OPTION 2 below 167 | xcuserdata 168 | 169 | # OPTION 2: --------------------------------- 170 | # get rid of ALL personal settings, but KEEP SOME OF THEM 171 | # - NB: you must manually uncomment the bits you want to keep 172 | # 173 | # NB: this *requires* git v1.8.2 or above; you may need to upgrade to latest OS X, 174 | # or manually install git over the top of the OS X version 175 | # NB: this is exclusive with OPTION 1 above 176 | # 177 | #xcuserdata/**/* 178 | 179 | # (requires option 2 above): Personal Schemes 180 | # 181 | #!xcuserdata/**/xcschemes/* 182 | 183 | #### 184 | # XCode 4 workspaces - more detailed 185 | # 186 | # Workspaces are important! They are a core feature of Xcode - don't exclude them :) 187 | # 188 | # Workspace layout is quite spammy. For reference: 189 | # 190 | # /(root)/ 191 | # /(project-name).xcodeproj/ 192 | # project.pbxproj 193 | # /project.xcworkspace/ 194 | # contents.xcworkspacedata 195 | # /xcuserdata/ 196 | # /(your name)/xcuserdatad/ 197 | # UserInterfaceState.xcuserstate 198 | # /xcsshareddata/ 199 | # /xcschemes/ 200 | # (shared scheme name).xcscheme 201 | # /xcuserdata/ 202 | # /(your name)/xcuserdatad/ 203 | # (private scheme).xcscheme 204 | # xcschememanagement.plist 205 | # 206 | # 207 | 208 | #### 209 | # Xcode 4 - Deprecated classes 210 | # 211 | # Allegedly, if you manually "deprecate" your classes, they get moved here. 212 | # 213 | # We're using source-control, so this is a "feature" that we do not want! 214 | 215 | *.moved-aside 216 | 217 | #### 218 | # OPTIONAL: Some well-known tools that people use side-by-side with Xcode / iOS development 219 | # 220 | # NB: I'd rather not include these here, but gitignore's design is weak and doesn't allow 221 | # modular gitignore: you have to put EVERYTHING in one file. 222 | # 223 | # COCOAPODS: 224 | # 225 | # c.f. http://guides.cocoapods.org/using/using-cocoapods.html#what-is-a-podfilelock 226 | # c.f. http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 227 | # 228 | #!Podfile.lock 229 | # 230 | # RUBY: 231 | # 232 | # c.f. http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ 233 | # 234 | #!Gemfile.lock 235 | # 236 | # IDEA: 237 | # 238 | #.idea 239 | # 240 | # TEXTMATE: 241 | # 242 | # -- UNVERIFIED: c.f. http://stackoverflow.com/a/50283/153422 243 | # 244 | #tm_build_errors 245 | 246 | #### 247 | # UNKNOWN: recommended by others, but I can't discover what these files are 248 | # 249 | # Community suggestions (unverified, no evidence available - DISABLED by default) 250 | # 251 | # 1. Xcode 5 - VCS file 252 | # 253 | # "The data in this file not represent state of your project. 254 | # If you'll leave this file in git - you will have merge conflicts during 255 | # pull your cahnges to other's repo" 256 | # 257 | #*.xccheckout -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libpd"] 2 | path = libpd 3 | url=https://github.com/playdots/libpd.git 4 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Playdots, Inc. where marked 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityPd 2 | Procedural audio for Unity, generated using Pure Data 3 | 4 | Based on libpd which is an embeddable version of 5 | pure-data which is a tiny audio synthesis library 6 | 7 | This project builds Unity Native Audio 8 | plugin versions of libpd, and provides the bindings for some common functions. 9 | 10 | 11 | ## How 2 Build 12 | This is distributed with pre-built release binaries inside `UnityPd/Platform`, 13 | but if you want to build yourself, follow these steps to replace them 14 | 15 | ### iOS & OSX 16 | 17 | #### libPD & Unity native audio plugin 18 | Open XCode project in `src/Xcode` 19 | iOS Switch target to AudioPlugin_UnityPd_iOS, Destination to Generic iOS device 20 | For OSX Switch target to AudioPluginDemo, Destination as default 21 | 22 | Build to archive to make release version of plugin. If you do this, remember to get the plugin out of the archive, 23 | since it won't be copied to `UnityPd/iOS` like normal 24 | 25 | ### Android (arm & x86) 26 | 27 | #### libPD & Unity native audio plugin 28 | Get the JDK! 29 | 30 | `cd src/Android` 31 | `ndk-build` (or `ndk-build DEBUG=true` for a debug enabled .so) 32 | 33 | #### UnityPdAndroidHelper 34 | Android also neeeds an additional jar to help Pd with its crazy file system 35 | Get Ant if you don't have it already! 36 | 37 | `cd src/UnityPdAndroidHelper` 38 | `ant jar` 39 | 40 | ### Windows 41 | Sorry, I couldn't get libpd working on Windows with my limited Windows knowledge. 42 | But there currently is a dummy plugin + bindings so that developers can work on windows (just with no Pd) 43 | 44 | 45 | ## How 2 Add 2 Unity 46 | 47 | Copy the `UnityPd` folder into your project's `Plugins` folder. Unity should be smart 48 | enough to set up all the plugins for each platform, but check that each Plugin is only enabled on the 49 | appropriate platform if you have issues. 50 | 51 | Add an Audio Mixer Group to your project if you haven't already, and then a `UnityPD` effect to a mixer. 52 | If you want to purely generate sound with Pd, make sure to turn `Auto Mixer Suspend` on the Mixer Group to 53 | make sure Pd keeps receiving process calls even when no sounds are being generated. 54 | 55 | ### iOS 56 | Unity on iOS needs to load the plugin when the app starts up. To do this you need to edit the `UnityAppController.mm` file: 57 | - add `#import "AudioPluginInterface.h;` (this header is included with the iOS plugin files 58 | - find the `preStartUnity` method and add the line `UnityRegisterAudioPlugin(&UnityGetAudioEffectDefinitions);` 59 | 60 | Alternatively, you can override AppController, see the example project `Assets/Plugins/iOS/UnityPdAppController` for an example 61 | 62 | ## How 2 Use 63 | 64 | UnityPD functions are all defined in `UnityPd.cs`. Currently only simple bindings are included: 65 | - Init() 66 | Call before any other UnityPD functions. This enables Pd's audio processing, and adds the default patch 67 | folder (`StreamingAssets/pd`) to Pd's search path. On android it also copies the patches to a folder outside 68 | the apk so that Pd can find dependencies 69 | 70 | - Deinit() 71 | Closes the UnityPd session 72 | 73 | - OpenPatch( string patchName ) 74 | Tells Pd to open an instance of the patch of the given name from inside the StreamingAssets/Pd folder. Returns the $0(id) 75 | of the opened patch 76 | 77 | - ClosePatch( int patchHandle ) 78 | Closes the patch with the given $0 handle 79 | 80 | #### Messages 81 | (remember receivers are global across all open patches) 82 | 83 | - SendFloat( string receiver, float message ) 84 | Send a float to the given receiver 85 | 86 | - SendBang( string receiver ) 87 | Send a bang to the given receiver 88 | 89 | - SendSymbol( string receiver, string symbol ) 90 | Send a symbol(pd speak for string) to the given receiver -------------------------------------------------------------------------------- /UnityPd/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aff3729fe5af046988edf3f0d14b1943 3 | folderAsset: yes 4 | timeCreated: 1458240565 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/Android/UnityPdHelper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Android/UnityPdHelper.jar -------------------------------------------------------------------------------- /UnityPd/Android/UnityPdHelper.jar.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 515154099fe7442f497a006e71210d66 3 | timeCreated: 1458240567 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Android: 12 | enabled: 1 13 | settings: {} 14 | Any: 15 | enabled: 0 16 | settings: {} 17 | Editor: 18 | enabled: 0 19 | settings: 20 | DefaultValueInitialized: true 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /UnityPd/Android/arm64-v8a/libAudioPlugin_UnityPd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Android/arm64-v8a/libAudioPlugin_UnityPd.a -------------------------------------------------------------------------------- /UnityPd/Android/arm64-v8a/libAudioPlugin_UnityPd.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Android/arm64-v8a/libAudioPlugin_UnityPd.so -------------------------------------------------------------------------------- /UnityPd/Android/armeabi-v7a/libAudioPlugin_UnityPd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Android/armeabi-v7a/libAudioPlugin_UnityPd.a -------------------------------------------------------------------------------- /UnityPd/Android/armeabi-v7a/libAudioPlugin_UnityPd.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Android/armeabi-v7a/libAudioPlugin_UnityPd.so -------------------------------------------------------------------------------- /UnityPd/Android/armeabi.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb54e0913b5f14e6e9a9fdd7b7992534 3 | folderAsset: yes 4 | timeCreated: 1467904510 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/Android/armeabi/libAudioPlugin_UnityPd.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Android/armeabi/libAudioPlugin_UnityPd.so -------------------------------------------------------------------------------- /UnityPd/Android/armeabi/libAudioPlugin_UnityPd.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34e192d2e95f642a99e7399da6496b18 3 | timeCreated: 1467904513 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 1 10 | platformData: 11 | Android: 12 | enabled: 1 13 | settings: 14 | CPU: ARMv7 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | DefaultValueInitialized: true 23 | OS: AnyOS 24 | Linux: 25 | enabled: 0 26 | settings: 27 | CPU: x86 28 | Linux64: 29 | enabled: 0 30 | settings: 31 | CPU: x86_64 32 | OSXIntel: 33 | enabled: 0 34 | settings: 35 | CPU: AnyCPU 36 | OSXIntel64: 37 | enabled: 0 38 | settings: 39 | CPU: AnyCPU 40 | Win: 41 | enabled: 0 42 | settings: 43 | CPU: AnyCPU 44 | Win64: 45 | enabled: 0 46 | settings: 47 | CPU: AnyCPU 48 | iOS: 49 | enabled: 0 50 | settings: 51 | CompileFlags: 52 | FrameworkDependencies: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityPd/Android/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10d14e3812fd34bd497ac3bbc384c580 3 | folderAsset: yes 4 | timeCreated: 1467904510 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/Android/x86/libAudioPlugin_UnityPd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Android/x86/libAudioPlugin_UnityPd.a -------------------------------------------------------------------------------- /UnityPd/Android/x86/libAudioPlugin_UnityPd.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Android/x86/libAudioPlugin_UnityPd.so -------------------------------------------------------------------------------- /UnityPd/Android/x86/libAudioPlugin_UnityPd.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb3f4894025d741d5a5116e743a3e4eb 3 | timeCreated: 1467904513 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 1 10 | platformData: 11 | Android: 12 | enabled: 1 13 | settings: 14 | CPU: x86 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | DefaultValueInitialized: true 23 | OS: AnyOS 24 | Linux: 25 | enabled: 0 26 | settings: 27 | CPU: x86 28 | Linux64: 29 | enabled: 0 30 | settings: 31 | CPU: x86_64 32 | OSXIntel: 33 | enabled: 0 34 | settings: 35 | CPU: AnyCPU 36 | OSXIntel64: 37 | enabled: 0 38 | settings: 39 | CPU: AnyCPU 40 | Win: 41 | enabled: 0 42 | settings: 43 | CPU: AnyCPU 44 | Win64: 45 | enabled: 0 46 | settings: 47 | CPU: AnyCPU 48 | iOS: 49 | enabled: 0 50 | settings: 51 | CompileFlags: 52 | FrameworkDependencies: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityPd/Bindings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37242b476deb142578b3a6f2f09f1443 3 | folderAsset: yes 4 | timeCreated: 1458240565 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/Bindings/UnityPD.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Playdots, Inc. 3 | * 4 | * ---------------------------- 5 | */ 6 | 7 | using UnityEngine; 8 | using UnityEngine.Assertions; 9 | using UnityEngine.UI; 10 | using System.Collections; 11 | using System.Collections.Generic; 12 | using System.Runtime.InteropServices; 13 | using System.Runtime.CompilerServices; 14 | using System; 15 | using System.IO; 16 | 17 | /// 18 | /// Bridge for PdCalls 19 | /// 20 | public class UnityPD : MonoBehaviour { 21 | const string PATCH_DIR = "pd"; 22 | 23 | private static UnityPD _instance; 24 | 25 | public static string PdPatchDirectory { 26 | get { 27 | #if UNITY_ANDROID && !UNITY_EDITOR 28 | return Path.Combine( Application.persistentDataPath, PATCH_DIR ); 29 | #else 30 | return Path.Combine( Application.streamingAssetsPath, PATCH_DIR ); 31 | #endif 32 | } 33 | } 34 | 35 | void Awake() { 36 | if ( _instance && _instance != this ) { 37 | Logger.LogWarning( "UnityPD already in scene, destroying" ); 38 | Destroy( gameObject ); 39 | return; 40 | } 41 | 42 | gameObject.name = "UnityPD"; 43 | DontDestroyOnLoad( gameObject ); 44 | } 45 | 46 | void OnApplicationQuit() { 47 | Deinit(); 48 | } 49 | 50 | #region Control 51 | private static Dictionary _openPatches = new Dictionary(); 52 | 53 | #if UNITY_EDITOR_WIN 54 | private static void UnityPd_EnableAudio() { } 55 | #else 56 | #if UNITY_IPHONE 57 | [DllImport( "__Internal" )] 58 | #else 59 | [DllImport("AudioPlugin_UnityPd")] 60 | #endif 61 | private static extern void UnityPd_EnableAudio(); 62 | #endif 63 | 64 | public static void Init() { 65 | if ( !_instance ) { 66 | _instance = FindObjectOfType(); 67 | if ( !_instance ) { 68 | _instance = new GameObject( "UnityPD" ).AddComponent(); 69 | } 70 | } 71 | 72 | Logger.Log( "Initializing..." ); 73 | UnityPd_EnableAudio(); 74 | 75 | #if UNITY_ANDROID && !UNITY_EDITOR 76 | CopyPdResourcesToPersistentPath(); 77 | #endif 78 | 79 | AddToSearchPath( PdPatchDirectory ); 80 | Logger.Log( "...Initialized!" ); 81 | } 82 | 83 | public static void Deinit() { 84 | foreach ( var patchPtr in _openPatches.Values ) 85 | UnityPd_ClosePatch( patchPtr ); 86 | _openPatches.Clear(); 87 | 88 | ClearSearchPath(); 89 | } 90 | #endregion 91 | 92 | #region Patches 93 | 94 | 95 | #if UNITY_EDITOR_WIN 96 | private static void UnityPd_ClearSearchPath() { } 97 | #else 98 | #if UNITY_IPHONE 99 | [DllImport( "__Internal" )] 100 | #else 101 | [DllImport("AudioPlugin_UnityPd")] 102 | #endif 103 | private static extern void UnityPd_ClearSearchPath(); 104 | #endif 105 | 106 | /// 107 | /// clears the search path for pd externals 108 | /// 109 | public static void ClearSearchPath() { 110 | UnityPd_ClearSearchPath(); 111 | } 112 | 113 | public static void ClearAddedSearchPaths() { 114 | ClearSearchPath(); 115 | 116 | AddToSearchPath( PdPatchDirectory ); 117 | } 118 | 119 | 120 | #if UNITY_EDITOR_WIN 121 | private static void UnityPd_AddToSearchPath( string path ) { } 122 | #else 123 | #if UNITY_IPHONE 124 | [DllImport( "__Internal" )] 125 | #else 126 | [DllImport("AudioPlugin_UnityPd")] 127 | #endif 128 | private static extern void UnityPd_AddToSearchPath( string path ); 129 | #endif 130 | 131 | /// 132 | /// adds a directory to the search paths 133 | /// 134 | /// directory to add 135 | public static void AddToSearchPath( string sym ) { 136 | UnityPd_AddToSearchPath( sym ); 137 | } 138 | 139 | #if UNITY_EDITOR_WIN 140 | private static int UnityPd_GetDollarZero( IntPtr intPtr ) { return -1; } 141 | #else 142 | #if UNITY_IPHONE 143 | [DllImport( "__Internal" )] 144 | #else 145 | [DllImport("AudioPlugin_UnityPd")] 146 | #endif 147 | private static extern int UnityPd_GetDollarZero( IntPtr intPtr ); 148 | #endif 149 | 150 | #if UNITY_EDITOR_WIN 151 | private static IntPtr UnityPd_OpenPatch( string patchName, string patchDir ) { return default( IntPtr ); } 152 | #else 153 | #if UNITY_IPHONE 154 | [DllImport( "__Internal" )] 155 | #else 156 | [DllImport("AudioPlugin_UnityPd")] 157 | #endif 158 | private static extern IntPtr UnityPd_OpenPatch( string patchName, string patchDir ); 159 | #endif 160 | 161 | public static int OpenPatch( string patchName ) { 162 | #if UNITY_EDITOR_WIN 163 | return -1; 164 | #else 165 | string patchDir = PdPatchDirectory; 166 | 167 | if ( !File.Exists( Path.Combine( patchDir, patchName ) ) ) { 168 | throw new FileNotFoundException( patchDir ); 169 | } 170 | 171 | Logger.Log( string.Format( "Opening patch {0} in {1}", patchName, patchDir ) ); 172 | var ptr = UnityPd_OpenPatch( patchName, patchDir ); 173 | 174 | if ( ptr == IntPtr.Zero ) { 175 | throw new IOException( "unable to open patch " + patchName ); 176 | } 177 | 178 | int dollarZero = UnityPd_GetDollarZero( ptr ); 179 | _openPatches.Add( dollarZero, ptr ); 180 | 181 | return dollarZero; 182 | #endif 183 | } 184 | 185 | #if UNITY_EDITOR_WIN 186 | private static void UnityPd_ClosePatch( IntPtr patchPtr ) {} 187 | #else 188 | #if UNITY_IPHONE 189 | [DllImport( "__Internal" )] 190 | #else 191 | [DllImport("AudioPlugin_UnityPd")] 192 | #endif 193 | private static extern void UnityPd_ClosePatch( IntPtr patchPtr ); 194 | #endif 195 | 196 | public static void ClosePatch( int patchHandle ) { 197 | #if UNITY_EDITOR_WIN 198 | return; 199 | #else 200 | IntPtr patchPtr; 201 | if ( _openPatches.TryGetValue( patchHandle, out patchPtr ) ) { 202 | UnityPd_ClosePatch( patchPtr ); 203 | _openPatches.Remove( patchHandle ); 204 | } 205 | else 206 | Logger.LogWarning( "Patch " + patchPtr + " not open" ); 207 | #endif 208 | } 209 | 210 | #if UNITY_ANDROID 211 | /// 212 | /// Copies entire PD directory from StreamingAssets (in the APK) to a persistant, non-packed location 213 | /// TODO be smarter about not doing this all at once 214 | /// TODO use coroutines to avoid blocking 215 | /// 216 | private static void CopyPdResourcesToPersistentPath() { 217 | using ( AndroidJavaClass jc = new AndroidJavaClass( "com.unity3d.player.UnityPlayer" ) ) { 218 | using ( AndroidJavaObject jo = jc.GetStatic( "currentActivity" ) ) { 219 | using ( AndroidJavaClass pdHelperClass = new AndroidJavaClass( "com.weplaydots.UnityPdHelper.UnityPdHelper" ) ) { 220 | pdHelperClass.CallStatic( "SetContext", jo ); 221 | pdHelperClass.CallStatic( "CopyAssetsFolderToPersistantData", PATCH_DIR, Application.persistentDataPath ); 222 | } 223 | } 224 | } 225 | } 226 | #endif 227 | #endregion 228 | 229 | #region Messages 230 | #if UNITY_EDITOR_WIN 231 | private static void UnityPd_SendFloat( string receiver, float message ) { } 232 | #else 233 | #if UNITY_IPHONE 234 | [DllImport( "__Internal" )] 235 | #else 236 | [DllImport("AudioPlugin_UnityPd")] 237 | #endif 238 | private static extern void UnityPd_SendFloat( string receiver, float message ); 239 | #endif 240 | public static void SendFloat( string receiver, float message ) { 241 | UnityPd_SendFloat( receiver, message ); 242 | } 243 | 244 | #if UNITY_EDITOR_WIN 245 | private static void UnityPd_SendBang( string receiver ) { } 246 | #else 247 | #if UNITY_IPHONE 248 | [DllImport( "__Internal" )] 249 | #else 250 | [DllImport("AudioPlugin_UnityPd")] 251 | #endif 252 | private static extern void UnityPd_SendBang( string receiver ); 253 | #endif 254 | public static void SendBang( string receiver ) { 255 | UnityPd_SendBang( receiver ); 256 | } 257 | 258 | #if UNITY_EDITOR_WIN 259 | private static void UnityPd_SendSymbol( string receiver, string message ) { } 260 | #else 261 | #if UNITY_IPHONE 262 | [DllImport( "__Internal" )] 263 | #else 264 | [DllImport("AudioPlugin_UnityPd")] 265 | #endif 266 | private static extern void UnityPd_SendSymbol( string receiver, string message ); 267 | #endif 268 | public static void SendSymbol( string receiver, string message ) { 269 | UnityPd_SendSymbol( receiver, message ); 270 | } 271 | #endregion 272 | 273 | private static class Logger { 274 | [System.Diagnostics.Conditional( "DEVELOPMENT_BUILD" )] 275 | public static void Log( string logString, UnityEngine.Object context = null ) { 276 | Debug.Log( "[#UnityPd] " + logString, context ); 277 | } 278 | 279 | [System.Diagnostics.Conditional( "DEVELOPMENT_BUILD" )] 280 | public static void LogWarning( string logString, UnityEngine.Object context = null ) { 281 | Debug.LogWarning( "[#UnityPd] " + logString, context ); 282 | } 283 | 284 | [System.Diagnostics.Conditional( "DEVELOPMENT_BUILD" )] 285 | public static void LogError( string logString, UnityEngine.Object context = null ) { 286 | Debug.LogError( "[#UnityPd] " + logString, context ); 287 | } 288 | } 289 | } 290 | -------------------------------------------------------------------------------- /UnityPd/Bindings/UnityPD.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fd6f7876f2bd41d2a68871fd7e575f1 3 | timeCreated: 1458240567 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityPd/OSX.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78a5a94124e6e429aaad49d22ccf5eee 3 | folderAsset: yes 4 | timeCreated: 1458240565 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/OSX/AudioPlugin_UnityPd.bundle.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d7c02f5dc46b48dfbf140c82f6da695 3 | folderAsset: yes 4 | timeCreated: 1465243063 5 | licenseType: Pro 6 | PluginImporter: 7 | serializedVersion: 1 8 | iconMap: {} 9 | executionOrder: {} 10 | isPreloaded: 1 11 | platformData: 12 | Android: 13 | enabled: 0 14 | settings: 15 | CPU: AnyCPU 16 | Any: 17 | enabled: 0 18 | settings: {} 19 | Editor: 20 | enabled: 1 21 | settings: 22 | CPU: AnyCPU 23 | DefaultValueInitialized: true 24 | OS: OSX 25 | Linux: 26 | enabled: 1 27 | settings: 28 | CPU: x86 29 | Linux64: 30 | enabled: 1 31 | settings: 32 | CPU: x86_64 33 | LinuxUniversal: 34 | enabled: 1 35 | settings: 36 | CPU: AnyCPU 37 | OSXIntel: 38 | enabled: 1 39 | settings: 40 | CPU: AnyCPU 41 | OSXIntel64: 42 | enabled: 1 43 | settings: 44 | CPU: AnyCPU 45 | OSXUniversal: 46 | enabled: 1 47 | settings: 48 | CPU: AnyCPU 49 | Win: 50 | enabled: 1 51 | settings: 52 | CPU: AnyCPU 53 | Win64: 54 | enabled: 1 55 | settings: 56 | CPU: AnyCPU 57 | iOS: 58 | enabled: 0 59 | settings: 60 | CompileFlags: 61 | FrameworkDependencies: 62 | userData: 63 | assetBundleName: 64 | assetBundleVariant: 65 | -------------------------------------------------------------------------------- /UnityPd/OSX/AudioPlugin_UnityPd.bundle/Contents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbf1cfd5e80af4c9bb4d85e17e95d5e3 3 | folderAsset: yes 4 | timeCreated: 1467904510 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/OSX/AudioPlugin_UnityPd.bundle/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 16G1114 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | AudioPlugin_UnityPd 11 | CFBundleIdentifier 12 | com.yourcompany.AudioPlugin_UnityPd 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | AudioPlugin_UnityPd 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | CFPlugInDynamicRegisterFunction 30 | 31 | CFPlugInDynamicRegistration 32 | NO 33 | CFPlugInFactories 34 | 35 | 00000000-0000-0000-0000-000000000000 36 | MyFactoryFunction 37 | 38 | CFPlugInTypes 39 | 40 | 00000000-0000-0000-0000-000000000000 41 | 42 | 00000000-0000-0000-0000-000000000000 43 | 44 | 45 | CFPlugInUnloadFunction 46 | 47 | DTCompiler 48 | com.apple.compilers.llvm.clang.1_0 49 | DTPlatformBuild 50 | 9C40b 51 | DTPlatformVersion 52 | GM 53 | DTSDKBuild 54 | 17C76 55 | DTSDKName 56 | macosx10.13 57 | DTXcode 58 | 0920 59 | DTXcodeBuild 60 | 9C40b 61 | 62 | 63 | -------------------------------------------------------------------------------- /UnityPd/OSX/AudioPlugin_UnityPd.bundle/Contents/Info.plist.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6411a36e85cac4a41ae569ee82243a67 3 | timeCreated: 1470674268 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityPd/OSX/AudioPlugin_UnityPd.bundle/Contents/MacOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c93ba1ac3eb9c4a8484494b9a944fc8f 3 | folderAsset: yes 4 | timeCreated: 1467904510 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/OSX/AudioPlugin_UnityPd.bundle/Contents/MacOS/AudioPlugin_UnityPd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/OSX/AudioPlugin_UnityPd.bundle/Contents/MacOS/AudioPlugin_UnityPd -------------------------------------------------------------------------------- /UnityPd/OSX/AudioPlugin_UnityPd.bundle/Contents/MacOS/AudioPlugin_UnityPd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50da7e62f812c4123808d3ff79eb3200 3 | timeCreated: 1470674268 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityPd/Release.md: -------------------------------------------------------------------------------- 1 | ## UnityPD - Release Notes 2 | 3 | ---------- 4 | 5 | ### v1.0 6 | Initial Release!!! 7 | - libpd v0.9.1 8 | - supports all basic message types to Pd, as well as standard open/close patch methods 9 | - platform support for OSX, iOS and Android. Windows has dummy support to allow Unity editor use 10 | 11 | 12 | ### v1.1 13 | 2017 14 | - add bitcode support 15 | - add support for Unity 2017.x -------------------------------------------------------------------------------- /UnityPd/Release.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f662ac0d85a04286bb5e25c2f2e6f48 3 | timeCreated: 1470676171 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityPd/Utility.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fde9a052add3947cbb91410d238ab7b7 3 | folderAsset: yes 4 | timeCreated: 1465253651 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/Utility/SilentAudioSource.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Playdots, Inc. 3 | * 4 | * ---------------------------- 5 | */ 6 | using UnityEngine; 7 | using UnityEngine.Assertions; 8 | using UnityEngine.UI; 9 | using System.Collections; 10 | using System.Collections.Generic; 11 | 12 | [RequireComponent(typeof(AudioSource))] 13 | /// 14 | /// Force an audio source to start processing (for generating audio) 15 | /// 16 | public class SilentAudioSource : MonoBehaviour { 17 | void OnAudioFilterRead(float[] data, int channels) 18 | { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /UnityPd/Utility/SilentAudioSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2701f3308f3c54f3ba61212a6cef6058 3 | timeCreated: 1465253651 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityPd/Windows.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 509fe6912d1b04ebea7a71bc63c54b37 3 | folderAsset: yes 4 | timeCreated: 1467904510 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/Windows/AudioPluginDemo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/Windows/AudioPluginDemo.dll -------------------------------------------------------------------------------- /UnityPd/Windows/AudioPluginDemo.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12a2b5899087f44a99f1179d10f1d58f 3 | timeCreated: 1467904513 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 1 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | userData: 19 | assetBundleName: 20 | assetBundleVariant: 21 | -------------------------------------------------------------------------------- /UnityPd/iOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 078244ef6d2f746d3b3b0f19ac650a97 3 | folderAsset: yes 4 | timeCreated: 1458240565 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/iOS/include.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 390df64a870ad4ff9a548f131edff26a 3 | folderAsset: yes 4 | timeCreated: 1458240565 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPd/iOS/include/AudioPluginInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define UNITY_AUDIO_PLUGIN_API_VERSION 0x010400 4 | 5 | #ifndef UNITY_PREFIX_CONFIGURE_H 6 | 7 | #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) 8 | # define PLATFORM_WIN 1 9 | #elif defined(__MACH__) || defined(__APPLE__) 10 | # define PLATFORM_OSX 1 11 | #elif defined(__ANDROID__) 12 | # define PLATFORM_ANDROID 1 13 | #elif defined(__linux__) 14 | # define PLATFORM_LINUX 1 15 | #endif 16 | 17 | #if defined(_AMD64_) || defined(__LP64__) 18 | # define PLATFORM_ARCH_64 1 19 | # define PLATFORM_ARCH_32 0 20 | #else 21 | # define PLATFORM_ARCH_64 0 22 | # define PLATFORM_ARCH_32 1 23 | #endif 24 | 25 | #ifndef SInt16_defined 26 | # define SInt16_defined 27 | typedef signed short SInt16; 28 | #endif 29 | 30 | #ifndef UInt16_defined 31 | # define UInt16_defined 32 | typedef unsigned short UInt16; 33 | #endif 34 | 35 | #ifndef UInt8_defined 36 | # define UInt8_defined 37 | typedef unsigned char UInt8; 38 | #endif 39 | 40 | #ifndef SInt8_defined 41 | # define SInt8_defined 42 | typedef signed char SInt8; 43 | #endif 44 | 45 | #if PLATFORM_ARCH_64 46 | # if PLATFORM_LINUX 47 | # ifndef SInt32_defined 48 | # define SInt32_defined 49 | typedef signed int SInt32; 50 | # endif 51 | # ifndef UInt32_defined 52 | # define UInt32_defined 53 | typedef unsigned int UInt32; 54 | # endif 55 | # ifndef UInt64_defined 56 | # define UInt64_defined 57 | typedef unsigned long UInt64; 58 | # endif 59 | # ifndef SInt64_defined 60 | # define SInt64_defined 61 | typedef signed long SInt64; 62 | # endif 63 | # elif PLATFORM_OSX 64 | # ifndef SInt32_defined 65 | # define SInt32_defined 66 | typedef signed int SInt32; 67 | # endif 68 | # ifndef UInt32_defined 69 | # define UInt32_defined 70 | typedef unsigned int UInt32; 71 | # endif 72 | # ifndef UInt64_defined 73 | # define UInt64_defined 74 | typedef unsigned long long UInt64; 75 | # endif 76 | # ifndef SInt64_defined 77 | # define SInt64_defined 78 | typedef signed long long SInt64; 79 | # endif 80 | # elif PLATFORM_WIN 81 | # ifndef SInt32_defined 82 | # define SInt32_defined 83 | typedef signed long SInt32; 84 | # endif 85 | # ifndef UInt32_defined 86 | # define UInt32_defined 87 | typedef unsigned long UInt32; 88 | # endif 89 | # ifndef UInt64_defined 90 | # define UInt64_defined 91 | typedef unsigned long long UInt64; 92 | # endif 93 | # ifndef SInt64_defined 94 | # define SInt64_defined 95 | typedef signed long long SInt64; 96 | # endif 97 | #endif 98 | #else 99 | # ifndef __MACTYPES__ // on mac platforms these are already defined 100 | # ifndef SInt32_defined 101 | # define SInt32_defined 102 | typedef signed int SInt32; 103 | # endif 104 | # ifndef UInt32_defined 105 | # define UInt32_defined 106 | typedef unsigned int UInt32; 107 | # endif 108 | # endif 109 | # ifndef UInt64_defined 110 | # define UInt64_defined 111 | typedef unsigned long long UInt64; 112 | # endif 113 | # ifndef SInt64_defined 114 | # define SInt64_defined 115 | typedef signed long long SInt64; 116 | # endif 117 | #endif 118 | 119 | #endif 120 | 121 | #if PLATFORM_WINRT 122 | #define AUDIO_CALLING_CONVENTION __stdcall 123 | #else 124 | #define AUDIO_CALLING_CONVENTION 125 | #endif 126 | 127 | #if PLATFORM_WIN 128 | #define UNITY_AUDIODSP_CALLBACK __stdcall 129 | #elif PLATFORM_OSX 130 | #define UNITY_AUDIODSP_CALLBACK 131 | #else 132 | #define UNITY_AUDIODSP_CALLBACK 133 | #endif 134 | 135 | // Attribute to make function be exported from a plugin 136 | #if PLATFORM_WIN & !PLATFORM_WINRT 137 | #define UNITY_AUDIODSP_EXPORT_API __declspec(dllexport) 138 | #else 139 | #define UNITY_AUDIODSP_EXPORT_API 140 | #endif 141 | 142 | #if defined(__CYGWIN32__) 143 | #define UNITY_AUDIODSP_CALLBACK __stdcall 144 | #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) 145 | #define UNITY_AUDIODSP_CALLBACK __stdcall 146 | #elif defined(__MACH__) || defined(__ANDROID__) || defined(__linux__) || defined(__QNX__) 147 | #define UNITY_AUDIODSP_CALLBACK 148 | #else 149 | #define UNITY_AUDIODSP_CALLBACK 150 | #endif 151 | 152 | #define UNITY_AUDIODSP_RESULT int 153 | 154 | #include 155 | 156 | enum 157 | { 158 | UNITY_AUDIODSP_OK = 0, 159 | UNITY_AUDIODSP_ERR_UNSUPPORTED = 1, 160 | }; 161 | 162 | struct UnityAudioEffectState; 163 | 164 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_CreateCallback)(UnityAudioEffectState* state); 165 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_ReleaseCallback)(UnityAudioEffectState* state); 166 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_ResetCallback)(UnityAudioEffectState* state); 167 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_ProcessCallback)(UnityAudioEffectState* state, float* inbuffer, float* outbuffer, unsigned int length, int inchannels, int outchannels); 168 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_SetPositionCallback)(UnityAudioEffectState* state, unsigned int pos); 169 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_SetFloatParameterCallback)(UnityAudioEffectState* state, int index, float value); 170 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_GetFloatParameterCallback)(UnityAudioEffectState* state, int index, float* value, char *valuestr); 171 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_GetFloatBufferCallback)(UnityAudioEffectState* state, const char* name, float* buffer, int numsamples); 172 | 173 | enum UnityAudioEffectDefinitionFlags 174 | { 175 | UnityAudioEffectDefinitionFlags_IsSideChainTarget = 1 << 0, // Does this effect need a side chain buffer and can it be targeted by a Send? 176 | UnityAudioEffectDefinitionFlags_IsSpatializer = 1 << 1, // Should this plugin be inserted at sources and take over panning? 177 | UnityAudioEffectDefinitionFlags_IsAmbisonicDecoder = 1 << 2, // Should this plugin be used for ambisonic decoding? Added in Unity 2017.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010400. 178 | UnityAudioEffectDefinitionFlags_AppliesDistanceAttenuation = 1 << 3 // Spatializers Only: Does this spatializer apply distance-based attenuation? Added in Unity 2017.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010400. 179 | }; 180 | 181 | enum UnityAudioEffectStateFlags 182 | { 183 | UnityAudioEffectStateFlags_IsPlaying = 1 << 0, // Set when engine is in play mode. Also true while paused. 184 | UnityAudioEffectStateFlags_IsPaused = 1 << 1, // Set when engine is paused mode. 185 | UnityAudioEffectStateFlags_IsMuted = 1 << 2, // Set when effect is being muted (only available in the editor) 186 | UnityAudioEffectStateFlags_IsSideChainTarget = 1 << 3, // Does this effect need a side chain buffer and can it be targeted by a Send? 187 | }; 188 | 189 | // This callback can be used to override the way distance attenuation is performed on AudioSources. 190 | // distanceIn is the distance between the source and the listener and attenuationOut is the output volume. 191 | // attenuationIn is the volume-curve based attenuation that would have been applied by Unity if this callback were not set. 192 | // A typical attenuation curve may look like this: *attenuationOut = 1.0f / max(1.0f, distanceIn); 193 | // The callback may also be used to apply a secondary gain on top of the one through attenuationIn by Unity's AudioSource curve. 194 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_DistanceAttenuationCallback)(UnityAudioEffectState* state, float distanceIn, float attenuationIn, float* attenuationOut); 195 | 196 | struct UnityAudioSpatializerData 197 | { 198 | float listenermatrix[16]; // Matrix that transforms sourcepos into the local space of the listener 199 | float sourcematrix[16]; // Transform matrix of audio source 200 | float spatialblend; // Distance-controlled spatial blend 201 | float reverbzonemix; // Reverb zone mix level parameter (and curve) on audio source 202 | float spread; // Spread parameter of the audio source (0..360 degrees) 203 | float stereopan; // Stereo panning parameter of the audio source (-1 = fully left, 1 = fully right) 204 | UnityAudioEffect_DistanceAttenuationCallback distanceattenuationcallback; // The spatializer plugin may override the distance attenuation in order to influence the voice prioritization (leave this callback as NULL to use the built-in audio source attenuation curve) 205 | }; 206 | 207 | struct UnityAudioAmbisonicData 208 | { 209 | float listenermatrix[16]; // Matrix that transforms sourcepos into the local space of the listener 210 | float sourcematrix[16]; // Transform matrix of audio source 211 | float spatialblend; // Distance-controlled spatial blend 212 | float reverbzonemix; // Reverb zone mix level parameter (and curve) on audio source 213 | float spread; // Spread parameter of the audio source (0..360 degrees) 214 | float stereopan; // Stereo panning parameter of the audio source (-1 = fully left, 1 = fully right) 215 | UnityAudioEffect_DistanceAttenuationCallback distanceattenuationcallback; // The ambisonic decoder plugin may override the distance attenuation in order to influence the voice prioritization (leave this callback as NULL to use the built-in audio source attenuation curve) 216 | int ambisonicOutChannels; // This tells ambisonic decoders how many output channels will actually be used. 217 | }; 218 | 219 | struct UnityAudioEffectState 220 | { 221 | union 222 | { 223 | struct 224 | { 225 | UInt32 structsize; // Size of this struct 226 | UInt32 samplerate; // System sample rate 227 | UInt64 currdsptick; // Pointer to a sample counter marking the start of the current block being processed 228 | UInt64 prevdsptick; // Used for determining when DSPs are bypassed and so sidechain info becomes invalid 229 | float* sidechainbuffer; // Side-chain buffers to read from 230 | void* effectdata; // Internal data for the effect 231 | UInt32 flags; // Various flags through which information can be queried from the host 232 | void* internal; // Internal data, do not touch! 233 | 234 | // Version 1.0 of the plugin API only contains data up to here, so perform a state->structsize >= sizeof(UnityAudioEffectState) in your code before you 235 | // access any of this data in order to detect whether the host API is older than the plugin. 236 | 237 | UnityAudioSpatializerData* spatializerdata; // Data for spatializers 238 | UInt32 dspbuffersize; // Number of frames being processed per process callback. Use this to allocate temporary buffers before processing starts. 239 | UInt32 hostapiversion; // Version of plugin API used by host 240 | 241 | UnityAudioAmbisonicData* ambisonicdata; // Data for ambisonic plugins. Added in Unity 2017.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010400. 242 | }; 243 | unsigned char pad[80]; // This padding was historically due to PS3 SPU DMA requirements. We aren't removing it now because plugins may rely on this struct being at least this size. 244 | }; 245 | #ifdef __cplusplus 246 | template inline T* GetEffectData() const 247 | { 248 | assert(effectdata); 249 | assert(internal); 250 | return (T*)effectdata; 251 | } 252 | 253 | #endif 254 | }; 255 | 256 | struct UnityAudioParameterDefinition 257 | { 258 | char name[16]; // Display name on the GUI 259 | char unit[16]; // Scientific unit of parameter to be appended after the value in textboxes 260 | const char* description; // Description of parameter (displayed in tool tips, automatically generated documentation, etc.) 261 | float min; // Minimum value of the parameter 262 | float max; // Maximum value of the parameter 263 | float defaultval; // Default and initial value of the parameter 264 | float displayscale; // Scale factor used only for the display of parameters (i.e. 100 for a percentage value ranging from 0 to 1) 265 | float displayexponent; // Exponent for mapping parameters to sliders 266 | }; 267 | 268 | struct UnityAudioEffectDefinition 269 | { 270 | UInt32 structsize; // Size of this struct 271 | UInt32 paramstructsize; // Size of paramdesc fields 272 | UInt32 apiversion; // Plugin API version 273 | UInt32 pluginversion; // Version of this plugin 274 | UInt32 channels; // Number of channels. Effects should set this to 0 and process any number of input/output channels they get in the process callback. Generator elements should specify a >0 value here. 275 | UInt32 numparameters; // The number of parameters exposed by this plugin. 276 | UInt64 flags; // Various capabilities and requirements of the plugin. 277 | char name[32]; // Name used for registration of the effect. This name will also be displayed in the GUI. 278 | UnityAudioEffect_CreateCallback create; // The create callback is called when DSP unit is created and can be null. 279 | UnityAudioEffect_ReleaseCallback release; // The release callback is called just before the plugin is freed and should free any data associated with this specific instance of the plugin. No further callbacks related to the instance will happen after this function has been called. 280 | UnityAudioEffect_ResetCallback reset; // The reset callback is called by the user to bring back the plugin instance into its initial state. Use to avoid clicks or artifacts. 281 | UnityAudioEffect_ProcessCallback process; // The processing callback is repeatedly called with a block of input audio to read from and an output block to write to. 282 | UnityAudioEffect_SetPositionCallback setposition; // The position callback can be used for implementing seek operations. 283 | UnityAudioParameterDefinition* paramdefs; // A pointer to the definitions of the parameters exposed by this plugin. This data pointed to must remain valid for the whole lifetime of the dynamic library (ideally it's static). 284 | UnityAudioEffect_SetFloatParameterCallback setfloatparameter; // This is called whenever one of the exposed parameters is changed. 285 | UnityAudioEffect_GetFloatParameterCallback getfloatparameter; // This is called to query parameter values. 286 | UnityAudioEffect_GetFloatBufferCallback getfloatbuffer; // Get N samples of named buffer. Used for displaying analysis data from the runtime. 287 | }; 288 | 289 | // This function fills in N pointers for the N effects contained in the library and returns N. 290 | extern "C" UNITY_AUDIODSP_EXPORT_API int AUDIO_CALLING_CONVENTION UnityGetAudioEffectDefinitions(UnityAudioEffectDefinition*** descptr); 291 | -------------------------------------------------------------------------------- /UnityPd/iOS/include/AudioPluginInterface.h.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f397bd4e539cc49b39d17f418b4592f7 3 | timeCreated: 1458240568 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 1 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | iOS: 19 | enabled: 1 20 | settings: {} 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /UnityPd/iOS/include/AudioPlugin_UnityPd_iOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // AudioPlugin_UnityPd_iOS.h 3 | // AudioPlugin_UnityPd_iOS 4 | // 5 | // Created by Eddie Cameron on 3/2/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface AudioPlugin_UnityPd_iOS : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UnityPd/iOS/include/AudioPlugin_UnityPd_iOS.h.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 369b96d505df744209bb4c38b861c908 3 | timeCreated: 1458240567 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 1 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | iOS: 19 | enabled: 1 20 | settings: {} 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /UnityPd/iOS/libAudioPlugin_UnityPd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityPd/iOS/libAudioPlugin_UnityPd.a -------------------------------------------------------------------------------- /UnityPd/iOS/libAudioPlugin_UnityPd.a.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17a6a0d6b02d04e3794987805f4f8365 3 | timeCreated: 1458240567 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 1 10 | platformData: 11 | Android: 12 | enabled: 0 13 | settings: 14 | CPU: AnyCPU 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | DefaultValueInitialized: true 23 | OS: AnyOS 24 | Linux: 25 | enabled: 0 26 | settings: 27 | CPU: x86 28 | Linux64: 29 | enabled: 0 30 | settings: 31 | CPU: x86_64 32 | OSXIntel: 33 | enabled: 0 34 | settings: 35 | CPU: AnyCPU 36 | OSXIntel64: 37 | enabled: 0 38 | settings: 39 | CPU: AnyCPU 40 | Win: 41 | enabled: 0 42 | settings: 43 | CPU: AnyCPU 44 | Win64: 45 | enabled: 0 46 | settings: 47 | CPU: AnyCPU 48 | iOS: 49 | enabled: 1 50 | settings: 51 | CompileFlags: 52 | FrameworkDependencies: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityTest/Assets/DotSoundConfig.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 2fe132df6239a4babaa99e909fb18a6d, type: 3} 12 | m_Name: DotSoundConfig 13 | m_EditorClassIdentifier: 14 | attack: 60 15 | sustain: 200 16 | decay: 500 17 | adder1Vol: 0.87 18 | adder1FreqMultiply: 1.01 19 | adder1ModFreq: 3 20 | adder1ModAmount: 14.47 21 | adder2Vol: 0.967 22 | adder2FreqMultiply: 1.99 23 | adder2ModFreq: 3 24 | adder2ModAmount: 16.76 25 | lopCutoff: 200 26 | -------------------------------------------------------------------------------- /UnityTest/Assets/DotSoundConfig.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 861797675aeac46ea80f5637fa767a3e 3 | timeCreated: 1458242865 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityTest/Assets/DotsSynth.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | SceneSettings: 5 | m_ObjectHideFlags: 0 6 | m_PVSData: 7 | m_PVSObjectsArray: [] 8 | m_PVSPortalsArray: [] 9 | m_OcclusionBakeSettings: 10 | smallestOccluder: 5 11 | smallestHole: 0.25 12 | backfaceThreshold: 100 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 6 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 1 28 | m_SkyboxMaterial: {fileID: 0} 29 | m_HaloStrength: 0.5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 1 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | --- !u!157 &4 41 | LightmapSettings: 42 | m_ObjectHideFlags: 0 43 | serializedVersion: 6 44 | m_GIWorkflowMode: 1 45 | m_LightmapsMode: 1 46 | m_GISettings: 47 | serializedVersion: 2 48 | m_BounceScale: 1 49 | m_IndirectOutputScale: 1 50 | m_AlbedoBoost: 1 51 | m_TemporalCoherenceThreshold: 1 52 | m_EnvironmentLightingMode: 1 53 | m_EnableBakedLightmaps: 1 54 | m_EnableRealtimeLightmaps: 0 55 | m_LightmapEditorSettings: 56 | serializedVersion: 3 57 | m_Resolution: 1 58 | m_BakeResolution: 50 59 | m_TextureWidth: 1024 60 | m_TextureHeight: 1024 61 | m_AOMaxDistance: 1 62 | m_Padding: 2 63 | m_CompAOExponent: 1 64 | m_LightmapParameters: {fileID: 0} 65 | m_TextureCompression: 0 66 | m_FinalGather: 0 67 | m_FinalGatherRayCount: 1024 68 | m_ReflectionCompression: 2 69 | m_LightingDataAsset: {fileID: 0} 70 | m_RuntimeCPUUsage: 25 71 | --- !u!196 &5 72 | NavMeshSettings: 73 | serializedVersion: 2 74 | m_ObjectHideFlags: 0 75 | m_BuildSettings: 76 | serializedVersion: 2 77 | agentRadius: 0.5 78 | agentHeight: 2 79 | agentSlope: 45 80 | agentClimb: 0.4 81 | ledgeDropHeight: 0 82 | maxJumpAcrossDistance: 0 83 | accuratePlacement: 0 84 | minRegionArea: 2 85 | cellSize: 0.16666666 86 | manualCellSize: 0 87 | m_NavMeshData: {fileID: 0} 88 | --- !u!1 &1563609028 89 | GameObject: 90 | m_ObjectHideFlags: 0 91 | m_PrefabParentObject: {fileID: 0} 92 | m_PrefabInternal: {fileID: 0} 93 | serializedVersion: 4 94 | m_Component: 95 | - 4: {fileID: 1563609030} 96 | - 114: {fileID: 1563609029} 97 | - 82: {fileID: 1563609032} 98 | m_Layer: 0 99 | m_Name: PDTest 100 | m_TagString: Untagged 101 | m_Icon: {fileID: 0} 102 | m_NavMeshLayer: 0 103 | m_StaticEditorFlags: 0 104 | m_IsActive: 1 105 | --- !u!114 &1563609029 106 | MonoBehaviour: 107 | m_ObjectHideFlags: 0 108 | m_PrefabParentObject: {fileID: 0} 109 | m_PrefabInternal: {fileID: 0} 110 | m_GameObject: {fileID: 1563609028} 111 | m_Enabled: 1 112 | m_EditorHideFlags: 0 113 | m_Script: {fileID: 11500000, guid: 8deb7b50deca641179c514bb9464340c, type: 3} 114 | m_Name: 115 | m_EditorClassIdentifier: 116 | patchName: simpleSynth.pd 117 | dotSoundConfig: {fileID: 11400000, guid: 861797675aeac46ea80f5637fa767a3e, type: 2} 118 | --- !u!4 &1563609030 119 | Transform: 120 | m_ObjectHideFlags: 0 121 | m_PrefabParentObject: {fileID: 0} 122 | m_PrefabInternal: {fileID: 0} 123 | m_GameObject: {fileID: 1563609028} 124 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 125 | m_LocalPosition: {x: 0, y: 0, z: 0} 126 | m_LocalScale: {x: 1, y: 1, z: 1} 127 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 128 | m_Children: [] 129 | m_Father: {fileID: 0} 130 | m_RootOrder: 0 131 | --- !u!82 &1563609032 132 | AudioSource: 133 | m_ObjectHideFlags: 0 134 | m_PrefabParentObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 0} 136 | m_GameObject: {fileID: 1563609028} 137 | m_Enabled: 1 138 | serializedVersion: 4 139 | OutputAudioMixerGroup: {fileID: 24300001, guid: 86adc4d1841fb4db5a6c55c58b184a85, 140 | type: 2} 141 | m_audioClip: {fileID: 0} 142 | m_PlayOnAwake: 1 143 | m_Volume: 1 144 | m_Pitch: 1 145 | Loop: 0 146 | Mute: 0 147 | Spatialize: 0 148 | Priority: 128 149 | DopplerLevel: 1 150 | MinDistance: 1 151 | MaxDistance: 500 152 | Pan2D: 0 153 | rolloffMode: 0 154 | BypassEffects: 0 155 | BypassListenerEffects: 0 156 | BypassReverbZones: 0 157 | rolloffCustomCurve: 158 | serializedVersion: 2 159 | m_Curve: 160 | - time: 0 161 | value: 1 162 | inSlope: 0 163 | outSlope: 0 164 | tangentMode: 0 165 | - time: 1 166 | value: 0 167 | inSlope: 0 168 | outSlope: 0 169 | tangentMode: 0 170 | m_PreInfinity: 2 171 | m_PostInfinity: 2 172 | m_RotationOrder: 4 173 | panLevelCustomCurve: 174 | serializedVersion: 2 175 | m_Curve: 176 | - time: 0 177 | value: 0 178 | inSlope: 0 179 | outSlope: 0 180 | tangentMode: 0 181 | m_PreInfinity: 2 182 | m_PostInfinity: 2 183 | m_RotationOrder: 0 184 | spreadCustomCurve: 185 | serializedVersion: 2 186 | m_Curve: 187 | - time: 0 188 | value: 0 189 | inSlope: 0 190 | outSlope: 0 191 | tangentMode: 0 192 | m_PreInfinity: 2 193 | m_PostInfinity: 2 194 | m_RotationOrder: 4 195 | reverbZoneMixCustomCurve: 196 | serializedVersion: 2 197 | m_Curve: 198 | - time: 0 199 | value: 1 200 | inSlope: 0 201 | outSlope: 0 202 | tangentMode: 0 203 | m_PreInfinity: 2 204 | m_PostInfinity: 2 205 | m_RotationOrder: 0 206 | --- !u!1 &1755123373 207 | GameObject: 208 | m_ObjectHideFlags: 0 209 | m_PrefabParentObject: {fileID: 0} 210 | m_PrefabInternal: {fileID: 0} 211 | serializedVersion: 4 212 | m_Component: 213 | - 4: {fileID: 1755123378} 214 | - 20: {fileID: 1755123377} 215 | - 92: {fileID: 1755123376} 216 | - 124: {fileID: 1755123375} 217 | - 81: {fileID: 1755123374} 218 | m_Layer: 0 219 | m_Name: Main Camera 220 | m_TagString: MainCamera 221 | m_Icon: {fileID: 0} 222 | m_NavMeshLayer: 0 223 | m_StaticEditorFlags: 0 224 | m_IsActive: 1 225 | --- !u!81 &1755123374 226 | AudioListener: 227 | m_ObjectHideFlags: 0 228 | m_PrefabParentObject: {fileID: 0} 229 | m_PrefabInternal: {fileID: 0} 230 | m_GameObject: {fileID: 1755123373} 231 | m_Enabled: 1 232 | --- !u!124 &1755123375 233 | Behaviour: 234 | m_ObjectHideFlags: 0 235 | m_PrefabParentObject: {fileID: 0} 236 | m_PrefabInternal: {fileID: 0} 237 | m_GameObject: {fileID: 1755123373} 238 | m_Enabled: 1 239 | --- !u!92 &1755123376 240 | Behaviour: 241 | m_ObjectHideFlags: 0 242 | m_PrefabParentObject: {fileID: 0} 243 | m_PrefabInternal: {fileID: 0} 244 | m_GameObject: {fileID: 1755123373} 245 | m_Enabled: 1 246 | --- !u!20 &1755123377 247 | Camera: 248 | m_ObjectHideFlags: 0 249 | m_PrefabParentObject: {fileID: 0} 250 | m_PrefabInternal: {fileID: 0} 251 | m_GameObject: {fileID: 1755123373} 252 | m_Enabled: 1 253 | serializedVersion: 2 254 | m_ClearFlags: 1 255 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 256 | m_NormalizedViewPortRect: 257 | serializedVersion: 2 258 | x: 0 259 | y: 0 260 | width: 1 261 | height: 1 262 | near clip plane: 0.3 263 | far clip plane: 1000 264 | field of view: 60 265 | orthographic: 0 266 | orthographic size: 5 267 | m_Depth: -1 268 | m_CullingMask: 269 | serializedVersion: 2 270 | m_Bits: 4294967295 271 | m_RenderingPath: -1 272 | m_TargetTexture: {fileID: 0} 273 | m_TargetDisplay: 0 274 | m_TargetEye: 3 275 | m_HDR: 0 276 | m_OcclusionCulling: 1 277 | m_StereoConvergence: 10 278 | m_StereoSeparation: 0.022 279 | m_StereoMirrorMode: 0 280 | --- !u!4 &1755123378 281 | Transform: 282 | m_ObjectHideFlags: 0 283 | m_PrefabParentObject: {fileID: 0} 284 | m_PrefabInternal: {fileID: 0} 285 | m_GameObject: {fileID: 1755123373} 286 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 287 | m_LocalPosition: {x: 0, y: 1, z: -10} 288 | m_LocalScale: {x: 1, y: 1, z: 1} 289 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 290 | m_Children: [] 291 | m_Father: {fileID: 0} 292 | m_RootOrder: 1 293 | -------------------------------------------------------------------------------- /UnityTest/Assets/DotsSynth.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71ede351cd6e74142a287cef79581de6 3 | timeCreated: 1433449113 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityTest/Assets/Master.mixer: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!241 &24100000 4 | AudioMixerController: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Master 9 | m_OutputGroup: {fileID: 0} 10 | m_MasterGroup: {fileID: 24300001} 11 | m_Snapshots: 12 | - {fileID: 24500003} 13 | m_StartSnapshot: {fileID: 24500003} 14 | m_SuspendThreshold: -80 15 | m_EnableSuspend: 0 16 | m_ExposedParameters: [] 17 | m_AudioMixerGroupViews: 18 | - guids: 19 | - 96353b46ce9204e91b680e7e70befd87 20 | name: View 21 | m_CurrentViewIndex: 0 22 | m_TargetSnapshot: {fileID: 24500003} 23 | --- !u!243 &24300001 24 | AudioMixerGroupController: 25 | m_ObjectHideFlags: 0 26 | m_PrefabParentObject: {fileID: 0} 27 | m_PrefabInternal: {fileID: 0} 28 | m_Name: Master 29 | m_AudioMixer: {fileID: 24100000} 30 | m_GroupID: 96353b46ce9204e91b680e7e70befd87 31 | m_Children: [] 32 | m_Volume: 9dde984b8ed8944b5a8504ab2246bb60 33 | m_Pitch: 3658e62c8938e4a69bd7c8cae54a0098 34 | m_Effects: 35 | - {fileID: 24441470} 36 | - {fileID: 24400002} 37 | m_UserColorIndex: 0 38 | m_Mute: 0 39 | m_Solo: 0 40 | m_BypassEffects: 0 41 | --- !u!244 &24400002 42 | AudioMixerEffectController: 43 | m_ObjectHideFlags: 3 44 | m_PrefabParentObject: {fileID: 0} 45 | m_PrefabInternal: {fileID: 0} 46 | m_Name: 47 | m_EffectID: 9e84e06ce13cc4b70bfa42aa2f3c1a46 48 | m_EffectName: Attenuation 49 | m_MixLevel: 0d697f95cff8d4010a00770690fa3954 50 | m_Parameters: [] 51 | m_SendTarget: {fileID: 0} 52 | m_EnableWetMix: 0 53 | m_Bypass: 0 54 | --- !u!244 &24441470 55 | AudioMixerEffectController: 56 | m_ObjectHideFlags: 3 57 | m_PrefabParentObject: {fileID: 0} 58 | m_PrefabInternal: {fileID: 0} 59 | m_Name: 60 | m_EffectID: 38e232f0ac0e844d3832a430bba794e5 61 | m_EffectName: Unity Pd 62 | m_MixLevel: afa86975bd46d424c8f0577a02909148 63 | m_Parameters: [] 64 | m_SendTarget: {fileID: 0} 65 | m_EnableWetMix: 0 66 | m_Bypass: 0 67 | --- !u!245 &24500003 68 | AudioMixerSnapshotController: 69 | m_ObjectHideFlags: 0 70 | m_PrefabParentObject: {fileID: 0} 71 | m_PrefabInternal: {fileID: 0} 72 | m_Name: Snapshot 73 | m_AudioMixer: {fileID: 24100000} 74 | m_SnapshotID: 763fa2be278604ebcb92bd283ec3599b 75 | m_FloatValues: {} 76 | m_TransitionOverrides: {} 77 | -------------------------------------------------------------------------------- /UnityTest/Assets/Master.mixer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86adc4d1841fb4db5a6c55c58b184a85 3 | timeCreated: 1467904729 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityTest/Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cd9cc8c2d1778943869a1c67c9da38f 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /UnityTest/Assets/Plugins/UnityPd: -------------------------------------------------------------------------------- 1 | ../../../UnityPd/ -------------------------------------------------------------------------------- /UnityTest/Assets/Plugins/UnityPd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f774a8f3d3ae94e0eb5b87656300a38b 3 | folderAsset: yes 4 | timeCreated: 1467904508 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityTest/Assets/Plugins/iOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29d3ceafe6e6e46a2abb52a3e831fdab 3 | folderAsset: yes 4 | timeCreated: 1467904925 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityTest/Assets/Plugins/iOS/UnityPdAppController.mm: -------------------------------------------------------------------------------- 1 | #import "UnityAppController.h" 2 | 3 | #include "AudioPluginInterface.h" 4 | 5 | ////////////////////////////////////////////////////////////////////////////////////// 6 | // Dots custom subclass of UnityAppController 7 | // See UnityAppController.m/h here http://docs.unity3d.com/Manual/StructureOfXcodeProject.html 8 | ////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | @interface UnityPdAppController : UnityAppController {} 11 | @end 12 | 13 | @implementation UnityPdAppController 14 | 15 | - (void)preStartUnity { 16 | [super preStartUnity]; 17 | UnityRegisterAudioPlugin(&UnityGetAudioEffectDefinitions); // intialize native audio plugins 18 | } 19 | 20 | @end 21 | 22 | IMPL_APP_CONTROLLER_SUBCLASS( UnityPdAppController ) 23 | -------------------------------------------------------------------------------- /UnityTest/Assets/Plugins/iOS/UnityPdAppController.mm.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eafe725e477874b9999c187d704c360d 3 | timeCreated: 1467904951 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | iOS: 19 | enabled: 1 20 | settings: {} 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /UnityTest/Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 173bcfd14701b4a74ad3223cfd3c4e20 3 | folderAsset: yes 4 | timeCreated: 1458242201 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityTest/Assets/Scripts/DotSoundConfig.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Playdots, Inc. 3 | * 4 | * ---------------------------- 5 | */ 6 | using UnityEngine; 7 | using UnityEngine.Assertions; 8 | using UnityEngine.UI; 9 | using System.Collections; 10 | using System.Collections.Generic; 11 | 12 | [CreateAssetMenu( menuName = "Dot Sound Config" )] 13 | /// 14 | /// Config for a dot sound 15 | /// 16 | public class DotSoundConfig : ScriptableObject { 17 | [Range( 0, 5000)] 18 | public float attack = 60f; 19 | [Range( 0, 5000)] 20 | public float sustain = 200f; 21 | [Range( 0, 5000)] 22 | public float decay = 500f; 23 | 24 | [Range(0, 1)] 25 | public float adder1Vol = .5f; 26 | [Range(0, 5)] 27 | public float adder1FreqMultiply = 2f; 28 | [Range(0, 100)] 29 | public float adder1ModFreq = 200f; 30 | [Range(0, 20)] 31 | public float adder1ModAmount = 1f; 32 | 33 | [Range(0, 1)] 34 | public float adder2Vol = .25f; 35 | [Range(0, 5)] 36 | public float adder2FreqMultiply = 3f; 37 | [Range(0, 100)] 38 | public float adder2ModFreq = 100f; 39 | [Range(0, 20)] 40 | public float adder2ModAmount = 1.01f; 41 | 42 | [Range( 0, 1000)] 43 | public float lopCutoff = 500f; 44 | 45 | public void SendValues() { 46 | UnityPD.SendFloat( "setAttack", attack ); 47 | UnityPD.SendFloat( "setSustain", sustain ); 48 | UnityPD.SendFloat( "setDecay", decay ); 49 | 50 | UnityPD.SendFloat( "adder-1-vol", adder1Vol ); 51 | UnityPD.SendFloat( "adder-1-control-freq-multiply", adder1FreqMultiply ); 52 | UnityPD.SendFloat( "adder-1-freq-mod-freq", adder1ModFreq ); 53 | UnityPD.SendFloat( "adder-1-freq-mod-amount", adder1ModAmount ); 54 | 55 | UnityPD.SendFloat( "adder-2-vol", adder2Vol ); 56 | UnityPD.SendFloat( "adder-2-control-freq-multiply", adder2FreqMultiply ); 57 | UnityPD.SendFloat( "adder-2-freq-mod-freq", adder2ModFreq ); 58 | UnityPD.SendFloat( "adder-2-freq-mod-amount", adder2ModAmount ); 59 | 60 | UnityPD.SendFloat( "lop-cutoff", lopCutoff ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /UnityTest/Assets/Scripts/DotSoundConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fe132df6239a4babaa99e909fb18a6d 3 | timeCreated: 1460047972 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityTest/Assets/Scripts/DotSoundPlayer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Playdots, Inc. 3 | * 4 | * ---------------------------- 5 | */ 6 | using UnityEngine; 7 | using UnityEngine.Assertions; 8 | using UnityEngine.UI; 9 | using System.Collections; 10 | using System.Collections.Generic; 11 | 12 | /// 13 | /// Class for setting up Dot sound patches and playing the right notes 14 | /// 15 | public class DotSoundPlayer { 16 | private const float _DOT_START_FREQ = 220; 17 | private const int _MAX_DOT_SOUND_NOTE = 15; 18 | private float[] dotProgressionScale = { 19 | 1, 20 | 5f / 4f, // major 3rd 21 | 4f / 3f, // major 4th 22 | 3f / 2f, // major 5th 23 | 15f / 8f // major 7th 24 | }; 25 | 26 | private readonly DotSoundConfig _dotSoundConfig; 27 | private int _dotSoundPatch = -1; 28 | 29 | public DotSoundPlayer( DotSoundConfig dotSoundConfig ) { 30 | // TODO make this variable per world 31 | _dotSoundConfig = dotSoundConfig; 32 | _dotSoundPatch = UnityPD.OpenPatch( "simpleSynth.pd" ); 33 | _dotSoundConfig.SendValues(); 34 | } 35 | 36 | /// 37 | /// Plays the dot connect sound of the 1-index based number of dots in connection 38 | /// 39 | /// Dots in connection. 40 | public void PlayDotConnectedSound( int dotsInConnection ) { 41 | #if UNITY_EDITOR 42 | _dotSoundConfig.SendValues(); 43 | #endif 44 | 45 | dotsInConnection = PingPongInt( dotsInConnection, _MAX_DOT_SOUND_NOTE ); 46 | int octaves = ( dotsInConnection - 1 ) / dotProgressionScale.Length; 47 | float octaveStart = _DOT_START_FREQ * Mathf.Pow( 2, octaves ); 48 | int scaleNote = ( dotsInConnection - 1 ) % dotProgressionScale.Length; 49 | Debug.Log (octaveStart + " " + scaleNote); 50 | float freq = octaveStart * dotProgressionScale[scaleNote]; 51 | UnityPD.SendFloat( "playNote", freq ); 52 | } 53 | 54 | public void PlaySquareSound( int dotsInConnection ) { 55 | for ( int i = 0; i < 3; i++ ) { 56 | PlayDotConnectedSound( dotsInConnection + 2 * i ); // play a triad (this note, note + 2, note + 4) 57 | } 58 | } 59 | 60 | public void SwitchToPatch( string patch ) { 61 | if ( _dotSoundPatch >= 0 ) 62 | UnityPD.ClosePatch( _dotSoundPatch ); 63 | _dotSoundPatch = UnityPD.OpenPatch( patch ); 64 | _dotSoundConfig.SendValues(); 65 | } 66 | 67 | /// 68 | /// Ping pong an int value between 0 and length (0 inclusive, length exclusive) 69 | /// 70 | /// The value to ping pong 71 | /// Value. 72 | /// Length. 73 | public static int PingPongInt( int value, int length ) { 74 | if ( length == 1 ) 75 | return 0; 76 | 77 | //ping pong 78 | int exclusiveLength = length - 1; 79 | int ponged = value % exclusiveLength; 80 | if ( ( value / exclusiveLength ) % 2 == 1 ) // if bouncing back, count down from length 81 | ponged = exclusiveLength - ponged; 82 | return ponged; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /UnityTest/Assets/Scripts/DotSoundPlayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 134181168e07c41938e270cf7f07e212 3 | timeCreated: 1460047972 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityTest/Assets/Scripts/PDTest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Playdots, Inc. 3 | * 4 | * ---------------------------- 5 | */ 6 | using UnityEngine; 7 | using UnityEngine.Assertions; 8 | using UnityEngine.UI; 9 | using System.Collections; 10 | using System.Collections.Generic; 11 | using System; 12 | 13 | /// 14 | /// ... 15 | /// 16 | public class PDTest : MonoBehaviour { 17 | 18 | public string patchName; 19 | public DotSoundConfig dotSoundConfig; 20 | 21 | DotSoundPlayer dotSoundPlayer; 22 | 23 | IEnumerator Start() { 24 | yield return new WaitForSeconds (1f); 25 | 26 | UnityPD.Init (); 27 | yield return new WaitForSeconds (2f); 28 | 29 | dotSoundPlayer = new DotSoundPlayer (dotSoundConfig); 30 | } 31 | 32 | void OnApplicationQuit() { 33 | UnityPD.Deinit (); 34 | } 35 | 36 | int selected = -1; 37 | void OnGUI() { 38 | using ( new GUILayout.AreaScope( new Rect( 80, Screen.height * .5f - 300, Screen.width - 160, 600 ) ) ) { 39 | if ( dotSoundPlayer == null ) { 40 | GUILayout.Label ("Waiting to load patch"); 41 | return; 42 | } 43 | 44 | int newSelected = GUILayout.SelectionGrid( selected, new []{ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }, 3, GUILayout.ExpandHeight( true ) ); 45 | if ( newSelected != selected ) { 46 | dotSoundPlayer.PlayDotConnectedSound ( newSelected + 1 ); 47 | selected = newSelected; 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /UnityTest/Assets/Scripts/PDTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8deb7b50deca641179c514bb9464340c 3 | timeCreated: 1456939988 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff4067c32a8764419b7a30cc0a1368c1 3 | folderAsset: yes 4 | timeCreated: 1456941161 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92a65f286a44146088898cf1bcee863f 3 | folderAsset: yes 4 | timeCreated: 1456941153 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/adder.pd: -------------------------------------------------------------------------------- 1 | #N canvas 807 290 669 542 10; 2 | #X floatatom -21 -43 5 0 0 0 - - -; 3 | #X obj 257 -36 vsl 15 48 0 100 0 0 empty empty empty 0 -9 0 10 -262144 4 | -1 -1 235 1; 5 | #X obj 55 210 +~; 6 | #X obj 31 397 outlet~; 7 | #X obj 259 -75 r \$1-freq-mod-amount; 8 | #X obj 93 -43 hsl 128 15 0 50 0 0 empty empty empty -2 -8 0 10 -262144 9 | -1 -1 1016 1; 10 | #X obj 90 -75 r \$1-freq-mod-freq; 11 | #X obj 0 263 phasor~; 12 | #X obj 1 292 *~ 2; 13 | #X obj 1 321 -~ 1; 14 | #X floatatom 15 27 5 0 0 0 - - -; 15 | #X obj 13 50 t b f; 16 | #X obj 16 -4 r \$1-control-freq-multiply; 17 | #X obj -10 114 * 1; 18 | #X obj 54 262 osc~; 19 | #X obj -21 -78 inlet; 20 | #X obj 125 96 osc~; 21 | #X obj 107 317 r \$1-vol; 22 | #X obj 58 357 *~; 23 | #X connect 0 0 13 0; 24 | #X connect 1 0 16 1; 25 | #X connect 2 0 14 0; 26 | #X connect 4 0 1 0; 27 | #X connect 5 0 16 0; 28 | #X connect 6 0 5 0; 29 | #X connect 7 0 8 0; 30 | #X connect 8 0 9 0; 31 | #X connect 10 0 11 0; 32 | #X connect 11 0 13 0; 33 | #X connect 11 1 13 1; 34 | #X connect 12 0 10 0; 35 | #X connect 13 0 2 1; 36 | #X connect 14 0 18 0; 37 | #X connect 15 0 0 0; 38 | #X connect 16 0 2 0; 39 | #X connect 17 0 18 1; 40 | #X connect 18 0 3 0; 41 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/adder.pd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a8d20ca738cf4c5da4303018f955a81 3 | timeCreated: 1460047862 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/envelope.pd: -------------------------------------------------------------------------------- 1 | #N canvas 751 326 450 300 10; 2 | #X obj 21 41 inlet fire; 3 | #X msg 242 173 0 \$1; 4 | #X obj 121 142 f; 5 | #X obj 244 144 f; 6 | #X obj 170 114 del; 7 | #X obj 32 78 t b b; 8 | #X obj 219 115 del; 9 | #X obj 166 238 outlet~; 10 | #X obj 176 203 line~; 11 | #X obj 122 41 r setAttack; 12 | #X obj 221 42 r setSustain; 13 | #X obj 328 42 r setDecay; 14 | #X msg 127 169 1 \$1; 15 | #X obj 279 237 outlet end; 16 | #X obj 320 197 del; 17 | #X connect 0 0 5 0; 18 | #X connect 1 0 8 0; 19 | #X connect 2 0 12 0; 20 | #X connect 3 0 1 0; 21 | #X connect 3 0 14 0; 22 | #X connect 4 0 6 0; 23 | #X connect 5 0 4 0; 24 | #X connect 5 1 2 0; 25 | #X connect 6 0 3 0; 26 | #X connect 8 0 7 0; 27 | #X connect 9 0 2 1; 28 | #X connect 9 0 4 1; 29 | #X connect 10 0 6 1; 30 | #X connect 11 0 3 1; 31 | #X connect 12 0 8 0; 32 | #X connect 14 0 13 0; 33 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/envelope.pd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 075766a3de3e542b3bcdb89146344317 3 | timeCreated: 1460499968 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/noteControl.pd: -------------------------------------------------------------------------------- 1 | #N canvas 264 277 802 545 10; 2 | #X floatatom 20 56 5 0 0 0 - - -; 3 | #X obj 31 134 pack 0 0 0; 4 | #X obj 86 306 s \$0-4; 5 | #X obj 72 334 s \$0-3; 6 | #X obj 56 364 s \$0-2; 7 | #X obj 44 396 s \$0-1; 8 | #X obj 262 4 r \$0-1; 9 | #X obj 262 72 r \$0-2; 10 | #X obj 265 147 r \$0-3; 11 | #X obj 265 214 r \$0-4; 12 | #X obj 164 452 outlet~; 13 | #X obj 11 2 inlet playNote; 14 | #X obj 118 10 notein; 15 | #X obj 36 28 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 16 | -1; 17 | #X obj 32 173 route 1 2 3 4 5; 18 | #X obj 268 278 r \$0-5; 19 | #X obj 98 275 s \$0-5; 20 | #X obj 33 95 poly 5 1; 21 | #X obj 153 408 catch~ \$0-out; 22 | #X obj 263 32 \$1 \$0-out 1; 23 | #X obj 261 108 \$1 \$0-out 2; 24 | #X obj 265 181 \$1 \$0-out 3; 25 | #X obj 264 248 \$1 \$0-out 4; 26 | #X obj 267 312 \$1 \$0-out 5; 27 | #X connect 0 0 17 0; 28 | #X connect 0 0 17 1; 29 | #X connect 1 0 14 0; 30 | #X connect 6 0 19 0; 31 | #X connect 7 0 20 0; 32 | #X connect 8 0 21 0; 33 | #X connect 9 0 22 0; 34 | #X connect 11 0 0 0; 35 | #X connect 12 0 0 0; 36 | #X connect 12 1 17 1; 37 | #X connect 13 0 0 0; 38 | #X connect 14 0 5 0; 39 | #X connect 14 1 4 0; 40 | #X connect 14 2 3 0; 41 | #X connect 14 3 2 0; 42 | #X connect 14 4 16 0; 43 | #X connect 15 0 23 0; 44 | #X connect 17 0 1 0; 45 | #X connect 17 1 1 1; 46 | #X connect 17 2 1 2; 47 | #X connect 18 0 10 0; 48 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/noteControl.pd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b04d58cf0f8d4a55968f54b0b19bf18 3 | timeCreated: 1460499853 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/simpleNote.pd: -------------------------------------------------------------------------------- 1 | #N canvas 490 82 771 431 10; 2 | #X msg 356 20 \; playNote 440 \;; 3 | #X obj 189 320 *~; 4 | #X obj 157 72 t b f; 5 | #X obj 154 177 envelope; 6 | #X msg 335 68 \; setAttack 40 \; setSustain 0 \; setDecay 2000 \;; 7 | #X obj 154 12 inlet; 8 | #X floatatom 147 44 5 0 0 0 - - -; 9 | #X obj 187 374 throw~ \$1; 10 | #X obj 204 135 adder adder-1; 11 | #X obj 308 135 adder adder-2; 12 | #X obj 272 186 +~; 13 | #X obj 272 225 *~ 0.5; 14 | #X obj 52 139 switch~; 15 | #X msg 77 189 0; 16 | #X connect 1 0 7 0; 17 | #X connect 2 0 3 0; 18 | #X connect 2 1 8 0; 19 | #X connect 2 1 9 0; 20 | #X connect 3 0 1 1; 21 | #X connect 3 1 13 0; 22 | #X connect 5 0 6 0; 23 | #X connect 5 0 12 0; 24 | #X connect 6 0 2 0; 25 | #X connect 8 0 10 0; 26 | #X connect 9 0 10 1; 27 | #X connect 10 0 11 0; 28 | #X connect 11 0 1 0; 29 | #X connect 13 0 12 0; 30 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/simpleNote.pd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b4f3a4a8ee364ed892604d0be9dcd98 3 | timeCreated: 1460499853 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/simpleSynth.pd: -------------------------------------------------------------------------------- 1 | #N canvas 144 345 771 431 10; 2 | #X obj 34 20 r playNote; 3 | #X obj 34 333 dac~; 4 | #X msg 234 12 \; playNote 440 \;; 5 | #X msg 217 57 \; setAttack 40 \; setSustain 0 \; setDecay 2000 \;; 6 | #X obj 193 227 snapshot~; 7 | #X floatatom 193 250 5 0 0 0 - - -; 8 | #X obj 321 169 metro 100; 9 | #X obj 408 149 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 10 | -1 -1; 11 | #X obj 30 146 noteControl simpleNote; 12 | #X msg 367 22 \; playNote 550 \;; 13 | #X obj 188 312 tabwrite~ \$0-output; 14 | #N canvas 0 22 450 278 (subpatch) 0; 15 | #X array \$0-output 100 float 3; 16 | #A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 | 0; 20 | #X coords 0 1 99 -1 200 140 1; 21 | #X restore 416 233 graph; 22 | #N canvas 213 517 450 300 effects 0; 23 | #X obj 56 78 inlet~; 24 | #X obj 67 261 outlet~; 25 | #X obj 55 155 lop~ 220; 26 | #X obj 125 107 r lop-cutoff; 27 | #X connect 0 0 2 0; 28 | #X connect 2 0 1 0; 29 | #X connect 3 0 2 1; 30 | #X restore 32 246 pd effects; 31 | #X msg 509 13 \; adder-1-vol 1 \; adder-1-control-freq-multiply 1 \; 32 | adder-1-freq-mod-freq 4 \; adder-1-freq-mod-amount 5 \;; 33 | #X msg 506 96 \; adder-2-vol 1 \; adder-2-control-freq-multiply 1 \; 34 | adder-2-freq-mod-freq 4 \; adder-2-freq-mod-amount 5 \;; 35 | #X connect 0 0 8 0; 36 | #X connect 4 0 5 0; 37 | #X connect 6 0 4 0; 38 | #X connect 6 0 10 0; 39 | #X connect 7 0 6 0; 40 | #X connect 8 0 12 0; 41 | #X connect 12 0 1 0; 42 | #X connect 12 0 1 1; 43 | -------------------------------------------------------------------------------- /UnityTest/Assets/StreamingAssets/pd/simpleSynth.pd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd1d79cc2e22d411ba5a7765ae20c778 3 | timeCreated: 1460499853 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 256 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_DisableAudio: 0 16 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/AudioManager.asset.orig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityTest/ProjectSettings/AudioManager.asset.orig -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_SolverIterationCount: 6 13 | m_QueriesHitTriggers: 1 14 | m_EnableAdaptiveForce: 0 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/DotsSynth.unity 10 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 2 13 | m_SpritePackerPaddingPower: 1 14 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 15 | m_ProjectGenerationRootNamespace: 16 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_ShaderSettings_Tier1: 42 | useCascadedShadowMaps: 0 43 | standardShaderQuality: 0 44 | useReflectionProbeBoxProjection: 0 45 | useReflectionProbeBlending: 0 46 | m_ShaderSettings_Tier2: 47 | useCascadedShadowMaps: 0 48 | standardShaderQuality: 1 49 | useReflectionProbeBoxProjection: 0 50 | useReflectionProbeBlending: 0 51 | m_ShaderSettings_Tier3: 52 | useCascadedShadowMaps: 0 53 | standardShaderQuality: 1 54 | useReflectionProbeBoxProjection: 0 55 | useReflectionProbeBlending: 0 56 | m_BuildTargetShaderSettings: [] 57 | m_LightmapStripping: 0 58 | m_FogStripping: 0 59 | m_LightmapKeepPlain: 1 60 | m_LightmapKeepDirCombined: 1 61 | m_LightmapKeepDirSeparate: 1 62 | m_LightmapKeepDynamicPlain: 1 63 | m_LightmapKeepDynamicDirCombined: 1 64 | m_LightmapKeepDynamicDirSeparate: 1 65 | m_FogKeepLinear: 1 66 | m_FogKeepExp: 1 67 | m_FogKeepExp2: 1 68 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left cmd 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshAreas: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityTest/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_MinPenetrationForPenalty: 0.01 17 | m_BaumgarteScale: 0.2 18 | m_BaumgarteTimeOfImpactScale: 0.75 19 | m_TimeToSleep: 0.5 20 | m_LinearSleepTolerance: 0.01 21 | m_AngularSleepTolerance: 2 22 | m_QueriesHitTriggers: 1 23 | m_QueriesStartInColliders: 1 24 | m_ChangeStopsCallbacks: 1 25 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 26 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 8 7 | productGUID: 295a451212c0f4698b5d6926120d44e2 8 | AndroidProfiler: 0 9 | defaultScreenOrientation: 0 10 | targetDevice: 2 11 | useOnDemandResources: 0 12 | accelerometerFrequency: 60 13 | companyName: weplaydots 14 | productName: AudioPluginDemo 15 | defaultCursor: {fileID: 0} 16 | cursorHotspot: {x: 0, y: 0} 17 | m_SplashScreenStyle: 0 18 | m_ShowUnitySplashScreen: 1 19 | m_VirtualRealitySplashScreen: {fileID: 0} 20 | defaultScreenWidth: 1024 21 | defaultScreenHeight: 768 22 | defaultScreenWidthWeb: 960 23 | defaultScreenHeightWeb: 600 24 | m_RenderingPath: 1 25 | m_MobileRenderingPath: 1 26 | m_ActiveColorSpace: 0 27 | m_MTRendering: 1 28 | m_MobileMTRendering: 0 29 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 30 | iosShowActivityIndicatorOnLoading: -1 31 | androidShowActivityIndicatorOnLoading: -1 32 | iosAppInBackgroundBehavior: 0 33 | displayResolutionDialog: 1 34 | iosAllowHTTPDownload: 1 35 | allowedAutorotateToPortrait: 1 36 | allowedAutorotateToPortraitUpsideDown: 1 37 | allowedAutorotateToLandscapeRight: 1 38 | allowedAutorotateToLandscapeLeft: 1 39 | useOSAutorotation: 1 40 | use32BitDisplayBuffer: 1 41 | disableDepthAndStencilBuffers: 0 42 | defaultIsFullScreen: 1 43 | defaultIsNativeResolution: 1 44 | runInBackground: 1 45 | captureSingleScreen: 0 46 | Override IPod Music: 0 47 | Prepare IOS For Recording: 0 48 | submitAnalytics: 1 49 | usePlayerLog: 1 50 | bakeCollisionMeshes: 0 51 | forceSingleInstance: 0 52 | resizableWindow: 0 53 | useMacAppStoreValidation: 0 54 | gpuSkinning: 0 55 | graphicsJobs: 0 56 | xboxPIXTextureCapture: 0 57 | xboxEnableAvatar: 0 58 | xboxEnableKinect: 0 59 | xboxEnableKinectAutoTracking: 0 60 | xboxEnableFitness: 0 61 | visibleInBackground: 0 62 | allowFullscreenSwitch: 1 63 | macFullscreenMode: 2 64 | d3d9FullscreenMode: 1 65 | d3d11FullscreenMode: 1 66 | xboxSpeechDB: 0 67 | xboxEnableHeadOrientation: 0 68 | xboxEnableGuest: 0 69 | xboxEnablePIXSampling: 0 70 | n3dsDisableStereoscopicView: 0 71 | n3dsEnableSharedListOpt: 1 72 | n3dsEnableVSync: 0 73 | uiUse16BitDepthBuffer: 0 74 | ignoreAlphaClear: 0 75 | xboxOneResolution: 0 76 | xboxOneMonoLoggingLevel: 0 77 | ps3SplashScreen: {fileID: 0} 78 | videoMemoryForVertexBuffers: 0 79 | psp2PowerMode: 0 80 | psp2AcquireBGM: 1 81 | wiiUTVResolution: 0 82 | wiiUGamePadMSAA: 1 83 | wiiUSupportsNunchuk: 0 84 | wiiUSupportsClassicController: 0 85 | wiiUSupportsBalanceBoard: 0 86 | wiiUSupportsMotionPlus: 0 87 | wiiUSupportsProController: 0 88 | wiiUAllowScreenCapture: 1 89 | wiiUControllerCount: 0 90 | m_SupportedAspectRatios: 91 | 4:3: 1 92 | 5:4: 1 93 | 16:10: 1 94 | 16:9: 1 95 | Others: 1 96 | bundleIdentifier: com.weplaydots.ProductBlah 97 | bundleVersion: 1.0 98 | preloadedAssets: [] 99 | metroEnableIndependentInputSource: 1 100 | xboxOneDisableKinectGpuReservation: 0 101 | singlePassStereoRendering: 0 102 | protectGraphicsMemory: 0 103 | AndroidBundleVersionCode: 1 104 | AndroidMinSdkVersion: 9 105 | AndroidPreferredInstallLocation: 1 106 | aotOptions: 107 | apiCompatibilityLevel: 2 108 | stripEngineCode: 1 109 | iPhoneStrippingLevel: 0 110 | iPhoneScriptCallOptimization: 0 111 | iPhoneBuildNumber: 0 112 | ForceInternetPermission: 0 113 | ForceSDCardPermission: 0 114 | CreateWallpaper: 0 115 | APKExpansionFiles: 0 116 | preloadShaders: 0 117 | StripUnusedMeshComponents: 0 118 | VertexChannelCompressionMask: 119 | serializedVersion: 2 120 | m_Bits: 238 121 | iPhoneSdkVersion: 988 122 | iPhoneTargetOSVersion: 22 123 | tvOSSdkVersion: 0 124 | tvOSTargetOSVersion: 900 125 | uIPrerenderedIcon: 0 126 | uIRequiresPersistentWiFi: 0 127 | uIRequiresFullScreen: 1 128 | uIStatusBarHidden: 1 129 | uIExitOnSuspend: 0 130 | uIStatusBarStyle: 0 131 | iPhoneSplashScreen: {fileID: 0} 132 | iPhoneHighResSplashScreen: {fileID: 0} 133 | iPhoneTallHighResSplashScreen: {fileID: 0} 134 | iPhone47inSplashScreen: {fileID: 0} 135 | iPhone55inPortraitSplashScreen: {fileID: 0} 136 | iPhone55inLandscapeSplashScreen: {fileID: 0} 137 | iPadPortraitSplashScreen: {fileID: 0} 138 | iPadHighResPortraitSplashScreen: {fileID: 0} 139 | iPadLandscapeSplashScreen: {fileID: 0} 140 | iPadHighResLandscapeSplashScreen: {fileID: 0} 141 | appleTVSplashScreen: {fileID: 0} 142 | tvOSSmallIconLayers: [] 143 | tvOSLargeIconLayers: [] 144 | tvOSTopShelfImageLayers: [] 145 | iOSLaunchScreenType: 0 146 | iOSLaunchScreenPortrait: {fileID: 0} 147 | iOSLaunchScreenLandscape: {fileID: 0} 148 | iOSLaunchScreenBackgroundColor: 149 | serializedVersion: 2 150 | rgba: 0 151 | iOSLaunchScreenFillPct: 100 152 | iOSLaunchScreenSize: 100 153 | iOSLaunchScreenCustomXibPath: 154 | iOSLaunchScreeniPadType: 0 155 | iOSLaunchScreeniPadImage: {fileID: 0} 156 | iOSLaunchScreeniPadBackgroundColor: 157 | serializedVersion: 2 158 | rgba: 0 159 | iOSLaunchScreeniPadFillPct: 100 160 | iOSLaunchScreeniPadSize: 100 161 | iOSLaunchScreeniPadCustomXibPath: 162 | iOSDeviceRequirements: [] 163 | iOSURLSchemes: [] 164 | AndroidTargetDevice: 0 165 | AndroidSplashScreenScale: 0 166 | androidSplashScreen: {fileID: 0} 167 | AndroidKeystoreName: 168 | AndroidKeyaliasName: 169 | AndroidTVCompatibility: 1 170 | AndroidIsGame: 1 171 | androidEnableBanner: 1 172 | m_AndroidBanners: 173 | - width: 320 174 | height: 180 175 | banner: {fileID: 0} 176 | androidGamepadSupportLevel: 0 177 | resolutionDialogBanner: {fileID: 0} 178 | m_BuildTargetIcons: 179 | - m_BuildTarget: 180 | m_Icons: 181 | - serializedVersion: 2 182 | m_Icon: {fileID: 0} 183 | m_Width: 128 184 | m_Height: 128 185 | m_BuildTargetBatching: [] 186 | m_BuildTargetGraphicsAPIs: 187 | - m_BuildTarget: WindowsStandaloneSupport 188 | m_APIs: 01000000 189 | m_Automatic: 0 190 | - m_BuildTarget: AndroidPlayer 191 | m_APIs: 08000000 192 | m_Automatic: 0 193 | webPlayerTemplate: APPLICATION:Default 194 | m_TemplateCustomTags: {} 195 | wiiUTitleID: 0005000011000000 196 | wiiUGroupID: 00010000 197 | wiiUCommonSaveSize: 4096 198 | wiiUAccountSaveSize: 2048 199 | wiiUOlvAccessKey: 0 200 | wiiUTinCode: 0 201 | wiiUJoinGameId: 0 202 | wiiUJoinGameModeMask: 0000000000000000 203 | wiiUCommonBossSize: 0 204 | wiiUAccountBossSize: 0 205 | wiiUAddOnUniqueIDs: [] 206 | wiiUMainThreadStackSize: 3072 207 | wiiULoaderThreadStackSize: 1024 208 | wiiUSystemHeapSize: 128 209 | wiiUTVStartupScreen: {fileID: 0} 210 | wiiUGamePadStartupScreen: {fileID: 0} 211 | wiiUProfilerLibPath: 212 | actionOnDotNetUnhandledException: 1 213 | enableInternalProfiler: 0 214 | logObjCUncaughtExceptions: 1 215 | enableCrashReportAPI: 0 216 | locationUsageDescription: 217 | XboxTitleId: 218 | XboxImageXexPath: 219 | XboxSpaPath: 220 | XboxGenerateSpa: 0 221 | XboxDeployKinectResources: 0 222 | XboxSplashScreen: {fileID: 0} 223 | xboxEnableSpeech: 0 224 | xboxAdditionalTitleMemorySize: 0 225 | xboxDeployKinectHeadOrientation: 0 226 | xboxDeployKinectHeadPosition: 0 227 | ps3TitleConfigPath: 228 | ps3DLCConfigPath: 229 | ps3ThumbnailPath: 230 | ps3BackgroundPath: 231 | ps3SoundPath: 232 | ps3NPAgeRating: -842150451 233 | ps3TrophyCommId: 234 | ps3NpCommunicationPassphrase: 235 | ps3TrophyPackagePath: 236 | ps3BootCheckMaxSaveGameSizeKB: 128 237 | ps3TrophyCommSig: 238 | ps3SaveGameSlots: 1 239 | ps3TrialMode: 0 240 | ps3VideoMemoryForAudio: 0 241 | ps3EnableVerboseMemoryStats: 0 242 | ps3UseSPUForUmbra: 0 243 | ps3EnableMoveSupport: 1 244 | ps3DisableDolbyEncoding: 0 245 | ps4NPAgeRating: -842150451 246 | ps4NPTitleSecret: 247 | ps4NPTrophyPackPath: 248 | ps4ParentalLevel: -842150451 249 | ps4ContentID: 250 | ps4Category: -842150451 251 | ps4MasterVersion: 252 | ps4AppVersion: 253 | ps4AppType: 0 254 | ps4ParamSfxPath: 255 | ps4VideoOutPixelFormat: -842150451 256 | ps4VideoOutResolution: -842150451 257 | ps4PronunciationXMLPath: 258 | ps4PronunciationSIGPath: 259 | ps4BackgroundImagePath: 260 | ps4StartupImagePath: 261 | ps4SaveDataImagePath: 262 | ps4SdkOverride: 263 | ps4BGMPath: 264 | ps4ShareFilePath: 265 | ps4ShareOverlayImagePath: 266 | ps4PrivacyGuardImagePath: 267 | ps4NPtitleDatPath: 268 | ps4RemotePlayKeyAssignment: -1 269 | ps4RemotePlayKeyMappingDir: 270 | ps4PlayTogetherPlayerCount: 0 271 | ps4EnterButtonAssignment: -842150451 272 | ps4ApplicationParam1: -842150451 273 | ps4ApplicationParam2: -842150451 274 | ps4ApplicationParam3: -842150451 275 | ps4ApplicationParam4: -842150451 276 | ps4DownloadDataSize: 0 277 | ps4GarlicHeapSize: 2048 278 | ps4Passcode: hPq5ofOxTnEsFCPmdHoWXCDbvPMsbA4L 279 | ps4UseDebugIl2cppLibs: 0 280 | ps4pnSessions: 1 281 | ps4pnPresence: 1 282 | ps4pnFriends: 1 283 | ps4pnGameCustomData: 1 284 | playerPrefsSupport: 0 285 | ps4ReprojectionSupport: 0 286 | ps4UseAudio3dBackend: 0 287 | ps4SocialScreenEnabled: 0 288 | ps4Audio3dVirtualSpeakerCount: 14 289 | ps4attribCpuUsage: 0 290 | ps4PatchPkgPath: 291 | ps4PatchLatestPkgPath: 292 | ps4PatchChangeinfoPath: 293 | ps4attribUserManagement: 0 294 | ps4attribMoveSupport: 0 295 | ps4attrib3DSupport: 0 296 | ps4attribShareSupport: 0 297 | ps4attribExclusiveVR: 0 298 | ps4disableAutoHideSplash: 0 299 | ps4IncludedModules: [] 300 | monoEnv: 301 | psp2Splashimage: {fileID: 0} 302 | psp2NPTrophyPackPath: 303 | psp2NPSupportGBMorGJP: 0 304 | psp2NPAgeRating: 12 305 | psp2NPTitleDatPath: 306 | psp2NPCommsID: 307 | psp2NPCommunicationsID: 308 | psp2NPCommsPassphrase: 309 | psp2NPCommsSig: 310 | psp2ParamSfxPath: 311 | psp2ManualPath: 312 | psp2LiveAreaGatePath: 313 | psp2LiveAreaBackroundPath: 314 | psp2LiveAreaPath: 315 | psp2LiveAreaTrialPath: 316 | psp2PatchChangeInfoPath: 317 | psp2PatchOriginalPackage: 318 | psp2PackagePassword: WRK5RhRXdCdG5nG5azdNMK66MuCV6GXi 319 | psp2KeystoneFile: 320 | psp2MemoryExpansionMode: 0 321 | psp2DRMType: 0 322 | psp2StorageType: 0 323 | psp2MediaCapacity: 0 324 | psp2DLCConfigPath: 325 | psp2ThumbnailPath: 326 | psp2BackgroundPath: 327 | psp2SoundPath: 328 | psp2TrophyCommId: 329 | psp2TrophyPackagePath: 330 | psp2PackagedResourcesPath: 331 | psp2SaveDataQuota: 10240 332 | psp2ParentalLevel: 1 333 | psp2ShortTitle: Not Set 334 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 335 | psp2Category: 0 336 | psp2MasterVersion: 01.00 337 | psp2AppVersion: 01.00 338 | psp2TVBootMode: 0 339 | psp2EnterButtonAssignment: 2 340 | psp2TVDisableEmu: 0 341 | psp2AllowTwitterDialog: 1 342 | psp2Upgradable: 0 343 | psp2HealthWarning: 0 344 | psp2UseLibLocation: 0 345 | psp2InfoBarOnStartup: 0 346 | psp2InfoBarColor: 0 347 | psp2UseDebugIl2cppLibs: 0 348 | psmSplashimage: {fileID: 0} 349 | spritePackerPolicy: 350 | scriptingDefineSymbols: 351 | 7: UNITY_ANDROID 352 | metroPackageName: AudioPluginDemo 353 | metroPackageVersion: 354 | metroCertificatePath: 355 | metroCertificatePassword: 356 | metroCertificateSubject: 357 | metroCertificateIssuer: 358 | metroCertificateNotAfter: 0000000000000000 359 | metroApplicationDescription: AudioPluginDemo 360 | wsaImages: {} 361 | metroTileShortName: 362 | metroCommandLineArgsFile: 363 | metroTileShowName: 1 364 | metroMediumTileShowName: 0 365 | metroLargeTileShowName: 0 366 | metroWideTileShowName: 0 367 | metroDefaultTileSize: 1 368 | metroTileForegroundText: 1 369 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 370 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 371 | metroSplashScreenUseBackgroundColor: 0 372 | platformCapabilities: {} 373 | metroFTAName: 374 | metroFTAFileTypes: [] 375 | metroProtocolName: 376 | metroCompilationOverrides: 1 377 | tizenProductDescription: 378 | tizenProductURL: 379 | tizenSigningProfileName: 380 | tizenGPSPermissions: 0 381 | tizenMicrophonePermissions: 0 382 | n3dsUseExtSaveData: 0 383 | n3dsCompressStaticMem: 1 384 | n3dsExtSaveDataNumber: 0x12345 385 | n3dsStackSize: 131072 386 | n3dsTargetPlatform: 2 387 | n3dsRegion: 7 388 | n3dsMediaSize: 0 389 | n3dsLogoStyle: 3 390 | n3dsTitle: GameName 391 | n3dsProductCode: 392 | n3dsApplicationId: 0xFF3FF 393 | stvDeviceAddress: 394 | stvProductDescription: 395 | stvProductAuthor: 396 | stvProductAuthorEmail: 397 | stvProductLink: 398 | stvProductCategory: 0 399 | XboxOneProductId: 400 | XboxOneUpdateKey: 401 | XboxOneSandboxId: 402 | XboxOneContentId: 403 | XboxOneTitleId: 404 | XboxOneSCId: 405 | XboxOneGameOsOverridePath: 406 | XboxOnePackagingOverridePath: 407 | XboxOneAppManifestOverridePath: 408 | XboxOnePackageEncryption: 0 409 | XboxOnePackageUpdateGranularity: 2 410 | XboxOneDescription: 411 | XboxOneIsContentPackage: 0 412 | XboxOneEnableGPUVariability: 0 413 | XboxOneSockets: 414 | Unity Internal - Mono async-IO: 415 | m_Name: Unity Internal - Mono async-IO 416 | m_Port: 417 | m_Protocol: 0 418 | m_Usages: 0000000001000000 419 | m_TemplateName: 420 | m_SessionRequirment: 0 421 | m_DeviceUsages: 422 | XboxOneSplashScreen: {fileID: 0} 423 | XboxOneAllowedProductIds: [] 424 | XboxOnePersistentLocalStorageSize: 0 425 | intPropertyNames: 426 | - Android::ScriptingBackend 427 | - Standalone::ScriptingBackend 428 | - WebGL::ScriptingBackend 429 | - WebGL::audioCompressionFormat 430 | - WebGL::exceptionSupport 431 | - WebGL::memorySize 432 | - iOS::Architecture 433 | - iOS::EnableIncrementalBuildSupportForIl2cpp 434 | - iOS::ScriptingBackend 435 | Android::ScriptingBackend: 0 436 | Standalone::ScriptingBackend: 0 437 | WebGL::ScriptingBackend: 1 438 | WebGL::audioCompressionFormat: 4 439 | WebGL::exceptionSupport: 0 440 | WebGL::memorySize: 256 441 | iOS::Architecture: 0 442 | iOS::EnableIncrementalBuildSupportForIl2cpp: 1 443 | iOS::ScriptingBackend: 0 444 | boolPropertyNames: 445 | - Android::VR::enable 446 | - Metro::VR::enable 447 | - N3DS::VR::enable 448 | - PS3::VR::enable 449 | - PS4::VR::enable 450 | - PSM::VR::enable 451 | - PSP2::VR::enable 452 | - SamsungTV::VR::enable 453 | - Standalone::VR::enable 454 | - Tizen::VR::enable 455 | - WebGL::VR::enable 456 | - WebGL::dataCaching 457 | - WebPlayer::VR::enable 458 | - WiiU::VR::enable 459 | - Xbox360::VR::enable 460 | - XboxOne::VR::enable 461 | - iOS::VR::enable 462 | - tvOS::VR::enable 463 | Android::VR::enable: 0 464 | Metro::VR::enable: 0 465 | N3DS::VR::enable: 0 466 | PS3::VR::enable: 0 467 | PS4::VR::enable: 0 468 | PSM::VR::enable: 0 469 | PSP2::VR::enable: 0 470 | SamsungTV::VR::enable: 0 471 | Standalone::VR::enable: 0 472 | Tizen::VR::enable: 0 473 | WebGL::VR::enable: 0 474 | WebGL::dataCaching: 0 475 | WebPlayer::VR::enable: 0 476 | WiiU::VR::enable: 0 477 | Xbox360::VR::enable: 0 478 | XboxOne::VR::enable: 0 479 | iOS::VR::enable: 0 480 | tvOS::VR::enable: 0 481 | stringPropertyNames: 482 | - Analytics_ServiceEnabled::Analytics_ServiceEnabled 483 | - Build_ServiceEnabled::Build_ServiceEnabled 484 | - Collab_ServiceEnabled::Collab_ServiceEnabled 485 | - ErrorHub_ServiceEnabled::ErrorHub_ServiceEnabled 486 | - Game_Performance_ServiceEnabled::Game_Performance_ServiceEnabled 487 | - Hub_ServiceEnabled::Hub_ServiceEnabled 488 | - Purchasing_ServiceEnabled::Purchasing_ServiceEnabled 489 | - UNet_ServiceEnabled::UNet_ServiceEnabled 490 | - Unity_Ads_ServiceEnabled::Unity_Ads_ServiceEnabled 491 | - WebGL::emscriptenArgs 492 | - WebGL::template 493 | Analytics_ServiceEnabled::Analytics_ServiceEnabled: False 494 | Build_ServiceEnabled::Build_ServiceEnabled: False 495 | Collab_ServiceEnabled::Collab_ServiceEnabled: False 496 | ErrorHub_ServiceEnabled::ErrorHub_ServiceEnabled: False 497 | Game_Performance_ServiceEnabled::Game_Performance_ServiceEnabled: False 498 | Hub_ServiceEnabled::Hub_ServiceEnabled: False 499 | Purchasing_ServiceEnabled::Purchasing_ServiceEnabled: False 500 | UNet_ServiceEnabled::UNet_ServiceEnabled: False 501 | Unity_Ads_ServiceEnabled::Unity_Ads_ServiceEnabled: False 502 | WebGL::emscriptenArgs: 503 | WebGL::template: APPLICATION:Default 504 | vectorPropertyNames: 505 | - Android::VR::enabledDevices 506 | - Metro::VR::enabledDevices 507 | - N3DS::VR::enabledDevices 508 | - PS3::VR::enabledDevices 509 | - PS4::VR::enabledDevices 510 | - PSM::VR::enabledDevices 511 | - PSP2::VR::enabledDevices 512 | - SamsungTV::VR::enabledDevices 513 | - Standalone::VR::enabledDevices 514 | - Tizen::VR::enabledDevices 515 | - WebGL::VR::enabledDevices 516 | - WebPlayer::VR::enabledDevices 517 | - WiiU::VR::enabledDevices 518 | - Xbox360::VR::enabledDevices 519 | - XboxOne::VR::enabledDevices 520 | - iOS::VR::enabledDevices 521 | - tvOS::VR::enabledDevices 522 | Android::VR::enabledDevices: 523 | - Oculus 524 | Metro::VR::enabledDevices: [] 525 | N3DS::VR::enabledDevices: [] 526 | PS3::VR::enabledDevices: [] 527 | PS4::VR::enabledDevices: 528 | - PlayStationVR 529 | PSM::VR::enabledDevices: [] 530 | PSP2::VR::enabledDevices: [] 531 | SamsungTV::VR::enabledDevices: [] 532 | Standalone::VR::enabledDevices: 533 | - Oculus 534 | Tizen::VR::enabledDevices: [] 535 | WebGL::VR::enabledDevices: [] 536 | WebPlayer::VR::enabledDevices: [] 537 | WiiU::VR::enabledDevices: [] 538 | Xbox360::VR::enabledDevices: [] 539 | XboxOne::VR::enabledDevices: [] 540 | iOS::VR::enabledDevices: [] 541 | tvOS::VR::enabledDevices: [] 542 | cloudProjectId: 543 | projectName: 544 | organizationId: 545 | cloudEnabled: 0 546 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.4.0f3 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 2 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | blendWeights: 1 21 | textureQuality: 1 22 | anisotropicTextures: 0 23 | antiAliasing: 0 24 | softParticles: 0 25 | softVegetation: 0 26 | realtimeReflectionProbes: 0 27 | billboardsFaceCameraPosition: 0 28 | vSyncCount: 0 29 | lodBias: 0.3 30 | maximumLODLevel: 0 31 | particleRaycastBudget: 4 32 | asyncUploadTimeSlice: 2 33 | asyncUploadBufferSize: 4 34 | excludedTargetPlatforms: [] 35 | - serializedVersion: 2 36 | name: Fast 37 | pixelLightCount: 0 38 | shadows: 0 39 | shadowResolution: 0 40 | shadowProjection: 1 41 | shadowCascades: 1 42 | shadowDistance: 20 43 | shadowNearPlaneOffset: 2 44 | shadowCascade2Split: 0.33333334 45 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 46 | blendWeights: 2 47 | textureQuality: 0 48 | anisotropicTextures: 0 49 | antiAliasing: 0 50 | softParticles: 0 51 | softVegetation: 0 52 | realtimeReflectionProbes: 0 53 | billboardsFaceCameraPosition: 0 54 | vSyncCount: 0 55 | lodBias: 0.4 56 | maximumLODLevel: 0 57 | particleRaycastBudget: 16 58 | asyncUploadTimeSlice: 2 59 | asyncUploadBufferSize: 4 60 | excludedTargetPlatforms: [] 61 | - serializedVersion: 2 62 | name: Simple 63 | pixelLightCount: 1 64 | shadows: 1 65 | shadowResolution: 0 66 | shadowProjection: 1 67 | shadowCascades: 1 68 | shadowDistance: 20 69 | shadowNearPlaneOffset: 2 70 | shadowCascade2Split: 0.33333334 71 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 72 | blendWeights: 2 73 | textureQuality: 0 74 | anisotropicTextures: 1 75 | antiAliasing: 0 76 | softParticles: 0 77 | softVegetation: 0 78 | realtimeReflectionProbes: 0 79 | billboardsFaceCameraPosition: 0 80 | vSyncCount: 0 81 | lodBias: 0.7 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 64 84 | asyncUploadTimeSlice: 2 85 | asyncUploadBufferSize: 4 86 | excludedTargetPlatforms: [] 87 | - serializedVersion: 2 88 | name: Good 89 | pixelLightCount: 2 90 | shadows: 2 91 | shadowResolution: 1 92 | shadowProjection: 1 93 | shadowCascades: 2 94 | shadowDistance: 40 95 | shadowNearPlaneOffset: 2 96 | shadowCascade2Split: 0.33333334 97 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 98 | blendWeights: 2 99 | textureQuality: 0 100 | anisotropicTextures: 1 101 | antiAliasing: 0 102 | softParticles: 0 103 | softVegetation: 1 104 | realtimeReflectionProbes: 1 105 | billboardsFaceCameraPosition: 1 106 | vSyncCount: 1 107 | lodBias: 1 108 | maximumLODLevel: 0 109 | particleRaycastBudget: 256 110 | asyncUploadTimeSlice: 2 111 | asyncUploadBufferSize: 4 112 | excludedTargetPlatforms: [] 113 | - serializedVersion: 2 114 | name: Beautiful 115 | pixelLightCount: 3 116 | shadows: 2 117 | shadowResolution: 2 118 | shadowProjection: 1 119 | shadowCascades: 2 120 | shadowDistance: 70 121 | shadowNearPlaneOffset: 2 122 | shadowCascade2Split: 0.33333334 123 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 124 | blendWeights: 4 125 | textureQuality: 0 126 | anisotropicTextures: 2 127 | antiAliasing: 2 128 | softParticles: 1 129 | softVegetation: 1 130 | realtimeReflectionProbes: 1 131 | billboardsFaceCameraPosition: 1 132 | vSyncCount: 1 133 | lodBias: 1.5 134 | maximumLODLevel: 0 135 | particleRaycastBudget: 1024 136 | asyncUploadTimeSlice: 2 137 | asyncUploadBufferSize: 4 138 | excludedTargetPlatforms: [] 139 | - serializedVersion: 2 140 | name: Fantastic 141 | pixelLightCount: 4 142 | shadows: 2 143 | shadowResolution: 2 144 | shadowProjection: 1 145 | shadowCascades: 4 146 | shadowDistance: 150 147 | shadowNearPlaneOffset: 2 148 | shadowCascade2Split: 0.33333334 149 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 150 | blendWeights: 4 151 | textureQuality: 0 152 | anisotropicTextures: 2 153 | antiAliasing: 2 154 | softParticles: 1 155 | softVegetation: 1 156 | realtimeReflectionProbes: 1 157 | billboardsFaceCameraPosition: 1 158 | vSyncCount: 1 159 | lodBias: 2 160 | maximumLODLevel: 0 161 | particleRaycastBudget: 4096 162 | asyncUploadTimeSlice: 2 163 | asyncUploadBufferSize: 4 164 | excludedTargetPlatforms: [] 165 | m_PerPlatformDefaultQuality: 166 | Android: 0 167 | Standalone: 0 168 | Web: 0 169 | iPhone: 0 170 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/QualitySettings.asset.orig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/UnityTest/ProjectSettings/QualitySettings.asset.orig -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!292 &1 4 | UnityAdsSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_InitializeOnStartup: 1 8 | m_TestMode: 0 9 | m_EnabledPlatforms: 4294967295 10 | m_IosGameId: 11 | m_AndroidGameId: 12 | -------------------------------------------------------------------------------- /UnityTest/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | UnityPurchasingSettings: 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | UnityAnalyticsSettings: 10 | m_Enabled: 0 11 | m_InitializeOnStartup: 1 12 | m_TestMode: 0 13 | m_TestEventUrl: 14 | m_TestConfigUrl: 15 | -------------------------------------------------------------------------------- /src/Android/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /src/Android/Android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Android/app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Android/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | PD_ROOT = $(LOCAL_PATH)/../../../libpd 4 | DST_PATH = $(LOCAL_PATH)/../../../UnityPd/Android 5 | 6 | # PD-specific flags 7 | PD_SRC_FILES := \ 8 | $(PD_ROOT)/pure-data/src/d_arithmetic.c $(PD_ROOT)/pure-data/src/d_array.c $(PD_ROOT)/pure-data/src/d_ctl.c \ 9 | $(PD_ROOT)/pure-data/src/d_dac.c $(PD_ROOT)/pure-data/src/d_delay.c $(PD_ROOT)/pure-data/src/d_fft.c \ 10 | $(PD_ROOT)/pure-data/src/d_fft_fftsg.c \ 11 | $(PD_ROOT)/pure-data/src/d_filter.c $(PD_ROOT)/pure-data/src/d_global.c $(PD_ROOT)/pure-data/src/d_math.c \ 12 | $(PD_ROOT)/pure-data/src/d_misc.c $(PD_ROOT)/pure-data/src/d_osc.c $(PD_ROOT)/pure-data/src/d_resample.c \ 13 | $(PD_ROOT)/pure-data/src/d_soundfile.c $(PD_ROOT)/pure-data/src/d_ugen.c \ 14 | $(PD_ROOT)/pure-data/src/g_all_guis.c $(PD_ROOT)/pure-data/src/g_array.c $(PD_ROOT)/pure-data/src/g_bang.c \ 15 | $(PD_ROOT)/pure-data/src/g_canvas.c $(PD_ROOT)/pure-data/src/g_clone.c $(PD_ROOT)/pure-data/src/g_editor.c \ 16 | $(PD_ROOT)/pure-data/src/g_editor_extras.c \ 17 | $(PD_ROOT)/pure-data/src/g_graph.c $(PD_ROOT)/pure-data/src/g_guiconnect.c $(PD_ROOT)/pure-data/src/g_hdial.c \ 18 | $(PD_ROOT)/pure-data/src/g_hslider.c $(PD_ROOT)/pure-data/src/g_io.c $(PD_ROOT)/pure-data/src/g_mycanvas.c \ 19 | $(PD_ROOT)/pure-data/src/g_numbox.c $(PD_ROOT)/pure-data/src/g_readwrite.c \ 20 | $(PD_ROOT)/pure-data/src/g_rtext.c $(PD_ROOT)/pure-data/src/g_scalar.c $(PD_ROOT)/pure-data/src/g_template.c \ 21 | $(PD_ROOT)/pure-data/src/g_text.c $(PD_ROOT)/pure-data/src/g_toggle.c $(PD_ROOT)/pure-data/src/g_traversal.c \ 22 | $(PD_ROOT)/pure-data/src/g_undo.c \ 23 | $(PD_ROOT)/pure-data/src/g_vdial.c $(PD_ROOT)/pure-data/src/g_vslider.c $(PD_ROOT)/pure-data/src/g_vumeter.c \ 24 | $(PD_ROOT)/pure-data/src/m_atom.c $(PD_ROOT)/pure-data/src/m_binbuf.c $(PD_ROOT)/pure-data/src/m_class.c \ 25 | $(PD_ROOT)/pure-data/src/m_conf.c $(PD_ROOT)/pure-data/src/m_glob.c $(PD_ROOT)/pure-data/src/m_memory.c \ 26 | $(PD_ROOT)/pure-data/src/m_obj.c $(PD_ROOT)/pure-data/src/m_pd.c $(PD_ROOT)/pure-data/src/m_sched.c \ 27 | $(PD_ROOT)/pure-data/src/s_audio.c $(PD_ROOT)/pure-data/src/s_audio_dummy.c \ 28 | $(PD_ROOT)/pure-data/src/s_inter.c \ 29 | $(PD_ROOT)/pure-data/src/s_loader.c $(PD_ROOT)/pure-data/src/s_main.c $(PD_ROOT)/pure-data/src/s_path.c \ 30 | $(PD_ROOT)/pure-data/src/s_print.c $(PD_ROOT)/pure-data/src/s_utf8.c $(PD_ROOT)/pure-data/src/x_acoustics.c \ 31 | $(PD_ROOT)/pure-data/src/x_arithmetic.c $(PD_ROOT)/pure-data/src/x_connective.c \ 32 | $(PD_ROOT)/pure-data/src/x_gui.c $(PD_ROOT)/pure-data/src/x_list.c $(PD_ROOT)/pure-data/src/x_midi.c \ 33 | $(PD_ROOT)/pure-data/src/x_misc.c $(PD_ROOT)/pure-data/src/x_net.c $(PD_ROOT)/pure-data/src/x_array.c \ 34 | $(PD_ROOT)/pure-data/src/x_time.c $(PD_ROOT)/pure-data/src/x_interface.c $(PD_ROOT)/pure-data/src/x_scalar.c \ 35 | $(PD_ROOT)/pure-data/src/x_text.c $(PD_ROOT)/pure-data/src/x_vexp.c $(PD_ROOT)/pure-data/src/x_vexp_if.c \ 36 | $(PD_ROOT)/pure-data/src/x_vexp_fun.c $(PD_ROOT)/libpd_wrapper/s_libpdmidi.c \ 37 | $(PD_ROOT)/libpd_wrapper/x_libpdreceive.c $(PD_ROOT)/libpd_wrapper/z_libpd.c \ 38 | $(PD_ROOT)/libpd_wrapper/util/ringbuffer.c $(PD_ROOT)/libpd_wrapper/util/z_queued.c \ 39 | $(PD_ROOT)/libpd_wrapper/z_hooks.c $(PD_ROOT)/libpd_wrapper/util/z_print_util.c 40 | 41 | PD_C_INCLUDES := $(PD_ROOT)/pure-data/src $(PD_ROOT)/libpd_wrapper \ 42 | $(PD_ROOT)/libpd_wrapper/util 43 | PD_CFLAGS := -DPD -DHAVE_UNISTD_H -DHAVE_LIBDL -DUSEAPI_DUMMY -w 44 | PD_JNI_CFLAGS := -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast 45 | PD_LDLIBS := -ldl 46 | 47 | # build LibPd static library 48 | include $(CLEAR_VARS) 49 | LOCAL_MODULE := pd 50 | LOCAL_C_INCLUDES := $(PD_C_INCLUDES) 51 | LOCAL_CFLAGS := $(PD_CFLAGS) 52 | LOCAL_LDLIBS := $(PD_LDLIBS) 53 | LOCAL_SRC_FILES := $(PD_SRC_FILES:$(LOCAL_PATH)/%=%) 54 | LOCAL_EXPORT_C_INCLUDES := $(PD_C_INCLUDES) 55 | include $(BUILD_STATIC_LIBRARY) 56 | 57 | 58 | # Build stdout.so 59 | 60 | # include $(CLEAR_VARS) 61 | 62 | # LOCAL_MODULE := stdout 63 | # LOCAL_C_INCLUDES := $(PD_ROOT)/pure-data/src 64 | # LOCAL_CFLAGS := -DPD 65 | # LOCAL_SRC_FILES := $(PD_ROOT)/pure-data/extra/stdout/stdout.c 66 | # LOCAL_SHARED_LIBRARIES := pd 67 | # include $(BUILD_STATIC_LIBRARY) 68 | 69 | 70 | include $(CLEAR_VARS) 71 | LOCAL_MODULE := AudioPlugin_UnityPd 72 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../UnityNativeAudioPlugin 73 | LOCAL_C_FLAGS = -DPD 74 | LOCAL_LDLIBS += -latomic 75 | LOCAL_SRC_FILES := ../../Plugin_UnityPd.cpp ../../UnityNativeAudioPlugin/AudioPluginUtil.cpp 76 | LOCAL_STATIC_LIBRARIES := pd 77 | include $(BUILD_STATIC_LIBRARY) 78 | 79 | all: $(DST_PATH)/$(TARGET_ARCH_ABI) 80 | 81 | $(DST_PATH)/$(TARGET_ARCH_ABI): $(LOCAL_BUILT_MODULE) 82 | mkdir -p $@ && cp $< $@ 83 | -------------------------------------------------------------------------------- /src/Android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_STL := c++_static 2 | APP_ABI := armeabi-v7a arm64-v8a x86 3 | NDK_TOOLCHAIN_VERSION := clang -------------------------------------------------------------------------------- /src/Plugin_UnityPd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin_UnityPd.cpp 3 | * Copyright (C) 2017 Playdots, Inc. 4 | * ---------------------------- 5 | */ 6 | 7 | #include "AudioPluginUtil.h" 8 | #ifndef UNITY_WIN 9 | #include 10 | #include 11 | #endif 12 | 13 | namespace UnityPd 14 | { 15 | enum Param 16 | { 17 | P_NUM 18 | }; 19 | struct EffectData 20 | { 21 | 22 | struct Data 23 | { 24 | float p[P_NUM]; 25 | }; 26 | union 27 | { 28 | Data data; 29 | unsigned char pad[(sizeof(Data) + 15) & ~15]; // This entire structure must be a multiple of 16 bytes (and and instance 16 byte aligned) for PS3 SPU DMA requirements 30 | }; 31 | }; 32 | 33 | std::mutex mtx; 34 | 35 | /** 36 | GUI CREATION 37 | */ 38 | int InternalRegisterEffectDefinition(UnityAudioEffectDefinition& definition) 39 | { 40 | int numparams = P_NUM; 41 | definition.paramdefs = new UnityAudioParameterDefinition [numparams]; 42 | definition.channels = 2; 43 | return numparams; 44 | } 45 | 46 | void pdprint(const char *s) { 47 | fprintf(stderr, "[#PD] %s", s); 48 | } 49 | 50 | /** 51 | THE SETUP EVENT 52 | */ 53 | UNITY_AUDIODSP_RESULT UNITY_AUDIODSP_CALLBACK CreateCallback(UnityAudioEffectState* state) 54 | { 55 | EffectData* effectdata = new EffectData; 56 | memset(effectdata, 0, sizeof(EffectData)); 57 | state->effectdata = effectdata; 58 | InitParametersFromDefinitions(InternalRegisterEffectDefinition, effectdata->data.p); 59 | 60 | //setup 61 | #ifndef UNITY_WIN 62 | libpd_set_printhook(pdprint); 63 | 64 | libpd_init(); 65 | libpd_init_audio(2, 2, state->samplerate); 66 | 67 | fprintf(stderr, "Init: %d\n", state->samplerate ); 68 | #endif 69 | return UNITY_AUDIODSP_OK; 70 | } 71 | 72 | UNITY_AUDIODSP_RESULT UNITY_AUDIODSP_CALLBACK ReleaseCallback(UnityAudioEffectState* state) 73 | { 74 | EffectData::Data* data = &state->GetEffectData()->data; 75 | delete data; 76 | 77 | return UNITY_AUDIODSP_OK; 78 | } 79 | 80 | UNITY_AUDIODSP_RESULT UNITY_AUDIODSP_CALLBACK SetFloatParameterCallback(UnityAudioEffectState* state, int index, float value) 81 | { 82 | EffectData::Data* data = &state->GetEffectData()->data; 83 | if(index < 0 || index >= P_NUM) 84 | return UNITY_AUDIODSP_ERR_UNSUPPORTED; 85 | data->p[index] = value; 86 | 87 | return UNITY_AUDIODSP_OK; 88 | } 89 | 90 | UNITY_AUDIODSP_RESULT UNITY_AUDIODSP_CALLBACK GetFloatParameterCallback(UnityAudioEffectState* state, int index, float* value, char *valuestr) 91 | { 92 | EffectData::Data* data = &state->GetEffectData()->data; 93 | if(index < 0 || index >= P_NUM) 94 | return UNITY_AUDIODSP_ERR_UNSUPPORTED; 95 | if(value != NULL) 96 | *value = data->p[index]; 97 | if(valuestr != NULL) 98 | valuestr[0] = 0; 99 | return UNITY_AUDIODSP_OK; 100 | } 101 | 102 | int UNITY_AUDIODSP_CALLBACK GetFloatBufferCallback (UnityAudioEffectState* state, const char* name, float* buffer, int numsamples) 103 | { 104 | return UNITY_AUDIODSP_OK; 105 | } 106 | 107 | UNITY_AUDIODSP_RESULT UNITY_AUDIODSP_CALLBACK ProcessCallback(UnityAudioEffectState* state, float* inbuffer, float* outbuffer, unsigned int length, int inchannels, int outchannels) 108 | { 109 | #ifndef UNITY_WIN 110 | mtx.lock(); 111 | int numTicks = length / libpd_blocksize(); 112 | libpd_process_float(numTicks, inbuffer, outbuffer); 113 | mtx.unlock(); 114 | #endif 115 | 116 | return UNITY_AUDIODSP_OK; 117 | } 118 | 119 | #ifndef UNITY_WIN 120 | extern "C" UNITY_AUDIODSP_EXPORT_API void UnityPd_EnableAudio() { 121 | mtx.lock(); 122 | if (libpd_start_message(16)) { // request space for 16 elements 123 | // handle allocation failure, very unlikely in this case 124 | } 125 | libpd_add_float(1.0f); 126 | libpd_finish_message("pd", "dsp"); 127 | mtx.unlock(); 128 | } 129 | 130 | extern "C" UNITY_AUDIODSP_EXPORT_API void UnityPd_SendFloat( const char* receiver, float message ) { 131 | mtx.lock(); 132 | libpd_float(receiver, message); 133 | mtx.unlock(); 134 | } 135 | 136 | extern "C" UNITY_AUDIODSP_EXPORT_API void UnityPd_SendBang( const char* receiver ) { 137 | mtx.lock(); 138 | libpd_bang(receiver); 139 | mtx.unlock(); 140 | } 141 | 142 | extern "C" UNITY_AUDIODSP_EXPORT_API void UnityPd_SendSymbol( const char* receiver, const char* message ) { 143 | mtx.lock(); 144 | libpd_symbol(receiver, message); 145 | mtx.unlock(); 146 | } 147 | 148 | extern "C" UNITY_AUDIODSP_EXPORT_API void* UnityPd_OpenPatch( const char* patchName, const char* directory ) 149 | { 150 | mtx.lock(); 151 | void* patch = libpd_openfile(patchName, directory); 152 | mtx.unlock(); 153 | 154 | return patch; 155 | } 156 | 157 | extern "C" UNITY_AUDIODSP_EXPORT_API void UnityPd_ClosePatch( void *patchPtr ) 158 | { 159 | mtx.lock(); 160 | libpd_closefile(patchPtr); 161 | mtx.unlock(); 162 | } 163 | 164 | extern "C" UNITY_AUDIODSP_EXPORT_API int UnityPd_GetDollarZero( void *patchPtr ) 165 | { 166 | return libpd_getdollarzero(patchPtr); 167 | } 168 | 169 | extern "C" UNITY_AUDIODSP_EXPORT_API void UnityPd_AddToSearchPath( const char* pathToAdd ) { 170 | mtx.lock(); 171 | libpd_add_to_search_path(pathToAdd); 172 | mtx.unlock(); 173 | } 174 | 175 | extern "C" UNITY_AUDIODSP_EXPORT_API void UnityPd_ClearSearchPath() { 176 | mtx.lock(); 177 | libpd_clear_search_path(); 178 | mtx.unlock(); 179 | } 180 | #endif 181 | } 182 | -------------------------------------------------------------------------------- /src/UnityNativeAudioPlugin/AudioPluginInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define UNITY_AUDIO_PLUGIN_API_VERSION 0x010402 4 | 5 | #ifndef UNITY_PREFIX_CONFIGURE_H 6 | 7 | #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) 8 | # define PLATFORM_WIN 1 9 | # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) 10 | # define PLATFORM_WINRT 1 11 | # endif 12 | #elif defined(__MACH__) || defined(__APPLE__) 13 | # define PLATFORM_OSX 1 14 | #elif defined(__ANDROID__) 15 | # define PLATFORM_ANDROID 1 16 | #elif defined(__linux__) 17 | # define PLATFORM_LINUX 1 18 | #endif 19 | 20 | #if defined(_AMD64_) || defined(__LP64__) || defined(_M_ARM64) 21 | # define PLATFORM_ARCH_64 1 22 | # define PLATFORM_ARCH_32 0 23 | #else 24 | # define PLATFORM_ARCH_64 0 25 | # define PLATFORM_ARCH_32 1 26 | #endif 27 | 28 | #ifndef SInt16_defined 29 | # define SInt16_defined 30 | typedef signed short SInt16; 31 | #endif 32 | 33 | #ifndef UInt16_defined 34 | # define UInt16_defined 35 | typedef unsigned short UInt16; 36 | #endif 37 | 38 | #ifndef UInt8_defined 39 | # define UInt8_defined 40 | typedef unsigned char UInt8; 41 | #endif 42 | 43 | #ifndef SInt8_defined 44 | # define SInt8_defined 45 | typedef signed char SInt8; 46 | #endif 47 | 48 | #if PLATFORM_ARCH_64 49 | # if PLATFORM_LINUX || PLATFORM_ANDROID 50 | # ifndef SInt32_defined 51 | # define SInt32_defined 52 | typedef signed int SInt32; 53 | # endif 54 | # ifndef UInt32_defined 55 | # define UInt32_defined 56 | typedef unsigned int UInt32; 57 | # endif 58 | # ifndef UInt64_defined 59 | # define UInt64_defined 60 | typedef unsigned long UInt64; 61 | # endif 62 | # ifndef SInt64_defined 63 | # define SInt64_defined 64 | typedef signed long SInt64; 65 | # endif 66 | # elif PLATFORM_OSX 67 | # ifndef SInt32_defined 68 | # define SInt32_defined 69 | typedef signed int SInt32; 70 | # endif 71 | # ifndef UInt32_defined 72 | # define UInt32_defined 73 | typedef unsigned int UInt32; 74 | # endif 75 | # ifndef UInt64_defined 76 | # define UInt64_defined 77 | typedef unsigned long long UInt64; 78 | # endif 79 | # ifndef SInt64_defined 80 | # define SInt64_defined 81 | typedef signed long long SInt64; 82 | # endif 83 | # elif PLATFORM_WIN 84 | # ifndef SInt32_defined 85 | # define SInt32_defined 86 | typedef signed long SInt32; 87 | # endif 88 | # ifndef UInt32_defined 89 | # define UInt32_defined 90 | typedef unsigned long UInt32; 91 | # endif 92 | # ifndef UInt64_defined 93 | # define UInt64_defined 94 | typedef unsigned long long UInt64; 95 | # endif 96 | # ifndef SInt64_defined 97 | # define SInt64_defined 98 | typedef signed long long SInt64; 99 | # endif 100 | #endif 101 | #else 102 | # ifndef SInt32_defined 103 | # define SInt32_defined 104 | typedef signed int SInt32; 105 | # endif 106 | # ifndef UInt32_defined 107 | # define UInt32_defined 108 | typedef unsigned int UInt32; 109 | # endif 110 | # ifndef UInt64_defined 111 | # define UInt64_defined 112 | typedef unsigned long long UInt64; 113 | # endif 114 | # ifndef SInt64_defined 115 | # define SInt64_defined 116 | typedef signed long long SInt64; 117 | # endif 118 | #endif 119 | 120 | #endif 121 | 122 | #if PLATFORM_WINRT 123 | #define AUDIO_CALLING_CONVENTION __stdcall 124 | #else 125 | #define AUDIO_CALLING_CONVENTION 126 | #endif 127 | 128 | #if PLATFORM_WIN 129 | #define UNITY_AUDIODSP_CALLBACK __stdcall 130 | #elif PLATFORM_OSX 131 | #define UNITY_AUDIODSP_CALLBACK 132 | #else 133 | #define UNITY_AUDIODSP_CALLBACK 134 | #endif 135 | 136 | // Attribute to make function be exported from a plugin 137 | #if PLATFORM_WIN 138 | #define UNITY_AUDIODSP_EXPORT_API __declspec(dllexport) 139 | #else 140 | #define UNITY_AUDIODSP_EXPORT_API 141 | #endif 142 | 143 | #if defined(__CYGWIN32__) 144 | #define UNITY_AUDIODSP_CALLBACK __stdcall 145 | #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) 146 | #define UNITY_AUDIODSP_CALLBACK __stdcall 147 | #elif defined(__MACH__) || defined(__ANDROID__) || defined(__linux__) 148 | #define UNITY_AUDIODSP_CALLBACK 149 | #else 150 | #define UNITY_AUDIODSP_CALLBACK 151 | #endif 152 | 153 | #define UNITY_AUDIODSP_RESULT int 154 | 155 | #include 156 | 157 | enum 158 | { 159 | UNITY_AUDIODSP_OK = 0, 160 | UNITY_AUDIODSP_ERR_UNSUPPORTED = 1, 161 | }; 162 | 163 | struct UnityAudioEffectState; 164 | 165 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_CreateCallback)(UnityAudioEffectState* state); 166 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_ReleaseCallback)(UnityAudioEffectState* state); 167 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_ResetCallback)(UnityAudioEffectState* state); 168 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_ProcessCallback)(UnityAudioEffectState* state, float* inbuffer, float* outbuffer, unsigned int length, int inchannels, int outchannels); 169 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_SetPositionCallback)(UnityAudioEffectState* state, unsigned int pos); 170 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_SetFloatParameterCallback)(UnityAudioEffectState* state, int index, float value); 171 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_GetFloatParameterCallback)(UnityAudioEffectState* state, int index, float* value, char *valuestr); 172 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_GetFloatBufferCallback)(UnityAudioEffectState* state, const char* name, float* buffer, int numsamples); 173 | 174 | enum UnityAudioEffectDefinitionFlags 175 | { 176 | UnityAudioEffectDefinitionFlags_IsSideChainTarget = 1 << 0, // Does this effect need a side chain buffer and can it be targeted by a Send? 177 | UnityAudioEffectDefinitionFlags_IsSpatializer = 1 << 1, // Should this plugin be inserted at sources and take over panning? 178 | UnityAudioEffectDefinitionFlags_IsAmbisonicDecoder = 1 << 2, // Should this plugin be used for ambisonic decoding? Added in Unity 2017.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010400. 179 | UnityAudioEffectDefinitionFlags_AppliesDistanceAttenuation = 1 << 3, // Spatializers Only: Does this spatializer apply distance-based attenuation? Added in Unity 2017.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010400. 180 | UnityAudioEffectDefinitionFlags_NeedsSpatializerData = 1 << 4 // For effects that are not spatializers or ambisonic decoders, but want access to UnityAudioSpatializerData. AudioSource-related data will be set to default values for mixer effects. Added in Unity 2018.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010402. 181 | }; 182 | 183 | enum UnityAudioEffectStateFlags 184 | { 185 | UnityAudioEffectStateFlags_IsPlaying = 1 << 0, // Set when engine is in play mode. Also true while paused. 186 | UnityAudioEffectStateFlags_IsPaused = 1 << 1, // Set when engine is paused mode. 187 | UnityAudioEffectStateFlags_IsMuted = 1 << 2, // Set when effect is being muted (only available in the editor) 188 | UnityAudioEffectStateFlags_IsSideChainTarget = 1 << 3, // Does this effect need a side chain buffer and can it be targeted by a Send? 189 | }; 190 | 191 | // This callback can be used to override the way distance attenuation is performed on AudioSources. 192 | // distanceIn is the distance between the source and the listener and attenuationOut is the output volume. 193 | // attenuationIn is the volume-curve based attenuation that would have been applied by Unity if this callback were not set. 194 | // A typical attenuation curve may look like this: *attenuationOut = 1.0f / max(1.0f, distanceIn); 195 | // The callback may also be used to apply a secondary gain on top of the one through attenuationIn by Unity's AudioSource curve. 196 | typedef UNITY_AUDIODSP_RESULT (UNITY_AUDIODSP_CALLBACK * UnityAudioEffect_DistanceAttenuationCallback)(UnityAudioEffectState* state, float distanceIn, float attenuationIn, float* attenuationOut); 197 | 198 | struct UnityAudioSpatializerData 199 | { 200 | float listenermatrix[16]; // Matrix that transforms sourcepos into the local space of the listener 201 | float sourcematrix[16]; // Transform matrix of audio source 202 | float spatialblend; // Distance-controlled spatial blend 203 | float reverbzonemix; // Reverb zone mix level parameter (and curve) on audio source 204 | float spread; // Spread parameter of the audio source (0..360 degrees) 205 | float stereopan; // Stereo panning parameter of the audio source (-1 = fully left, 1 = fully right) 206 | UnityAudioEffect_DistanceAttenuationCallback distanceattenuationcallback; // The spatializer plugin may override the distance attenuation in order to influence the voice prioritization (leave this callback as NULL to use the built-in audio source attenuation curve) 207 | float minDistance; // Min distance of the audio source. This value may be helpful to determine when to apply near-field effects. Added in Unity 2018.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010401. 208 | float maxDistance; // Max distance of the audio source. Added in Unity 2018.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010401. 209 | }; 210 | 211 | struct UnityAudioAmbisonicData 212 | { 213 | float listenermatrix[16]; // Matrix that transforms sourcepos into the local space of the listener 214 | float sourcematrix[16]; // Transform matrix of audio source 215 | float spatialblend; // Distance-controlled spatial blend 216 | float reverbzonemix; // Reverb zone mix level parameter (and curve) on audio source 217 | float spread; // Spread parameter of the audio source (0..360 degrees) 218 | float stereopan; // Stereo panning parameter of the audio source (-1 = fully left, 1 = fully right) 219 | UnityAudioEffect_DistanceAttenuationCallback distanceattenuationcallback; // The ambisonic decoder plugin may override the distance attenuation in order to influence the voice prioritization (leave this callback as NULL to use the built-in audio source attenuation curve) 220 | int ambisonicOutChannels; // This tells ambisonic decoders how many output channels will actually be used. 221 | float volume; // Volume/mute of the audio source. If the the source is muted, volume is set to 0.0; otherwise, it is set to the audio source's volume. Volume is applied after the ambisonic decoder, so this is just informational. Added in Unity 2018.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010401. 222 | }; 223 | 224 | struct UnityAudioEffectState 225 | { 226 | union 227 | { 228 | struct 229 | { 230 | UInt32 structsize; // Size of this struct 231 | UInt32 samplerate; // System sample rate 232 | UInt64 currdsptick; // Pointer to a sample counter marking the start of the current block being processed 233 | UInt64 prevdsptick; // Used for determining when DSPs are bypassed and so sidechain info becomes invalid 234 | float* sidechainbuffer; // Side-chain buffers to read from 235 | void* effectdata; // Internal data for the effect 236 | UInt32 flags; // Various flags through which information can be queried from the host 237 | void* internal; // Internal data, do not touch! 238 | 239 | // Version 1.0 of the plugin API only contains data up to here, so perform a state->structsize >= sizeof(UnityAudioEffectState) in your code before you 240 | // access any of this data in order to detect whether the host API is older than the plugin. 241 | 242 | UnityAudioSpatializerData* spatializerdata; // Data for spatializers 243 | UInt32 dspbuffersize; // Number of frames being processed per process callback. Use this to allocate temporary buffers before processing starts. 244 | UInt32 hostapiversion; // Version of plugin API used by host 245 | 246 | UnityAudioAmbisonicData* ambisonicdata; // Data for ambisonic plugins. Added in Unity 2017.1, with UNITY_AUDIO_PLUGIN_API_VERSION 0x010400. 247 | }; 248 | unsigned char pad[80]; // This padding was historically due to PS3 SPU DMA requirements. We aren't removing it now because plugins may rely on this struct being at least this size. 249 | }; 250 | #ifdef __cplusplus 251 | template inline T* GetEffectData() const 252 | { 253 | assert(effectdata); 254 | assert(internal); 255 | return (T*)effectdata; 256 | } 257 | 258 | #endif 259 | }; 260 | 261 | struct UnityAudioParameterDefinition 262 | { 263 | char name[16]; // Display name on the GUI 264 | char unit[16]; // Scientific unit of parameter to be appended after the value in textboxes 265 | const char* description; // Description of parameter (displayed in tool tips, automatically generated documentation, etc.) 266 | float min; // Minimum value of the parameter 267 | float max; // Maximum value of the parameter 268 | float defaultval; // Default and initial value of the parameter 269 | float displayscale; // Scale factor used only for the display of parameters (i.e. 100 for a percentage value ranging from 0 to 1) 270 | float displayexponent; // Exponent for mapping parameters to sliders 271 | }; 272 | 273 | struct UnityAudioEffectDefinition 274 | { 275 | UInt32 structsize; // Size of this struct 276 | UInt32 paramstructsize; // Size of paramdesc fields 277 | UInt32 apiversion; // Plugin API version 278 | UInt32 pluginversion; // Version of this plugin 279 | UInt32 channels; // Number of channels. Effects should set this to 0 and process any number of input/output channels they get in the process callback. Generator elements should specify a >0 value here. 280 | UInt32 numparameters; // The number of parameters exposed by this plugin. 281 | UInt64 flags; // Various capabilities and requirements of the plugin. 282 | char name[32]; // Name used for registration of the effect. This name will also be displayed in the GUI. 283 | UnityAudioEffect_CreateCallback create; // The create callback is called when DSP unit is created and can be null. 284 | UnityAudioEffect_ReleaseCallback release; // The release callback is called just before the plugin is freed and should free any data associated with this specific instance of the plugin. No further callbacks related to the instance will happen after this function has been called. 285 | UnityAudioEffect_ResetCallback reset; // The reset callback is called by the user to bring back the plugin instance into its initial state. Use to avoid clicks or artifacts. 286 | UnityAudioEffect_ProcessCallback process; // The processing callback is repeatedly called with a block of input audio to read from and an output block to write to. 287 | UnityAudioEffect_SetPositionCallback setposition; // The position callback can be used for implementing seek operations. 288 | UnityAudioParameterDefinition* paramdefs; // A pointer to the definitions of the parameters exposed by this plugin. This data pointed to must remain valid for the whole lifetime of the dynamic library (ideally it's static). 289 | UnityAudioEffect_SetFloatParameterCallback setfloatparameter; // This is called whenever one of the exposed parameters is changed. 290 | UnityAudioEffect_GetFloatParameterCallback getfloatparameter; // This is called to query parameter values. 291 | UnityAudioEffect_GetFloatBufferCallback getfloatbuffer; // Get N samples of named buffer. Used for displaying analysis data from the runtime. 292 | }; 293 | 294 | // This function fills in N pointers for the N effects contained in the library and returns N. 295 | extern "C" UNITY_AUDIODSP_EXPORT_API int AUDIO_CALLING_CONVENTION UnityGetAudioEffectDefinitions(UnityAudioEffectDefinition*** descptr); 296 | -------------------------------------------------------------------------------- /src/UnityNativeAudioPlugin/AudioPluginUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "AudioPluginInterface.h" 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #if PLATFORM_WIN 12 | # include 13 | #else 14 | # include 15 | # define strcpy_s strcpy 16 | #endif 17 | 18 | typedef int (*InternalEffectDefinitionRegistrationCallback)(UnityAudioEffectDefinition& desc); 19 | 20 | const float kMaxSampleRate = 22050.0f; 21 | const float kPI = 3.141592653589793f; 22 | const double kPI_double = 3.141592653589793; 23 | 24 | inline float FastClip(float x, float minval, float maxval) { return (fabsf(x - minval) - fabsf(x - maxval) + (minval + maxval)) * 0.5f; } 25 | inline float FastMin(float a, float b) { return (a + b - fabsf(a - b)) * 0.5f; } 26 | inline float FastMax(float a, float b) { return (a + b + fabsf(a - b)) * 0.5f; } 27 | inline int FastFloor(float x) { return (int)floorf(x); } // TODO: Optimize 28 | 29 | char* strnew(const char* src); 30 | char* tmpstr(int index, const char* fmtstr, ...); 31 | 32 | template 33 | class UnityComplexNumberT 34 | { 35 | public: 36 | // No constructor because we want to be able to define this inside anonymous unions (this is also why we don't use std::complex here) 37 | 38 | inline void Set(T _re, T _im) 39 | { 40 | re = _re; 41 | im = _im; 42 | } 43 | 44 | inline void Set(const UnityComplexNumberT& c) 45 | { 46 | re = c.re; 47 | im = c.im; 48 | } 49 | 50 | template 51 | inline static void Scale(const UnityComplexNumberT& a, T2 b, UnityComplexNumberT& result) 52 | { 53 | result.re = a.re * b; 54 | result.im = a.im * b; 55 | } 56 | 57 | template 58 | inline static void Mul(const UnityComplexNumberT& a, const UnityComplexNumberT& b, UnityComplexNumberT& result) 59 | { 60 | // Store temporarily in case a or b reference the same memory as result 61 | T3 t = a.re * b.im + a.im * b.re; 62 | result.re = a.re * b.re - a.im * b.im; 63 | result.im = t; 64 | } 65 | 66 | template 67 | inline static void Add(const UnityComplexNumberT& a, const UnityComplexNumberT& b, UnityComplexNumberT& result) 68 | { 69 | result.re = a.re + b.re; 70 | result.im = a.im + b.im; 71 | } 72 | 73 | template 74 | inline static void Sub(const UnityComplexNumberT& a, const UnityComplexNumberT& b, UnityComplexNumberT& result) 75 | { 76 | result.re = a.re - b.re; 77 | result.im = a.im - b.im; 78 | } 79 | 80 | template 81 | inline static void MulAdd(const UnityComplexNumberT& a, const UnityComplexNumberT& b, const UnityComplexNumberT& c, UnityComplexNumberT& result) 82 | { 83 | // Store temporarily in case a or b reference the same memory as result 84 | T3 t = a.re * b.im + a.im * b.re; 85 | result.re = c.re + a.re * b.re - a.im * b.im; 86 | result.im = c.im + t; 87 | } 88 | 89 | inline T Magnitude() const 90 | { 91 | return (T)sqrt(re * re + im * im); 92 | } 93 | 94 | inline T Magnitude2() const 95 | { 96 | return re * re + im * im; 97 | } 98 | 99 | public: 100 | T re, im; 101 | }; 102 | 103 | typedef UnityComplexNumberT UnityComplexNumber; 104 | 105 | class FFT 106 | { 107 | public: 108 | static void Forward(UnityComplexNumber* data, int numsamples, bool highprecision); 109 | static void Backward(UnityComplexNumber* data, int numsamples, bool highprecision); 110 | }; 111 | 112 | class FFTAnalyzer : public FFT 113 | { 114 | public: 115 | void Cleanup(); // Assumes zero-initialization 116 | void AnalyzeInput(float* data, int numchannels, int numsamples, float specAlpha); 117 | void AnalyzeOutput(float* data, int numchannels, int numsamples, float specAlpha); 118 | void CheckInitialized(); 119 | bool CanBeRead() const; 120 | void ReadBuffer(float* buffer, int numsamples, bool readInputBuffer); 121 | 122 | public: 123 | float* window; 124 | float* ibuffer; 125 | float* obuffer; 126 | UnityComplexNumber* cspec; 127 | float* ispec1; 128 | float* ispec2; 129 | float* ospec1; 130 | float* ospec2; 131 | int spectrumSize; 132 | int numSpectraReady; 133 | }; 134 | 135 | class HistoryBuffer 136 | { 137 | public: 138 | HistoryBuffer(); 139 | ~HistoryBuffer(); 140 | 141 | public: 142 | void Init(int _length); 143 | void ReadBuffer(float* buffer, int numsamplesTarget, int numsamplesSource, float offset); 144 | 145 | public: 146 | inline void Feed(float sample) 147 | { 148 | // Don't try to optimize this with ++ 149 | // The writeindex veriable may be read at the same time, so we don't want intermediate values indexing out of the array. 150 | int w = writeindex + 1; 151 | if (w == length) 152 | w = 0; 153 | data[w] = sample; 154 | writeindex = w; 155 | } 156 | 157 | inline void Feed(float* buf, int numsamples, int stride) 158 | { 159 | int w = writeindex; 160 | for (int n = 0; n < numsamples; n++) 161 | { 162 | if (++w == length) 163 | w = 0; 164 | data[w] = buf[n * stride]; 165 | } 166 | writeindex = w; 167 | } 168 | 169 | public: 170 | int length; 171 | int writeindex; 172 | float* data; 173 | }; 174 | 175 | template 176 | class RingBuffer 177 | { 178 | public: 179 | enum { LENGTH = _LENGTH }; 180 | 181 | volatile int readpos; 182 | volatile int writepos; 183 | T buffer[LENGTH]; 184 | 185 | inline bool Read(T& val) 186 | { 187 | int r = readpos; 188 | if (r == writepos) 189 | return false; 190 | r = (r == LENGTH - 1) ? 0 : (r + 1); 191 | val = buffer[r]; 192 | readpos = r; 193 | return true; 194 | } 195 | 196 | inline void Skip(int num) 197 | { 198 | int r = readpos + num; 199 | if (r >= LENGTH) 200 | r -= LENGTH; 201 | readpos = r; 202 | } 203 | 204 | inline void SyncWritePos() 205 | { 206 | writepos = readpos; 207 | } 208 | 209 | inline bool Feed(const T& input) 210 | { 211 | int w = (writepos == LENGTH - 1) ? 0 : (writepos + 1); 212 | buffer[w] = input; 213 | writepos = w; 214 | return true; 215 | } 216 | 217 | inline int GetNumBuffered() const 218 | { 219 | int b = writepos - readpos; 220 | if (b < 0) 221 | b += LENGTH; 222 | return b; 223 | } 224 | 225 | inline void Clear() 226 | { 227 | writepos = 0; 228 | readpos = 0; 229 | } 230 | }; 231 | 232 | class BiquadFilter 233 | { 234 | public: 235 | inline void SetupPeaking(float cutoff, float samplerate, float gain, float Q); 236 | inline void SetupLowShelf(float cutoff, float samplerate, float gain, float Q); 237 | inline void SetupHighShelf(float cutoff, float samplerate, float gain, float Q); 238 | inline void SetupLowpass(float cutoff, float samplerate, float Q); 239 | inline void SetupHighpass(float cutoff, float samplerate, float Q); 240 | 241 | public: 242 | inline float Process(float input) 243 | { 244 | float iir = input - a1 * z1 - a2 * z2; 245 | float fir = b0 * iir + b1 * z1 + b2 * z2; 246 | z2 = z1; 247 | z1 = iir; 248 | return fir; 249 | } 250 | 251 | inline void StoreCoeffs(float*& data) 252 | { 253 | *data++ = b2; 254 | *data++ = b1; 255 | *data++ = b0; 256 | *data++ = a2; 257 | *data++ = a1; 258 | } 259 | 260 | protected: 261 | float a1, a2, b0, b1, b2; 262 | float z1, z2; 263 | }; 264 | 265 | // The filter coefficient formulae below are taken from Robert Bristow-Johnsons excellent EQ biquad filter cookbook: 266 | // http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt 267 | 268 | void BiquadFilter::SetupPeaking(float cutoff, float samplerate, float gain, float Q) 269 | { 270 | float w0 = 2.0f * kPI * cutoff / samplerate, A = powf(10.0f, gain * 0.025f), alpha = sinf(w0) / (2.0f * Q), a0; 271 | b0 = 1.0f + alpha * A; 272 | b1 = -2.0f * cosf(w0); 273 | b2 = 1.0f - alpha * A; 274 | a0 = 1.0f + alpha / A; 275 | a1 = -2.0f * cosf(w0); 276 | a2 = 1.0f - alpha / A; 277 | float inv_a0 = 1.0f / a0; a1 *= inv_a0; a2 *= inv_a0; b0 *= inv_a0; b1 *= inv_a0; b2 *= inv_a0; 278 | } 279 | 280 | void BiquadFilter::SetupLowShelf(float cutoff, float samplerate, float gain, float Q) 281 | { 282 | float w0 = 2.0f * kPI * cutoff / samplerate, A = powf(10.0f, gain * 0.025f), alpha = sinf(w0) / (2.0f * Q), a0; 283 | b0 = A * ((A + 1.0f) - (A - 1.0f) * cosf(w0) + 2.0f * sqrtf(A) * alpha); 284 | b1 = 2.0f * A * ((A - 1.0f) - (A + 1.0f) * cosf(w0)); 285 | b2 = A * ((A + 1.0f) - (A - 1.0f) * cosf(w0) - 2.0f * sqrtf(A) * alpha); 286 | a0 = (A + 1.0f) + (A - 1.0f) * cosf(w0) + 2.0f * sqrtf(A) * alpha; 287 | a1 = -2.0f * ((A - 1.0f) + (A + 1.0f) * cosf(w0)); 288 | a2 = (A + 1.0f) + (A - 1.0f) * cosf(w0) - 2.0f * sqrtf(A) * alpha; 289 | float inv_a0 = 1.0f / a0; a1 *= inv_a0; a2 *= inv_a0; b0 *= inv_a0; b1 *= inv_a0; b2 *= inv_a0; 290 | } 291 | 292 | void BiquadFilter::SetupHighShelf(float cutoff, float samplerate, float gain, float Q) 293 | { 294 | float w0 = 2.0f * kPI * cutoff / samplerate, A = powf(10.0f, gain * 0.025f), alpha = sinf(w0) / (2.0f * Q), a0; 295 | b0 = A * ((A + 1.0f) + (A - 1.0f) * cosf(w0) + 2.0f * sqrtf(A) * alpha); 296 | b1 = -2.0f * A * ((A - 1.0f) + (A + 1.0f) * cosf(w0)); 297 | b2 = A * ((A + 1.0f) + (A - 1.0f) * cosf(w0) - 2.0f * sqrtf(A) * alpha); 298 | a0 = (A + 1.0f) - (A - 1.0f) * cosf(w0) + 2.0f * sqrtf(A) * alpha; 299 | a1 = 2.0f * ((A - 1.0f) - (A + 1.0f) * cosf(w0)); 300 | a2 = (A + 1.0f) - (A - 1.0f) * cosf(w0) - 2.0f * sqrtf(A) * alpha; 301 | float inv_a0 = 1.0f / a0; a1 *= inv_a0; a2 *= inv_a0; b0 *= inv_a0; b1 *= inv_a0; b2 *= inv_a0; 302 | } 303 | 304 | void BiquadFilter::SetupLowpass(float cutoff, float samplerate, float Q) 305 | { 306 | float w0 = 2.0f * kPI * cutoff / samplerate, alpha = sinf(w0) / (2.0f * Q), a0; 307 | b0 = (1.0f - cosf(w0)) * 0.5f; 308 | b1 = 1.0f - cosf(w0); 309 | b2 = (1.0f - cosf(w0)) * 0.5f; 310 | a0 = 1.0f + alpha; 311 | a1 = -2.0f * cosf(w0); 312 | a2 = 1.0f - alpha; 313 | float inv_a0 = 1.0f / a0; a1 *= inv_a0; a2 *= inv_a0; b0 *= inv_a0; b1 *= inv_a0; b2 *= inv_a0; 314 | } 315 | 316 | void BiquadFilter::SetupHighpass(float cutoff, float samplerate, float Q) 317 | { 318 | float w0 = 2.0f * kPI * cutoff / samplerate, alpha = sinf(w0) / (2.0f * Q), a0; 319 | b0 = (1.0f + cosf(w0)) * 0.5f; 320 | b1 = -(1.0f + cosf(w0)); 321 | b2 = (1.0f + cosf(w0)) * 0.5f; 322 | a0 = 1.0f + alpha; 323 | a1 = -2.0f * cosf(w0); 324 | a2 = 1.0f - alpha; 325 | float inv_a0 = 1.0f / a0; a1 *= inv_a0; a2 *= inv_a0; b0 *= inv_a0; b1 *= inv_a0; b2 *= inv_a0; 326 | } 327 | 328 | class StateVariableFilter 329 | { 330 | public: 331 | float cutoff; 332 | float bandwidth; 333 | 334 | public: 335 | inline float ProcessHPF(float input) 336 | { 337 | input += 1.0e-11f; // Kill denormals 338 | 339 | lpf += cutoff * bpf; 340 | float hpf = (input - bpf) * bandwidth - lpf; 341 | bpf += cutoff * hpf; 342 | 343 | lpf += cutoff * bpf; 344 | hpf = (input - bpf) * bandwidth - lpf; 345 | bpf += cutoff * hpf; 346 | 347 | return hpf; 348 | } 349 | 350 | inline float ProcessBPF(float input) 351 | { 352 | ProcessHPF(input); 353 | return bpf; 354 | } 355 | 356 | inline float ProcessLPF(float input) 357 | { 358 | ProcessHPF(input); 359 | return lpf; 360 | } 361 | 362 | public: 363 | float lpf, bpf; 364 | }; 365 | 366 | class Random 367 | { 368 | public: 369 | inline void Seed(unsigned long _seed) 370 | { 371 | seed = _seed; 372 | } 373 | 374 | inline unsigned int Get() 375 | { 376 | seed = (seed * 1664525 + 1013904223) & 0xFFFFFFFF; 377 | return seed ^ (seed >> 16); 378 | } 379 | 380 | inline float GetFloat(float minval, float maxval) 381 | { 382 | return minval + (maxval - minval) * (Get() & 0xFFFFFF) * (const float)(1.0f / (float)0xFFFFFF); 383 | } 384 | 385 | protected: 386 | unsigned int seed; 387 | }; 388 | 389 | class NoiseGenerator 390 | { 391 | public: 392 | void Init() 393 | { 394 | level = 0.0f; 395 | delta = 0.0f; 396 | minval = 0.0f; 397 | maxval = 1.0f; 398 | period = 100.0f; 399 | invperiod = 0.01f; 400 | samplesleft = 0; 401 | } 402 | 403 | inline void SetRange(float minval, float maxval) 404 | { 405 | this->minval = minval; 406 | this->maxval = maxval; 407 | } 408 | 409 | inline void SetPeriod(float period) 410 | { 411 | SetPeriod(period, 1.0f / period); 412 | } 413 | 414 | inline void SetPeriod(float period, float invperiod) 415 | { 416 | period = period; 417 | invperiod = invperiod; 418 | } 419 | 420 | inline float Sample(Random& random) 421 | { 422 | if (--samplesleft <= 0) 423 | { 424 | samplesleft = (int)period; 425 | delta = (random.GetFloat(minval, maxval) - level) * invperiod; 426 | } 427 | level += delta; 428 | return level; 429 | } 430 | 431 | public: 432 | float level; 433 | float delta; 434 | float minval; 435 | float maxval; 436 | float period; 437 | float invperiod; 438 | int samplesleft; 439 | }; 440 | 441 | class Mutex 442 | { 443 | public: 444 | Mutex(); 445 | ~Mutex(); 446 | public: 447 | bool TryLock(); 448 | void Lock(); 449 | void Unlock(); 450 | protected: 451 | #if PLATFORM_WIN 452 | CRITICAL_SECTION crit_sec; 453 | #else 454 | pthread_mutex_t mutex; 455 | #endif 456 | }; 457 | 458 | class MutexScopeLock 459 | { 460 | public: 461 | MutexScopeLock(Mutex& _mutex, bool condition = true) : mutex(condition ? &_mutex : NULL) { if (mutex != NULL) mutex->Lock(); } 462 | ~MutexScopeLock() { if (mutex != NULL) mutex->Unlock(); } 463 | protected: 464 | Mutex* mutex; 465 | }; 466 | 467 | void RegisterParameter( 468 | UnityAudioEffectDefinition& desc, 469 | const char* name, 470 | const char* unit, 471 | float minval, 472 | float maxval, 473 | float defaultval, 474 | float displayscale, 475 | float displayexponent, 476 | int enumvalue, 477 | const char* description = NULL 478 | ); 479 | 480 | void InitParametersFromDefinitions( 481 | InternalEffectDefinitionRegistrationCallback registereffectdefcallback, 482 | float* params 483 | ); 484 | 485 | void DeclareEffect( 486 | UnityAudioEffectDefinition& desc, 487 | const char* name, 488 | UnityAudioEffect_CreateCallback createcallback, 489 | UnityAudioEffect_ReleaseCallback releasecallback, 490 | UnityAudioEffect_ProcessCallback processcallback, 491 | UnityAudioEffect_SetFloatParameterCallback setfloatparametercallback, 492 | UnityAudioEffect_GetFloatParameterCallback getfloatparametercallback, 493 | UnityAudioEffect_GetFloatBufferCallback getfloatbuffercallback, 494 | InternalEffectDefinitionRegistrationCallback registereffectdefcallback 495 | ); 496 | -------------------------------------------------------------------------------- /src/UnityNativeAudioPlugin/LICENCE: -------------------------------------------------------------------------------- 1 | From https://bitbucket.org/Unity-Technologies/nativeaudioplugins 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2014, Unity Technologies, 6 | with modifications Copyright (c) 2017 Playdots, Inc. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. -------------------------------------------------------------------------------- /src/UnityNativeAudioPlugin/PluginList.h: -------------------------------------------------------------------------------- 1 | DECLARE_EFFECT("Unity Pd", UnityPd) 2 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/ant.properties: -------------------------------------------------------------------------------- 1 | # This file is used to override default values used by the Ant build system. 2 | # 3 | # This file must be checked into Version Control Systems, as it is 4 | # integral to the build system of your project. 5 | 6 | # This file is only used by the Ant script. 7 | 8 | # You can use this to override default values such as 9 | # 'source.dir' for the location of your java source folder and 10 | # 'out.dir' for the location of your output folder. 11 | 12 | # You can also use it define how the release builds are signed by declaring 13 | # the following properties: 14 | # 'key.store' for the location of your keystore and 15 | # 'key.alias' for the name of the key to use. 16 | # The password will be asked during the build when you use the 'release' target. 17 | 18 | java.source=7 19 | java.target=7 -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/R.txt: -------------------------------------------------------------------------------- 1 | int drawable ic_launcher 0x7f020000 2 | int layout main 0x7f030000 3 | int string app_name 0x7f040000 4 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/UnityPdHelper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/UnityPdHelper.jar -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/build.prop: -------------------------------------------------------------------------------- 1 | #Last build type 2 | #Mon, 08 Aug 2016 12:33:32 -0400 3 | 4 | build.last.target=debug 5 | 6 | build.last.is.instrumented=false 7 | 8 | build.last.is.packaging.debug=true 9 | 10 | build.last.is.signing.debug=true 11 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/classes.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/classes.jar -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/BuildConfig.class -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R$attr.class -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R$drawable.class -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R$layout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R$layout.class -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R$string.class -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/R.class -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/UnityPdHelper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/classes/com/weplaydots/UnityPdHelper/UnityPdHelper.class -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/proguard.txt: -------------------------------------------------------------------------------- 1 | # view AndroidManifest.xml #generated:7 2 | -keep class com.weplaydots.UnityPdHelper.ACTIVITY_ENTRY_NAME { (...); } 3 | 4 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/bin/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/bin/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 29 | 30 | 31 | 35 | 36 | 37 | 38 | 39 | 40 | 49 | 50 | 51 | 52 | 56 | 57 | 69 | 70 | 71 | 89 | 90 | 91 | 92 | 93 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/gen/com/weplaydots/UnityPdHelper/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package com.weplaydots.UnityPdHelper; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/gen/com/weplaydots/UnityPdHelper/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package com.weplaydots.UnityPdHelper; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class drawable { 14 | public static int ic_launcher=0x7f020000; 15 | } 16 | public static final class layout { 17 | public static int main=0x7f030000; 18 | } 19 | public static final class string { 20 | public static int app_name=0x7f040000; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | android.library=true 14 | # Project target. 15 | target=android-21 16 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/UnityPdAndroidHelper/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ACTIVITY_ENTRY_NAME 4 | 5 | -------------------------------------------------------------------------------- /src/UnityPdAndroidHelper/src/UnityPdHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * UnityPdHelper.java 3 | * Copyright (C) 2017 Playdots, Inc. 4 | * ---------------------------- 5 | */ 6 | package com.weplaydots.UnityPdHelper; 7 | 8 | import android.content.Context; 9 | import android.content.res.AssetManager; 10 | import android.content.res.AssetFileDescriptor; 11 | import android.util.Log; 12 | 13 | import java.lang.String; 14 | import java.io.File; 15 | import java.io.IOException; 16 | import java.io.InputStream; 17 | import java.io.FileOutputStream; 18 | import java.util.ArrayList; 19 | 20 | public class UnityPdHelper { 21 | static Context context; 22 | 23 | public static void SetContext( Context unityContext ) { 24 | context = unityContext; 25 | } 26 | 27 | public static void CopyAssetsFolderToPersistantData( String apkFolderPath, String persistantDataPath ) { 28 | ArrayList files = listAssetsContent( apkFolderPath ); 29 | 30 | try { 31 | AssetManager am = context.getResources().getAssets(); 32 | AssetFileDescriptor descriptor = null; 33 | for ( String apkPath : files ) { 34 | Log.v( "UnityPdHelper", "Copying..." + apkPath ); 35 | // Create new file to copy into. 36 | String persistantPath = persistantDataPath + java.io.File.separator + apkPath; 37 | Log.v( "UnityPdHelper", "Copied!" ); 38 | 39 | copyToFile( apkPath, persistantPath, am ); 40 | 41 | } 42 | } catch (IOException e) { 43 | e.printStackTrace(); 44 | } 45 | } 46 | 47 | static ArrayList listAssetsContent(String path) 48 | { 49 | ArrayList l = new ArrayList<>(); 50 | 51 | try { 52 | AssetManager am = context.getResources().getAssets(); // instance is a reference to the activity 53 | 54 | String [] list = am.list(path); 55 | for (String s : list) 56 | { 57 | String subPath = path + "/" + s; 58 | if (subPath.charAt(0) == '/') 59 | { 60 | subPath = subPath.substring(1); 61 | } 62 | 63 | ArrayList subList = listAssetsContent(subPath); 64 | 65 | if (subList.size() > 0) 66 | { 67 | // directory 68 | l.addAll(subList); 69 | } 70 | else 71 | { 72 | // file 73 | l.add(subPath); 74 | } 75 | } 76 | 77 | } catch (IOException e) { 78 | e.printStackTrace(); 79 | } 80 | 81 | return l; 82 | } 83 | 84 | static void copyToFile( String fromFile, String toFile, AssetManager assetManager ) throws IOException { 85 | InputStream in = null; 86 | FileOutputStream out = null; 87 | try { 88 | in = assetManager.open(fromFile); 89 | File outFile = new File( toFile ); 90 | outFile.getParentFile().mkdirs(); 91 | out = new FileOutputStream( outFile ); 92 | 93 | byte[] buffer = new byte[1024]; 94 | int read; 95 | while ((read = in.read(buffer)) != -1) { 96 | out.write(buffer, 0, read); 97 | } 98 | in.close(); 99 | in = null; 100 | out.flush(); 101 | out.close(); 102 | out = null; 103 | } catch (Exception e) { 104 | Log.e("UnityPdHelper", e.getMessage()); 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/VisualStudio/AudioPluginDemo.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 29 | 32 | 35 | 38 | 41 | 52 | 55 | 58 | 61 | 69 | 72 | 75 | 78 | 81 | 84 | 87 | 91 | 92 | 100 | 103 | 106 | 109 | 112 | 115 | 126 | 129 | 132 | 135 | 145 | 148 | 151 | 154 | 157 | 160 | 163 | 167 | 168 | 169 | 170 | 171 | 172 | 175 | 176 | 179 | 180 | 181 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /src/VisualStudio/AudioPluginDemo.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C} 23 | AudioPluginDemo 24 | Win32Proj 25 | 26 | 27 | 28 | DynamicLibrary 29 | NotSet 30 | true 31 | v140 32 | 33 | 34 | DynamicLibrary 35 | NotSet 36 | true 37 | v140 38 | 39 | 40 | DynamicLibrary 41 | NotSet 42 | v140 43 | 44 | 45 | DynamicLibrary 46 | NotSet 47 | v140 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | <_ProjectFileVersion>10.0.30319.1 67 | $(SolutionDir)build\$(Configuration)\ 68 | $(SolutionDir)build\$(Configuration)\ 69 | build\$(Configuration)\ 70 | build\$(Configuration)\ 71 | true 72 | true 73 | $(SolutionDir)build\$(Configuration)\ 74 | $(SolutionDir)build\$(Configuration)\ 75 | build\$(Configuration)\ 76 | build\$(Configuration)\ 77 | false 78 | false 79 | 80 | 81 | 82 | Disabled 83 | WIN32;_DEBUG;_WINDOWS;_USRDLL;AudioPluginDemo_EXPORTS;%(PreprocessorDefinitions) 84 | true 85 | EnableFastChecks 86 | MultiThreadedDebug 87 | 88 | 89 | Level3 90 | EditAndContinue 91 | D:\eddie\Documents\Dev\Dots\ToneCS\libpd\libpd_wrapper;D:\eddie\Documents\Dev\Dots\ToneCS\libpd\pure-data\src;%(AdditionalIncludeDirectories) 92 | 93 | 94 | true 95 | Windows 96 | MachineX86 97 | kernel32.lib;user32.lib;%(AdditionalDependencies) 98 | 99 | 100 | 101 | 102 | 103 | mkdir ..\..\..\UnityPd\Windows 104 | copy $(TargetPath) ..\..\..\UnityPd\Windows\$(TargetName).dll 105 | 106 | 107 | 108 | 109 | 110 | Disabled 111 | WIN32;_DEBUG;_WINDOWS;_USRDLL;AudioPluginDemo_EXPORTS;%(PreprocessorDefinitions) 112 | EnableFastChecks 113 | MultiThreadedDebug 114 | 115 | 116 | Level3 117 | ProgramDatabase 118 | D:\eddie\Documents\Dev\Dots\ToneCS\libpd\libpd_wrapper;D:\eddie\Documents\Dev\Dots\ToneCS\libpd\pure-data\src;%(AdditionalIncludeDirectories) 119 | 120 | 121 | true 122 | Windows 123 | kernel32.lib;user32.lib;%(AdditionalDependencies) 124 | 125 | 126 | 127 | mkdir ..\..\..\UnityPd\Windows 128 | copy $(TargetPath) ..\..\..\UnityPd\Windows\$(TargetName).dll 129 | 130 | 131 | 132 | 133 | 134 | MaxSpeed 135 | true 136 | WIN32;NDEBUG;_WINDOWS;_USRDLL;AudioPluginDemo_EXPORTS;%(PreprocessorDefinitions) 137 | MultiThreaded 138 | true 139 | 140 | 141 | Level3 142 | ProgramDatabase 143 | D:\eddie\Documents\Dev\Dots\ToneCS\libpd\libpd_wrapper;D:\eddie\Documents\Dev\Dots\ToneCS\libpd\pure-data\src;%(AdditionalIncludeDirectories) 144 | 145 | 146 | true 147 | Windows 148 | true 149 | true 150 | MachineX86 151 | kernel32.lib;user32.lib;%(AdditionalDependencies) 152 | 153 | 154 | 155 | 156 | 157 | 158 | mkdir ..\..\..\UnityPd\Windows 159 | copy $(TargetPath) ..\..\..\UnityPd\Windows\$(TargetName).dll 160 | 161 | 162 | 163 | 164 | 165 | MaxSpeed 166 | true 167 | WIN32;NDEBUG;_WINDOWS;_USRDLL;AudioPluginDemo_EXPORTS;%(PreprocessorDefinitions) 168 | MultiThreaded 169 | true 170 | 171 | 172 | Level3 173 | ProgramDatabase 174 | D:\eddie\Documents\Dev\Dots\ToneCS\libpd\libpd_wrapper;D:\eddie\Documents\Dev\Dots\ToneCS\libpd\pure-data\src;%(AdditionalIncludeDirectories) 175 | 176 | 177 | true 178 | Windows 179 | true 180 | true 181 | kernel32.lib;user32.lib;%(AdditionalDependencies) 182 | 183 | 184 | 185 | mkdir ..\..\..\UnityPd\Windows 186 | copy $(TargetPath) ..\..\..\UnityPd\Windows\$(TargetName).dll 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /src/VisualStudio/AudioPluginDemo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/VisualStudio/UpgradeLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/playdots/UnityPd/449631c64a903cd33ad5a2440ba69a2f0e928d55/src/VisualStudio/UpgradeLog.htm -------------------------------------------------------------------------------- /src/Xcode/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.info 3 | 4 | /[Ll]ibrary/ 5 | /[Tt]emp/ 6 | /[Oo]bj/ 7 | /[Bb]uild/ 8 | 9 | # Autogenerated VS/MD solution and project files 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.bin 20 | 21 | # Unity3D generated meta files 22 | *.pidb.meta 23 | 24 | # Unity3D Generated File On Crash Reports 25 | sysinfo.txt 26 | 27 | *.apk 28 | -------------------------------------------------------------------------------- /src/Xcode/AudioPlugin_UnityPd.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Xcode/AudioPlugin_UnityPd.xcodeproj/project.xcworkspace/xcshareddata/AudioPlugin_UnityPd.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "2378F95BCF6234C1C9B11A7C17A805C7D776F8B3", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "6F7A20C0CDB7BDCD5180DBA15CA6EBFFD435B7B5" : 0, 8 | "FCEA0B43064F7C1F6B20BB79A3A16B9980328F4B" : 0, 9 | "1A0B07D1631AC7F0F17FCE76695E42D64F01958F" : 0, 10 | "2378F95BCF6234C1C9B11A7C17A805C7D776F8B3" : 0 11 | }, 12 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "94BE96EE-FF19-4D63-84C6-739EA270894C", 13 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 14 | "6F7A20C0CDB7BDCD5180DBA15CA6EBFFD435B7B5" : "libpd\/pure-data\/", 15 | "FCEA0B43064F7C1F6B20BB79A3A16B9980328F4B" : "ToneDotCs\/libpd\/jni\/opensl_stream\/", 16 | "1A0B07D1631AC7F0F17FCE76695E42D64F01958F" : "libpd\/", 17 | "2378F95BCF6234C1C9B11A7C17A805C7D776F8B3" : "ToneDotCs\/" 18 | }, 19 | "DVTSourceControlWorkspaceBlueprintNameKey" : "AudioPlugin_UnityPd", 20 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 21 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "src\/Xcode\/AudioPlugin_UnityPd.xcodeproj", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 23 | { 24 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/libpd\/libpd.git", 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1A0B07D1631AC7F0F17FCE76695E42D64F01958F" 27 | }, 28 | { 29 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/playdots\/tone.cs.git", 30 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 31 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "2378F95BCF6234C1C9B11A7C17A805C7D776F8B3" 32 | }, 33 | { 34 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git:\/\/git.code.sf.net\/p\/pure-data\/pure-data", 35 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 36 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "6F7A20C0CDB7BDCD5180DBA15CA6EBFFD435B7B5" 37 | }, 38 | { 39 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git:\/\/github.com\/nettoyeurny\/opensl_stream.git", 40 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 41 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "FCEA0B43064F7C1F6B20BB79A3A16B9980328F4B" 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /src/Xcode/AudioPlugin_UnityPd_iOS/AudioPlugin_UnityPd_iOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // AudioPlugin_UnityPd_iOS.h 3 | // AudioPlugin_UnityPd_iOS 4 | // 5 | // Created by Eddie Cameron on 3/2/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface AudioPlugin_UnityPd_iOS : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /src/Xcode/AudioPlugin_UnityPd_iOS/AudioPlugin_UnityPd_iOS.m: -------------------------------------------------------------------------------- 1 | // 2 | // AudioPlugin_UnityPd_iOS.m 3 | // AudioPlugin_UnityPd_iOS 4 | // 5 | // Created by Eddie Cameron on 3/2/16. 6 | // 7 | // 8 | 9 | #import "AudioPlugin_UnityPd_iOS.h" 10 | 11 | @implementation AudioPlugin_UnityPd_iOS 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /src/Xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034Identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CFPlugInDynamicRegisterFunction 26 | 27 | CFPlugInDynamicRegistration 28 | NO 29 | CFPlugInFactories 30 | 31 | 00000000-0000-0000-0000-000000000000 32 | MyFactoryFunction 33 | 34 | CFPlugInTypes 35 | 36 | 00000000-0000-0000-0000-000000000000 37 | 38 | 00000000-0000-0000-0000-000000000000 39 | 40 | 41 | CFPlugInUnloadFunction 42 | 43 | 44 | 45 | --------------------------------------------------------------------------------