exp
This commit is contained in:
parent
000ab611ea
commit
a37e64e34d
1 changed files with 18 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
|||
import os
|
||||
import numpy as np
|
||||
import librosa
|
||||
import random
|
||||
import math
|
||||
from scipy.interpolate import interp1d
|
||||
import matplotlib.pyplot as plt
|
||||
|
@ -47,8 +48,11 @@ def f(t):
|
|||
def sig(x):
|
||||
return 1/(1 + np.exp(-12*(x-0.431)))
|
||||
|
||||
strength_min = 0.2
|
||||
strength_max = 0.8
|
||||
def transformXYrandom(x):
|
||||
return random.random()*10*x-5;
|
||||
|
||||
strength_min = 0.6
|
||||
strength_max = 0.99
|
||||
|
||||
|
||||
# Assuming that into "generated" directoruy U've already create "project_name" subfolder
|
||||
|
@ -96,15 +100,26 @@ c = interp1d([cent.min(), cent.max()], [-0.5, 0.5])
|
|||
|
||||
# Creating the sctipt file (the real unique aoutput of this script)
|
||||
try:
|
||||
print("")
|
||||
print("------RMS---------")
|
||||
print("")
|
||||
|
||||
for frame in range(len(rms[0])):
|
||||
print(str(frame) + ":(" + str(1-m(trms[frame])) + "),", end="")
|
||||
|
||||
print("")
|
||||
print("---------------")
|
||||
print("-------CENTROIDS--------")
|
||||
print("")
|
||||
|
||||
for frame in range(cent.size):
|
||||
print(str(frame) + ":(" + str(cent[0][frame]) + "),", end="")
|
||||
|
||||
print("")
|
||||
print("-----TRANSFORM----------")
|
||||
print("")
|
||||
|
||||
for frame in range(cent.size):
|
||||
print(str(frame) + ":(" + str(transformXYrandom(1)) + "),", end="")
|
||||
except:
|
||||
print(exception)
|
||||
|
||||
|
|
Loading…
Reference in a new issue