resolume

package module
v0.0.0-...-55b5571 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 9 Imported by: 0

README

Resolume Arena & Avenue REST API Client for Go

このライブラリは、Resolume ArenaおよびAvenueのREST APIをGo言語から利用するためのクライアントライブラリです。

機能

  • 製品情報の取得
  • エフェクトの一覧取得と操作
  • ソースの一覧取得
  • パラメータの取得と設定
  • コンポジションの操作
  • レイヤーの操作
  • レイヤーグループの操作
  • デッキの操作
  • クリップの操作
  • サムネイルの取得と設定

インストール

go get github.com/FlowingSPDG/resolume-go

使用方法

クライアントの初期化
client, err := resolume.NewClient("localhost", "8080")
if err != nil {
    log.Fatal(err)
}
製品情報の取得
product, err := client.GetProduct()
if err != nil {
    log.Fatal(err)
}
fmt.Printf("Product: %s\n", product.Name)
fmt.Printf("Version: %d.%d.%d\n", product.Major, product.Minor, product.Micro)
エフェクトの一覧取得
effects, err := client.GetEffects()
if err != nil {
    log.Fatal(err)
}
for _, effect := range effects.Video {
    fmt.Printf("Effect: %s (ID: %s)\n", effect.Name, effect.IDString)
}
レイヤーの操作
// レイヤーの取得
layer, err := client.GetLayer(1)
if err != nil {
    log.Fatal(err)
}

// レイヤーの更新
layer.Name = &resolume.StringParameter{Value: "New Layer Name"}
err = client.ReplaceLayer(1, layer)
if err != nil {
    log.Fatal(err)
}
クリップの操作
// クリップの取得
clip, err := client.GetClipByPosition(1, 1)
if err != nil {
    log.Fatal(err)
}

// クリップの接続
err = client.ConnectClipByID(clip.ID, nil) // nilはクリックを模擬
if err != nil {
    log.Fatal(err)
}
サムネイルの操作
// サムネイルの取得
thumbnail, err := client.GetClipThumbnail(1, 1)
if err != nil {
    log.Fatal(err)
}
defer thumbnail.Close()

// サムネイルの保存
file, err := os.Create("thumbnail.png")
if err != nil {
    log.Fatal(err)
}
defer file.Close()
io.Copy(file, thumbnail)

サンプルコード

より詳細な使用例は example ディレクトリを参照してください:

  • example/product/main.go - 製品情報の取得
  • example/test/main.go - エフェクトとソースの一覧取得
  • example/thumbnail/main.go - サムネイルの操作

ライセンス

MIT License

注意事項

このライブラリを使用するには、ResolumeのWebサーバー機能を有効にする必要があります。 設定は環境設定の「Webserver」セクションで行えます。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioEffect

type AudioEffect struct {
	ID       int64               `json:"id"`
	Name     string              `json:"name"`
	Bypassed *BooleanParameter   `json:"bypassed,omitempty"`
	Params   ParameterCollection `json:"params,omitempty"`
}

AudioEffect represents a single audio effect in a chain

type AudioFileInfo

type AudioFileInfo struct {
	Path        string  `json:"path"`
	Exists      bool    `json:"exists"`
	Duration    string  `json:"duration"`
	DurationMs  float64 `json:"duration_ms"`
	SampleRate  float64 `json:"sample_rate"`
	NumChannels int32   `json:"num_channels"`
	BPM         float64 `json:"bpm"`
}

AudioFileInfo represents meta information for an audio file

type AudioTrack

type AudioTrack struct {
	Volume  *RangeParameter `json:"volume,omitempty"`
	Pan     *RangeParameter `json:"pan,omitempty"`
	Effects []AudioEffect   `json:"effects,omitempty"`
}

AudioTrack represents an audio track as part of a clip/layer/group/composition

type AudioTrackClip

type AudioTrackClip struct {
	AudioTrack
	Description string         `json:"description,omitempty"`
	FileInfo    *AudioFileInfo `json:"fileinfo,omitempty"`
}

AudioTrackClip represents an audio track specifically for clips

type AutoPilot

type AutoPilot struct {
	Target *ChoiceParameter `json:"target,omitempty"`
}

AutoPilot represents options to control automatic clip transitions

type BooleanParameter

type BooleanParameter struct {
	ID        int64         `json:"id"`
	ValueType string        `json:"valuetype"`
	Value     bool          `json:"value"`
	View      ParameterView `json:"view,omitempty"`
}

