Lightning

Terug naar overzicht
20 maa 2002 - jan 2023Applicatie "Lightning" dlportio-inpout.png

64bit parallel port support (via DLPortIO+InpOut)

New at 31-01-2021, brief installation steps:
  • download https://www.highrez.co.uk/scripts/download.asp?package=InpOutBinaries (pascal.hansotten.com_InpOutBinaries_1501.zip):
    • unpack and run Win32\InstallDriver.exe as Administrator (using right-click on the executable).
    • unpack Win32\inpout32.dll in your Lightning folder and rename it to DLPortIO.DLL (leave x64\inpoutx64.dll untouched, since Lightning is running in 32 bit modus on 64 bit Windows, using WoW technology);
  • place the 3 DLLs from lightning_parport64bit-dlportio-inpout.zip in the Lightning folder;
Credits go out to Hans Otten (DLPortIO) and Phillip Gibbons (InpOut, please consider donating him via the 'Donate' button on his website or leaving them a thank you note). It is currently not possible to skip/disable the SmallPort reminder dialog. If you don’t like to change your existing Lightning desktops, it might be possible to rename/copy the following files:
  • out_deluxelights64.dll to out_deluxelights.dll,
  • out_lights64.dll to out_lights.dll and
  • in_parport64.dll to in_parport.dll
Possible errors are the following (displayed inside the module panels):
  • DLPortIO.dll error
  • DLPortIORead() error
  • DLPortIOWrite() error

dlportio-inpout.lit

Example desktop for 64 bit parallel port support.

Source: YouTube (5thELEMENT2010)

Latest version (4 August 2007)

(currently unavailable because of being flagged by Cylance, Rising & Zoner virus scanners)

Official Polish Lightning community (translated)

Official Polish Lightning community

www.assembla.com/spaces/LightningStudio

Location for source code from our friends from Poland (currently unavailable?).

Lightning introduction

Page update: 26 March 2012.
Software update: 4 August 2007.

Lightning is an interactive signal processing application. It is a freeware program with the purpose of controlling disco lighting equipment on a PC. Currently Lightning is in beta stage and does a decent job so far. Some features are not completed yet, such as DMX support. The Elektroda website has good add-ons for that (use Google Translate). Older desktop files can be loaded with any new version of Lightning.

This program is mainly suitable for controlling conventional lights, such as PAR spots, strobo lights and on/off switchable effects. Intelligent (DMX) lighting could be controlled too. Easier to use software exists for that purpose (see Links page).

Features

  • Compatible with Microsoft Windows Vista
  • Built-in Fourier spectrum audio input module (using bass.dll)
  • Built-in parallel port output module (using SmallPort driver, 32 bit only)
  • Network server and client modules
  • Autodetection of DLOPs
  • Autodetection of user made LUA scripts
  • Hotkey support


Download

Lightning

Lightning V0.84 [ 04-08-2007 ]
(includes runtime libraries)

  • Huge performance improvement
  • Faster startup
  • Flicker free painting of connectors, configurable paint interval
  • Better painting of connections
  • "Pin" feature in settings dialog, for simultaneous views of spectrums
  • inButton, inSwitch, inMultiButton: hotkey support, configurable using settings dialog
  • inMultiButton: scene capable
  • procSwitch: alternates between two outputs
Lightning V0.80 ( 19-07-2007 )
(includes runtime libraries)

  • Compatible with Microsoft Windows Vista, without requiring administrator privileges
    (except during installation of SmallPort driver)
  • Smoother drawing, creation and movement of modules
  • Better configuration dialog with installer for SmallPort driver
  • Fixed bug: creation of multiple DLOPs of the same kind caused crash
  • New module: inBPMStudio, retrieves beats per minute value from Alcatech BPM Studio webserver
  • New module: inParallelPort, reads from 9 parallel port control and status input pins
  • New module: outMiniSpectrum, shows spectrum without using details window
  • Removed module: procLUA, because LUA scripts are autodetected
  • Removed module: outDLOP, because DLOPs are autodetected
  • Merged inAudio with inStereoAudio:
    multiple modules can be created with selectable sound card and number of samples
  • Merged outLabel with outLargeLabel: all labels do autosize
  • Merged outSpectrum with outZoomLeftSpectrum and outZoomRightSpectrum
  • inBeat: multiple modules can be created, new beats per minute value output
  • inJoystick & inMiniJoystick: autodetection of joysticks
  • inScreenStick: fixed "out of resources" crash
  • inSerialMouse: autodetection of serial ports
  • inParallelPort, outParallelPort & outParallelPortMux: better parallel port detection
  • outParallelPort: added support for 4 parallel port control output pins
  • Beat detection tool:
    • stores settings in registry instead of INI file
    • has sliders instead of spin edits
    • shows graph indicating sound levels and beats
