Igor Babkin
Igor   Evansville, Indiana, United States
 
 


目前離線
藝術作品展示欄
big bruh
cac etat ːzvezdochkaː[h1]
:zvezdochka:


import numpy as np
import wave

class Compressor:
def compress_clip(self, data, num_samples, threshold, ratio, attack, release):
"""
Compress clip.
Parameters:
self: self parameter for when this function is called from inside AudioThreadWithBuffer
data: file data (numpy array)
num_samples: parameter for number of samples to take from the buffer
threshold: parameter beyond which to compress.
attack: parameter how quickly the compression starts, right away to delayed
release: parameter how quickly the compression fades, right away to delayed
ratio: how much compression
Returns: Audio for AudioThreadWithBuffer with compressed content.
"""

data = data.astype(np.int32, casting='safe')
if not data:
return []
# Take the last num_samples of data.
sample_data = data[-num_samples:]
amplitude = np.sqrt(np.mean(sample_data ** 2))
diff = amplitude - threshold
scaling_factor = (threshold + diff/ratio) / amplitude
return [d * scaling_factor for d in data]

if __name__ == '__main__':
f = wave.open()































開放交易的物品
352
擁有物品
136
完成交易
111
市集交易次數
No ITEM for trade
im 10 2017 年 10 月 7 日 下午 7:37 
+rep great guy bought me 2 games 👌👌
IIRRYY 2017 年 9 月 23 日 下午 1:56 
123 2017 年 8 月 22 日 下午 3:59 
+rep great fast trader :)
slyme Trading 2017 年 7 月 16 日 下午 12:04 
+rep fast, easy trade
f1x 2017 年 7 月 16 日 上午 11:51 
+rep good trade with butt plugs
AaronAimZ 2017 年 7 月 15 日 下午 1:27 
+rep good CH