BooleanParameter represents a parameter containing a true or false value

type ChoiceParameter

type ChoiceParameter struct {
	ID        int64         `json:"id"`
	ValueType string        `json:"valuetype"`
	Value     string        `json:"value"`
	Index     int32         `json:"index"`
	Options   []string      `json:"options"`
	View      ParameterView `json:"view,omitempty"`
}

ChoiceParameter represents a multiple-choice parameter

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a Resolume API client

func NewClient

func NewClient(host, port string) (*Client, error)

NewClient creates a new Resolume API client

func (*Client) AddColumn

func (c *Client) AddColumn(beforeColumnURI string) error

AddColumn adds a new column to the composition

func (*Client) AddDeck

func (c *Client) AddDeck(beforeDeckURI string) error

AddDeck adds a new deck to the composition

func (*Client) AddEffect

func (c *Client) AddEffect(effectURI string) error

AddEffect adds an effect to the entire composition

func (*Client) AddEffectAtOffset

func (c *Client) AddEffectAtOffset(offset int64, effectURI string) error

AddEffectAtOffset adds an effect to the composition at a specific offset

func (*Client) AddEffectToSelectedClip

func (c *Client) AddEffectToSelectedClip(effectURI string) error

AddEffectToSelectedClip adds an effect to the selected clip

func (*Client) AddEffectToSelectedClipAtOffset

func (c *Client) AddEffectToSelectedClipAtOffset(offset int64, effectURI string) error

AddEffectToSelectedClipAtOffset adds an effect at the given offset to the selected clip

func (*Client) AddEffectToSelectedLayer

func (c *Client) AddEffectToSelectedLayer(effectURI string) error

AddEffectToSelectedLayer adds an effect to the selected layer

func (*Client) AddEffectToSelectedLayerAtOffset

func (c *Client) AddEffectToSelectedLayerAtOffset(offset int64, effectURI string) error

AddEffectToSelectedLayerAtOffset adds an effect at the given offset to the selected layer

func (*Client) AddLayer

func (c *Client) AddLayer(beforeLayerURI string) error

AddLayer adds a new layer to the composition

func (*Client) AddLayerGroup

func (c *Client) AddLayerGroup(beforeLayerOrGroupURI string) error

AddLayerGroup adds a new layer group to the composition

func (*Client) AddLayerToGroup

func (c *Client) AddLayerToGroup(layerGroupIndex int64, beforeLayerURI string) error

AddLayerToGroup adds a new layer to an existing layer group

func (*Client) AddLayerToSelectedGroup

func (c *Client) AddLayerToSelectedGroup(beforeLayerURI string) error

AddLayerToSelectedGroup adds a new layer to the selected layer group

func (*Client) ClearClipByID

func (c *Client) ClearClipByID(clipID int64) error

ClearClipByID clears the clip with the given id

func (*Client) ClearLayer

func (c *Client) ClearLayer(layerIndex int64) error

ClearLayer disconnects any playing clips in the layer by index

func (*Client) ClearLayerClips

func (c *Client) ClearLayerClips(layerIndex int64) error

ClearLayerClips clears all clips in the layer by index

func (*Client) ClearSelectedClip

func (c *Client) ClearSelectedClip() error

ClearSelectedClip clears the selected clip

func (*Client) ClearSelectedLayer

func (c *Client) ClearSelectedLayer() error

ClearSelectedLayer disconnects any playing clips in the selected layer

func (*Client) ClearSelectedLayerClips

func (c *Client) ClearSelectedLayerClips() error

ClearSelectedLayerClips clears all clips in the selected layer

func (*Client) CloseDeckByID

func (c *Client) CloseDeckByID(deckID int64) error

CloseDeckByID closes the given deck

func (*Client) CompositionAction

func (c *Client) CompositionAction(action string) error

CompositionAction executes undo or redo actions

func (*Client) ConnectClipByID

func (c *Client) ConnectClipByID(clipID int64, connect *bool) error

ConnectClipByID connects the clip by id

func (*Client) ConnectColumn

func (c *Client) ConnectColumn(columnIndex int64, connect *bool) error

ConnectColumn connects the column by index

func (*Client) ConnectSelectedClip

func (c *Client) ConnectSelectedClip(connect *bool) error

ConnectSelectedClip connects the selected clip

func (*Client) DeleteColumn

func (c *Client) DeleteColumn(columnIndex int64) error

DeleteColumn removes a column by index

func (*Client) DeleteDeck

func (c *Client) DeleteDeck(deckIndex int64) error

