1.0 release
This commit is contained in:
@@ -0,0 +1,387 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 60;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
C3B0000000000000000000C /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B000000000000000000007 /* main.swift */; };
|
||||
C3B0000000000000000000D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B000000000000000000008 /* AppDelegate.swift */; };
|
||||
C3B0000000000000000000E /* DemoRootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B000000000000000000009 /* DemoRootView.swift */; };
|
||||
C3B0000000000000000000F /* ShoeGazeDemoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B00000000000000000000A /* ShoeGazeDemoController.swift */; };
|
||||
C3B000000000000000000020 /* LyrebirdShoeGaze in Frameworks */ = {isa = PBXBuildFile; productRef = C3B00000000000000000001E /* LyrebirdShoeGaze */; };
|
||||
C3B000000000000000000021 /* LyrebirdShoeGazeUI in Frameworks */ = {isa = PBXBuildFile; productRef = C3B00000000000000000001F /* LyrebirdShoeGazeUI */; };
|
||||
C3B000000000000000000022 /* Lyrebird in Frameworks */ = {isa = PBXBuildFile; productRef = C3B000000000000000000023 /* Lyrebird */; };
|
||||
C3B000000000000000000024 /* LyrebirdUI in Frameworks */ = {isa = PBXBuildFile; productRef = C3B000000000000000000025 /* LyrebirdUI */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
C3B000000000000000000004 /* ShoeGazeDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShoeGazeDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C3B000000000000000000006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
C3B000000000000000000007 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
C3B000000000000000000008 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
C3B000000000000000000009 /* DemoRootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoRootView.swift; sourceTree = "<group>"; };
|
||||
C3B00000000000000000000A /* ShoeGazeDemoController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoeGazeDemoController.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
C3B000000000000000000012 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C3B000000000000000000020 /* LyrebirdShoeGaze in Frameworks */,
|
||||
C3B000000000000000000021 /* LyrebirdShoeGazeUI in Frameworks */,
|
||||
C3B000000000000000000022 /* Lyrebird in Frameworks */,
|
||||
C3B000000000000000000024 /* LyrebirdUI in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
C3B000000000000000000002 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C3B000000000000000000005 /* ShoeGazeDemo */,
|
||||
C3B000000000000000000003 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C3B000000000000000000003 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C3B000000000000000000004 /* ShoeGazeDemo.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C3B000000000000000000005 /* ShoeGazeDemo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C3B000000000000000000007 /* main.swift */,
|
||||
C3B000000000000000000008 /* AppDelegate.swift */,
|
||||
C3B000000000000000000009 /* DemoRootView.swift */,
|
||||
C3B00000000000000000000A /* ShoeGazeDemoController.swift */,
|
||||
C3B000000000000000000006 /* Info.plist */,
|
||||
);
|
||||
path = ShoeGazeDemo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
C3B000000000000000000014 /* ShoeGazeDemo */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C3B000000000000000000015 /* Build configuration list for PBXNativeTarget "ShoeGazeDemo" */;
|
||||
buildPhases = (
|
||||
C3B000000000000000000011 /* Sources */,
|
||||
C3B000000000000000000012 /* Frameworks */,
|
||||
C3B000000000000000000013 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ShoeGazeDemo;
|
||||
packageProductDependencies = (
|
||||
C3B00000000000000000001E /* LyrebirdShoeGaze */,
|
||||
C3B00000000000000000001F /* LyrebirdShoeGazeUI */,
|
||||
C3B000000000000000000023 /* Lyrebird */,
|
||||
C3B000000000000000000025 /* LyrebirdUI */,
|
||||
);
|
||||
productName = ShoeGazeDemo;
|
||||
productReference = C3B000000000000000000004 /* ShoeGazeDemo.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
C3B000000000000000000001 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastSwiftUpdateCheck = 1600;
|
||||
LastUpgradeCheck = 2620;
|
||||
TargetAttributes = {
|
||||
C3B000000000000000000014 = {
|
||||
CreatedOnToolsVersion = 16.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = C3B000000000000000000018 /* Build configuration list for PBXProject "ShoeGazeDemo" */;
|
||||
compatibilityVersion = "Xcode 14.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = C3B000000000000000000002;
|
||||
packageReferences = (
|
||||
C3B00000000000000000001B /* XCLocalSwiftPackageReference ".." */,
|
||||
C3B00000000000000000001C /* XCRemoteSwiftPackageReference "Lyrebird" */,
|
||||
);
|
||||
productRefGroup = C3B000000000000000000003 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
C3B000000000000000000014 /* ShoeGazeDemo */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
C3B000000000000000000013 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
C3B000000000000000000011 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C3B0000000000000000000C /* main.swift in Sources */,
|
||||
C3B0000000000000000000D /* AppDelegate.swift in Sources */,
|
||||
C3B0000000000000000000E /* DemoRootView.swift in Sources */,
|
||||
C3B0000000000000000000F /* ShoeGazeDemoController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C3B000000000000000000016 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGNING_REQUIRED = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
INFOPLIST_FILE = ShoeGazeDemo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 15.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.ShoeGazeDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C3B000000000000000000017 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGNING_REQUIRED = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
INFOPLIST_FILE = ShoeGazeDemo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 15.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.ShoeGazeDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C3B000000000000000000019 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C3B00000000000000000001A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = macosx;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C3B000000000000000000015 /* Build configuration list for PBXNativeTarget "ShoeGazeDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C3B000000000000000000016 /* Debug */,
|
||||
C3B000000000000000000017 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C3B000000000000000000018 /* Build configuration list for PBXProject "ShoeGazeDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C3B000000000000000000019 /* Debug */,
|
||||
C3B00000000000000000001A /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCLocalSwiftPackageReference section */
|
||||
C3B00000000000000000001B /* XCLocalSwiftPackageReference ".." */ = {
|
||||
isa = XCLocalSwiftPackageReference;
|
||||
relativePath = ..;
|
||||
};
|
||||
/* End XCLocalSwiftPackageReference section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
C3B00000000000000000001C /* XCRemoteSwiftPackageReference "Lyrebird" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://realizedsound.mooo.com/josh/Lyrebird";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 1.2.0;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
C3B00000000000000000001E /* LyrebirdShoeGaze */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = C3B00000000000000000001B /* XCLocalSwiftPackageReference ".." */;
|
||||
productName = LyrebirdShoeGaze;
|
||||
};
|
||||
C3B00000000000000000001F /* LyrebirdShoeGazeUI */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = C3B00000000000000000001B /* XCLocalSwiftPackageReference ".." */;
|
||||
productName = LyrebirdShoeGazeUI;
|
||||
};
|
||||
C3B000000000000000000023 /* Lyrebird */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = C3B00000000000000000001C /* XCRemoteSwiftPackageReference "Lyrebird" */;
|
||||
productName = Lyrebird;
|
||||
};
|
||||
C3B000000000000000000025 /* LyrebirdUI */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = C3B00000000000000000001C /* XCRemoteSwiftPackageReference "Lyrebird" */;
|
||||
productName = LyrebirdUI;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = C3B000000000000000000001 /* Project object */;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "2620"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
buildArchitectures = "Automatic">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C3B000000000000000000014"
|
||||
BuildableName = "ShoeGazeDemo.app"
|
||||
BlueprintName = "ShoeGazeDemo"
|
||||
ReferencedContainer = "container:ShoeGazeDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C3B000000000000000000014"
|
||||
BuildableName = "ShoeGazeDemo.app"
|
||||
BlueprintName = "ShoeGazeDemo"
|
||||
ReferencedContainer = "container:ShoeGazeDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C3B000000000000000000014"
|
||||
BuildableName = "ShoeGazeDemo.app"
|
||||
BlueprintName = "ShoeGazeDemo"
|
||||
ReferencedContainer = "container:ShoeGazeDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,147 @@
|
||||
// AppDelegate.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#if os(macOS)
|
||||
import AppKit
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
import LyrebirdShoeGaze
|
||||
import LyrebirdShoeGazeUI
|
||||
|
||||
/// Application delegate for the ShoeGaze demo.
|
||||
///
|
||||
/// Creates a `SynthesisEngine`, a `ShoeGazeDemoController` (which builds the default
|
||||
/// `.boards` showcase automatically), and opens a `LyrebirdWindow` hosting `DemoRootView`.
|
||||
///
|
||||
/// The engine is **not** started automatically. The user clicks Start in `DemoRootView`'s
|
||||
/// toolbar (or presses Stop to halt audio). On application termination, `stop()` is called
|
||||
/// to release Core Audio resources cleanly.
|
||||
@MainActor
|
||||
final class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
|
||||
// MARK: - Engine configuration constants
|
||||
|
||||
private static let blockSize: Int = 512
|
||||
private static let sampleRate: Double = 48_000.0
|
||||
private static let outputChannels: Int = 2
|
||||
private static let inputChannels: Int = 6
|
||||
private static let numAudioBuses: Int = 256
|
||||
|
||||
// MARK: - Window geometry constants
|
||||
|
||||
private static let windowWidth: CGFloat = 1_100
|
||||
private static let windowHeight: CGFloat = 640
|
||||
|
||||
// MARK: - Owned objects
|
||||
|
||||
private let controller: ShoeGazeDemoController
|
||||
private let window: LyrebirdWindow
|
||||
|
||||
/// The Mute menu item, retained so `validateMenuItem(_:)` can update its checkmark.
|
||||
private var muteMenuItem: NSMenuItem?
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override init() {
|
||||
let engine: SynthesisEngine = SynthesisEngine(
|
||||
blockSize: AppDelegate.blockSize,
|
||||
sampleRate: AppDelegate.sampleRate,
|
||||
numOutputChannels: AppDelegate.outputChannels,
|
||||
numInputChannels: AppDelegate.inputChannels,
|
||||
numAudioBuses: AppDelegate.numAudioBuses,
|
||||
driver: CoreAudioDriver()
|
||||
)
|
||||
|
||||
self.controller = ShoeGazeDemoController(engine: engine)
|
||||
self.window = LyrebirdWindow(
|
||||
title: "ShoeGaze — Lyrebird Guitar Pedalboard",
|
||||
width: AppDelegate.windowWidth,
|
||||
height: AppDelegate.windowHeight
|
||||
)
|
||||
super.init()
|
||||
}
|
||||
|
||||
// MARK: - NSApplicationDelegate
|
||||
|
||||
func applicationDidFinishLaunching(_ notification: Notification) {
|
||||
installMainMenu()
|
||||
let demoController: ShoeGazeDemoController = controller
|
||||
window.open {
|
||||
DemoRootView(controller: demoController)
|
||||
}
|
||||
}
|
||||
|
||||
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||
true
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ notification: Notification) {
|
||||
controller.stop()
|
||||
}
|
||||
|
||||
// MARK: - Main menu
|
||||
|
||||
/// Builds the app's menu bar: an application menu (About / Hide / Quit ⌘Q) and an
|
||||
/// Audio menu (Mute ⌘M). Standard items route through the responder chain to
|
||||
/// `NSApplication`; Mute targets this delegate.
|
||||
private func installMainMenu() {
|
||||
let appName: String = ProcessInfo.processInfo.processName
|
||||
let mainMenu: NSMenu = NSMenu()
|
||||
|
||||
// Application menu.
|
||||
let appMenuItem: NSMenuItem = NSMenuItem()
|
||||
mainMenu.addItem(appMenuItem)
|
||||
let appMenu: NSMenu = NSMenu()
|
||||
appMenuItem.submenu = appMenu
|
||||
appMenu.addItem(
|
||||
withTitle: "About \(appName)",
|
||||
action: #selector(NSApplication.orderFrontStandardAboutPanel(_:)),
|
||||
keyEquivalent: ""
|
||||
)
|
||||
appMenu.addItem(NSMenuItem.separator())
|
||||
appMenu.addItem(
|
||||
withTitle: "Hide \(appName)",
|
||||
action: #selector(NSApplication.hide(_:)),
|
||||
keyEquivalent: "h"
|
||||
)
|
||||
appMenu.addItem(NSMenuItem.separator())
|
||||
appMenu.addItem(
|
||||
withTitle: "Quit \(appName)",
|
||||
action: #selector(NSApplication.terminate(_:)),
|
||||
keyEquivalent: "q"
|
||||
)
|
||||
|
||||
// Audio menu.
|
||||
let audioMenuItem: NSMenuItem = NSMenuItem()
|
||||
mainMenu.addItem(audioMenuItem)
|
||||
let audioMenu: NSMenu = NSMenu(title: "Audio")
|
||||
audioMenuItem.submenu = audioMenu
|
||||
let mute: NSMenuItem = NSMenuItem(
|
||||
title: "Mute",
|
||||
action: #selector(toggleMute(_:)),
|
||||
keyEquivalent: "m"
|
||||
)
|
||||
mute.target = self
|
||||
audioMenu.addItem(mute)
|
||||
muteMenuItem = mute
|
||||
|
||||
NSApplication.shared.mainMenu = mainMenu
|
||||
}
|
||||
|
||||
/// Toggles audio output (mute). Bound to the Audio ▸ Mute menu item (⌘M).
|
||||
@objc private func toggleMute(_ sender: Any?) {
|
||||
controller.toggleMute()
|
||||
}
|
||||
|
||||
/// Shows a checkmark on the Mute item while audio is silenced (engine not running).
|
||||
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
||||
if menuItem == muteMenuItem {
|
||||
menuItem.state = controller.isRunning ? .off : .on
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,263 @@
|
||||
// DemoRootView.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#if os(macOS)
|
||||
import SwiftUI
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
import LyrebirdShoeGaze
|
||||
import LyrebirdShoeGazeUI
|
||||
|
||||
/// Root view for the ShoeGaze demo window.
|
||||
///
|
||||
/// Presents a top toolbar with a mode picker, an input-source toggle, and a Start/Stop
|
||||
/// transport button, followed by a content area that switches between four showcase
|
||||
/// modes as the user selects them.
|
||||
///
|
||||
/// Because `ShoeGazeDemoController` is `@Observable`, SwiftUI re-renders this view and
|
||||
/// all its children whenever `controller.mode`, `controller.shoeGaze.boards`,
|
||||
/// `controller.router`, `controller.parallelSection`, or `controller.isRunning` change —
|
||||
/// including after a ``ShoeGazeDemoController/rebuild()`` that replaces `shoeGaze`.
|
||||
///
|
||||
/// ## Mode showcases
|
||||
///
|
||||
/// - `.boards` → `ShoeGazeView` — two boards, eight pedals, master gain per board.
|
||||
/// - `.editor` → `BoardEditorView` — board + FlowLayout pedal area + version snapshots.
|
||||
/// - `.parallel` → `ParallelSectionView` — splitter, two branch rows, merger (via board).
|
||||
/// - `.router` → `ChainRouterView` — dual-board chain router with splitter + master.
|
||||
struct DemoRootView: View {
|
||||
|
||||
// MARK: - Layout constants
|
||||
|
||||
private static let toolbarSpacing: CGFloat = 10
|
||||
private static let toolbarPadding: CGFloat = 12
|
||||
private static let contentPadding: CGFloat = 16
|
||||
private static let windowMinWidth: CGFloat = 1_100
|
||||
private static let windowMinHeight: CGFloat = 640
|
||||
/// Dark stage-floor background (warm almost-black).
|
||||
private static let backgroundRed: Double = 0.08
|
||||
private static let backgroundGreen: Double = 0.07
|
||||
private static let backgroundBlue: Double = 0.06
|
||||
private static let dividerOpacity: Double = 0.15
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
private let controller: ShoeGazeDemoController
|
||||
|
||||
/// Bumped on each transport press so the buttons re-read `controller.isRunning`
|
||||
/// (which derives from the non-observable engine).
|
||||
@State private var transportTick: Bool = false
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
/// Creates the root demo view bound to the given controller.
|
||||
///
|
||||
/// - Parameter controller: The `ShoeGazeDemoController` that owns the engine, active
|
||||
/// `ShoeGaze` session, and current mode. All toolbar actions dispatch through this.
|
||||
init(controller: ShoeGazeDemoController) {
|
||||
self.controller = controller
|
||||
}
|
||||
|
||||
// MARK: - Body
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
toolbar
|
||||
Divider()
|
||||
.overlay(Color.white.opacity(DemoRootView.dividerOpacity))
|
||||
contentArea
|
||||
.padding(DemoRootView.contentPadding)
|
||||
}
|
||||
.frame(
|
||||
minWidth: DemoRootView.windowMinWidth,
|
||||
minHeight: DemoRootView.windowMinHeight
|
||||
)
|
||||
.background(
|
||||
Color(
|
||||
red: DemoRootView.backgroundRed,
|
||||
green: DemoRootView.backgroundGreen,
|
||||
blue: DemoRootView.backgroundBlue
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// MARK: - Toolbar
|
||||
|
||||
/// Top toolbar: mode picker, input-source picker, transport, and CPU meter.
|
||||
private var toolbar: some View {
|
||||
HStack(spacing: DemoRootView.toolbarSpacing) {
|
||||
modePicker
|
||||
Spacer()
|
||||
inputSourcePicker
|
||||
// In Boards mode the pedalboard view (`ShoeGazeView`) supplies its own
|
||||
// Start/Stop, so the board starts only when its own button is pressed. The
|
||||
// other modes have no in-content transport, so show it here for them.
|
||||
if controller.mode != .boards {
|
||||
transportButtons
|
||||
}
|
||||
}
|
||||
.padding(DemoRootView.toolbarPadding)
|
||||
}
|
||||
|
||||
/// Segmented picker for `DemoMode`.
|
||||
///
|
||||
/// The selection binding's setter delegates to `controller.select(_:)` rather than
|
||||
/// writing a `@State` directly, so the controller handles the mode switch and rebuild.
|
||||
private var modePicker: some View {
|
||||
let modeBinding: Binding<DemoMode> = Binding(
|
||||
get: { controller.mode },
|
||||
set: { controller.select($0) }
|
||||
)
|
||||
return Picker("Mode", selection: modeBinding) {
|
||||
ForEach(DemoMode.allCases) { demoMode in
|
||||
Text(demoMode.title).tag(demoMode)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.frame(maxWidth: 380)
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
|
||||
/// A `Binding<Int>` mapping the input Picker tag to `InputSource`.
|
||||
///
|
||||
/// Tag `-1` = `.testLoop`; tags `0 ..< numInputChannels` = `.liveInput(channel:)`.
|
||||
/// Setting the binding calls `controller.setInputSource(_:)`.
|
||||
private var inputSourceBinding: Binding<Int> {
|
||||
Binding(
|
||||
get: {
|
||||
switch controller.inputSource {
|
||||
case .testLoop:
|
||||
return -1
|
||||
case .liveInput(let channel):
|
||||
return channel
|
||||
}
|
||||
},
|
||||
set: { newValue in
|
||||
if newValue == -1 {
|
||||
controller.setInputSource(.testLoop)
|
||||
} else {
|
||||
controller.setInputSource(.liveInput(channel: newValue))
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/// Picker listing "Test Loop" and one option per available hardware input channel.
|
||||
///
|
||||
/// When `engine.numInputChannels == 0` only "Test Loop" is shown; the live options
|
||||
/// are omitted so the picker never offers channels that do not exist.
|
||||
private var inputSourcePicker: some View {
|
||||
HStack(spacing: DemoRootView.toolbarSpacing) {
|
||||
Text("Input:")
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(Color.white.opacity(0.65))
|
||||
Picker("Input", selection: inputSourceBinding) {
|
||||
Text("Test Loop").tag(-1)
|
||||
ForEach(0..<controller.engine.numInputChannels, id: \.self) { channel in
|
||||
Text("In \(channel)").tag(channel)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.menu)
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
}
|
||||
|
||||
/// Start and Stop transport buttons.
|
||||
private var transportButtons: some View {
|
||||
// `controller.isRunning` derives from the engine; toggling the tick on press
|
||||
// re-evaluates this view so the buttons reflect the change immediately.
|
||||
_ = transportTick
|
||||
let isRunning: Bool = controller.isRunning
|
||||
return HStack(spacing: DemoRootView.toolbarSpacing) {
|
||||
Button("Start") {
|
||||
controller.start()
|
||||
transportTick.toggle()
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.tint(.green)
|
||||
.disabled(isRunning)
|
||||
|
||||
Button("Stop") {
|
||||
controller.stop()
|
||||
transportTick.toggle()
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.tint(.red)
|
||||
.disabled(!isRunning)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Content area
|
||||
|
||||
/// The main content area switches view based on the active mode.
|
||||
@ViewBuilder
|
||||
private var contentArea: some View {
|
||||
switch controller.mode {
|
||||
case .boards:
|
||||
ShoeGazeView(shoeGaze: controller.shoeGaze)
|
||||
|
||||
case .editor:
|
||||
editorContent
|
||||
|
||||
case .parallel:
|
||||
parallelContent
|
||||
|
||||
case .router:
|
||||
routerContent
|
||||
}
|
||||
}
|
||||
|
||||
/// `.editor` content: `BoardEditorView` bound to the first board in the session.
|
||||
///
|
||||
/// Shows a placeholder when the board list is unexpectedly empty (e.g. if
|
||||
/// `buildEditor()` failed silently).
|
||||
@ViewBuilder
|
||||
private var editorContent: some View {
|
||||
if controller.shoeGaze.boards.isEmpty {
|
||||
Text("No editor board available.")
|
||||
.foregroundStyle(Color.white.opacity(0.55))
|
||||
} else {
|
||||
BoardEditorView(
|
||||
shoeGaze: controller.shoeGaze,
|
||||
boardIndex: 0,
|
||||
versionStore: controller.versionStore
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// `.parallel` content: the full board view (shows pre/post-split pedals) stacked
|
||||
/// above `ParallelSectionView` which exposes the splitter mode picker and branch rows.
|
||||
@ViewBuilder
|
||||
private var parallelContent: some View {
|
||||
if let section: ParallelSection = controller.parallelSection,
|
||||
!controller.shoeGaze.boards.isEmpty {
|
||||
let board: PedalBoard = controller.shoeGaze.boards[0]
|
||||
ScrollView(.vertical, showsIndicators: true) {
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
PedalBoardView(board: board)
|
||||
ParallelSectionView(section: section)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Text("Parallel section unavailable.")
|
||||
.foregroundStyle(Color.white.opacity(0.55))
|
||||
}
|
||||
}
|
||||
|
||||
/// `.router` content: `ChainRouterView` bound to the live `ChainRouter`.
|
||||
@ViewBuilder
|
||||
private var routerContent: some View {
|
||||
if let chainRouter: ChainRouter = controller.router {
|
||||
ScrollView(.vertical, showsIndicators: true) {
|
||||
ChainRouterView(router: chainRouter)
|
||||
}
|
||||
} else {
|
||||
Text("Chain router unavailable.")
|
||||
.foregroundStyle(Color.white.opacity(0.55))
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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>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>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.music</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2026 Realized Sound. All rights reserved.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>ShoeGazeDemo can route a hardware input channel through your pedalboard. Enable microphone access to use Live Input mode.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,274 @@
|
||||
// ShoeGazeDemoController.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#if os(macOS)
|
||||
import Observation
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
import LyrebirdShoeGaze
|
||||
|
||||
// MARK: - DemoMode
|
||||
|
||||
/// The active showcase mode displayed in the demo window.
|
||||
///
|
||||
/// Each case corresponds to one full-window showcase of a distinct ShoeGaze feature.
|
||||
/// Switching modes tears down the current audio graph and rebuilds it fresh.
|
||||
enum DemoMode: String, CaseIterable, Identifiable {
|
||||
|
||||
/// Two full boards, each with four pedals (Board 1: Overdrive → Delay → Reverb → Modulation;
|
||||
/// Board 2: Fuzz → Tremolo → Phaser → Compressor).
|
||||
case boards = "Boards"
|
||||
|
||||
/// A single board inside `BoardEditorView` with preset version snapshots pre-populated.
|
||||
case editor = "Editor"
|
||||
|
||||
/// A single board with a ``ParallelSection`` (Overdrive → split → Delay|Fuzz → merge → Reverb).
|
||||
case parallel = "Parallel"
|
||||
|
||||
/// A ``ChainRouter`` that splits one input across two independent boards (A: Overdrive + Delay;
|
||||
/// B: Fuzz + Reverb) and recombines them through a shared master stage.
|
||||
case router = "Router"
|
||||
|
||||
var id: String { rawValue }
|
||||
|
||||
/// Short human-readable title used in the mode picker.
|
||||
var title: String {
|
||||
switch self {
|
||||
case .boards: return "Boards"
|
||||
case .editor: return "Editor"
|
||||
case .parallel: return "Parallel"
|
||||
case .router: return "Router"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - ShoeGazeDemoController
|
||||
|
||||
/// Main-actor observable controller that owns the engine and active ShoeGaze session.
|
||||
///
|
||||
/// A single `ShoeGaze` instance plus optional `router` / `parallelSection` hold the
|
||||
/// current showcase. Switching modes via ``select(_:)`` or changing the input source via
|
||||
/// ``setInputSource(_:)`` calls ``rebuild()`` which:
|
||||
///
|
||||
/// 1. Stops the engine if it is running.
|
||||
/// 2. Calls `shoeGaze.teardown()` to remove all nodes and release all buses.
|
||||
/// 3. Replaces `shoeGaze` with a fresh instance.
|
||||
/// 4. Builds the new mode-specific graph.
|
||||
/// 5. Restarts the engine if it was running before the rebuild.
|
||||
///
|
||||
/// This guarantees the engine never holds stale references across mode switches.
|
||||
@MainActor
|
||||
@Observable
|
||||
final class ShoeGazeDemoController {
|
||||
|
||||
// MARK: - Public state
|
||||
|
||||
/// The synthesis engine. Callers must not call `engine.start()` or `engine.stop()`
|
||||
/// directly — use ``start()`` and ``stop()`` so `isRunning` stays consistent.
|
||||
let engine: SynthesisEngine
|
||||
|
||||
/// The active ShoeGaze session. Replaced on every ``rebuild()`` call.
|
||||
private(set) var shoeGaze: ShoeGaze
|
||||
|
||||
/// Non-nil only in `.router` mode, after ``buildRouter()`` succeeds.
|
||||
private(set) var router: ChainRouter?
|
||||
|
||||
/// Non-nil only in `.parallel` mode, after ``buildParallel()`` succeeds.
|
||||
private(set) var parallelSection: ParallelSection?
|
||||
|
||||
/// Stores named board snapshots for the `.editor` showcase.
|
||||
let versionStore: BoardVersionStore = BoardVersionStore()
|
||||
|
||||
/// Currently selected showcase mode.
|
||||
private(set) var mode: DemoMode = .boards
|
||||
|
||||
/// Current input source policy.
|
||||
private(set) var inputSource: InputSource = .testLoop
|
||||
|
||||
/// `true` while the engine is running. Derived from the engine (the single source
|
||||
/// of truth) so it stays correct regardless of which control starts/stops it.
|
||||
var isRunning: Bool { engine.isRunning }
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
/// Creates a controller, builds the default `.boards` showcase, and does NOT start the engine.
|
||||
///
|
||||
/// - Parameter engine: A pre-configured `SynthesisEngine` owned by the caller. The
|
||||
/// engine must not be running when this initialiser is called.
|
||||
init(engine: SynthesisEngine) {
|
||||
self.engine = engine
|
||||
self.shoeGaze = ShoeGaze(engine: engine, inputSource: .testLoop)
|
||||
buildBoards()
|
||||
}
|
||||
|
||||
// MARK: - Mode selection
|
||||
|
||||
/// Switches to the given mode if different from the current one, triggering a full rebuild.
|
||||
///
|
||||
/// - Parameter newMode: The showcase to activate.
|
||||
func select(_ newMode: DemoMode) {
|
||||
guard newMode != mode else { return }
|
||||
mode = newMode
|
||||
rebuild()
|
||||
}
|
||||
|
||||
// MARK: - Input source
|
||||
|
||||
/// Changes the input source policy and triggers a full rebuild.
|
||||
///
|
||||
/// - Parameter source: `.testLoop` for the built-in test signal or `.liveInput(channel:)`
|
||||
/// for hardware microphone/instrument input on the given channel.
|
||||
func setInputSource(_ source: InputSource) {
|
||||
inputSource = source
|
||||
rebuild()
|
||||
}
|
||||
|
||||
// MARK: - Transport
|
||||
|
||||
/// Starts the engine. Updates ``isRunning`` on success; prints on failure.
|
||||
func start() {
|
||||
do {
|
||||
try engine.start()
|
||||
} catch {
|
||||
print("[ShoeGazeDemoController] engine.start() failed: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
/// Stops the engine and updates ``isRunning``.
|
||||
func stop() {
|
||||
engine.stop()
|
||||
}
|
||||
|
||||
/// Toggles audio output on/off (mute). Muting silences output by stopping the engine;
|
||||
/// unmuting restarts it. `isRunning == false` is the "muted" (silent) state.
|
||||
func toggleMute() {
|
||||
if isRunning {
|
||||
stop()
|
||||
} else {
|
||||
start()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Rebuild
|
||||
|
||||
/// Tears down the current session and rebuilds the active mode.
|
||||
///
|
||||
/// The engine is stopped before teardown and restarted afterward if it was running,
|
||||
/// satisfying the remove-before-release invariant documented on `ShoeGaze.teardown()`.
|
||||
private func rebuild() {
|
||||
let wasRunning: Bool = isRunning
|
||||
if wasRunning { stop() }
|
||||
|
||||
shoeGaze.teardown()
|
||||
router = nil
|
||||
parallelSection = nil
|
||||
|
||||
shoeGaze = ShoeGaze(engine: engine, inputSource: inputSource)
|
||||
|
||||
switch mode {
|
||||
case .boards: buildBoards()
|
||||
case .editor: buildEditor()
|
||||
case .parallel: buildParallel()
|
||||
case .router: buildRouter()
|
||||
}
|
||||
|
||||
if wasRunning { start() }
|
||||
}
|
||||
|
||||
// MARK: - Mode builders
|
||||
|
||||
/// `.boards` — two full boards covering all eight pedal types.
|
||||
///
|
||||
/// Board 1: Overdrive → Delay → Reverb → Modulation
|
||||
/// Board 2: Fuzz → Tremolo → Phaser → Compressor
|
||||
private func buildBoards() {
|
||||
do {
|
||||
let board1: PedalBoard = try shoeGaze.addBoard()
|
||||
board1.label = "Board 1"
|
||||
try board1.add(OverdrivePedal())
|
||||
try board1.add(DelayPedal())
|
||||
try board1.add(ReverbPedal())
|
||||
try board1.add(ModulationPedal())
|
||||
try shoeGaze.finalizeBoard(board1)
|
||||
|
||||
let board2: PedalBoard = try shoeGaze.addBoard()
|
||||
board2.label = "Board 2"
|
||||
try board2.add(FuzzPedal())
|
||||
try board2.add(TremoloPedal())
|
||||
try board2.add(PhaserPedal())
|
||||
try board2.add(CompressorPedal())
|
||||
try shoeGaze.finalizeBoard(board2)
|
||||
} catch {
|
||||
print("[ShoeGazeDemoController] buildBoards failed: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
/// `.editor` — one board inside `BoardEditorView` with two pre-captured versions.
|
||||
///
|
||||
/// The pre-populated version entries ("Crunch" and "Clean Shimmer") ensure the
|
||||
/// Versions menu is not empty when the showcase first appears.
|
||||
private func buildEditor() {
|
||||
do {
|
||||
let board: PedalBoard = try shoeGaze.addBoard()
|
||||
board.label = "Editor Board"
|
||||
try board.add(OverdrivePedal())
|
||||
try board.add(FuzzPedal())
|
||||
try board.add(DelayPedal())
|
||||
try board.add(ReverbPedal())
|
||||
try shoeGaze.finalizeBoard(board)
|
||||
|
||||
// Pre-populate two named snapshots so the Versions menu is immediately useful.
|
||||
versionStore.capture(board, name: "Crunch")
|
||||
versionStore.capture(board, name: "Clean Shimmer")
|
||||
} catch {
|
||||
print("[ShoeGazeDemoController] buildEditor failed: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
/// `.parallel` — Overdrive → split(Delay | Fuzz) → merge → Reverb.
|
||||
///
|
||||
/// Stores the `ParallelSection` in `parallelSection` so `DemoRootView` can display
|
||||
/// `ParallelSectionView`.
|
||||
private func buildParallel() {
|
||||
do {
|
||||
let board: PedalBoard = try shoeGaze.addBoard()
|
||||
board.label = "Parallel Board"
|
||||
try board.add(OverdrivePedal())
|
||||
|
||||
let section: ParallelSection = try board.split()
|
||||
try section.branchA.add(DelayPedal())
|
||||
try section.branchB.add(FuzzPedal())
|
||||
try board.merge(section)
|
||||
|
||||
try board.add(ReverbPedal())
|
||||
try shoeGaze.finalizeBoard(board)
|
||||
|
||||
parallelSection = section
|
||||
} catch {
|
||||
print("[ShoeGazeDemoController] buildParallel failed: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
/// `.router` — ChainRouter with two independent chains: A (Overdrive + Delay),
|
||||
/// B (Fuzz + Reverb), merged through a shared master stage.
|
||||
///
|
||||
/// Stores the `ChainRouter` in `router` so `DemoRootView` can display
|
||||
/// `ChainRouterView`.
|
||||
private func buildRouter() {
|
||||
do {
|
||||
let r: ChainRouter = try shoeGaze.makeChainRouter()
|
||||
try r.addToA(OverdrivePedal())
|
||||
try r.addToA(DelayPedal())
|
||||
try r.addToB(FuzzPedal())
|
||||
try r.addToB(ReverbPedal())
|
||||
try r.finalize()
|
||||
router = r
|
||||
} catch {
|
||||
print("[ShoeGazeDemoController] buildRouter failed: \(error)")
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
// main.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#if os(macOS)
|
||||
import AppKit
|
||||
|
||||
// Program entry runs on the main thread; assert main-actor isolation for the
|
||||
// AppKit bootstrap rather than hopping asynchronously. `AppDelegate.init` builds
|
||||
// `@MainActor` synthesizers and UI.
|
||||
MainActor.assumeIsolated {
|
||||
let app: NSApplication = NSApplication.shared
|
||||
let delegate: AppDelegate = AppDelegate()
|
||||
app.setActivationPolicy(.regular)
|
||||
app.delegate = delegate
|
||||
app.activate(ignoringOtherApps: true)
|
||||
app.run()
|
||||
}
|
||||
#else
|
||||
// The ShoeGaze demo is a macOS AppKit application and has no iOS entry point.
|
||||
print("ShoeGazeDemo runs on macOS only.")
|
||||
#endif
|
||||
@@ -0,0 +1,379 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 60;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
C3C000000000000000000009 /* ShoeGazeiOSDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C000000000000000000007 /* ShoeGazeiOSDemoApp.swift */; };
|
||||
C3C00000000000000000000A /* ShoeGazeiOSDemoAppModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C000000000000000000008 /* ShoeGazeiOSDemoAppModel.swift */; };
|
||||
C3C00000000000000000000B /* LyrebirdShoeGaze in Frameworks */ = {isa = PBXBuildFile; productRef = C3C00000000000000000001A /* LyrebirdShoeGaze */; };
|
||||
C3C00000000000000000000C /* LyrebirdShoeGazeUI in Frameworks */ = {isa = PBXBuildFile; productRef = C3C00000000000000000001B /* LyrebirdShoeGazeUI */; };
|
||||
C3C00000000000000000000D /* LyrebirdUI in Frameworks */ = {isa = PBXBuildFile; productRef = C3C00000000000000000001C /* LyrebirdUI */; };
|
||||
C3C00000000000000000001D /* Lyrebird in Frameworks */ = {isa = PBXBuildFile; productRef = C3C00000000000000000001E /* Lyrebird */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
C3C000000000000000000004 /* ShoeGazeiOSDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShoeGazeiOSDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C3C000000000000000000006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
C3C000000000000000000007 /* ShoeGazeiOSDemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoeGazeiOSDemoApp.swift; sourceTree = "<group>"; };
|
||||
C3C000000000000000000008 /* ShoeGazeiOSDemoAppModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoeGazeiOSDemoAppModel.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
C3C00000000000000000000F /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C3C00000000000000000000B /* LyrebirdShoeGaze in Frameworks */,
|
||||
C3C00000000000000000000C /* LyrebirdShoeGazeUI in Frameworks */,
|
||||
C3C00000000000000000000D /* LyrebirdUI in Frameworks */,
|
||||
C3C00000000000000000001D /* Lyrebird in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
C3C000000000000000000002 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C3C000000000000000000005 /* ShoeGazeiOSDemo */,
|
||||
C3C000000000000000000003 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C3C000000000000000000003 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C3C000000000000000000004 /* ShoeGazeiOSDemo.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C3C000000000000000000005 /* ShoeGazeiOSDemo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C3C000000000000000000007 /* ShoeGazeiOSDemoApp.swift */,
|
||||
C3C000000000000000000008 /* ShoeGazeiOSDemoAppModel.swift */,
|
||||
C3C000000000000000000006 /* Info.plist */,
|
||||
);
|
||||
path = ShoeGazeiOSDemo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
C3C000000000000000000011 /* ShoeGazeiOSDemo */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C3C000000000000000000012 /* Build configuration list for PBXNativeTarget "ShoeGazeiOSDemo" */;
|
||||
buildPhases = (
|
||||
C3C00000000000000000000E /* Sources */,
|
||||
C3C00000000000000000000F /* Frameworks */,
|
||||
C3C000000000000000000010 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ShoeGazeiOSDemo;
|
||||
packageProductDependencies = (
|
||||
C3C00000000000000000001A /* LyrebirdShoeGaze */,
|
||||
C3C00000000000000000001B /* LyrebirdShoeGazeUI */,
|
||||
C3C00000000000000000001C /* LyrebirdUI */,
|
||||
C3C00000000000000000001E /* Lyrebird */,
|
||||
);
|
||||
productName = ShoeGazeiOSDemo;
|
||||
productReference = C3C000000000000000000004 /* ShoeGazeiOSDemo.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
C3C000000000000000000001 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastSwiftUpdateCheck = 1600;
|
||||
LastUpgradeCheck = 2620;
|
||||
TargetAttributes = {
|
||||
C3C000000000000000000011 = {
|
||||
CreatedOnToolsVersion = 16.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = C3C000000000000000000015 /* Build configuration list for PBXProject "ShoeGazeiOSDemo" */;
|
||||
compatibilityVersion = "Xcode 14.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = C3C000000000000000000002;
|
||||
packageReferences = (
|
||||
C3C000000000000000000018 /* XCLocalSwiftPackageReference ".." */,
|
||||
C3C000000000000000000019 /* XCRemoteSwiftPackageReference "Lyrebird" */,
|
||||
);
|
||||
productRefGroup = C3C000000000000000000003 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
C3C000000000000000000011 /* ShoeGazeiOSDemo */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
C3C000000000000000000010 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
C3C00000000000000000000E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C3C000000000000000000009 /* ShoeGazeiOSDemoApp.swift in Sources */,
|
||||
C3C00000000000000000000A /* ShoeGazeiOSDemoAppModel.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C3C000000000000000000013 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGNING_REQUIRED = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = ShoeGazeiOSDemo/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.ShoeGazeiOSDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 6.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C3C000000000000000000014 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGNING_REQUIRED = NO;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = ShoeGazeiOSDemo/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.ShoeGazeiOSDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 6.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C3C000000000000000000016 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C3C000000000000000000017 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C3C000000000000000000012 /* Build configuration list for PBXNativeTarget "ShoeGazeiOSDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C3C000000000000000000013 /* Debug */,
|
||||
C3C000000000000000000014 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C3C000000000000000000015 /* Build configuration list for PBXProject "ShoeGazeiOSDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C3C000000000000000000016 /* Debug */,
|
||||
C3C000000000000000000017 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCLocalSwiftPackageReference section */
|
||||
C3C000000000000000000018 /* XCLocalSwiftPackageReference ".." */ = {
|
||||
isa = XCLocalSwiftPackageReference;
|
||||
relativePath = ..;
|
||||
};
|
||||
/* End XCLocalSwiftPackageReference section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
C3C000000000000000000019 /* XCRemoteSwiftPackageReference "Lyrebird" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://realizedsound.mooo.com/josh/Lyrebird";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 1.2.0;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
C3C00000000000000000001A /* LyrebirdShoeGaze */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = C3C000000000000000000018 /* XCLocalSwiftPackageReference ".." */;
|
||||
productName = LyrebirdShoeGaze;
|
||||
};
|
||||
C3C00000000000000000001B /* LyrebirdShoeGazeUI */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = C3C000000000000000000018 /* XCLocalSwiftPackageReference ".." */;
|
||||
productName = LyrebirdShoeGazeUI;
|
||||
};
|
||||
C3C00000000000000000001C /* LyrebirdUI */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = C3C000000000000000000019 /* XCRemoteSwiftPackageReference "Lyrebird" */;
|
||||
productName = LyrebirdUI;
|
||||
};
|
||||
C3C00000000000000000001E /* Lyrebird */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = C3C000000000000000000019 /* XCRemoteSwiftPackageReference "Lyrebird" */;
|
||||
productName = Lyrebird;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = C3C000000000000000000001 /* Project object */;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "2620"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
buildArchitectures = "Automatic">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C3C000000000000000000011"
|
||||
BuildableName = "ShoeGazeiOSDemo.app"
|
||||
BlueprintName = "ShoeGazeiOSDemo"
|
||||
ReferencedContainer = "container:ShoeGazeiOSDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C3C000000000000000000011"
|
||||
BuildableName = "ShoeGazeiOSDemo.app"
|
||||
BlueprintName = "ShoeGazeiOSDemo"
|
||||
ReferencedContainer = "container:ShoeGazeiOSDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C3C000000000000000000011"
|
||||
BuildableName = "ShoeGazeiOSDemo.app"
|
||||
BlueprintName = "ShoeGazeiOSDemo"
|
||||
ReferencedContainer = "container:ShoeGazeiOSDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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>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>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2026 Realized Sound. All rights reserved.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>ShoeGazeiOSDemo can route a hardware input channel through your pedalboard. Enable microphone access to use Live Input mode.</string>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>UILaunchScreen</key>
|
||||
<dict/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,33 @@
|
||||
// ShoeGazeiOSDemoApp.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import SwiftUI
|
||||
import LyrebirdShoeGazeUI
|
||||
|
||||
/// iOS entry point for the ShoeGaze in-repo demo.
|
||||
///
|
||||
/// Holds the `ShoeGazeiOSDemoAppModel` as `@State` so it is created once and
|
||||
/// owned for the lifetime of the app. The audio engine is **not** started
|
||||
/// automatically — the user presses Start in the pedalboard (`ShoeGazeView`) to
|
||||
/// begin audio. The engine is stopped when the view disappears.
|
||||
@main
|
||||
struct ShoeGazeiOSDemoApp: App {
|
||||
|
||||
@State private var model: ShoeGazeiOSDemoAppModel = ShoeGazeiOSDemoAppModel()
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
NavigationStack {
|
||||
ScrollView {
|
||||
ShoeGazeView(shoeGaze: model.shoeGaze)
|
||||
.padding(.horizontal, 12)
|
||||
}
|
||||
.navigationTitle("ShoeGaze")
|
||||
}
|
||||
.onDisappear { model.stop() }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// ShoeGazeiOSDemoAppModel.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import AVFoundation
|
||||
import Observation
|
||||
import LyrebirdSynth
|
||||
import LyrebirdShoeGaze
|
||||
|
||||
/// Observable model that owns the `SynthesisEngine` and `ShoeGaze` session for
|
||||
/// the ShoeGaze iOS demo.
|
||||
///
|
||||
/// The engine is not started automatically — the pedalboard's Start button
|
||||
/// (`ShoeGazeView`) drives `engine.start()`. `stop()` is called from `.onDisappear`
|
||||
/// to release audio resources when the view goes away.
|
||||
///
|
||||
/// `AVAudioSession` is activated at init so the hardware sample rate is known
|
||||
/// before the engine is constructed — iOS devices typically lock to 48 000 Hz
|
||||
/// regardless of the preferred rate, and querying the session after activation
|
||||
/// avoids pitch and timing errors.
|
||||
///
|
||||
/// The default board (Overdrive → Delay → Reverb → Modulation) uses `.testLoop`
|
||||
/// as the input source, so no microphone permission is required to run the demo.
|
||||
/// Switch to `.liveInput(channel: 0)` and set `numInputChannels: 1` in the
|
||||
/// engine init to route hardware microphone or instrument input through the board.
|
||||
@Observable
|
||||
@MainActor
|
||||
final class ShoeGazeiOSDemoAppModel {
|
||||
|
||||
// MARK: - Engine configuration constants
|
||||
|
||||
private static let blockSize: Int = 512
|
||||
private static let outputChannels: Int = 2
|
||||
private static let numAudioBuses: Int = 256
|
||||
|
||||
// MARK: - Owned objects
|
||||
|
||||
/// The active ShoeGaze pedalboard session.
|
||||
private(set) var shoeGaze: ShoeGaze
|
||||
|
||||
private let engine: SynthesisEngine
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
init() {
|
||||
// Activate the session before querying `sampleRate` so the hardware rate
|
||||
// is reported correctly (iOS locks to 48 000 Hz on most devices).
|
||||
let session: AVAudioSession = AVAudioSession.sharedInstance()
|
||||
try? session.setCategory(.playAndRecord,
|
||||
mode: .default,
|
||||
options: [.defaultToSpeaker, .allowBluetoothHFP])
|
||||
try? session.setActive(true)
|
||||
let sampleRate: Double = session.sampleRate
|
||||
|
||||
let eng: SynthesisEngine = SynthesisEngine(
|
||||
blockSize: ShoeGazeiOSDemoAppModel.blockSize,
|
||||
sampleRate: sampleRate,
|
||||
numOutputChannels: ShoeGazeiOSDemoAppModel.outputChannels,
|
||||
numInputChannels: 0,
|
||||
numAudioBuses: ShoeGazeiOSDemoAppModel.numAudioBuses,
|
||||
driver: iOSAudioDriver()
|
||||
)
|
||||
self.engine = eng
|
||||
self.shoeGaze = ShoeGaze(engine: eng)
|
||||
|
||||
do {
|
||||
let board: PedalBoard = try shoeGaze.addBoard()
|
||||
board.label = "Demo Board"
|
||||
try board.add(OverdrivePedal())
|
||||
try board.add(DelayPedal())
|
||||
try board.add(ReverbPedal())
|
||||
try board.add(ModulationPedal())
|
||||
try shoeGaze.finalizeBoard(board)
|
||||
} catch {
|
||||
print("[ShoeGazeiOSDemo] board build failed: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Transport
|
||||
|
||||
/// Starts the audio engine. Not called automatically — the pedalboard's Start
|
||||
/// button drives `engine.start()`; this is here for callers that want to start it.
|
||||
func start() {
|
||||
do {
|
||||
try engine.start()
|
||||
} catch {
|
||||
print("[ShoeGazeiOSDemo] engine.start() failed: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
/// Stops the audio engine. Call from `.onDisappear`.
|
||||
func stop() {
|
||||
engine.stop()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user