From 6a6f2f1b5b6d13b3368928e0008406db2d1042c1 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 2 Oct 2017 13:47:12 +0200 Subject: [PATCH] better output --- render_gongs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/render_gongs.py b/render_gongs.py index 56a391d..2bbca62 100755 --- a/render_gongs.py +++ b/render_gongs.py @@ -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))