DeleteDeck removes a deck by index

func (*Client) DeleteDeckByID

func (c *Client) DeleteDeckByID(deckID int64) error

DeleteDeckByID removes specified deck by id

func (*Client) DeleteEffect

func (c *Client) DeleteEffect(offset int64) error

DeleteEffect removes an effect from the composition

func (*Client) DeleteLayer

func (c *Client) DeleteLayer(layerIndex int64) error

DeleteLayer removes a layer by index

func (*Client) DeleteLayerGroup

func (c *Client) DeleteLayerGroup(layerGroupIndex int64) error

DeleteLayerGroup removes a layer group by index

func (*Client) DeleteSelectedClipEffect

func (c *Client) DeleteSelectedClipEffect(offset int64) error

DeleteSelectedClipEffect removes an effect from the selected clip

func (*Client) DeleteSelectedLayerEffect

func (c *Client) DeleteSelectedLayerEffect(offset int64) error

DeleteSelectedLayerEffect removes an effect from the selected layer

func (*Client) DeleteSelectedLayerGroup

func (c *Client) DeleteSelectedLayerGroup() error

DeleteSelectedLayerGroup removes the selected layer group

func (*Client) DisconnectAllClips

func (c *Client) DisconnectAllClips() error

DisconnectAllClips disconnects all clips in the composition

func (*Client) DuplicateColumn

func (c *Client) DuplicateColumn(columnIndex int64) error

DuplicateColumn duplicates the given column

func (*Client) DuplicateDeck

func (c *Client) DuplicateDeck(deckIndex int64) error

DuplicateDeck duplicates the given deck

func (*Client) DuplicateDeckByID

func (c *Client) DuplicateDeckByID(deckID int64) error

DuplicateDeckByID duplicates the given deck

func (*Client) DuplicateLayer

func (c *Client) DuplicateLayer(layerIndex int64) error

DuplicateLayer duplicates the given layer

func (*Client) DuplicateLayerGroup

func (c *Client) DuplicateLayerGroup(layerGroupIndex int64) error

DuplicateLayerGroup duplicates the given layer group

func (*Client) DuplicateSelectedLayer

func (c *Client) DuplicateSelectedLayer() error

DuplicateSelectedLayer duplicates the selected layer

func (*Client) DuplicateSelectedLayerGroup

func (c *Client) DuplicateSelectedLayerGroup() error

DuplicateSelectedLayerGroup duplicates the selected layer group

func (*Client) GetClipByID

func (c *Client) GetClipByID(clipID int64) (*Clip, error)

GetClipByID retrieves a clip by id

func (*Client) GetClipByPosition

func (c *Client) GetClipByPosition(layerIndex, clipIndex int64) (*Clip, error)

GetClipByPosition retrieves a clip by its position in the clip grid

func (*Client) GetClipThumbnail

func (c *Client) GetClipThumbnail(layerIndex, clipIndex int) (io.ReadCloser, error)

GetClipThumbnail retrieves the thumbnail for a specific clip

func (*Client) GetColumn

func (c *Client) GetColumn(columnIndex int64) (*Column, error)

GetColumn retrieves column properties by index

func (*Client) GetComposition

func (c *Client) GetComposition() (*Composition, error)

GetComposition retrieves the complete composition

func (*Client) GetDeck

func (c *Client) GetDeck(deckIndex int64) (*Deck, error)

GetDeck retrieves deck properties by index

func (*Client) GetDeckByID

func (c *Client) GetDeckByID(deckID int64) (*Deck, error)

GetDeckByID retrieves deck properties by id

func (*Client) GetDummyThumbnail

func (c *Client) GetDummyThumbnail() (io.ReadCloser, error)

GetDummyThumbnail retrieves the dummy thumbnail used for clips without a thumbnail

func (*Client) GetEffects

func (c *Client) GetEffects() (*Effects, error)

GetEffects retrieves available effects

func (*Client) GetLayer

func (c *Client) GetLayer(layerIndex int64) (*Layer, error)

GetLayer retrieves layer properties and clip info by index

func (*Client) GetLayerGroup

func (c *Client) GetLayerGroup(layerGroupIndex int64) (*LayerGroup, error)

GetLayerGroup retrieves layer group properties and layer info by index

func (*Client) GetParameterByID

func (c *Client) GetParameterByID(parameterID int64) (interface{}, error)

GetParameterByID retrieves a parameter given its unique id

func (*Client) GetProduct

