Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blocks:lighting:fixture_definitions [2018-01-25 08:00] admin [Blocks Lighting Fixture Definitions] |
blocks:lighting:fixture_definitions [2021-03-05 12:26] (current) admin Link to app note in case something else links here. |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Blocks Lighting Fixture Definitions ====== | + | This page has moved, and is now found [[blocks:app-note:art-net-dmx|here]]. |
- | + | ||
- | A fixture definition describes a lighting instrument, such as a multi-color light or a moving-head light, controllable over Artnet/ | + | |
- | + | ||
- | A set of lighting fixture definitions usable with PIXILAB Blocks 1.1 or later. can be found here: | + | |
- | + | ||
- | https:// | + | |
- | + | ||
- | To use any of these definitions, | + | |
- | + | ||
- | - Download the entire github repo as a ZIP and unpack (or clone the repo if yu're familiar with git). | + | |
- | - Copy the desired brand name folder(s) into the // | + | |
- | + | ||
- | The fixture definitions | + | |
- | + | ||
- | A few basic and common fixture types can be found under the //Generic// brand. Due to the simple file format, it's quite easy to add a definition for other fixtures you want to use with Blocks, based on the information found below. | + | |
- | + | ||
- | **NOTE:** These definitions were partially derived from the excellent //Open Fixtures Library// found at https:// | + | |
- | ==== Folder/File Structure ==== | + | |
- | + | ||
- | The // | + | |
- | + | ||
- | * It contains one subdirectory per supported brand, plus one named // | + | |
- | * Inside each subdirectory, | + | |
- | + | ||
- | ==== File Format ==== | + | |
- | + | ||
- | The format of the data in each description file is defined by the following types (using // | + | |
- | + | ||
- | < | + | |
- | interface FixtureDescriptor { | + | |
- | channels: Channel[]; // The channels supported by this fixture | + | |
- | note: string; | + | |
- | } | + | |
- | + | ||
- | interface Channel extends Named { | + | |
- | type: ChannelTypes; | + | |
- | defaultValue?: | + | |
- | normalized?: | + | |
- | hidden?: boolean; // Not shown in UI (used to represent " | + | |
- | ranges?: Range[]; // When type is Ranges | + | |
- | } | + | |
- | + | ||
- | type ChannelTypes = ' | + | |
- | + | ||
- | interface Range extends Named { | + | |
- | first: number; last: number; | + | |
- | discrete?: boolean; // Is discrete (single enum) value only, with no " | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | Each FixtureDescriptor contains a list of channels. A channel can be of one of four types, where the first three represent an analog value wth 8, 16 or 24 bits resolution (mapping to one, two or three DMX channels). Such an analog value can also accept the following optional properties: | + | |
- | + | ||
- | * **defaultValue** specifies the initial value of the channel. If not specified, the initial value will be zero. | + | |
- | * **normalized** set to true indicates that the value will be presented as 0...1 in the user interface. If not specified, or set to false, the value will be represented by its full numeric span (e.g., 0...255 for an 8-bit channel, 0...65535 for a 16-bit channel) | + | |
- | * **hidden** set to true hides the channel from the user interface, thereby blocking out " | + | |
- | + | ||
- | Alternatively the type is defined as ' | + | |
- | + | ||
- | ==== Example File ==== | + | |
- | + | ||
- | Here's an example of what the content of a description file can look like, taken from the generic //Pan Tilt// model: | + | |
- | + | ||
- | < | + | |
- | { | + | |
- | "note": " | + | |
- | " | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | }, { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | | + | |
- | } | + | |
- | </ | + |