-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from jorshi/feat/onset-ui
Onset Detection Parameters on UI
- Loading branch information
Showing
10 changed files
with
117 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"cmake.configureOnOpen": true, | ||
"cmake.cmakePath": "/opt/homebrew/bin/cmake" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
xattr -rc "/Applications/Ableton Live 11 Suite.app" | ||
./scripts/add_debug_entitlements.sh "/Applications/Ableton Live 11 Suite.app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#! /bin/bash | ||
# Simple Utility Script for allowing debug of hardened macOS apps. | ||
# This is useful mostly for plug-in developer that would like keep developing without turning SIP off. | ||
# Credit for idea goes to (McMartin): https://forum.juce.com/t/apple-gatekeeper-notarised-distributables/29952/57?u=ttg | ||
# Update 2022-03-10: Based on Fabian's feedback, add capability to inject DYLD for sanitizers. | ||
# | ||
# Please note: | ||
# - Modern Logic (on M1s) uses `AUHostingService` which resides within the system thus not patchable and REQUIRES to turn-off SIP. | ||
# - Some hosts uses separate plug-in scanning or sandboxing. | ||
# if that's the case, it's required to patch those (if needed) and attach debugger to them instead. | ||
# | ||
# If you see `operation not permitted`, make sure the calling process has Full Disk Access. | ||
# For example Terminal.app is showing and has Full Disk Access under System Preferences -> Privacy & Security | ||
# | ||
app_path=$1 | ||
|
||
if [ -z "$app_path" ]; | ||
then | ||
echo "You need to specify app to re-codesign!" | ||
exit 0 | ||
fi | ||
|
||
# This uses local codesign. so it'll be valid ONLY on the machine you've re-signed with. | ||
entitlements_plist=/tmp/debug_entitlements.plist | ||
echo "Grabbing entitlements from app..." | ||
codesign -d --entitlements - "$app_path" --xml >> $entitlements_plist || { exit 1; } | ||
echo "Patch entitlements (if missing)..." | ||
/usr/libexec/PlistBuddy -c "Add :com.apple.security.cs.disable-library-validation bool true" $entitlements_plist | ||
/usr/libexec/PlistBuddy -c "Add :com.apple.security.cs.allow-unsigned-executable-memory bool true" $entitlements_plist | ||
/usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" $entitlements_plist | ||
# allow custom dyld for sanitizers... | ||
/usr/libexec/PlistBuddy -c "Add :com.apple.security.cs.allow-dyld-environment-variables bool true" $entitlements_plist | ||
echo "Re-applying entitlements (if missing)..." | ||
codesign --force --options runtime --sign - --entitlements $entitlements_plist "$app_path" || { echo "codesign failed!"; } | ||
echo "Removing temporary plist..." | ||
rm $entitlements_plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
# exit on failure | ||
set -e | ||
|
||
rm -rf build | ||
|
||
# Build plugin | ||
cmake -Bbuild -GXcode -DMACOS_RELEASE=ON \ | ||
-DCMAKE_PREFIX_PATH=/Users/jordanm/anaconda3/envs/torchdrum/lib/python3.10/site-packages/torch/share/cmake \ | ||
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE="Manual" \ | ||
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO \ | ||
-DCMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--timestamp" | ||
|
||
cmake --build build --config Release -j12 | ||
|
||
# Copy the release plugin and create a signature | ||
rm -rf SignedPlugins | ||
cp -r build/TorchDrum_artefacts/Release/VST3/ SignedPlugins/ | ||
|
||
# Copy libtorch | ||
mkdir -p SignedPlugins/TorchDrum.vst3/Contents/Frameworks | ||
cp /Users/jordanm/anaconda3/envs/torchdrum/lib/python3.10/site-packages/torch/lib/libtorch.dylib SignedPlugins/TorchDrum.vst3/Contents/Frameworks/ | ||
cp /Users/jordanm/anaconda3/envs/torchdrum/lib/python3.10/site-packages/torch/lib/libtorch_cpu.dylib SignedPlugins/TorchDrum.vst3/Contents/Frameworks/ | ||
cp /Users/jordanm/anaconda3/envs/torchdrum/lib/python3.10/site-packages/torch/lib/libc10.dylib SignedPlugins/TorchDrum.vst3/Contents/Frameworks/ | ||
cp /Users/jordanm/anaconda3/envs/torchdrum/lib/python3.10/site-packages/torch/lib/libtorch_global_deps.dylib SignedPlugins/TorchDrum.vst3/Contents/Frameworks/ | ||
|
||
# Update the links to libtorch | ||
install_name_tool -change @rpath/libtorch.dylib @loader_path/../Frameworks/libtorch.dylib SignedPlugins/TorchDrum.vst3/Contents/MacOS/TorchDrum | ||
install_name_tool -change @rpath/libtorch_cpu.dylib @loader_path/../Frameworks/libtorch_cpu.dylib SignedPlugins/TorchDrum.vst3/Contents/MacOS/TorchDrum | ||
install_name_tool -change @rpath/libc10.dylib @loader_path/../Frameworks/libc10.dylib SignedPlugins/TorchDrum.vst3/Contents/MacOS/TorchDrum | ||
install_name_tool -change @rpath/libtorch_global_deps.dylib @loader_path/../Frameworks/libtorch_global_deps.dylib SignedPlugins/TorchDrum.vst3/Contents/MacOS/TorchDrum | ||
|
||
cd SignedPlugins | ||
codesign --deep --force --options runtime --timestamp -s $APPLE_DEVELOPER_ID -v TorchDrum.vst3 | ||
|
||
codesign --display --verbose TorchDrum.vst3 | ||
codesign -vvv --deep --strict TorchDrum.vst3 | ||
|
||
# Notarization | ||
ditto -c -k --keepParent TorchDrum.vst3 TorchDrum.zip | ||
xcrun notarytool submit TorchDrum.zip --keychain-profile "notarytool-password" --wait | ||
xcrun stapler staple TorchDrum.vst3 | ||
|
||
# Install plugin for testing | ||
sudo rm -rf /Library/Audio/Plug-Ins/VST3/TorchDrum.vst3 | ||
rm -rf ~/Library/Audio/Plug-Ins/VST3/TorchDrum.vst3 | ||
|
||
sudo cp -r TorchDrum.vst3 /Library/Audio/Plug-Ins/VST3/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters