Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions scripts/show/director.gd
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ var _blk_start := 0 # the bar the block began on
var _blk_len := 8 # its length in bars
var _blk_index := 0
var _blk_section := ""
var _seq_step := -1
var _seq_bar := -1
var _seq_env := [0.0, 0.0, 0.0, 0.0] # the hits of the lanes, falling away between them
var seq_gain := [1.0, 1.0, 1.0, 1.0] # what each lane does to the light now: 1 when nothing, down to 1 - depth between hits
var seq_text := ""
var _multi_was := false
var _head_recent: Array = [] # the head looks that played last (Raw / Deep / Hypnotic does not repeat them at once)
Expand Down Expand Up @@ -312,10 +309,9 @@ func _stack(look: Array, tier: String) -> Array:

# The sequencer, once a frame: the bar line and the step of the beat grid, a new block on its first bar (and with it a
# new scene, and another every eight bars of a long block), and the hits of each lane. The depth of a hit is 45%; with gentle strobes quarter notes and 20%.
func _sequence(dt: float, grid: float, sec: String) -> void:
func _sequence(_dt: float, grid: float, sec: String) -> void:
var salt := hash("%s:%s:%d" % [genre, title, _palette])
var bar := floori(grid / 4.0)
var step := floori(grid * 4.0)
if bar < _blk_start or bar >= _blk_start + _blk_len or sec != _blk_section:
var first := _blk_section == "" or bar < _blk_start
_blk_index = 0 if first else _blk_index + 1
Expand All @@ -324,17 +320,6 @@ func _sequence(dt: float, grid: float, sec: String) -> void:
_blk_len = LightSequencer.length_for(sec, _blk_index, salt)
# Scenes change with the passage (passage.gd), not with every block: the block only keeps the grid.
_seq_bar = bar
if step != _seq_step:
_seq_step = step
for lane in LightSequencer.LANES:
if LightSequencer.hit(LightSequencer.pattern(lane, _blk_index, bar - _blk_start, _blk_len, safe, salt), step): _seq_env[lane] = 1.0
var depth := 0.2 if safe else 0.45
for lane in LightSequencer.LANES:
_seq_env[lane] *= exp(-dt * 5.0)
var mask := LightSequencer.pattern(lane, _blk_index, bar - _blk_start, _blk_len, safe, salt)
if not safe and lane == 2 and mask in [0x5555, 0xFFFF]:
seq_gain[lane] = 0.25 + 0.75 * LightSequencer.pulse(mask, grid)
else: seq_gain[lane] = 1.0 - depth + depth * _seq_env[lane]
seq_text = "bar %d of %d · block %d" % [bar - _blk_start + 1, _blk_len, _blk_index + 1]

# Where a beam may be aimed: inside the hall. The moves scale with the distance of their target, so a combination of a far
Expand Down Expand Up @@ -733,7 +718,6 @@ func _direct(dt: float) -> void:
_pending = {}

if _multi() and not brk: _sequence(dt, sig.phase_clock, sec)
else: seq_gain = [1.0, 1.0, 1.0, 1.0]

# One passage at a time: a new one is a new scene, and the room, the bars and the episodes follow it.
if not mood.flow and passage.update(sig.phase_clock, sec, ev.drop, tune.groups, "%s:%s" % [genre, title]):
Expand Down
10 changes: 4 additions & 6 deletions tools/test_choreography.gd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func _run() -> void:
var head_looks := {}
var combos := {}
var block_lengths := {}
var lowest_gain := 1.0
var wash_sum := 0.0
var wash_n := 0
var most_hues := 0
Expand Down Expand Up @@ -83,7 +82,6 @@ func _run() -> void:
head_looks[show.head_name] = true
if not breaking:
block_lengths[show._blk_len] = true
lowest_gain = minf(lowest_gain, minf(minf(show.seq_gain[0], show.seq_gain[1]), minf(show.seq_gain[2], show.seq_gain[3])))
combos[show.head_name + " | " + show.stack_name] = true
if listen.section in ["groove", "peak"] and b > 40.0:
for fixture in rig.fixtures:
Expand All @@ -100,7 +98,7 @@ func _run() -> void:
measured += 1
var result := {"mean_lit": total / measured, "min_lit": minimum, "max_lit": maximum,
"dark_frames": dark, "frames": measured, "looks": looks.size(), "formations": spaces.size(), "longest_rest_beats": longest_rest,
"head_looks": head_looks.size(), "combos": combos.size(), "block_lengths": block_lengths.keys().size(), "lowest_gain": lowest_gain, "wash_mean": wash_sum / maxf(1.0, wash_n), "most_hues": most_hues}
"head_looks": head_looks.size(), "combos": combos.size(), "block_lengths": block_lengths.keys().size(), "wash_mean": wash_sum / maxf(1.0, wash_n), "most_hues": most_hues}
results[genre] = result
print(genre, " ", JSON.stringify(result))
var row_count := rig.fixtures.filter(func(f): return f.group == "front").size()
Expand All @@ -119,11 +117,11 @@ func _run() -> void:
if genre == raw_genre and (result.combos < result.head_looks or result.wash_mean > 0.75 * results["techno-peak-time-driving"].wash_mean):
printerr("Raw / Deep / Hypnotic stack or wash contract failed: ", JSON.stringify(result))
failed = true
# ...played by the light sequencer: blocks of several lengths, and the lanes pulse on the grid.
if genre == raw_genre and (result.block_lengths < 2 or result.lowest_gain > 0.7):
# ...held in sequencer blocks of several lengths.
if genre == raw_genre and (result.block_lengths < 2):
printerr("Raw / Deep / Hypnotic sequencer contract failed: ", JSON.stringify(result))
failed = true
if genre != raw_genre and (result.lowest_gain != 1.0 or result.block_lengths > 1):
if genre != raw_genre and (result.block_lengths > 1):
printerr("Another genre is sequenced: ", genre, " ", JSON.stringify(result))
failed = true
# Each genre keeps its figures and can play several spatial combinations per figure.
Expand Down
Loading