("b", (71, 128, 182)) # steelblue ] # ----- MAKING DATA SEQUENCES ----- r, g, b = "R", "G", "B" color_original_seq = [ b, g, b, b, b, g, r, b, b, g, r, b, b, g, b, g, g, g, g, b, r, b, r, b, r, g, r, r, r, r ] shape_original_seq = [SHAPE for i in color_original_seq] # -- Making sequence of color values and shapes -- color_seq = insert_every_second_black_frame( color_original_seq, insert_at_start=False, insert_at_end=True) # Inserting a "black" for every value in color_row shape_seq = insert_every_second_black_frame( shape_original_seq, insert_at_start=False, insert_at_end=True) # Inserting a "black" for every value in color_row # -- Durations -- base_durations = [MIN_VAL * i for i in MUL_SET] #duration_seq = [root_durations[MUL_SET_IDX] for i in range(len(color_seq))] duration_seq = [] duration_idxes = [ int(lin_interpol(beg=0.0, end=5.99999, steps=len(color_seq), i=i)) for i in range(len(color_seq)) ] for idx in duration_idxes:
IMG_CHANGE_FREQ = 1 ELEM_MINSIZE_MUL = 0.2 ELEM_MAXSIZE_MUL = 0.5 N = 10 # Number of images for each shape/color combination. FONT = '/System/Library/Fonts/Menlo.ttc' FONT_SIZE = 84 # ----- DATA SEQUENCES ----- text_seq = ["A", "B"*2, "C"*3, "a\nc", "\nv"] text_seq = ["HEI DER", "DETTE ER FØRSTE FORSØK", "NÅ TAR DET AV!", "\nHIYAH!!!", "SE \nHVOR DET GÅR?"] duration_seq = [0.5] text_seq = insert_every_second_black_frame(text_seq) duration_seq = check_and_adjust_list_length(ref_list=text_seq, adj_list=duration_seq) # Returns the two lists as tuple # -------------------- END INSERT -------------------- # ----- MAKING ABS_SEQ AND FRAME_SEQ ----- # Making absolute sequence: abs_sequence = generate_abs_text_seq(duration_seq=duration_seq, text_seq=text_seq, header_framerate=30) # Rendering to frame_sequence frame_sequence = render_text_frame_sequence(abs_sequence) # ----- MAKING BASIS IMAGES -------