Evansville, Indiana
Igor   Evansville, Indiana, United States
 
 


Currently Offline
Artwork Showcase
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()































Items Up For Trade
352
Items Owned
136
Trades Made
111
Market Transactions
No ITEM for trade
✪YEEZUS 7 Oct, 2017 @ 7:37pm 
+rep great guy bought me 2 games 👌👌
IIRRYY 23 Sep, 2017 @ 1:56pm 
123 22 Aug, 2017 @ 3:59pm 
+rep great fast trader :)
slyme Trading 16 Jul, 2017 @ 12:04pm 
+rep fast, easy trade
f1x 16 Jul, 2017 @ 11:51am 
+rep good trade with butt plugs
AaronAimZ 15 Jul, 2017 @ 1:27pm 
+rep good CH