示例#1
0
def get_sounds(dir: str) -> List[numpy.ndarray]:
    sounds = []
    for filename in listdir(dir):
        realpath = path.join(dir, filename)
        rate, data = cached_loader.load_wav(realpath)
        sounds.append(data)
    return sounds
示例#2
0
 def __init__(self, signal_strength: int = None):
     super().__init__()
     self.signal = signal_strength if signal_strength is not None else random.randint(
         1, 3)
     self._name = "%i barres de rézo" % self.signal
     self.hpfreq, self.lpfreq, self.overdrive, self.gain = self._params_table[
         self.signal]
     rate, self.interf_fx = cached_loader.load_wav(
         self._interference_filepath)
示例#3
0
def get_sounds(dir: Path) -> List[numpy.ndarray]:
    sounds = []
    for filename in dir.iterdir():
        rate, data = cached_loader.load_wav(str(filename))
        sounds.append(data)
    return sounds
示例#4
0
 def __init__(self):
     super().__init__()
     self.rate, self.track_data = cached_loader.load_wav(
         self.sound_file)
示例#5
0
 def __init__(self):
     super().__init__()
     self.rate, self.fx_wave_array = cached_loader.load_wav(str(self.FAP_FX))