├── LICENSE ├── README.md ├── Stacker.app.zip ├── Stacker.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── pbarnard.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist └── Stacker ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets ├── AppIcon.appiconset │ └── Contents.json └── Contents.json ├── Base.lproj └── MainMenu.xib ├── Info.plist ├── Stacker.entitlements └── main.m /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2018, Paul Barnard 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # stacker 2 | Simple focus stacking controller for the Sony Remote application. 3 | Based on the PC application B8Stack by binarycamera https://github.com/binarycamera/b8stack 4 | All the credit goes to binarycamera. 5 | # Usage 6 | 1. Connect camera to computer using USB cable 7 | 2. Start Sony Imaging Edge 8 | 3. Start Stacker 9 | 4. Set the Shutter Time (The time between shutter actuations). 10 | Note that this needs to allow sufficient time for the Imaging Edge Software to upload the preview 11 | If you finish up with less images than expected increase this time to give Sony a bit more time... 12 | 5. Set the focus delay. This is to give the lens time to move to the new position. 13 | 6. Select the granularity of th emovement. 14 | With a Batis 25 on an A7Riii Fine shas about 300 steps end to, 15 | Medium about 80 and Course about 20. Experiment... 16 | Press Go 17 | # Download 18 | https://www.dropbox.com/s/gt9e0l25t2mg3mu/Stacker.app.zip?dl=1 19 | # Support 20 | Feel free to use the code in any way you like 21 | Send feedback paulrbarnard -at- hotmail -dot- com or throuhg dpreview forum (user:paulrbarnard) 22 | -------------------------------------------------------------------------------- /Stacker.app.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulrbarnard/stacker/e89383287823be7b92dda514fefceb6872186196/Stacker.app.zip -------------------------------------------------------------------------------- /Stacker.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2B6B3125213805FC000A7493 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B6B3124213805FC000A7493 /* AppDelegate.m */; }; 11 | 2B6B3127213805FE000A7493 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B6B3126213805FE000A7493 /* Assets.xcassets */; }; 12 | 2B6B312A213805FE000A7493 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2B6B3128213805FE000A7493 /* MainMenu.xib */; }; 13 | 2B6B312D213805FE000A7493 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B6B312C213805FE000A7493 /* main.m */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 2B6B3120213805FC000A7493 /* Stacker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Stacker.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | 2B6B3123213805FC000A7493 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 19 | 2B6B3124213805FC000A7493 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 20 | 2B6B3126213805FE000A7493 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | 2B6B3129213805FE000A7493 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 22 | 2B6B312B213805FE000A7493 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | 2B6B312C213805FE000A7493 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 24 | 2B6B312E213805FE000A7493 /* Stacker.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Stacker.entitlements; sourceTree = ""; }; 25 | /* End PBXFileReference section */ 26 | 27 | /* Begin PBXFrameworksBuildPhase section */ 28 | 2B6B311D213805FC000A7493 /* Frameworks */ = { 29 | isa = PBXFrameworksBuildPhase; 30 | buildActionMask = 2147483647; 31 | files = ( 32 | ); 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXFrameworksBuildPhase section */ 36 | 37 | /* Begin PBXGroup section */ 38 | 2B6B3117213805FC000A7493 = { 39 | isa = PBXGroup; 40 | children = ( 41 | 2B6B3122213805FC000A7493 /* Stacker */, 42 | 2B6B3121213805FC000A7493 /* Products */, 43 | ); 44 | sourceTree = ""; 45 | }; 46 | 2B6B3121213805FC000A7493 /* Products */ = { 47 | isa = PBXGroup; 48 | children = ( 49 | 2B6B3120213805FC000A7493 /* Stacker.app */, 50 | ); 51 | name = Products; 52 | sourceTree = ""; 53 | }; 54 | 2B6B3122213805FC000A7493 /* Stacker */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | 2B6B3123213805FC000A7493 /* AppDelegate.h */, 58 | 2B6B3124213805FC000A7493 /* AppDelegate.m */, 59 | 2B6B3126213805FE000A7493 /* Assets.xcassets */, 60 | 2B6B3128213805FE000A7493 /* MainMenu.xib */, 61 | 2B6B312B213805FE000A7493 /* Info.plist */, 62 | 2B6B312C213805FE000A7493 /* main.m */, 63 | 2B6B312E213805FE000A7493 /* Stacker.entitlements */, 64 | ); 65 | path = Stacker; 66 | sourceTree = ""; 67 | }; 68 | /* End PBXGroup section */ 69 | 70 | /* Begin PBXNativeTarget section */ 71 | 2B6B311F213805FC000A7493 /* Stacker */ = { 72 | isa = PBXNativeTarget; 73 | buildConfigurationList = 2B6B3131213805FE000A7493 /* Build configuration list for PBXNativeTarget "Stacker" */; 74 | buildPhases = ( 75 | 2B6B311C213805FC000A7493 /* Sources */, 76 | 2B6B311D213805FC000A7493 /* Frameworks */, 77 | 2B6B311E213805FC000A7493 /* Resources */, 78 | ); 79 | buildRules = ( 80 | ); 81 | dependencies = ( 82 | ); 83 | name = Stacker; 84 | productName = Stacker; 85 | productReference = 2B6B3120213805FC000A7493 /* Stacker.app */; 86 | productType = "com.apple.product-type.application"; 87 | }; 88 | /* End PBXNativeTarget section */ 89 | 90 | /* Begin PBXProject section */ 91 | 2B6B3118213805FC000A7493 /* Project object */ = { 92 | isa = PBXProject; 93 | attributes = { 94 | LastUpgradeCheck = 0940; 95 | ORGANIZATIONNAME = ToxicCelery; 96 | TargetAttributes = { 97 | 2B6B311F213805FC000A7493 = { 98 | CreatedOnToolsVersion = 9.4.1; 99 | }; 100 | }; 101 | }; 102 | buildConfigurationList = 2B6B311B213805FC000A7493 /* Build configuration list for PBXProject "Stacker" */; 103 | compatibilityVersion = "Xcode 9.3"; 104 | developmentRegion = en; 105 | hasScannedForEncodings = 0; 106 | knownRegions = ( 107 | en, 108 | Base, 109 | ); 110 | mainGroup = 2B6B3117213805FC000A7493; 111 | productRefGroup = 2B6B3121213805FC000A7493 /* Products */; 112 | projectDirPath = ""; 113 | projectRoot = ""; 114 | targets = ( 115 | 2B6B311F213805FC000A7493 /* Stacker */, 116 | ); 117 | }; 118 | /* End PBXProject section */ 119 | 120 | /* Begin PBXResourcesBuildPhase section */ 121 | 2B6B311E213805FC000A7493 /* Resources */ = { 122 | isa = PBXResourcesBuildPhase; 123 | buildActionMask = 2147483647; 124 | files = ( 125 | 2B6B3127213805FE000A7493 /* Assets.xcassets in Resources */, 126 | 2B6B312A213805FE000A7493 /* MainMenu.xib in Resources */, 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | /* End PBXResourcesBuildPhase section */ 131 | 132 | /* Begin PBXSourcesBuildPhase section */ 133 | 2B6B311C213805FC000A7493 /* Sources */ = { 134 | isa = PBXSourcesBuildPhase; 135 | buildActionMask = 2147483647; 136 | files = ( 137 | 2B6B312D213805FE000A7493 /* main.m in Sources */, 138 | 2B6B3125213805FC000A7493 /* AppDelegate.m in Sources */, 139 | ); 140 | runOnlyForDeploymentPostprocessing = 0; 141 | }; 142 | /* End PBXSourcesBuildPhase section */ 143 | 144 | /* Begin PBXVariantGroup section */ 145 | 2B6B3128213805FE000A7493 /* MainMenu.xib */ = { 146 | isa = PBXVariantGroup; 147 | children = ( 148 | 2B6B3129213805FE000A7493 /* Base */, 149 | ); 150 | name = MainMenu.xib; 151 | sourceTree = ""; 152 | }; 153 | /* End PBXVariantGroup section */ 154 | 155 | /* Begin XCBuildConfiguration section */ 156 | 2B6B312F213805FE000A7493 /* Debug */ = { 157 | isa = XCBuildConfiguration; 158 | buildSettings = { 159 | ALWAYS_SEARCH_USER_PATHS = NO; 160 | CLANG_ANALYZER_NONNULL = YES; 161 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 162 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 163 | CLANG_CXX_LIBRARY = "libc++"; 164 | CLANG_ENABLE_MODULES = YES; 165 | CLANG_ENABLE_OBJC_ARC = YES; 166 | CLANG_ENABLE_OBJC_WEAK = YES; 167 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 168 | CLANG_WARN_BOOL_CONVERSION = YES; 169 | CLANG_WARN_COMMA = YES; 170 | CLANG_WARN_CONSTANT_CONVERSION = YES; 171 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 172 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 173 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 174 | CLANG_WARN_EMPTY_BODY = YES; 175 | CLANG_WARN_ENUM_CONVERSION = YES; 176 | CLANG_WARN_INFINITE_RECURSION = YES; 177 | CLANG_WARN_INT_CONVERSION = YES; 178 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 179 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 180 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 181 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 182 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 183 | CLANG_WARN_STRICT_PROTOTYPES = YES; 184 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 185 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 186 | CLANG_WARN_UNREACHABLE_CODE = YES; 187 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 188 | CODE_SIGN_IDENTITY = "Mac Developer"; 189 | COPY_PHASE_STRIP = NO; 190 | DEBUG_INFORMATION_FORMAT = dwarf; 191 | ENABLE_STRICT_OBJC_MSGSEND = YES; 192 | ENABLE_TESTABILITY = YES; 193 | GCC_C_LANGUAGE_STANDARD = gnu11; 194 | GCC_DYNAMIC_NO_PIC = NO; 195 | GCC_NO_COMMON_BLOCKS = YES; 196 | GCC_OPTIMIZATION_LEVEL = 0; 197 | GCC_PREPROCESSOR_DEFINITIONS = ( 198 | "DEBUG=1", 199 | "$(inherited)", 200 | ); 201 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 202 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 203 | GCC_WARN_UNDECLARED_SELECTOR = YES; 204 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 205 | GCC_WARN_UNUSED_FUNCTION = YES; 206 | GCC_WARN_UNUSED_VARIABLE = YES; 207 | MACOSX_DEPLOYMENT_TARGET = 10.10; 208 | MTL_ENABLE_DEBUG_INFO = YES; 209 | ONLY_ACTIVE_ARCH = YES; 210 | SDKROOT = macosx; 211 | }; 212 | name = Debug; 213 | }; 214 | 2B6B3130213805FE000A7493 /* Release */ = { 215 | isa = XCBuildConfiguration; 216 | buildSettings = { 217 | ALWAYS_SEARCH_USER_PATHS = NO; 218 | CLANG_ANALYZER_NONNULL = YES; 219 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 221 | CLANG_CXX_LIBRARY = "libc++"; 222 | CLANG_ENABLE_MODULES = YES; 223 | CLANG_ENABLE_OBJC_ARC = YES; 224 | CLANG_ENABLE_OBJC_WEAK = YES; 225 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 226 | CLANG_WARN_BOOL_CONVERSION = YES; 227 | CLANG_WARN_COMMA = YES; 228 | CLANG_WARN_CONSTANT_CONVERSION = YES; 229 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 230 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 231 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 232 | CLANG_WARN_EMPTY_BODY = YES; 233 | CLANG_WARN_ENUM_CONVERSION = YES; 234 | CLANG_WARN_INFINITE_RECURSION = YES; 235 | CLANG_WARN_INT_CONVERSION = YES; 236 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 237 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 238 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 239 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | CODE_SIGN_IDENTITY = "Mac Developer"; 247 | COPY_PHASE_STRIP = NO; 248 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 249 | ENABLE_NS_ASSERTIONS = NO; 250 | ENABLE_STRICT_OBJC_MSGSEND = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu11; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 257 | GCC_WARN_UNUSED_FUNCTION = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | MACOSX_DEPLOYMENT_TARGET = 10.10; 260 | MTL_ENABLE_DEBUG_INFO = NO; 261 | SDKROOT = macosx; 262 | }; 263 | name = Release; 264 | }; 265 | 2B6B3132213805FE000A7493 /* Debug */ = { 266 | isa = XCBuildConfiguration; 267 | buildSettings = { 268 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 269 | CODE_SIGN_ENTITLEMENTS = Stacker/Stacker.entitlements; 270 | CODE_SIGN_STYLE = Automatic; 271 | COMBINE_HIDPI_IMAGES = YES; 272 | DEVELOPMENT_TEAM = FT2V4DQ84R; 273 | INFOPLIST_FILE = Stacker/Info.plist; 274 | LD_RUNPATH_SEARCH_PATHS = ( 275 | "$(inherited)", 276 | "@executable_path/../Frameworks", 277 | ); 278 | PRODUCT_BUNDLE_IDENTIFIER = com.toxic.Stacker; 279 | PRODUCT_NAME = "$(TARGET_NAME)"; 280 | }; 281 | name = Debug; 282 | }; 283 | 2B6B3133213805FE000A7493 /* Release */ = { 284 | isa = XCBuildConfiguration; 285 | buildSettings = { 286 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 287 | CODE_SIGN_ENTITLEMENTS = Stacker/Stacker.entitlements; 288 | CODE_SIGN_STYLE = Automatic; 289 | COMBINE_HIDPI_IMAGES = YES; 290 | DEVELOPMENT_TEAM = FT2V4DQ84R; 291 | INFOPLIST_FILE = Stacker/Info.plist; 292 | LD_RUNPATH_SEARCH_PATHS = ( 293 | "$(inherited)", 294 | "@executable_path/../Frameworks", 295 | ); 296 | PRODUCT_BUNDLE_IDENTIFIER = com.toxic.Stacker; 297 | PRODUCT_NAME = "$(TARGET_NAME)"; 298 | }; 299 | name = Release; 300 | }; 301 | /* End XCBuildConfiguration section */ 302 | 303 | /* Begin XCConfigurationList section */ 304 | 2B6B311B213805FC000A7493 /* Build configuration list for PBXProject "Stacker" */ = { 305 | isa = XCConfigurationList; 306 | buildConfigurations = ( 307 | 2B6B312F213805FE000A7493 /* Debug */, 308 | 2B6B3130213805FE000A7493 /* Release */, 309 | ); 310 | defaultConfigurationIsVisible = 0; 311 | defaultConfigurationName = Release; 312 | }; 313 | 2B6B3131213805FE000A7493 /* Build configuration list for PBXNativeTarget "Stacker" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | 2B6B3132213805FE000A7493 /* Debug */, 317 | 2B6B3133213805FE000A7493 /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | /* End XCConfigurationList section */ 323 | }; 324 | rootObject = 2B6B3118213805FC000A7493 /* Project object */; 325 | } 326 | -------------------------------------------------------------------------------- /Stacker.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Stacker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Stacker.xcodeproj/xcuserdata/pbarnard.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Stacker.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Stacker/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Stacker 4 | // 5 | // Created by pbarnard on 30/08/2018. 6 | // Copyright © 2018 ToxicCelery. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject { 12 | NSAppleScript *key; 13 | int steps; 14 | int stepSize; 15 | int thisStep; 16 | float period; 17 | float focus; 18 | NSTimer *periodTimer; 19 | NSTimer *focusTimer; 20 | NSUserDefaults * prefs; 21 | NSDictionary *defaultPrefs; 22 | 23 | 24 | __weak IBOutlet NSTextField *stepsText; 25 | __weak IBOutlet NSTextField *periodText; 26 | __weak IBOutlet NSTextField *focusText; 27 | __weak IBOutlet NSButton *goButton; 28 | __weak IBOutlet NSTextField *StatusText; 29 | __weak IBOutlet NSButton *stopButton; 30 | __weak IBOutlet NSButton *fineRadio; 31 | __weak IBOutlet NSButton *coarseRadio; 32 | __weak IBOutlet NSButton *xCoarseRadio; 33 | __weak IBOutlet NSButton *homeCheck; 34 | __weak IBOutlet NSSlider *stepSizeSlider; 35 | __weak IBOutlet NSTextField *stepSizeText; 36 | } 37 | 38 | 39 | - (IBAction)stopStack:(id)sender; 40 | - (IBAction)ActionStack:(id)sender; 41 | - (IBAction)stepsChanged:(id)sender; 42 | - (IBAction)periodChanged:(id)sender; 43 | - (IBAction)focusChanged:(id)sender; 44 | - (IBAction)fineChanged:(id)sender; 45 | - (IBAction)coarseChanged:(id)sender; 46 | - (IBAction)xCoarseChanged:(id)sender; 47 | - (IBAction)stepSizeChaged:(id)sender; 48 | 49 | 50 | @end 51 | 52 | -------------------------------------------------------------------------------- /Stacker/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Stacker 4 | // 5 | // Created by pbarnard on 30/08/2018. 6 | // Copyright © 2018 ToxicCelery. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @property (weak) IBOutlet NSWindow *window; 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 19 | // Insert code here to initialize your application 20 | NSArray *userDefaults = [NSArray arrayWithObjects:@"10",@"2",@"1",@"0",@"1",@"0",@"1",@"1",nil]; 21 | NSArray *keys = [NSArray arrayWithObjects:@"steps",@"period",@"focus",@"fine",@"medium",@"coarse",@"home",@"stepSize",nil]; 22 | defaultPrefs = [NSDictionary dictionaryWithObjects:userDefaults forKeys:keys]; 23 | prefs = [NSUserDefaults standardUserDefaults]; 24 | [prefs registerDefaults:defaultPrefs]; 25 | 26 | steps = [[prefs valueForKey:@"steps"] intValue]; 27 | stepSize = [[prefs valueForKey:@"stepSize"] intValue]; 28 | period = [[prefs valueForKey:@"period"] floatValue]; 29 | focus = [[prefs valueForKey:@"focus"] floatValue]; 30 | stepsText.intValue = steps; 31 | stepSizeText.intValue = stepSize; 32 | stepSizeSlider.intValue = stepSize; 33 | periodText.floatValue = period; 34 | focusText.floatValue = focus; 35 | StatusText.stringValue = @""; 36 | stopButton.enabled = FALSE; 37 | fineRadio.state = [[prefs valueForKey:@"fine"] boolValue]; 38 | coarseRadio.state = [[prefs valueForKey:@"medium"] boolValue]; 39 | xCoarseRadio.state = [[prefs valueForKey:@"coarse"] boolValue]; 40 | homeCheck.state = [[prefs valueForKey:@"home"] boolValue]; 41 | } 42 | 43 | -(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { 44 | return YES; 45 | } 46 | 47 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 48 | // Insert code here to tear down your application 49 | [prefs setObject:[NSString stringWithFormat:@"%d",steps] forKey:@"steps"]; 50 | [prefs setObject:[NSString stringWithFormat:@"%d",stepSize] forKey:@"stepSize"]; 51 | [prefs setObject:[NSString stringWithFormat:@"%f",period] forKey:@"period"]; 52 | [prefs setObject:[NSString stringWithFormat:@"%f",focus] forKey:@"focus"]; 53 | [prefs setObject:[NSString stringWithFormat:@"%ld",(long)fineRadio.state] forKey:@"fine"]; 54 | [prefs setObject:[NSString stringWithFormat:@"%ld",(long)coarseRadio.state] forKey:@"medium"]; 55 | [prefs setObject:[NSString stringWithFormat:@"%ld",(long)xCoarseRadio.state] forKey:@"coarse"]; 56 | [prefs setObject:[NSString stringWithFormat:@"%ld",(long)homeCheck.state] forKey:@"home"]; 57 | } 58 | 59 | 60 | - (IBAction)stopStack:(id)sender { 61 | [self stopFocusTimer]; 62 | [self stopPeriodTimer]; 63 | stopButton.enabled = FALSE; 64 | goButton.enabled = TRUE; 65 | } 66 | 67 | - (IBAction)ActionStack:(id)sender { 68 | dispatch_async(dispatch_get_main_queue(), ^{ 69 | [self nearFocus]; 70 | self->thisStep = 0; 71 | [self startFocusTimer:2]; // make initial start 2 seconds 72 | }); 73 | goButton.enabled = FALSE; 74 | stopButton.enabled = TRUE; 75 | } 76 | 77 | -(void)activateRemote{ 78 | NSAppleScript *command = [[NSAppleScript alloc] initWithSource:@"activate application \"Remote\""]; 79 | [command executeAndReturnError:nil]; 80 | } 81 | 82 | -(void)nearFocus{ 83 | if(homeCheck.state == TRUE){ 84 | [self activateRemote]; 85 | NSAppleScript *command = [[NSAppleScript alloc] initWithSource:@"tell application \"System Events\" to keystroke \"qqqq\""]; 86 | [command executeAndReturnError:nil]; 87 | [self startFocusTimer:2]; // wait 2 seconds before first frame 88 | } 89 | } 90 | 91 | -(void)stepFocus{ 92 | [self activateRemote]; 93 | for (int i=0; i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | Default 552 | 553 | 554 | 555 | 556 | 557 | 558 | Left to Right 559 | 560 | 561 | 562 | 563 | 564 | 565 | Right to Left 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | Default 577 | 578 | 579 | 580 | 581 | 582 | 583 | Left to Right 584 | 585 | 586 | 587 | 588 | 589 | 590 | Right to Left 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 799 | 809 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | -------------------------------------------------------------------------------- /Stacker/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.photography 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2018 ToxicCelery. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Stacker/Stacker.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Stacker/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Stacker 4 | // 5 | // Created by pbarnard on 30/08/2018. 6 | // Copyright © 2018 ToxicCelery. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | --------------------------------------------------------------------------------