1.0.0 release

This commit is contained in:
2026-06-01 18:27:40 -07:00
parent b1ab0f102c
commit 1f20fcab20
1151 changed files with 230703 additions and 14 deletions
@@ -0,0 +1,523 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
D900000000000000000000D1 /* LyrebirdAUv3DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D900000000000000000000D0 /* LyrebirdAUv3DemoApp.swift */; };
D900000000000000000000D3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D900000000000000000000D2 /* ContentView.swift */; };
D900000000000000000000DA /* LyrebirdFMExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = E900000000000000000000E5 /* LyrebirdFMExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
E900000000000000000000E1 /* LyrebirdFM.swift in Sources */ = {isa = PBXBuildFile; fileRef = E900000000000000000000E0 /* LyrebirdFM.swift */; };
E900000000000000000000E3 /* LyrebirdFMAudioUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E900000000000000000000E2 /* LyrebirdFMAudioUnit.swift */; };
E900000000000000000000E7 /* LyrebirdFMAudioUnitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E900000000000000000000E6 /* LyrebirdFMAudioUnitViewController.swift */; };
E900000000000000000000EC /* LyrebirdUI in Frameworks */ = {isa = PBXBuildFile; productRef = F900000000000000000000FB /* LyrebirdUI */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
D900000000000000000000DC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F9000000000000000000001 /* Project object */;
proxyType = 1;
remoteGlobalIDString = E900000000000000000000E4;
remoteInfo = LyrebirdFMExtension;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
D900000000000000000000D9 /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
D900000000000000000000DA /* LyrebirdFMExtension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
D900000000000000000000C1 /* LyrebirdAUv3Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LyrebirdAUv3Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
D900000000000000000000D0 /* LyrebirdAUv3DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LyrebirdAUv3DemoApp.swift; sourceTree = "<group>"; };
D900000000000000000000D2 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
D900000000000000000000D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D900000000000000000000D5 /* LyrebirdAUv3Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LyrebirdAUv3Demo.entitlements; sourceTree = "<group>"; };
E900000000000000000000E0 /* LyrebirdFM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LyrebirdFM.swift; sourceTree = "<group>"; };
E900000000000000000000E2 /* LyrebirdFMAudioUnit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LyrebirdFMAudioUnit.swift; sourceTree = "<group>"; };
E900000000000000000000E5 /* LyrebirdFMExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = LyrebirdFMExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
E900000000000000000000E6 /* LyrebirdFMAudioUnitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LyrebirdFMAudioUnitViewController.swift; sourceTree = "<group>"; };
E900000000000000000000E8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E900000000000000000000E9 /* LyrebirdFMExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LyrebirdFMExtension.entitlements; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D900000000000000000000C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
E900000000000000000000EA /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E900000000000000000000EC /* LyrebirdUI in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F9000000000000000000002 /* Main */ = {
isa = PBXGroup;
children = (
D900000000000000000000CE /* LyrebirdAUv3Demo */,
E900000000000000000000EE /* LyrebirdFMExtension */,
F9000000000000000000003 /* Products */,
);
sourceTree = "<group>";
};
F9000000000000000000003 /* Products */ = {
isa = PBXGroup;
children = (
D900000000000000000000C1 /* LyrebirdAUv3Demo.app */,
E900000000000000000000E5 /* LyrebirdFMExtension.appex */,
);
name = Products;
sourceTree = "<group>";
};
D900000000000000000000CE /* LyrebirdAUv3Demo */ = {
isa = PBXGroup;
children = (
D900000000000000000000D0 /* LyrebirdAUv3DemoApp.swift */,
D900000000000000000000D2 /* ContentView.swift */,
D900000000000000000000D4 /* Info.plist */,
D900000000000000000000D5 /* LyrebirdAUv3Demo.entitlements */,
);
path = LyrebirdAUv3Demo;
sourceTree = "<group>";
};
E900000000000000000000EE /* LyrebirdFMExtension */ = {
isa = PBXGroup;
children = (
E900000000000000000000E0 /* LyrebirdFM.swift */,
E900000000000000000000E2 /* LyrebirdFMAudioUnit.swift */,
E900000000000000000000E6 /* LyrebirdFMAudioUnitViewController.swift */,
E900000000000000000000E8 /* Info.plist */,
E900000000000000000000E9 /* LyrebirdFMExtension.entitlements */,
);
path = LyrebirdFMExtension;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D900000000000000000000C0 /* LyrebirdAUv3Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = D900000000000000000000CA /* Build configuration list for PBXNativeTarget "LyrebirdAUv3Demo" */;
buildPhases = (
D900000000000000000000C6 /* Sources */,
D900000000000000000000C7 /* Frameworks */,
D900000000000000000000C8 /* Resources */,
D900000000000000000000D9 /* Embed App Extensions */,
);
buildRules = (
);
dependencies = (
D900000000000000000000DB /* PBXTargetDependency */,
);
name = LyrebirdAUv3Demo;
productName = LyrebirdAUv3Demo;
productReference = D900000000000000000000C1 /* LyrebirdAUv3Demo.app */;
productType = "com.apple.product-type.application";
};
E900000000000000000000E4 /* LyrebirdFMExtension */ = {
isa = PBXNativeTarget;
buildConfigurationList = E900000000000000000000ED /* Build configuration list for PBXNativeTarget "LyrebirdFMExtension" */;
buildPhases = (
E900000000000000000000EF /* Sources */,
E900000000000000000000EA /* Frameworks */,
E900000000000000000000F0 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = LyrebirdFMExtension;
packageProductDependencies = (
F900000000000000000000FB /* LyrebirdUI */,
);
productName = LyrebirdFMExtension;
productReference = E900000000000000000000E5 /* LyrebirdFMExtension.appex */;
productType = "com.apple.product-type.app-extension";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F9000000000000000000001 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 0;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 2620;
TargetAttributes = {
D900000000000000000000C0 = {
CreatedOnToolsVersion = 16.0;
};
E900000000000000000000E4 = {
CreatedOnToolsVersion = 16.0;
};
};
};
buildConfigurationList = F9000000000000000000005 /* Build configuration list for PBXProject "LyrebirdAUv3Demo" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = F9000000000000000000002;
packageReferences = (
F9000000000000000000004 /* XCLocalSwiftPackageReference "../.." */,
);
productRefGroup = F9000000000000000000003 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D900000000000000000000C0 /* LyrebirdAUv3Demo */,
E900000000000000000000E4 /* LyrebirdFMExtension */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D900000000000000000000C8 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
E900000000000000000000F0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D900000000000000000000C6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D900000000000000000000D1 /* LyrebirdAUv3DemoApp.swift in Sources */,
D900000000000000000000D3 /* ContentView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E900000000000000000000EF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E900000000000000000000E1 /* LyrebirdFM.swift in Sources */,
E900000000000000000000E3 /* LyrebirdFMAudioUnit.swift in Sources */,
E900000000000000000000E7 /* LyrebirdFMAudioUnitViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
D900000000000000000000DB /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = E900000000000000000000E4 /* LyrebirdFMExtension */;
targetProxy = D900000000000000000000DC /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
F9000000000000000000006 /* 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;
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_NS_ASSERTIONS = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 15.0;
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;
};
F9000000000000000000007 /* 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;
CODE_SIGN_STYLE = Automatic;
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;
MACOSX_DEPLOYMENT_TARGET = 15.0;
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;
};
D900000000000000000000CB /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = LyrebirdAUv3Demo/LyrebirdAUv3Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = LyrebirdAUv3Demo/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdAUv3Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
D900000000000000000000CC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = LyrebirdAUv3Demo/LyrebirdAUv3Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = LyrebirdAUv3Demo/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdAUv3Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = Release;
};
E900000000000000000000F1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = LyrebirdFMExtension/LyrebirdFMExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = LyrebirdFMExtension/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdAUv3Demo.LyrebirdFMExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
E900000000000000000000F2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = LyrebirdFMExtension/LyrebirdFMExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = LyrebirdFMExtension/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdAUv3Demo.LyrebirdFMExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F9000000000000000000005 /* Build configuration list for PBXProject "LyrebirdAUv3Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F9000000000000000000006 /* Debug */,
F9000000000000000000007 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D900000000000000000000CA /* Build configuration list for PBXNativeTarget "LyrebirdAUv3Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D900000000000000000000CB /* Debug */,
D900000000000000000000CC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E900000000000000000000ED /* Build configuration list for PBXNativeTarget "LyrebirdFMExtension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E900000000000000000000F1 /* Debug */,
E900000000000000000000F2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
F9000000000000000000004 /* XCLocalSwiftPackageReference "../.." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../..;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
F900000000000000000000FB /* LyrebirdUI */ = {
isa = XCSwiftPackageProductDependency;
package = F9000000000000000000004 /* XCLocalSwiftPackageReference "../.." */;
productName = LyrebirdUI;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = F9000000000000000000001 /* Project object */;
}
@@ -0,0 +1,24 @@
{
"originHash" : "8c7cdbbec3286a359d81508a5a793e75295e1a598c53be84529e7a375cad48be",
"pins" : [
{
"identity" : "linenoise-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/andybest/linenoise-swift",
"state" : {
"revision" : "afc897c02b030af7333105c4fedcd843a8339238",
"version" : "0.0.3"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "e9d769113660769a4d9dd3afb855562c0b7ae7b0",
"version" : "7.3.4"
}
}
],
"version" : 3
}
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2620"
version = "1.7">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D900000000000000000000C0"
BuildableName = "LyrebirdAUv3Demo.app"
BlueprintName = "LyrebirdAUv3Demo"
ReferencedContainer = "container:LyrebirdAUv3Demo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E900000000000000000000E4"
BuildableName = "LyrebirdFMExtension.appex"
BlueprintName = "LyrebirdFMExtension"
ReferencedContainer = "container:LyrebirdAUv3Demo.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 = "D900000000000000000000C0"
BuildableName = "LyrebirdAUv3Demo.app"
BlueprintName = "LyrebirdAUv3Demo"
ReferencedContainer = "container:LyrebirdAUv3Demo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D900000000000000000000C0"
BuildableName = "LyrebirdAUv3Demo.app"
BlueprintName = "LyrebirdAUv3Demo"
ReferencedContainer = "container:LyrebirdAUv3Demo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,25 @@
// ContentView.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(alignment: .leading, spacing: 12) {
Text("LyrebirdFM AUv3")
.font(.title)
.bold()
Text("Run this app once so macOS registers the bundled AUv3 extension. After that, load **Realized Sound: LyrebirdFM** from any AUv3 host — Logic, GarageBand, AUM, Loopy Pro, etc.")
.font(.body)
Spacer()
Text("Lyrebird AUv3 demo")
.font(.caption)
.foregroundStyle(.secondary)
}
.padding(24)
.frame(minWidth: 480, minHeight: 240)
}
}
@@ -0,0 +1,26 @@
<?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>$(DEVELOPMENT_LANGUAGE)</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>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2026 Realized Sound. All rights reserved.</string>
</dict>
</plist>
@@ -0,0 +1,10 @@
<?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/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,23 @@
// LyrebirdAUv3DemoApp.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
/// Container app for the LyrebirdFM AUv3 extension.
///
/// Installing this app is what registers the bundled `.appex` extension
/// with the system AU registry. The app itself is a minimal SwiftUI
/// placeholder — its only purpose is to ship the extension. Use the AU
/// from any AUv3 host (Logic, GarageBand, AUM, Loopy Pro, etc.) after
/// running the app once.
@main
struct LyrebirdAUv3DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
@@ -0,0 +1,59 @@
<?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>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>LyrebirdFM</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>AudioComponentBundle</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>AudioComponents</key>
<array>
<dict>
<key>name</key>
<string>Realized Sound: LyrebirdFM</string>
<key>description</key>
<string>Two-operator FM synthesizer (Lyrebird demo)</string>
<key>type</key>
<string>aumu</string>
<key>subtype</key>
<string>LBFM</string>
<key>manufacturer</key>
<string>RLZS</string>
<key>version</key>
<integer>65536</integer>
<key>sandboxSafe</key>
<true/>
<key>tags</key>
<array>
<string>Synth</string>
</array>
</dict>
</array>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.AudioUnit-UI</string>
<key>NSExtensionPrincipalClass</key>
<string>LyrebirdFMExtension.LyrebirdFMAudioUnitViewController</string>
</dict>
</dict>
</plist>
@@ -0,0 +1,44 @@
// LyrebirdFM.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Two-operator FM synthesizer used by the AUv3 demo extension.
///
/// Carrier and modulator are both `OscSin.Audio`. The modulator's output is
/// added to the carrier's frequency input; modulation depth is
/// `modIndex * carrierFreq` so the index reads as a unitless ratio (1.0 ≈
/// one octave of FM bandwidth at the carrier).
///
/// All four `@LiveParam`s map onto AU parameters in `LyrebirdFMAudioUnit`'s
/// `parameterMetadata()` table.
final class LyrebirdFM: SynthesizerBase {
/// Carrier frequency in Hz. Range [20, 8000]. Default 440 (A4).
@LiveParam var carrierFreq: Double = 440.0
/// Modulator-to-carrier frequency ratio. Range [0.25, 16]. Default 2.0
/// (one octave above carrier — produces an even-harmonic-rich timbre).
@LiveParam var modRatio: Double = 2.0
/// Modulation index (unitless). Range [0, 8]. Default 0.5 — mild
/// modulation; sounds close to a sine with extra brightness.
@LiveParam var modIndex: Double = 0.5
/// Output amplitude. Range [0, 1]. Default 0.3 — leaves headroom.
@LiveParam var amp: Double = 0.3
override func build() {
let modFreq = $carrierFreq * $modRatio
let modDepth = $modIndex * $carrierFreq
let modulator = OscSin.Audio(freq: modFreq, mul: modDepth)
let carrier = OscSin.Audio(freq: $carrierFreq + modulator)
let voice = carrier * $amp
// Mono → both stereo channels for AUv3 host compatibility.
output(bus: 0, source: voice)
output(bus: 1, source: voice)
}
}
@@ -0,0 +1,33 @@
// LyrebirdFMAudioUnit.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import AVFoundation
import AudioToolbox
/// AUv3 wrapper around `LyrebirdFM`. Subclasses ``LyrebirdAudioUnit`` and
/// only overrides the two required hooks: `makeSynthesizer()` and
/// `parameterMetadata()`.
///
/// The `AudioComponentDescription` (type `aumu`, subtype `LBFM`,
/// manufacturer `RLZS`) is declared in `Info.plist`'s `AudioComponents`
/// array; this class is instantiated by the AU host via
/// `NSExtensionPrincipalClass` resolution.
public final class LyrebirdFMAudioUnit: LyrebirdAudioUnit {
public override class func makeSynthesizer() -> SynthesizerBase {
LyrebirdFM()
}
public override class func parameterMetadata() -> [String: LyrebirdAUParameterInfo] {
[
"carrierFreq": .init(min: 20, max: 8000, unit: .hertz, displayName: "Carrier Freq"),
"modRatio": .init(min: 0.25, max: 16, unit: .generic, displayName: "Mod Ratio"),
"modIndex": .init(min: 0, max: 8, unit: .generic, displayName: "Mod Index"),
"amp": .init(min: 0, max: 1, unit: .linearGain, displayName: "Output Amp"),
]
}
}
@@ -0,0 +1,38 @@
// LyrebirdFMAudioUnitViewController.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import CoreAudioKit
import AVFoundation
/// AUv3 view controller + factory.
///
/// `AUAudioUnitFactory` conformance is how AUv3 hosts instantiate the
/// underlying `AUAudioUnit` — the host loads this view controller as the
/// extension's `NSExtensionPrincipalClass`, calls
/// `createAudioUnit(with:)`, and the resulting AU is what handles render.
///
/// Ships an empty placeholder view. Drop in `LyrebirdSynthView` (from
/// `LyrebirdUI`) to get a Mirror-driven SwiftUI parameter grid.
public final class LyrebirdFMAudioUnitViewController: AUViewController, AUAudioUnitFactory {
/// Strong reference to the AU once `createAudioUnit(with:)` builds it.
/// The host keeps a separate reference; this is held so a SwiftUI view
/// added on top can read parameters from the same instance.
public private(set) var audioUnit: AUAudioUnit?
public override func viewDidLoad() {
super.viewDidLoad()
// Empty stub — install a SwiftUI host (e.g. `LyrebirdSynthView`) here.
}
public func createAudioUnit(
with componentDescription: AudioComponentDescription
) throws -> AUAudioUnit {
let au = try LyrebirdFMAudioUnit(componentDescription: componentDescription)
audioUnit = au
return au
}
}
@@ -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>
+156
View File
@@ -0,0 +1,156 @@
# LyrebirdAUv3Demo
Reference AUv3 plugin built on Lyrebird's `LyrebirdAudioUnit`. Ships
**Realized Sound: LyrebirdFM** — a two-operator FM synthesizer — as an
`aumu` instrument loadable in any AUv3 host (Logic, GarageBand, AUM,
Loopy Pro, etc.).
Copy this directory as the starting point for your own Lyrebird-based
AUv3 plugin.
## Layout
```
LyrebirdAUv3Demo/
LyrebirdAUv3Demo.xcodeproj Hand-written Xcode project (app + extension)
LyrebirdAUv3Demo/ Container app target (.app)
LyrebirdAUv3DemoApp.swift SwiftUI app entry — minimal
ContentView.swift One-screen "installer" view
Info.plist
LyrebirdAUv3Demo.entitlements App sandbox
LyrebirdFMExtension/ AUv3 extension target (.appex)
LyrebirdFM.swift The two-op FM SynthesizerBase subclass
LyrebirdFMAudioUnit.swift LyrebirdAudioUnit subclass (metadata + factory)
LyrebirdFMAudioUnitViewController.swift AUViewController + AUAudioUnitFactory stub
Info.plist AudioComponents (aumu / LBFM / RLZS)
LyrebirdFMExtension.entitlements App-extension sandbox
```
## Build
### From the command line
```bash
xcodebuild \
-project Demos/LyrebirdAUv3Demo/LyrebirdAUv3Demo.xcodeproj \
-scheme LyrebirdAUv3Demo \
-configuration Release \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
SWIFT_USE_INTEGRATED_DRIVER=NO \
build
```
`SWIFT_USE_INTEGRATED_DRIVER=NO` is the Xcode 26 workaround documented
elsewhere in the Lyrebird build notes; it disables explicit-module-build
so SPM dynamic-framework modules resolve correctly. The
`CODE_SIGN_IDENTITY="-"` triple disables signing entirely for local
builds — for distribution you must set `DEVELOPMENT_TEAM` to your Apple
Developer Team ID and use `Automatic` signing.
### From Xcode
1. Open `LyrebirdAUv3Demo.xcodeproj`.
2. Pick the **LyrebirdAUv3Demo** scheme.
3. In each target's Signing & Capabilities tab, set your Team. The
bundle ID `net.realizedsound.LyrebirdAUv3Demo` is a Realized-Sound
placeholder — change to a prefix you own.
4. Add `SWIFT_USE_INTEGRATED_DRIVER = NO` under each target's
Build Settings → User-Defined (or set it project-wide). Required on
Xcode 26+.
5. **Build & Run** the container app once. This registers the embedded
extension with the AU registry.
## Validate with auval
After running the container app at least once so the extension is
registered:
```bash
auval -v aumu LBFM RLZS
```
A `PASS` summary is what you want. Common gotchas the wrapper already
handles:
- `latency` returns 0 (`LyrebirdAudioUnit.latency`).
- `tailTime` returns 0 (instrument has no internal tail).
- `parameterTree` is populated synchronously in `init`, so `auval`
sees it before render.
- `internalRenderBlock` returns `noErr` and writes valid samples.
- `maximumFramesToRender` is honoured by `AUv3Driver` via ring sizing.
If you see "Cannot get Component's Name strings" or "didn't find the
component", the extension was not registered. Either the container app
has not been launched yet, or `lsregister` did not pick it up. Re-run
the container app from Xcode, then re-run `auval`.
## Smoke test in a host
1. **Logic Pro / GarageBand**: Track → New Software Instrument → AU
Instruments → Realized Sound → LyrebirdFM. Play a few MIDI notes
(this template ships no MIDI handler — the plugin instantiates and
accepts parameter automation, but won't respond to note input until
you wire `LyrebirdAudioUnit.midiHandler`; see [`AUv3.md`](../../Sources/Lyrebird/Lyrebird.docc/AUv3.md)).
2. **AUM / Loopy Pro** (iOS): same idea once the iOS variant of this
demo lands.
## What's in the wrapper
`LyrebirdFMAudioUnit` is the entire wrapper:
```swift
public final class LyrebirdFMAudioUnit: LyrebirdAudioUnit {
public override class func makeSynthesizer() -> SynthesizerBase { LyrebirdFM() }
public override class func parameterMetadata() -> [String: LyrebirdAUParameterInfo] {
[
"carrierFreq": .init(min: 20, max: 8000, unit: .hertz, displayName: "Carrier Freq"),
"modRatio": .init(min: 0.25, max: 16, unit: .generic, displayName: "Mod Ratio"),
"modIndex": .init(min: 0, max: 8, unit: .generic, displayName: "Mod Index"),
"amp": .init(min: 0, max: 1, unit: .linearGain, displayName: "Output Amp"),
]
}
}
```
`LyrebirdAudioUnit` does the rest: parameter tree from `Mirror`, engine
lifecycle, ring-buffered render, `fullState` save / restore. See
[`Sources/Lyrebird/Lyrebird.docc/AUv3.md`](../../Sources/Lyrebird/Lyrebird.docc/AUv3.md)
for the full API surface.
## Copying this template
To ship your own AUv3 plugin:
1. Duplicate `Demos/LyrebirdAUv3Demo/` under a new name.
2. Replace `LyrebirdFM` with your own `SynthesizerBase` subclass.
3. Update `componentSubType` (4-char code, must be unique to your
plugin) and `manufacturer` (your 4-char manufacturer code) in
the extension's `Info.plist → NSExtension → NSExtensionAttributes
→ AudioComponents`.
4. Update `PRODUCT_BUNDLE_IDENTIFIER` in both targets'
build settings to your own reverse-DNS prefix.
5. Replace `Realized Sound: LyrebirdFM` strings with your own
manufacturer + plugin name.
6. Rebuild, run, `auval -v <type> <subType> <manufacturer>`.
## Not yet wired in this template
The framework supports all of the following — this particular demo
template just doesn't include them yet. Each is a follow-up exercise
when copying the template:
- MIDI note input — set `au.midiHandler` and dispatch via
``LyrebirdAUVoicePoolBinding``.
- SwiftUI parameter UI in the view controller — drop in
``LyrebirdSynthView`` (see [`LyrebirdSynthView`](../../Sources/LyrebirdUI/LyrebirdSynthView.swift)).
- Source-slot preset save/restore — conform any source generator to
``LyrebirdAUPresetCodable`` and register it.
- Effect-type AU (`aufx`) — override ``LyrebirdAudioUnit/lyrebirdInputChannels``
and read host audio via ``AUInput/Audio``.
- iOS container app target — duplicate the Mac app target and switch
the platform.
The demo deliberately ships the smallest cut that proves the wrapper
loads and validates.
@@ -0,0 +1,400 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
0306C7C02FAC451300952EAF /* GVerbTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0306C7BF2FAC451300952EAF /* GVerbTest.swift */; };
0306C7C22FAC45F200952EAF /* ReverbDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0306C7C12FAC45F200952EAF /* ReverbDemo.swift */; };
035A2F422FAA4F67007F6289 /* PercPitchShift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035A2F3F2FAA4F67007F6289 /* PercPitchShift.swift */; };
035A2F432FAA4F67007F6289 /* PercSpectralPitchShift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035A2F412FAA4F67007F6289 /* PercSpectralPitchShift.swift */; };
035A2F482FAA4F67007F6289 /* PercSpectralStereoDiffuse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035A2F492FAA4F67007F6289 /* PercSpectralStereoDiffuse.swift */; };
035A2F442FAA4F67007F6289 /* PercBufferRead.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035A2F3E2FAA4F67007F6289 /* PercBufferRead.swift */; };
035A2F452FAA4F67007F6289 /* PercPlayBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035A2F402FAA4F67007F6289 /* PercPlayBuffer.swift */; };
035A2F472FAA6950007F6289 /* PercTimeStretch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035A2F462FAA6950007F6289 /* PercTimeStretch.swift */; };
035B00012FAB0000007F0001 /* DemoProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035B00032FAB0000007F0001 /* DemoProtocol.swift */; };
035B00022FAB0000007F0001 /* BufferDemos.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035B00042FAB0000007F0001 /* BufferDemos.swift */; };
C1A000000000000000000007 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1A000000000000000000006 /* main.swift */; };
C1A000000000000000000013 /* Lyrebird in Frameworks */ = {isa = PBXBuildFile; productRef = C1A000000000000000000012 /* Lyrebird */; };
C1A000000000000000000016 /* SineTone.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1A000000000000000000014 /* SineTone.swift */; };
C1A000000000000000000017 /* DelaySample.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1A000000000000000000015 /* DelaySample.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0306C7BF2FAC451300952EAF /* GVerbTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GVerbTest.swift; sourceTree = "<group>"; };
0306C7C12FAC45F200952EAF /* ReverbDemo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReverbDemo.swift; sourceTree = "<group>"; };
035A2F3E2FAA4F67007F6289 /* PercBufferRead.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PercBufferRead.swift; sourceTree = "<group>"; };
035A2F3F2FAA4F67007F6289 /* PercPitchShift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PercPitchShift.swift; sourceTree = "<group>"; };
035A2F402FAA4F67007F6289 /* PercPlayBuffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PercPlayBuffer.swift; sourceTree = "<group>"; };
035A2F412FAA4F67007F6289 /* PercSpectralPitchShift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PercSpectralPitchShift.swift; sourceTree = "<group>"; };
035A2F492FAA4F67007F6289 /* PercSpectralStereoDiffuse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PercSpectralStereoDiffuse.swift; sourceTree = "<group>"; };
035A2F462FAA6950007F6289 /* PercTimeStretch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PercTimeStretch.swift; sourceTree = "<group>"; };
035B00032FAB0000007F0001 /* DemoProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoProtocol.swift; sourceTree = "<group>"; };
035B00042FAB0000007F0001 /* BufferDemos.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BufferDemos.swift; sourceTree = "<group>"; };
C1A000000000000000000004 /* LyrebirdDemo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = LyrebirdDemo; sourceTree = BUILT_PRODUCTS_DIR; };
C1A000000000000000000006 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
C1A000000000000000000014 /* SineTone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SineTone.swift; sourceTree = "<group>"; };
C1A000000000000000000015 /* DelaySample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DelaySample.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
C1A000000000000000000009 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C1A000000000000000000013 /* Lyrebird in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
035B00052FAB0000007F0001 /* Demos */ = {
isa = PBXGroup;
children = (
0306C7C12FAC45F200952EAF /* ReverbDemo.swift */,
035B00032FAB0000007F0001 /* DemoProtocol.swift */,
035B00042FAB0000007F0001 /* BufferDemos.swift */,
);
path = Demos;
sourceTree = "<group>";
};
035B00062FAB0000007F0001 /* Buffer */ = {
isa = PBXGroup;
children = (
035A2F3E2FAA4F67007F6289 /* PercBufferRead.swift */,
035A2F402FAA4F67007F6289 /* PercPlayBuffer.swift */,
);
path = Buffer;
sourceTree = "<group>";
};
035B00072FAB0000007F0001 /* Granular */ = {
isa = PBXGroup;
children = (
035A2F3F2FAA4F67007F6289 /* PercPitchShift.swift */,
035A2F462FAA6950007F6289 /* PercTimeStretch.swift */,
);
path = Granular;
sourceTree = "<group>";
};
035B00082FAB0000007F0001 /* Spectral */ = {
isa = PBXGroup;
children = (
035A2F412FAA4F67007F6289 /* PercSpectralPitchShift.swift */,
035A2F492FAA4F67007F6289 /* PercSpectralStereoDiffuse.swift */,
);
path = Spectral;
sourceTree = "<group>";
};
035B00092FAB0000007F0001 /* General */ = {
isa = PBXGroup;
children = (
C1A000000000000000000015 /* DelaySample.swift */,
C1A000000000000000000014 /* SineTone.swift */,
);
path = General;
sourceTree = "<group>";
};
C1A000000000000000000002 = {
isa = PBXGroup;
children = (
C1A000000000000000000005 /* LyrebirdDemo */,
C1A000000000000000000003 /* Products */,
);
sourceTree = "<group>";
};
C1A000000000000000000003 /* Products */ = {
isa = PBXGroup;
children = (
C1A000000000000000000004 /* LyrebirdDemo */,
);
name = Products;
sourceTree = "<group>";
};
C1A000000000000000000005 /* LyrebirdDemo */ = {
isa = PBXGroup;
children = (
C1A000000000000000000006 /* main.swift */,
035B00052FAB0000007F0001 /* Demos */,
C1A000000000000000000018 /* Synthesizers */,
);
path = LyrebirdDemo;
sourceTree = "<group>";
};
C1A000000000000000000018 /* Synthesizers */ = {
isa = PBXGroup;
children = (
0306C7BF2FAC451300952EAF /* GVerbTest.swift */,
035B00062FAB0000007F0001 /* Buffer */,
035B00072FAB0000007F0001 /* Granular */,
035B00082FAB0000007F0001 /* Spectral */,
035B00092FAB0000007F0001 /* General */,
);
path = Synthesizers;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
C1A00000000000000000000A /* LyrebirdDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = C1A00000000000000000000B /* Build configuration list for PBXNativeTarget "LyrebirdDemo" */;
buildPhases = (
C1A000000000000000000008 /* Sources */,
C1A000000000000000000009 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = LyrebirdDemo;
packageProductDependencies = (
C1A000000000000000000012 /* Lyrebird */,
);
productName = LyrebirdDemo;
productReference = C1A000000000000000000004 /* LyrebirdDemo */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
C1A000000000000000000001 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 2620;
TargetAttributes = {
C1A00000000000000000000A = {
CreatedOnToolsVersion = 16.0;
};
};
};
buildConfigurationList = C1A00000000000000000000E /* Build configuration list for PBXProject "LyrebirdDemo" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = C1A000000000000000000002;
packageReferences = (
C1A000000000000000000011 /* XCLocalSwiftPackageReference "../.." */,
);
productRefGroup = C1A000000000000000000003 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C1A00000000000000000000A /* LyrebirdDemo */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
C1A000000000000000000008 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
035B00012FAB0000007F0001 /* DemoProtocol.swift in Sources */,
035B00022FAB0000007F0001 /* BufferDemos.swift in Sources */,
0306C7C02FAC451300952EAF /* GVerbTest.swift in Sources */,
035A2F422FAA4F67007F6289 /* PercPitchShift.swift in Sources */,
035A2F432FAA4F67007F6289 /* PercSpectralPitchShift.swift in Sources */,
035A2F482FAA4F67007F6289 /* PercSpectralStereoDiffuse.swift in Sources */,
035A2F442FAA4F67007F6289 /* PercBufferRead.swift in Sources */,
0306C7C22FAC45F200952EAF /* ReverbDemo.swift in Sources */,
035A2F452FAA4F67007F6289 /* PercPlayBuffer.swift in Sources */,
C1A000000000000000000007 /* main.swift in Sources */,
C1A000000000000000000016 /* SineTone.swift in Sources */,
035A2F472FAA6950007F6289 /* PercTimeStretch.swift in Sources */,
C1A000000000000000000017 /* DelaySample.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
C1A00000000000000000000C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
MACOSX_DEPLOYMENT_TARGET = 15.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 6.0;
};
name = Debug;
};
C1A00000000000000000000D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEAD_CODE_STRIPPING = YES;
MACOSX_DEPLOYMENT_TARGET = 15.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 6.0;
};
name = Release;
};
C1A00000000000000000000F /* 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;
};
C1A000000000000000000010 /* 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 */
C1A00000000000000000000B /* Build configuration list for PBXNativeTarget "LyrebirdDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C1A00000000000000000000C /* Debug */,
C1A00000000000000000000D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C1A00000000000000000000E /* Build configuration list for PBXProject "LyrebirdDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C1A00000000000000000000F /* Debug */,
C1A000000000000000000010 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
C1A000000000000000000011 /* XCLocalSwiftPackageReference "../.." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../..;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
C1A000000000000000000012 /* Lyrebird */ = {
isa = XCSwiftPackageProductDependency;
package = C1A000000000000000000011 /* XCLocalSwiftPackageReference "../.." */;
productName = Lyrebird;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = C1A000000000000000000001 /* Project object */;
}
@@ -0,0 +1,24 @@
{
"originHash" : "2c98cd4172bcfb3eff9cb6e34a538f80f5e424aa73fbd5bea2b20cf0c8b539b7",
"pins" : [
{
"identity" : "linenoise-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/andybest/linenoise-swift",
"state" : {
"revision" : "afc897c02b030af7333105c4fedcd843a8339238",
"version" : "0.0.3"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "e9d769113660769a4d9dd3afb855562c0b7ae7b0",
"version" : "7.3.4"
}
}
],
"version" : 3
}
@@ -0,0 +1,79 @@
<?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 = "C1A00000000000000000000A"
BuildableName = "LyrebirdDemo"
BlueprintName = "LyrebirdDemo"
ReferencedContainer = "container:LyrebirdDemo.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"
viewDebuggingEnabled = "No">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1A00000000000000000000A"
BuildableName = "LyrebirdDemo"
BlueprintName = "LyrebirdDemo"
ReferencedContainer = "container:LyrebirdDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1A00000000000000000000A"
BuildableName = "LyrebirdDemo"
BlueprintName = "LyrebirdDemo"
ReferencedContainer = "container:LyrebirdDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,136 @@
// BufferDemos.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Foundation
import LyrebirdSynth
final class BufferDemos: DemoProtocol {
private let engine: SynthesisEngine
init(engine: SynthesisEngine) {
self.engine = engine
}
func runDemo() {
// BufferDemos.swift lives at .../Demos/LyrebirdDemo/LyrebirdDemo/Demos/BufferDemos.swift
// — 4 components up to reach .../Demos/ where Perc.aiff lives.
let percURL = URL(fileURLWithPath: #filePath)
.deletingLastPathComponent() // .../Demos/
.deletingLastPathComponent() // .../LyrebirdDemo/
.deletingLastPathComponent() // .../LyrebirdDemo (package)/
.deletingLastPathComponent() // .../Demos/
.appendingPathComponent("Mozart.aiff")
let percBuffer: LyrebirdBuffer
do {
percBuffer = try LyrebirdBuffer.load(url: percURL)
print("Loaded \(percURL.lastPathComponent): \(percBuffer.count) frames, SR \(percBuffer.sampleRate.map { "\($0) Hz" } ?? "unknown")")
} catch {
print("Failed to load Perc.aiff: \(error)")
engine.stop()
exit(1)
}
let sampleRate = engine.sampleRate
LyrebirdTask.run(engine: engine) { ctx in
// Demo 1 — PlayBuffer (looping at native rate)
print("\n── Demo 1: PlayBuffer (looping) ──")
let demo1 = PercPlayBuffer(buffer: percBuffer, engineSampleRate: sampleRate)
ctx.add(demo1)
try ctx.wait(seconds: 6)
ctx.remove(demo1)
try ctx.wait(seconds: 0.2)
// Demo 2 — BufferRead (sine-wave position scan)
print("\n── Demo 2: BufferRead (sine-wave position scan) ──")
let demo2 = PercBufferRead(buffer: percBuffer)
ctx.add(demo2)
try ctx.wait(seconds: 6)
ctx.remove(demo2)
try ctx.wait(seconds: 0.2)
// Demo 3 — PlayBuffer → PitchShift (cycling through pitch ratios)
print("\n── Demo 3: PlayBuffer → PitchShift ──")
let demo3 = PercPitchShift(buffer: percBuffer, engineSampleRate: sampleRate)
ctx.add(demo3)
let pitchSteps: [(Double, String)] = [
(0.5, "0.5 — octave down"),
(0.75, "0.75 — minor third down"),
(1.0, "1.0 — original pitch"),
(1.5, "1.5 — perfect fifth up"),
(2.0, "2.0 — octave up"),
]
for (ratio, label) in pitchSteps {
print(" pitchRatio \(label)")
demo3.pitchRatio = ratio
try ctx.wait(seconds: 3)
}
ctx.remove(demo3)
try ctx.wait(seconds: 0.5)
// Demo 4 — PlayBuffer → SpectralChain.Audio (with SpectralPitchShift)
print("\n── Demo 4: PlayBuffer → SpectralChain.Audio (SpectralPitchShift) ──")
let spectralRatios: [(Double, String)] = [
(0.5, "0.5 — octave down (phase vocoder)"),
(1.0, "1.0 — no shift (phase vocoder passthrough)"),
(1.5, "1.5 — perfect fifth up (phase vocoder)"),
(2.0, "2.0 — octave up (phase vocoder)"),
]
for (ratio, label) in spectralRatios {
print(" pitchRatio \(label)")
let demo4 = PercSpectralPitchShift(buffer: percBuffer, pitchRatio: ratio, engineSampleRate: sampleRate)
ctx.add(demo4)
try ctx.wait(seconds: 5)
ctx.remove(demo4)
try ctx.wait(seconds: 0.3)
}
// Demo 5 — SpectralChain.Audio fan-out (mono → 2-channel decorrelated stereo)
print("\n── Demo 5: SpectralChain.Audio fan-out (SpectralStereoDiffuse) ──")
let diffuseSteps: [(Double, String)] = [
(0.0, "0.0 — bypass (mono passthrough on both channels)"),
(0.5, "0.5 — half decorrelation"),
(1.0, "1.0 — full per-channel phase randomisation"),
]
for (amount, label) in diffuseSteps {
print(" amount \(label)")
let demo5 = PercSpectralStereoDiffuse(
buffer: percBuffer, amount: amount, engineSampleRate: sampleRate)
ctx.add(demo5)
try ctx.wait(seconds: 5)
ctx.remove(demo5)
try ctx.wait(seconds: 0.3)
}
// Demo 6 — TimeStretch (granular, pitch-preserved time stretching + compression)
print("\n── Demo 6: TimeStretch (granular time-stretch / compression) ──")
let stretchSteps: [(Double, String)] = [
(3.0, "3.0 — 3× stretch (one-third speed, pitch preserved)"),
(1.5, "1.5 — 1.5× stretch (three-quarter speed, pitch preserved)"),
(1.0, "1.0 — native speed (no stretch)"),
(0.5, "0.5 — 2× compression (double speed, pitch preserved)"),
(0.33, "0.33 — 3× compression (triple speed, pitch preserved)"),
]
for (factor, label) in stretchSteps {
print(" stretchFactor \(label)")
let demo6 = PercTimeStretch(buffer: percBuffer, stretchFactor: factor)
ctx.add(demo6)
try ctx.wait(seconds: 6)
ctx.remove(demo6)
try ctx.wait(seconds: 0.3)
}
print("\nAll buffer demos complete.")
}
}
}
@@ -0,0 +1,11 @@
// DemoProtocol.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
protocol DemoProtocol {
func runDemo()
}
@@ -0,0 +1,42 @@
// ReverbDemo.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
//
// BufferDemos 2.swift
// LyrebirdDemo
//
// Created by Joshua Parmenter on 5/6/26.
//
import Foundation
import LyrebirdSynth
final class ReverbDemo: DemoProtocol {
private let engine: SynthesisEngine
init(engine: SynthesisEngine) {
self.engine = engine
}
func runDemo() {
let sampleRate = engine.sampleRate
// sets up its own thread / timing, etc
LyrebirdTask.run(engine: engine) { [sampleRate] ctx in
ctx.tempo = 60.0
let reverbDemo = GVerbTest(
sampleRate: sampleRate
)
ctx.add(reverbDemo)
try ctx.wait(beats: 6) // could also use seconds
ctx.remove(reverbDemo)
print("\nAll buffer demos complete.")
}
}
}
@@ -0,0 +1,36 @@
// PercBufferRead.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// BufferRead demo — normalized-position random-access playback driven by a sine-wave position.
///
/// `BufferRead.Audio` has no internal play-head; position `[0,1]` is entirely external.
/// Here an `OscSin` at the buffer's natural loop frequency is mapped from `[-1, 1]` to `[0, 1]`
/// to sweep forward and backward through the sample sinusoidally. This produces a natural
/// pitch-warping effect as the scan accelerates through the middle and slows at the ends.
///
/// For a true sawtooth scan (constant-speed linear loop), replace the position expression
/// with a dedicated `Phasor.Audio` when available in the stdlib.
final class PercBufferRead: SynthesizerBase {
let buffer: LyrebirdBuffer
init(buffer: LyrebirdBuffer) {
self.buffer = buffer
super.init()
}
override func build() {
// phasorFrequency: frequency at which a linear phasor sweeps 0→1 in one buffer duration.
let scanFreq = buffer.phasorFrequency ?? 1.0
// Sine at scanFreq maps [-1, 1] → [0, 1] giving a smooth forward+backward position sweep.
let position = (OscSin.Audio(freq: scanFreq) + 1.0) * 0.5
let reader = BufferRead.Audio(buffer: buffer, position: position, interpolation: .linear)
output(bus: 0, source: Pan2(input: reader[0], mul: 0.6))
}
}
@@ -0,0 +1,30 @@
// PercPlayBuffer.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Looping PlayBuffer demo — plays `Perc.aiff` in a continuous loop at native sample rate.
///
/// `nativeRateScale` compensates for any mismatch between the file's sample rate and the
/// engine's sample rate. For a stereo engine the mono buffer's single channel is centred
/// via `Pan2`.
final class PercPlayBuffer: SynthesizerBase {
let buffer: LyrebirdBuffer
let engineSampleRate: Double
init(buffer: LyrebirdBuffer, engineSampleRate: Double) {
self.buffer = buffer
self.engineSampleRate = engineSampleRate
super.init()
}
override func build() {
// Compensate for any file SR ≠ engine SR (e.g. 44.1 kHz file in 48 kHz engine).
let rateScale = buffer.nativeRateScale(engineSampleRate: engineSampleRate)
let player = PlayBuffer.Audio(buffer: buffer, loop: true, rate: rateScale)
output(bus: 0, source: Pan2(input: player[0], mul: 0.6))
}
}
@@ -0,0 +1,35 @@
// GVerbTest.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
//
// GVerbTest.swift
// LyrebirdDemo
//
// Created by Joshua Parmenter on 5/6/26.
//
import LyrebirdSynth
final class GVerbTest: SynthesizerBase {
private let sampleRate: Double
init(sampleRate: Double) {
self.sampleRate = sampleRate
}
override func build() {
let impulse = Impulse.Audio(freq: 0.5)
let reverb = GVerb.Audio(source: impulse,
roomSize: 70.0,
reverbTime: 3.0,
earlyLevel: 0.4,
tailLevel: 0.9,
dryLevel: 0.1,
sampleRate: sampleRate
)
output(bus: 0, source: reverb)
}
}
@@ -0,0 +1,30 @@
// DelaySample.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
final class DelaySample: SynthesizerBase {
let delayTime: any ValidGeneratorInput
let amp: any ValidGeneratorInput
init(delayTime: any ValidGeneratorInput, amp: any ValidGeneratorInput = 0.2) {
self.delayTime = delayTime
self.amp = amp
super.init()
}
override func build() {
let testTone = OscSin.Audio(freq: 220.0) * 0.1
let delay = DelayLine(
input: testTone,
maxDelay: 2.0,
delay: delayTime + (OscSin.Audio(freq: 0.4) * 0.05),
interpolation: DelayInterpolation.cubic
)
output(bus: 0, source: testTone)
output(bus: 1, source: delay)
}
}
@@ -0,0 +1,46 @@
// SineTone.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Stereo sine tone with runtime-updatable frequency and amplitude.
///
/// Parameters are declared as `@LiveParam` properties, backed by `ParameterNode` — a
/// lock-free atomic `AudioGenerator`. Setting a property on the main thread issues a
/// releasing atomic store; the RT thread picks up the new value at the start of the next
/// block and linearly ramps to it over the block, preventing clicks on frequency jumps.
///
/// Usage:
/// ```swift
/// let tone = SineTone()
/// try engine.add(tone)
/// Thread.sleep(forTimeInterval: 2.0)
/// tone.freq = 880.0 // no try, no string — RT-safe atomic write
/// ```
final class SineTone: SynthesizerBase {
let freq: any ValidGeneratorInput
let amp: any ValidGeneratorInput
let outbus: AudioBus
init(
freq: any ValidGeneratorInput,
amp: any ValidGeneratorInput = 0.2,
outbus: AudioBus
) {
self.freq = freq
self.amp = amp
self.outbus = outbus
super.init()
}
override func build() {
// $freq and $amp are ParameterNodes (AudioGenerator) — OscSin detects them as
// generators and requests a full per-sample interpolated block each block.
let osc = OscSin.Audio(freq: freq)
output(bus: outbus.index, source: Pan2(input: osc * amp))
}
}
@@ -0,0 +1,47 @@
// PercPitchShift.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Granular pitch-shift demo — looping PlayBuffer fed into TuneablePitchShift.Audio.
///
/// `pitchRatio` is a `@LiveParam`-backed `ParameterNode` wired directly into
/// `TuneablePitchShift.Audio`. Updating `synth.pitchRatio` on the main thread issues an
/// atomic store; the RT thread ramps to the new value at the next block boundary.
///
/// Pitch ratios:
/// 0.5 = one octave down
/// 0.75 = a minor third down
/// 1.0 = no shift (original pitch)
/// 1.5 = a perfect fifth up
/// 2.0 = one octave up
final class PercPitchShift: SynthesizerBase {
let buffer: LyrebirdBuffer
let engineSampleRate: Double
@LiveParam var pitchRatio: Double = 1.0
init(buffer: LyrebirdBuffer, engineSampleRate: Double) {
self.buffer = buffer
self.engineSampleRate = engineSampleRate
super.init()
}
override func build() {
let rateScale = buffer.nativeRateScale(engineSampleRate: engineSampleRate)
let player = PlayBuffer.Audio(buffer: buffer, loop: true, rate: rateScale)
// $pitchRatio is a ParameterNode — polled once per block by TuneablePitchShift.
let shifted = TuneablePitchShift.Audio(
input: player[0],
pitchRatio: $pitchRatio,
windowSize: 0.11,
overlap: 4,
timeDispersion: 0.01,
interpolation: .cubic
)
output(bus: 0, source: Pan2(input: shifted, mul: 0.5))
}
}
@@ -0,0 +1,66 @@
// PercTimeStretch.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Granular time-stretch demo — drives `TimeStretch.Audio` with a looping position pointer
/// that advances at a rate determined by `stretchFactor`.
///
/// - `stretchFactor > 1.0` = time stretch (e.g. 2.0 = half speed, pitch preserved)
/// - `stretchFactor = 1.0` = native speed
/// - `stretchFactor < 1.0` = time compression (e.g. 0.5 = double speed, pitch preserved)
///
/// `pos` is driven by a `Closure` that maintains a block-rate accumulator,
/// wrapping 0→1 to loop the buffer continuously. The closure is lazily initialised on
/// the first RT block so it can read `sampleRate` and `blockSize` from the live engine.
final class PercTimeStretch: SynthesizerBase {
let buffer: LyrebirdBuffer
let stretchFactor: Double
init(buffer: LyrebirdBuffer, stretchFactor: Double) {
self.buffer = buffer
self.stretchFactor = max(0.01, stretchFactor)
super.init()
}
override func build() {
let nativeDuration = Double(buffer.count) / (buffer.sampleRate ?? 44100.0)
let sf = stretchFactor
var posAccum: Double = 0.0
var posIncPerBlock: Double = 0.0
var posIncInitialized: Bool = false
let posGen = Closure { graph, _ in
if !posIncInitialized {
let sr = Double(graph.engine.sampleRate)
let blockSize = Double(graph.engine.blockSize)
// Advance pos by this much each block to traverse 0→1 in (nativeDuration*sf) sec.
posIncPerBlock = blockSize / (sr * nativeDuration * sf)
posIncInitialized = true
}
let pos = posAccum
posAccum += posIncPerBlock
if posAccum >= 1.0 { posAccum -= 1.0 }
return pos
}
let ts = TimeStretch.Audio(
buffer: buffer,
pos: posGen,
pitchRatio: 1.0,
windowSize: 0.11,
overlap: 6,
timeDispersion: 0.009,
grainDurationJitter: 0.05,
loop: true
)
ts.amp = 0.8
// Perc.aiff is mono — ts[0] picks channel 0; Pan2 centers it.
output(bus: 0, source: Pan2(input: ts, mul: 1.0))
}
}
@@ -0,0 +1,58 @@
// PercSpectralPitchShift.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Phase-vocoder spectral pitch-shift demo — PlayBuffer → SpectralChain.Audio (with SpectralPitchShift).
///
/// Signal chain:
/// 1. `PlayBuffer.Audio` reads Perc.aiff in a loop at native rate.
/// 2. `SpectralChain.Audio` bins the signal into polar (magnitude + phase) spectral
/// frames every `hopSize` samples, dispatches the registered `SpectralPitchShift`
/// processor, and resynthesises audio via overlap-add.
///
/// The phase vocoder introduces latency of approximately `fftSize` samples (≈ 43 ms at 48 kHz
/// with fftSize = 2048). Transient sharpness is reduced compared to granular pitch shifting —
/// this sounds more "smeared" but with better tonal coherence on sustained sounds.
///
/// Pitch ratios > 1.0 shift up; < 1.0 shift down. Range is (0, 4].
final class PercSpectralPitchShift: SynthesizerBase {
let buffer: LyrebirdBuffer
let pitchRatio: Double
let engineSampleRate: Double
init(buffer: LyrebirdBuffer, pitchRatio: Double = 1.5, engineSampleRate: Double) {
self.buffer = buffer
self.pitchRatio = pitchRatio
self.engineSampleRate = engineSampleRate
super.init()
}
override func build() {
let rateScale = buffer.nativeRateScale(engineSampleRate: engineSampleRate)
let player = PlayBuffer.Audio(
buffer: buffer,
loop: true,
rate: rateScale
)
let fftSize = 2048
let hopSize = 512
// SpectralPitchShift is a SpectralProcessor — runs inside SpectralChain.Audio each hop.
let shifter = SpectralPitchShift(fftSize: fftSize, hopSize: hopSize, pitchRatio: pitchRatio)
// Single Generator owns the analysis + processor + IFFT pipeline.
let chain = SpectralChain.Audio(
input: player[0],
fftSize: fftSize,
hopSize: hopSize,
stages: [.mono(shifter)]
)
output(bus: 0, source: Pan2(input: chain, mul: 0.5))
}
}
@@ -0,0 +1,58 @@
// PercSpectralStereoDiffuse.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// SpectralChain.Audio fan-out demo — mono PlayBuffer → SpectralChain.Audio
/// (with SpectralStereoDiffuse) → 2-channel decorrelated stereo output.
///
/// Signal chain:
/// 1. `PlayBuffer.Audio` reads Perc.aiff in a loop at native rate.
/// 2. `SpectralChain.Audio` runs the forward FFT once, then dispatches
/// `SpectralStereoDiffuse` as a `SpectralFanOutProcessor` to write
/// two independent destination buffers (anti-correlated phase
/// randomisation per bin, magnitudes preserved).
/// 3. Two IFFT bank channels resynthesise to a 2-channel output. The
/// chain output is multi-row — wire `chain[0]` to bus 0, `chain[1]`
/// to bus 1.
///
/// `amount = 0` is exact bypass (both channels match the input).
/// `amount = 1` is full per-channel randomisation — wide decorrelated stereo.
final class PercSpectralStereoDiffuse: SynthesizerBase {
let buffer: LyrebirdBuffer
let amount: Double
let engineSampleRate: Double
init(buffer: LyrebirdBuffer, amount: Double = 0.8, engineSampleRate: Double) {
self.buffer = buffer
self.amount = amount
self.engineSampleRate = engineSampleRate
super.init()
}
override func build() {
let rateScale = buffer.nativeRateScale(engineSampleRate: engineSampleRate)
let player = PlayBuffer.Audio(buffer: buffer, loop: true, rate: rateScale)
let fftSize = 2048
let hopSize = 512
let diffuser = SpectralStereoDiffuse(amount: amount, seed: 0xDEADBEEF)
// Fan-out path: SpectralChain.Audio runs forward FFT once, then
// populates two destination buffers via the fanOut processor, then
// runs two IFFTs to produce a 2-channel output.
let chain = SpectralChain.Audio(
input: player[0],
fftSize: fftSize,
hopSize: hopSize,
fanOut: diffuser,
mul: 0.5
)
output(bus: 0, source: chain) // 2 channels out
}
}
@@ -0,0 +1,27 @@
// main.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Foundation
import LyrebirdSynth
let engine = SynthesisEngine(
blockSize: 512,
sampleRate: 48000,
numOutputChannels: 2,
numInputChannels: 2,
driver: CoreAudioDriver()
)
do {
try engine.start()
} catch {
print("Engine failed to start: \(error)")
exit(1)
}
BufferDemos(engine: engine).runDemo()
//ReverbDemo(engine: engine).runDemo()
engine.stop()
+24
View File
@@ -0,0 +1,24 @@
{
"originHash" : "6f06852651ad22a81b6dc75b6f4ee00fbaffb3782ac523486a02978ee45ac96b",
"pins" : [
{
"identity" : "linenoise-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/andybest/linenoise-swift",
"state" : {
"revision" : "afc897c02b030af7333105c4fedcd843a8339238",
"version" : "0.0.3"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "e9d769113660769a4d9dd3afb855562c0b7ae7b0",
"version" : "7.3.4"
}
}
],
"version" : 3
}
+25
View File
@@ -0,0 +1,25 @@
// Package.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "LyrebirdDemo",
platforms: [.macOS(.v15)],
dependencies: [
.package(path: "../.."),
],
targets: [
.executableTarget(
name: "LyrebirdDemo",
dependencies: [
.product(name: "Lyrebird", package: "LyrebirdII"),
],
path: "LyrebirdDemo"
),
]
)
@@ -0,0 +1,389 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
B9A00000000000000000000C /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A000000000000000000007 /* main.swift */; };
B9A00000000000000000000D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A000000000000000000008 /* AppDelegate.swift */; };
B9A00000000000000000000E /* NoteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A000000000000000000009 /* NoteController.swift */; };
B9A00000000000000000000F /* SineToneUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A00000000000000000000A /* SineToneUI.swift */; };
B9A000000000000000000010 /* SineToneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A00000000000000000000B /* SineToneView.swift */; };
B9A00000000000000000001F /* LyrebirdUI in Frameworks */ = {isa = PBXBuildFile; productRef = B9A00000000000000000001D /* LyrebirdUI */; };
B9A000000000000000000030 /* SpectralBinDelayUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A00000000000000000002D /* SpectralBinDelayUI.swift */; };
B9A000000000000000000031 /* BinDelayController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A00000000000000000002E /* BinDelayController.swift */; };
B9A000000000000000000032 /* BinDelayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A00000000000000000002F /* BinDelayView.swift */; };
B9A000000000000000000036 /* VectorOscillatorUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A000000000000000000033 /* VectorOscillatorUI.swift */; };
B9A000000000000000000037 /* VectorOscillatorController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A000000000000000000034 /* VectorOscillatorController.swift */; };
B9A000000000000000000038 /* VectorOscillatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A000000000000000000035 /* VectorOscillatorView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
B9A000000000000000000004 /* LyrebirdMacOSDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LyrebirdMacOSDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
B9A000000000000000000006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B9A000000000000000000007 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
B9A000000000000000000008 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
B9A000000000000000000009 /* NoteController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteController.swift; sourceTree = "<group>"; };
B9A00000000000000000000A /* SineToneUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SineToneUI.swift; sourceTree = "<group>"; };
B9A00000000000000000000B /* SineToneView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SineToneView.swift; sourceTree = "<group>"; };
B9A00000000000000000002D /* SpectralBinDelayUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpectralBinDelayUI.swift; sourceTree = "<group>"; };
B9A00000000000000000002E /* BinDelayController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BinDelayController.swift; sourceTree = "<group>"; };
B9A00000000000000000002F /* BinDelayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BinDelayView.swift; sourceTree = "<group>"; };
B9A000000000000000000033 /* VectorOscillatorUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VectorOscillatorUI.swift; sourceTree = "<group>"; };
B9A000000000000000000034 /* VectorOscillatorController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VectorOscillatorController.swift; sourceTree = "<group>"; };
B9A000000000000000000035 /* VectorOscillatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VectorOscillatorView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
B9A000000000000000000012 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B9A00000000000000000001F /* LyrebirdUI in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
B9A000000000000000000002 = {
isa = PBXGroup;
children = (
B9A000000000000000000005 /* LyrebirdMacOSDemo */,
B9A000000000000000000003 /* Products */,
);
sourceTree = "<group>";
};
B9A000000000000000000003 /* Products */ = {
isa = PBXGroup;
children = (
B9A000000000000000000004 /* LyrebirdMacOSDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
B9A000000000000000000005 /* LyrebirdMacOSDemo */ = {
isa = PBXGroup;
children = (
B9A000000000000000000007 /* main.swift */,
B9A000000000000000000008 /* AppDelegate.swift */,
B9A000000000000000000020 /* UI */,
B9A000000000000000000021 /* Synthesizers */,
B9A000000000000000000006 /* Info.plist */,
);
path = LyrebirdMacOSDemo;
sourceTree = "<group>";
};
B9A000000000000000000020 /* UI */ = {
isa = PBXGroup;
children = (
B9A000000000000000000009 /* NoteController.swift */,
B9A00000000000000000000B /* SineToneView.swift */,
B9A00000000000000000002E /* BinDelayController.swift */,
B9A00000000000000000002F /* BinDelayView.swift */,
B9A000000000000000000034 /* VectorOscillatorController.swift */,
B9A000000000000000000035 /* VectorOscillatorView.swift */,
);
path = UI;
sourceTree = "<group>";
};
B9A000000000000000000021 /* Synthesizers */ = {
isa = PBXGroup;
children = (
B9A00000000000000000000A /* SineToneUI.swift */,
B9A00000000000000000002D /* SpectralBinDelayUI.swift */,
B9A000000000000000000033 /* VectorOscillatorUI.swift */,
);
path = Synthesizers;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
B9A000000000000000000014 /* LyrebirdMacOSDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = B9A000000000000000000015 /* Build configuration list for PBXNativeTarget "LyrebirdMacOSDemo" */;
buildPhases = (
B9A000000000000000000011 /* Sources */,
B9A000000000000000000012 /* Frameworks */,
B9A000000000000000000013 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = LyrebirdMacOSDemo;
packageProductDependencies = (
B9A00000000000000000001D /* LyrebirdUI */,
);
productName = LyrebirdMacOSDemo;
productReference = B9A000000000000000000004 /* LyrebirdMacOSDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
B9A000000000000000000001 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 2620;
TargetAttributes = {
B9A000000000000000000014 = {
CreatedOnToolsVersion = 16.0;
};
};
};
buildConfigurationList = B9A000000000000000000018 /* Build configuration list for PBXProject "LyrebirdMacOSDemo" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = B9A000000000000000000002;
packageReferences = (
B9A00000000000000000001B /* XCLocalSwiftPackageReference "../.." */,
);
productRefGroup = B9A000000000000000000003 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B9A000000000000000000014 /* LyrebirdMacOSDemo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
B9A000000000000000000013 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B9A000000000000000000011 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B9A00000000000000000000C /* main.swift in Sources */,
B9A00000000000000000000D /* AppDelegate.swift in Sources */,
B9A00000000000000000000E /* NoteController.swift in Sources */,
B9A00000000000000000000F /* SineToneUI.swift in Sources */,
B9A000000000000000000010 /* SineToneView.swift in Sources */,
B9A000000000000000000030 /* SpectralBinDelayUI.swift in Sources */,
B9A000000000000000000031 /* BinDelayController.swift in Sources */,
B9A000000000000000000032 /* BinDelayView.swift in Sources */,
B9A000000000000000000036 /* VectorOscillatorUI.swift in Sources */,
B9A000000000000000000037 /* VectorOscillatorController.swift in Sources */,
B9A000000000000000000038 /* VectorOscillatorView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
B9A000000000000000000016 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = LyrebirdMacOSDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 15.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdMacOSDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
B9A000000000000000000017 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = LyrebirdMacOSDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 15.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdMacOSDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = Release;
};
B9A000000000000000000019 /* 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;
};
B9A00000000000000000001A /* 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 */
B9A000000000000000000015 /* Build configuration list for PBXNativeTarget "LyrebirdMacOSDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B9A000000000000000000016 /* Debug */,
B9A000000000000000000017 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B9A000000000000000000018 /* Build configuration list for PBXProject "LyrebirdMacOSDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B9A000000000000000000019 /* Debug */,
B9A00000000000000000001A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
B9A00000000000000000001B /* XCLocalSwiftPackageReference "../.." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../..;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
B9A00000000000000000001D /* LyrebirdUI */ = {
isa = XCSwiftPackageProductDependency;
package = B9A00000000000000000001B /* XCLocalSwiftPackageReference "../.." */;
productName = LyrebirdUI;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = B9A000000000000000000001 /* Project object */;
}
@@ -0,0 +1,24 @@
{
"originHash" : "2f86be2113a80b402938cb09ebb72fe8cb9830066fe5b03aa1d174fcf50e2574",
"pins" : [
{
"identity" : "linenoise-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/andybest/linenoise-swift",
"state" : {
"revision" : "afc897c02b030af7333105c4fedcd843a8339238",
"version" : "0.0.3"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "e9d769113660769a4d9dd3afb855562c0b7ae7b0",
"version" : "7.3.4"
}
}
],
"version" : 3
}
@@ -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 = "B9A000000000000000000014"
BuildableName = "LyrebirdMacOSDemo.app"
BlueprintName = "LyrebirdMacOSDemo"
ReferencedContainer = "container:LyrebirdMacOSDemo.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 = "B9A000000000000000000014"
BuildableName = "LyrebirdMacOSDemo.app"
BlueprintName = "LyrebirdMacOSDemo"
ReferencedContainer = "container:LyrebirdMacOSDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B9A000000000000000000014"
BuildableName = "LyrebirdMacOSDemo.app"
BlueprintName = "LyrebirdMacOSDemo"
ReferencedContainer = "container:LyrebirdMacOSDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,77 @@
// AppDelegate.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import AppKit
import SwiftUI
import LyrebirdSynth
import LyrebirdUI
// ── Demo selector ─────────────────────────────────────────────────────────────
// Change `demo` to `.sineTone` or `.binDelay` to switch demos.
private enum Demo { case vector, binDelay, sineTone }
private let demo: Demo = .binDelay
// ──────────────────────────────────────────────────────────────────────────────
final class AppDelegate: NSObject, NSApplicationDelegate {
let engine: SynthesisEngine
// Vector oscillator demo controller (used when demo == .vector)
let vectorController: VectorOscillatorController
// Sine-tone demo controller (used when demo == .sineTone)
let sineController: NoteController
// Bin-delay demo controller (used when demo == .binDelay)
let binDelayController: BinDelayController
var window: LyrebirdWindow?
init(engine: SynthesisEngine) {
let scopeCapture = ScopeCapture(buses: [0, 1], bufferSize: 2048)
engine.scopeTap = scopeCapture
self.engine = engine
self.vectorController = VectorOscillatorController(
engine: engine,
synth: VectorOscillatorUI(),
scopeCapture: scopeCapture
)
self.sineController = NoteController(
engine: engine,
synth: SineToneUI(),
scopeCapture: scopeCapture
)
self.binDelayController = BinDelayController(
engine: engine,
scopeCapture: scopeCapture
)
}
@MainActor
func applicationDidFinishLaunching(_ notification: Notification) {
switch demo {
case .vector:
window = LyrebirdWindow(title: "Lyrebird — Vector Oscillator", width: 380, height: 580)
window?.open {
VectorOscillatorView(controller: self.vectorController)
}
case .binDelay:
window = LyrebirdWindow(title: "Lyrebird — Spectral Bin Delay", width: 440, height: 620)
window?.open {
BinDelayView(controller: self.binDelayController)
}
case .sineTone:
window = LyrebirdWindow(title: "Lyrebird — Sine Tone", width: 360, height: 540)
window?.open {
SineToneView(controller: self.sineController)
}
}
}
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
true
}
func applicationWillTerminate(_ notification: Notification) {
engine.stop()
}
}
@@ -0,0 +1,26 @@
<?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>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2026 Realized Sound. All rights reserved.</string>
</dict>
</plist>
@@ -0,0 +1,26 @@
// SineToneUI.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import LyrebirdUI
/// A stereo sine tone whose frequency, amplitude, and pan are live-controllable from the UI.
final class SineToneUI: SynthesizerBase {
/// Frequency in Hz. Slider range: 440–880 Hz.
@UIParam var frequency: Double = 440.0
/// Output amplitude (linear gain). Knob range: 0–1.
@UIParam var amplitude: Double = 0.25
/// Stereo pan position. Knob range: -1 (hard left) … 0 (center) … +1 (hard right).
@UIParam var pan: Double = 0.0
override func build() {
let osc = OscSin.Audio(freq: $frequency)
output(bus: 0, source: Pan2(input: osc * $amplitude, pan: $pan))
}
}
@@ -0,0 +1,108 @@
// SpectralBinDelayUI.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Spectral-bin-delay synthesizer demo.
///
/// An `Impulse.Audio` at 0.2 Hz (one fire per 5 s) drives an FFT analysis chain
/// that includes a `SpectralBinDelay`. The delayed spectral frames are resynthesised
/// via `IFFTSynthesis` and panned to centre stereo on bus 0.
///
/// Two `LyrebirdBuffer`s — `delayTimes` and `feedbacks` — are exposed as public
/// stored properties so the UI can write into them live via `MultiSlider`.
/// Both buffers are pre-allocated at `init` and never reallocated.
///
/// - Note: `sampleRate` must be passed at construction time because
/// `SpectralBinDelay` needs it to convert delay-seconds → hop-frames.
/// Create this synthesizer *after* the engine has started so that
/// `engine.sampleRate` reflects the committed hardware rate.
final class SpectralBinDelayUI: SynthesizerBase {
// MARK: - Constants
/// FFT frame size used throughout the analysis/synthesis chain.
static let fftSize: Int = 1024
/// Number of new samples between FFT hops (75 % overlap).
static let hopSize: Int = 256
/// `fftSize / 2` — the number of independent magnitude/phase bins.
static let halfSize: Int = fftSize / 2
/// Maximum delay time accepted by `SpectralBinDelay` (seconds).
/// Keep below `lyrebirdSpectralBinDelayMaxFrames * hopSize / sampleRate`.
static let maxDelaySeconds: Double = 1.0
// MARK: - Engine sample rate (captured at init — needed in build())
/// Audio sample rate in Hz. Captured from the engine before `build()` runs.
private let engineSampleRate: Double
// MARK: - Parameter buffers (public — UI writes via MultiSlider)
/// Per-bin delay times in seconds. Mono, `halfSize` frames.
/// Default: 0 (clean pass-through until the UI writes new values).
let delayTimes: LyrebirdBuffer
/// Per-bin feedback gains in [0, 0.95). Mono, `halfSize` frames.
/// Default: 0 (clean pass-through until the UI writes new values).
let feedbacks: LyrebirdBuffer
// MARK: - Initialisation
/// - Parameter sampleRate: The engine's committed sample rate (Hz).
/// `SynthesisEngine.sampleRate` is a `let` initialised in `init`, so it
/// is valid as soon as the engine is constructed.
init(sampleRate: Double) {
let halfSize = SpectralBinDelayUI.halfSize
self.engineSampleRate = sampleRate
let dt = LyrebirdBuffer(count: halfSize)
dt.fill(with: 0.0)
let fb = LyrebirdBuffer(count: halfSize)
fb.fill(with: 0.0)
self.delayTimes = dt
self.feedbacks = fb
super.init()
}
// MARK: - Signal graph
override func build() {
let fftSize = SpectralBinDelayUI.fftSize
let hopSize = SpectralBinDelayUI.hopSize
// Source: sparse impulse that fires at 0.2 Hz (once every 5 s).
let impulseFreq = 0.2
let impulse = Impulse.Audio(freq: impulseFreq)
// SpectralBinDelay processor — allocated here inside build() which
// runs off the RT thread before the synthesizer is added to the engine.
let bd = SpectralBinDelay(
fftSize: fftSize,
hopSize: hopSize,
maxDelaySeconds: SpectralBinDelayUI.maxDelaySeconds,
sampleRate: engineSampleRate,
delayTimes: delayTimes,
feedbacks: feedbacks
)
let binDelay = SpectralChain.Audio(
input: impulse,
fftSize: fftSize,
hopSize: hopSize,
stages: [.mono(bd)]
)
// Pan to centre; the effect is mono but we send it to stereo bus 0.
output(bus: 0, source: Pan2(input: binDelay, pan: 0.0))
}
}
@@ -0,0 +1,78 @@
// VectorOscillatorUI.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import LyrebirdUI
/// A stereo vector oscillator whose XY position, frequency, and amplitude are
/// live-controllable from the UI.
///
/// Four corner wavetables are crossfaded on a 2D XY plane:
///
/// C (triangle) ── D (Hanning) (y = 1)
/// │ │
/// A (sine) ──── B (saw-ish) (y = 0)
/// x=0 x=1
///
/// Moving X blends A↔B (and C↔D); moving Y blends the AB mix into the CD mix.
final class VectorOscillatorUI: SynthesizerBase {
/// X-axis blend position. 0 = corner A/C, 1 = corner B/D.
/// Normalized [0, 1]. XY pad range: 0…1.
@UIParam var x: Double = 0.5
/// Y-axis blend position. 0 = bottom (A, B), 1 = top (C, D).
/// Normalized [0, 1]. XY pad range: 0…1.
@UIParam var y: Double = 0.5
/// Oscillator frequency in Hz. Slider range: 40–2000 Hz.
@UIParam var frequency: Double = 220.0
/// Output amplitude (linear gain). Knob range: 0–1.
@UIParam var amplitude: Double = 0.25
private let bufferA: LyrebirdBuffer // corner A: sine
private let bufferB: LyrebirdBuffer // corner B: 16-partial saw-ish
private let bufferC: LyrebirdBuffer // corner C: triangle
private let bufferD: LyrebirdBuffer // corner D: Hanning window shape
override init() {
let tableSize = lyrebirdDefaultTableSize
let a = LyrebirdBuffer(count: tableSize)
a.fillSine()
let b = LyrebirdBuffer(count: tableSize)
b.fill(partials: 16)
let c = LyrebirdBuffer(count: tableSize)
c.fillTriangle()
let d = LyrebirdBuffer(count: tableSize)
d.fillHanning()
self.bufferA = a
self.bufferB = b
self.bufferC = c
self.bufferD = d
super.init()
}
override func build() {
let osc = VectorOscillator.Audio(
bufferA: bufferA,
bufferB: bufferB,
bufferC: bufferC,
bufferD: bufferD,
freq: $frequency,
x: $x,
y: $y,
mul: $amplitude
)
output(bus: 0, source: Pan2(input: osc, pan: 0.0))
}
}
@@ -0,0 +1,74 @@
// BinDelayController.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Observation
import LyrebirdSynth
/// Controller for the spectral-bin-delay demo view.
///
/// Unlike `NoteController`, the synthesizer is created lazily when the user
/// first taps "Start Synthesizer" — this is necessary because
/// `SpectralBinDelayUI.init(sampleRate:)` requires the engine's committed
/// sample rate, which is only valid after `engine.start()` returns.
@Observable
final class BinDelayController {
let engine: SynthesisEngine
let scopeCapture: ScopeCapture
private(set) var engineRunning: Bool = false
private(set) var isPlaying: Bool = false
/// The live synthesizer instance. `nil` until first "Start Synthesizer" tap.
private(set) var synth: SpectralBinDelayUI?
init(engine: SynthesisEngine, scopeCapture: ScopeCapture) {
self.engine = engine
self.scopeCapture = scopeCapture
}
func toggleEngine() {
if engineRunning {
if isPlaying, let s = synth {
engine.remove(s)
isPlaying = false
}
engine.stop()
engineRunning = false
} else {
do {
try engine.start()
engineRunning = true
} catch {
print("Engine failed to start: \(error)")
}
}
}
func toggle() {
if isPlaying {
if let s = synth {
engine.remove(s)
}
isPlaying = false
} else {
guard engineRunning else { return }
// Create the synthesizer lazily so we don't put it in the node tree
// until the user requests it.
if synth == nil {
synth = SpectralBinDelayUI(sampleRate: engine.sampleRate)
}
if let s = synth {
do {
try engine.add(s)
isPlaying = true
} catch {
print("[Lyrebird] BinDelayController.toggle add failed: \(error)")
}
}
}
}
}
@@ -0,0 +1,123 @@
// BinDelayView.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
import LyrebirdSynth
import LyrebirdUI
/// Main view for the spectral bin-delay demo (macOS).
///
/// Shows engine and synth toggle buttons, two `MultiSlider` rows for
/// per-bin delay times and feedbacks, an engine status strip, and a scope.
///
/// Every spectral bin is exposed: each `MultiSlider` row contains
/// `SpectralBinDelayUI.halfSize` (512) thin bars, one per FFT bin. The window
/// is sized wide so the full spectrum is visible at once — the demo's purpose
/// is to show that per-bin spectral control is possible, not to make any one
/// bin precisely tweakable.
struct BinDelayView: View {
let controller: BinDelayController
private let sliderHeight: CGFloat = 160
private let maxFeedback = 0.95
var body: some View {
VStack(alignment: .leading, spacing: 20) {
// MARK: Engine row
HStack {
Text("Engine")
.font(.headline)
Spacer()
Button(controller.engineRunning ? "Stop Engine" : "Start Engine") {
controller.toggleEngine()
}
.buttonStyle(.borderedProminent)
.tint(controller.engineRunning ? .red : .green)
}
Divider()
// MARK: Synth row
HStack {
VStack(alignment: .leading, spacing: 2) {
Text("Spectral Bin Delay")
.font(.headline)
Text("Impulse source · 0.2 Hz · fftSize 1024 · hop 256")
.font(.caption)
.foregroundStyle(.secondary)
}
Spacer()
Button(controller.isPlaying ? "Stop" : "Start") {
controller.toggle()
}
.buttonStyle(.bordered)
.tint(controller.isPlaying ? .red : .green)
.disabled(!controller.engineRunning)
}
Divider()
// MARK: Delay times slider
Text("Delay Times (all 512 bins, range 0–1 s)")
.font(.caption)
.foregroundStyle(.secondary)
if let synth = controller.synth {
MultiSlider(
buffer: synth.delayTimes,
count: SpectralBinDelayUI.halfSize,
range: 0.0...1.0,
height: sliderHeight
)
} else {
placeholderSlider(label: "Start synthesizer to enable")
}
// MARK: Feedback slider
Text("Feedbacks (all 512 bins, range 0–0.95)")
.font(.caption)
.foregroundStyle(.secondary)
if let synth = controller.synth {
MultiSlider(
buffer: synth.feedbacks,
count: SpectralBinDelayUI.halfSize,
range: 0.0...maxFeedback,
height: sliderHeight
)
} else {
placeholderSlider(label: "Start synthesizer to enable")
}
Divider()
LyrebirdStatusView(engine: controller.engine)
Divider()
LyrebirdScopeView(capture: controller.scopeCapture)
.frame(height: 120)
}
.padding(20)
.frame(minWidth: 1100)
}
// MARK: - Helpers
@ViewBuilder
private func placeholderSlider(label: String) -> some View {
ZStack {
Color.lyrebirdControlBackground
Text(label)
.font(.caption)
.foregroundStyle(.secondary)
}
.frame(height: sliderHeight)
.overlay(Rectangle().stroke(Color.lyrebirdSeparator, lineWidth: 1))
}
}
@@ -0,0 +1,57 @@
// NoteController.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Observation
import LyrebirdSynth
@Observable
final class NoteController {
let engine: SynthesisEngine
let synth: SineToneUI
let scopeCapture: ScopeCapture
private(set) var engineRunning: Bool = false
private(set) var isPlaying: Bool = false
init(engine: SynthesisEngine, synth: SineToneUI, scopeCapture: ScopeCapture) {
self.engine = engine
self.synth = synth
self.scopeCapture = scopeCapture
}
func toggleEngine() {
if engineRunning {
if isPlaying {
engine.remove(synth)
isPlaying = false
}
engine.stop()
engineRunning = false
} else {
do {
try engine.start()
engineRunning = true
} catch {
print("Engine failed to start: \(error)")
}
}
}
func toggle() {
if isPlaying {
engine.remove(synth)
isPlaying = false
} else {
do {
try engine.add(synth)
isPlaying = true
} catch {
print("[Lyrebird] NoteController.toggle add failed: \(error)")
}
}
}
}
@@ -0,0 +1,111 @@
// SineToneView.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
import LyrebirdSynth
import LyrebirdUI
struct SineToneView: View {
let controller: NoteController
var body: some View {
VStack(alignment: .leading, spacing: 20) {
HStack {
Text("Engine")
.font(.headline)
Spacer()
Button(controller.engineRunning ? "Stop Engine" : "Start Engine") {
controller.toggleEngine()
}
.buttonStyle(.borderedProminent)
.tint(controller.engineRunning ? .red : .green)
}
Divider()
HStack {
Text("Sine Tone")
.font(.headline)
Spacer()
Button(controller.isPlaying ? "Stop" : "Start") {
controller.toggle()
}
.buttonStyle(.bordered)
.tint(controller.isPlaying ? .red : .green)
.disabled(!controller.engineRunning)
}
ParameterSlider(
"Frequency",
node: controller.synth.$frequency,
range: 440.0...880.0
)
HStack(spacing: 24) {
ParameterKnob(
"Amplitude",
node: controller.synth.$amplitude,
range: 0.0...1.0
)
ParameterKnob(
"Pan",
node: controller.synth.$pan,
range: -1.0...1.0
)
ParameterLabel("Level", node: controller.synth.$amplitude)
Spacer()
}
Divider()
LyrebirdStatusView(engine: controller.engine)
Divider()
LyrebirdScopeView(capture: controller.scopeCapture)
.frame(height: 120)
Divider()
Text("Envelope")
.font(.caption)
.foregroundStyle(.secondary)
LyrebirdEnvelopeView(
Envelope(
levels: [0.0001, 1, 0.6, 0.4, 0.0001],
durations: [0.05, 0.15, 0.4, 0.3],
curves: [.exponential, .exponential, .lin, .exponential],
loopNode: 2,
releaseNode: 4
),
width: 300,
height: 100
)
Divider()
Text("Distribution Preview (Gaussian, 200 samples)")
.font(.caption)
.foregroundStyle(.secondary)
LyrebirdScatterView(
DemandTemporalTendency(distribution: .gauss,
parX: .value(0.5), parY: .value(0.15),
seed: 42)
.samples(count: 200),
yRange: 0.0...1.0,
pointColor: .cyan,
width: 300,
height: 100
)
}
.padding(20)
.frame(minWidth: 340)
}
}
@@ -0,0 +1,61 @@
// VectorOscillatorController.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Observation
import LyrebirdSynth
@Observable
final class VectorOscillatorController {
let engine: SynthesisEngine
let synth: VectorOscillatorUI
let scopeCapture: ScopeCapture
private(set) var engineRunning: Bool = false
private(set) var isPlaying: Bool = false
init(
engine: SynthesisEngine,
synth: VectorOscillatorUI,
scopeCapture: ScopeCapture
) {
self.engine = engine
self.synth = synth
self.scopeCapture = scopeCapture
}
func toggleEngine() {
if engineRunning {
if isPlaying {
engine.remove(synth)
isPlaying = false
}
engine.stop()
engineRunning = false
} else {
do {
try engine.start()
engineRunning = true
} catch {
print("Engine failed to start: \(error)")
}
}
}
func toggle() {
if isPlaying {
engine.remove(synth)
isPlaying = false
} else {
do {
try engine.add(synth)
isPlaying = true
} catch {
print("[Lyrebird] VectorOscillatorController.toggle add failed: \(error)")
}
}
}
}
@@ -0,0 +1,79 @@
// VectorOscillatorView.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
import LyrebirdSynth
import LyrebirdUI
struct VectorOscillatorView: View {
let controller: VectorOscillatorController
var body: some View {
VStack(alignment: .leading, spacing: 20) {
HStack {
Text("Engine")
.font(.headline)
Spacer()
Button(controller.engineRunning ? "Stop Engine" : "Start Engine") {
controller.toggleEngine()
}
.buttonStyle(.borderedProminent)
.tint(controller.engineRunning ? .red : .green)
}
Divider()
HStack {
Text("Vector Oscillator")
.font(.headline)
Spacer()
Button(controller.isPlaying ? "Stop" : "Start") {
controller.toggle()
}
.buttonStyle(.bordered)
.tint(controller.isPlaying ? .red : .green)
.disabled(!controller.engineRunning)
}
ParameterXY(
xLabel: "X (A↔B)",
xNode: controller.synth.$x,
xRange: 0.0...1.0,
yLabel: "Y (AB↔CD)",
yNode: controller.synth.$y,
yRange: 0.0...1.0
)
.frame(width: 240, height: 240)
HStack(spacing: 24) {
ParameterKnob(
"Frequency",
node: controller.synth.$frequency,
range: 40.0...2000.0
)
ParameterKnob(
"Amplitude",
node: controller.synth.$amplitude,
range: 0.0...1.0
)
Spacer()
}
Divider()
LyrebirdStatusView(engine: controller.engine)
Divider()
LyrebirdScopeView(capture: controller.scopeCapture)
.frame(height: 120)
}
.padding(20)
.frame(minWidth: 340)
}
}
@@ -0,0 +1,22 @@
// main.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import AppKit
import LyrebirdSynth
let engine = SynthesisEngine(
blockSize: 512,
sampleRate: 48000,
numOutputChannels: 2,
numInputChannels: 0,
driver: CoreAudioDriver()
)
let delegate = AppDelegate(engine: engine)
let app = NSApplication.shared
app.setActivationPolicy(.regular)
app.delegate = delegate
app.run()
@@ -0,0 +1,328 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
E3C000000000000000000007 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3C000000000000000000006 /* main.swift */; };
E3C000000000000000000013 /* Lyrebird in Frameworks */ = {isa = PBXBuildFile; productRef = E3C000000000000000000012 /* Lyrebird */; };
E3C000000000000000000015 /* FMTone.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3C000000000000000000014 /* FMTone.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
E3C000000000000000000004 /* LyrebirdNRTDemo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = LyrebirdNRTDemo; sourceTree = BUILT_PRODUCTS_DIR; };
E3C000000000000000000006 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
E3C000000000000000000014 /* FMTone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FMTone.swift; sourceTree = "<group>"; };
E3C000000000000000000017 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E3C000000000000000000018 /* LyrebirdNRTDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LyrebirdNRTDemo.entitlements; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
E3C000000000000000000009 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E3C000000000000000000013 /* Lyrebird in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
E3C000000000000000000002 = {
isa = PBXGroup;
children = (
E3C000000000000000000005 /* LyrebirdNRTDemo */,
E3C000000000000000000003 /* Products */,
);
sourceTree = "<group>";
};
E3C000000000000000000003 /* Products */ = {
isa = PBXGroup;
children = (
E3C000000000000000000004 /* LyrebirdNRTDemo */,
);
name = Products;
sourceTree = "<group>";
};
E3C000000000000000000005 /* LyrebirdNRTDemo */ = {
isa = PBXGroup;
children = (
E3C000000000000000000006 /* main.swift */,
E3C000000000000000000016 /* Synthesizers */,
E3C000000000000000000017 /* Info.plist */,
E3C000000000000000000018 /* LyrebirdNRTDemo.entitlements */,
);
path = LyrebirdNRTDemo;
sourceTree = "<group>";
};
E3C000000000000000000016 /* Synthesizers */ = {
isa = PBXGroup;
children = (
E3C000000000000000000014 /* FMTone.swift */,
);
path = Synthesizers;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
E3C00000000000000000000A /* LyrebirdNRTDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = E3C00000000000000000000B /* Build configuration list for PBXNativeTarget "LyrebirdNRTDemo" */;
buildPhases = (
E3C000000000000000000008 /* Sources */,
E3C000000000000000000009 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = LyrebirdNRTDemo;
packageProductDependencies = (
E3C000000000000000000012 /* Lyrebird */,
);
productName = LyrebirdNRTDemo;
productReference = E3C000000000000000000004 /* LyrebirdNRTDemo */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
E3C000000000000000000001 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 1600;
TargetAttributes = {
E3C00000000000000000000A = {
CreatedOnToolsVersion = 16.0;
};
};
};
buildConfigurationList = E3C00000000000000000000E /* Build configuration list for PBXProject "LyrebirdNRTDemo" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = E3C000000000000000000002;
packageReferences = (
E3C000000000000000000011 /* XCLocalSwiftPackageReference "../.." */,
);
productRefGroup = E3C000000000000000000003 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
E3C00000000000000000000A /* LyrebirdNRTDemo */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
E3C000000000000000000008 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E3C000000000000000000007 /* main.swift in Sources */,
E3C000000000000000000015 /* FMTone.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
E3C00000000000000000000C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = LyrebirdNRTDemo/LyrebirdNRTDemo.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = LyrebirdNRTDemo/Info.plist;
MACOSX_DEPLOYMENT_TARGET = 15.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdNRTDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 6.0;
};
name = Debug;
};
E3C00000000000000000000D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = LyrebirdNRTDemo/LyrebirdNRTDemo.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = LyrebirdNRTDemo/Info.plist;
MACOSX_DEPLOYMENT_TARGET = 15.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdNRTDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 6.0;
};
name = Release;
};
E3C00000000000000000000F /* 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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
E3C000000000000000000010 /* 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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
E3C00000000000000000000B /* Build configuration list for PBXNativeTarget "LyrebirdNRTDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E3C00000000000000000000C /* Debug */,
E3C00000000000000000000D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E3C00000000000000000000E /* Build configuration list for PBXProject "LyrebirdNRTDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E3C00000000000000000000F /* Debug */,
E3C000000000000000000010 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
E3C000000000000000000011 /* XCLocalSwiftPackageReference "../.." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../..;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
E3C000000000000000000012 /* Lyrebird */ = {
isa = XCSwiftPackageProductDependency;
package = E3C000000000000000000011 /* XCLocalSwiftPackageReference "../.." */;
productName = Lyrebird;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = E3C000000000000000000001 /* 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 = "E3C00000000000000000000A"
BuildableName = "LyrebirdNRTDemo"
BlueprintName = "LyrebirdNRTDemo"
ReferencedContainer = "container:LyrebirdNRTDemo.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 = "E3C00000000000000000000A"
BuildableName = "LyrebirdNRTDemo"
BlueprintName = "LyrebirdNRTDemo"
ReferencedContainer = "container:LyrebirdNRTDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E3C00000000000000000000A"
BuildableName = "LyrebirdNRTDemo"
BlueprintName = "LyrebirdNRTDemo"
ReferencedContainer = "container:LyrebirdNRTDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,14 @@
<?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>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSDesktopFolderUsageDescription</key>
<string>LyrebirdNRTDemo writes rendered audio files to the Desktop.</string>
<key>NSDocumentsFolderUsageDescription</key>
<string>LyrebirdNRTDemo writes rendered audio files to Documents.</string>
</dict>
</plist>
@@ -0,0 +1,10 @@
<?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>
<false/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,50 @@
// FMTone.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// FM tone with an ASR envelope and stereo panning.
///
/// A sine modulator at `modFreq` drives the carrier frequency, producing
/// classic FM timbre. The `pan` argument places the voice in the stereo field
/// (-1 = hard left, 0 = centre, 1 = hard right).
final class FMTone: SynthesizerBase {
let carrierFreq: Double
let modFreq: Double
let modIndex: Double
let amp: Double
let pan: Double
let envelope: Envelope
init(carrierFreq: Double,
modFreq: Double = 220.0,
modIndex: Double = 3.0,
amp: Double = 0.18,
pan: Double = 0.0,
envelope: Envelope = Envelope(
levels: [0, 1, 0.7, 0],
durations: [0.02, 1.5, 0.5],
curves: [2, 0, -3.5]
)
) {
self.carrierFreq = carrierFreq
self.modFreq = modFreq
self.modIndex = modIndex
self.amp = amp
self.pan = pan
self.envelope = envelope
super.init()
}
override func build() {
let env = EnvelopeGen.Control(
envelope: envelope
)
let mod = OscSin.Audio(freq: modFreq) * (carrierFreq * modIndex)
let sig = OscSin.Audio(freq: carrierFreq + mod) * env * amp
output(bus: 0, source: Pan2(input: sig, pan: pan))
}
}
@@ -0,0 +1,93 @@
// main.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Foundation
import LyrebirdSynth
// Output to the Desktop — triggers the NSDesktopFolderUsageDescription TCC prompt on first run.
let outputURL = FileManager.default.homeDirectoryForCurrentUser
.appendingPathComponent("Desktop/nrt_output.caf")
// Render parameters.
let sampleRate: Double = 48000
let blockSize: Int = 512
let attackTime: Double = 0.02
let sustainTime: Double = 1.5
let releaseTime: Double = 0.5
let voiceLength: Double = attackTime + sustainTime + releaseTime
// Six FM voices — carrier frequencies, mod ratios, panning positions, start times.
struct VoiceSpec {
var carrier: Double
var modFreq: Double
var pan: Double
var start: Double
}
let voices: [VoiceSpec] = [
VoiceSpec(carrier: 110.0, modFreq: 55.0, pan: -0.6, start: 0.0),
VoiceSpec(carrier: 220.0, modFreq: 110.0, pan: 0.4, start: 0.25),
VoiceSpec(carrier: 330.0, modFreq: 220.0, pan: -0.2, start: 0.5),
VoiceSpec(carrier: 440.0, modFreq: 330.0, pan: 0.6, start: 0.75),
VoiceSpec(carrier: 550.0, modFreq: 110.0, pan: -0.8, start: 1.0),
VoiceSpec(carrier: 660.0, modFreq: 440.0, pan: 0.2, start: 1.25),
]
let sustainLevel: Double = 1.0 / 2.0.squareRoot() // -3 dBFS (1/√2 ≈ sustainLevel)
let interSetDelay: Double = 1.0
let tailDuration: Double = 0.1
let lastStart = voices.map(\.start).max() ?? 0.0
let totalDur = lastStart + interSetDelay + voiceLength + tailDuration
let driver = NRTDriver(outputURL: outputURL, duration: totalDur)
let engine = SynthesisEngine(
blockSize: blockSize,
sampleRate: sampleRate,
numOutputChannels: 2,
numInputChannels: 0,
driver: driver
)
do {
for v in voices {
try engine.schedule(
FMTone(carrierFreq: v.carrier, modFreq: v.modFreq, pan: v.pan,
envelope: Envelope(
levels: [0.0, 1.0, sustainLevel, 0.0],
durations: [attackTime, sustainTime, releaseTime],
curves: [4.0, -4.0, -10.0])
),
after: v.start
)
}
for v in voices {
try engine.schedule(
FMTone(carrierFreq: v.carrier * 1.2, modFreq: v.modFreq, pan: v.pan,
envelope: Envelope(
levels: [0.0, 1.0, sustainLevel, 0.0],
durations: [attackTime, sustainTime, releaseTime],
curves: [4.0, -4.0, -10.0])
),
after: v.start + interSetDelay
)
}
} catch {
fputs("engine.schedule failed: \(error)\n", stderr)
exit(1)
}
print("Rendering \(String(format: "%.2f", totalDur)) s → \(outputURL.path)")
do {
try engine.start()
print("Done.")
} catch {
fputs("Render failed: \(error)\n", stderr)
exit(1)
}
+24
View File
@@ -0,0 +1,24 @@
{
"originHash" : "53d0f0966ba1616e4ff8eec85e7a64bec7b25b8f9158e10a7813f0cc29c5b538",
"pins" : [
{
"identity" : "linenoise-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/andybest/linenoise-swift",
"state" : {
"revision" : "afc897c02b030af7333105c4fedcd843a8339238",
"version" : "0.0.3"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "e9d769113660769a4d9dd3afb855562c0b7ae7b0",
"version" : "7.3.4"
}
}
],
"version" : 3
}
+25
View File
@@ -0,0 +1,25 @@
// Package.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "LyrebirdNRTDemo",
platforms: [.macOS(.v15)],
dependencies: [
.package(path: "../.."),
],
targets: [
.executableTarget(
name: "LyrebirdNRTDemo",
dependencies: [
.product(name: "Lyrebird", package: "LyrebirdII"),
],
path: "LyrebirdNRTDemo"
),
]
)
@@ -0,0 +1,362 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
C8D0000000000000000000C /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8D00000000000000000007 /* main.swift */; };
C8D0000000000000000000D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8D00000000000000000008 /* AppDelegate.swift */; };
C8D0000000000000000000F /* LyrebirdUI in Frameworks */ = {isa = PBXBuildFile; productRef = C8D0000000000000000001D /* LyrebirdUI */; };
C8D00000000000000000021 /* LyrebirdLiveCompile in Frameworks */ = {isa = PBXBuildFile; productRef = C8D0000000000000000001F /* LyrebirdLiveCompile */; };
C8D00000000000000000022 /* LyrebirdLiveCompileUI in Frameworks */ = {isa = PBXBuildFile; productRef = C8D00000000000000000020 /* LyrebirdLiveCompileUI */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
C8D00000000000000000004 /* LyrebirdScratchDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LyrebirdScratchDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
C8D00000000000000000006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C8D00000000000000000007 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
C8D00000000000000000008 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
C8D00000000000000000009 /* LyrebirdScratchDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LyrebirdScratchDemo.entitlements; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
C8D00000000000000000012 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C8D0000000000000000000F /* LyrebirdUI in Frameworks */,
C8D00000000000000000021 /* LyrebirdLiveCompile in Frameworks */,
C8D00000000000000000022 /* LyrebirdLiveCompileUI in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
C8D00000000000000000002 = {
isa = PBXGroup;
children = (
C8D00000000000000000005 /* LyrebirdScratchDemo */,
C8D00000000000000000003 /* Products */,
);
sourceTree = "<group>";
};
C8D00000000000000000003 /* Products */ = {
isa = PBXGroup;
children = (
C8D00000000000000000004 /* LyrebirdScratchDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
C8D00000000000000000005 /* LyrebirdScratchDemo */ = {
isa = PBXGroup;
children = (
C8D00000000000000000007 /* main.swift */,
C8D00000000000000000008 /* AppDelegate.swift */,
C8D00000000000000000006 /* Info.plist */,
C8D00000000000000000009 /* LyrebirdScratchDemo.entitlements */,
);
path = LyrebirdScratchDemo;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
C8D00000000000000000014 /* LyrebirdScratchDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = C8D00000000000000000015 /* Build configuration list for PBXNativeTarget "LyrebirdScratchDemo" */;
buildPhases = (
C8D00000000000000000011 /* Sources */,
C8D00000000000000000012 /* Frameworks */,
C8D00000000000000000013 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = LyrebirdScratchDemo;
packageProductDependencies = (
C8D0000000000000000001D /* LyrebirdUI */,
C8D0000000000000000001F /* LyrebirdLiveCompile */,
C8D00000000000000000020 /* LyrebirdLiveCompileUI */,
);
productName = LyrebirdScratchDemo;
productReference = C8D00000000000000000004 /* LyrebirdScratchDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
C8D00000000000000000001 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 2620;
TargetAttributes = {
C8D00000000000000000014 = {
CreatedOnToolsVersion = 16.0;
};
};
};
buildConfigurationList = C8D00000000000000000018 /* Build configuration list for PBXProject "LyrebirdScratchDemo" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = C8D00000000000000000002;
packageReferences = (
C8D0000000000000000001B /* XCLocalSwiftPackageReference "../.." */,
C8D0000000000000000001E /* XCLocalSwiftPackageReference "../../LiveCompile" */,
);
productRefGroup = C8D00000000000000000003 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C8D00000000000000000014 /* LyrebirdScratchDemo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
C8D00000000000000000013 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
C8D00000000000000000011 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C8D0000000000000000000C /* main.swift in Sources */,
C8D0000000000000000000D /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
C8D00000000000000000016 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = LyrebirdScratchDemo/LyrebirdScratchDemo.entitlements;
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = LyrebirdScratchDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 15.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdScratchDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
C8D00000000000000000017 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = LyrebirdScratchDemo/LyrebirdScratchDemo.entitlements;
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = LyrebirdScratchDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 15.0;
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdScratchDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = Release;
};
C8D00000000000000000019 /* 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;
};
C8D0000000000000000001A /* 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 */
C8D00000000000000000015 /* Build configuration list for PBXNativeTarget "LyrebirdScratchDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C8D00000000000000000016 /* Debug */,
C8D00000000000000000017 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C8D00000000000000000018 /* Build configuration list for PBXProject "LyrebirdScratchDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C8D00000000000000000019 /* Debug */,
C8D0000000000000000001A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
C8D0000000000000000001B /* XCLocalSwiftPackageReference "../.." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../..;
};
C8D0000000000000000001E /* XCLocalSwiftPackageReference "../../LiveCompile" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../../LiveCompile;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
C8D0000000000000000001D /* LyrebirdUI */ = {
isa = XCSwiftPackageProductDependency;
package = C8D0000000000000000001B /* XCLocalSwiftPackageReference "../.." */;
productName = LyrebirdUI;
};
C8D0000000000000000001F /* LyrebirdLiveCompile */ = {
isa = XCSwiftPackageProductDependency;
package = C8D0000000000000000001E /* XCLocalSwiftPackageReference "../../LiveCompile" */;
productName = LyrebirdLiveCompile;
};
C8D00000000000000000020 /* LyrebirdLiveCompileUI */ = {
isa = XCSwiftPackageProductDependency;
package = C8D0000000000000000001E /* XCLocalSwiftPackageReference "../../LiveCompile" */;
productName = LyrebirdLiveCompileUI;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = C8D00000000000000000001 /* 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 = "C8D00000000000000000014"
BuildableName = "LyrebirdScratchDemo.app"
BlueprintName = "LyrebirdScratchDemo"
ReferencedContainer = "container:LyrebirdScratchDemo.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 = "C8D00000000000000000014"
BuildableName = "LyrebirdScratchDemo.app"
BlueprintName = "LyrebirdScratchDemo"
ReferencedContainer = "container:LyrebirdScratchDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C8D00000000000000000014"
BuildableName = "LyrebirdScratchDemo.app"
BlueprintName = "LyrebirdScratchDemo"
ReferencedContainer = "container:LyrebirdScratchDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,59 @@
// AppDelegate.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import AppKit
import SwiftUI
import LyrebirdSynth
import LyrebirdUI
import LyrebirdLiveCompile
import LyrebirdLiveCompileUI
final class AppDelegate: NSObject, NSApplicationDelegate {
let engine: SynthesisEngine
let session: LiveSession
var model: LyrebirdScratchModel?
var menuController: LyrebirdScratchMenuController?
var window: LyrebirdWindow?
init(engine: SynthesisEngine) {
self.engine = engine
self.session = LiveSession(engine: engine)
}
@MainActor
func applicationDidFinishLaunching(_ notification: Notification) {
do {
try engine.start()
} catch {
print("[LyrebirdScratchDemo] Engine failed to start: \(error)")
}
let model = LyrebirdScratchModel(session: session)
self.model = model
let menuController = LyrebirdScratchMenuController(model: model)
menuController.installMainMenu()
self.menuController = menuController
window = LyrebirdWindow(
title: "Lyrebird — Live Scratch",
width: 720,
height: 560
)
window?.open {
LyrebirdScratchView(model: model)
}
}
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
true
}
func applicationWillTerminate(_ notification: Notification) {
engine.stop()
session.clearTracked()
}
}
@@ -0,0 +1,26 @@
<?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>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2026 Realized Sound. All rights reserved.</string>
</dict>
</plist>
@@ -0,0 +1,45 @@
<?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>
<!--
App Sandbox is intentionally OFF.
LyrebirdScratchDemo shells out to `swiftc` at runtime to compile user-
typed Swift snippets, then calls `dlopen` on the resulting unsigned dylib.
Both operations are blocked by the macOS App Sandbox:
- `posix_spawn` / `fork` for the swiftc subprocess is disallowed in a
sandboxed process (com.apple.security.temporary-exception.mach-lookup
grants exist for specific Apple tools only, not arbitrary executables).
- `dlopen` of a dylib that was not shipped with the app bundle and is
not code-signed with a matching team ID is rejected by the sandbox.
This app is a direct-distribution developer tool, not a Mac App Store
submission. Sandbox OFF is the only viable configuration for v1.
Phase 147 polish can revisit if an XPC-worker approach is adopted.
com.apple.security.app-sandbox key is absent (defaults false).
-->
<!--
Hardened Runtime — Disable Library Validation.
With Hardened Runtime enabled (ENABLE_HARDENED_RUNTIME = YES in the
Xcode project), `dlopen` of a dylib that was not signed with the same
Team ID as the host app is rejected by the dynamic linker.
LyrebirdScratchDemo writes snippet dylibs to a per-session temp dir
via `swiftc -emit-library`; those dylibs are unsigned (swiftc does not
sign them). The `CS_ALLOW_UNSIGNED_EXECUTABLE_MEMORY` (library-
validation disable) entitlement tells the kernel to skip the
code-signing check for loaded libraries, allowing `dlopen` to succeed.
Without this entitlement the app would crash with DYLD_PRINT_LIBRARIES
reporting: "Library not loaded: ... Reason: tried: ... no suitable image
found. Did find: ... code signing blocked mmap() of '...'"
-->
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,23 @@
// main.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import AppKit
import LyrebirdSynth
import LyrebirdLiveCompile
let engine = SynthesisEngine(
blockSize: 512,
sampleRate: 48000,
numOutputChannels: 2,
numInputChannels: 0,
driver: CoreAudioDriver()
)
let delegate = AppDelegate(engine: engine)
let app = NSApplication.shared
app.setActivationPolicy(.regular)
app.delegate = delegate
app.run()
@@ -0,0 +1,389 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
B9C00000000000000000000B /* LyrebirdiOSDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C000000000000000000007 /* LyrebirdiOSDemoApp.swift */; };
B9C00000000000000000000C /* NoteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C000000000000000000008 /* NoteController.swift */; };
B9C00000000000000000000D /* SineToneUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C000000000000000000009 /* SineToneUI.swift */; };
B9C00000000000000000000E /* SineToneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C00000000000000000000A /* SineToneView.swift */; };
B9C00000000000000000000F /* LyrebirdUI in Frameworks */ = {isa = PBXBuildFile; productRef = B9C00000000000000000001C /* LyrebirdUI */; };
B9C000000000000000000020 /* SpectralBinDelayUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C00000000000000000001F /* SpectralBinDelayUI.swift */; };
B9C000000000000000000022 /* BinDelayController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C000000000000000000021 /* BinDelayController.swift */; };
B9C000000000000000000024 /* BinDelayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C000000000000000000023 /* BinDelayView.swift */; };
B9C000000000000000000028 /* VectorOscillatorUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C000000000000000000025 /* VectorOscillatorUI.swift */; };
B9C000000000000000000029 /* VectorOscillatorController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C000000000000000000026 /* VectorOscillatorController.swift */; };
B9C00000000000000000002A /* VectorOscillatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C000000000000000000027 /* VectorOscillatorView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
B9C000000000000000000004 /* LyrebirdiOSDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LyrebirdiOSDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
B9C000000000000000000006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B9C000000000000000000007 /* LyrebirdiOSDemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LyrebirdiOSDemoApp.swift; sourceTree = "<group>"; };
B9C000000000000000000008 /* NoteController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteController.swift; sourceTree = "<group>"; };
B9C000000000000000000009 /* SineToneUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SineToneUI.swift; sourceTree = "<group>"; };
B9C00000000000000000000A /* SineToneView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SineToneView.swift; sourceTree = "<group>"; };
B9C00000000000000000001F /* SpectralBinDelayUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpectralBinDelayUI.swift; sourceTree = "<group>"; };
B9C000000000000000000021 /* BinDelayController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BinDelayController.swift; sourceTree = "<group>"; };
B9C000000000000000000023 /* BinDelayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BinDelayView.swift; sourceTree = "<group>"; };
B9C000000000000000000025 /* VectorOscillatorUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VectorOscillatorUI.swift; sourceTree = "<group>"; };
B9C000000000000000000026 /* VectorOscillatorController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VectorOscillatorController.swift; sourceTree = "<group>"; };
B9C000000000000000000027 /* VectorOscillatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VectorOscillatorView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
B9C000000000000000000011 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B9C00000000000000000000F /* LyrebirdUI in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
B9C000000000000000000002 = {
isa = PBXGroup;
children = (
B9C000000000000000000005 /* LyrebirdiOSDemo */,
B9C000000000000000000003 /* Products */,
);
sourceTree = "<group>";
};
B9C000000000000000000003 /* Products */ = {
isa = PBXGroup;
children = (
B9C000000000000000000004 /* LyrebirdiOSDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
B9C000000000000000000005 /* LyrebirdiOSDemo */ = {
isa = PBXGroup;
children = (
B9C000000000000000000007 /* LyrebirdiOSDemoApp.swift */,
B9C00000000000000000001D /* UI */,
B9C00000000000000000001E /* Synthesizers */,
B9C000000000000000000006 /* Info.plist */,
);
path = LyrebirdiOSDemo;
sourceTree = "<group>";
};
B9C00000000000000000001D /* UI */ = {
isa = PBXGroup;
children = (
B9C000000000000000000008 /* NoteController.swift */,
B9C00000000000000000000A /* SineToneView.swift */,
B9C000000000000000000021 /* BinDelayController.swift */,
B9C000000000000000000023 /* BinDelayView.swift */,
B9C000000000000000000026 /* VectorOscillatorController.swift */,
B9C000000000000000000027 /* VectorOscillatorView.swift */,
);
path = UI;
sourceTree = "<group>";
};
B9C00000000000000000001E /* Synthesizers */ = {
isa = PBXGroup;
children = (
B9C000000000000000000009 /* SineToneUI.swift */,
B9C00000000000000000001F /* SpectralBinDelayUI.swift */,
B9C000000000000000000025 /* VectorOscillatorUI.swift */,
);
path = Synthesizers;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
B9C000000000000000000013 /* LyrebirdiOSDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = B9C000000000000000000014 /* Build configuration list for PBXNativeTarget "LyrebirdiOSDemo" */;
buildPhases = (
B9C000000000000000000010 /* Sources */,
B9C000000000000000000011 /* Frameworks */,
B9C000000000000000000012 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = LyrebirdiOSDemo;
packageProductDependencies = (
B9C00000000000000000001C /* LyrebirdUI */,
);
productName = LyrebirdiOSDemo;
productReference = B9C000000000000000000004 /* LyrebirdiOSDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
B9C000000000000000000001 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 2620;
TargetAttributes = {
B9C000000000000000000013 = {
CreatedOnToolsVersion = 16.0;
};
};
};
buildConfigurationList = B9C000000000000000000017 /* Build configuration list for PBXProject "LyrebirdiOSDemo" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = B9C000000000000000000002;
packageReferences = (
B9C00000000000000000001A /* XCLocalSwiftPackageReference "../.." */,
);
productRefGroup = B9C000000000000000000003 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B9C000000000000000000013 /* LyrebirdiOSDemo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
B9C000000000000000000012 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B9C000000000000000000010 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B9C00000000000000000000B /* LyrebirdiOSDemoApp.swift in Sources */,
B9C00000000000000000000C /* NoteController.swift in Sources */,
B9C00000000000000000000D /* SineToneUI.swift in Sources */,
B9C00000000000000000000E /* SineToneView.swift in Sources */,
B9C000000000000000000020 /* SpectralBinDelayUI.swift in Sources */,
B9C000000000000000000022 /* BinDelayController.swift in Sources */,
B9C000000000000000000024 /* BinDelayView.swift in Sources */,
B9C000000000000000000028 /* VectorOscillatorUI.swift in Sources */,
B9C000000000000000000029 /* VectorOscillatorController.swift in Sources */,
B9C00000000000000000002A /* VectorOscillatorView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
B9C000000000000000000015 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = LyrebirdiOSDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdiOSDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SUPPORTS_MACCATALYST = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
B9C000000000000000000016 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = LyrebirdiOSDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.realizedsound.LyrebirdiOSDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SUPPORTS_MACCATALYST = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
B9C000000000000000000018 /* 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;
DEVELOPMENT_TEAM = HE5VJFE9E4;
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;
};
B9C000000000000000000019 /* 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";
DEVELOPMENT_TEAM = HE5VJFE9E4;
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 */
B9C000000000000000000014 /* Build configuration list for PBXNativeTarget "LyrebirdiOSDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B9C000000000000000000015 /* Debug */,
B9C000000000000000000016 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B9C000000000000000000017 /* Build configuration list for PBXProject "LyrebirdiOSDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B9C000000000000000000018 /* Debug */,
B9C000000000000000000019 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
B9C00000000000000000001A /* XCLocalSwiftPackageReference "../.." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../..;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
B9C00000000000000000001C /* LyrebirdUI */ = {
isa = XCSwiftPackageProductDependency;
package = B9C00000000000000000001A /* XCLocalSwiftPackageReference "../.." */;
productName = LyrebirdUI;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = B9C000000000000000000001 /* Project object */;
}
@@ -0,0 +1,24 @@
{
"originHash" : "2f86be2113a80b402938cb09ebb72fe8cb9830066fe5b03aa1d174fcf50e2574",
"pins" : [
{
"identity" : "linenoise-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/andybest/linenoise-swift",
"state" : {
"revision" : "afc897c02b030af7333105c4fedcd843a8339238",
"version" : "0.0.3"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "e9d769113660769a4d9dd3afb855562c0b7ae7b0",
"version" : "7.3.4"
}
}
],
"version" : 3
}
@@ -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 = "B9C000000000000000000013"
BuildableName = "LyrebirdiOSDemo.app"
BlueprintName = "LyrebirdiOSDemo"
ReferencedContainer = "container:LyrebirdiOSDemo.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 = "B9C000000000000000000013"
BuildableName = "LyrebirdiOSDemo.app"
BlueprintName = "LyrebirdiOSDemo"
ReferencedContainer = "container:LyrebirdiOSDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B9C000000000000000000013"
BuildableName = "LyrebirdiOSDemo.app"
BlueprintName = "LyrebirdiOSDemo"
ReferencedContainer = "container:LyrebirdiOSDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,33 @@
<?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>NSMicrophoneUsageDescription</key>
<string>Lyrebird uses the microphone for audio input processing.</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
</dict>
<key>UILaunchScreen</key>
<dict/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2026 Realized Sound. All rights reserved.</string>
</dict>
</plist>
@@ -0,0 +1,80 @@
// LyrebirdiOSDemoApp.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
import AVFoundation
import LyrebirdSynth
import LyrebirdUI
// ── Demo selector ─────────────────────────────────────────────────────────────
// Change `demo` to `.sineTone` or `.binDelay` to switch demos.
private enum Demo { case vector, binDelay, sineTone }
private let demo: Demo = .vector
// ──────────────────────────────────────────────────────────────────────────────
@main
struct LyrebirdiOSDemoApp: App {
let engine: SynthesisEngine
// Vector oscillator demo controller (used when demo == .vector)
let vectorController: VectorOscillatorController
// Sine-tone demo controller (used when demo == .sineTone)
let sineController: NoteController
// Bin-delay demo controller (used when demo == .binDelay)
let binDelayController: BinDelayController
init() {
// Pre-activate AVAudioSession to discover the hardware's committed sample rate
// before constructing SynthesisEngine. iOS devices often lock to 48000 Hz regardless
// of the preferred rate — using the actual rate avoids pitch errors and choppy audio.
let session = AVAudioSession.sharedInstance()
try? session.setCategory(.playback, mode: .default)
try? session.setActive(true)
let sampleRate = session.sampleRate // actual hardware rate (44100 or 48000)
let driver = iOSAudioDriver()
let eng = SynthesisEngine(
blockSize: 512,
sampleRate: sampleRate,
numOutputChannels: 2,
numInputChannels: 0,
driver: driver
)
let scopeCapture = ScopeCapture(buses: [0, 1], bufferSize: 2048)
eng.scopeTap = scopeCapture
self.engine = eng
self.vectorController = VectorOscillatorController(
engine: eng,
synth: VectorOscillatorUI(),
scopeCapture: scopeCapture
)
self.sineController = NoteController(
engine: eng,
synth: SineToneUI(),
scopeCapture: scopeCapture
)
self.binDelayController = BinDelayController(
engine: eng,
scopeCapture: scopeCapture
)
}
var body: some Scene {
WindowGroup {
switch demo {
case .vector:
VectorOscillatorView(controller: vectorController)
.onDisappear { engine.stop() }
case .binDelay:
BinDelayView(controller: binDelayController)
.onDisappear { engine.stop() }
case .sineTone:
SineToneView(controller: sineController)
.onDisappear { engine.stop() }
}
}
}
}
@@ -0,0 +1,26 @@
// SineToneUI.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import LyrebirdUI
/// A stereo sine tone whose frequency, amplitude, and pan are live-controllable from the UI.
final class SineToneUI: SynthesizerBase {
/// Frequency in Hz. Slider range: 440–880 Hz.
@UIParam var frequency: Double = 440.0
/// Output amplitude (linear gain). Knob range: 0–1.
@UIParam var amplitude: Double = 0.25
/// Stereo pan position. Knob range: -1 (hard left) … 0 (center) … +1 (hard right).
@UIParam var pan: Double = 0.0
override func build() {
let osc = OscSin.Audio(freq: $frequency)
output(bus: 0, source: Pan2(input: osc * $amplitude, pan: $pan))
}
}
@@ -0,0 +1,108 @@
// SpectralBinDelayUI.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
/// Spectral-bin-delay synthesizer demo.
///
/// An `Impulse.Audio` at 0.2 Hz (one fire per 5 s) drives an FFT analysis chain
/// that includes a `SpectralBinDelay`. The delayed spectral frames are resynthesised
/// via `IFFTSynthesis` and panned to centre stereo on bus 0.
///
/// Two `LyrebirdBuffer`s — `delayTimes` and `feedbacks` — are exposed as public
/// stored properties so the UI can write into them live via `MultiSlider`.
/// Both buffers are pre-allocated at `init` and never reallocated.
///
/// - Note: `sampleRate` must be passed at construction time because
/// `SpectralBinDelay` needs it to convert delay-seconds → hop-frames.
/// Create this synthesizer *after* the engine has started so that
/// `engine.sampleRate` reflects the committed hardware rate.
final class SpectralBinDelayUI: SynthesizerBase {
// MARK: - Constants
/// FFT frame size used throughout the analysis/synthesis chain.
static let fftSize: Int = 1024
/// Number of new samples between FFT hops (75 % overlap).
static let hopSize: Int = 256
/// `fftSize / 2` — the number of independent magnitude/phase bins.
static let halfSize: Int = fftSize / 2
/// Maximum delay time accepted by `SpectralBinDelay` (seconds).
/// Keep below `lyrebirdSpectralBinDelayMaxFrames * hopSize / sampleRate`.
static let maxDelaySeconds: Double = 1.0
// MARK: - Engine sample rate (captured at init — needed in build())
/// Audio sample rate in Hz. Captured from the engine before `build()` runs.
private let engineSampleRate: Double
// MARK: - Parameter buffers (public — UI writes via MultiSlider)
/// Per-bin delay times in seconds. Mono, `halfSize` frames.
/// Default: 0 (clean pass-through until the UI writes new values).
let delayTimes: LyrebirdBuffer
/// Per-bin feedback gains in [0, 0.95). Mono, `halfSize` frames.
/// Default: 0 (clean pass-through until the UI writes new values).
let feedbacks: LyrebirdBuffer
// MARK: - Initialisation
/// - Parameter sampleRate: The engine's committed sample rate (Hz).
/// `SynthesisEngine.sampleRate` is a `let` initialised in `init`, so it
/// is valid as soon as the engine is constructed.
init(sampleRate: Double) {
let halfSize = SpectralBinDelayUI.halfSize
self.engineSampleRate = sampleRate
let dt = LyrebirdBuffer(count: halfSize)
dt.fill(with: 0.0)
let fb = LyrebirdBuffer(count: halfSize)
fb.fill(with: 0.0)
self.delayTimes = dt
self.feedbacks = fb
super.init()
}
// MARK: - Signal graph
override func build() {
let fftSize = SpectralBinDelayUI.fftSize
let hopSize = SpectralBinDelayUI.hopSize
// Source: sparse impulse that fires at 0.2 Hz (once every 5 s).
let impulseFreq = 0.2
let impulse = Impulse.Audio(freq: impulseFreq)
// SpectralBinDelay processor — allocated here inside build() which
// runs off the RT thread before the synthesizer is added to the engine.
let bd = SpectralBinDelay(
fftSize: fftSize,
hopSize: hopSize,
maxDelaySeconds: SpectralBinDelayUI.maxDelaySeconds,
sampleRate: engineSampleRate,
delayTimes: delayTimes,
feedbacks: feedbacks
)
let binDelay = SpectralChain.Audio(
input: impulse,
fftSize: fftSize,
hopSize: hopSize,
stages: [.mono(bd)]
)
// Pan to centre; the effect is mono but we send it to stereo bus 0.
output(bus: 0, source: Pan2(input: binDelay, pan: 0.0))
}
}
@@ -0,0 +1,78 @@
// VectorOscillatorUI.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import LyrebirdUI
/// A stereo vector oscillator whose XY position, frequency, and amplitude are
/// live-controllable from the UI.
///
/// Four corner wavetables are crossfaded on a 2D XY plane:
///
/// C (triangle) ── D (Hanning) (y = 1)
/// │ │
/// A (sine) ──── B (saw-ish) (y = 0)
/// x=0 x=1
///
/// Moving X blends A↔B (and C↔D); moving Y blends the AB mix into the CD mix.
final class VectorOscillatorUI: SynthesizerBase {
/// X-axis blend position. 0 = corner A/C, 1 = corner B/D.
/// Normalized [0, 1]. XY pad range: 0…1.
@UIParam var x: Double = 0.5
/// Y-axis blend position. 0 = bottom (A, B), 1 = top (C, D).
/// Normalized [0, 1]. XY pad range: 0…1.
@UIParam var y: Double = 0.5
/// Oscillator frequency in Hz. Slider range: 40–2000 Hz.
@UIParam var frequency: Double = 220.0
/// Output amplitude (linear gain). Knob range: 0–1.
@UIParam var amplitude: Double = 0.25
private let bufferA: LyrebirdBuffer // corner A: sine
private let bufferB: LyrebirdBuffer // corner B: 16-partial saw-ish
private let bufferC: LyrebirdBuffer // corner C: triangle
private let bufferD: LyrebirdBuffer // corner D: Hanning window shape
override init() {
let tableSize = lyrebirdDefaultTableSize
let a = LyrebirdBuffer(count: tableSize)
a.fillSine()
let b = LyrebirdBuffer(count: tableSize)
b.fill(partials: 16)
let c = LyrebirdBuffer(count: tableSize)
c.fillTriangle()
let d = LyrebirdBuffer(count: tableSize)
d.fillHanning()
self.bufferA = a
self.bufferB = b
self.bufferC = c
self.bufferD = d
super.init()
}
override func build() {
let osc = VectorOscillator.Audio(
bufferA: bufferA,
bufferB: bufferB,
bufferC: bufferC,
bufferD: bufferD,
freq: $frequency,
x: $x,
y: $y,
mul: $amplitude
)
output(bus: 0, source: Pan2(input: osc, pan: 0.0))
}
}
@@ -0,0 +1,74 @@
// BinDelayController.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Observation
import LyrebirdSynth
/// Controller for the spectral-bin-delay demo view.
///
/// Unlike `NoteController`, the synthesizer is created lazily when the user
/// first taps "Start Synthesizer" — this is necessary because
/// `SpectralBinDelayUI.init(sampleRate:)` requires the engine's committed
/// sample rate, which is only valid after `engine.start()` returns.
@Observable
final class BinDelayController {
let engine: SynthesisEngine
let scopeCapture: ScopeCapture
private(set) var engineRunning: Bool = false
private(set) var isPlaying: Bool = false
/// The live synthesizer instance. `nil` until first "Start Synthesizer" tap.
private(set) var synth: SpectralBinDelayUI?
init(engine: SynthesisEngine, scopeCapture: ScopeCapture) {
self.engine = engine
self.scopeCapture = scopeCapture
}
func toggleEngine() {
if engineRunning {
if isPlaying, let s = synth {
engine.remove(s)
isPlaying = false
}
engine.stop()
engineRunning = false
} else {
do {
try engine.start()
engineRunning = true
} catch {
print("Engine failed to start: \(error)")
}
}
}
func toggle() {
if isPlaying {
if let s = synth {
engine.remove(s)
}
isPlaying = false
} else {
guard engineRunning else { return }
// Create the synthesizer lazily so we don't put it in the node tree
// until the user requests it.
if synth == nil {
synth = SpectralBinDelayUI(sampleRate: engine.sampleRate)
}
if let s = synth {
do {
try engine.add(s)
isPlaying = true
} catch {
print("[Lyrebird] BinDelayController.toggle add failed: \(error)")
}
}
}
}
}
@@ -0,0 +1,131 @@
// BinDelayView.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
import LyrebirdSynth
import LyrebirdUI
/// Main view for the spectral bin-delay demo (iOS).
///
/// Shows engine and synth toggle buttons, two `MultiSlider` rows for
/// per-bin delay times and feedbacks, an engine status strip, and a scope.
/// Wrapped in a vertical `ScrollView` for compact-height device compatibility;
/// each `MultiSlider` is also wrapped in a horizontal `ScrollView` so all
/// `SpectralBinDelayUI.halfSize` (512) bin bars remain draggable on narrow
/// iPhone screens. The demo's purpose is to show that per-bin spectral control
/// is possible, not to make any one bin precisely tweakable.
struct BinDelayView: View {
let controller: BinDelayController
private let sliderHeight: CGFloat = 160
private let sliderRowWidth: CGFloat = 1280
private let maxFeedback = 0.95
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 20) {
// MARK: Engine row
HStack {
Text("Engine")
.font(.headline)
Spacer()
Button(controller.engineRunning ? "Stop Engine" : "Start Engine") {
controller.toggleEngine()
}
.buttonStyle(.borderedProminent)
.tint(controller.engineRunning ? .red : .green)
}
Divider()
// MARK: Synth row
HStack {
VStack(alignment: .leading, spacing: 2) {
Text("Spectral Bin Delay")
.font(.headline)
Text("Impulse source · 0.2 Hz · fftSize 1024 · hop 256")
.font(.caption)
.foregroundStyle(.secondary)
}
Spacer()
Button(controller.isPlaying ? "Stop" : "Start") {
controller.toggle()
}
.buttonStyle(.bordered)
.tint(controller.isPlaying ? .red : .green)
.disabled(!controller.engineRunning)
}
Divider()
// MARK: Delay times slider
Text("Delay Times (all 512 bins, range 0–1 s)")
.font(.caption)
.foregroundStyle(.secondary)
if let synth = controller.synth {
ScrollView(.horizontal, showsIndicators: true) {
MultiSlider(
buffer: synth.delayTimes,
count: SpectralBinDelayUI.halfSize,
range: 0.0...1.0,
height: sliderHeight
)
.frame(width: sliderRowWidth)
}
} else {
placeholderSlider(label: "Start synthesizer to enable")
}
// MARK: Feedback slider
Text("Feedbacks (all 512 bins, range 0–0.95)")
.font(.caption)
.foregroundStyle(.secondary)
if let synth = controller.synth {
ScrollView(.horizontal, showsIndicators: true) {
MultiSlider(
buffer: synth.feedbacks,
count: SpectralBinDelayUI.halfSize,
range: 0.0...maxFeedback,
height: sliderHeight
)
.frame(width: sliderRowWidth)
}
} else {
placeholderSlider(label: "Start synthesizer to enable")
}
Divider()
LyrebirdStatusView(engine: controller.engine)
Divider()
LyrebirdScopeView(capture: controller.scopeCapture)
.frame(height: 120)
}
.padding(20)
}
}
// MARK: - Helpers
@ViewBuilder
private func placeholderSlider(label: String) -> some View {
ZStack {
Color.lyrebirdControlBackground
Text(label)
.font(.caption)
.foregroundStyle(.secondary)
}
.frame(height: sliderHeight)
.frame(maxWidth: .infinity)
.overlay(Rectangle().stroke(Color.lyrebirdSeparator, lineWidth: 1))
}
}
@@ -0,0 +1,57 @@
// NoteController.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Observation
import LyrebirdSynth
@Observable
final class NoteController {
let engine: SynthesisEngine
let synth: SineToneUI
let scopeCapture: ScopeCapture
private(set) var engineRunning: Bool = false
private(set) var isPlaying: Bool = false
init(engine: SynthesisEngine, synth: SineToneUI, scopeCapture: ScopeCapture) {
self.engine = engine
self.synth = synth
self.scopeCapture = scopeCapture
}
func toggleEngine() {
if engineRunning {
if isPlaying {
engine.remove(synth)
isPlaying = false
}
engine.stop()
engineRunning = false
} else {
do {
try engine.start()
engineRunning = true
} catch {
print("Engine failed to start: \(error)")
}
}
}
func toggle() {
if isPlaying {
engine.remove(synth)
isPlaying = false
} else {
do {
try engine.add(synth)
isPlaying = true
} catch {
print("[Lyrebird] NoteController.toggle add failed: \(error)")
}
}
}
}
@@ -0,0 +1,112 @@
// SineToneView.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
import LyrebirdSynth
import LyrebirdUI
struct SineToneView: View {
let controller: NoteController
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 20) {
HStack {
Text("Engine")
.font(.headline)
Spacer()
Button(controller.engineRunning ? "Stop Engine" : "Start Engine") {
controller.toggleEngine()
}
.buttonStyle(.borderedProminent)
.tint(controller.engineRunning ? .red : .green)
}
Divider()
HStack {
Text("Sine Tone")
.font(.headline)
Spacer()
Button(controller.isPlaying ? "Stop" : "Start") {
controller.toggle()
}
.buttonStyle(.bordered)
.tint(controller.isPlaying ? .red : .green)
.disabled(!controller.engineRunning)
}
ParameterSlider(
"Frequency",
node: controller.synth.$frequency,
range: 440.0...880.0
)
HStack(spacing: 24) {
ParameterKnob(
"Amplitude",
node: controller.synth.$amplitude,
range: 0.0...1.0
)
ParameterKnob(
"Pan",
node: controller.synth.$pan,
range: -1.0...1.0
)
ParameterLabel("Level", node: controller.synth.$amplitude)
Spacer()
}
Divider()
LyrebirdStatusView(engine: controller.engine)
Divider()
LyrebirdScopeView(capture: controller.scopeCapture)
.frame(height: 120)
Divider()
Text("Envelope")
.font(.caption)
.foregroundStyle(.secondary)
LyrebirdEnvelopeView(
Envelope(
levels: [0.0001, 1, 0.6, 0.4, 0.0001],
durations: [0.05, 0.15, 0.4, 0.3],
curves: [.exponential, .exponential, .lin, .exponential],
loopNode: 2,
releaseNode: 4
),
width: 300,
height: 100
)
Divider()
Text("Distribution Preview (Gaussian, 200 samples)")
.font(.caption)
.foregroundStyle(.secondary)
LyrebirdScatterView(
DemandTemporalTendency(distribution: .gauss,
parX: .value(0.5), parY: .value(0.15),
seed: 42)
.samples(count: 200),
yRange: 0.0...1.0,
pointColor: .cyan,
width: 300,
height: 100
)
}
.padding(20)
}
}
}
@@ -0,0 +1,61 @@
// VectorOscillatorController.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import Observation
import LyrebirdSynth
@Observable
final class VectorOscillatorController {
let engine: SynthesisEngine
let synth: VectorOscillatorUI
let scopeCapture: ScopeCapture
private(set) var engineRunning: Bool = false
private(set) var isPlaying: Bool = false
init(
engine: SynthesisEngine,
synth: VectorOscillatorUI,
scopeCapture: ScopeCapture
) {
self.engine = engine
self.synth = synth
self.scopeCapture = scopeCapture
}
func toggleEngine() {
if engineRunning {
if isPlaying {
engine.remove(synth)
isPlaying = false
}
engine.stop()
engineRunning = false
} else {
do {
try engine.start()
engineRunning = true
} catch {
print("Engine failed to start: \(error)")
}
}
}
func toggle() {
if isPlaying {
engine.remove(synth)
isPlaying = false
} else {
do {
try engine.add(synth)
isPlaying = true
} catch {
print("[Lyrebird] VectorOscillatorController.toggle add failed: \(error)")
}
}
}
}
@@ -0,0 +1,80 @@
// VectorOscillatorView.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
import LyrebirdSynth
import LyrebirdUI
struct VectorOscillatorView: View {
let controller: VectorOscillatorController
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 20) {
HStack {
Text("Engine")
.font(.headline)
Spacer()
Button(controller.engineRunning ? "Stop Engine" : "Start Engine") {
controller.toggleEngine()
}
.buttonStyle(.borderedProminent)
.tint(controller.engineRunning ? .red : .green)
}
Divider()
HStack {
Text("Vector Oscillator")
.font(.headline)
Spacer()
Button(controller.isPlaying ? "Stop" : "Start") {
controller.toggle()
}
.buttonStyle(.bordered)
.tint(controller.isPlaying ? .red : .green)
.disabled(!controller.engineRunning)
}
ParameterXY(
xLabel: "X (A↔B)",
xNode: controller.synth.$x,
xRange: 0.0...1.0,
yLabel: "Y (AB↔CD)",
yNode: controller.synth.$y,
yRange: 0.0...1.0
)
.frame(width: 240, height: 240)
HStack(spacing: 24) {
ParameterKnob(
"Frequency",
node: controller.synth.$frequency,
range: 40.0...2000.0
)
ParameterKnob(
"Amplitude",
node: controller.synth.$amplitude,
range: 0.0...1.0
)
Spacer()
}
Divider()
LyrebirdStatusView(engine: controller.engine)
Divider()
LyrebirdScopeView(capture: controller.scopeCapture)
.frame(height: 120)
}
.padding(20)
}
}
}
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.