Onscreen audio meters in Magic Lantern firmware

Onscreen audio meters in Magic Lantern firmware

Postby hudson on 24 May 2009 22:48

It isn't perfect by a long shot, but we're making very swift progress this holiday weekend. I found the VRAM and was able to write a small task that monitors the audio levels at 30 Hz and draws a very simple level meter on the top of the screen. It is calibrated with 5 dB tick marks, but the ballistics are bad and it isn't synced with the redraw period (causing it to flicker), but we're running real code doing real work on the camera!

I promise you this is the most boring 45 second video you will ever see, but it provides a glimpse of the promise of what we can do with this camera.

Sorry about the quality; my wife's SD400 point-and-shoot isn't quite the same as a 5D Mark 2...

EDIT: I found the calibration table for the audio device as well as some bugs in my drawing code. I've added calibrated 5 dB tick marks (-40 on the left to 0 dB on the right) and wrote some simplistic ballistics for the peak with a few second delay. The video is a new one to reflect the changes.

EDIT: I figured out how to draw into the bitmap area rather than the YUV space so that the overlay is synchronized with the video refresh. This avoids any flickering. I have also added full time 16:9 crop marks at clovenguth's suggestion and a brief commentary as to what is being shown on screen.

EDIT: Project renamed and FAQ updated.
Last edited by hudson on 28 May 2009 02:20, edited 4 times in total.
User avatar
Posts: 295
Joined: Jan 2009
Location: New York, NY
hudson
Defeats Scarlet
Defeats Scarlet

Re: 5D Mark Free onscreen audio meters

Postby connectivitygroup on 24 May 2009 23:15

That's awsome. Keep up the great work. Thank your wife for us. So far this 3 day weekend I have had to install a ceiling fan, put up a screen door and clean our basement. No time for camera work :cry:
John S.
User avatar
Posts: 207
Joined: Dec 2008
Location: Maryland USA
connectivitygroup
V.I.P. Member
V.I.P. Member

Re: 5D Mark Free onscreen audio meters

Postby Tico on 24 May 2009 23:24

If Canon can't, HUD can!

:cheers:
User avatar
Posts: 143
Joined: Oct 2008
Location: Redondo Beach, CA
Tico
Senior Member
Senior Member

Re: 5D Mark Free onscreen audio meters

Postby Pablov on 24 May 2009 23:35

Not good video quality...
BUT it's amazingly interesting !! :grin:

Congrats for achieving that !!

Great to run your own code in real time, very impressive indeed.
Last edited by Pablov on 25 May 2009 04:45, edited 1 time in total.
CANON 7D: 29.97, 25, 23.976 fps...
5D Mark II: Update coming... NO full details yet...

5D Mark II Improvements TEAM: http://5dmark2.wordpress.com
User avatar
Posts: 899
Joined: Jan 2009
Pablov
Defeats Arri
Defeats Arri

Re: 5D Mark Free onscreen audio meters

Postby localfilms on 25 May 2009 00:11

When I read this, I hollered so loud my girlfriend came running from the bathroom to find out what we'd won!

Thanks so much for unlocking this thing for us. Great work!
User avatar
Posts: 3
Joined: May 2009
localfilms
Just Arrived

Re: 5D Mark Free onscreen audio meters

Postby Tynan on 25 May 2009 00:44

localfilms wrote:When I read this, I hollered so loud my girlfriend came running from the bathroom to find out what we'd won!


I laughed ! :mrgreen: :headbang:
User avatar
Posts: 371
Joined: Apr 2009
Tynan
Defeats Red
Defeats Red

Re: 5D Mark Free onscreen audio meters

Postby Tynan on 25 May 2009 00:52

hudson wrote:It isn't perfect by a long shot . . . . . .



Fantastic stuff !!!!!

". . . . .that monitors the audio levels at 30 Hz"

I am sure you can go for much much less ! 11 khz (11.025) would be overkill for a VU/meter !!


Hudson, if you ever find yourself in London/UK, there is a pub with a bunch of people who will get you very drunk and probably much worse.

:headbang: :headbang: :headbang: :headbang:

+ I realise it is all very easy for us to suggest features when you are in the middle of digging though this thing, and even more easy when you are relying on someone else (you!) to implement these ideas, but . . . .

. . . for a useable level indicator it would be great to have some (any) kind of peak hold - even if it is for half a second or so,
Last edited by Tynan on 25 May 2009 00:58, edited 2 times in total.
User avatar
Posts: 371
Joined: Apr 2009
Tynan
Defeats Red
Defeats Red

Re: 5D Mark Free onscreen audio meters

Postby Tynan on 25 May 2009 00:53

Pablov wrote:You are right, it's horribly boring....

BUT it's amazingly interesting !! :grin:



+1
:headbang:
User avatar
Posts: 371
Joined: Apr 2009
Tynan
Defeats Red
Defeats Red

Re: 5D Mark Free onscreen audio meters

Postby INFURNO on 25 May 2009 00:55

Hudson,

Fantastic! Thanks for taking the time to record and upload the video. Really something to see it in action.

Do you plan on the first "5D Mark Free" (official now?) release to be audio based? As soon as you get it working a little better I mean.. At what point will you let us get our hands on it? :grin:
User avatar
Posts: 453
Joined: Dec 2008
INFURNO
Defeats Epic
Defeats Epic

Re: 5D Mark Free onscreen audio meters

Postby hudson on 25 May 2009 01:53

Tynan wrote:". . . . .that monitors the audio levels at 30 Hz"
I am sure you can go for much much less ! 11 khz (11.025) would be overkill for a VU/meter !!

30 Hz is way slower than 11 KHz...
. . . for a useable level indicator it would be great to have some (any) kind of peak hold - even if it is for half a second or so,

Check out the new video. I replaced the old video with one showing the calibrated meter with some simplistic ballistics that give a peak-hold/decay sort of function. I had a huge mistake in my peak calculation -- the values are signed 16-bit, so my averaging function was always returning zero. Hmm.

I've also written an o-scope mode that draws sample points across the screen. It isn't very useful for monitoring the audio during recording, but it sure works great for finding the signed value bug.


INFURNO wrote:Thanks for taking the time to record and upload the video. Really something to see it in action.

Just in case there were doubters claiming the screen shot was done in Photoshop...
Do you plan on the first "5D Mark Free" (official now?) release to be audio based? As soon as you get it working a little better I mean.. At what point will you let us get our hands on it? :grin:

That's my plan. The audio stuff is the easiest to attack and one that will make a big difference for lots of folks trying to do on-camera audio. We have a decent work-around for DOF by twisting the lenses (in fact, I just shot an entire short with my 85 mm f/1.8 twisted off), but there aren't any good workarounds for the AGC and audio problems. Feeding 20 KHz into the mic doesn't seem like a good solution to me since there is already limited headroom in the AK4646.

I'll be testing next week with the Juicedlink CX231 and hope to have a stable "release" sometime by next weekend once I have verified the behaviour with good mics.
User avatar
Posts: 295
Joined: Jan 2009
Location: New York, NY
hudson
Defeats Scarlet
Defeats Scarlet

Next

Return to The Firmware

Who is online

Users browsing this forum: emiled and 4 guests

cinema5d.com - The forum for dslr filmmakers - Canon 5D mark II questions and answers - This is the 5Dmk2 community - cinema 5D - The 5DmkII resource - 5D2