Skip to content

Commit

Permalink
Post Meeting updates and notes
Browse files Browse the repository at this point in the history
Co-authored-by: Johan Nyman <[email protected]>
  • Loading branch information
lukejdav and nytamin committed Apr 2, 2024
1 parent 565c39f commit 8af3262
Show file tree
Hide file tree
Showing 8 changed files with 388 additions and 55 deletions.
20 changes: 17 additions & 3 deletions packages/quick-tsr/input/devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,25 @@ import { DeviceType } from 'timeline-state-resolver'

export const input: TSRInput = {
devices: {
caspar0: {
type: DeviceType.CASPARCG,
universe0: {
type: DeviceType.ARTNET,
options: {
host: '127.0.0.1',
port: 5250,
mode: 'full',
fps: 44,

profileBehaviours: {

// By default, the priority mode for all channels are "highest value takes precedence"
'strobe' : 'invert'

// '0:145': 'last'
// 'last'
// 'highest'
// 'lowest'
// 'invert'

}
},
},
},
Expand Down
59 changes: 53 additions & 6 deletions packages/quick-tsr/input/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,60 @@ import type { TSRInput } from '../src'

export const input: TSRInput = {
mappings: {
casparLayer0: literal<Mapping<SomeMappingCasparCG>>({
device: DeviceType.CASPARCG,
deviceId: 'caspar0',
dimmer0: literal<Mapping<SomeMappingArtNet>>({
device: DeviceType.ARTNET,
deviceId: 'universe0',
options: {
mappingType: MappingCasparCGType.Layer,
channel: 1,
layer: 10,
universe: 0,
profileMappings: {
// Maps dimmer to channel 1:
"dimmer": 1,
}
},
}),
rgb0: literal<Mapping<SomeMappingArtNet>>({
device: DeviceType.ARTNET,
deviceId: 'universe0',
options: {
universe: 0,
profileMappings: {
"dimmer": 6,
"RGB": [7,8,9],
}
},
}),
rgb0_dimmer: literal<Mapping<SomeMappingArtNet>>({
device: DeviceType.ARTNET,
deviceId: 'universe0',
options: {
universe: 0,
profileMappings: {
"dimmer": 6,
}
},
}),
dimmerGroup0: literal<Mapping<SomeMappingArtNet>>({
device: DeviceType.ARTNET,
deviceId: 'universe0',
options: {
universe: 0,
profileMappings: {
// Maps dimmers to channel group:
"dimmers": [11, 12, 13, 14, 15, 16, 17, 18],
}
},
}),

everything: literal<Mapping<SomeMappingArtNet>>({
device: DeviceType.ARTNET,
deviceId: 'universe0',
options: {
universe: 0,
profileMappings: {
// "everything": ['1-50', '100-512'],
"everything": '1-512'

}
},
}),
},
Expand Down
169 changes: 125 additions & 44 deletions packages/quick-tsr/input/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,107 @@ import { literal } from 'timeline-state-resolver/dist/lib'

export const input: TSRInput = {
timeline: [

literal<TSRTimelineObj<TimelineContentArtNetValues>>({
id: 'artnet0',
enable: {
start: Date.now(),
duration: 20 * 1000
},
layer: 'dimmer00',
content: {
values: {
dimmer: 255
}
}
}),
literal<TSRTimelineObj<TimelineContentArtNetValues>>({
id: 'artnet0',
enable: {
start: Date.now(),
duration: 20 * 1000
},
layer: 'rgb0',
content: {
values: {
// Sets an RGB value:
// rgb: [ 255, 127, 0 ]

// Defaults to [255, 255, 255] (special case: uses the value for all)
// rgb: 255

// Defaults to [ 127, 255, 0 ] (underfill: extend with zeros)
// rgb: [ 127, 255 ]

// Defaults to [ 127, 255, 209 ] (overfill: just cap and discard the unused values)
// rgb: [ 127, 255, 209, 52 ]
}
}
}),
literal<TSRTimelineObj<TimelineContentArtNetValues>>({
id: 'myRGBLight0',
enable: {
start: Date.now(),
duration: 20 * 1000
},
layer: 'rgb0',
content: {
values: {
dimmer: 255,
rgb: [ 255, 127, 0 ]
}
},
// keyframes: [
// {
// id: 'kf0',
// enable: {

// start: '#myRGBLight0.start + 10',
// },
// content: {
// values: {
// dimmer: 127
// }
// }
// }
// ]
}),
literal<TSRTimelineObj<TimelineContentArtNetValues>>({
id: 'artnet0',
enable: {
start: Date.now(),
duration: 20 * 1000
},
layer: 'rgb0',
content: {

values: {
dimmers: 255
}

// value: [255, 0, 0, 255]
}
}),

literal<TSRTimelineObj<TimelineContentArtNetValues>>({
id: 'whiteout',
enable: {
start: Date.now()
},
layer: 'everything',
content: {
values: {
everything: 255
}
}
})







literal<TSRTimelineObj<TimelineContentCCGMedia>>({
id: 'video0',
enable: {
Expand All @@ -19,13 +120,13 @@ export const input: TSRInput = {
content: {
deviceType: DeviceType.CASPARCG,
type: TimelineContentTypeCasparCg.MEDIA,
file: 'amb',
file: 'amb.mp4',
mixer: {
rotation: 0,
anchor: {
x: 0.5,
y: 0.5,
},
// anchor: {
// x: 0.5,
// y: 0.5,
// },
fill: {
x: 0.5,
y: 0.5,
Expand All @@ -34,53 +135,33 @@ export const input: TSRInput = {
},
},

$references: {
'mixer.fill.xScale': {
// Local path to overwrite
datastoreKey: 'scale', // Reference key in datastore
overwrite: false,
},
'mixer.fill.yScale': {
// Local path to overwrite
datastoreKey: 'scale', // Reference key in datastore
overwrite: false,
},
},
// $references: {
// 'mixer.fill.xScale': {
// // Local path to overwrite
// datastoreKey: 'scale', // Reference key in datastore
// overwrite: false,
// },
// 'mixer.fill.yScale': {
// // Local path to overwrite
// datastoreKey: 'scale', // Reference key in datastore
// overwrite: false,
// },
// },
},
/*
keyframes: [
{
id: 'kf0',
enable: {
start: 1000,
duration: 5000,
while: true,
// start: '#video0.start + 10',
},
content: {
mixer: {
rotation: 45,
changeTransition: {
duration: 5000,
easing: Ease.LINEAR,
},
},
},
},
{
id: 'kf1',
enable: {
start: 1,
},
content: {
mixer: {
changeTransition: {
duration: 5000,
easing: Ease.LINEAR,
},
},
},
},
],
*/
rotation: 90
}
}
}
]
}),
],
}
28 changes: 28 additions & 0 deletions packages/timeline-state-resolver-types/src/generated/artnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run "yarn generate-schema-types" to regenerate this file.
*/

export interface ArtNetOptions {
host: string
mode: Mode
fps: number
}

export enum Mode {
FULL = 'full',
PARTIAL = 'partial'
}

export interface MappingArtnetUniverse {
universe: number
mappingType: MappingArtnetType.Universe
}

export enum MappingArtnetType {
Universe = 'universe',
}

export type SomeMappingArtnet = MappingArtnetUniverse
4 changes: 4 additions & 0 deletions packages/timeline-state-resolver-types/src/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export * from './action-schema'
export * from './abstract'
import { SomeMappingAbstract } from './abstract'

export * from './artnet'
import { SomeMappingArtnet } from './artnet'

export * from './atem'
import { SomeMappingAtem } from './atem'

Expand Down Expand Up @@ -74,6 +77,7 @@ import { SomeMappingVmix } from './vmix'

export type TSRMappingOptions =
| SomeMappingAbstract
| SomeMappingArtnet
| SomeMappingAtem
| SomeMappingCasparCG
| SomeMappingHttpSend
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
notes

additional json for building channel groups
wont be included yet due to complexity relating to ui experience


"size": {
"type": "integer",
"ui:title": "Size",
"ui:description": "The number of channels to be included",
"ui:summaryTitle": "Group Size",
"default": 1,
"min": 1,
"max": 512
},
"channels": {
"type": "string",
"ui:title": "Channels",
"ui:description": "comma separated list of channels to use",
"ui:summaryTitle": "Channel List",
"default": 1,
"min": 1,
"max": 512
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"mode": {
"type": "string",
"ui:title": "Transmission Mode",
"ui:description": "Use Full or Partial transmission mode",
"ui:description": "Use Full or Partial transmission mode. Partial mode updates only changed values other than keyframes, reducing network traffic.",
"ui:summaryTitle": "Transmission Mode",
"enum": ["full", "partial"],
"tsEnumNames": ["FULL", "PARTIAL"],
Expand All @@ -27,6 +27,6 @@
"max": 120
}
},
"required": ["host", "mode", "fps"],
"required": ["host"],
"additionalProperties": false
}
Loading

0 comments on commit 8af3262

Please sign in to comment.