---
title: "add(_:toParameter:andChannel:)"
framework: Professional Video Applications
role: symbol
role_heading: Instance Method
platforms: [fxplug 4.0+]
path: "professional_video_applications/fxkeyframeapi_v3/add(_:toparameter:andchannel:)"
---

# add(_:toParameter:andChannel:)

Adds a keyframe at the given time.

## Declaration

```swift
func add(_ keyframe: UnsafePointer<FxKeyframe>, toParameter parameterID: Int, andChannel channelIndex: Int) -> (any Error)?
```

## Parameters

- `keyframe`: An FxKeyframe structure describing the keyframe you wish to add to the parameter.
- `parameterID`: The ID of the parameter you wish to add a keyframe to.
- `channelIndex`: The index of the channel of the parameter you wish to add a keyframe to. For parameters that only have one channel (sliders, angle knobs, checkboxes, etc.) this will be 0. For compound parameters, it will be the sub-channel. For example, if you wish to keyframe the red channel of a color, it would be channel index 0, whereas the green channel would be channel index 1, etc.

## See Also

### Instance Methods

- [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(_:atOrBefore:fromParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/keyframe(_:atorbefore: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)
