better output
This commit is contained in:
parent
4fd7f15a97
commit
6a6f2f1b5b
1 changed files with 4 additions and 1 deletions
|
@ -6,6 +6,7 @@ import subprocess
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
import string
|
import string
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
import time
|
||||||
|
|
||||||
import nmt
|
import nmt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -106,7 +107,7 @@ def mix_gongs(data, output):
|
||||||
mixed = mixed[:limit]
|
mixed = mixed[:limit]
|
||||||
track = track[:limit]
|
track = track[:limit]
|
||||||
mixed += track.astype(np.int)
|
mixed += track.astype(np.int)
|
||||||
print(n)
|
#print(n)
|
||||||
|
|
||||||
d = np.sqrt(len(data))
|
d = np.sqrt(len(data))
|
||||||
while \
|
while \
|
||||||
|
@ -123,7 +124,9 @@ if __name__ == '__main__':
|
||||||
duration = float(sys.argv[2]) + 10
|
duration = float(sys.argv[2]) + 10
|
||||||
tracks = int(sys.argv[3])
|
tracks = int(sys.argv[3])
|
||||||
output = sys.argv[4]
|
output = sys.argv[4]
|
||||||
|
t0 = time.time()
|
||||||
data = get_gongs(seq, {}, duration, tracks)
|
data = get_gongs(seq, {}, duration, tracks)
|
||||||
mix_gongs(data, output)
|
mix_gongs(data, output)
|
||||||
with open(output + '.json', 'w') as fd:
|
with open(output + '.json', 'w') as fd:
|
||||||
json.dump(result, fd, indent=4, sort_keys=True)
|
json.dump(result, fd, indent=4, sort_keys=True)
|
||||||
|
print('render_gongs of %s took %s' % (output, time.time()-t0))
|
||||||
|
|
Loading…
Reference in a new issue