Lightning V0.70 ( 25-09-2006 )
(includes runtime libraries)

  • Multiple module selection.
  • Copy and paste.
  • Improved "Lock" function.
  • Improved user interface of Beat Detection tool.
  • All kinds of bug fixes.
  • Known issue: line painting has glitches occasionally.
Lightning V0.60 runtime libraries
Lightning V0.60
(requires runtime libraries)



User manual

Lightning user manual
(incomplete)



Module for Velleman K8055D

out_vellemank8055.dll V2 ( 08-11-2008 )

  • Supports multiple boards
out_vellemank8055.dll ( 02-11-2008 )

This module controls the eight digital output pins and two analog output pins on Velleman K8055D USB boards. Up to four boards are supported simultaneously.



DiscoLitez DLOPs

DiscoLitez is a freeware lighting application. It uses plugins called "DLOPs" for driving hardware light rigs. Lightning can load DLOPs too. A number of Lightning related DLOPs are available:

DLO_lightning.dll
(for DiscoLitez)

DLO_lightning.dll

This 32 channel DLOP runs a network server. The Lightning program can connect to it. This way Lightning can retrieve the light status from DiscoLitez.

At first launch the DLOP will ask for the network port number, which will then be stored in a .ini file. Leaving the default setting is recommended. Make sure to tune each light that should be forwarded in DiscoLitez, by enabling hardware output and selecting the "Lightning Network Server" DLOP.

The DLOP runs as a server. In Lightning information can be retrieved from it by adding an inNetworkClient module. Set the correct hostname ("localhost" if DiscoLitez and Lightning run on the same PC) and port in the module's settings and check the "Binary mode" checkbox (non-binary mode won't work). Finally press "Update".

Now the inNetworkClient module's outputs reflect the light status from DiscoLitez. Up to 100 times per second the status of all lights will be updated, using a 4 byte packet.

DLO_ft245usb.dll
(for Lightning & DiscoLitez)

DLO_ft245usb.dll V0.2 ( 13-11-2007 )
DLO_ft245usb.dll + source code (zip-archive) ( 18-07-2011 )
DLO_ft245usb.dll + source code (7-Zip-archive) ( 18-07-2011 )

  • Supports multiple FT245 chips
DLO_ft245usb.dll V0.1

Copyright © 2007 - 2011 Paul Abbott




Paul Abbott made this 8 channel DLOP that outputs to an USB light rig. This is especially useful for laptops that don't have a parallel port. The DLOP can communicate with a single 8 bit FT245 chip. To use it in Lightning, place the DLOP file in the Lightning directory, so that it appears in the "DLOP" menu. To use multiple instances, create copies such as DLO_ft245usb_2.dll, DLO_ft245usb_3.dll etc.

Requirements:


Getting started

Basics

  • Modules can be moved by dragging using an empty area on the module. Usually using the topmost area of a component works best.
  • A context-menu will appear after right-clicking on an empty area of the module, such as the topmost area. The context-menu can be used to delete the module, set a custom color for the module's (normally invisible) title bar and more.
  • Modules can be interconnected by dragging from an output to an input. That way the spectrum data from the output is passed on to the input.
    • A spectrum signal transfers multiple (512) values of 0.0..511.9 each.
    • A level signal transfers a single value of 0.0..511.9.
    • A status transfers a single value of either 0.0 or 511.9.
    • A pulse transfers a single value of 0.0 followed by a single value of 511.9.
  • Any signal can be connected to any signal and will automatically be converted as needed.
    • Going from spectrum->level->status averages the information.
    • Going from status->level->spectrum spreads the information.
  • Connections can be deleted by right-clicking on an input or output.
  • Only a single connection can exist per input or output. This can be gotten around by using Split (or Double) and OR components.
  • Circular loops are prohibited and will automatically be broken apart.
  • To see the meaning of an input or output, you can hover over it so that the status bar will change and tooltip may appear.
  • A details window will appear after clicking on the ellips (...) that exists on some modules.
  • This version of Lightning contains support for programs and scenes. Please check the Elektroda website and use Google Translate or see the example setups contained in the Lightning package.

