Skip to content

Commit

Permalink
update and remove stop all
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien Bron authored and Bastien Bron committed Sep 21, 2023
1 parent fe00d79 commit 9f2d7ae
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 15 deletions.
4 changes: 2 additions & 2 deletions borne/p1.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
}



/*
$json .='{
"beat": '.($measure * 4).',
"note": '.$stopall.',
"duration": 4
}
]
},';

*/
?>
14 changes: 12 additions & 2 deletions machineatubes/tube.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ def stop(self):
time.sleep(0.2)
out.send_noteoff(0, 12)

def applause(self):
out.send_noteon(0, 12, 127)
time.sleep(0.2)
out.send_noteoff(0, 12)

def mix_videos(self):
path = Path(str(self.bpm)) / self.infos["style"] / self.style_flavor
videos = getsongvideos(path)
Expand Down Expand Up @@ -251,7 +256,7 @@ def get_intro_video(self, id):
retry = 10
while retry > 0:
print("getting d-id %s" % url)
time.sleep(2)
time.sleep(3)
response = requests.get(url, headers=headers)

pprint.pprint(response.json(), indent=4)
Expand All @@ -260,7 +265,12 @@ def get_intro_video(self, id):

if response.get("result_url"):
print("result ok from d-id !")
self.infos["intro_video_url"] = response.get("result_url")
video_url = response.get("result_url")
response = requests.get(video_url)
pprint.pprint(response.__dict__, indent=4)
if response.status_code == 200:
self.infos["intro_video_url"] = video_url

if self.playing is False:
Tube.window.evaluate_js('loaded()')
break
Expand Down
Binary file modified ui/assets/img/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 29 additions & 11 deletions ui/machine.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
flex-direction: column;
color: #AAF9D9;
background-color: #5000FF;
padding: 20px;

}

#titre #grostitre{
Expand Down Expand Up @@ -125,10 +125,10 @@
margin-right: auto;
}

#video .cadre video#dedicacevideo{
#video .rotated{
position: absolute;
transform-origin: 50% 50%;
transform: rotate(-90deg) scale(1.79);
transform: rotate(-90deg) scale(1.82);
height: 100%;
width: 100%;
}
Expand All @@ -142,7 +142,7 @@
font-family: 'NippDo-580';
color: #5000FF;
background-color: #AAF9D9;
padding: 3vh;

}

#infos .header{
Expand All @@ -152,6 +152,8 @@
line-height: 70%;
padding-top: 10px;
padding-bottom: 10px;
margin-left: 3vh;
margin-right: 3vh;
}

#infos .header::before{
Expand Down Expand Up @@ -186,6 +188,10 @@
font-weight: 700;
text-transform: uppercase;
border: 3px solid #5000FF;
padding-left: 10px;
padding-right: 10px;
margin-left: 3vh;
margin-right: 3vh;
}

#infos .footer{
Expand All @@ -211,9 +217,21 @@
z-index: 10000;
}

.sleep img, .loading img{
.sleep img, .loading img, .jingle img{
margin-left: auto;
margin-right: auto;
max-width: 100%;
max-height: 100%;
}

.vertical .jingle img{
transform-origin: 50% 50%;
transform: rotate(90deg) scale(1.80);
}

#video video.full{
max-width: 100%;
border: 0;
}

</style>
Expand All @@ -228,7 +246,7 @@
</div>
<div class="screen vertical" id="infos" >
<div class="sleep"><img src="assets/img/logoinfos.png"></div>
<div class="loading"><img src="assets/img/intro_portrait.gif"></div>
<div class="loading"><img src="assets/img/loading.gif"></div>
<div class="jingle"><img src="assets/img/intro_portrait.gif"></div>
<!-- <div id="infologo"><img src="assets/img/logoinfos.png"></div> -->
<div id="infonum">tube #57</div>
Expand Down Expand Up @@ -258,11 +276,11 @@
</div>
<div class="screen" id="video">

<div class="sleep"><img src="assets/img/logoinfos.png"></div>
<div class="loading"><img src="assets/img/loading.gif"></div>
<video id="introvideo" style="display:none;" ></video>
<video id="dedicacevideo" style="display:none;"></video>
<video id="outrovideo" src="assets/videos/machine/outro/outro_1.mp4" autoplay loop muted ></video>
<div class="sleep"><img src="assets/img/logoinfos_90.png"></div>
<div class="loading"><img src="assets/img/loading_90.gif"></div>
<video id="introvideo" class="full" style="display:none;" ></video>
<video id="dedicacevideo" class="rotated" style="display:none;"></video>
<video id="outrovideo" style="display:none;" ></video>
</div>
</div>
</body>
Expand Down

0 comments on commit 9f2d7ae

Please sign in to comment.