Kistan 2.0 Doc
  • Furniture
  • Sound cables
  • Roof LED
  • Pipes
  • Inputs/Outputs
  • Mixer
  • Amplifiers
  • DALI
  • DMX
  • Roof LED
  • LMixer
  • Sound mixer defaults
  • Bar computer to Kitchen speakers
  • Server: IN-SMN
  • Server: IN-ITK
  • SSO / Login
  • Grafana
IT-Sektionen
  • Furniture
  • Sound cables
  • Roof LED
  • Pipes
  • Inputs/Outputs
  • Mixer
  • Amplifiers
  • DALI
  • DMX
  • Roof LED
  • LMixer
  • Sound mixer defaults
  • Bar computer to Kitchen speakers
  • Server: IN-SMN
  • Server: IN-ITK
  • SSO / Login
  • Grafana
IT-Sektionen
  • LMixer

    • LMixer
    • LMixer scripting
    • Mixing technique
    • LMixer examples
    • Layers in kistan

LMixer

GitHub: https://github.com/Daedaluz/lmixer

LMixer is a mixing engine for lights built using small lua-scripts. The current version is built with lua 5.4 and some extensions. It renders a new frame at 30 FPS, which is once every 32ms. A shorter time between two effects will not be visible.

Components

The LMixer software is made up of a couple of different components.

Output

An output is used to send layer data using raw UDP socket to other programs.

Input

An input can be created to bind an incoming UDP stream to layer data.

Layers

A layer is the base for data storage and manipulation. A layer can be combined with another layer using mathematical operations. Layers can be stacked and nested. It is quite similar to how image editing programs use layers.

An output can be bound to a layer so that every render of the layer is sent to that output.

It is also possible to create layers from inputs. This can be used to add remote sources of color information from other programs.

One way to think of layering is like a factory, where things are combined in steps. In the image below the top and right sides are inputs, bottom and left are outputs.

Example: This computes (Base*Dim)+(Addition*AdditionDim)

Base
mul
Dim
add
Addition
mul
AdditionDim
Output

The layer setup in kistan can be found here

Kistan's LMixer exclusive

This content only applies to kistan's instance of LMixer. It is likely the case that the code is contained in setup scripts.

LayerExt

Layer Extended is used in the same way, however it has more functionality.

  1. When saving the layer file, the layers retain their data (old data is copied over using the name parameter)
  2. Layers' data can be read out using mqtt

The part that is not backwards compatable is creation, see Scripting for the new usage.

Alpha-Data Layers

An Alpha-Data Layer works the same as a normal layerExt, except for the fact that it has an alpha value, which defaults to 0. When the alpha is 0, this layer has no effect, when the alpha is 1, this layer fully overrides whatever is below it in the layer order.

The alpha is set on a per channel basis, this is done by accessing the layers alpha property. This is another layer which can be altered in the same way as other layers (i.e. lay.alpha:add(...)).

Note

Even if the alpha is zero, effects are still executed.

For set and dim, the new data is calculated, but does not take effect until the alpha is set to a non-zero value.

For execute, run, play, and stop_play, since they do not effect the data anyway, they are executed exactly like normal, regardless of the alpha.

Fixtures

A fixture represent a single light or RGB-list. They can also be organized into groups. This part of the LMixer defines the names for each fixture and where in the layer they are located. Fixtures are not bound to a single layer.

Scripts

Each script is a series of instructions that are added to a timeline each time the run command is used. A script may repeat by running itself again. Make sure that the repeat time is longer than the script time to not create overlapping. Scripts are the main part of the LMixer and is where most code is written.

Scripts does not have a "running" state since each script only manipulates the timeline ahead. However, it is possible to "stop" a script. This tells LMixer to not apply any "run" commands to it again.

Any script can be removed by just making it completely empty and pressing run. To rename a script the easiest way is to copy all code to the new one and then deleting the old.

Tips

The editor can save without running a script by pressing CTRL+S. Useful for a looping script that loads the change on the next iteration.

Code

This acts like a script but is only run once at startup (or when manually triggered by the run function). Here some extra global code and different utility functions can be placed.

Edit this page
Next
LMixer scripting