노현욱

feat : deleting none important target, effect

......@@ -8,13 +8,13 @@ from scipy.fft import fft, fftfreq
import math
import time
TARGET = "frequency" # frequency, amplitude, decibel
EFFECT = "pitch_shift" # echo, pitch_shift, low_filter
TARGET = "decibel" # frequency, decibel
EFFECT = "pitch_shift" # pitch_shift, low_filter
RATE = 44100
CHUNK = 1024
MAX_FREQ = 40 # max freq for pitch shifting
MAX_AMPLITUDE = 10000 # max amplitude for pitch shifting
MAX_AMPLITUDE = 1440735 # max amplitude for pitch shifting
MAX_DECIBEL = 150 # max decibel for decibel shifting
MIN_DECIBEL = 50
EFFECT_LEVEL = 20 # number of effect level
......@@ -142,7 +142,7 @@ class Effector:
elif self.target == "amplitude":
param = min(MAX_AMPLITUDE-1, amplitude) / MAX_AMPLITUDE
elif self.target == "decibel":
param = min(MAX_DECIBEL-MIN_DECIBEL, db-MIN_DECIBEL) / MAX_DECIBEL-MIN_DECIBEL
param = min(MAX_DECIBEL-MIN_DECIBEL, db-MIN_DECIBEL) / (MAX_DECIBEL-MIN_DECIBEL)
param = max(param, 0)
return param
......