Initial release
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
include(SMTG_AddVST3AuV3)
|
||||
|
||||
if(SMTG_MAC AND SMTG_ENABLE_VSTGUI_SUPPORT)
|
||||
if(XCODE)
|
||||
set(again_mac_app_sources
|
||||
"macOS/Sources/ViewController.m"
|
||||
"macOS/Sources/ViewController.h"
|
||||
"macOS/Sources/AppDelegate.m"
|
||||
"macOS/Sources/AppDelegate.h"
|
||||
"audiounitconfig.h"
|
||||
)
|
||||
|
||||
set(again_ios_app_sources
|
||||
"iOS/Sources/ViewController.m"
|
||||
"iOS/Sources/ViewController.h"
|
||||
"iOS/Sources/AppDelegate.m"
|
||||
"iOS/Sources/AppDelegate.h"
|
||||
"iOS/Sources/main.mm"
|
||||
"audiounitconfig.h"
|
||||
)
|
||||
|
||||
set(again_mac_app_ui_resources
|
||||
"macOS/Resources/Base.lproj/Main.storyboard"
|
||||
"macOS/Resources/again.icns"
|
||||
"Shared/drumLoop.wav"
|
||||
)
|
||||
|
||||
set(again_ios_app_ui_resources
|
||||
"iOS/Resources/Base.lproj/LaunchScreen.storyboard"
|
||||
"iOS/Resources/Base.lproj/Main.storyboard"
|
||||
"iOS/Resources/Assets.xcassets"
|
||||
"Shared/drumLoop.wav"
|
||||
)
|
||||
|
||||
# --------------------------------------------------------------------------------------------------------
|
||||
# macOS target
|
||||
# --------------------------------------------------------------------------------------------------------
|
||||
smtg_add_auv3_app(again_auv3_macos "macOS" "AGain AUV3 macOS" "com.steinberg.sdk.auv3.againmac" audiounitconfig.h "macOS/again.entitlements" "${again_mac_app_sources}" "${again_mac_app_ui_resources}" "macOS/Resources/Info.plist" "Shared/Info.plist" again)
|
||||
|
||||
# --------------------------------------------------------------------------------------------------------
|
||||
# iOS target
|
||||
# --------------------------------------------------------------------------------------------------------
|
||||
if(SMTG_ENABLE_IOS_TARGETS)
|
||||
smtg_add_auv3_app(again_auv3_ios "iOS" "AGain AUV3 iOS" "com.steinberg.sdk.auv3.againios" "audiounitconfig.h" "iOS/again.entitlements" "${again_ios_app_sources}" "${again_ios_app_ui_resources}" "iOS/Resources/Info.plist" "Shared/Info.plist" again_ios)
|
||||
endif(SMTG_ENABLE_IOS_TARGETS)
|
||||
endif(XCODE)
|
||||
endif(SMTG_MAC AND SMTG_ENABLE_VSTGUI_SUPPORT)
|
||||
@@ -0,0 +1,19 @@
|
||||
# AGain AUv3
|
||||
|
||||
## Introduction
|
||||
|
||||
AGain AUv3 is the AUv3 version of the AGain plug-in for macOS and iOS.
|
||||
|
||||
|
||||
> See also: [VST 3 - AudioUnit v3 Wrapper](https://steinbergmedia.github.io/vst3_dev_portal/pages/What+is+the+VST+3+SDK/Wrappers/AUv3+Wrapper.html) and [Online Documentation](https://steinbergmedia.github.io/vst3_dev_portal/pages/What+is+the+VST+3+SDK/Plug-in+Examples.html#again).
|
||||
|
||||
## Getting Started
|
||||
|
||||
This plug-in is part of the VST 3 SDK package. It is created with the VST 3 SDK root project.
|
||||
|
||||
> See the top-level README of the VST 3 SDK: https://github.com/steinbergmedia/vst3sdk.git
|
||||
|
||||
## Getting Help
|
||||
|
||||
* Read through the SDK documentation on the **[VST 3 Developer Portal](https://steinbergmedia.github.io/vst3_dev_portal/pages/index.html)**
|
||||
* Ask some real people in the official **[VST 3 Developer Forum](https://forums.steinberg.net/c/developer/103)**
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>AUv3WrapperExtension</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionAttributes</key>
|
||||
<dict>
|
||||
<key>NSExtensionServiceRoleType</key>
|
||||
<string>NSExtensionServiceRoleTypeEditor</string>
|
||||
<key>AudioComponents</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>description</key>
|
||||
<string>kAUcomponentDescription</string>
|
||||
<key>manufacturer</key>
|
||||
<string>kAUcomponentManufacturer1</string>
|
||||
<key>name</key>
|
||||
<string>kAUcomponentName</string>
|
||||
<key>sandboxSafe</key>
|
||||
<true/>
|
||||
<key>subtype</key>
|
||||
<string>kAUcomponentSubType1</string>
|
||||
<key>tags</key>
|
||||
<array>
|
||||
<string>kAUcomponentTag</string>
|
||||
</array>
|
||||
<key>type</key>
|
||||
<string>kAUcomponentType1</string>
|
||||
<key>version</key>
|
||||
<integer>kAUcomponentVersion</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
<string>com.apple.AudioUnit-UI</string>
|
||||
<key>NSExtensionPrincipalClass</key>
|
||||
<string>AUv3WrapperViewController</string>
|
||||
</dict>
|
||||
<key>SupportedNumChannels</key>
|
||||
<string>kSupportedNumChannels</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,74 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/audiounitconfig.h
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// AUWRAPPER_CHANGE: change all corresponding entries according to your plugin
|
||||
|
||||
// The specific variant of the Audio Unit app extension.
|
||||
// The four possible types and their values are:
|
||||
// Effect (aufx), Generator (augn), Instrument (aumu), and Music Effect (aufm)
|
||||
#define kAUcomponentType 'aufx'
|
||||
#define kAUcomponentType1 aufx
|
||||
|
||||
// A subtype code (unique ID) for the audio unit, such as gav3.
|
||||
// This value must be exactly 4 alphanumeric characters
|
||||
#define kAUcomponentSubType 'gav3'
|
||||
#define kAUcomponentSubType1 gav3
|
||||
|
||||
// A manufacturer code for the audio unit, such as Aaud.
|
||||
// This value must be exactly 4 alphanumeric characters
|
||||
#define kAUcomponentManufacturer 'Stgb'
|
||||
#define kAUcomponentManufacturer1 Stgb
|
||||
|
||||
// A product name for the audio unit
|
||||
#define kAUcomponentDescription AUv3WrapperExtension
|
||||
|
||||
// The full name of the audio unit.
|
||||
// This is derived from the manufacturer and description key values
|
||||
#define kAUcomponentName Steinberg: AGainv3
|
||||
|
||||
// Displayed Tags
|
||||
#define kAUcomponentTag Effects
|
||||
|
||||
// A version number for the Audio Unit app extension (decimal value of hexadecimal representation with zeros between subversions)
|
||||
// Hexadecimal indexes representing: [0] = main version, [1] = 0 = dot, [2] = sub version, [3] = 0 = dot, [4] = sub-sub version,
|
||||
// e.g. 1.0.0 == 0x10000 == 65536, 1.2.3 = 0x10203 = 66051
|
||||
#define kAUcomponentVersion 65536
|
||||
|
||||
// Supported number of channels of your audio unit.
|
||||
// Integer indexes representing: [0] = input count, [1] = output count, [2] = 2nd input count,
|
||||
// [3]=2nd output count, etc.
|
||||
// e.g. 1122 == config1: [mono input, mono output], config2: [stereo input, stereo output]
|
||||
// see channelCapabilities for discussion
|
||||
#define kSupportedNumChannels 1122
|
||||
|
||||
// The preview audio file name.
|
||||
// To add your own custom audio file (for standalone effects), add an audio file to the project (AUv3WrappermacOS and AUv3WrapperiOS targets) and
|
||||
// enter the file name here
|
||||
#define kAudioFileName "drumLoop"
|
||||
|
||||
// The preview audio file format.
|
||||
// To add your own custom audio file (for standalone effects), add an audio file to the project (AUv3WrappermacOS and AUv3WrapperiOS targets) and
|
||||
// enter the file format here
|
||||
#define kAudioFileFormat "wav"
|
||||
|
||||
// componentFlags (leave at 0)
|
||||
#define kAUcomponentFlags 0
|
||||
|
||||
// componentFlagsMask (leave at 0)
|
||||
#define kAUcomponentFlagsMask 0
|
||||
|
||||
// class name for the application delegate
|
||||
#define kAUapplicationDelegateClassName AppDelegate
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="NO" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<development version="7000" identifier="xcode"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="NO" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<development version="7000" identifier="xcode"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="751" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="awX-J2-WjW">
|
||||
<rect key="frame" x="154.5" y="28" width="66" height="33"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="66" id="mxM-10-2ZT"/>
|
||||
<constraint firstAttribute="height" constant="33" id="oes-CK-W5k"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="22"/>
|
||||
<state key="normal" title="Play"/>
|
||||
<connections>
|
||||
<action selector="togglePlay:" destination="BYZ-38-t0r" eventType="touchUpInside" id="L06-Zo-ks1"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="65L-bj-7ja">
|
||||
<rect key="frame" x="0.0" y="69" width="375" height="598"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DO8-U6-Fin">
|
||||
<rect key="frame" x="16" y="20" width="59" height="30"/>
|
||||
<state key="normal" title="Load file"/>
|
||||
<connections>
|
||||
<action selector="loadFile:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Mt3-w7-QRD"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="65L-bj-7ja" firstAttribute="top" secondItem="awX-J2-WjW" secondAttribute="bottom" constant="8" id="0pm-tA-HHv"/>
|
||||
<constraint firstItem="DO8-U6-Fin" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="4k9-78-uI8"/>
|
||||
<constraint firstItem="65L-bj-7ja" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="8DK-Kt-1aI"/>
|
||||
<constraint firstItem="DO8-U6-Fin" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="B7m-Ac-uWD"/>
|
||||
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="65L-bj-7ja" secondAttribute="bottom" id="MGd-GL-poe"/>
|
||||
<constraint firstItem="awX-J2-WjW" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="cDh-8H-Wf2"/>
|
||||
<constraint firstItem="awX-J2-WjW" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="8" symbolic="YES" id="pzr-zC-F3E"/>
|
||||
<constraint firstAttribute="trailing" secondItem="65L-bj-7ja" secondAttribute="trailing" id="yaU-Up-alA"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="auContainerView" destination="65L-bj-7ja" id="wVS-br-3wc"/>
|
||||
<outlet property="playButton" destination="awX-J2-WjW" id="yBe-iR-A9Z"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="301.60000000000002" y="270.31484257871068"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>AGainv3</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>NSAppleMusicUsageDescription</key>
|
||||
<string>Import an audio file for preview</string>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>SupportedNumChannels</key>
|
||||
<string>kSupportedNumChannels</string>
|
||||
</dict>
|
||||
</plist>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/iOS/Sources/AppDelegate.h
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/iOS/Sources/AppDelegate.m
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application {
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
}
|
||||
|
||||
@end
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/iOS/Sources/ViewController.h
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MediaPlayer/MediaPlayer.h>
|
||||
|
||||
@interface ViewController : UIViewController <MPMediaPickerControllerDelegate>
|
||||
|
||||
@end
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/iOS/Sources/ViewController.m
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import "ViewController.h"
|
||||
#import <CoreAudioKit/AUViewController.h>
|
||||
#import "public.sdk/source/vst/auv3wrapper/Shared/AUv3AudioEngine.h"
|
||||
#import "public.sdk/source/vst/auv3wrapper/Shared/AUv3Wrapper.h"
|
||||
|
||||
@class AUv3WrapperViewController;
|
||||
|
||||
@interface ViewController () {
|
||||
// Button for playback
|
||||
IBOutlet UIButton *playButton;
|
||||
|
||||
// Container for our custom view.
|
||||
__weak IBOutlet UIView *auContainerView;
|
||||
|
||||
// Audio playback engine.
|
||||
AUv3AudioEngine *audioEngine;
|
||||
|
||||
// Container for the custom view.
|
||||
AUv3WrapperViewController *auV3ViewController;
|
||||
}
|
||||
|
||||
-(IBAction)togglePlay:(id)sender;
|
||||
-(IBAction)loadFile:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
[self embedPlugInView];
|
||||
|
||||
AudioComponentDescription desc;
|
||||
|
||||
desc.componentType = kAUcomponentType;
|
||||
desc.componentSubType = kAUcomponentSubType;
|
||||
desc.componentManufacturer = kAUcomponentManufacturer;
|
||||
desc.componentFlags = kAUcomponentFlags;
|
||||
desc.componentFlagsMask = kAUcomponentFlagsMask;
|
||||
|
||||
[AUAudioUnit registerSubclass: AUv3Wrapper.class asComponentDescription:desc name:@"Local AUv3" version: UINT32_MAX];
|
||||
|
||||
audioEngine = [[AUv3AudioEngine alloc] initWithComponentType:desc.componentType];
|
||||
|
||||
[audioEngine loadAudioUnitWithComponentDescription:desc completion:^{
|
||||
auV3ViewController.audioUnit = (AUv3Wrapper*)audioEngine.currentAudioUnit;
|
||||
|
||||
NSString* fileName = @kAudioFileName;
|
||||
NSString* fileFormat = @kAudioFileFormat;
|
||||
NSURL* fileURL = [[NSBundle mainBundle] URLForResource:fileName withExtension:fileFormat];
|
||||
NSError* error = [audioEngine loadAudioFile:fileURL];
|
||||
if (error)
|
||||
{
|
||||
NSLog (@"Error setting up audio or midi file: %@", [error description]);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (void)embedPlugInView {
|
||||
NSURL *builtInPlugInURL = [[NSBundle mainBundle] builtInPlugInsURL];
|
||||
NSURL *pluginURL = [builtInPlugInURL URLByAppendingPathComponent: @"AUv3WrapperiOSExtension.appex"];
|
||||
NSBundle *appExtensionBundle = [NSBundle bundleWithURL: pluginURL];
|
||||
|
||||
auV3ViewController = [[AUv3WrapperViewController alloc] initWithNibName: @"AUv3WrapperViewController" bundle: appExtensionBundle];
|
||||
|
||||
// Present the view controller's view.
|
||||
UIView *view = auV3ViewController.view;
|
||||
view.frame = auContainerView.bounds;
|
||||
|
||||
[auContainerView addSubview: view];
|
||||
|
||||
view.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
NSArray *constraints = [NSLayoutConstraint constraintsWithVisualFormat: @"H:|-[view]-|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(view)];
|
||||
[auContainerView addConstraints: constraints];
|
||||
|
||||
constraints = [NSLayoutConstraint constraintsWithVisualFormat: @"V:|-[view]-|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(view)];
|
||||
[auContainerView addConstraints: constraints];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
-(IBAction)loadFile:(id)sender {
|
||||
MPMediaPickerController *soundPicker=[[MPMediaPickerController alloc]
|
||||
initWithMediaTypes:MPMediaTypeAnyAudio];
|
||||
soundPicker.delegate=self;
|
||||
soundPicker.allowsPickingMultipleItems=NO; // You can set it to yes for multiple selection
|
||||
[self presentViewController:soundPicker animated:YES completion:nil];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
-(void)mediaPicker:(MPMediaPickerController *)mediaPicker didPickMediaItems:
|
||||
(MPMediaItemCollection *)mediaItemCollection
|
||||
{
|
||||
MPMediaItem *item = [[mediaItemCollection items] objectAtIndex:0]; // For multiple you can iterate iTems array
|
||||
NSURL *url = [item valueForProperty:MPMediaItemPropertyAssetURL];
|
||||
[mediaPicker dismissViewControllerAnimated:YES completion:nil];
|
||||
NSError* error = [audioEngine loadAudioFile:url];
|
||||
if (error != nil)
|
||||
{
|
||||
NSLog(@"something went wrong");
|
||||
}
|
||||
}
|
||||
|
||||
- (void) mediaPickerDidCancel: (MPMediaPickerController *) mediaPicker
|
||||
{
|
||||
[mediaPicker dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
-(IBAction)togglePlay:(id)sender {
|
||||
BOOL isPlaying = [audioEngine startStop];
|
||||
|
||||
[playButton setTitle: isPlaying ? @"Stop" : @"Play" forState: UIControlStateNormal];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,26 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/iOS/Sources/main.mm
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
@autoreleasepool
|
||||
{
|
||||
return UIApplicationMain (argc, argv, nil, NSStringFromClass ([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Vendored
+176
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Application-->
|
||||
<scene sceneID="JPo-4y-FX3">
|
||||
<objects>
|
||||
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
||||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="AUv3App" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="AUv3App" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About AUV3App" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide AUV3App" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit AUV3App" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" tag="123" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="AUv3LFO2 Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</application>
|
||||
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="0.0"/>
|
||||
</scene>
|
||||
<!--Window Controller-->
|
||||
<scene sceneID="R2V-B0-nI4">
|
||||
<objects>
|
||||
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
|
||||
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<rect key="contentRect" x="0.0" y="757" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="B8D-0N-5wS" id="j2h-An-kEE"/>
|
||||
</connections>
|
||||
</window>
|
||||
<connections>
|
||||
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
|
||||
</connections>
|
||||
</windowController>
|
||||
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="250"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="hIz-AP-VOD">
|
||||
<objects>
|
||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
|
||||
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="364"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kkG-5b-ojC">
|
||||
<rect key="frame" x="207" y="316" width="66" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Play" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gCD-Et-Q6x">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="togglePlay:" target="XfG-lQ-9wD" id="oSe-db-zgP"/>
|
||||
</connections>
|
||||
</button>
|
||||
<customView wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6J0-ZM-W9c">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="323"/>
|
||||
</customView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="kkG-5b-ojC" firstAttribute="centerX" secondItem="m2S-Jp-Qdl" secondAttribute="centerX" id="5h0-Ry-y2J"/>
|
||||
<constraint firstItem="kkG-5b-ojC" firstAttribute="top" secondItem="m2S-Jp-Qdl" secondAttribute="top" constant="20" id="J8K-Ne-pVq"/>
|
||||
<constraint firstItem="6J0-ZM-W9c" firstAttribute="top" secondItem="kkG-5b-ojC" secondAttribute="bottom" id="RAO-aF-aJn"/>
|
||||
<constraint firstItem="6J0-ZM-W9c" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" id="bHR-tH-jff"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6J0-ZM-W9c" secondAttribute="trailing" id="d6h-Oq-iH2"/>
|
||||
<constraint firstAttribute="bottom" secondItem="6J0-ZM-W9c" secondAttribute="bottom" id="jg2-r2-1A9"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="containerView" destination="6J0-ZM-W9c" id="j60-iC-0OX"/>
|
||||
<outlet property="playButton" destination="kkG-5b-ojC" id="lCN-dZ-Vtx"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="702"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>again</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2024 Steinberg Media Technologies. All rights reserved.</string>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>SupportedNumChannels</key>
|
||||
<string>kSupportedNumChannels</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Binary file not shown.
+20
@@ -0,0 +1,20 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/macOS/Sources/AppDelegate.h
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||
@end
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/macOS/Sources/AppDelegate.m
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/macOS/Sources/ViewController.h
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface ViewController : NSViewController <NSWindowDelegate>
|
||||
|
||||
@end
|
||||
|
||||
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Helpers
|
||||
// Filename : public.sdk/samples/vst/again_auv3/macOS/Sources/ViewController.m
|
||||
// Created by : Steinberg, 07/2017.
|
||||
// Description : VST 3 - AUv3Wrapper
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import "ViewController.h"
|
||||
#import <CoreAudioKit/AUViewController.h>
|
||||
#import "public.sdk/source/vst/auv3wrapper/Shared/AUv3AudioEngine.h"
|
||||
#import "public.sdk/source/vst/auv3wrapper/Shared/AUv3Wrapper.h"
|
||||
|
||||
@class AUv3WrapperViewController;
|
||||
|
||||
@interface ViewController ()
|
||||
{
|
||||
// Button for playback
|
||||
IBOutlet NSButton* playButton;
|
||||
|
||||
AUv3AudioEngine* audioEngine;
|
||||
|
||||
// Container for the custom view.
|
||||
AUv3WrapperViewController* auV3ViewController;
|
||||
}
|
||||
|
||||
@property IBOutlet NSView *containerView;
|
||||
-(IBAction)togglePlay:(id)sender;
|
||||
-(void)handleMenuSelection:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
//------------------------------------------------------------------------
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
[self embedPlugInView];
|
||||
|
||||
AudioComponentDescription desc;
|
||||
|
||||
desc.componentType = kAUcomponentType;
|
||||
desc.componentSubType = kAUcomponentSubType;
|
||||
desc.componentManufacturer = kAUcomponentManufacturer;
|
||||
desc.componentFlags = kAUcomponentFlags;
|
||||
desc.componentFlagsMask = kAUcomponentFlagsMask;
|
||||
|
||||
if (desc.componentType == 'aufx' || desc.componentType == 'aumf')
|
||||
[self addFileMenuEntry];
|
||||
|
||||
[AUAudioUnit registerSubclass: AUv3Wrapper.class asComponentDescription:desc name:@"Local AUv3" version: UINT32_MAX];
|
||||
|
||||
audioEngine = [[AUv3AudioEngine alloc] initWithComponentType:desc.componentType];
|
||||
|
||||
[audioEngine loadAudioUnitWithComponentDescription:desc completion:^{
|
||||
auV3ViewController.audioUnit = (AUv3Wrapper*)audioEngine.currentAudioUnit;
|
||||
|
||||
NSString* fileName = @kAudioFileName;
|
||||
NSString* fileFormat = @kAudioFileFormat;
|
||||
NSURL* fileURL = [[NSBundle mainBundle] URLForResource:fileName withExtension:fileFormat];
|
||||
NSError* error = [audioEngine loadAudioFile:fileURL];
|
||||
if (error)
|
||||
{
|
||||
NSLog (@"Error setting up audio or midi file: %@", [error description]);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (void)embedPlugInView
|
||||
{
|
||||
NSURL *builtInPlugInURL = [[NSBundle mainBundle] builtInPlugInsURL];
|
||||
NSURL *pluginURL = [builtInPlugInURL URLByAppendingPathComponent: @"vst3plugin.appex"];
|
||||
NSBundle *appExtensionBundle = [NSBundle bundleWithURL: pluginURL];
|
||||
|
||||
auV3ViewController = [[AUv3WrapperViewController alloc] initWithNibName: @"AUv3WrapperViewController" bundle: appExtensionBundle];
|
||||
|
||||
// Present the view controller's view.
|
||||
NSView *view = auV3ViewController.view;
|
||||
view.frame = _containerView.bounds;
|
||||
|
||||
[_containerView addSubview: view];
|
||||
|
||||
view.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
NSArray *constraints = [NSLayoutConstraint constraintsWithVisualFormat: @"H:|-[view]-|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(view)];
|
||||
[_containerView addConstraints: constraints];
|
||||
|
||||
constraints = [NSLayoutConstraint constraintsWithVisualFormat: @"V:|-[view]-|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(view)];
|
||||
[_containerView addConstraints: constraints];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
-(void)addFileMenuEntry
|
||||
{
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
NSMenu *fileMenu = [[app.mainMenu itemWithTag:123] submenu];
|
||||
|
||||
NSMenuItem *openFileItem = [[NSMenuItem alloc] initWithTitle:@"Load file..."
|
||||
action:@selector(handleMenuSelection:)
|
||||
keyEquivalent:@"O"];
|
||||
[fileMenu insertItem:openFileItem atIndex:0];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
-(void)handleMenuSelection:(NSMenuItem *)sender
|
||||
{
|
||||
// create the open dialog
|
||||
NSOpenPanel* openPanel = [NSOpenPanel openPanel];
|
||||
openPanel.title = @"Choose an audio file";
|
||||
openPanel.showsResizeIndicator = YES;
|
||||
openPanel.canChooseFiles = YES;
|
||||
openPanel.allowsMultipleSelection = NO;
|
||||
openPanel.canChooseDirectories = NO;
|
||||
openPanel.canCreateDirectories = YES;
|
||||
openPanel.allowedFileTypes = @[@"aac", @"aif", @"aiff", @"caf", @"m4a", @"mp3", @"wav"];
|
||||
|
||||
if ( [openPanel runModal] == NSModalResponseOK )
|
||||
{
|
||||
NSArray* urls = [openPanel URLs];
|
||||
|
||||
// Loop through all the files and process them.
|
||||
for(int i = 0; i < [urls count]; i++ )
|
||||
{
|
||||
NSError* error = [audioEngine loadAudioFile:[urls objectAtIndex:i]];
|
||||
|
||||
if (error != nil)
|
||||
{
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
[alert setMessageText:@"Error loading file"];
|
||||
[alert setInformativeText:@"Something went wrong loading the audio file. Please make sure to select the correct format and try again."];
|
||||
[alert addButtonWithTitle:@"Ok"];
|
||||
[alert runModal];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
-(IBAction)togglePlay:(id)sender
|
||||
{
|
||||
BOOL isPlaying = [audioEngine startStop];
|
||||
|
||||
[playButton setTitle: isPlaying ? @"Stop" : @"Play"];
|
||||
}
|
||||
|
||||
#pragma mark <NSWindowDelegate>
|
||||
//------------------------------------------------------------------------
|
||||
- (void)windowWillClose:(NSNotification *)notification
|
||||
{
|
||||
// Main applicaiton window closing, we're done
|
||||
auV3ViewController = nil;
|
||||
}
|
||||
@end
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user