Module list

Input

Module name Filename Source available
Audio->Audio in_audio not yet
Audio->BPMStudio in_bpmstudio not yet
Audio->Beat in_avsbeat yes
Controls->Button in_button yes
Controls->Color in_color not yet
Controls->ImageMap in_imagemap not yet
Controls->Level in_level yes
Controls->MultiButton in_multibutton yes
Controls->ScreenStick in_screenstick not yet
Controls->Switch in_switch yes
Hardware->DMX in_dmx not yet
Hardware->Joystick in_joystick not yet
Hardware->MiniJoystick in_minijoystick not yet
Hardware->ParallelPort in_parport not yet
Hardware->SerialMouse in_serialmouse not yet
Miscellaneous->NetworkClient in_networkclient yes
Miscellaneous->Pulse in_pulse not yet

Processing

Module name Filename Source available
Logic->AND proc_and not yet
Logic->AnalogDigital proc_analogdigital not yet
Logic->Gate proc_gate not yet
Logic->LargeGate proc_largegate not yet
Logic->OR proc_or not yet
Miscellaneous->Event proc_event not yet
Miscellaneous->Fade proc_fade not yet
Panels->Connection proc_connection yes
Panels->Double proc_double yes
Panels->MiniSplit proc_minisplit yes
Panels->Panel proc_panel yes
Panels->Split proc_split yes
Pulse Control->BPMPulse proc_bpmpulse not yet
Pulse Control->Beat proc_beat not yet
Pulse Control->BeatStabilize proc_beatstabilize not yet
Pulse Control->Comparator proc_comparator not yet
Pulse Control->Extend proc_extend yes
Pulse Control->Keep proc_keep yes
Pulse Control->PulseBPM proc_pulsebpm not yet
Pulse Control->Require proc_require yes
Pulse Control->TimeLimit proc_timelimit yes
Pulse Response->Counter proc_counter not yet
Pulse Response->Random proc_random not yet
Pulse Response->RandomPattern proc_randompattern not yet
Pulse Response->Switch proc_switch not yet
Spectrum Flow->AutoSelect proc_autoselect not yet
Spectrum Flow->SelectInput proc_selectinput not yet
Spectrum Flow->SelectOutput proc_selectoutput not yet
Spectrum Processing->Differentiate proc_differentiate not yet
Spectrum Processing->Invert proc_invert not yet
Spectrum Processing->Mixer proc_mixer not yet
Spectrum Processing->RunningAverage proc_runningaverage not yet
Spectrum Processing->Select proc_select not yet
Spectrum Processing->SelectMax proc_selectmax not yet
Value Processing->Blackout proc_blackout not yet
Value Processing->ChangeDetect proc_changedetect not yet
Value Processing->Chart proc_chart not yet
Value Processing->Conversion proc_conversion not yet
Value Processing->Zoom proc_zoom not yet

Output

Module name Filename Source available
Output->Hardware->DMX out_dmx yes
Output->Hardware->KeyLights out_keylights not yet
Output->Hardware->ParallelPort out_lights not yet
Output->Hardware->ParallelPortMultiplex out_deluxelights not yet
Output->Hardware->Miscellaneous->Label out_label not yet
Output->Hardware->Miscellaneous->NetworkServer out_networkserver yes
Output->Scene Control->FadeTime out_fadetime not yet
Output->Scene Control->LoadDesktop out_load not yet
Output->Scene Control->NextProgram out_nextprogram yes
Output->Scene Control->NextScene out_nextscene yes
Output->Visual->Display out_display not yet
Output->Visual->Meter out_meter not yet
Output->Visual->MiniSpectrum out_minispectrum yes
Output->Visual->MultiRGBLight out_multisoftlight not yet
Output->Visual->RGBLight out_softlight not yet
Output->Visual->Spectrum out_spectrum not yet



Frequently asked questions

Why does Lightning use separate runtime libraries (rtl70.bpl, vcl70.bpl, vclsmp70.bpl, vclx70.bpl)?