func (c *Client) GetProduct() (*ProductInfo, error)

GetProduct retrieves product information

func (*Client) GetSelectedClip

func (c *Client) GetSelectedClip() (*Clip, error)

GetSelectedClip retrieves the selected clip

func (*Client) GetSelectedLayer

func (c *Client) GetSelectedLayer() (*Layer, error)

GetSelectedLayer retrieves layer properties and clip info for the selected layers

func (*Client) GetSelectedLayerGroup

func (c *Client) GetSelectedLayerGroup() (*LayerGroup, error)

GetSelectedLayerGroup retrieves selected layer group properties and layer info

func (*Client) GetSources

func (c *Client) GetSources() (*Sources, error)

GetSources retrieves available sources

func (*Client) MoveEffect

func (c *Client) MoveEffect(effectURI string) error

MoveEffect moves an effect to the end of the composition

func (*Client) MoveEffectToOffset

func (c *Client) MoveEffectToOffset(offset int64, effectURI string) error

MoveEffectToOffset moves an effect to a specific offset in the composition

func (*Client) MoveLayerToGroup

func (c *Client) MoveLayerToGroup(layerGroupIndex int64, layerURI string) error

MoveLayerToGroup adds an existing layer to an existing layer group

func (*Client) MoveLayerToSelectedGroup

func (c *Client) MoveLayerToSelectedGroup(layerURI string) error

MoveLayerToSelectedGroup adds an existing layer to the selected layer group

func (*Client) OpenClipByID

func (c *Client) OpenClipByID(clipID int64, uri string) error

OpenClipByID loads a file or opens a source into the clip with the given id

func (*Client) OpenDeckByID

func (c *Client) OpenDeckByID(deckID int64) error

OpenDeckByID re-opens the given deck

func (*Client) OpenSelectedClip

func (c *Client) OpenSelectedClip(uri string) error

OpenSelectedClip loads a file or opens a source into the selected clip

func (*Client) ReplaceClipByID

func (c *Client) ReplaceClipByID(clipID int64, clip *Clip) error

ReplaceClipByID updates clip and/or its effects by id

func (*Client) ReplaceClipByPosition

func (c *Client) ReplaceClipByPosition(layerIndex, clipIndex int64, clip *Clip) error

ReplaceClipByPosition updates clip and/or its effects by position in the clip grid

func (*Client) ReplaceColumn

func (c *Client) ReplaceColumn(columnIndex int64, column *Column) error

ReplaceColumn updates a specific column by index

func (*Client) ReplaceComposition

func (c *Client) ReplaceComposition(composition *Composition) error

ReplaceComposition updates the complete composition

func (*Client) ReplaceDeck

func (c *Client) ReplaceDeck(deckIndex int64, deck *Deck) error

ReplaceDeck updates a specific deck by index

func (*Client) ReplaceDeckByID

func (c *Client) ReplaceDeckByID(deckID int64, deck *Deck) error

ReplaceDeckByID updates specific deck by id

func (*Client) ReplaceLayer

func (c *Client) ReplaceLayer(layerIndex int64, layer *Layer) error

ReplaceLayer updates specified layer and/or clips by index

func (*Client) ReplaceLayerGroup

func (c *Client) ReplaceLayerGroup(layerGroupIndex int64, layerGroup *LayerGroup) error

ReplaceLayerGroup updates specified layer group and/or layers by index

func (*Client) ReplaceSelectedClip

func (c *Client) ReplaceSelectedClip(clip *Clip) error

ReplaceSelectedClip updates selected clip and/or its effects

func (*Client) ReplaceSelectedLayer

func (c *Client) ReplaceSelectedLayer(layer *Layer) error

ReplaceSelectedLayer updates selected layer and/or clips

func (*Client) ReplaceSelectedLayerGroup

func (c *Client) ReplaceSelectedLayerGroup(layerGroup *LayerGroup) error

ReplaceSelectedLayerGroup updates selected layer group and/or layers

func (*Client) ResetClipThumbnail

func (c *Client) ResetClipThumbnail(layerIndex, clipIndex int) error

ResetClipThumbnail resets a clip's thumbnail to the default

func (*Client) ResetColumnParameter

func (c *Client) ResetColumnParameter(columnIndex int64, parameter string, resetAnimation bool) error

ResetColumnParameter resets a parameter in a column to its default value

func (*Client) ResetCompositionParameter

func (c *Client) ResetCompositionParameter(parameter string, resetAnimation bool) error

