├── .gitattributes ├── .gitignore ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── boot-completed.sh ├── changelog.md ├── common ├── addon │ └── Volume-Key-Selector │ │ ├── README.md │ │ ├── install.sh │ │ └── tools │ │ ├── arm │ │ └── keycheck │ │ └── x86 │ │ └── keycheck ├── files │ ├── JamesDSP │ │ ├── Convolver │ │ │ ├── CorredHRTFCrossfeed.wav │ │ │ ├── CorredHRTF_Surround1.wav │ │ │ ├── CorredHRTF_Surround2.wav │ │ │ ├── SwapChannels.wav │ │ │ └── binChurch.wav │ │ ├── DDC │ │ │ ├── Butterworth.vdc │ │ │ └── mh750.vdc │ │ └── liveprog │ │ │ ├── autopeakfilter.eel │ │ │ ├── dc_remove.eel │ │ │ ├── firFilter.eel │ │ │ ├── fractionalDelayline.eel │ │ │ ├── hadamVerb.eel │ │ │ ├── simpleFDNReverb.eel │ │ │ ├── stft-filter.eel │ │ │ ├── stftCentreCut.eel │ │ │ └── stftPitchShifter.eel │ ├── JamesDSPManager.apk │ ├── JamesDSPManagerThePBone.apk │ ├── arm │ │ └── libjamesdsp.so │ ├── huawei │ │ └── libjamesdsp.so │ └── x86 │ │ └── libjamesdsp.so ├── functions.sh └── install.sh ├── customize.sh ├── install.zip ├── module.prop ├── service.sh ├── uninstall.sh └── update.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Declare files that will always have LF line endings on checkout. 2 | *.sh text eol=lf 3 | *.prop text eol=lf 4 | *.md text eol=lf 5 | *.xml text eol=lf 6 | META-INF/** text eol=lf 7 | 8 | # Denote all files that are truly binary and should not be modified. 9 | common/addon/**/tools/** binary 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __MACOSX 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | ################# 4 | # Initialization 5 | ################# 6 | 7 | umask 022 8 | 9 | # echo before loading util_functions 10 | ui_print() { echo "$1"; } 11 | 12 | require_new_magisk() { 13 | ui_print "*******************************" 14 | ui_print " Please install Magisk v20.4+! " 15 | ui_print "*******************************" 16 | exit 1 17 | } 18 | 19 | ######################### 20 | # Load util_functions.sh 21 | ######################### 22 | 23 | OUTFD=$2 24 | ZIPFILE=$3 25 | 26 | mount /data 2>/dev/null 27 | 28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk 29 | . /data/adb/magisk/util_functions.sh 30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk 31 | 32 | install_module 33 | exit 0 -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JamesDSPManager 2 | This module enables JamesDSPManager. [More details in support thread](https://forum.xda-developers.com/android/apps-games/app-reformed-dsp-manager-t3607970). 3 | 4 | ### Profiles are incompatible between old and new JDSP! 5 | 6 | ## Changelog 7 | * See [Changelog](changelog.md) 8 | 9 | ## Credits 10 | * [James34602](https://forum.xda-developers.com/android/apps-games/app-reformed-dsp-manager-t3607970) 11 | 12 | ## Source Code 13 | * Module [GitHub](https://github.com/therealahrion/JamesDSPManager) 14 | * App [GitHub](https://github.com/james34602/JamesDSPManager) 15 | -------------------------------------------------------------------------------- /boot-completed.sh: -------------------------------------------------------------------------------- 1 | APP=$(pm list packages -3 | grep james.dsp) 2 | 3 | if [ ! -d "$MODPATH" ]; then 4 | [ "$APP" ] && pm uninstall james.dsp 5 | rm $0 6 | exit 0 7 | elif [ "$APP" ]; then 8 | STATUS="$(pm list packages -d | grep 'james.dsp')" 9 | if [ -f "$MODPATH/disable" ] && [ ! "$STATUS" ]; then 10 | pm disable james.dsp 11 | elif [ ! -f "$MODPATH/disable" ] && [ "$STATUS" ]; then 12 | pm enable james.dsp 13 | fi 14 | elif [ ! -f "$MODPATH/disable" ] && [ ! "$APP" ]; then 15 | pm install $MODPATH/JamesDSPManager.apk 16 | pm disable james.dsp 17 | pm enable james.dsp 18 | fi -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | ### v6.1 - 4.24.2024 2 | * mmtex v3.7 update 3 | 4 | ### v6.0 - 2.16.2024 5 | * mmtex v3.6 update 6 | * Update pbone apk 7 | * Update jdsp app/libs 8 | 9 | ### v5.8 - 9.11.2023 10 | * Update pbone apk 11 | * Update jdsp app/libs 12 | * mmtex v3.5 update 13 | 14 | ### v5.7 - 9.3.2023 15 | * Automatic 32/64 bit lib detection 16 | * mmtex v3.4 update 17 | 18 | ### v5.6 - 8.24.2023 19 | * Lib bug fix 20 | 21 | ### v5.5 - 8.21.2023 22 | * Update official apk: 23 | * Introduce fully functional continuous wavelet transform to dynamic range compander as a experimental trial 24 | * Use custom implementation of libsamplerate, the file no longer bloat with coefficients 25 | 26 | ### v5.4 - 8.13.2023 27 | * Update to mmtex v3.3 28 | * Update the thepbone jdsp app 29 | 30 | ### v5.3 - 8.11.2023 31 | * Update mmtex to v3.2 32 | 33 | ### v5.2 - 7.28.2023 34 | * Bug fix with osp removal 35 | * Add thepbone APK option 36 | 37 | ### v5.1 - 7.25.2023 38 | * Bug fix for odm on KSU and magisk delta 39 | * Updated to mmtex v3.1 40 | * Added support for odm in regular magisk (should fix oneplus device issues) - thanks to @ShadoV90 (https://t.me/ShadoV90) for the fix 41 | 42 | ### v5.0 - 7.15.2023 43 | * JDSP app updated!: 44 | * LiveProg update: Clean up EEL RAM disk before new script being loaded 45 | * EEL engine update: 46 | * Unify string, thread pool, convolver in one virtual data type 47 | * Introduce efficient running min/max, median filter 48 | * Allow STFT window function to be specified 49 | * Correct STFT phase value(Yield no difference for any previous scripts that depends on relative phase / magnitude only spectral processing) 50 | 51 | ### v4.8 - 7.10.2023 52 | * Update mmtex to v3.0 - adds support for ksu and magisk delta 53 | 54 | ### v4.7 - 5.22.2023 55 | * Update mmtex v2.1 - fix for magisk v26+ 56 | 57 | ### v4.6 - 8.4.2022 58 | * Update jdsp libs 59 | 60 | ### v4.5 - 6.25.2022 61 | * Update jdsp libs 62 | 63 | ### v4.4 - 1.31.2022 64 | * Update to MMT-Ex v2.0 - support for magisk 24 module update method 65 | 66 | ### v4.3 - 11.21.2021 67 | * MMT-EX v1.8 update - fix for magisk canary, minmagisk now 20.4 68 | 69 | ### v4.2 - 9.17.2021 70 | * Always install as data app, no need for system app in older android versions 71 | 72 | ### v4.1 - 9.9.2021 73 | * Only uninstall app if older than current 74 | * Update mmtex to v1.7 75 | * Fix app update process - uninstall app during zip flash, reboot to complete process 76 | 77 | ### v4.0 - 9.8.2021 78 | * JDSP app updated!: 79 | * New app/drivers made open sourced 80 | * Frequency domain dynamic range compression, give you much crazier compression 81 | * New dynamic bass boost, proper implementation of signal power detection, proper sample delay apply to multirate analysis and deploy state space filter to achieve boosting filter parameters. 82 | * Greatly reduce power consumption for some cases, especially when Convolver and Equalizer is used 83 | * Add user manual to main app 84 | * No more new/old options 85 | * Removed old options 86 | 87 | ### v3.4 - 5.14.2021 88 | * Update volkey addon 89 | 90 | ### v3.3 - 11.2.2020 91 | * Update to MMT-Ex v1.6 92 | * Update volkey addon 93 | 94 | ### v3.2 - 9.9.2020 95 | * Added hidden_api_policy workaround for android 11 96 | 97 | ### v3.1 - 8.25.2020 98 | * New JDSP app updated!: 99 | * Equalizer interface and actual frequency response mismatch 100 | * libsndfile replaced with much smaller dr_libs for impulse response file loading 101 | * Uses Android 10 API as compiling 102 | * Additional features: 103 | * Shrinking impulse response according users thresholds 104 | * Uses minimum phase transform on impulse response if user needed 105 | * Customizable channel dependent sample delay at the impulse response beginning 106 | 107 | ### v3.0 - 4.9.2020 108 | * Fix boot script 109 | * Update to MMT-EX v1.5 110 | * New JDSP app update!: 111 | * Reduce parameter commit 112 | * Junked Convolver benchmark system, improve device responsiveness when the device is booting 113 | * New Dynamic range compressor, full automatic internal parameter adjustment(BUT haven't fully adapt to level depend system(I mean audio framework) 114 | * New bass boost system, the system automatically detect "Interesting frequency", and adjust filter gain, bandwidth accordingly 115 | * New FIR Equalizer, enhance interpolator algorithms, more interpolation mode and faster filter generation 116 | * New convolution algorithm, much faster, much more power saving, remove impulse response cutting feature, however, algorithm not yet fully completed, there will still update that boost performance further. 117 | * New stereo widening algorithm 118 | * New BS2B Crossfeed system, with traditional BS2B and a few HRTF based crossfeed(Include the one provided by @Joe0Bloggs ) 119 | * Remove computationally heavy load 7.1 surround simulation, if you still want one, go download Hiby music player! 120 | * More stable live programming virtual machine, more built-in features that allow user to build very complex audio effect. 121 | * Processing performance improvement for all effects 122 | * Arbitrary phase response 123 | * DDC, Reverb, Arbitrary magnitude response algorithm remain the same 124 | * Remove all GPL code, allow full close source implementation😂😂😂However live programming compiler/Virtual machine will still go open source, last but not least, all rewritten C API will still go open source for our reference implementation of processing system. 125 | 126 | ### v2.7 - 1.22.2020 127 | * Update to MMT-Ex v1.3 (Fixes issues on Q) 128 | 129 | ### v2.6 - 1.17.2020 130 | * Update to MMT-Ex v1.2 131 | 132 | ### v2.5 - 1.4.2020 133 | * Switched from Unity to MMT-Ex 134 | 135 | ### v2.4 - 12.30.2019 136 | * Unity v5.0 update 137 | 138 | ### v2.3 - 8.11.2019 139 | * Unity v4.4 update 140 | 141 | ### v2.2 - 5.16.2019 142 | * Update to Unity v4.2 143 | 144 | ### v2.1 - 5.3.2019 145 | * Update to Unity v4.1 146 | 147 | ### v2.0 - 3.28.2019 148 | * Don't prompt for lib workaround if device that needs it 149 | * Update to unity v4.0 150 | 151 | ### v1.9.8 - 2.21.2019 152 | * Added Samsung Galaxy S9 and Zuk Z2 Pro to lib workaround 153 | * Made lib workaround a choice so I don't have to keep updating this 154 | * Unity v3.3 update 155 | 156 | ### v1.9.7 - 1.16.2019 157 | * Forgot to move apk back to priv-app (needed for unity 3.2) 158 | 159 | ### v1.9.6 - 1.15.2019 160 | * Unity v3.2 update 161 | 162 | ### v1.9.5 - 1.11.2019 163 | * Unity hotfix 164 | 165 | ### v1.9.4 - 1.10.2019 166 | * Unity v3.1 update 167 | 168 | ### v1.9.3 - 1.5.2019 169 | * Unity v3.0 update 170 | 171 | ### v1.9.2 - 12.23.2018 172 | * Fixed hua/nhua zipname trigger for real this time 173 | * Unity v2.2 update 174 | 175 | ### v1.9.1 - 12.20.2018 176 | * Fixed hua/nhua zipname trigger 177 | * Fix lib workaround 178 | * Update to Unity v2.1 179 | 180 | ### v1.9 - 12.18.2018 181 | * Unity v2.0 update 182 | * Fixed limitation in zipname triggers - you can use spaces in the zipname now and trigger is case insensitive 183 | * Improved boot script for user app install - should fix bootloop issues 184 | 185 | ### v1.8 - 11.21.2018 186 | * Updated JDSP to 11.20.18 release (Change FFT to slower but a commercial friendly implementation, Improve TruCentre separation, Reduce TruCentre latency to 21 ms(from 32 ms), Fix arbitrary response equalizer memory leaks) 187 | 188 | ### v1.7.5 - 11.8.2018 189 | * Add libstdc++ workaround for pixel 2's, 3's, and essential phone 190 | 191 | ### v1.7.4 - 10.29.2018 192 | * Switch to manual huawei selection - too much variation with custom roms for consistent huawei device detection 193 | 194 | ### v1.7.3 - 10.24.2018 195 | * Unity v1.7.2 update 196 | * Bug fix for arm64 devices 197 | * Bug fixes for huawei devices 198 | 199 | ### v1.7.2 - 10.23.2018 200 | * Fixed awesome boot script for pie - magisk apk stuff is automated once again :) 201 | 202 | ### v1.7.1 - 10.22.2018 203 | * Fix boot hanging on Pie roms 204 | 205 | ### v1.7 - 9.20.2018 206 | * Update to unity 1.7.1 207 | * Widen detection for huawei devices 208 | 209 | ### v1.6.9.1 - 9.16.2018 210 | * Hotfix for Huawei devices 211 | 212 | ### v1.6.9 -9.13.2018 213 | * Updated JDSP to 9.13 release (adds huawei support, adds auto DDC resampler for device running on 96k sample rate or above, fixes some device volume issue caused by bit depth) 214 | 215 | ### v1.6.8 - 9.3.2018 216 | * Updated JDSP to 8.31 release 217 | 218 | ### v1.6.7 - 9.2.2018 219 | * Unity v1.7 update 220 | * Added auto-install/uninstall of apk for magisk only (works for disable/enabling mod in magisk manager as well) 221 | * Add compression to save space/bandwidth 222 | 223 | ### v1.6.6 - 8.30.2018 224 | * Unity v1.6.1 update 225 | 226 | ### v1.6.5 - 8.26.2018 227 | * New JamesDSP build (Now supports HTC devices) 228 | * Fixed bit depth problem from HTC and Android Pie 229 | * Upgraded Fast Fourier Transform libraryand Android NDK 230 | 231 | ### v1.6.4 - 8.24.2018 232 | * Unity v1.6 update 233 | 234 | ### v1.6.3 - 7.17.2018 235 | * Unity v1.5.5 update 236 | 237 | ### v1.6.2 - 5.7.2018 238 | * Unity v1.5.4 update 239 | 240 | ### v1.6.1 - 4.26.2018 241 | * Unity v1.5.3 update 242 | 243 | ### v1.6 - 4.16.2018 244 | * Unity v1.5.2 update 245 | * Add AML detection/notification 246 | * Add auto install for apk if in bootmode 247 | 248 | ### v1.5.9 - 4.12.2018 249 | * Reworking/fixing of audio file patching 250 | 251 | ### v1.5.8 - 4.12.2018 252 | * Unity v1.5.1 update 253 | 254 | ### v1.5.7 - 4.12.2018 255 | * Unity v1.5 update 256 | 257 | ### v1.5.6 - 4.9.2018 258 | * Use dynamic effect removal 259 | 260 | ### v1.5.5 - 3.30.2018 261 | * Fix effect removals 262 | 263 | ### v1.5.4 - 3.29.2018 264 | * Unity v1.4.1 update 265 | 266 | ### v1.5.3 - 3.18.2018 267 | * Unity v1.4 update 268 | 269 | ### v1.5.2 - 3.1.2018 270 | * Real fix for vol key logic 271 | 272 | ### v1.5.1 - 2.26.2018 273 | * Quick fix for vol key logic 274 | 275 | ### v1.5 - 2.25.2018 276 | * Fixed vendor files in bootmode for devices with separate vendor partitions 277 | * Bring back old keycheck method or devices that don't like the newer chainfire method 278 | * Fix seg faults on system installs 279 | 280 | ### v1.4.2 - 2.17.2018 281 | * Boot script not working, have user do it manually for oreo 282 | 283 | ### v1.4.1 - 2.16.2018 284 | * Updated jdsp to new version 285 | 286 | ### v1.4 - 2.16.2018 287 | * Add file backup on system installs 288 | * Fine tune unity prop logic 289 | * Update util_functions with magisk 15.4 stuff 290 | * Fix music_helper/sa3d removal in xml files 291 | 292 | ### v1.3 - 2.12.2018 293 | * Fix vendor cfg creation for devices that don't have it 294 | * Fix sepolicy patching 295 | 296 | ### v1.2 - 2.10.2018 297 | * Added sa3d removal for samsung devices 298 | 299 | ### v1.1 - 2.6.2018 300 | * Fixes for xml cfg files 301 | 302 | ### v1.0 - 2.5.2018 303 | * Initial rerelease 304 | 305 | ## Credits 306 | * [James34602](https://forum.xda-developers.com/android/apps-games/app-reformed-dsp-manager-t3607970) 307 | 308 | ## Source Code 309 | * Module [GitHub](https://github.com/therealahrion/JamesDSPManager) 310 | * App [GitHub](https://github.com/james34602/JamesDSPManager) 311 | -------------------------------------------------------------------------------- /common/addon/Volume-Key-Selector/README.md: -------------------------------------------------------------------------------- 1 | # Volume Key Selector - Addon that allows the use of the volume keys to select option in the installer 2 | 3 | ## Instructions: 4 | * Call chooseport whenever you want to call to use volume key check. The function returns true if user selected vol up and false if vol down 5 | Ex: if chooseport; then 6 | echo "true" 7 | else 8 | echo "false" 9 | fi 10 | * If you want to use the bixby button on samsung galaxy devices, [check out this post here](https://forum.xda-developers.com/showpost.php?p=77908805&postcount=16) and modify the install.sh functions accordingly 11 | 12 | ## Notes: 13 | * Each volume key selector method will timeout after 3 seconds in the event of incompatibility or error 14 | 15 | ## Included Binaries/Credits: 16 | * [keycheck binary](https://github.com/sonyxperiadev/device-sony-common-init/tree/master/keycheck) compiled by me [here](https://github.com/Zackptg5/Keycheck) 17 | -------------------------------------------------------------------------------- /common/addon/Volume-Key-Selector/install.sh: -------------------------------------------------------------------------------- 1 | # External Tools 2 | chmod -R 0755 $MODPATH/common/addon/Volume-Key-Selector/tools 3 | 4 | chooseport_legacy() { 5 | # Keycheck binary by someone755 @Github, idea for code below by Zappo @xda-developers 6 | # Calling it first time detects previous input. Calling it second time will do what we want 7 | [ "$1" ] && local delay=$1 || local delay=3 8 | local error=false 9 | while true; do 10 | timeout 0 $MODPATH/common/addon/Volume-Key-Selector/tools/$ARCH32/keycheck 11 | timeout $delay $MODPATH/common/addon/Volume-Key-Selector/tools/$ARCH32/keycheck 12 | local sel=$? 13 | if [ $sel -eq 42 ]; then 14 | return 0 15 | elif [ $sel -eq 41 ]; then 16 | return 1 17 | elif $error; then 18 | abort "Volume key not detected!" 19 | else 20 | error=true 21 | echo "Volume key not detected. Try again" 22 | fi 23 | done 24 | } 25 | 26 | chooseport() { 27 | # Original idea by chainfire and ianmacd @xda-developers 28 | [ "$1" ] && local delay=$1 || local delay=3 29 | local error=false 30 | while true; do 31 | local count=0 32 | while true; do 33 | timeout $delay /system/bin/getevent -lqc 1 2>&1 > $TMPDIR/events & 34 | sleep 0.5; count=$((count + 1)) 35 | if (`grep -q 'KEY_VOLUMEUP *DOWN' $TMPDIR/events`); then 36 | return 0 37 | elif (`grep -q 'KEY_VOLUMEDOWN *DOWN' $TMPDIR/events`); then 38 | return 1 39 | fi 40 | [ $count -gt 6 ] && break 41 | done 42 | if $error; then 43 | # abort "Volume key not detected!" 44 | echo "Volume key not detected. Trying keycheck method" 45 | export chooseport=chooseport_legacy VKSEL=chooseport_legacy 46 | chooseport_legacy $delay 47 | return $? 48 | else 49 | error=true 50 | echo "Volume key not detected. Try again" 51 | fi 52 | done 53 | } 54 | 55 | # Keep old variable from previous versions of this 56 | VKSEL=chooseport 57 | -------------------------------------------------------------------------------- /common/addon/Volume-Key-Selector/tools/arm/keycheck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/addon/Volume-Key-Selector/tools/arm/keycheck -------------------------------------------------------------------------------- /common/addon/Volume-Key-Selector/tools/x86/keycheck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/addon/Volume-Key-Selector/tools/x86/keycheck -------------------------------------------------------------------------------- /common/files/JamesDSP/Convolver/CorredHRTFCrossfeed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/JamesDSP/Convolver/CorredHRTFCrossfeed.wav -------------------------------------------------------------------------------- /common/files/JamesDSP/Convolver/CorredHRTF_Surround1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/JamesDSP/Convolver/CorredHRTF_Surround1.wav -------------------------------------------------------------------------------- /common/files/JamesDSP/Convolver/CorredHRTF_Surround2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/JamesDSP/Convolver/CorredHRTF_Surround2.wav -------------------------------------------------------------------------------- /common/files/JamesDSP/Convolver/SwapChannels.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/JamesDSP/Convolver/SwapChannels.wav -------------------------------------------------------------------------------- /common/files/JamesDSP/Convolver/binChurch.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/JamesDSP/Convolver/binChurch.wav -------------------------------------------------------------------------------- /common/files/JamesDSP/DDC/Butterworth.vdc: -------------------------------------------------------------------------------- 1 | SR_44100:1.0,2.0,1.0,0.49776872571908,-0.92323067076422,1.0,2.0,1.0,0.46239241251513,-0.78654709251389,1.0,2.0,1.0,0.43200487475848,-0.66913866244798,1.0,2.0,1.0,0.40579535901039,-0.56787286982551,1.0,2.0,1.0,0.38311728402779,-0.48025151656067,1.0,2.0,1.0,0.36345085242376,-0.40426625977155,1.0,2.0,1.0,0.34637526758316,-0.33829126618545,1.0,2.0,1.0,0.33154786500892,-0.28100258185247,1.0,2.0,1.0,0.31868828423601,-0.23131697711726,1.0,2.0,1.0,0.30756635979221,-0.18834516088404,1.0,2.0,1.0,0.29799278830617,-0.15135572109130,1.0,2.0,1.0,0.28981189184924,-0.11974716441148,1.0,2.0,1.0,0.28289598260785,-0.09302614301739,1.0,2.0,1.0,0.27714096578247,-0.07079046548794,1.0,2.0,1.0,0.27246291270151,-0.05271585633733,1.0,2.0,1.0,0.26879540567792,-0.03854569732859,1.0,2.0,1.0,0.26608750775888,-0.02808318318879,1.0,2.0,1.0,0.26430224953770,-0.02118547509906,1.0,2.0,1.0,0.26341555536854,-0.01775955190699,9.99999999999000e-13,0,0,0,0 2 | SR_48000:1.0,2.0,1.0,0.49776872571908,-0.92323067076422,1.0,2.0,1.0,0.46239241251513,-0.78654709251389,1.0,2.0,1.0,0.43200487475848,-0.66913866244798,1.0,2.0,1.0,0.40579535901039,-0.56787286982551,1.0,2.0,1.0,0.38311728402779,-0.48025151656067,1.0,2.0,1.0,0.36345085242376,-0.40426625977155,1.0,2.0,1.0,0.34637526758316,-0.33829126618545,1.0,2.0,1.0,0.33154786500892,-0.28100258185247,1.0,2.0,1.0,0.31868828423601,-0.23131697711726,1.0,2.0,1.0,0.30756635979221,-0.18834516088404,1.0,2.0,1.0,0.29799278830617,-0.15135572109130,1.0,2.0,1.0,0.28981189184924,-0.11974716441148,1.0,2.0,1.0,0.28289598260785,-0.09302614301739,1.0,2.0,1.0,0.27714096578247,-0.07079046548794,1.0,2.0,1.0,0.27246291270151,-0.05271585633733,1.0,2.0,1.0,0.26879540567792,-0.03854569732859,1.0,2.0,1.0,0.26608750775888,-0.02808318318879,1.0,2.0,1.0,0.26430224953770,-0.02118547509906,1.0,2.0,1.0,0.26341555536854,-0.01775955190699,9.99999999999000e-13,0,0,0,0 -------------------------------------------------------------------------------- /common/files/JamesDSP/DDC/mh750.vdc: -------------------------------------------------------------------------------- 1 | SR_44100:1,-0.971981874387669,0,0.899275119904805,-0,1,0.00728396195908354,-0.985745184728322,0.00198514217303924,0.986418314722294,1,-0.113144827743594,-0.0358950733053049,-0,-0,1,0.0490985108832388,0.018820072890148,-0,-0,1,-1.0706287220928,0.389359912656245,1.21520832372929,-0.592558625822534,1,0.328034581110579,0.610812441630399,-0.327670346086345,-0.610480530607664,1,-0.064382541200463,0.776770468894484,0.0709331113655902,-0.698399196222291,1,-1.44834931551326,0.631025253297572,1.58214055701707,-0.709367330967928,1,-0.949425962357663,0.726334544528128,0.938275950182073,-0.713792464969363,1,1.73060295053404,0.758412985992176,-1.71575995196542,-0.742836940059534,1,1.70096723497195,0.758089913699366,-1.70285405704689,-0.760412968832014,1,0.559472069399927,0.849386456314584,-0.545155956565943,-0.813395353405986,1,-1.11484039077441,0.85215751792811,1.09641508554785,-0.819531095828234,1,-1.64510487114159,0.884326644189874,1.64192239466692,-0.88144498008489,1,-1.87250446010463,0.901719395859356,1.87280498623531,-0.897563174309931,1,-1.91939837092537,0.923141517232972,1.91259828716443,-0.916906953039798,1,1.98405295265901,0.984144572958716,-1.98691140560045,-0.986977327725583,1.00000679472628,0,0,0,0 2 | SR_48000:1,-0.847790827844211,0,-0.562669546675363,-0,1,1.62257794114509,0.649349481590216,-1.62180593284526,-0.648713327685098,1,-0.0395929157464033,-0.949780662476621,0.0415182596642794,0.951600667104663,1,0.706146833675718,0.0806038483792921,-0,-0,1,0.0757527756185106,0.0244611151677519,-0,-0,1,-0.77642364314043,0.172304808128306,1.32515450340362,-0.641621538913845,1,-1.38239662709336,0.618536128152041,1.60280895026469,-0.689594339466574,1,-0.287016332103865,0.791904768281003,0.281401655713353,-0.719311865482296,1,-1.08402130749355,0.7617709179076,1.07682079097001,-0.751341556392535,1,0.28716783269752,0.859653434445436,-0.279868799595553,-0.826754762618035,1,-1.22914566573562,0.862589138023901,1.2085085326086,-0.831421760848089,1,-1.67580799906422,0.877958660021214,1.67069853601126,-0.873514509464545,1,0.310955742670973,0.885775158016371,-0.311054337666039,-0.885723527248199,1,-1.87788405289207,0.900727693127121,1.89374579462135,-0.912058546316642,1,-1.93208415521333,0.933899717051132,1.90997433510421,-0.913694929131308,1,1.91018099907767,0.918665527212971,-1.91018579390092,-0.918671868925942,1,-1.80989475931846,0.921750700554314,1.81035939091758,-0.922211115476868,1.00000679472628,0,0,0,0 -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/autopeakfilter.eel: -------------------------------------------------------------------------------- 1 | desc: FFT Peak-Following Filter 2 | //64,128,256,512,1024,2048,4096}FFT Size 3 | //lowestFc:60<0,24000,10>Minimum Center Freq (Hz) 4 | //highestFc:8000<0,24000,10>Maximum Center Freq (Hz) 5 | //filtWidthOct:2<0,8,0.01>Filter Width (oct) 6 | //pkGaindB:0<-120,24,1>Peak Gain (dB) 7 | //nonPkGaindB:-120<-120,24,1>Non-Peak Gain (dB) 8 | //atkMS:120<0,1000,1>FiltEr Position Attack Time (ms) 9 | //highSlope:1.29<0.5,1.5,0.01>High End Slope 10 | 11 | @init 12 | curfilterpos=-1; 13 | fftsize=2048; 14 | lowestFc = 800; 15 | highestFc = 4000; 16 | filtWidthOct = 4; 17 | pkGaindB = 0; 18 | nonPkGaindB = -120; 19 | atkMS = 2; 20 | highSlope = 1.29; 21 | bpos=0; 22 | curblock=0; 23 | lastblock=65536; 24 | window=120000; 25 | hist=240000; 26 | invfsize = 1/fftsize; 27 | halfLen = fftsize*0.5; 28 | tmp=0; 29 | tsc = $PI / halfLen; 30 | loop(halfLen, 31 | window[tmp]=0.42-0.50*cos(tmp*tsc)+0.08*cos(2*tmp*tsc); 32 | tmp+=1; 33 | ); 34 | lowband = halfLen*lowestFc*2.0/srate; 35 | lowband = min(max(lowband,0),halfLen)|0; 36 | hiband = halfLen*highestFc*2.0/srate; 37 | hiband = min(max(hiband,0),halfLen)|0; 38 | lowband > hiband ? ( t = hiband; hiband = lowband; lowband = t; ); 39 | peakgain = 2 ^ (pkGaindB/6) * invfsize; 40 | nonpeakgain = 2 ^ (nonPkGaindB/6) * invfsize; 41 | attack= atkMS < 1 ? 0 : exp(-halfLen/(atkMS*0.001*srate)); 42 | minpeakval = pow(2, -90/6.0); 43 | hislope = highSlope/halfLen; 44 | 45 | @sample 46 | bpos >= fftsize ? ( 47 | 48 | t=curblock; 49 | curblock=lastblock; 50 | lastblock=t; 51 | 52 | fft(curblock,fftsize); 53 | fft_permute(curblock,fftsize); 54 | peakpos=curfilterpos; 55 | peakval=minpeakval; 56 | i=lowband*2; 57 | gain=0; 58 | loop(max(hiband-lowband,1), 59 | a=curblock[i]; 60 | b=curblock[i+1]; 61 | cv=(a*a+b*b)*gain*gain; 62 | gain+=hislope; 63 | cv > peakval ? ( peakpos=i; peakval=cv; ); 64 | i+=2; 65 | ); 66 | 67 | peakpos *= 0.5; 68 | curfilterpos = (curfilterpos < 0 ? peakpos : curfilterpos*attack + peakpos*(1-attack)); 69 | 70 | curfilterpos >= 0 ? 71 | ( 72 | filtersize_l=curfilterpos*filtWidthOct*0.25; 73 | filtersize_r=curfilterpos*filtWidthOct*0.5; 74 | ) : filtersize_l=filtersize_r=0; 75 | 76 | ifiltersize_l=1/filtersize_l; 77 | ifiltersize_r=1/filtersize_r; 78 | i=0; 79 | pp=0; 80 | ifilterpos=(curfilterpos+0.5)|0; 81 | loop(halfLen, 82 | i2=fftsize*2-i-2; 83 | adjust=nonpeakgain; 84 | curfilterpos >= 0 ? ( 85 | filtersize_l<=1 ? ( 86 | pp==ifilterpos ? adjust=peakgain; 87 | ) : ( 88 | dist=pp-curfilterpos; 89 | dist < 0 ? ( 90 | dist=-dist; 91 | dist <= filtersize_l ? ( 92 | sc = dist*ifiltersize_l; 93 | sc*=sc; 94 | adjust = peakgain*(1-sc) + nonpeakgain*sc; 95 | ); 96 | ) : ( 97 | dist <= filtersize_r ? ( 98 | sc = dist*ifiltersize_r; 99 | sc*=sc; 100 | adjust = peakgain*(1-sc) + nonpeakgain*sc; 101 | ); 102 | ); 103 | ); 104 | 105 | ); 106 | 107 | 108 | 109 | 110 | curblock[i]*=adjust; 111 | curblock[i+1]*=adjust; 112 | curblock[i2]*=adjust; 113 | curblock[i2+1]*=adjust; 114 | i+=2; 115 | pp+=1; 116 | ); 117 | fft_ipermute(curblock,fftsize); 118 | ifft(curblock,fftsize); 119 | bpos=0; 120 | ); 121 | 122 | // make sample 123 | w=window[bpos*0.5]; 124 | iw=1-w; 125 | 126 | os0=spl0; 127 | os1=spl1; 128 | 129 | spl0=(curblock[bpos]*w + lastblock[fftsize+bpos]*iw); 130 | spl1=(curblock[bpos+1]*w + lastblock[fftsize+bpos+1]*iw); 131 | 132 | lastblock[bpos]=hist[bpos]; 133 | lastblock[bpos+1]=hist[bpos+1]; 134 | lastblock[fftsize+bpos]=os0; 135 | lastblock[fftsize+bpos+1]=os1; 136 | 137 | hist[bpos]=os0; 138 | hist[bpos+1]=os1; 139 | bpos+=2; 140 | -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/dc_remove.eel: -------------------------------------------------------------------------------- 1 | // This effect Copyright (C) 2004 and later Cockos Incorporated 2 | // License: GPL - http://www.gnu.org/licenses/gpl.html 3 | // based on the algorithm in Steve Harris's plug-in package: http://plugin.org.uk/ 4 | 5 | desc:DC Filter 6 | //tags: filter repair 7 | //author: Cockos 8 | 9 | @init 10 | itm1=itm2=otm1=otm2=0; 11 | 12 | @sample 13 | otm1=0.999*otm1 + spl0 - itm1; 14 | itm1=spl0; 15 | spl0=otm1; 16 | otm2=0.999*otm2 + spl1 - itm2; 17 | itm2=spl1; 18 | spl1=otm2; 19 | -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/firFilter.eel: -------------------------------------------------------------------------------- 1 | desc: FIR Filtering 2 | 3 | @init 4 | coefficients = 0; 5 | hLen = importFLTFromStr("-0.000814106447125912,-0.00101893557539458,0.00439540510163513,0.0191817066643173,0.0348758447331096,0.0296722242827697,-0.00949579830159734,-0.0574346591733406,-0.0538264189367632,0.0446871259733802,0.207161817163176,0.333544729155861,0.333544729155861,0.207161817163176,0.0446871259733802,-0.0538264189367632,-0.0574346591733406,-0.00949579830159734,0.0296722242827697,0.0348758447331096,0.0191817066643173,0.00439540510163513,-0.00101893557539458,-0.000814106447125912", coefficients); 6 | ptr1 = coefficients + hLen; 7 | req = FIRInit(ptr1, hLen); 8 | ptr2 = ptr1 + req; 9 | req = FIRInit(ptr2, hLen); 10 | 11 | @sample 12 | spl0 = FIRProcess(ptr1, spl0, coefficients); 13 | spl1 = FIRProcess(ptr2, spl1, coefficients); -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/fractionalDelayline.eel: -------------------------------------------------------------------------------- 1 | desc: Fractional delay line 2 | 3 | @init 4 | ptr1 = 0; 5 | req = fractionalDelayLineInit(ptr1, 1024); 6 | ptr2 = ptr1 + req; 7 | req = fractionalDelayLineInit(ptr2, 1024); 8 | 9 | fractionalDelayLineSetDelay(ptr1, 15.1); 10 | fractionalDelayLineSetDelay(ptr2, 2.4); 11 | 12 | @sample 13 | spl0 = fractionalDelayLineProcess(ptr1, spl0); 14 | spl1 = fractionalDelayLineProcess(ptr2, spl1); -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/hadamVerb.eel: -------------------------------------------------------------------------------- 1 | desc: Hadamard Variable Delay Array 2 | 3 | slider1:0.2<0.01,1>Base Delay (s) 4 | slider4:2<0,5>Fb 1 5 | slider5:2<0,5>Fb 2 6 | slider8:30<0,60>VLFO cycle A 7 | slider9:20<0,60>B 8 | slider12:10<1,20>Factor between arrays 9 | slider14:0.01<0,0.5>Modulation depth 10 | slider20:0<-24,24>Gain (dB) 11 | // ____________________________________ 12 | @init 13 | slider1=0.2; 14 | slider4=2; 15 | slider5=2; 16 | slider8=30; 17 | slider9=20; 18 | slider12=10; 19 | slider14=0.01; 20 | slider20=0; 21 | // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 22 | function HAD()( 23 | HAD_NORM = 0.5; // 1/sqrt2 * 1/sqrt2 24 | HAD_LM = 65536; HAD_LM1 = HAD_LM - 1; 25 | ); 26 | // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 27 | function HAD_init()( 28 | // delay line tables 29 | this.d0 = ad; ad+=HAD_LM; 30 | this.d1 = ad; ad+=HAD_LM; 31 | this.d2 = ad; ad+=HAD_LM; 32 | this.d3 = ad; ad+=HAD_LM; 33 | ); 34 | // hadamard4 mix x0..3 -> y0.3 35 | function HAD_mix() instance(x0 x1 x2 x3 y0 y1 y2 y3) local(x01 x23) 36 | ( 37 | x01 = x0 + x1; x23 = x2 + x3; y0 = x01 + x23; y2 = x01 - x23; 38 | x01 = x0 - x1; x23 = x2 - x3; y1 = x01 + x23; y3 = x01 - x23; 39 | ); 40 | // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 41 | function HAD_setDelays(ld0 ld1 ld2 ld3)( 42 | this.ld0 = ld0; this.ld1 = ld1; this.ld2 = ld2; this.ld3 = ld3; 43 | ); 44 | // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 45 | function HAD_setFBs(fb0 fb1 fb2 fb3)( 46 | this.fb0 = (1 - fb0) * HAD_NORM; 47 | this.fb1 = (1 - fb1) * HAD_NORM; 48 | this.fb2 = (1 - fb2) * HAD_NORM; 49 | this.fb3 = (1 - fb3) * HAD_NORM; 50 | this.gi0 = fb0 * HAD_NORM; 51 | this.gi1 = fb1 * HAD_NORM; 52 | this.gi2 = fb2 * HAD_NORM; 53 | this.gi3 = fb3 * HAD_NORM; 54 | ); 55 | // x>=0 !! 56 | function HAD_interp(x t l) 57 | local(ix0 ix1 a)( 58 | ix0 = floor(x); 59 | a = x - ix0; 60 | ix0 = ix0 % l; 61 | ix1 = (ix0 + 1) % l; 62 | t[ix0] + a * (t[ix1] - t[ix0]); 63 | ); 64 | function HAD_aProc(in0 in1 in2 in3) 65 | instance( d0 d1 d2 d3 66 | ld0 ld1 ld2 ld3 67 | ldf0 ldf1 ldf2 ldf3 68 | fb0 fb1 fb2 fb3 69 | gi0 gi1 gi2 gi3 70 | x0 x1 x2 x3 71 | y0 y1 y2 y3 c) 72 | local(cp) 73 | ( 74 | ldf0 += 0.0001 * (ld0 - ldf0); 75 | ldf1 += 0.0001 * (ld1 - ldf1); 76 | ldf2 += 0.0001 * (ld2 - ldf2); 77 | ldf3 += 0.0001 * (ld3 - ldf3); 78 | // Input and feedback 79 | d0[c] = fb0 * y0 + in0 * gi0; 80 | d1[c] = fb1 * y1 + in1 * gi1; 81 | d2[c] = fb2 * y2 + in2 * gi2; 82 | d3[c] = fb3 * y3 + in3 * gi3; 83 | // delay lines output to matrix inputs 84 | cp = c + HAD_LM; 85 | x0 = HAD_interp(cp - ldf0, d0, HAD_LM); 86 | x1 = HAD_interp(cp - ldf1, d1, HAD_LM); 87 | x2 = HAD_interp(cp - ldf2, d2, HAD_LM); 88 | x3 = HAD_interp(cp - ldf3, d3, HAD_LM); 89 | // matrix mix 90 | this.HAD_mix(); 91 | c = (c + 1) & HAD_LM1; 92 | ); 93 | HAD(); 94 | h1.HAD_init(); 95 | h2.HAD_init(); 96 | function VLFO_proc() 97 | instance(p dp s c)( 98 | p += dp; 99 | p > $pi ? p -= 2 * $pi; 100 | s = sin(p); 101 | c = cos(p); 102 | ); 103 | gain = 2 ^ (slider20 / 6); 104 | sl4 = 1 / (1 + slider4); 105 | sl5 = 1 / (1 + slider5); 106 | _sl12 = 1 / slider12; 107 | sl0 = srate * slider1; 108 | //"chorus" 109 | vlfo1.dp = 1.13 * (slider12 / slider8) * 2*$pi / srate; 110 | vlfo2.dp = 0.90 * (slider12 / slider9) * 2*$pi / srate; 111 | //"reverb" 112 | vlfo3.dp = (1 / slider8) * 2*$pi / srate; 113 | vlfo4.dp = (1 / slider9) * 2*$pi / srate; 114 | // First array, chorus style 115 | h1.HAD_setFBs(sl4, sl4, 1.17 * sl4, 1.27 * sl4); 116 | // Second array, reverb style 117 | h2.HAD_setFBs(sl5, sl5, 1.27 * sl5, 1.30 * sl5); 118 | d1_0 = 0.3 * sl0 * _sl12; 119 | d1_1 = 0.4 * sl0 * _sl12; 120 | d1_2 = 1.5 * sl0 * _sl12; 121 | d1_3 = 2.0 * sl0 * _sl12; 122 | d2_0 = 1.13 * sl0; 123 | d2_1 = 0.83 * sl0; 124 | d2_2 = 1.32 * sl0; 125 | d2_3 = 0.57 * sl0; 126 | @sample 127 | // chorus unit 128 | // inputs and feedback from the reverb array 129 | h1.HAD_aProc( spl0, spl1, 0.49 * h2.y2, 0.49 * h2.y3); 130 | // reverb unit 131 | h2.HAD_aProc(h1.y0, h1.y1, h1.y2, h1.y3); 132 | // VLFOs 133 | vlfo1.VLFO_proc(); 134 | vlfo2.VLFO_proc(); 135 | vlfo3.VLFO_proc(); 136 | vlfo4.VLFO_proc(); 137 | // Delay modulation of the chorus delays 138 | h1.HAD_setDelays( 139 | d1_0 * (1 + slider14 * vlfo1.s), 140 | d1_1 * (1 + slider14 * vlfo2.s), 141 | d1_2 * (1 + slider14 * vlfo1.c), 142 | d1_3 * (1 + slider14 * vlfo2.c)); 143 | // Delay modulation of the reverb delays 144 | h2.HAD_setDelays( 145 | d2_0 * (1 + slider14 * vlfo3.s), 146 | d2_1 * (1 + slider14 * vlfo4.c), 147 | d2_2 * (1 + slider14 * vlfo3.s), 148 | d2_3 * (1 + slider14 * vlfo4.c)); 149 | // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 150 | spl0 = gain * (h2.y0 + h1.y0 + h1.x0); 151 | spl1 = gain * (h2.y1 - h1.y1 + h1.x1); 152 | -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/simpleFDNReverb.eel: -------------------------------------------------------------------------------- 1 | desc: Simple FDN reverb 2 | wet_gain:-9<-60,0,0.5>Wet gain 3 | dry_gain:-0.5<-60,0,0.5>Wet gain 4 | preset_index:1<0,9,1>Which preset we use 5 | 6 | @init 7 | function db2mag(db) 8 | ( 9 | pow(10, db / 20); 10 | ); 11 | function fc2alpha(rc, srate) 12 | ( 13 | dt = 1.0 / srate; 14 | dt / (rc + dt); 15 | ); 16 | function ceilpower2(x) 17 | ( 18 | x -= 1; 19 | x |= x >> 1; 20 | x |= x >> 2; 21 | x |= x >> 4; 22 | x |= x >> 8; 23 | x |= x >> 16; 24 | x += 1; 25 | x; 26 | ); 27 | presetsMemoryAddress = 0; 28 | presetLen = importFLTFromStr("7.6621208791039e-06,0.661865234375,-0.50927734375,0,0,-0.54296875,0.6875,0.6484375,500,364,4952,3276,4032,2204,3536,1980,3280,1748,0,0,0,0,0,0,0,0,1744,1240,736,368,6.04853630647995e-06,0.622314453125,-0.5244140625,0.53173828125,-0.49267578125,-0.78125,0.64453125,0.615234375,204,148,3984,3180,3728,2748,3528,2456,3184,2420,2416,1592,2236,1236,1864,732,1596,724,720,512,304,152,6.04853630647995e-06,0.622314453125,-0.5244140625,0.53955078125,-0.50830078125,-0.587890625,0.64453125,0.615234375,708,508,9232,7596,8336,6524,7816,6232,7600,6068,6064,4280,5180,3092,4488,2780,4284,2452,2448,1736,1024,512,6.76963645673823e-06,0.622314453125,-0.5244140625,0.53955078125,-0.50830078125,-0.69921875,0.67578125,0.646484375,908,676,14316,11616,13348,10480,12132,9676,11620,9064,9060,6052,8112,4800,7100,3912,6056,3188,3184,2272,1360,680,1.51171580000664e-05,0.625,0.59375,-0.5625,-0.53125,-0.5,0.75,0.71875,1684,1252,22248,18156,21256,17140,18160,14084,18176,14092,14080,9988,12048,7940,10240,6964,9992,5892,5888,4200,2512,1256,6.04853630647995e-06,0.622314453125,-0.5244140625,0.53955078125,-0.50830078125,-0.9609375,0.74609375,0.662109375,92,76,3524,2748,2964,1916,2752,1884,3424,2472,1880,1144,1204,708,1148,356,1664,908,352,256,160,80,7.19864658549341e-07,0.625,-0.59375,-0.625,0.59375,-0.625,0.75,0.65625,3316,2244,31576,26820,29776,24812,28424,23240,26824,22460,22456,16724,19664,15540,18392,12660,16728,11140,11136,7816,4496,2248,1.38405942262665e-09,0.999969482421875,0,0,0,-0.9921875,0,0,4,4,32764,16380,16404,20,0,0,16404,20,0,0,0,0,0,0,0,0,16400,16392,16,8,1.38405942262665e-09,0.999969482421875,0,0,0,0,0,0,4,4,32764,16380,16404,20,0,0,16404,20,0,0,0,0,0,0,0,0,16400,16392,16,8,1.48603177070618,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,4,4,4,4,4,4,0,0,4,4,4,4", presetsMemoryAddress); 29 | BufferAddress = 0; 30 | spu_buffer_count = ceilpower2(ceil(49184 * (srate / 22050.0))); 31 | spu_buffer_count_mask = spu_buffer_count - 1; // <-- we can use this for quick circular buffer access 32 | spu_buffer = presetsMemoryAddress + presetLen; //spu_buffer_count 33 | // Parameter start 34 | wet_gain = -9; // dB 35 | dry_gain = -0.5; // dB 36 | preset_index = 6; // 0 - 9 37 | //printf("Printing preset start\n"); 38 | //j=0;loop(presetLen, printf("%d %1.8f\n", j + 1, presetsMemoryAddress[j]);j+=1); 39 | //printf("Printing preset end\n"); 40 | //breakpoint(); 41 | // Parameter end 42 | wet = db2mag(wet_gain); 43 | dry = db2mag(dry_gain); 44 | stretch_factor = srate / 22050.0; 45 | preset_index = (preset_index < 0) ? 0 : ((preset_index > 9) ? 9 : preset_index); 46 | printf("preset_index = %d\n", preset_index); 47 | ptr = presetsMemoryAddress + 30 * preset_index; 48 | vIIR = fc2alpha(ptr[0], srate); 49 | vCOMB1 = ptr[1]; 50 | vCOMB2 = ptr[2]; 51 | vCOMB3 = ptr[3]; 52 | vCOMB4 = ptr[4]; 53 | vWALL = ptr[5]; 54 | vAPF1 = ptr[6]; 55 | vAPF2 = ptr[7]; 56 | dAPF1 = ptr[8] * stretch_factor; 57 | dAPF2 = ptr[9] * stretch_factor; 58 | mLSAME = ptr[10] * stretch_factor; 59 | mRSAME = ptr[11] * stretch_factor; 60 | mLCOMB1 = ptr[12] * stretch_factor; 61 | mRCOMB1 = ptr[13] * stretch_factor; 62 | mLCOMB2 = ptr[14] * stretch_factor; 63 | mRCOMB2 = ptr[15] * stretch_factor; 64 | dLSAME = ptr[16] * stretch_factor; 65 | dRSAME = ptr[17] * stretch_factor; 66 | mLDIFF = ptr[18] * stretch_factor; 67 | mRDIFF = ptr[19] * stretch_factor; 68 | mLCOMB3 = ptr[20] * stretch_factor; 69 | mRCOMB3 = ptr[21] * stretch_factor; 70 | mLCOMB4 = ptr[22] * stretch_factor; 71 | mRCOMB4 = ptr[23] * stretch_factor; 72 | dLDIFF = ptr[24] * stretch_factor; 73 | dRDIFF = ptr[25] * stretch_factor; 74 | mLAPF1 = ptr[26] * stretch_factor; 75 | mRAPF1 = ptr[27] * stretch_factor; 76 | mLAPF2 = ptr[28] * stretch_factor; 77 | mRAPF2 = ptr[29] * stretch_factor; 78 | 79 | @sample 80 | // same side reflection 81 | spu_buffer[((mLSAME) + BufferAddress) & spu_buffer_count_mask] = (spl0 + spu_buffer[((dLSAME) + BufferAddress) & spu_buffer_count_mask] * vWALL - spu_buffer[((mLSAME - 1) + BufferAddress) & spu_buffer_count_mask]) * vIIR + spu_buffer[((mLSAME - 1) + BufferAddress) & spu_buffer_count_mask]; 82 | spu_buffer[((mRSAME) + BufferAddress) & spu_buffer_count_mask] = (spl1 + spu_buffer[((dRSAME) + BufferAddress) & spu_buffer_count_mask] * vWALL - spu_buffer[((mRSAME - 1) + BufferAddress) & spu_buffer_count_mask]) * vIIR + spu_buffer[((mRSAME - 1) + BufferAddress) & spu_buffer_count_mask]; 83 | // different side reflection 84 | spu_buffer[((mLDIFF) + BufferAddress) & spu_buffer_count_mask] = (spl0 + spu_buffer[((dRDIFF) + BufferAddress) & spu_buffer_count_mask] * vWALL - spu_buffer[((mLDIFF - 1) + BufferAddress) & spu_buffer_count_mask]) * vIIR + spu_buffer[((mLDIFF - 1) + BufferAddress) & spu_buffer_count_mask]; 85 | spu_buffer[((mRDIFF) + BufferAddress) & spu_buffer_count_mask] = (spl1 + spu_buffer[((dLDIFF) + BufferAddress) & spu_buffer_count_mask] * vWALL - spu_buffer[((mRDIFF - 1) + BufferAddress) & spu_buffer_count_mask]) * vIIR + spu_buffer[((mRDIFF - 1) + BufferAddress) & spu_buffer_count_mask]; 86 | // early echo 87 | Lout = vCOMB1 * spu_buffer[((mLCOMB1) + BufferAddress) & spu_buffer_count_mask] + vCOMB2 * spu_buffer[((mLCOMB2) + BufferAddress) & spu_buffer_count_mask] + vCOMB3 * spu_buffer[((mLCOMB3) + BufferAddress) & spu_buffer_count_mask] + vCOMB4 * spu_buffer[((mLCOMB4) + BufferAddress) & spu_buffer_count_mask]; 88 | Rout = vCOMB1 * spu_buffer[((mRCOMB1) + BufferAddress) & spu_buffer_count_mask] + vCOMB2 * spu_buffer[((mRCOMB2) + BufferAddress) & spu_buffer_count_mask] + vCOMB3 * spu_buffer[((mRCOMB3) + BufferAddress) & spu_buffer_count_mask] + vCOMB4 * spu_buffer[((mRCOMB4) + BufferAddress) & spu_buffer_count_mask]; 89 | // late reverb APF1 90 | Lout -= vAPF1 * spu_buffer[((mLAPF1 - dAPF1) + BufferAddress) & spu_buffer_count_mask]; spu_buffer[((mLAPF1) + BufferAddress) & spu_buffer_count_mask] = Lout; Lout = Lout * vAPF1 + spu_buffer[((mLAPF1 - dAPF1) + BufferAddress) & spu_buffer_count_mask]; 91 | Rout -= vAPF1 * spu_buffer[((mRAPF1 - dAPF1) + BufferAddress) & spu_buffer_count_mask]; spu_buffer[((mRAPF1) + BufferAddress) & spu_buffer_count_mask] = Rout; Rout = Rout * vAPF1 + spu_buffer[((mRAPF1 - dAPF1) + BufferAddress) & spu_buffer_count_mask]; 92 | // late reverb APF2 93 | Lout -= vAPF2 * spu_buffer[((mLAPF2 - dAPF2) + BufferAddress) & spu_buffer_count_mask]; spu_buffer[((mLAPF2) + BufferAddress) & spu_buffer_count_mask] = Lout; Lout = Lout * vAPF2 + spu_buffer[((mLAPF2 - dAPF2) + BufferAddress) & spu_buffer_count_mask]; 94 | Rout -= vAPF2 * spu_buffer[((mRAPF2 - dAPF2) + BufferAddress) & spu_buffer_count_mask]; spu_buffer[((mRAPF2) + BufferAddress) & spu_buffer_count_mask] = Rout; Rout = Rout * vAPF2 + spu_buffer[((mRAPF2 - dAPF2) + BufferAddress) & spu_buffer_count_mask]; 95 | BufferAddress = ((BufferAddress + 1) & spu_buffer_count_mask); 96 | spl0 = Lout * wet + spl0 * dry; 97 | spl1 = Rout * wet + spl1 * dry; 98 | -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/stft-filter.eel: -------------------------------------------------------------------------------- 1 | desc: STFT Filter 2 | 3 | @init 4 | fftsize = 1024; 5 | bufpos = idx = 0; 6 | stftIndexLeft = 0; 7 | stftIndexRight = 40; 8 | memreq = stftCheckMemoryRequirement(stftIndexLeft, fftsize, 4, 1.5); 9 | memreq = stftCheckMemoryRequirement(stftIndexRight, fftsize, 4, 1.5); 10 | stftStructLeft = 50; 11 | stftStructRight = stftStructLeft + memreq; 12 | requiredSamples = stftInit(stftIndexLeft, stftStructLeft); 13 | requiredSamples = stftInit(stftIndexRight, stftStructRight); 14 | inBufLeft = stftStructRight + memreq + 2; // Pointer to memory 15 | outBufLeft = inBufLeft + fftsize + 2; // Pointer to memory plus safe zone 16 | inBufRight = outBufLeft + fftsize + 2; // ... 17 | outBufRight = inBufRight + fftsize + 2; // ... 18 | bandEdge1=100; 19 | bandEdge2=480; 20 | adj=2 ^ (-80/6); 21 | 22 | @sample 23 | inBufLeft[bufpos] = spl0; 24 | spl0 = outBufLeft[bufpos]; 25 | inBufRight[bufpos] = spl1; 26 | spl1 = outBufRight[bufpos]; 27 | bufpos += 1; 28 | bufpos >= requiredSamples ? 29 | ( 30 | error1 = stftForward(inBufLeft, stftIndexLeft, stftStructLeft, 1); 31 | error2 = stftForward(inBufRight, stftIndexRight, stftStructRight, 1); 32 | idx=inBufLeft+bandEdge1; 33 | loop(bandEdge2-bandEdge1, idx[0]*=adj; idx+=1); 34 | idx=inBufRight+bandEdge1; 35 | loop(bandEdge2-bandEdge1, idx[0]*=adj; idx+=1); 36 | error = stftBackward(inBufLeft, stftIndexLeft, stftStructLeft, 1); 37 | error = stftBackward(inBufRight, stftIndexRight, stftStructRight, 1); 38 | idx = 0; 39 | loop(requiredSamples, 40 | outBufLeft[idx] = inBufLeft[idx]; 41 | outBufRight[idx] = inBufRight[idx]; 42 | idx+=1); 43 | bufpos = 0; 44 | ); 45 | -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/stftCentreCut.eel: -------------------------------------------------------------------------------- 1 | desc: CentreCut 2 | 3 | @init 4 | fftsize = 4096; 5 | bufpos = idx = 0; 6 | stftIndexLeft = 0; 7 | stftIndexRight = 20; 8 | memreq = stftCheckMemoryRequirement(stftIndexLeft, fftsize, 4, 1.8); 9 | memreq = stftCheckMemoryRequirement(stftIndexRight, fftsize, 4, 1.8); 10 | stftStructLeft = 40; 11 | stftStructRight = stftStructLeft + memreq; 12 | requiredSamples = stftInit(stftIndexLeft, stftStructLeft); 13 | requiredSamples = stftInit(stftIndexRight, stftStructRight); 14 | inBufLeft = stftStructRight + memreq + 2; // Pointer to memory 15 | outBufLeft = inBufLeft + fftsize + 2; // Pointer to memory plus safe zone 16 | inBufRight = outBufLeft + fftsize + 2; // ... 17 | outBufRight = inBufRight + fftsize + 2; // ... 18 | 19 | @sample 20 | inBufLeft[bufpos] = spl0; 21 | spl0 = outBufLeft[bufpos]; 22 | inBufRight[bufpos] = spl1; 23 | spl1 = outBufRight[bufpos]; 24 | bufpos += 1; 25 | bufpos >= requiredSamples ? 26 | ( 27 | cplexLen1 = stftForward(inBufLeft, stftIndexLeft, stftStructLeft, 1); 28 | cplexLen2 = stftForward(inBufRight, stftIndexRight, stftStructRight, 1); 29 | idx=0; 30 | 31 | loop(cplexLen1 / 2, 32 | sumR = inBufLeft[idx] + inBufRight[idx]; 33 | sumI = inBufLeft[idx + 1] + inBufRight[idx + 1]; 34 | diffR = inBufLeft[idx] - inBufRight[idx]; 35 | diffI = inBufLeft[idx + 1] - inBufRight[idx + 1]; 36 | sumSq = sumR*sumR + sumI*sumI; 37 | diffSq = diffR*diffR + diffI*diffI; 38 | alpha = 0.0; 39 | sumSq > $EPS ? (alpha = 0.5 - sqrt(diffSq / sumSq) * 0.5;); 40 | cR = sumR * alpha; 41 | cI = sumI * alpha; 42 | inBufLeft[idx] = inBufLeft[idx] - cR; 43 | inBufLeft[idx + 1] = inBufLeft[idx + 1] - cI; 44 | inBufRight[idx] = inBufRight[idx] - cR; 45 | inBufRight[idx + 1] = inBufRight[idx + 1] - cI; 46 | idx+=2); 47 | error = stftBackward(inBufLeft, stftIndexLeft, stftStructLeft, 1); 48 | error = stftBackward(inBufRight, stftIndexRight, stftStructRight, 1); 49 | idx = 0; 50 | loop(requiredSamples, 51 | outBufLeft[idx] = inBufLeft[idx]; 52 | outBufRight[idx] = inBufRight[idx]; 53 | idx+=1); 54 | bufpos = 0; 55 | ); 56 | -------------------------------------------------------------------------------- /common/files/JamesDSP/liveprog/stftPitchShifter.eel: -------------------------------------------------------------------------------- 1 | desc: Pitch shifter 2 | pitch_scaling_ratio:1.2<0.1,2,0.01>Which preset we use 3 | 4 | @init 5 | fftLen = 2048; 6 | halfLen = fftLen / 2 + 1; 7 | ovp = 4; 8 | ovpLen = fftLen / ovp; 9 | bufpos = 0; 10 | memReqStftStruct = stftStructSize(); 11 | stftIndexLeft = 0; 12 | stftIndexRight = stftIndexLeft + memReqStftStruct; 13 | memreq = stftCheckMemoryRequirement(stftIndexLeft, fftLen, ovp, 1); 14 | memreq = stftCheckMemoryRequirement(stftIndexRight, fftLen, ovp, 1); 15 | stftStructLeft = stftIndexRight + memReqStftStruct; 16 | stftStructRight = stftStructLeft + memreq; 17 | requiredSamples = stftInit(stftIndexLeft, stftStructLeft); 18 | requiredSamples = stftInit(stftIndexRight, stftStructRight); 19 | dcReImSmps = 2; 20 | inBufLeft = stftStructRight + memreq; // Pointer to memory 21 | inBufRight = inBufLeft + fftLen + dcReImSmps; 22 | outBuf1Left = inBufRight + fftLen + dcReImSmps; 23 | outBuf1Right = outBuf1Left + fftLen + dcReImSmps; 24 | magSpec = outBuf1Right + fftLen + dcReImSmps; // halfLen + 4 25 | accumulated_rotation_anglesL = magSpec + (halfLen + 4); // halfLen 26 | accumulated_rotation_anglesR = accumulated_rotation_anglesL + halfLen; // halfLen 27 | peaks = accumulated_rotation_anglesR + halfLen; // halfLen 28 | inflRegionStart = peaks + halfLen; // halfLen 29 | inflRegionEnd = inflRegionStart + halfLen; // halfLen 30 | outBufLeft = inflRegionEnd + halfLen; // fftLen 31 | outBufRight = outBufLeft + fftLen; // fftLen 32 | reciFrameLen = 1 / fftLen; 33 | M_RECI2PI = 1.0 / $2PI; 34 | pitch_scaling_ratio = 1.2; // Pitch multiplier, 0.1 - 2.0 35 | 36 | @sample 37 | inBufLeft[bufpos] = spl0; 38 | spl0 = outBufLeft[bufpos]; 39 | inBufRight[bufpos] = spl1; 40 | spl1 = outBufRight[bufpos]; 41 | bufpos += 1; 42 | bufpos >= requiredSamples ? 43 | ( 44 | arrayLen = stftForward(inBufLeft, stftIndexLeft, stftStructLeft, 1); 45 | arrayLen = stftForward(inBufRight, stftIndexRight, stftStructRight, 1); 46 | magSpec[0] = 0; 47 | magSpec[1] = 0; 48 | magSpec[halfLen] = 0; 49 | magSpec[halfLen + 1] = 0; 50 | i=0;loop(halfLen, magSpec[(i >> 1) + 2] = (hypot(inBufLeft[i], inBufLeft[i + 1]) + hypot(inBufRight[i], inBufRight[i + 1])) * 0.5;i+=2); 51 | //i=0;loop(halfLen + 4, printf("%d %f\n", i, magSpec[i]);i+=1); 52 | nPeaks = 0; 53 | i=0; 54 | loop(halfLen, 55 | cond = (magSpec[i + 4] < magSpec[i + 2]) && (magSpec[i + 3] < magSpec[i + 2]) && (magSpec[i + 1] < magSpec[i + 2]) && (magSpec[i] < magSpec[i + 2]); 56 | cond == 1 ? ( 57 | peaks[nPeaks] = i; 58 | nPeaks = nPeaks + 1; 59 | ); 60 | i+=1); 61 | //printf("%d\n", nPeaks); 62 | //j=0;loop(nPeaks, printf("%d\n", peaks[j]);j+=1); 63 | //breakpoint(); 64 | nPeaks > 1 ? ( 65 | inflRegionStart[0] = 0; 66 | i=1; 67 | loop(nPeaks, 68 | res = peaks[i] + peaks[i - 1]; 69 | divisionTest = floor(res * 0.5); 70 | inflRegionStart[i] = ((divisionTest * 2) != res) ? divisionTest + 1 : divisionTest; 71 | inflRegionEnd[i - 1] = inflRegionStart[i]; 72 | i+=1); 73 | inflRegionEnd[nPeaks - 1] = nPeaks; 74 | //j=0;loop(nPeaks, printf("%d %d %d\n", peaks[j] + 1, inflRegionStart[j] + 1, inflRegionEnd[j]);j+=1); 75 | ); 76 | //breakpoint(); 77 | memset(outBuf1Left, 0, fftLen + dcReImSmps); 78 | memset(outBuf1Right, 0, fftLen + dcReImSmps); 79 | u=0; 80 | loop(nPeaks, 81 | p1 = peaks[u] + 1; 82 | new_bin = pitch_scaling_ratio * p1; 83 | // Compute the rotation angle required, which has to be cumulated from frame to frame 84 | piInc = $2PI * ovpLen * (new_bin - p1) * reciFrameLen; 85 | rotation_anglesL = accumulated_rotation_anglesL[peaks[u]] + piInc; 86 | rotCplxReL = cos(rotation_anglesL); 87 | rotCplxImL = sin(rotation_anglesL); 88 | rotation_anglesR = accumulated_rotation_anglesR[peaks[u]] + piInc; 89 | rotCplxReR = cos(rotation_anglesR); 90 | rotCplxImR = sin(rotation_anglesR); 91 | // Overlap-add the bins around the peak, changing the phases accordingly 92 | tp = new_bin - p1; 93 | forCnt = inflRegionEnd[u] - inflRegionStart[u]; 94 | i = inflRegionStart[u]; 95 | //printf("%d %f %f %f %f %f %d %d\n", p1, new_bin, rotation_anglesL, rotCplxReL, rotCplxImL, tp, forCnt, i); 96 | //breakpoint(); 97 | loop(forCnt, 98 | arrayIdx = i << 1; 99 | idx = tp + i; 100 | roundedIdx = floor(idx); 101 | weight1 = idx - roundedIdx; 102 | weight0 = 1.0 - weight1; 103 | (roundedIdx < 0) ? (roundedIdx = 0); 104 | (roundedIdx > (halfLen - 1)) ? (roundedIdx = halfLen - 1); 105 | roundedIdxP1 = roundedIdx + 1; 106 | (roundedIdxP1 < 0) ? (roundedIdxP1 = 0); 107 | (roundedIdxP1 > (halfLen - 1)) ? (roundedIdxP1 = halfLen - 1); 108 | accumulated_rotation_anglesL[i] = rotation_anglesL; 109 | reL = inBufLeft[arrayIdx] * rotCplxReL - inBufLeft[arrayIdx + 1] * rotCplxImL; 110 | imL = inBufLeft[arrayIdx] * rotCplxImL + inBufLeft[arrayIdx + 1] * rotCplxReL; 111 | accumulated_rotation_anglesR[i] = rotation_anglesR; 112 | reR = inBufRight[arrayIdx] * rotCplxReR - inBufRight[arrayIdx + 1] * rotCplxImR; 113 | imR = inBufRight[arrayIdx] * rotCplxImR + inBufRight[arrayIdx + 1] * rotCplxReR; 114 | lidx = roundedIdx << 1; 115 | ridx = roundedIdxP1 << 1; 116 | outBuf1Left[lidx] = outBuf1Left[lidx] + reL * weight0; 117 | outBuf1Left[lidx + 1] = outBuf1Left[lidx + 1] + imL * weight0; 118 | outBuf1Left[ridx] = outBuf1Left[roundedIdxP1 << 1] + reL * weight1; 119 | outBuf1Left[ridx + 1] = outBuf1Left[ridx + 1] + imL * weight1; 120 | outBuf1Right[lidx] = outBuf1Right[lidx] + reR * weight0; 121 | outBuf1Right[lidx + 1] = outBuf1Right[lidx + 1] + imR * weight0; 122 | outBuf1Right[ridx] = outBuf1Right[roundedIdxP1 << 1] + reR * weight1; 123 | outBuf1Right[ridx + 1] = outBuf1Right[ridx + 1] + imR * weight1; 124 | //printf("%f %f %f %f %d %d\n", reL, imL, weight0, weight1, roundedIdx, roundedIdxP1); 125 | i+=1); 126 | //breakpoint(); 127 | u+=1); 128 | i=0; 129 | loop(halfLen, 130 | lambda = accumulated_rotation_anglesL[i] + $PI; 131 | truncate = floor(lambda * M_RECI2PI); 132 | accumulated_rotation_anglesL[i] = lambda - truncate * $2PI - $PI; 133 | lambda = accumulated_rotation_anglesR[i] + $PI; 134 | truncate = floor(lambda * M_RECI2PI); 135 | accumulated_rotation_anglesR[i] = lambda - truncate * $2PI - $PI; 136 | i+=1); 137 | //j=0;loop(halfLen, printf("%f\n", accumulated_rotation_anglesL[j]);j+=1); 138 | //breakpoint(); 139 | error = stftBackward(outBuf1Left, stftIndexLeft, stftStructLeft, 1); 140 | error = stftBackward(outBuf1Right, stftIndexRight, stftStructRight, 1); 141 | i = 0;loop(requiredSamples, outBufLeft[i] = outBuf1Left[i];outBufRight[i] = outBuf1Right[i];i+=1); 142 | bufpos = 0; 143 | ); 144 | -------------------------------------------------------------------------------- /common/files/JamesDSPManager.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/JamesDSPManager.apk -------------------------------------------------------------------------------- /common/files/JamesDSPManagerThePBone.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/JamesDSPManagerThePBone.apk -------------------------------------------------------------------------------- /common/files/arm/libjamesdsp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/arm/libjamesdsp.so -------------------------------------------------------------------------------- /common/files/huawei/libjamesdsp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/huawei/libjamesdsp.so -------------------------------------------------------------------------------- /common/files/x86/libjamesdsp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/common/files/x86/libjamesdsp.so -------------------------------------------------------------------------------- /common/functions.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | # 3 | # MMT Extended Utility Functions 4 | # 5 | ########################################################################################## 6 | 7 | require_new_ksu() { 8 | ui_print "**********************************" 9 | ui_print " Please install KernelSU v0.6.6+! " 10 | ui_print "**********************************" 11 | exit 1 12 | } 13 | 14 | umount_mirrors() { 15 | [ -d $ORIGDIR ] || return 0 16 | for i in $ORIGDIR/*; do 17 | umount -l $i 2>/dev/null 18 | done 19 | rm -rf $ORIGDIR 2>/dev/null 20 | $KSU && mount -o ro,remount $MAGISKTMP 21 | } 22 | 23 | cleanup() { 24 | if $KSU || [ $MAGISK_VER_CODE -ge 27000 ]; then umount_mirrors; fi 25 | rm -rf $MODPATH/common $MODPATH/install.zip 2>/dev/null 26 | } 27 | 28 | abort() { 29 | ui_print "$1" 30 | rm -rf $MODPATH 2>/dev/null 31 | cleanup 32 | rm -rf $TMPDIR 2>/dev/null 33 | exit 1 34 | } 35 | 36 | device_check() { 37 | local opt=`getopt -o dm -- "$@"` type=device 38 | eval set -- "$opt" 39 | while true; do 40 | case "$1" in 41 | -d) local type=device; shift;; 42 | -m) local type=manufacturer; shift;; 43 | --) shift; break;; 44 | *) abort "Invalid device_check argument $1! Aborting!";; 45 | esac 46 | done 47 | local prop=$(echo "$1" | tr '[:upper:]' '[:lower:]') 48 | for i in /system /vendor /odm /product; do 49 | if [ -f $i/build.prop ]; then 50 | for j in "ro.product.$type" "ro.build.$type" "ro.product.vendor.$type" "ro.vendor.product.$type"; do 51 | [ "$(sed -n "s/^$j=//p" $i/build.prop 2>/dev/null | head -n 1 | tr '[:upper:]' '[:lower:]')" == "$prop" ] && return 0 52 | done 53 | [ "$type" == "device" ] && [ "$(sed -n "s/^"ro.build.product"=//p" $i/build.prop 2>/dev/null | head -n 1 | tr '[:upper:]' '[:lower:]')" == "$prop" ] && return 0 54 | fi 55 | done 56 | return 1 57 | } 58 | 59 | cp_ch() { 60 | local opt=`getopt -o nr -- "$@"` BAK=true UBAK=true FOL=false 61 | eval set -- "$opt" 62 | while true; do 63 | case "$1" in 64 | -n) UBAK=false; shift;; 65 | -r) FOL=true; shift;; 66 | --) shift; break;; 67 | *) abort "Invalid cp_ch argument $1! Aborting!";; 68 | esac 69 | done 70 | local SRC="$1" DEST="$2" OFILES="$1" 71 | $FOL && local OFILES=$(find $SRC -type f 2>/dev/null) 72 | [ -z $3 ] && PERM=0644 || PERM=$3 73 | case "$DEST" in 74 | $TMPDIR/*|$MODULEROOT/*|$NVBASE/modules/$MODID/*) BAK=false;; 75 | esac 76 | for OFILE in ${OFILES}; do 77 | if $FOL; then 78 | if [ "$(basename $SRC)" == "$(basename $DEST)" ]; then 79 | local FILE=$(echo $OFILE | sed "s|$SRC|$DEST|") 80 | else 81 | local FILE=$(echo $OFILE | sed "s|$SRC|$DEST/$(basename $SRC)|") 82 | fi 83 | else 84 | [ -d "$DEST" ] && local FILE="$DEST/$(basename $SRC)" || local FILE="$DEST" 85 | fi 86 | if $BAK && $UBAK; then 87 | [ ! "$(grep "$FILE$" $INFO 2>/dev/null)" ] && echo "$FILE" >> $INFO 88 | [ -f "$FILE" -a ! -f "$FILE~" ] && { mv -f $FILE $FILE~; echo "$FILE~" >> $INFO; } 89 | elif $BAK; then 90 | [ ! "$(grep "$FILE$" $INFO 2>/dev/null)" ] && echo "$FILE" >> $INFO 91 | fi 92 | install -D -m $PERM "$OFILE" "$FILE" 93 | done 94 | } 95 | 96 | install_script() { 97 | case "$1" in 98 | -b) shift; 99 | if $KSU; then 100 | local INPATH=$NVBASE/boot-completed.d 101 | else 102 | local INPATH=$SERVICED 103 | sed -i -e '1i (\nwhile [ "$(getprop sys.boot_completed)" != "1" ]; do\n sleep 1\ndone\nsleep 3\n' -e '$a)&' $1 104 | fi;; 105 | -l) shift; local INPATH=$SERVICED;; 106 | -p) shift; local INPATH=$POSTFSDATAD;; 107 | *) local INPATH=$SERVICED;; 108 | esac 109 | [ "$(grep "#!/system/bin/sh" $1)" ] || sed -i "1i #!/system/bin/sh" $1 110 | local i; for i in "MODPATH" "LIBDIR" "MODID" "INFO" "MODDIR"; do 111 | case $i in 112 | "MODPATH") sed -i "1a $i=$NVBASE/modules/$MODID" $1;; 113 | "MODDIR") sed -i "1a $i=\${0%/*}" $1;; 114 | *) sed -i "1a $i=$(eval echo \$$i)" $1;; 115 | esac 116 | done 117 | case $1 in 118 | "$MODPATH/post-fs-data.sh"|"$MODPATH/service.sh"|"$MODPATH/uninstall.sh") sed -i "s|^MODPATH=.*|MODPATH=\$MODDIR|" $1;; # MODPATH=MODDIR for these scripts (located in module directory) 119 | "$MODPATH/boot-completed.sh") $KSU && sed -i "s|^MODPATH=.*|MODPATH=\$MODDIR|" $1 || { cp_ch -n $1 $INPATH/$MODID-$(basename $1) 0755; rm -f $MODPATH/boot-completed.sh; };; 120 | *) cp_ch -n $1 $INPATH/$(basename $1) 0755;; 121 | esac 122 | } 123 | 124 | prop_process() { 125 | sed -i -e "/^#/d" -e "/^ *$/d" $1 126 | [ -f $MODPATH/system.prop ] || mktouch $MODPATH/system.prop 127 | while read LINE; do 128 | echo "$LINE" >> $MODPATH/system.prop 129 | done < $1 130 | } 131 | 132 | mount_mirrors() { 133 | $KSU && mount -o rw,remount $MAGISKTMP 134 | mkdir -p $ORIGDIR/system 135 | if $SYSTEM_ROOT; then 136 | mkdir -p $ORIGDIR/system_root 137 | mount -o ro / $ORIGDIR/system_root 138 | mount -o bind $ORIGDIR/system_root/system $ORIGDIR/system 139 | else 140 | mount -o ro /system $ORIGDIR/system 141 | fi 142 | for i in /vendor $PARTITIONS; do 143 | [ ! -d $i -o -d $ORIGDIR$i ] && continue 144 | mkdir -p $ORIGDIR$i 145 | mount -o ro $i $ORIGDIR$i 146 | done 147 | } 148 | 149 | # Credits 150 | ui_print "**************************************" 151 | ui_print "* MMT Extended by Zackptg5 @ XDA *" 152 | ui_print "**************************************" 153 | ui_print " " 154 | 155 | # Check for min/max api version 156 | [ -z $MINAPI ] || { [ $API -lt $MINAPI ] && abort "! Your system API of $API is less than the minimum api of $MINAPI! Aborting!"; } 157 | [ -z $MAXAPI ] || { [ $API -gt $MAXAPI ] && abort "! Your system API of $API is greater than the maximum api of $MAXAPI! Aborting!"; } 158 | 159 | # Min KSU v0.6.6 160 | [ -z $KSU ] && KSU=false 161 | $KSU && { [ $KSU_VER_CODE -lt 11184 ] && require_new_ksu; } 162 | # APatch is fork of KSU, treat same 163 | [ -z $APATCH ] && APATCH=false 164 | [ "$APATCH" == "true" ] && KSU=true 165 | 166 | # Start debug 167 | set -x 168 | 169 | # Set variables 170 | [ -z $ARCH32 ] && ARCH32="$(echo $ABI32 | cut -c-3)" 171 | [ $API -lt 26 ] && DYNLIB=false 172 | [ -z $DYNLIB ] && DYNLIB=false 173 | [ -z $PARTOVER ] && PARTOVER=false 174 | [ -z $SYSTEM_ROOT ] && SYSTEM_ROOT=$SYSTEM_AS_ROOT # renamed in magisk v26.3 175 | [ -z $SERVICED ] && SERVICED=$NVBASE/service.d # removed in magisk v26.2 176 | [ -z $POSTFSDATAD ] && POSTFSDATAD=$NVBASE/post-fs-data.d # removed in magisk v26.2 177 | INFO=$NVBASE/modules/.$MODID-files 178 | if $KSU; then 179 | MAGISKTMP="/mnt" 180 | ORIGDIR="$MAGISKTMP/mirror" 181 | mount_mirrors 182 | elif [ "$(magisk --path 2>/dev/null)" ]; then 183 | if [ $MAGISK_VER_CODE -ge 27000 ]; then # Atomic Mount 184 | if [ -z $MAGISKTMP ]; then 185 | [ -d /sbin ] && MAGISKTMP=/sbin || MAGISKTMP=/debug_ramdisk 186 | fi 187 | ORIGDIR="$MAGISKTMP/mirror" 188 | mount_mirrors 189 | else 190 | ORIGDIR="$(magisk --path 2>/dev/null)/.magisk/mirror" 191 | fi 192 | elif [ "$(echo $MAGISKTMP | awk -F/ '{ print $NF}')" == ".magisk" ]; then 193 | ORIGDIR="$MAGISKTMP/mirror" 194 | else 195 | ORIGDIR="$MAGISKTMP/.magisk/mirror" 196 | fi 197 | if $DYNLIB; then 198 | LIBPATCH="\/vendor" 199 | LIBDIR=/system/vendor 200 | else 201 | LIBPATCH="\/system" 202 | LIBDIR=/system 203 | fi 204 | # Detect extra partition compatibility (KernelSU or Magisk Delta/Kitsune) 205 | EXTRAPART=false 206 | if $KSU || [ "$(echo $MAGISK_VER | awk -F- '{ print $NF}')" == "delta" ] || [ "$(echo $MAGISK_VER | awk -F- '{ print $NF}')" == "kitsune" ]; then 207 | EXTRAPART=true 208 | elif ! $PARTOVER; then 209 | unset PARTITIONS 210 | fi 211 | 212 | if ! $BOOTMODE; then 213 | ui_print "- Only uninstall is supported in recovery" 214 | ui_print " Uninstalling!" 215 | touch $MODPATH/remove 216 | [ -s $INFO ] && install_script $MODPATH/uninstall.sh || rm -f $INFO $MODPATH/uninstall.sh 217 | recovery_cleanup 218 | cleanup 219 | rm -rf $NVBASE/modules_update/$MODID $TMPDIR 2>/dev/null 220 | exit 0 221 | fi 222 | 223 | # Extract files 224 | ui_print "- Extracting module files" 225 | unzip -o "$ZIPFILE" -x 'META-INF/*' 'common/functions.sh' -d $MODPATH >&2 226 | [ -f "$MODPATH/common/addon.tar.xz" ] && tar -xf $MODPATH/common/addon.tar.xz -C $MODPATH/common 2>/dev/null 227 | 228 | # Run addons 229 | if [ "$(ls -A $MODPATH/common/addon/*/install.sh 2>/dev/null)" ]; then 230 | ui_print " "; ui_print "- Running Addons -" 231 | for i in $MODPATH/common/addon/*/install.sh; do 232 | ui_print " Running $(echo $i | sed -r "s|$MODPATH/common/addon/(.*)/install.sh|\1|")..." 233 | . $i 234 | done 235 | fi 236 | 237 | # Remove files outside of module directory 238 | ui_print "- Removing old files" 239 | 240 | if [ -f $INFO ]; then 241 | while read LINE; do 242 | if [ "$(echo -n $LINE | tail -c 1)" == "~" ]; then 243 | continue 244 | elif [ -f "$LINE~" ]; then 245 | mv -f $LINE~ $LINE 246 | else 247 | rm -f $LINE 248 | while true; do 249 | LINE=$(dirname $LINE) 250 | [ "$(ls -A $LINE 2>/dev/null)" ] && break 1 || rm -rf $LINE 251 | done 252 | fi 253 | done < $INFO 254 | rm -f $INFO 255 | fi 256 | 257 | ### Install 258 | ui_print "- Installing" 259 | 260 | [ -f "$MODPATH/common/install.sh" ] && . $MODPATH/common/install.sh 261 | 262 | ui_print " Installing for $ARCH SDK $API device..." 263 | # Remove comments from files and place them, add blank line to end if not already present 264 | for i in $(find $MODPATH -type f -name "*.sh" -o -name "*.prop" -o -name "*.rule"); do 265 | [ -f $i ] && { sed -i -e "/^#/d" -e "/^ *$/d" $i; [ "$(tail -1 $i)" ] && echo "" >> $i; } || continue 266 | case $i in 267 | "$MODPATH/boot-completed.sh") install_script -b $i;; 268 | "$MODPATH/service.sh") install_script -l $i;; 269 | "$MODPATH/post-fs-data.sh") install_script -p $i;; 270 | "$MODPATH/uninstall.sh") if [ -s $INFO ] || [ "$(head -n1 $MODPATH/uninstall.sh)" != "# Don't modify anything after this" ]; then 271 | cp -f $MODPATH/uninstall.sh $MODPATH/$MODID-uninstall.sh # Fallback script in case module manually deleted 272 | sed -i "1i[ -d \"\$MODPATH\" ] && exit 0" $MODPATH/$MODID-uninstall.sh 273 | echo 'rm -f $0' >> $MODPATH/$MODID-uninstall.sh 274 | install_script -l $MODPATH/$MODID-uninstall.sh 275 | rm -f $MODPATH/$MODID-uninstall.sh 276 | install_script $MODPATH/uninstall.sh 277 | else 278 | rm -f $INFO $MODPATH/uninstall.sh 279 | fi;; 280 | esac 281 | done 282 | 283 | $IS64BIT || for i in $(find $MODPATH/system -type d -name "lib64"); do rm -rf $i 2>/dev/null; done 284 | [ -d "/system/priv-app" ] || mv -f $MODPATH/system/priv-app $MODPATH/system/app 2>/dev/null 285 | [ -d "/system/xbin" ] || mv -f $MODPATH/system/xbin $MODPATH/system/bin 2>/dev/null 286 | if $DYNLIB; then 287 | for FILE in $(find $MODPATH/system/lib* -type f 2>/dev/null | sed "s|$MODPATH/system/||"); do 288 | [ -s $MODPATH/system/$FILE ] || continue 289 | case $FILE in 290 | lib*/modules/*) continue;; 291 | esac 292 | mkdir -p $(dirname $MODPATH/system/vendor/$FILE) 293 | mv -f $MODPATH/system/$FILE $MODPATH/system/vendor/$FILE 294 | [ "$(ls -A `dirname $MODPATH/system/$FILE`)" ] || rm -rf `dirname $MODPATH/system/$FILE` 295 | done 296 | # Delete empty lib folders (busybox find doesn't have this capability) 297 | toybox find $MODPATH/system/lib* -type d -empty -delete >/dev/null 2>&1 298 | fi 299 | 300 | # Set permissions 301 | ui_print " " 302 | ui_print "- Setting Permissions" 303 | set_perm_recursive $MODPATH 0 0 0755 0644 304 | for i in /system/vendor /vendor /system/vendor/app /vendor/app /system/vendor/etc /vendor/etc /system/odm/etc /odm/etc /system/vendor/odm/etc /vendor/odm/etc /system/vendor/overlay /vendor/overlay; do 305 | if [ -d "$MODPATH$i" ] && [ ! -L "$MODPATH$i" ]; then 306 | case $i in 307 | *"/vendor") set_perm_recursive $MODPATH$i 0 0 0755 0644 u:object_r:vendor_file:s0;; 308 | *"/app") set_perm_recursive $MODPATH$i 0 0 0755 0644 u:object_r:vendor_app_file:s0;; 309 | *"/overlay") set_perm_recursive $MODPATH$i 0 0 0755 0644 u:object_r:vendor_overlay_file:s0;; 310 | *"/etc") set_perm_recursive $MODPATH$i 0 2000 0755 0644 u:object_r:vendor_configs_file:s0;; 311 | esac 312 | fi 313 | done 314 | for i in $(find $MODPATH/system/vendor $MODPATH/vendor -type f -name *".apk" 2>/dev/null); do 315 | chcon u:object_r:vendor_app_file:s0 $i 316 | done 317 | set_permissions 318 | 319 | # Complete install 320 | cleanup 321 | -------------------------------------------------------------------------------- /common/install.sh: -------------------------------------------------------------------------------- 1 | osp_detect() { 2 | case $1 in 3 | *.conf) SPACES=$(sed -n "/^output_session_processing {/,/^}/ {/^ *music {/p}" $1 | sed -r "s/( *).*/\1/") 4 | EFFECTS=$(sed -n "/^output_session_processing {/,/^}/ {/^$SPACES\music {/,/^$SPACES}/p}" $1 | grep -E "^$SPACES +[A-Za-z]+" | sed -r "s/( *.*) .*/\1/g") 5 | for EFFECT in ${EFFECTS}; do 6 | SPACES=$(sed -n "/^effects {/,/^}/ {/^ *$EFFECT {/p}" $1 | sed -r "s/( *).*/\1/") 7 | [ "$EFFECT" != "atmos" ] && sed -i "/^effects {/,/^}/ {/^$SPACES$EFFECT {/,/^$SPACES}/ s/^/#/g}" $1 8 | done;; 9 | *.xml) EFFECTS=$(sed -n "/^ *$/,/^ *<\/postprocess>$/ {/^ *$/,/^ *<\/stream>$/ {//d; /<\/stream>/d; s///g; p}}" $1) 10 | for EFFECT in ${EFFECTS}; do 11 | [ "$EFFECT" != "atmos" ] && sed -ri "/^( *)/d" $1 12 | done;; 13 | esac 14 | } 15 | 16 | uninstall_app() { 17 | local FILE=".apk$1" VER=$2 18 | [ -z $INSVER ] && return 0 19 | if [ -f $NVBASE/modules/$MODID/$FILE ]; then 20 | [ $INSVER -lt $VER ] && pm uninstall -k james.dsp 21 | else 22 | pm uninstall james.dsp 23 | fi 24 | } 25 | 26 | # Tell user aml is needed if applicable 27 | FILES=$(find $NVBASE/modules/*/system $MODULEROOT/*/system -type f -name "*audio_effects*.conf" -o -name "*audio_effects*.xml" 2>/dev/null | sed "/$MODID/d") 28 | if [ ! -z "$FILES" ] && [ ! "$(echo $FILES | grep '/aml/')" ]; then 29 | ui_print " " 30 | ui_print " ! Conflicting audio mod found!" 31 | ui_print " ! You will need to install !" 32 | ui_print " ! Audio Modification Library !" 33 | sleep 3 34 | fi 35 | 36 | #Lib detection 37 | LIB=$(dumpsys media.audio_flinger | grep -E 'lib|lib64' | awk -F '/' 'NR==1{print $3}') 38 | ui_print " " 39 | ui_print "- Lib bit detection -" 40 | if [ $LIB == "lib64" ]; then 41 | QARCH="huawei" 42 | ui_print " 64 bit audio libs detected " 43 | cp_ch $MODPATH/common/files/$QARCH/libjamesdsp.so $MODPATH/system/lib64/soundfx/libjamesdsp.so 44 | elif [ $LIB == "lib" ]; then 45 | QARCH=$ARCH32 46 | ui_print " 32 bit audio libs detected " 47 | else 48 | ui_print " Unable to detect audio lib bit... " 49 | ui_print " Is this a device with 64bit only audio libs (like huawei)?" 50 | ui_print " If unsure, select 'No'" 51 | ui_print " Vol Up = Yes, Vol Down = No" 52 | if chooseport; then 53 | QARCH="huawei" 54 | cp_ch $MODPATH/common/files/$QARCH/libjamesdsp.so $MODPATH/system/lib64/soundfx/libjamesdsp.so 55 | ui_print " 64 bit libs selected" 56 | else 57 | QARCH=$ARCH32 58 | ui_print " 32 bit libs selected" 59 | fi 60 | fi 61 | cp_ch $MODPATH/common/files/$QARCH/libjamesdsp.so $MODPATH/system/lib/soundfx/libjamesdsp.so 62 | 63 | # App only works when installed normally to data in oreo+ 64 | INSVER=$(pm list packages -3 --show-versioncode | grep james.dsp | sed 's/.*versionCode://') 65 | 66 | ui_print " " 67 | ui_print "- UI installation -" 68 | ui_print " Which UI you want to install?" 69 | ui_print " Vol Up = Original, Vol Down = ThePBone" 70 | if chooseport; then 71 | ui_print " Original version was selected" 72 | mv -f $MODPATH/common/files/JamesDSPManager.apk $MODPATH/JamesDSPManager.apk 73 | touch $MODPATH/.apkorig 74 | uninstall_app "orig" $APPVER 75 | else 76 | ui_print " ThePBone version was selected" 77 | mv -f $MODPATH/common/files/JamesDSPManagerThePBone.apk $MODPATH/JamesDSPManager.apk 78 | touch $MODPATH/.apkpbone 79 | uninstall_app "pbone" $PAPPVER 80 | fi 81 | 82 | ui_print " " 83 | ui_print " Patching existing audio_effects files..." 84 | PARTITIONS="/system /vendor $PARTITIONS" 85 | CFGS="$(find $PARTITIONS -type f -name "*audio_effects*.conf" -o -name "*audio_effects*.xml")" 86 | for OFILE in ${CFGS}; do 87 | FILE="$MODPATH$(echo $OFILE | sed "s|^/vendor|/system/vendor|g")" 88 | $KSU || FILE="$(echo $FILE | sed "s|$MODPATH/odm|$MODPATH/system/odm|g")" 89 | cp_ch -n $ORIGDIR$OFILE $FILE 90 | osp_detect $FILE 91 | case $FILE in 92 | *.conf) sed -i "/jamesdsp {/,/}/d" $FILE 93 | sed -i "/jdsp {/,/}/d" $FILE 94 | sed -i "s/^effects {/effects {\n jamesdsp {\n library jdsp\n uuid f27317f4-c984-4de6-9a90-545759495bf2\n }/g" $FILE 95 | sed -i "s/^libraries {/libraries {\n jdsp {\n path $LIBPATCH\/lib\/soundfx\/libjamesdsp.so\n }/g" $FILE;; 96 | *.xml) sed -i "/jamesdsp/d" $FILE 97 | sed -i "/jdsp/d" $FILE 98 | sed -i "// a\ " $FILE 99 | sed -i "// a\ " $FILE;; 100 | esac 101 | done 102 | # Kitsune has extra partitions in different location 103 | if [ "$(echo $MAGISK_VER | awk -F- '{ print $NF}')" == "kitsune" ]; then 104 | mkdir $MODPATH/root 105 | for PART in $PARTITIONS; do 106 | mv -f $MODPATH/system$PART $MODPATH/root 107 | done 108 | fi 109 | 110 | # ODM support for regular magisk 111 | if $EXTRAPART || [ ! -d $MODPATH/system/odm ]; then 112 | rm -f $MODPATH/service.sh 113 | else 114 | sed -i "1a NVBASE=$NVBASE" $MODPATH/service.sh 115 | fi 116 | 117 | ui_print " Copying apk to /sdcard. Install manually if not present on reboot" 118 | cp -rf $MODPATH/common/files/JamesDSP /storage/emulated/0/JamesDSP 119 | cp -f $MODPATH/JamesDSPManager.apk /storage/emulated/0/JamesDSPManager.apk 120 | [ $API -gt 29 ] && { ui_print " Enabling hidden api policy"; settings put global hidden_api_policy 1 2>/dev/null; } 121 | -------------------------------------------------------------------------------- /customize.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | # 3 | # MMT Extended Config Script 4 | # 5 | ########################################################################################## 6 | 7 | ########################################################################################## 8 | # Config Flags 9 | ########################################################################################## 10 | 11 | # Uncomment and change 'MINAPI' and 'MAXAPI' to the minimum and maximum android version for your mod 12 | # Uncomment DYNLIB if you want libs installed to vendor for oreo+ and system for anything older 13 | # Uncomment PARTOVER if you have a workaround in place for extra partitions in regular magisk install (can mount them yourself - you will need to do this each boot as well). If unsure, keep commented 14 | # Uncomment PARTITIONS and list additional partitions you will be modifying (other than system and vendor), for example: PARTITIONS="/odm /product /system_ext" 15 | MINAPI=21 16 | #MAXAPI=25 17 | DYNLIB=true 18 | PARTOVER=true 19 | PARTITIONS="/odm" 20 | APPVER=91 21 | PAPPVER=43 22 | 23 | ########################################################################################## 24 | # Replace list 25 | ########################################################################################## 26 | 27 | # List all directories you want to directly replace in the system 28 | # Check the documentations for more info why you would need this 29 | 30 | # Construct your list in the following format 31 | # This is an example 32 | REPLACE_EXAMPLE=" 33 | /system/app/Youtube 34 | /system/priv-app/SystemUI 35 | /system/priv-app/Settings 36 | /system/framework 37 | " 38 | 39 | # Construct your own list here 40 | REPLACE=" 41 | " 42 | 43 | ########################################################################################## 44 | # Permissions 45 | ########################################################################################## 46 | 47 | set_permissions() { 48 | : # Remove this if adding to this function 49 | 50 | # Note that all files/folders in magisk module directory have the $MODPATH prefix - keep this prefix on all of your files/folders 51 | # Some examples: 52 | 53 | # For directories (includes files in them): 54 | # set_perm_recursive (default: u:object_r:system_file:s0) 55 | 56 | # set_perm_recursive $MODPATH/system/lib 0 0 0755 0644 57 | # set_perm_recursive $MODPATH/system/vendor/lib/soundfx 0 0 0755 0644 58 | 59 | # For files (not in directories taken care of above) 60 | # set_perm (default: u:object_r:system_file:s0) 61 | 62 | # set_perm $MODPATH/system/lib/libart.so 0 0 0644 63 | # set_perm /data/local/tmp/file.txt 0 0 644 64 | } 65 | 66 | ########################################################################################## 67 | # MMT Extended Logic - Don't modify anything after this 68 | ########################################################################################## 69 | 70 | SKIPUNZIP=1 71 | unzip -qjo "$ZIPFILE" 'common/functions.sh' -d $TMPDIR >&2 72 | . $TMPDIR/functions.sh 73 | -------------------------------------------------------------------------------- /install.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/67466d13b78d547ffcda067a73e0486413380633/install.zip -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=ainur_jamesdsp 2 | name=JamesDSP Manager 3 | version=v6.1 (11-27-2023/11-24-2023) 4 | versionCode=100 5 | author=james34602, zackptg5, ahrion 6 | description=JamesDSPManager is a reformed audio engine based of AOSP and OmniROM DSPManager source code with enhanced features and tuning 7 | support=https://forum.xda-developers.com/android/apps-games/app-reformed-dsp-manager-t3607970 8 | updateJson=https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/master/update.json 9 | -------------------------------------------------------------------------------- /service.sh: -------------------------------------------------------------------------------- 1 | ( 2 | [ -d $NVBASE/aml/$MODID ] && DIR=$NVBASE/aml/$MODID || DIR=$MODDIR # AML Workaround 3 | 4 | for i in $(find $DIR/system/odm -type f -name "*audio_effects*.conf" -o -name "*audio_effects*.xml"); do 5 | j="$(echo $i | sed "s|$DIR/system||")" 6 | mount -o bind $i $j 7 | done 8 | killall -q audioserver 9 | )& 10 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | # Don't modify anything after this 2 | if [ -f $INFO ]; then 3 | while read LINE; do 4 | if [ "$(echo -n $LINE | tail -c 1)" == "~" ]; then 5 | continue 6 | elif [ -f "$LINE~" ]; then 7 | mv -f $LINE~ $LINE 8 | else 9 | rm -f $LINE 10 | while true; do 11 | LINE=$(dirname $LINE) 12 | [ "$(ls -A $LINE 2>/dev/null)" ] && break 1 || rm -rf $LINE 13 | done 14 | fi 15 | done < $INFO 16 | rm -f $INFO 17 | fi -------------------------------------------------------------------------------- /update.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "v6.0", 3 | "versionCode": 99, 4 | "zipUrl": "https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/master/install.zip", 5 | "changelog": "https://raw.githubusercontent.com/Zackptg5/JamesDSPManager/master/changelog.md" 6 | } --------------------------------------------------------------------------------