Added sound to mark when animation finishes

This commit is contained in:
Grant Sanderson
2016-08-21 09:49:00 -07:00
parent 3ff889e584
commit 3391e645d7
3 changed files with 139 additions and 23 deletions

View File

@ -7,6 +7,7 @@ import random
import inspect
import string
import re
import os
from scipy import linalg
from constants import *
@ -14,6 +15,26 @@ from constants import *
CLOSED_THRESHOLD = 0.01
STRAIGHT_PATH_THRESHOLD = 0.01
def play_chord(*nums):
commands = [
"play",
"-n",
"-c1",
"synth",
] + [
"sin %-"+str(num)
for num in nums
] + [
"fade h 0.5 1 0.5"
]
try:
os.system(" ".join(commands))
except:
pass
def play_finish_sound():
play_chord(12, 9, 5, 2)
def get_smooth_handle_points(points):
num_handles = len(points) - 1
dim = points.shape[1]