當前位置: 首頁>>代碼示例>>Python>>正文


Python DoubleButterworthLowPassFilter.set_input_sampling_rate方法代碼示例

本文整理匯總了Python中ATK.EQ.DoubleButterworthLowPassFilter.set_input_sampling_rate方法的典型用法代碼示例。如果您正苦於以下問題:Python DoubleButterworthLowPassFilter.set_input_sampling_rate方法的具體用法?Python DoubleButterworthLowPassFilter.set_input_sampling_rate怎麽用?Python DoubleButterworthLowPassFilter.set_input_sampling_rate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ATK.EQ.DoubleButterworthLowPassFilter的用法示例。


在下文中一共展示了DoubleButterworthLowPassFilter.set_input_sampling_rate方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: filter_4

# 需要導入模塊: from ATK.EQ import DoubleButterworthLowPassFilter [as 別名]
# 或者: from ATK.EQ.DoubleButterworthLowPassFilter import set_input_sampling_rate [as 別名]
def filter_4(input):
  import numpy as np
  output = np.zeros(input.shape, dtype=np.float64)

  infilter = DoubleInPointerFilter(input, False)
  infilter.set_input_sampling_rate(48000)
  overfilter = DoubleOversampling6points5order_4Filter()
  overfilter.set_input_sampling_rate(48000)
  overfilter.set_output_sampling_rate(48000 * 4)
  overfilter.set_input_port(0, infilter, 0)
  overdrivefilter = DoubleSimpleOverdriveFilter()
  overdrivefilter.set_input_sampling_rate(48000 * 4)
  overdrivefilter.set_input_port(0, overfilter, 0)
  lowpassfilter = DoubleButterworthLowPassFilter()
  lowpassfilter.set_input_sampling_rate(48000 * 4)
  lowpassfilter.set_cut_frequency(48000)
  lowpassfilter.set_order(5)
  lowpassfilter.set_input_port(0, overdrivefilter, 0)
  decimationfilter = DoubleDecimationFilter(1)
  decimationfilter.set_input_sampling_rate(48000 * 4)
  decimationfilter.set_output_sampling_rate(48000)
  decimationfilter.set_input_port(0, lowpassfilter, 0)
  outfilter = DoubleOutPointerFilter(output, False)
  outfilter.set_input_sampling_rate(48000)
  outfilter.set_input_port(0, decimationfilter, 0)
  outfilter.process(input.shape[1])
  return output
開發者ID:Ravirael,項目名稱:AudioTK,代碼行數:29,代碼來源:simple_overdrive.py

示例2: filter_32

# 需要導入模塊: from ATK.EQ import DoubleButterworthLowPassFilter [as 別名]
# 或者: from ATK.EQ.DoubleButterworthLowPassFilter import set_input_sampling_rate [as 別名]
def filter_32(input):
  import numpy as np
  output = np.zeros(input.shape, dtype=np.float64)

  infilter = DoubleInPointerFilter(input, False)
  infilter.set_input_sampling_rate(48000)
  overfilter = DoubleOversampling6points5order_32Filter()
  overfilter.set_input_sampling_rate(48000)
  overfilter.set_output_sampling_rate(48000 * 32)
  overfilter.set_input_port(0, infilter, 0)
  overdrivefilter = DoubleFollowerTransistorClassAFilter.build_standard_filter()
  overdrivefilter.set_input_sampling_rate(48000 * 32)
  overdrivefilter.set_input_port(0, overfilter, 0)
  lowpassfilter = DoubleButterworthLowPassFilter()
  lowpassfilter.set_input_sampling_rate(48000 * 32)
  lowpassfilter.set_cut_frequency(48000)
  lowpassfilter.set_order(5)
  lowpassfilter.set_input_port(0, overdrivefilter, 0)
  decimationfilter = DoubleDecimationFilter(1)
  decimationfilter.set_input_sampling_rate(48000 * 32)
  decimationfilter.set_output_sampling_rate(48000)
  decimationfilter.set_input_port(0, lowpassfilter, 0)
  outfilter = DoubleOutPointerFilter(output, False)
  outfilter.set_input_sampling_rate(48000)
  outfilter.set_input_port(0, decimationfilter, 0)
  outfilter.process(input.shape[1])
  return output
開發者ID:mbrucher,項目名稱:AudioTK,代碼行數:29,代碼來源:PyATKPreamplifier_follower_transistor_class_A_test.py

