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 9f2d7ae commit 1cb3f37
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions machineatubes/tube.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,15 @@ def play(self, window=False, verbose=False):
print(b)
nanosleep( ( 60 / self.bpm ) )
videoend.clear()
self.stop()
self.applause()
time.sleep(2)
Tube.window.evaluate_js('gooutro("%s")' % get_outro_video())
print("END")
videoend.wait(60)
time.sleep(5)
self.stop()

self.playing = False

def setbpm(self):
Expand All @@ -220,12 +224,20 @@ def stop(self):
out.send_noteon(0, 12, 127)
time.sleep(0.2)
out.send_noteoff(0, 12)

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

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

def mix_videos(self):
path = Path(str(self.bpm)) / self.infos["style"] / self.style_flavor
videos = getsongvideos(path)
Expand Down

0 comments on commit 1cb3f37

Please sign in to comment.