mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
music streaming experiment
This commit is contained in:
@@ -857,7 +857,7 @@ class AudioEngine:
|
||||
if sound in self.sounds:
|
||||
self.sounds[sound].pan = max(0.0, min(1.0, pan))
|
||||
|
||||
def load_music_stream(self, fileName: Path, preview: float=0, normalize: Optional[float] = None) -> str:
|
||||
def load_music_stream(self, fileName: Path, preview: Optional[float] = None, normalize: Optional[float] = None) -> str:
|
||||
music = Music(file_path=fileName, target_sample_rate=self.target_sample_rate, preview=preview, normalize=normalize)
|
||||
music_id = f"music_{len(self.music_streams)}"
|
||||
self.music_streams[music_id] = music
|
||||
|
||||
@@ -23,7 +23,7 @@ class BaseChibi:
|
||||
self.hori_move.start()
|
||||
self.vert_move = Animation.create_move(60000 / self.bpm / 2, total_distance=50, reverse_delay=0)
|
||||
self.vert_move.start()
|
||||
self.index = random.randint(0, len(tex.textures[self.name])-1)
|
||||
self.index = random.randint(0, len([item for item in tex.textures[self.name] if item[0].isdigit()])-1)
|
||||
tex_list = tex.textures[self.name][str(self.index)].texture
|
||||
keyframe_len = tex_list if isinstance(tex_list, list) else [0]
|
||||
self.keyframes = [i for i in range(len(keyframe_len))]
|
||||
|
||||
Reference in New Issue
Block a user