Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
--[[
LE simulation via Bracketing, using shutterless, Full Res Silent Picture
Creates brackets for post processing a simulated LE exposure
User must set FRSP mode, ie DNG or MLV and also wheather to use Dual-ISO
BUT note that only DNG mode has been tested ;-)
Exposure Sim should be on
Should be in LV
It is best to have Canon review set to OFF
Base exposure should be between 0.25-14 secs
Version 0.8: Requires the Lua Fix
*******************************************************************************************************
* *
* If you reference this script, please consider acknowledging me: http://photography.grayheron.net/ *
* *
*******************************************************************************************************
--]]
FRSP_brackets = 0
function my_shoot() -- to grab an image
camera.shoot(false)
-- key.press(KEY.HALFSHUTTER)
-- msleep(100)
-- key.press(KEY.UNPRESS_HALFSHUTTER)
end
function check_bookend() -- adds an over exposed FRSP frame
if LEmenu.submenu["Bookends?"].value == "yes"
then
local iso = camera.iso.apex
local av = camera.aperture.apex
camera.iso.apex = 10
camera.aperture.apex = camera.aperture.min.apex
my_shoot()
camera.iso.apex = iso
camera.aperture.apex = av
end
end
function go() -- and run the script
menu.close()
local LE_count = 0
if camera.shutter.value < 0.25 or camera.shutter.value > 14 then -- not fit for FRSP use
menu.set("Shoot","Silent Picture",0)
beep (3, 200 , 500) -- display warning message
display.notify_box("Adjust your shutter time: 0.25-14 secs", 5000)
lv.resume()
else -- alright to use FRSP
menu.set("Shoot","Silent Picture",1)
msleep(LEmenu.submenu["Delay"].value * 1000)
check_bookend()
repeat
LE_count = LE_count + 1
my_shoot()
until LE_count == FRSP_brackets
check_bookend()
menu.set("Shoot","Silent Picture",0)
lv.resume()
beep (3, 200 , 1000) -- display warning message
display.notify_box("Script Finished Running", 5000)
FRSP_brackets = 0
end
end
LEmenu = menu.new
{
parent = "Shoot",
name = "LE Simulator",
help = "Only uses FRSP",
depends_on = DEPENDS_ON.LIVEVIEW,
submenu =
{
{
name = "Run Script",
help = "Does what it says after pressing SET",
depends_on = DEPENDS_ON.LIVEVIEW,
select = function(this) if FRSP_brackets ~= 0 and lv.enabled then task.create(go) end
end,
},
{
name = "LE Time?",
help = "Simulated LE time in seconds",
min = 0,
max = 600,
icon_type = ICON_TYPE.BOOL,
select = function(this,delta)
this.value = this.value + delta
if this.value > this.max then
this.value = this.min
elseif this.value < this.min then
this.value = this.max
end
end,
warning = function(this)
if LEmenu.submenu["LE Time?"].value ~= 0 then
FRSP_brackets = math.ceil(LEmenu.submenu["LE Time?"].value/camera.shutter.value)
else
FRSP_brackets = 0
end
if FRSP_brackets == 0 then
return "LE bracket taking switched off"
else
return "Note: "..tostring(FRSP_brackets).." brackets will be taken"
end
end
},
{
name = "Delay",
help = "Delays script start by stated number of secs",
min = 0,
max = 5,
icon_type = ICON_TYPE.BOOL,
select = function(this,delta)
this.value = this.value + delta
if this.value > this.max then
this.value = this.min
elseif this.value < this.min then
this.value = this.max
end
end,
},{
name = "Bookends?",
help = "Places an overexposed frame at start and end of FRSP bracket set",
choices = {"no","yes"},
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment