Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - GamerGuppy

#1
Thank you garry23, I have looked through some of your work and will definitely use it for inspiration for future projects!

Having used my script for some time now, I found there to be one major issue with the script in it's current state. For the auto-ISO value to be read out succesfully, the camera's metering needs to detect a change in light intensity (1) or the metering must be restarted (2). If neither of these events have taken place, attempting to read out the auto-ISO value will instead return 0.

E.g. a typical use-case of this script is described below. However the script will frequently choose a faulty ISO value when the scene you photograph is uniformly lit.


  • Let's say your camera has a fixed ISO of e.g. 800
  • After making some photographs you want to photograph another (evenly lit) scene so you point your camera into that direction
  • You now press the joystick to set the camera to AUTO-ISO
  • You see through the viewfinder the camera settled on ISO 640 and you decide to lock this value, so you press the joystick again
  • However the camera reverts back to ISO 800

The reason the camera went back to ISO 800, was because it simply could not read out the ISO 640 value as determined by auto-ISO. Instead the script found the auto-ISO value to be 0.
Note that this only happens when the new scene you photograph is evenly or uniformly lit. If I would briefly place my hand in front of the lens and remove it again, then the metering of the camera would detect this change of light intensity and suddenly I would be able to read out the auto ISO value of 640. Also if I would wait about 5 seconds for my metering to stop, and then restart it again, would give me the correct value of 640.

I tried all sorts of things to fix this problem. But I am unable to do so. Tips or tricks are very much welcome! I wish I could write my own auto-ISO script, but that would require me to read out the camera's metering somehow. Which I think is impossible through Lua scripting as of now.
#2
Hope you all had a great Christmas! So there are 2 things I am looking to improve my script upon.


  • So I am currently using the joystick to lock exposure.
    However when I hold the joystick down for a longer period of time, it will open the Magic Lantern menu.
    I do not recall setting such a shortcut myself and can't find the setting to disable this.
    Can this be disabled at all?

  • While using the back button focus (holding the AF-ON) button, the script won't detect any more joystick presses.
    Any chance there is still a way to detect if there was interaction with the joystick?

If you have any suggestions or solutions I would be very grateful! Thanks.
#3
    Thanks for your help a1ex! After you confirmed that copy2m contained the code that should make this work, I tried a second time, identified my mistake and succeeded this time.

    So the following script introduces AE-lock HOLD functionality in manual mode with auto-iso. Currently it is mapped to the joystick but can easily be mapped to e.g. the info or set button too. So depressing the joystick will switch between auto-iso and locked iso. Furthermore you can use the joystick to increase or decrease ISO. It also works nicely together with the exposure-lock module, which is absolutely amazing.

    My camera feels like a different beast now. Yesterday this was still a feature I didn't dare dream about. But the sweet and tender words (of warning) by Audionut inspired me on my endeavour to obtain this functionality through scripting. His words will forever tickle me at night and made me a greater person (at Lua).

    This script was realized through info and pieces of code found in:

I might try and clean the code up a little further later on. Hope it is useful to others!

require("config")

prop_value = {}
prop_value.__index = prop_value

local isostate = 1
local isovalue = 0

local ISO_step_up={75,77,80,83,85,88,91,93,96,99,101,104,107,109,112,115,117,120,120} -- RAW ISO values used when increasing
local ISO_current={72,75,77,80,83,85,88,91,93,96,99,101,104,107,109,112,115,117,120}
local ISO_step_dn={72,72,75,77,80,83,85,88,91,93,96,99,101,104,107,109,112,115,117} -- RAW ISO values used when decreasing

function prop_value.create(...)
    local pv =
    {
        value = 0,
        previous = 0,
        time = dryos.ms_clock,
        props = {...}
    }
    setmetatable(pv,prop_value)
    return pv
end

function prop_value:enable()
    for i,v in ipairs(self.props) do
        function v.handler(prop,value) self:set(value) end
    end
