aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 76cac9174a2ad64649472ef9d40fcabcc4377726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Starlet: Stage lighting control in Lisp
=======================================

Starlet is an experimental Lisp-based domain-specific language (DSL) for theatrical lighting control.  It's based on [Guile](https://www.gnu.org/software/guile/) and sends its DMX output via [OLA](https://openlighting.org) to almost any type of lighting control interface - DMX, sACN, Art-Net etc.  Starlet also undertands MIDI, enabling you to control lights and cues with physical faders, knobs and buttons.

[![Video demonstration](screenshot.png)](https://vimeo.com/520547229)

Click the screenshot for a video demonstration!

With Starlet, a cue list looks like this:

```
(define my-cue-list
  (cue-list

   (cue 1
        (lighting-state (at dim1 '100))
                        (at mh1 'pan 25))
        #:fade-up 3
        #:fade-down 5)

   (cue 2
        (lighting-state (at dim1 '50)
                        (at dim2 '100)
                        (at mh1 'pan 50))
        #:fade-up 3
        #:fade-down 1
        #:down-delay 3)

   (cue 3
        (lighting-state #f)  ; blackout
        #:fade-down 2
```

Creating a playback object and running a cue list looks like this:

```
(define pb (make-playback my-cue-list))

(cut-to-cue-number! pb 1)
(go! pb)
(go! pb)
(go! pb)  ; and so on
```

Lighting states can be prepared separately and assigned to variables:

```
(define spooky-dungeon
  (lighting-state
    (at dimmer1 20)
    (at dimmer2 20)
    (at moving-light 70)
    (at moving-light 'red 100)
    (at moving-light 'green 10)
    (at moving-light 'blue 12)))
```

You can use pre-prepared states in cues, even if some minor modifications are needed.  This makes it really easy to understand the contents of a cue without having to interpret a screenful of numbers:

```
(cue 57
     (lighting-state (apply-state spooky-dungeon)
                     (at follow-spot 100))
     #:fade-up 3
     #:fade-down 3)
```

Multi-part cues are supported.  Simply specify the fade parameters and which fixtures should be in the part:

```
(cue 64
     (lighting-state (apply-state indoor-act1-general)
     #:fade-up 3
     #:fade-down 3

     (cue-part (dim3
                dim4
                dim8
                (list moving-light 'pan 'tilt))
               #:down-time 2
               #:down-delay 1))
```


Everything from a simple dimmers to wacky multi-parameter fixtures are supported.  New fixture classes can be defined using some simple Scheme code.  Patching fixtures looks like this:

```
(patch-fixture! dimmer1 <generic-dimmer> 1))
(patch-fixture! dimmer2 <generic-dimmer> 3))
(patch-fixture! balcony-backlight1 <generic-dimmer> 18))
(patch-fixture! balcony-backlight2 <generic-dimmer> 19))
(patch-fixture! footlights <generic-dimmer> 23))
;; Universe numbering starts at zero, matching OLA
(patch-fixture! moving-light <robe-dl7s-mode1> 1 #:universe 4))
```

Note that the names of the fixtures are just normal Scheme variables.  They can be anything you like, and you're encouraged to make the names more descriptive than logical channel numbers, where appropriate.

Getting started
---------------

1. Install and set up [OLA](https://openlighting.org) for your lighting environment.
2. Start olad if it's not already running: `olad &`
3. Install [Guile](https://www.gnu.org/software/guile/), if it's not already
   there (there's a good chance it is).  Version 3 is preferred because it's
   much faster (= ability to handle more fixtures with less CPU load), but
   version 2.2 works as well.  You will need the development packages (C header
   files) as well.
4. Run `meson build`, `ninja -C build` and `sudo ninja -C build install`.
5. Run `guile -L /path/to/starlet/guile`
6. Once in the Guile REPL, import the Starlet modules: `(use-modules (starlet base) (starlet playback) (starlet fixture-library generic))`
7. Patch a fixture with `(patch-fixture! fix <generic-dimmer> 1 #:universe 2)` - replace 1 and 2 with the DMX address and universe (respectively) of a real dimmer.
8. Turn the dimmer on with `(at fix 100)`
9. Look in the _examples_ folder for more advanced ideas.


Related projects
----------------

There are many stage lighting software projects, but most of them seem to concentrate on "disco style" effects and chases whereas Starlet is aimed more towards theatre shows.  Here are some that I found especially interesting:


* [Fivetwelve-CSS](https://github.com/beyondscreen/fivetwelve-css) DMX lighting control using CSS. [Watch this video](https://www.youtube.com/watch?v=ani_MOZt5_c)
* [Afterglow](https://github.com/Deep-Symmetry/afterglow) Clojure live coding environment using OLA
* [QLC+](https://qlcplus.org/) the most popular open-source lighting control program

It's also worth taking a look at the [stage-lighting topic](https://github.com/topics/stage-lighting) on Github.


Licence
-------

Starlet is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

Starlet is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
Starlet.  If not, see <http://www.gnu.org/licenses/>.