<blockquote>
  <p>How can a keyframe occur at 1252.57 for a clip that has a duration of 766 frames?</p>
</blockquote>

<p>Because the user could have used a clip that was longer than 1252 frames, set a keyframe, then trimmed the clip down to 766 frames. If the user later decides to make the clip longer again by changing the out point to a later time, the keyframe will still be in the place they originally placed it. So your calculations should treat the keyframes as they are, even if they are outside of the clip times.</p>

CC BY-SA 3.0
2016-12-08T00:19:59.217Z
2016-12-08T00:19:59.217Z
user1118321
<p>I'm a software developer working on an application which takes a Final Cut Pro 7 xml file as input, and reads the audio in that XML file (for reporting purposes). </p>

<p>For any given <code>&lt;clipitem&gt;</code> which represents an audio file there is often an <code>&lt;effect&gt;</code> which represents audio levels. The audio level <code>&lt;effect&gt;</code> element has a child <code>&lt;parameter&gt;</code> element which contains multiple <code>&lt;keyframe&gt;</code> elements.</p>

<pre><code>&lt;filter&gt;
  &lt;effect&gt;
    &lt;name&gt;Audio Levels&lt;/name&gt;
    &lt;effectid&gt;audiolevels&lt;/effectid&gt;
    &lt;effectcategory&gt;audiolevels&lt;/effectcategory&gt;
    &lt;effecttype&gt;audiolevels&lt;/effecttype&gt;
    &lt;mediatype&gt;audio&lt;/mediatype&gt;
    &lt;parameter&gt;
      &lt;name&gt;Level&lt;/name&gt;
      &lt;parameterid&gt;level&lt;/parameterid&gt;
      &lt;valuemin&gt;0&lt;/valuemin&gt;
      &lt;valuemax&gt;3.98109&lt;/valuemax&gt;
      &lt;keyframe&gt;
        &lt;when&gt;0&lt;/when&gt;
        &lt;value&gt;0&lt;/value&gt;
      &lt;/keyframe&gt;
      &lt;keyframe&gt;
        &lt;when&gt;94.1429&lt;/when&gt;
        &lt;value&gt;0.125893&lt;/value&gt;
      &lt;/keyframe&gt;
    &lt;/parameter&gt;
  &lt;/effect&gt;
&lt;/filter&gt;
</code></pre>

<p>I need to figure out what the audio level at any given point in time is for the given <code>&lt;clipitem&gt;</code>. </p>

<p>What I don't get is that the <code>&lt;clipitem&gt;</code> may have <code>&lt;start&gt;</code> set to 1757 and <code>&lt;end&gt;</code> set to 2523. That's a duration of 766 frames.</p>

<p>However, for that very same clip I see the below which to me indicates that the audio level changes to <strong>0.0562341</strong> in frame <strong>1252.57</strong>. </p>

<pre><code>&lt;keyframe&gt;
  &lt;when&gt;1252.57&lt;/when&gt;
  &lt;value&gt;0.0562341&lt;/value&gt;
&lt;/keyframe&gt;
</code></pre>

<p>How can a keyframe occur at 1252.57 for a clip that has a duration of 766 frames?</p>

<p>The <a href="https://developer.apple.com/library/content/documentation/AppleApplications/Reference/FinalCutPro_XML/Topics/Topics.html#//apple_ref/doc/uid/TP30001149-CH294-SW1" rel="nofollow noreferrer">documentation</a> says...</p>

<blockquote>
  <p>The first keyframe always has a value of 0 for when, and the last
  keyframe always has the duration of the clipitem as the value for when</p>
</blockquote>