ResetCompositionParameter resets a parameter in the composition to its default value

func (*Client) ResetDeckParameter

func (c *Client) ResetDeckParameter(deckIndex int64, parameter string, resetAnimation bool) error

ResetDeckParameter resets a parameter in a deck to its default value

func (*Client) ResetDeckParameterByID

func (c *Client) ResetDeckParameterByID(deckID int64, parameter string, resetAnimation bool) error

ResetDeckParameterByID resets a parameter in a deck to its default value

func (*Client) ResetLayerGroupParameter

func (c *Client) ResetLayerGroupParameter(layerGroupIndex int64, parameter string, resetAnimation bool) error

ResetLayerGroupParameter resets a parameter in a layer group to its default value

func (*Client) ResetLayerParameter

func (c *Client) ResetLayerParameter(layerIndex int64, parameter string, resetAnimation bool) error

ResetLayerParameter resets a parameter in a layer to its default value

func (*Client) ResetParameterByID

func (c *Client) ResetParameterByID(parameterID int64, resetAnimation bool) error

ResetParameterByID resets a parameter with the matching unique id

func (*Client) ResetSelectedClipParameter

func (c *Client) ResetSelectedClipParameter(parameter string, resetAnimation bool) error

ResetSelectedClipParameter resets a parameter in the selected clip to its default value

func (*Client) ResetSelectedLayerGroupParameter

func (c *Client) ResetSelectedLayerGroupParameter(parameter string, resetAnimation bool) error

ResetSelectedLayerGroupParameter resets a parameter in the selected layer group to its default value

func (*Client) ResetSelectedLayerParameter

func (c *Client) ResetSelectedLayerParameter(parameter string, resetAnimation bool) error

ResetSelectedLayerParameter resets a parameter in the selected layer to its default value

func (*Client) SelectClipByID

func (c *Client) SelectClipByID(clipID int64) error

SelectClipByID selects the clip by id

func (*Client) SelectColumn

func (c *Client) SelectColumn(columnIndex int64) error

SelectColumn selects the column by index

func (*Client) SelectDeck

func (c *Client) SelectDeck(deckIndex int64) error

SelectDeck selects the deck by index

func (*Client) SelectDeckByID

func (c *Client) SelectDeckByID(deckID int64) error

SelectDeckByID selects the deck by id

func (*Client) SelectLayer

func (c *Client) SelectLayer(layerIndex int64) error

SelectLayer selects the layer by index

func (*Client) SelectLayerGroup

func (c *Client) SelectLayerGroup(layerGroupIndex int64) error

SelectLayerGroup selects the layer group by index

func (*Client) SetClipThumbnail

func (c *Client) SetClipThumbnail(layerIndex, clipIndex int, thumbnail io.Reader) error

SetClipThumbnail sets a custom thumbnail for a specific clip

func (*Client) SetEffectDisplayName

func (c *Client) SetEffectDisplayName(effectID int64, displayName string) error

SetEffectDisplayName changes the display name of an effect

func (*Client) SetParameterByID

func (c *Client) SetParameterByID(parameterID int64, parameter interface{}) error

SetParameterByID updates a parameter given its unique id

type Clip

type Clip struct {
	ID                  int64               `json:"id"`
	Name                *StringParameter    `json:"name,omitempty"`
	ColorID             *ChoiceParameter    `json:"colorid,omitempty"`
	Selected            *BooleanParameter   `json:"selected,omitempty"`
	Connected           *ChoiceParameter    `json:"connected,omitempty"`
	Target              *ChoiceParameter    `json:"target,omitempty"`
	TriggerStyle        *ChoiceParameter    `json:"triggerstyle,omitempty"`
	IgnoreColumnTrigger *ChoiceParameter    `json:"ignorecolumntrigger,omitempty"`
	FaderStart          *ChoiceParameter    `json:"faderstart,omitempty"`
	BeatSnap            *ChoiceParameter    `json:"beatsnap,omitempty"`
	TransportType       *ChoiceParameter    `json:"transporttype,omitempty"`
	Transport           interface{}         `json:"transport,omitempty"` // Can be TransportTimeline or TransportBPMSync
	Dashboard           ParameterCollection `json:"dashboard,omitempty"`
	Audio               *AudioTrackClip     `json:"audio,omitempty"`
	Video               *VideoTrackClip     `json:"video,omitempty"`
	Thumbnail           *struct {
		Size       int64  `json:"size"`
		LastUpdate string `json:"last_update"`
		IsDefault  bool   `json:"is_default"`
	} `json:"thumbnail,omitempty"`
}