end

function prop_value:set(value)
    if value ~= 0 then
        self.previous = self.value
        self.value = value
    end
end

function prop_value:get()
    return self.value
end

local iso_value = prop_value.create(property.ISO,property.ISO_AUTO)

copy2m_menu = menu.new
{
    parent  = "Prefs",
    name    = "AUTO ISO LOCK",
    help    = "Lock auto-iso in M",
    choices = {"OFF","ON"},
    value   = "OFF"
}

function lockisoinmanual(key,value)
isovalue = camera.iso.raw
if camera.mode == MODE.M then
-- Toggle between fixed and auto ISO
if key == KEY.JOY_CENTER then
if isostate == 0 then
isostate = 1
iso_value:enable()
local i = iso_value:get()
if i ~= 0 then camera.iso.raw = i end
else
isostate = 0
camera.iso.raw = 0
end
beep(1, 100, 330)
end
-- Control ISO with joystick once locked
if isostate == 1 then
if key == KEY.UP or key == KEY.UP_RIGHT or key == KEY.UP_LEFT or key == KEY.RIGHT then
for j,v in ipairs(ISO_current) do
if isovalue == v then
camera.iso.raw = ISO_step_up[j] -- ISO increasing
break -- exit "for" statement
end
end
elseif key == KEY.DOWN or key == KEY.DOWN_RIGHT or key == KEY.DOWN_LEFT or key == KEY.LEFT then
for j,v in ipairs(ISO_current) do
if isovalue == v then
camera.iso.raw = ISO_step_dn[j] -- ISO increasing
break -- exit "for" statement
end
end
end
end
end
end

event.keypress = lockisoinmanual
#4
Thank you for your message A1ex!

So that means I am out of luck as of right now to get this feature by Lua scripting.  :(

When you say: "The auto-ISO value is not currently exposed to Lua", do you mean that only for Manual mode? Because otherwise I am at loss how "copy2m.lua" is able to do just that, albeit the auto-iso values in the P, Av & Tv modes.

When you say "It's only updated when you press the shutter halfway". That could actually be neat, since I am quite used already to controlling focus with backbutton AF and exposure lock through depressing the shutter half-way. I believe Lua scripting would allow to capture that event (half press) and fix auto-iso accordingly. That is, once the API allows for that.
#5
I am a Canon 7D shooter, and would really love to have the feature to "exposure lock" my auto-iso in manual mode with the click of a button. Besides sending in a request for this feature, I thought it would be simple enough for me to code as a Lua script.

The idea is as follows. I put my camera in manual, with spot metering and auto-ISO. I set the shutterspeed and aperture I think is suitable for the scene. I point the camera at my subject, such that my spot metering finds the correct ISO value for my exposure. This is where the script comes in: I then press a dedicated button (ideally the (*) button, but could be the info or set button too) and now the ISO is frozen. Now I can recompose and take my picture. I can than press the dedicated button again to get back in auto-ISO. The process can now be repeated. Maybe it can even be optimized one step further such that the camera is only very briefly in auto-ISO and then almost instantly freezes the ISO value. This way only one press of a button is required. (Basically AE lock hold as found on newer camera's).

So far I have the following script. However I can't seem to manage to get the current value of the ISO as set by the auto-ISO. I already looked at the "copy2m.lua" file as an example, however as a Lua noob, I have a hard time understanding how that script works.

Questions:
1) Is there a simple way to get the ISO value as determined by the auto-ISO
2) I couldn't find the button event for the (*) button in the documentation. Is it possible to use this (*) button for this purpose?

Thank you for your reading!

isostate = 1

function freezeautoiso(key)
if key == KEY.INFO and camera.mode == MODE.M then
if isostate == 1
isostate = 0
[b]camera.iso.raw = ???[/b]
else
isostate = 1
camera.iso.raw = 0
end
return false
else
return true
end
end

