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.


Messages - spto

Pages: [1]
1
Ah I see! Thank you!

2
My 6D can beep with the original functions (confirmation of focus on AF, for example), but do not beep with lua scripts (pong game, for example).

What could be the reason for that?

(I have tested on both the latest Nightly Build and the lua-fix build. My 6D has the right firmware version 1.1.6.)

3
This trick does not work for 6D. No beep is better for 6D.

4
Scripting Corner / Why "beep" could magically increase the shot rate?
« on: March 10, 2019, 09:39:58 AM »
As discussed here: https://www.magiclantern.fm/forum/index.php?topic=23613.0

I was trying to write a lua script to force the mirror up before shot. I tried several solutions, the silent.mo, the Mirror Lockup (MLU), and I also tried to insert a lv.start() before each shot.

The MLU solution works -- but very slow to be stable. I need to give it 1.4 extra seconds for each shot to make it work for a series of shots. At last it takes 3.8 seconds on average for each shot (based on my 550D).

Code: [Select]
-- MLUtest13

menu.set("Shoot", "Mirror Lockup", "ON")
menu.set("Mirror Lockup", "MLU mode", "Handheld")
menu.set("Mirror Lockup", "Handheld Shutter", "1/2...1/125")
menu.set("Mirror Lockup", "Handheld Delay", "1s")

Aperture = 7.1
PrefISO = 400
ShutterSpeed = 0.125

countdown=10

function pressshutter ()
key.press(KEY.HALFSHUTTER)
key.press(KEY.FULLSHUTTER)
msleep(100)
key.press(KEY.UNPRESS_FULLSHUTTER)
key.press(KEY.UNPRESS_HALFSHUTTER)
end

function main()
menu.close()
console.show()

beep(5,50)
task.yield(500)

camera.iso.value = PrefISO
camera.shutter.value = ShutterSpeed
camera.aperture.value = Aperture

repeat

beep(3,200)
pressshutter()
task.yield(2400 + camera.shutter.ms)
beep(2,100)

countdown = countdown - 1

until (countdown == 0)

task.yield(500)
beep(5,50)

end

main()

Inserting a lv.start() before the shots is a much more stable solution. No human estimation of extra sleep or task.yield is needed. The average time is 2.7 seconds for each shots.

However, I surprisingly found that, by inserting a beep(3,200) before each shot, the shot rate increased dramatically to one shot per 1.8 seconds on average, and one shot per 1.5 seconds at peak.

Here's a code comparing the without/with beep situations:

Code: [Select]
-- LVtest2

Aperture = 7.1
PrefISO = 400
ShutterSpeed = 0.125

countdown0=10
countdown1=10

function main()
menu.close()
console.show()

beep(5,50)
task.yield(500)

camera.iso.value = PrefISO
camera.shutter.value = ShutterSpeed
camera.aperture.value = Aperture

repeat

lv.start()
camera.shoot()

countdown0 = countdown0 - 1

until (countdown0 == 0)

repeat

beep(3,200)
lv.start()
camera.shoot()

countdown1 = countdown1 - 1

until (countdown1 == 0)


task.yield(500)
beep(5,50)

end

main()

This video shows how this code works:


So why is beeping not delaying but on the contrary, accelerating things?

5
Scripting Corner / Re: Full-resolution silent mode with lua?
« on: March 09, 2019, 05:02:38 PM »
Hi I made some further tests. It works well if I take only one shot, but hardly work when I try to take a series of shots.

Question: how did you choose sleep(1) between the press and unpress? What's the consideration for judging the waiting time?
Also, how to judge the waiting time needed between shots?

I cycled through such thing:

Quote
   key.press(KEY.HALFSHUTTER)
   key.press(KEY.FULLSHUTTER)
   msleep(1)
   key.press(KEY.UNPRESS_FULLSHUTTER)
   key.press(KEY.UNPRESS_HALFSHUTTER)
   task.yield(2000 + camera.shutter.ms)

It's weird that when I press the shutter button with my physical hand, 550D can take MLU shots at a rate of 1 shots / 2 seconds. But when I try the code above, it does not work at all (only 1 shot with MLU is taken).

Code: [Select]
-- MLU test - handheld
menu.set("Shoot", "Mirror Lockup", "ON")
menu.set("Mirror Lockup", "MLU mode", "Handheld")
menu.set("Mirror Lockup", "Handheld Shutter", "1/2...1/125")
menu.set("Mirror Lockup", "Handheld Delay", "1s")
sleep(2)
key.press(KEY.HALFSHUTTER)
key.press(KEY.FULLSHUTTER)
sleep(1)
key.press(KEY.UNPRESS_FULLSHUTTER)
key.press(KEY.UNPRESS_HALFSHUTTER)

Code: [Select]
-- MLU test - always on
menu.set("Shoot", "Mirror Lockup", "ON")
menu.set("Mirror Lockup", "MLU mode", "Always ON")
menu.set("Mirror Lockup", "Normal MLU Delay", "3s")
menu.close()
sleep(2)
camera.shoot()

Tested on 5D2 with latest lua_fix build.

TODO: merge the two delay entries under "MLU Delay" ?

6
Scripting Corner / Re: Full-resolution silent mode with lua?
« on: March 09, 2019, 02:49:25 PM »
That is so cool! It works on 550D (ML-lua-fix), thank you!!

7
Scripting Corner / Re: Full-resolution silent mode with lua?
« on: March 09, 2019, 01:21:13 PM »
Thank you Walter! I decide to use Mirror Lockup in Shoot menu instead of silent.mo, because I still want to use the physical shutter.

I have written a mini-script for testing:

Code: [Select]

-- MLUtest

Aperture = 7.1
PrefISO = 400
ShutterSpeed = 0.125

function main()
menu.close()
console.show()

beep(1,50)

camera.iso.value = PrefISO
camera.shutter.value = ShutterSpeed
camera.aperture.value = Aperture

camera.shoot(false)

beep(1,50)

console.hide()
end

main()


I first manually turned on the Mirror Lockup in Shoot menu and set the "MLU mode" to "Handheld", set "Handheld Shutter" to "1/2...1/125", set "Handheld Delay" to "1s" and set "Normal MLU Delay" to "1s".

Then I run my testing script, MLU was not functioning during the testing. (When I press the shutter manually, MLU works well)

Should I call MLU from the lua script as well to make it work? If so, could you please give an example on how to use the menu module of lua API? Thank you!

8
Scripting Corner / Re: Full-resolution silent mode with lua?
« on: March 08, 2019, 03:02:02 PM »
Thank you!

I noticed that even in LV mode, the mirror will always go down after the shutter closes, and it takes at least 0.7 seconds for the mirror to go up again. Can we lock the mirror during LV mode?

9
Scripting Corner / Full-resolution silent mode with lua?
« on: March 07, 2019, 03:31:58 AM »
Hi experts,

Just wondering whether it's possible to call the silent shooting mode with a lua script?
(The silent shooting function as described here, https://www.magiclantern.fm/forum/index.php?topic=12523.msg143510#msg143510)

Thank you!

Cheers

10
I got the same warnings.

I was shooting raw with 550D. 640x640.

I activated 3 modules before that: mlv_play, mlv_rec and mlv_snd.

Before the bug appears I tried several parameters to shoot and play, without problem. When I finally tried to shoot with 640x640 for a long time (~ 20 seconds), the warnings came and never go away, even when I try to replay some of the earlier clips.

Pages: [1]