Clip represents a single clip in the composition

type ColorParameter

type ColorParameter struct {
	ID        int64         `json:"id"`
	ValueType string        `json:"valuetype"`
	Value     string        `json:"value"`
	Palette   []string      `json:"palette,omitempty"`
	View      ParameterView `json:"view,omitempty"`
}

ColorParameter represents a parameter containing color data

type Column

type Column struct {
	ID        int64             `json:"id"`
	Name      *StringParameter  `json:"name,omitempty"`
	ColorID   *ChoiceParameter  `json:"colorid,omitempty"`
	Connected *ChoiceParameter  `json:"connected,omitempty"`
	Selected  *BooleanParameter `json:"selected,omitempty"`
}

Column represents a column within a deck

type Composition

type Composition struct {
	Name             *StringParameter    `json:"name,omitempty"`
	Selected         *BooleanParameter   `json:"selected,omitempty"`
	Bypassed         *BooleanParameter   `json:"bypassed,omitempty"`
	Master           *RangeParameter     `json:"master,omitempty"`
	Speed            *RangeParameter     `json:"speed,omitempty"`
	ClipTarget       *ChoiceParameter    `json:"cliptarget,omitempty"`
	ClipTriggerStyle *ChoiceParameter    `json:"cliptriggerstyle,omitempty"`
	ClipBeatSnap     *ChoiceParameter    `json:"clipbeatsnap,omitempty"`
	Dashboard        ParameterCollection `json:"dashboard,omitempty"`
	Audio            *AudioTrack         `json:"audio,omitempty"`
	Video            *VideoTrack         `json:"video,omitempty"`
	CrossFader       *CrossFader         `json:"crossfader,omitempty"`
	Decks            []Deck              `json:"decks,omitempty"`
	Layers           []Layer             `json:"layers,omitempty"`
	Columns          []Column            `json:"columns,omitempty"`
	LayerGroups      []LayerGroup        `json:"layergroups,omitempty"`
	TempoController  *TempoController    `json:"tempo_controller,omitempty"`
}

Composition represents the complete composition

type CrossFader

type CrossFader struct {
	ID        int64               `json:"id"`
	Phase     *RangeParameter     `json:"phase,omitempty"`
	Behaviour *ChoiceParameter    `json:"behaviour,omitempty"`
	Curve     *ChoiceParameter    `json:"curve,omitempty"`
	SideA     *EventParameter     `json:"sidea,omitempty"`
	SideB     *EventParameter     `json:"sideb,omitempty"`
	Mixer     ParameterCollection `json:"mixer,omitempty"`
}

CrossFader represents cross fade between two clips

type Deck

type Deck struct {
	ID       int64             `json:"id"`
	Closed   bool              `json:"closed"`
	Name     *StringParameter  `json:"name,omitempty"`
	ColorID  *ChoiceParameter  `json:"colorid,omitempty"`
	Selected *BooleanParameter `json:"selected,omitempty"`
	ScrollX  *IntegerParameter `json:"scrollx,omitempty"`
}

Deck represents a deck containing layers and clips

type Effect

type Effect struct {
	IDString string `json:"idstring"`
	Name     string `json:"name"`
	Presets  []struct {
		ID   int64  `json:"id"`
		Name string `json:"name"`
	} `json:"presets,omitempty"`
}

Effect represents an effect to be used on clips/layers/composition

type Effects

type Effects struct {
	Video []Effect `json:"video"`
}

Effects represents available effects for clips/layers/composition

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Error represents an API error response

func (*Error) Error

func (e *Error) Error() string

type EventParameter

type EventParameter struct {
	ID        int64         `json:"id"`
	ValueType string        `json:"valuetype"`
	View      ParameterView `json:"view,omitempty"`
}

EventParameter represents a parameter that handles events but does not contain a value

type FrameRate

type FrameRate struct {
	Num   int32 `json:"num"`
	Denom int32 `json:"denom"`
}

FrameRate represents frame rate expressed as a ratio

type IntegerParameter

type IntegerParameter struct {
	ID        int64         `json:"id"`
	ValueType string        `json:"valuetype"`
	Value     int64         `json:"value"`
	View      ParameterView `json:"view,omitempty"`
}

IntegerParameter represents a parameter containing numeric data

type Layer