CC BY-SA 3.0
2016-12-07T12:08:11.203Z
I know this is not going to help but you are aware that FCP7 is not supported by Apple anymore (I know there are a few people out there still using it but it is loosing to Adobe PR and FCPX)
Adam Mann Pro
CC BY-SA 3.0
2016-12-07T14:40:29.613Z
@AdamMannPro yes, i know FCPX is the newest version. It is my impression though that a lot of people still hang on to FCP7?
sbrattla
CC BY-SA 3.0
2016-12-07T15:27:47.190Z
If you have access to FCP7, create a trivial project with keyframes in known positions and check.
Gyan
CC BY-SA 3.0
2016-12-07T15:29:43.910Z
@Mulvya that's the issue...I don't have access to neither mac nor FCP7. I have a single FCP7 xml file and the corresponding screendump of the timeline...but the project is complex and I find it hard to "debug".
sbrattla
CC BY-SA 3.0
2016-12-07T17:12:22.630Z
It might be worth doing a survey or likewise to find out how many still use fcp7 as I know of no-one myself who use it as they have moved to adobe or fcpx when apple announced the change. There are many facebook groups who can have a poll run on them. But from what I have seen it might be a wasted venture developing something for a app that was killed off in 2010 and has no support from apple or any other devs.
Adam Mann Pro
CC BY-SA 3.0
2016-12-07T17:13:15.110Z
Also if your developing a app or likewise I would have thought that having access to the application would be a must ?
Adam Mann Pro
CC BY-SA 3.0
2016-12-08T00:47:58.350Z
@AdamMannPro there are many corporate users of FCP7 still, even though most are just biding their time until they can switch to Premiere. A Facebook poll won't likely reflect that.
Michael Liebman
<file-formats><final-cut-pro><export>
How should I understand audio levels in FCP7 xml?
sbrattla
# How should I understand audio levels in FCP7 xml?

(Asked by: username_0 on 2016-12-07)

I'm a software developer working on an application which takes a Final Cut Pro 7 xml file as input, and reads the audio in that XML file (for reporting purposes). 
For any given  which represents an audio file there is often an  which represents audio levels. The audio level  element has a child  element which contains multiple  elements.

  
    Audio Levels
    audiolevels
    audiolevels
    audiolevels
    audio
    
      Level
      level
      0
      3.98109
      
        0
        0
      
      
        94.1429
        0.125893
      
    
  


I need to figure out what the audio level at any given point in time is for the given . 
What I don't get is that the  may have  set to 1757 and  set to 2523. That's a duration of 766 frames.
However, for that very same clip I see the below which to me indicates that the audio level changes to 0.0562341 in frame 1252.57. 

  1252.57
  0.0562341


How can a keyframe occur at 1252.57 for a clip that has a duration of 766 frames?
The documentation says...

The first keyframe always has a value of 0 for when, and the last
  keyframe always has the duration of the clipitem as the value for when

**Tags:** file-formats, final-cut-pro, export

> **Comments:**
> **username_1**: I know this is not going to help but you are aware that FCP7 is not supported by Apple anymore (I know there are a few people out there still using it but it is loosing to Adobe PR and FCPX)  
> **username_0**: @AdamMannPro yes, i know FCPX is the newest version. It is my impression though that a lot of people still hang on to FCP7?  
> **username_2**: If you have access to FCP7, create a trivial project with keyframes in known positions and check.  
> **username_0**: @Mulvya that's the issue...I don't have access to neither mac nor FCP7. I have a single FCP7 xml file and the corresponding screendump of the timeline...but the project is complex and I find it hard to "debug".  
> **username_1**: It might be worth doing a survey or likewise to find out how many still use fcp7 as I know of no-one myself who use it as they have moved to adobe or fcpx when apple announced the change. There are many facebook groups who can have a poll run on them. But from what I have seen it might be a wasted venture developing something for a app that was killed off in 2010 and has no support from apple or any other devs.  
> **username_1**: Also if your developing a app or likewise I would have thought that having access to the application would be a must ?  
> **username_3**: @AdamMannPro there are many corporate users of FCP7 still, even though most are just biding their time until they can switch to Premiere. A Facebook poll won't likely reflect that.  

---

## 1 answers

### Answer by username_4 on 2016-12-08. Score: 2

> How can a keyframe occur at 1252.57 for a clip that has a duration of 766 frames?

Because the user could have used a clip that was longer than 1252 frames, set a keyframe, then trimmed the clip down to 766 frames. If the user later decides to make the clip longer again by changing the out point to a later time, the keyframe will still be in the place they originally placed it. So your calculations should treat the keyframes as they are, even if they are outside of the clip times.


---

