This commit is contained in:
Moritz Ruth 2023-06-13 14:12:13 +02:00
parent 5937101784
commit 82ba246bab
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
5 changed files with 149 additions and 16 deletions

View file

@ -37,5 +37,5 @@ suspend fun main() = coroutineScope {
suspend fun test() = coroutineScope {
bar.brightness.static(100.percent)
bar.color.fadeRandomAround(0.degrees, 360.degrees, 5.seconds)
bar.color.fadeRandomAround(245.degrees, 180.degrees, 5.seconds)
}

View file

@ -84,9 +84,7 @@ fun ShowBuilderContext.fourthAct() = act("Vierter Akt") {
}
}
step(StepCue.MusicStart("Schau-mich-an-Tanz", 10.minutes)) {
// TODO: Song
}
// Schau-mich-an-Tanz entfällt
}
scene("Szene 2") {
@ -147,6 +145,7 @@ fun ShowBuilderContext.fourthAct() = act("Vierter Akt") {
rightSpotTarget = null
onRun {
FrontLights.all.forEach { it.brightness.off(3.seconds) }
spotRight.brightness.off(3.seconds)
// Vorhang ist hier noch zu
@ -160,16 +159,20 @@ fun ShowBuilderContext.fourthAct() = act("Vierter Akt") {
step(StepCue.MusicStart("Probenatmosphäre", 10.minutes)) {
actors {
+"David"
// mehr
}
curtainState = CurtainState.OPEN
onRun {
FrontLights.all.forEach { it.brightness.fade(75.percent, 8.seconds) }
bar.color.static(Color(50.degrees, 20.percent))
bar.brightness.sine(6.seconds)
}
}
lightStep(StepCue.Custom("Schlagzeug spielt schneller")) {
bar.color.fadeRandomAround(245.degrees, 180.degrees, 5.seconds)
}
}
scene("Szene 4") {
@ -196,11 +199,15 @@ fun ShowBuilderContext.fourthAct() = act("Vierter Akt") {
sideLight.color1.fade(Color(190.degrees, 75.percent), 45.seconds)
sideLight.color3.fade(Color(320.degrees, 75.percent), 45.seconds)
sideLight.color4.fade(Color(320.degrees, 100.percent), 45.seconds)
sideLight.color4.fade(Color(320.degrees, 100.percent, 0.percent), 20.seconds) // off
}
}
lightStep(StepCue.MusicStart("Wenn Du da bist (Duett)", 3.minutes + 45.seconds)) {
spotLeft.brightness.fade(25.percent, 10.seconds)
spotRight.brightness.fade(25.percent, 10.seconds)
Washs.both.forEach { it.brightness.fade(75.percent, 15.seconds) }
}
@ -237,11 +244,119 @@ fun ShowBuilderContext.fourthAct() = act("Vierter Akt") {
step(StepCue.MusicStart("Richy", 3.minutes)) {
onRun {
Washs.both.forEach {
Washs.both {
it.magenta.static(0.percent)
it.pointAtCeiling()
it.beamAngle.fade(100.percent, 20.seconds, start = 0.percent)
it.brightness.fade(100.percent, 10.seconds)
}
// TODO: Song
FrontLights.all { it.brightness.fade(0.percent, 30.seconds) }
}
}
lightStep(StepCue.Text("Mädchen", "Ach, ist es nicht fürchterlich")) {
Washs.both.forEach {
it.pointAtGuests()
it.brightness.off(1.seconds)
}
}
// 0:40
lightStep(StepCue.Custom("Schlagzeug-Einsatz")) {
Washs.both.forEach {
it.brightness.static(100.percent)
it.strobeSpeed.static(50.percent)
}
}
lightStep(StepCue.Custom("Nächster Takt-Anfang")) {
Washs.both.forEach {
it.strobeSpeed.static(0.percent)
it.pointAtCeiling()
}
Washs.left.colorWheelMode.static(CoemarProWash.ColorWheelMode.Rotate(30.percent, false))
Washs.right.colorWheelMode.static(CoemarProWash.ColorWheelMode.Rotate(30.percent, true))
}
// 1:00
lightStep(StepCue.Custom("Crash-Becken")) {
Washs.both.forEach { it.brightness.off(200.milliseconds) }
}
lightStep(StepCue.Custom("+2 Takte")) {
bar.brightness.sine(4.seconds, 20.percent, 50.percent)
bar.color.static(Color(40.degrees, 25.percent))
Washs.both {
it.brightness.fade(100.percent, 200.milliseconds)
it.beamAngle.sine(4.seconds, start = 100.percent)
}
}
// 1:24
lightStep(StepCue.Custom("Crash-Becken")) {
Washs.both { it.brightness.off(200.seconds) }
}
lightStep(StepCue.Custom("+1 Takt")) {
Washs.both {
it.pointAtGuests()
it.beamAngle.fade(100.percent, 500.milliseconds)
it.colorWheelMode.static(CoemarProWash.ColorWheelMode.WarmWhite)
}
}
lightStep(StepCue.Custom("Schlagzeug-Einsatz")) {
Washs.both {
it.brightness.static(100.percent)
it.strobeSpeed.static(50.percent)
}
}
// 1:28
lightStep(StepCue.Custom("Nächster Takt-Anfang")) {
Washs.both {
it.brightness.pulseOnce(200.milliseconds, 1.seconds)
it.strobeSpeed.static(0.percent)
}
bar.brightness.pulseOnce(200.milliseconds, 1.seconds)
}
// 1:51
lightStep(StepCue.Custom("Schlagzeug-Einsatz")) {
Washs.both {
it.brightness.static(100.percent)
it.strobeSpeed.static(50.percent)
}
}
lightStep(StepCue.Custom("Nächster Takt-Anfang")) {
Washs.both {
it.strobeSpeed.static(0.percent)
it.pointAtCeiling()
}
Washs.left.colorWheelMode.static(CoemarProWash.ColorWheelMode.Rotate(30.percent, false))
Washs.right.colorWheelMode.static(CoemarProWash.ColorWheelMode.Rotate(30.percent, true))
}
lightStep(StepCue.Custom("Hi-Hat-Kuppe wird malträtiert")) {
bar.brightness.sine(2.seconds, 20.percent, 50.percent)
}
lightStep(StepCue.Custom("Breakdown am Ende")) {
bar.brightness.fade(100.percent, 200.milliseconds)
bar.color.fade(Color(0.degrees), 200.milliseconds)
FrontLights.all { it.brightness.off() }
Washs.both { it.brightness.off(200.milliseconds) }
launch {
delay(200)
Washs.both { it.colorWheelMode.static(CoemarProWash.ColorWheelMode.WarmWhite) }
}
}
@ -249,7 +364,9 @@ fun ShowBuilderContext.fourthAct() = act("Vierter Akt") {
curtainState = CurtainState.CLOSED
onRun {
FrontLights.all.forEach { it.brightness.off(3.seconds) }
bar.brightness.pulseOnce(200.milliseconds, 1.seconds)
FrontLights.all { it.brightness.pulseOnce(0.milliseconds, 3.seconds) }
Washs.both { it.brightness.pulseOnce(0.milliseconds, 1.seconds) }
}
}
}

View file

@ -236,7 +236,7 @@ fun ShowBuilderContext.thirdAct() = act("Dritter Akt") {
lightStep(StepCue.Custom("Schlagzeug-Einsatz")) {
Washs.both.forEach {
it.brightness.static(100.percent)
it.strobeSpeed.static(50.percent) // TODO: Mit dem Schlagzeug matchen
it.strobeSpeed.static(50.percent)
}
}
@ -281,7 +281,7 @@ fun ShowBuilderContext.thirdAct() = act("Dritter Akt") {
lightStep(StepCue.Custom("Schlagzeug-Einsatz")) {
Washs.both.forEach {
it.brightness.static(100.percent)
it.strobeSpeed.static(50.percent) // TODO: Mit dem Schlagzeug matchen
it.strobeSpeed.static(50.percent)
}
}

View file

@ -1,12 +1,13 @@
package de.moritzruth.lampenfieber.device
import de.moritzruth.theaterdsl.device.DeviceGroup
import de.moritzruth.theaterdsl.dmx.DmxAddress
import kotlinx.collections.immutable.persistentSetOf
object FrontLights {
val left = listOf(SimpleDimmer(DmxAddress(1u)), SimpleDimmer(DmxAddress(2u)))
val center = listOf(SimpleDimmer(DmxAddress(4u)), SimpleDimmer(DmxAddress(5u)))
val right = listOf(SimpleDimmer(DmxAddress(7u)), SimpleDimmer(DmxAddress(8u)))
val left = DeviceGroup(SimpleDimmer(DmxAddress(1u)), SimpleDimmer(DmxAddress(2u)))
val center = DeviceGroup(SimpleDimmer(DmxAddress(4u)), SimpleDimmer(DmxAddress(5u)))
val right = DeviceGroup(SimpleDimmer(DmxAddress(7u)), SimpleDimmer(DmxAddress(8u)))
val all = left + center + right
}
@ -22,7 +23,7 @@ object Tops {
object Washs {
val left = CoemarProWash(DmxAddress(101u), false)
val right = CoemarProWash(DmxAddress(85u), true)
val both = listOf(left, right)
val both = DeviceGroup(left, right)
}
val bar = StairvilleTlb(DmxAddress(130u))

View file

@ -2,7 +2,9 @@ package de.moritzruth.theaterdsl.device
import de.moritzruth.theaterdsl.dmx.DmxAddress
import de.moritzruth.theaterdsl.dmx.DmxDataWriter
import kotlinx.collections.immutable.ImmutableCollection
import kotlinx.collections.immutable.ImmutableSet
import kotlinx.collections.immutable.toImmutableSet
interface Device {
val dvs: ImmutableSet<DynamicValue<*>>
@ -10,4 +12,17 @@ interface Device {
val firstChannel: DmxAddress
val numberOfChannels: UInt
fun writeDmxData(writer: DmxDataWriter)
}
@JvmInline
value class DeviceGroup<T : Device> private constructor(val devices: ImmutableSet<T>) : ImmutableSet<T> by devices {
operator fun invoke(block: (T) -> Unit) {
devices.forEach(block)
}
operator fun plus(other: ImmutableCollection<T>) = DeviceGroup<T>((other + devices).toImmutableSet())
companion object {
operator fun <T : Device> invoke(vararg devices: T) = DeviceGroup(devices.toSet().toImmutableSet())
}
}