type Layer struct {
	ID                  int64               `json:"id"`
	Name                *StringParameter    `json:"name,omitempty"`
	ColorID             *ChoiceParameter    `json:"colorid,omitempty"`
	Selected            *BooleanParameter   `json:"selected,omitempty"`
	Bypassed            *BooleanParameter   `json:"bypassed,omitempty"`
	Solo                *BooleanParameter   `json:"solo,omitempty"`
	CrossFaderGroup     *ChoiceParameter    `json:"crossfadergroup,omitempty"`
	Master              *RangeParameter     `json:"master,omitempty"`
	MaskMode            *ChoiceParameter    `json:"maskmode,omitempty"`
	IgnoreColumnTrigger *BooleanParameter   `json:"ignorecolumntrigger,omitempty"`
	FaderStart          *BooleanParameter   `json:"faderstart,omitempty"`
	Dashboard           ParameterCollection `json:"dashboard,omitempty"`
	Audio               *AudioTrack         `json:"audio,omitempty"`
	Video               *VideoTrackLayer    `json:"video,omitempty"`
	Transition          *LayerTransition    `json:"transition,omitempty"`
	Clips               []Clip              `json:"clips,omitempty"`
	AutoPilot           *AutoPilot          `json:"autopilot,omitempty"`
}

Layer represents a container for clips

type LayerGroup

type LayerGroup struct {
	ID                  int64               `json:"id"`
	Name                *StringParameter    `json:"name,omitempty"`
	ColorID             *ChoiceParameter    `json:"colorid,omitempty"`
	Selected            *BooleanParameter   `json:"selected,omitempty"`
	Bypassed            *BooleanParameter   `json:"bypassed,omitempty"`
	Solo                *BooleanParameter   `json:"solo,omitempty"`
	CrossFaderGroup     *ChoiceParameter    `json:"crossfadergroup,omitempty"`
	Master              *RangeParameter     `json:"master,omitempty"`
	Speed               *RangeParameter     `json:"speed,omitempty"`
	IgnoreColumnTrigger *BooleanParameter   `json:"ignorecolumntrigger,omitempty"`
	Dashboard           ParameterCollection `json:"dashboard,omitempty"`
	Audio               *AudioTrack         `json:"audio,omitempty"`
	Video               *VideoTrack         `json:"video,omitempty"`
	Layers              []Layer             `json:"layers,omitempty"`
}

LayerGroup represents a collection of layers

type LayerTransition

type LayerTransition struct {
	Duration  *RangeParameter  `json:"duration,omitempty"`
	BlendMode *ChoiceParameter `json:"blend_mode,omitempty"`
}

LayerTransition describes the transition between clips within a layer

type ParameterCollection

type ParameterCollection map[string]interface{}

ParameterCollection represents an unstructured collection of parameters

type ParameterView

type ParameterView struct {
	Suffix       string  `json:"suffix,omitempty"`
	Step         float64 `json:"step,omitempty"`
	Multiplier   float64 `json:"multiplier,omitempty"`
	DisplayUnits string  `json:"display_units,omitempty"`
	ControlType  string  `json:"control_type,omitempty"`
}

ParameterView represents semantic information about how to display a parameter

type ProductInfo

type ProductInfo struct {
	Name     string `json:"name"`
	Major    int64  `json:"major"`
	Minor    int64  `json:"minor"`
	Micro    int64  `json:"micro"`
	Revision int64  `json:"revision"`
}

ProductInfo represents information about the Resolume product

type RangeParameter

type RangeParameter struct {
	ID        int64         `json:"id"`
	ValueType string        `json:"valuetype"`
	Min       float64       `json:"min"`
	Max       float64       `json:"max"`
	In        float64       `json:"in"`
	Out       float64       `json:"out"`
	Value     float64       `json:"value"`
	View      ParameterView `json:"view,omitempty"`
}

RangeParameter represents a parameter containing a floating-point value with min/max

type ResetParameter

type ResetParameter struct {
	ResetAnimation bool `json:"resetanimation"`
}

ResetParameter represents options for resetting a parameter

type Source

type Source struct {
	IDString string `json:"idstring"`
	Name     string `json:"name"`
	Presets  []struct {
		ID   int64  `json:"id"`
		Name string `json:"name"`
	} `json:"presets,omitempty"`
}

Source represents a source that can be used in clips

type Sources

type Sources struct {
	Video []Source `json:"video"`
}

Sources represents available sources for clips

type StringParameter

type StringParameter struct {
	ID        int64         `json:"id"`
	ValueType string        `json:"valuetype"`
	Value     string        `json:"value"`
	View      ParameterView `json:"view,omitempty"`
}