Lightning comes with a DLL for each module. With built-in runtime libraries, each DLL's size would be about 300 kB, adding up to many megabytes. With separate runtime libraries, the size of each DLL is only about 20 kB, saving much disk space.



Where does Lightning store its settings?

Lightning stores its settings in the registry key HKEY_CURRENT_USER\Software\Lightning.



Why does the program use so much CPU power?

Using the default settings, Lightning evaluates every path starting from each input module once after every 10 milliseconds. Because each signal consists of a full audio spectrum, this takes a considerable amount of processing power, growing every time the signal is split. The 10 milliseconds interval could be increased so that the program uses less CPU power, but then fades will become less accurate and time sensitive modules, like Keep, Extend and Require will suffer. Still intervals like 20 or 30 milliseconds give nice results while they greatly reduce CPU usage. On the contrary, if you have a really fast CPU (in the quad-core range), the interval could be reduced up to 1 milliseconds for smoother results.



Why do the inParallelPort, outParallelPort and outParallelPortMux modules show "Please install SmallPort driver"?

The following module caption will appear if the SmallPort driver could not be found:



Because Windows NT does not permit direct access to hardware, the SmallPort driver (smport.sys) is required in order to access parallel ports. The SmallPort driver can be installed using the Tools->Configuration dialog. Clicking any of the buttons will require elevation to administrator rights. The recommended choice is "Install (auto start)". Choosing "Install (manual start)" will disable non-administrator users from utilizing the driver. Repairing or Removing the SmallPort driver sometimes requires a system reboot.





What are the inAvsBeat module and BDetect application for?

Lightning allows for extremely customizable beat detection using modules such as StereoAudio, Select and Comparator. Sometimes this complexity is not wanted however and basic beat detection is sufficient. In such cases the BDetect tool can be handy. It will attempt to autodetect audio beats without any configuration necessary. Detection can be optimized by slightly adjusting parameters, but making big changes to parameters is not recommended. At each beat the tool will send a window message to the inAvsBeat module. The inAvsBeat module will output a pulse every time a window message is received. If there's no external source, the inAvsBeat module will never output pulses.



What are the inDMX module, outDMX module and DMXLink application for?

Rather than implementing the details of each of the hundreds available different DMX interfaces in Lightning itself, this job is left to a separate tool: DMXLink. This way Lightning can talk to the DMX interface without having to worry about implementation details. In this sense the DMXLink tool is a driver.

Lightning's dmx_out module communicates with DMXLink using window messages to set DMX channel values. DMXLink communicates with the actual hardware using proprietary protocols. An advantage of the DMXLink program being separate from Lightning is that multiple running instances of Lightning can output values to or gather values from the same DMX interface. In the future, applications other than Lightning could use DMXLink too, for example a DMX DLOP for DiscoLitez could be made.

Currently DMXLink only supports the Elektor LPT-DMX interface. In the future support will be added for additional DMX interfaces, making the tool much more useful. DMXLink will be improved with support for multiple DMX interfaces. It manages several "virtual" DMX universes. Various interfaces (DMX, MIDI, parallel, serial, ethernet) could be laid out in the virtual universes. This is the same principle as DMX fixtures that are laid out in a DMX universe using their addresses.

In the ideal world all DMX software could then use the DMXLink program, so that all programs would be compatible with eachother and with each interface. This is like porting the DMX4Linux idea to Windows.



What is LUA?

LUA is a scripting language. It can be used to create simple modules for Lightning. Scripts that comply to the Lightning format will be autodetected if placed in the same folder as Lightning. LUA modules will look and feel like normal Lightning modules, but consume more CPU power. The input to the LUA script will automatically be converted from a spectrum (1024 values in the range 0..511,9) to an average value (1 value in the range 0..511,9). The output from a LUA script module will be converted back from a value to a spectrum. Using values instead of spectrums reduces the CPU time used by LUA modules. For example scripts, see the *.lua files in the Lightning folder.

Source code

Some people requested access to Lightning's source code. Not all of its source code is ready to give away yet. New pieces of source code will be added to this page over time. All source code is for use with Borland Delphi 7.

  • All published source code is available under the terms of the Mozilla Public License.
  • As a result, any source code file can be used in any application, even proprietary closed source applications.
  • In all cases the source code of original files and modifications to them must be published.
  • The source code to neighbouring files not needs to be published.
  • It is intentionally prohibited to use the source code inside GPL and LGPL applications.

