Skip to content

Instantly share code, notes, and snippets.

@pigeonhill pigeonhill/LESM.lua
Last active Dec 7, 2019

Embed
What would you like to do?
LE Simulator
--[[
LE Sim
SET UP INFO:
Set Canon movie mode to 1920; Set ML FPS overrride to 1 (adjust later); Remember the shutter speed you set
Start in LV mode or not
Set duration of LE simulation in ML Bulb timer (note switched off)
Start in photo mode, ie not video mode
Follow script's LV prompts
Script will provide the option of taking an advanced bracket set after the MLV is captured (ensure Advanced Bracketing is setup to your needs)
See additional notes below in the body of the script
Tested on a 5D3
Release 0.62
Dec 2019
Copyleft: Garry George 2019
photography.grayheron.net
--]]
local expt = camera.shutter.value
menu.close()
-- check shutter
if expt > 5 or expt < 0.15 then
display.notify_box("Adjust exposure, then rerun script",2000)
msleep(2000)
return
end
while not lv.running do
display.notify_box("Switch on LV")
msleep(1000)
end
while lv.overlays ~= 2 do
display.notify_box("Press INFO to get to ML overlays")
msleep(1000)
end
menu.set("Movie","Crop mode","Full-res LiveView")
menu.set("Movie","RAW video","ON")
local step = 0
while menu.get("RAW video","Resolution"):sub(1,1) ~= "5" do
menu.open()
menu.close()
step = step + 1
if step > 5 then
display.notify_box("Can't run script",2000)
menu.set("Movie","Crop mode","OFF")
menu.set("Movie","RAW video","OFF")
menu.set("Movie","FPS override","OFF")
msleep(2000)
return end
task.yield(1000)
end
while camera.mode ~= MODE.MOVIE do
display.notify_box("Enable MOVIE mode")
msleep(1000)
end
menu.open()
menu.select("Movie","FPS override")
while menu.get("Movie","FPS override","") == "OFF" do
display.notify_box("Switch on FPS Override")
msleep(1000)
end
display.notify_box("Check settings. Then long press Halfshutter (>2s)",2000)
--***********************************************************************************************************
-- At this point the script will pause and you need to finish the set up manually from the Movie screen
-- Switch on and adjust FPS Override, plus check shutter speed (from ML Expo menu or LV), and check card recording ability under Crop mode ML menu
-- Ideally recording should be continuous, but you may get away with less for a short LE
-- Once you are content with the set up, press the Trash button to exit the ML menu (you can reenter ML Menus if you wish)
-- Wait for the screen to stabilise and show the scene. If it doesn't press the Canon Menu on and off to refresh things
-- Once you are ready, do a long half shutter key press (>2s) to finish the script and create the MLV
-- A half shutter press less than 2s will finish the script without capturing an MLV and null out ML movie stuff
-- Once the script has run, remember you will still be in movie mode, ie switch back to photo mode
--***********************************************************************************************************
key.wait(KEY.HALFSHUTTER)
t = dryos.ms_clock
key.wait(KEY.UNPRESS_HALFSHUTTER)
local stop = true
if dryos.ms_clock - t > 2000 then
stop = false
msleep(1000)
movie.start()
for i = 0, menu.get("Bulb Timer","Exposure duration",0), 1 do task.yield(1000) end
movie.stop()
end
while camera.mode == MODE.MOVIE do
display.notify_box("Disable MOVIE mode")
msleep(1000)
end
menu.set("Movie","Crop mode","OFF")
menu.set("Movie","RAW video","OFF")
menu.set("Movie","FPS override","OFF")
msleep(1000)
camera.shutter.value = expt
lv.start()
-- if still running, script will now give you the option of taking an Advanced Bracket set
if not stop then
local done = false
menu.set("Shoot","Advanced Bracket",1)
while (not done) do
display.notify_box("Full Shutter to start Advanced Bracketing".."\n".."Half Shutter to Exit")
msleep(1000)
if key.last == KEY.FULLSHUTTER then
task.yield(1000)
done = true
menu.set("Shoot","Advanced Bracket",0)
elseif key.last == KEY.UNPRESS_HALFSHUTTER then
done = true
menu.set("Shoot","Advanced Bracket",0)
return
end
end
menu.set("Shoot","Advanced Bracket",0)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.