event.keypress = freezeautoiso
#6
Implemented via LUA: https://www.magiclantern.fm/forum/index.php?topic=24723.0




Hello! First of all, thanks for all you guys hard work! I've been shooting my Canon 7D for nearly 10 years now, and am a happy user of Magic Lantern for a year or two. Magic Lantern really breathed new life into my old device. I feel I am really missing one small yet essential feature. Almost all new Canon camera's these days are shipped with this feature too: the ability to lock exposure in manual mode with auto-iso enabled. This feature would greatly broaden the use-cases of the "auto exposure" and "exp. lock" modules as well.

TL:DR at the bottom.

MOTIVATIONS
I shoot a lot of indoor sport and theatre performances at my university. Performances can rapidly evolve in fast-paced dancing acts, requiring me to be able to quickly ramp-up shutter speeds to freeze motion. But the number of actors on stage, as well as their interaction with the background, fluctuates a lot too. Therefore I need control over the aperture too, as to determine the DOF. Light is constantly changing and actors on stage are unevenly lit, making auto-ISO a must to get a proper exposure quickly. Also, my clients as well as myself, do not really care about a little extra grain, as long as the motion was captured with little to no blur.

So that leaves me with one option: shooting manual with my camera set to auto-ISO. The problem is however, that I have no way to lock the exposure (ISO) in Manual mode and recompose. This way; whenever a black backdrop would form the center of my image, my image turns out overexposed due to auto-iso metering for the black backdrop. My sub-optimal solution right now, is to either shoot in full manual which results in many missed images since I am modifying my settings, or shoot in Tv mode and try to work around my small DOF (as chosen by the camera).

The absence of a proper AE-lock in manual mode is also the reason why I still occasionally use P-mode over the otherwise superior "auto exposure" module. The auto-exposure module is amazing as to prevent too slow shutterspeeds or too narrow DOF's. However, the module only works when the camera is in manual mode. Since manual mode does not allow exposure lock, it frequently messes up my exposure reading when recomposing my image.

SOLUTIONS
-> I can occasionally use my friends 7D mkII or my dad's RP. These camera's do allow AE-lock of the auto-ISO in manual mode. And this little feature triples my keeper-rate: just spot-meter for an actors face, hold AE-lock button, recompose and shoot. If this could be added to the (*) button it would be amazing. This could be implemented in two ways. Either a single press locks the current exposure values untill the next press. Or pressing the (*) button holds the values as long as you hold the (*) button. My preference would go to the first of these two methods.
-> The "exp. lock" module could be expanded to add this feature as an optional setting: just allow the user to click the "*" or e.g. the "set" button shortly to lock in their current shutterspeed, aperture & ISO value. When the user clicks the button again, the exposure will unlock and their camera will revert back to auto-ISO manual. Now the user can again point at e.g. a person's face as to read an exposure and obtain an ISO value. While pointing the camera at their main subject, the user can then just click the dedicated button again as to lock their exposure reading and modify the Aperture/Shutterspeed/ISO reciprocally again (just like the module does right now).

ALREADY ASKED FOR?
Another thread that asks for this feature:
https://www.magiclantern.fm/forum/index.php?topic=9650.0
Two other people that want this feature but worded their request a bit poorly:
https://www.magiclantern.fm/forum/index.php?topic=13435.0
Drfrogsplat gave an excellent motivation in this thread:
https://www.magiclantern.fm/forum/index.php?topic=2910.0
Someone that proposes the same solution as me:
https://www.magiclantern.fm/forum/index.php?topic=7929.0
Someone that also wants to engage/disengage exp. lock module on the fly:
https://www.magiclantern.fm/forum/index.php?topic=15294.0

TL:DR. If for artistic or practical reasons you need control over aperture and shutterspeed simultaneously, but don't care about introducing some extra grain. Then AE-lock for auto-iso in manual mode is an absolute must and therefore available on all newly released camera's.