Executables
Lightning application V0.86
DMXLink application (DMX4ALL only) V0.3

Modules (user interface related)
Button Input Module for Lightning V0.86
Switch Input Module for Lightning V0.86
MultiButton Input Module for Lightning V0.86
Level Input Module for Lightning V0.86

Modules (scene related)
NextScene Output Module for Lightning V0.86
NextProgram Output Module for Lightning V0.86

Modules (time related)
Extend Process Module for Lightning V0.86
Keep Process Module for Lightning V0.86
Require Process Module for Lightning V0.86
TimeLimit Process Module for Lightning V0.86

Modules (painting related)
MiniSpectrum Output Module for Lightning V0.86

Modules (hardware related)
DMX Output Module for Lightning V0.86

Modules (sound related)
Beat Input Module for Lightning V0.86

Modules (communication related)
Network Client Input Module for Lightning V0.86
Network Server Output Module for Lightning V0.86

Modules (data routing related)
Connection Process Module for Lightning V0.86
Double Process Module for Lightning V0.86
MiniSplit Process Module for Lightning V0.86
Panel Process Module for Lightning V0.86
Split Process Module for Lightning V0.86

Delphi components (developed by third parties)
BASS audio library (free for non-commercial use)
Extended Document Object Model (Mozilla Public License)
LUA scripting engine (copyright notice must be shown)
NTKbdLites (public domain license)
SmallPort driver (public domain license)
VistaAltFix unit (public domain license)
WSockets unit (public domain license)

Creating new modules
Each Lightning module contains an "$IMAGEBASE" directive, for example: {$IMAGEBASE $41380000} This ensures that the modules are being layed out in memory in an non-overlapping way and optimizes start-up time. Please remove this directive in new modules, or use a non-overlapping address.



TODO

  • Windows 7/8/10 support
(Julian from Romania 04-04-2013)
  • TODO allow disabling SmallPort prompt dialog 64-bit parallel port support (smport.sys)
(Vadim Kuras 09-10-2008 & Dmitry P 31-03-2012 & Janek 04-12-2022)
  • Velleman VM8090 8-channel USB relay card support
(Stephen Dick 15-01-2011)

File format specification (.lit)

Lightning|<file format version (1.0)>{|Component} <number of modules> <module filename 0>|<module top>|<module left>|{<module scene id>}|<module excluded from fadetime?>|<module hidden?>|{<module color>}{,<module title>}|<reserved>|{<module specific setting>} <module filename 1> <module filename n> <module 0 number of connections> <module 0 output 1 target module index>|<module 0 output 0 target module input number> <module 0 output 2 target module index>|<module 0 output 1 target module input number> <module 0 output n target module index>|<module 0 output n target module input number> <module 1 number of connections> <module 1 output 1 target module index>|<module 1 output 1 target module input number> <module 1 output 2 target module index>|<module 1 output 2 target module input number> <module 1 output n target module index>|<module 1 output n target module input number> <module n number of connections> <module n output 1 target module index>|<module n output 1 target module input number> <module n output 2 target module index>|<module n output 2 target module input number> <module n output n target module index>|<module n output n target module input number>

File format specification (.lld)

<reserved> <program file number 0> <program file number 1> <program file number n>

File format specifications (.000 file)

<Program 000 name>|<program 000 options> <Scene 0 name>|<scene 0 options>|<scene 0 options> <Scene 0 module 0 scene id>|<Scene 0 module 0 scene data> <Scene 0 module 1 scene id>|<Scene 0 module 1 scene data> <Scene 0 module n scene id>|<Scene 0 module n scene data> <Scene 1 name>|<scene 1 options>|<scene 1 options> <Scene 1 module 0 scene id>|<Scene 1 module 0 scene data> <Scene 1 module 1 scene id>|<Scene 1 module 1 scene data> <Scene 1 module n scene id>|<Scene 1 module n scene data> <Scene n name>|<scene n options>|<scene n options> <Scene n module 0 scene id>|<Scene n module 0 scene data> <Scene n module 1 scene id>|<Scene n module 1 scene data> <Scene n module n scene id>|<Scene n module n scene data>

Source: YouTube (vamperix8)

screenshot_tomlights.pngpar38_a.pngVintage versions of Lightning

Vintage versions of Lightning