tweak clip selection

This commit is contained in:
j 2023-11-18 21:28:22 +01:00
parent 559dd46285
commit 1f14fc216d
3 changed files with 10 additions and 5 deletions

View file

@ -19,7 +19,7 @@ SYNC_JUMP_AHEAD = 1
PORT = 9067
DEBUG = False
FONT = 'Menlo'
FONT_SIZE = 32
FONT_SIZE = 30
FONT_BORDER = 4
SUB_MARGIN = 2 * 36 + 6

View file

@ -139,7 +139,7 @@ def compose(clips, target=150, base=1024, voice_over=None):
elif 'Free' in voc['src']:
a, b = '5', '-4'
elif 'Ashley' in voc['src']:
a, b = '5', '-4'
a, b = '4.5', '-4.5'
voc['filter'] = {'volume': a}
scene['audio-center']['A1'].append(voc)
vo_low = vo.copy()
@ -173,8 +173,12 @@ def compose(clips, target=150, base=1024, voice_over=None):
clip = random_choice(seq, clips, True)
if not clips:
print("not enough clips, need to reset")
clips = [c for c in all_clips if c != clip]
clips = [c for c in all_clips if c != clip and c not in used]
if not clips:
print("not enough clips, also consider used")
clips = [c for c in all_clips if c != clip]
if not clips:
print("not enough clips, also consider last clip")
clips = all_clips.copy()
if length + clip['duration'] > target and length >= vo_min:
break
@ -216,7 +220,8 @@ def compose(clips, target=150, base=1024, voice_over=None):
# 50% some transparancy, 25%, 50%, 75% levels of transparancy
transparancy = 1
# coin flip which site is visible (50% chance)
if chance(seq, 0.5):
#if chance(seq, 0.5):
if chance(seq, 0.8):
transparency_front = transparency
transparency_back = 0
else:

2
sax.py
View file

@ -39,7 +39,7 @@ noise = {
"src": nois_wav,
"duration": 3600.0,
"filter": {
"volume": "2"
"volume": "3"
},
}