Import pygame import time # Initialize or mixer from som do pygame pygame
今天有些特別的內容,只對你開放。
import pygame import time # Initialize or mixer from som do pygame pygame.mixer.init() # Carrega os arquivos de som keyboard_mechanic = pygame.mixer.Sound('keyboard_mechanic.wav') Click_mouse = pygame.mixer.Sound('Click_mouse.wav') cha_cafe = pygame.mixer.Sound('cha_cafe.wav') clock_wand = pygame.mixer.Sound('clock_wand.wav') enviroment_night-time = pygame.mixer.Sound('enviroment_night-time.wav') music_lofi = pygame.mixer.Sound('music_lofi.wav') breathing_leve = pygame.mixer.Sound('breathing_leve.wav') page_turning = pygame.mixer.Sound('page_turning.wav') noise_offwhite = pygame.mixer.Sound('noise_offwhite.wav') enviroment_internal = pygame.mixer.Sound('enviroment_internal.wav') # Define a duração das músicas e efeitos sonoros music_lofi.play(-1) # Toca a música lofi em loop enviroment_night-time.play(-1) # Toca o som enviroment night-time em loop noise_offwhite.play(-1) # Toca o ruído offwhite em loop # Play random sound effects def play_Random_effect(): keyboard_mechanic.play() time.sleep(1) Click_mouse.play() time.sleep(2) cha_cafe.play() time.sleep(3) clock_wand.play() time.sleep(5) breathing_leve.play() time.sleep(2) page_turning.play() time.sleep(1) # Simulate dinner for 10 minutes (600 seconds) start_time = time.time() while time.time() - start_time < 600: play_Random_effect() time.sleep(10) # Para a música e os efeitos sonoros ao final music_lofi.stop() enviroment_night-time.stop() noise_offwhite.stop() pygame.quit()
提示詞
復製
import pygame
import time
# Initialize or mixer from som do pygame pygame.mixer.init()
# Carrega os arquivos de som
keyboard_mechanic = pygame.mixer.Sound('keyboard_mechanic.wav')
Click_mouse = pygame.mixer.Sound('Click_mouse.wav')
cha_cafe = pygame.mixer.Sound('cha_cafe.wav')
clock_wand = pygame.mixer.Sound('clock_wand.wav')
enviroment_night-time = pygame.mixer.Sound('enviroment_night-time.wav')
music_lofi = pygame.mixer.Sound('music_lofi.wav')
breathing_leve = pygame.mixer.Sound('breathing_leve.wav')
page_turning = pygame.mixer.Sound('page_turning.wav')
noise_offwhite = pygame.mixer.Sound('noise_offwhite.wav')
enviroment_internal = pygame.mixer.Sound('enviroment_internal.wav')
# Define a duração das músicas e efeitos sonoros
music_lofi.play(-1) # Toca a música lofi em loop
enviroment_night-time.play(-1) # Toca o som enviroment night-time em loop
noise_offwhite.play(-1) # Toca o ruído offwhite em loop
# Play random sound effects def play_Random_effect():
keyboard_mechanic.play()
time.sleep(1)
Click_mouse.play()
time.sleep(2)
cha_cafe.play()
time.sleep(3)
clock_wand.play()
time.sleep(5)
breathing_leve.play()
time.sleep(2)
page_turning.play()
time.sleep(1)
# Simulate dinner for 10 minutes (600 seconds)
start_time = time.time()
while time.time() - start_time < 600:
play_Random_effect()
time.sleep(10)
# Para a música e os efeitos sonoros ao final
music_lofi.stop()
enviroment_night-time.stop()
noise_offwhite.stop()
pygame.quit()
信息
模型 & 風格
共 0 條評論
1
0
0