[BROKEN] Feature request: continuous rec tone for zoom H6 auto start stop

Started by Markus, December 12, 2013, 01:18:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Markus

Now working: =D


This is a request for an additional option in rec tone that would allow automatic start/stop of the external sound recorder H6. All we need is the additional feature to make the sound beep to a continuous tone for the length of the recording.   
see this topic http://www.magiclantern.fm/forum/index.php?topic=9306.0  (Automatic Rec-start on H6 solved!)

If this is done we have automatic start/stop of external sound recording in the H6!   :D

a1ex

This is a very cool find and fairly easy to implement IMO.

Start in beep.c and take a look at play_beep and wav_play: you need to combine them, so it keeps playing the same buffer in a loop.

Fine detail: choose the buffer size or tweak the signal frequency so the beep plays without gaps. You need a little math here.

The hard part: locking issues. You have a single audio device, and it requires exclusive access. You should be careful not to block tasks that might want to beep while the continuous beep is running (if you are not careful, these tasks may have to wait for several minutes). The current implementation is not exactly elegant, and some refactoring may be needed.

API: I suggest something like beep_long_start(freq) / beep_long_stop (feel free to think at better names / parameters).

Also, replace the BEEP_LONG implementation with the new one, remove the hacks that try different memory sizes until the allocation succeeds, and make sure the "test tone" feature works.

Once you do that, modifying raw_rec/mlv_rec should be extremely easy.

Markus

Step two in this would be to test how many frames the trigger is from perfect sync and then try to compensate with delaying the signal to match.

AnotherDave

There is a SMPTE module that already exists.  It puts out a continuous SMPTE timecode signal out of the audio jack when you press record.  Could a SMPTE signal be used to trigger the H6 to start?  If not, the module could be helpful in developing a new module that just outputs a tone, or maybe that feature could be incorporated into this module.

Here is the link.

http://www.magiclantern.fm/forum/index.php?topic=7764.msg80323#msg80323

rob_6

I can also add that this feature would work with the H4n as well. The H4n is much cheaper now ($169 on B&H). What a great feature to have audio that could be matched with the Raw video without much work at all. This is such a great feature for single shooters! I hope someone can help by developing this feature. Thanks so much!

kgv5

Quote from: rob_6 on December 14, 2013, 09:07:02 PM
I can also add that this feature would work with the H4n as well.

Are you sure? Does h4n has the same feature as h6 regarding beep start/stop ? I hope you are right, in that case buying h4n would be no-brainer for me.
www.pilotmovies.pl   5D Mark III, 6D, 550D

diegolamac

Quote from: kgv5 on December 17, 2013, 12:32:10 AM
Are you sure? Does h4n has the same feature as h6 regarding beep start/stop ?

From the zoom h4n webpage:

"You can set your H4n to automatically record whenever sound above your designated level is detected. This ensures that you capture everything of importance while minimizing blank sections such as when recording a conference or lecture."

http://www.zoom.co.jp/img/products_img_en/h4n/h4n_11.jpg

diegolamac

Correct me if I'm wrong, but I've just thought of a huge disadvantage of this method. While recording you can't monitor the audio mix since the continous tone would drive anyone nuts.
Unless there is a function in the recorder to monitor each channel individually. I haven't bought my zoom H6 yet but it would be wise to make test before writing the code.

kgv5

Thanks diegolamac, that is a great news. Yeah, i have been wondering about the tone and if it would be "hearable" from outside. I tried (5d3) and even with headphone jack in ML "beep" was loud.
www.pilotmovies.pl   5D Mark III, 6D, 550D

Markus

This is a problem =/, Ill check throu h6 settings to see if you can counter this problem in any way.

rob_6

There is a way to hook up the tone from the camera so that it only goes through the left or right channel. You would need a cable that has either xlr or phone plug for the h6 or H4n left or right inputs. That way you could at least monitor the sound from the other channel with a pair of earbud headphones and just don't put the one with the beep in your ear.

Not an elegant way, but most of the time for me I use the 5d Raw for B-Roll so I don't monitor the sound for each shot anyway. I would still love this feature so that I don't have to stop the H4n or H6 each time I stop the camera recording. I am sure there are other possible solutions. I just wanted to share my thoughts.

Markus

The h6 has a monitor mixer function so you can mute the signal track for monitoring so this is no problem =). Just mute the signal track in settings.
Se page. 80 in H6 manual for more info!

g3gg0

as already mentioned, the SMPTE module does exactly that.
just that the output isnt a sine (beep), but a digital noise which should also work.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Markus



Markus

Quote from: g3gg0 on December 18, 2013, 05:06:33 PM
as already mentioned, the SMPTE module does exactly that.
just that the output isnt a sine (beep), but a digital noise which should also work.

g3gg0: When I set the "frames to write to 0" I don't get the smpte to write continuously. Otherwise this works! =D
A bug or am I using an old version? I downloaded the one from the first post in the thread.

Markus

I figured out why it did not output continiously! Not a bug in SMPTE.mo, the problem was that the record beep was still activated  witch interfered with the smpte module. When I tured that of it worked =D. So now we have a fully functional solution here!

a1ex

Yeah, this is exactly the reason I said that solving the conflicts is hard (the audio device needs exclusive access).

AnotherDave

Quote from: Markus on December 19, 2013, 06:26:25 PM
So now we have a fully functional solution here!

Awesome!  Do you have to monitor the SMPTE track in the headphones? 

Markus

Quote from: Markus on December 18, 2013, 12:28:29 AM
The h6 has a monitor mixer function so you can mute the signal track for monitoring so this is no problem =). Just mute the signal track in settings.
Se page. 80 in H6 manual for more info!

Nope.

Markus


Markus

Now it would be interesting to try and tweak this feature for perfect sync.

diegolamac



AnotherDave

Quote from: Markus on December 19, 2013, 08:33:22 PM
Now it would be interesting to try and tweak this feature for perfect sync.

Perfect sync for start/stop probably isn't completely possible.  With MLV, you should be able to sync the audio and video via the SMPTE timecode you're pumping into that 4th channel... but I think development on the SMPTE module has stopped.  If it worked and you were using a recorder with TC in, you'd have perfectly synced audio and video all the time. 

I am on a mac so testing MLVs is a bit of a pain, and the SMPTE doesn't work on my HD-P2 like it should. 

If people want to test the SMPTE feed, you CAN do so on an iPhone with several free apps.