示例3: filter_32

# 需要導入模塊: from ATK.EQ import DoubleButterworthLowPassFilter [as 別名]
# 或者: from ATK.EQ.DoubleButterworthLowPassFilter import set_input_sampling_rate [as 別名]
def filter_32(input):
  import numpy as np
  output = np.zeros(input.shape, dtype=np.float64)

  infilter = DoubleInPointerFilter(input, False)
  infilter.set_input_sampling_rate(sample_rate)
  overfilter = DoubleOversampling6points5order_32Filter()
  overfilter.set_input_sampling_rate(sample_rate)
  overfilter.set_output_sampling_rate(sample_rate * 32)
  overfilter.set_input_port(0, infilter, 0)
  overdrivefilter = DoubleSD1OverdriveFilter(1)
  overdrivefilter.set_input_sampling_rate(sample_rate * 32)
  overdrivefilter.set_input_port(0, overfilter, 0)
  overdrivefilter.set_drive(0.9)
  lowpassfilter = DoubleButterworthLowPassFilter()
  lowpassfilter.set_input_sampling_rate(sample_rate * 32)
  lowpassfilter.set_cut_frequency(20000)
  lowpassfilter.set_order(5)
  lowpassfilter.set_input_port(0, overdrivefilter, 0)
#  lowpassfilter2 = DoubleButterworthLowPassFilter()
#  lowpassfilter2.set_input_sampling_rate(sample_rate * 32)
#  lowpassfilter2.set_cut_frequency(20000)
#  lowpassfilter2.set_order(5)
#  lowpassfilter2.set_input_port(0, lowpassfilter, 0)
#  lowpassfilter3 = DoubleButterworthLowPassFilter()
#  lowpassfilter3.set_input_sampling_rate(sample_rate * 32)
#  lowpassfilter3.set_cut_frequency(20000)
#  lowpassfilter3.set_order(5)
#  lowpassfilter3.set_input_port(0, lowpassfilter2, 0)
  decimationfilter = DoubleDecimationFilter(1)
  decimationfilter.set_input_sampling_rate(sample_rate * 32)
  decimationfilter.set_output_sampling_rate(sample_rate)
  decimationfilter.set_input_port(0, lowpassfilter, 0)
  tonefilter = DoubleSD1ToneFilter()
  tonefilter.set_input_sampling_rate(sample_rate)
  tonefilter.set_input_port(0, decimationfilter, 0)
  tonefilter.set_tone(1)
  highpassfilter = DoubleChamberlinFilter()
  highpassfilter.set_input_sampling_rate(sample_rate)
  highpassfilter.set_input_port(0, tonefilter, 0)
  highpassfilter.select(2)
  highpassfilter.set_attenuation(1)
  highpassfilter.set_cut_frequency(20)
  outfilter = DoubleOutPointerFilter(output, False)
  outfilter.set_input_sampling_rate(sample_rate)
  outfilter.set_input_port(0, highpassfilter, 0)
  outfilter.process(input.shape[1])
  return output
開發者ID:Ravirael,項目名稱:AudioTK,代碼行數:50,代碼來源:sd1_overdrive.py

示例4: filter_low

# 需要導入模塊: from ATK.EQ import DoubleButterworthLowPassFilter [as 別名]
# 或者: from ATK.EQ.DoubleButterworthLowPassFilter import set_input_sampling_rate [as 別名]
def filter_low(input):
  import numpy as np
  output = np.zeros(input.shape, dtype=np.float64)

  infilter = DoubleInPointerFilter(input, False)
  infilter.set_input_sampling_rate(48000)
  lowpassfilter = DoubleButterworthLowPassFilter()
  lowpassfilter.set_input_sampling_rate(48000)
  lowpassfilter.set_cut_frequency(1000)
  lowpassfilter.set_order(5)
  lowpassfilter.set_input_port(0, infilter, 0)
  print lowpassfilter.get_coefficients_in()
  print lowpassfilter.get_coefficients_out()
  outfilter = DoubleOutPointerFilter(output, False)
  outfilter.set_input_sampling_rate(48000)
  outfilter.set_input_port(0, lowpassfilter, 0)
  outfilter.process(input.shape[1])
  return output
開發者ID:Ravirael,項目名稱:AudioTK,代碼行數:20,代碼來源:butterworth.py


注:本文中的ATK.EQ.DoubleButterworthLowPassFilter.set_input_sampling_rate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。