StringParameter represents a parameter containing string data

type TempoController

type TempoController struct {
	Tempo     *RangeParameter `json:"tempo,omitempty"`
	TempoPull *EventParameter `json:"tempo_pull,omitempty"`
	TempoPush *EventParameter `json:"tempo_push,omitempty"`
	TempoTap  *EventParameter `json:"tempo_tap,omitempty"`
	Resync    *EventParameter `json:"resync,omitempty"`
}

TempoController represents the controller for tempo-related aspects

type TextParameter

type TextParameter struct {
	ID        int64         `json:"id"`
	ValueType string        `json:"valuetype"`
	Value     string        `json:"value"`
	View      ParameterView `json:"view,omitempty"`
}

TextParameter represents a parameter containing possibly multiline string data

type TransportBPMSync

type TransportBPMSync struct {
	Position *RangeParameter `json:"position,omitempty"`
	Controls struct {
		PlayDirection *ChoiceParameter `json:"playdirection,omitempty"`
		PlayMode      *ChoiceParameter `json:"playmode,omitempty"`
		PlayModeAway  *ChoiceParameter `json:"playmodeaway,omitempty"`
		Duration      *RangeParameter  `json:"duration,omitempty"`
		Speed         *RangeParameter  `json:"speed,omitempty"`
		BPM           *RangeParameter  `json:"bpm,omitempty"`
		SyncMode      *ChoiceParameter `json:"syncmode,omitempty"`
		BeatLoop      *ChoiceParameter `json:"beatloop,omitempty"`
	} `json:"controls"`
}

TransportBPMSync represents BPM sync transport controls

type TransportTimeline

type TransportTimeline struct {
	Position *RangeParameter `json:"position,omitempty"`
	Controls struct {
		PlayDirection *ChoiceParameter `json:"playdirection,omitempty"`
		PlayMode      *ChoiceParameter `json:"playmode,omitempty"`
		PlayModeAway  *ChoiceParameter `json:"playmodeaway,omitempty"`
		Duration      *RangeParameter  `json:"duration,omitempty"`
		Speed         *RangeParameter  `json:"speed,omitempty"`
	} `json:"controls"`
}

TransportTimeline represents timeline transport controls

type VideoEffect

type VideoEffect struct {
	ID          int64               `json:"id"`
	Name        string              `json:"name"`
	DisplayName string              `json:"display_name"`
	Bypassed    *BooleanParameter   `json:"bypassed,omitempty"`
	Mixer       ParameterCollection `json:"mixer,omitempty"`
	Params      ParameterCollection `json:"params,omitempty"`
	Effect      ParameterCollection `json:"effect,omitempty"`
}

VideoEffect represents a single video effect in a chain

type VideoFileInfo

type VideoFileInfo struct {
	Path       string    `json:"path"`
	Exists     bool      `json:"exists"`
	Duration   string    `json:"duration"`
	DurationMs float64   `json:"duration_ms"`
	FrameRate  FrameRate `json:"framerate"`
	Width      int32     `json:"width"`
	Height     int32     `json:"height"`
}

VideoFileInfo represents meta information for a video file

type VideoTrack

type VideoTrack struct {
	Width   *RangeParameter     `json:"width,omitempty"`
	Height  *RangeParameter     `json:"height,omitempty"`
	Opacity *RangeParameter     `json:"opacity,omitempty"`
	Mixer   ParameterCollection `json:"mixer,omitempty"`
	Effects []VideoEffect       `json:"effects,omitempty"`
}

VideoTrack represents a video track as part of a clip/layer/group/composition

type VideoTrackClip

type VideoTrackClip struct {
	VideoTrack
	Description  string              `json:"description,omitempty"`
	FileInfo     *VideoFileInfo      `json:"fileinfo,omitempty"`
	Resize       *ChoiceParameter    `json:"resize,omitempty"`
	R            *BooleanParameter   `json:"r,omitempty"`
	G            *BooleanParameter   `json:"g,omitempty"`
	B            *BooleanParameter   `json:"b,omitempty"`
	A            *BooleanParameter   `json:"a,omitempty"`
	SourceParams ParameterCollection `json:"sourceparams,omitempty"`
}

VideoTrackClip represents a video track specifically for clips

type VideoTrackLayer

type VideoTrackLayer struct {
	VideoTrack
	AutoSize *ChoiceParameter `json:"autosize,omitempty"`
}

VideoTrackLayer represents a video track specifically for layers

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL