---
title: "keyframe(_:atOrBefore:fromParameter:andChannel:)"
framework: Professional Video Applications
role: symbol
role_heading: Instance Method
platforms: [fxplug 4.0+]
path: "professional_video_applications/fxkeyframeapi_v3/keyframe(_:atorbefore:fromparameter:andchannel:)"
---

# keyframe(_:atOrBefore:fromParameter:andChannel:)

Returns the info about the nearest previous keyframe.

## Declaration

```swift
func keyframe(_ keyframe: UnsafeMutablePointer<FxKeyframe>, atOrBefore time: CMTime, fromParameter parameterID: Int, andChannel channelIndex: Int) -> (any Error)?
```

## Parameters

- `keyframe`: A pointer to a struct which will receive information about the keyframe at or before the given time.
- `time`: The time (doc://com.apple.documentation/documentation/CoreMedia/CMTime) you want a keyframe at or before.
- `parameterID`: The ID of the parameter for which you want the keyframe information.
- `channelIndex`: The index of the channel of the parameter for which you want the keyframe information.

## See Also

### Instance Methods

- [add(_:toParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/add(_:toparameter:andchannel:).md)
- [channelCount(_:forParameter:)](professional_video_applications/fxkeyframeapi_v3/channelcount(_:forparameter:).md)
- [keyframe(_:atOrAfter:fromParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/keyframe(_:atorafter:fromparameter:andchannel:).md)
- [keyframe(_:forParameter:channel:andIndex:)](professional_video_applications/fxkeyframeapi_v3/keyframe(_:forparameter:channel:andindex:).md)
- [keyframeCount(_:forParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/keyframecount(_:forparameter:andchannel:).md)
- [parameter(_:channel:hasKeyframe:at:)](professional_video_applications/fxkeyframeapi_v3/parameter(_:channel:haskeyframe:at:).md)
- [removeAllKeyframes(forParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/removeallkeyframes(forparameter:andchannel:).md)
- [removeKeyframe(at:fromParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/removekeyframe(at:fromparameter:andchannel:).md)
- [setKeyframeIndex(_:with:forParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/setkeyframeindex(_:with:forparameter:andchannel:).md)
