Пример #1
0
def tremolo(data, freq, dry=0.5, wet=0.5, rate=44100):
    """ Tremolo effect
      http://en.wikipedia.org/wiki/Tremolo
  """
    length = float(len(data)) / rate
    modwave = source.sine(freq, length) / 2 + 0.5
    return (data * dry) + ((data * modwave) * wet)
Пример #2
0
def tremolo(data, freq, dry=0.5, wet=0.5, rate=44100):
  ''' Tremolo effect
      http://en.wikipedia.org/wiki/Tremolo
  '''
  length = float(len(data)) / rate
  modwave = (source.sine(freq, length) / 2 + 0.5)
  return (data * dry) + ((data * modwave) * wet)
Пример #3
0
def flanger(data, freq, dry=0.5, wet=0.5, depth=20.0, delay=1.0, rate=44100):
  ''' Flanger effect
      http://en.wikipedia.org/wiki/Flanging
  '''
  length = float(len(data)) / rate
  mil = float(rate) / 1000
  delay *= mil
  depth *= mil
  modwave = (source.sine(freq, length) / 2 + 0.5) * depth + delay
  return feedback_modulated_delay(data, modwave, dry, wet)
Пример #4
0
def chorus(data, freq, dry=0.5, wet=0.5, depth=1.0, delay=25.0, rate=44100):
  ''' Chorus effect
      http://en.wikipedia.org/wiki/Chorus_effect
  '''
  length = float(len(data)) / rate
  mil = float(rate) / 1000
  delay *= mil
  depth *= mil
  modwave = (source.sine(freq, length) / 2 + 0.5) * depth + delay
  return modulated_delay(data, modwave, dry, wet)
Пример #5
0
 def render_singing(self):
     pitch_duration = 1/self.adj_per_sec
     sounds = []
     starting_phase = random.random()
     for t in range(self.duration):
         phase = additions.get_phase(sounds[-1], new_volume=self.volumes[t]) if len(sounds) > 0 else starting_phase
         sounds.append(self.volumes[t] * source.sine(self.realized[t], pitch_duration, phase=phase))
     sound = np.concatenate([s[:-1] for s in sounds])
     return sound
     
Пример #6
0
def flanger(data, freq, dry=0.5, wet=0.5, depth=20.0, delay=1.0, rate=44100):
    """ Flanger effect
      http://en.wikipedia.org/wiki/Flanging
  """
    length = float(len(data)) / rate
    mil = float(rate) / 1000
    delay *= mil
    depth *= mil
    modwave = (source.sine(freq, length) / 2 + 0.5) * depth + delay
    return feedback_modulated_delay(data, modwave, dry, wet)
Пример #7
0
def chorus(data, freq, dry=0.5, wet=0.5, depth=1.0, delay=25.0, rate=44100):
    """ Chorus effect
      http://en.wikipedia.org/wiki/Chorus_effect
  """
    length = float(len(data)) / rate
    mil = float(rate) / 1000
    delay *= mil
    depth *= mil
    modwave = (source.sine(freq, length) / 2 + 0.5) * depth + delay
    return modulated_delay(data, modwave, dry, wet)