From 4eee17e768a2f7dd93cac4b44dfe72d7243e320d Mon Sep 17 00:00:00 2001 From: jpunkt Date: Tue, 25 Jan 2022 20:20:20 +0100 Subject: [PATCH] New dummy storyboard to test video post-processing. --- pizzactrl/sb_dummy.py | 50 ++++++++----------------------------------- 1 file changed, 9 insertions(+), 41 deletions(-) diff --git a/pizzactrl/sb_dummy.py b/pizzactrl/sb_dummy.py index d8b60a4..788a806 100644 --- a/pizzactrl/sb_dummy.py +++ b/pizzactrl/sb_dummy.py @@ -1,47 +1,15 @@ +from fileinput import filename from pizzactrl import fs_names from pizzactrl.storyboard import * STORYBOARD = Storyboard( - Chapter( # Chapter 0 - Do(Activity.PARALLEL, - activities = [ - Do(Activity.ADVANCE_UP, steps=30), - Do(Activity.LIGHT_BACK, r=0, g=0, b=0, w=1.0, fade=1.0), - ]), - Do(Activity.WAIT_FOR_INPUT, - on_blue=Select(Option.CONTINUE), - on_red=Select(Option.REPEAT)), - Do(Activity.LIGHT_BACK) # Fade out - ), - Chapter( # Chapter 1 - Do(Activity.PARALLEL, - activities = [ - Do(Activity.LIGHT_FRONT, r=1.0, fade=2.0), - Do(Activity.ADVANCE_LEFT, steps=50), - Do(Activity.ADVANCE_UP, steps=25) - ]), - Do(Activity.WAIT_FOR_INPUT, - on_blue=Select(Option.CONTINUE), - on_red=Select(Option.REPEAT), - on_yellow=Select(Option.GOTO, chapter=0), - on_green=Select(Option.QUIT)), - Do(Activity.LIGHT_FRONT) # Fade out - ), - Chapter( # Chapter 2 - Do(Activity.LIGHT_BACK, b=1., fade=2.0), - Do(Activity.ADVANCE_LEFT, steps=-50), - Do(Activity.ADVANCE_UP, steps=-20), - Do(Activity.LIGHT_BACK) - ), - Chapter( # Chapter 3 - Do(Activity.LIGHT_FRONT, r=1., g=1., fade=2.0), - Do(Activity.ADVANCE_LEFT, steps=50), - Do(Activity.ADVANCE_UP, steps=50), - Do(Activity.LIGHT_FRONT, fade=5.0), - Do(Activity.WAIT_FOR_INPUT, - on_blue=Select(Option.CONTINUE), - on_red=Select(Option.REPEAT), - on_yellow=Select(Option.GOTO, chapter=0), - on_green=Select(Option.QUIT)) + Chapter( + Do(Activity.PLAY_SOUND, + sound=fs_names.SFX_REC_AUDIO), + Do(Activity.RECORD_VIDEO, + filename=fs_names.RecFile('my_video.h264'), + duration=10), + Do(Activity.PLAY_SOUND, + sound=fs_names.SFX_STOP_REC) ) )