better output

This commit is contained in:
j 2017-10-02 13:47:12 +02:00
parent 4fd7f15a97
commit 6a6f2f1b5b

View file

@ -6,6 +6,7 @@ import subprocess
from collections import defaultdict
import string
from glob import glob
import time
import nmt
import numpy as np
@ -106,7 +107,7 @@ def mix_gongs(data, output):
mixed = mixed[:limit]
track = track[:limit]
mixed += track.astype(np.int)
print(n)
#print(n)
d = np.sqrt(len(data))
while \
@ -123,7 +124,9 @@ if __name__ == '__main__':
duration = float(sys.argv[2]) + 10
tracks = int(sys.argv[3])
output = sys.argv[4]
t0 = time.time()
data = get_gongs(seq, {}, duration, tracks)
mix_gongs(data, output)
with open(output + '.json', 'w') as fd:
json.dump(result, fd, indent=4, sort_keys=True)
print('render_gongs of %s took %s' % (output, time.time()-t0))