Playing midi on Pygame
问题 Ok, this is what I got: import pygame import sys from pygame.locals import * bif="bg.jpg" mif="pkmn.png" sif="bubble.png" song_1="testaudio.mid" pygame.init() FPS = 30 # FPS FPSCLOCK = pygame.time.Clock() # FPS screen = pygame.display.set_mode ((600,375),0,32) intro=pygame.mixer.Sound(song_1) intro.play() background = pygame.image.load(bif).convert() pygame.mouse.set_visible(0) char = pygame.image.load(mif).convert_alpha() x = screen.get_width()/2 - char.get_width()/2 y = screen.get_height()